|
|
@@ -75,8 +75,8 @@
|
|
|
<up-input v-model="form.model" disabled placeholder="型号" />
|
|
|
</up-form-item>
|
|
|
|
|
|
- <up-form-item label="经销商" prop="serviceenterprisename">
|
|
|
- <up-textarea maxlength="499" v-model="form.serviceenterprisename" disabled placeholder="经销商" autoHeight
|
|
|
+ <up-form-item label="经销商" prop="enterprisename">
|
|
|
+ <up-textarea maxlength="499" v-model="form.enterprisename" disabled placeholder="经销商" autoHeight
|
|
|
height="20" />
|
|
|
</up-form-item>
|
|
|
<up-form-item label="客户名称" prop="customername">
|
|
|
@@ -154,7 +154,7 @@ const form = reactive({
|
|
|
'model': "", // 型号
|
|
|
'unitname': "", // 计量单位
|
|
|
'spec': "", // 规格
|
|
|
- serviceenterprisename: "", // 经销商
|
|
|
+ enterprisename: "", // 经销商
|
|
|
cardno: "" // 保修卡号
|
|
|
});
|
|
|
const rules = reactive({
|
|
|
@@ -263,7 +263,7 @@ let querySku = ref(true); // SKU是否正确
|
|
|
|
|
|
function skuConfirm() {
|
|
|
if (form.sku) {
|
|
|
- ['serviceenterprisename', "customername", 'customerphonenumber', 'sa_customersid', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
+ ['enterprisename', "customername", 'customerphonenumber', 'sa_customersid', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
form[key] = '';
|
|
|
});
|
|
|
if (form.sku.length < 3) {
|
|
|
@@ -292,8 +292,8 @@ function skuConfirm() {
|
|
|
querySku.value = true;
|
|
|
res.data[0].customername = res.data[0].customername || res.data[0].name;
|
|
|
res.data[0].customerphonenumber = res.data[0].customerphonenumber || res.data[0].phonenumber;
|
|
|
- res.data[0].serviceenterprisename = res.data[0].serviceenterprisename || res.data[0].enterprisename;
|
|
|
- ["customername", 'customerphonenumber', 'sa_customersid', 'phonenumber', 'serviceenterprisename', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'unitname', 'spec'].forEach(key => {
|
|
|
+ res.data[0].enterprisename = res.data[0].enterprisename || res.data[0].enterprisename;
|
|
|
+ ["customername", 'customerphonenumber', 'sa_customersid', 'phonenumber', 'enterprisename', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'unitname', 'spec'].forEach(key => {
|
|
|
form[key] = res.data[0][key] || '';
|
|
|
});
|
|
|
uni.showToast({ title: '已填充表单', icon: 'none' });
|
|
|
@@ -324,8 +324,8 @@ function changeItem(item) {
|
|
|
}
|
|
|
|
|
|
function handle() {
|
|
|
- item.serviceenterprisename = item.serviceenterprisename || item.enterprisename;
|
|
|
- ['serviceenterprisename', "customername", 'customerphonenumber', 'sa_customersid', 'sku', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
+ item.enterprisename = item.enterprisename || item.enterprisename;
|
|
|
+ ['enterprisename', "customername", 'customerphonenumber', 'sa_customersid', 'sku', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
form[key] = item[key] || '';
|
|
|
});
|
|
|
uni.showToast({ title: '已填充表单', icon: 'none' });
|
|
|
@@ -389,7 +389,7 @@ function toSelectProduct() {
|
|
|
url: '/pages/select/product'
|
|
|
});
|
|
|
$Http.onSelected = (item) => {
|
|
|
- ['serviceenterprisename', 'sku', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
+ ['enterprisename', 'sku', 'cardno', 'itemid', 'itemname', 'itemno', 'model', 'phonenumber', 'unitname', 'spec'].forEach(key => {
|
|
|
form[key] = item[key] || '';
|
|
|
});
|
|
|
uni.navigateBack()
|