Browse Source

国家下拉框不能输入选择

lxf 2 years ago
parent
commit
fd0abbdfd6

+ 1 - 1
src/components/process/Contract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/EHSD/Contract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/EHSD/PriceSheet.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 9 - 6
src/components/process/EHSD/Purchase.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => changeSellAddress(val, '20')">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => changeSellAddress(val, '20')">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>
@@ -643,11 +643,19 @@ const changeAddress = () => {
     if (formData.data.provinceId) {
       let data = provinceData.value.filter((item) => item.id === formData.data.provinceId);
       if (data && data.length > 0) provinceName = data[0].name;
+    } else {
+      if (formData.data.provinceName) {
+        provinceName = formData.data.provinceName;
+      }
     }
     let cityName = "";
     if (formData.data.cityId) {
       let data = cityData.value.filter((item) => item.id === formData.data.cityId);
       if (data && data.length > 0) cityName = data[0].name;
+    } else {
+      if (formData.data.cityName) {
+        cityName = formData.data.cityName;
+      }
     }
     let sellAddress = "";
     if (formData.data.sellAddress) {
@@ -728,13 +736,11 @@ const onPicture = (path) => {
   window.open(path, "_blank");
 };
 const changeProject = () => {
-  console.log("222");
   nextTick(() => {
     calculationAllAmount();
   });
 };
 const calculationAllAmount = () => {
-  console.log("111");
   let amount = 0;
   if (formData.data.purchaseProductList && formData.data.purchaseProductList.length > 0) {
     for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
@@ -750,7 +756,6 @@ const calculationAllAmount = () => {
       }
     }
   }
-  console.log(amount);
   formData.data.amount = amount;
 };
 const calculationProductAmount = (index) => {
@@ -851,13 +856,11 @@ const handleSubmit = async () => {
     if (formData.data.purchaseArrivalList && formData.data.purchaseArrivalList.length > 0) {
       for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
         let data = formData.data.purchaseArrivalList.filter((item) => item.productId === formData.data.purchaseProductList[i].productId);
-        console.log(data, "bbb");
         if (data && data.length > 0) {
           let quantity = 0;
           for (let j = 0; j < data.length; j++) {
             quantity = parseFloat(Number(quantity) + Number(data[j].quantity));
           }
-          console.log(quantity, formData.data.purchaseProductList[i].quantity, "aaa");
           if (quantity > formData.data.purchaseProductList[i].quantity) {
             ElMessage("到货数量不能大于采购数量");
             return false;

+ 1 - 1
src/components/process/EHSD/Sample.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/PriceSheet.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/components/process/ServiceContract.vue

@@ -57,7 +57,7 @@
             <el-row style="margin-top: 20px; width: 100%">
               <el-col :span="6">
                 <el-form-item label="地址" prop="countryId">
-                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                  <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                     <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>

+ 1 - 1
src/views/customer/file/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 1 - 1
src/views/customer/highseas/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 1 - 1
src/views/customer/privatesea/index.vue

@@ -193,7 +193,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>

+ 1 - 1
src/views/publicModule/companyConfig/index.vue

@@ -37,7 +37,7 @@
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" filterable allow-create @change="(val) => getCityData(val, '20', true)">
+                <el-select v-model="formData.data.countryId" placeholder="国家" filterable @change="(val) => getCityData(val, '20', true)">
                   <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>