فهرست منبع

报价单 销售合同 服务合同 字段调整

lxf 1 سال پیش
والد
کامیت
e36fdc7091
3فایلهای تغییر یافته به همراه129 افزوده شده و 115 حذف شده
  1. 41 51
      src/components/process/Contract.vue
  2. 44 32
      src/components/process/PriceSheet.vue
  3. 44 32
      src/components/process/ServiceContract.vue

+ 41 - 51
src/components/process/Contract.vue

@@ -704,66 +704,56 @@ const changeTemplate = (val) => {
           if (detailCorporation.countryEnStr) {
             formData.data.sellCountryName = detailCorporation.countryEnStr;
           }
-          if (res.provinceEnStr) {
-            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          }
-          if (res.cityEnStr) {
-            formData.data.sellCityName = detailCorporation.cityEnStr;
-          }
-          if (detailCorporation.countryEnStr) {
-            formData.data.sellCountryName = detailCorporation.countryEnStr;
-          } else {
-            proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-              let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-              if (sellCountryData && sellCountryData.length > 0) {
-                formData.data.sellCountryName = sellCountryData[0].chineseName;
-              } else {
-                formData.data.sellCountryName = "";
-              }
-            });
-          }
           if (detailCorporation.provinceEnStr) {
             formData.data.sellProvinceName = detailCorporation.provinceEnStr;
-          } else if (detailCorporation.countryId) {
-            proxy
-              .post("/customizeArea/list", {
-                parentId: detailCorporation.countryId,
-              })
-              .then((resProvince) => {
-                let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-                if (sellProvinceData && sellProvinceData.length > 0) {
-                  formData.data.sellProvinceName = sellProvinceData[0].name;
-                } else {
-                  formData.data.sellProvinceName = "";
-                }
-              });
-          } else {
-            formData.data.sellProvinceName = "";
           }
-
           if (detailCorporation.cityEnStr) {
             formData.data.sellCityName = detailCorporation.cityEnStr;
-          } else if (detailCorporation.provinceId) {
-            proxy
-              .post("/customizeArea/list", {
-                parentId: detailCorporation.provinceId,
-              })
-              .then((resCity) => {
-                let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-                if (sellCityData && sellCityData.length > 0) {
-                  formData.data.sellCityName = sellCityData[0].name;
-                } else {
-                  formData.data.sellCityName = "";
-                }
-              });
-          } else {
-            formData.data.sellCityName = "";
           }
           if (detailCorporation.addressEn) {
             formData.data.sellAddress = detailCorporation.addressEn;
-          } else {
-            formData.data.sellAddress = detailCorporation.address;
           }
+          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
+          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
+          //   if (sellCountryData && sellCountryData.length > 0) {
+          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
+          //   } else {
+          //     formData.data.sellCountryName = "";
+          //   }
+          // });
+          // if (detailCorporation.countryId) {
+          //   proxy
+          //     .post("/customizeArea/list", {
+          //       parentId: detailCorporation.countryId,
+          //     })
+          //     .then((resProvince) => {
+          //       let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
+          //       if (sellProvinceData && sellProvinceData.length > 0) {
+          //         formData.data.sellProvinceName = sellProvinceData[0].name;
+          //       } else {
+          //         formData.data.sellProvinceName = "";
+          //       }
+          //     });
+          // } else {
+          //   formData.data.sellProvinceName = "";
+          // }
+          // if (detailCorporation.provinceId) {
+          //   proxy
+          //     .post("/customizeArea/list", {
+          //       parentId: detailCorporation.provinceId,
+          //     })
+          //     .then((resCity) => {
+          //       let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
+          //       if (sellCityData && sellCityData.length > 0) {
+          //         formData.data.sellCityName = sellCityData[0].name;
+          //       } else {
+          //         formData.data.sellCityName = "";
+          //       }
+          //     });
+          // } else {
+          //   formData.data.sellCityName = "";
+          // }
+          // formData.data.sellAddress = detailCorporation.address;
         });
       }
       formData.data.sellContactName = res.contactName;

+ 44 - 32
src/components/process/PriceSheet.vue

@@ -50,7 +50,7 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeCustomer">
+              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
                 <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
@@ -525,39 +525,51 @@ const changeTemplate = (val) => {
       formData.data.sellCorporationId = res.corporationId;
       if (res.corporationId) {
         proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-            let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-            if (sellCountryData && sellCountryData.length > 0) {
-              formData.data.sellCountryName = sellCountryData[0].chineseName;
-            } else {
-              formData.data.sellCountryName = "";
-            }
-          });
-          if (detailCorporation.countryId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-              let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-              if (sellProvinceData && sellProvinceData.length > 0) {
-                formData.data.sellProvinceName = sellProvinceData[0].name;
-              } else {
-                formData.data.sellProvinceName = "";
-              }
-            });
-          } else {
-            formData.data.sellProvinceName = "";
+          if (detailCorporation.countryEnStr) {
+            formData.data.sellCountryName = detailCorporation.countryEnStr;
+          }
+          if (detailCorporation.provinceEnStr) {
+            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
+          }
+          if (detailCorporation.cityEnStr) {
+            formData.data.sellCityName = detailCorporation.cityEnStr;
           }
-          if (detailCorporation.provinceId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-              let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-              if (sellCityData && sellCityData.length > 0) {
-                formData.data.sellCityName = sellCityData[0].name;
-              } else {
-                formData.data.sellCityName = "";
-              }
-            });
-          } else {
-            formData.data.sellCityName = "";
+          if (detailCorporation.addressEn) {
+            formData.data.sellAddress = detailCorporation.addressEn;
           }
-          formData.data.sellAddress = detailCorporation.address;
+          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
+          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
+          //   if (sellCountryData && sellCountryData.length > 0) {
+          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
+          //   } else {
+          //     formData.data.sellCountryName = "";
+          //   }
+          // });
+          // if (detailCorporation.countryId) {
+          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
+          //     let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
+          //     if (sellProvinceData && sellProvinceData.length > 0) {
+          //       formData.data.sellProvinceName = sellProvinceData[0].name;
+          //     } else {
+          //       formData.data.sellProvinceName = "";
+          //     }
+          //   });
+          // } else {
+          //   formData.data.sellProvinceName = "";
+          // }
+          // if (detailCorporation.provinceId) {
+          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
+          //     let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
+          //     if (sellCityData && sellCityData.length > 0) {
+          //       formData.data.sellCityName = sellCityData[0].name;
+          //     } else {
+          //       formData.data.sellCityName = "";
+          //     }
+          //   });
+          // } else {
+          //   formData.data.sellCityName = "";
+          // }
+          // formData.data.sellAddress = detailCorporation.address;
         });
       }
       formData.data.sellContactName = res.contactName;

+ 44 - 32
src/components/process/ServiceContract.vue

@@ -50,7 +50,7 @@
         <div style="width: 100%">
           <div style="width: 100%">
             <el-form-item prop="buyCorporationId">
-              <el-select v-model="formData.data.buyCorporationId" style="width: 100%" @change="changeCustomer">
+              <el-select v-model="formData.data.buyCorporationId" filterable style="width: 100%" @change="changeCustomer">
                 <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
@@ -509,39 +509,51 @@ const changeTemplate = (val) => {
       formData.data.sellCorporationId = res.corporationId;
       if (res.corporationId) {
         proxy.post("/corporation/detail", { id: res.corporationId }).then((detailCorporation) => {
-          proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
-            let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
-            if (sellCountryData && sellCountryData.length > 0) {
-              formData.data.sellCountryName = sellCountryData[0].chineseName;
-            } else {
-              formData.data.sellCountryName = "";
-            }
-          });
-          if (detailCorporation.countryId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
-              let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
-              if (sellProvinceData && sellProvinceData.length > 0) {
-                formData.data.sellProvinceName = sellProvinceData[0].name;
-              } else {
-                formData.data.sellProvinceName = "";
-              }
-            });
-          } else {
-            formData.data.sellProvinceName = "";
+          if (detailCorporation.countryEnStr) {
+            formData.data.sellCountryName = detailCorporation.countryEnStr;
+          }
+          if (detailCorporation.provinceEnStr) {
+            formData.data.sellProvinceName = detailCorporation.provinceEnStr;
+          }
+          if (detailCorporation.cityEnStr) {
+            formData.data.sellCityName = detailCorporation.cityEnStr;
           }
-          if (detailCorporation.provinceId) {
-            proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
-              let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
-              if (sellCityData && sellCityData.length > 0) {
-                formData.data.sellCityName = sellCityData[0].name;
-              } else {
-                formData.data.sellCityName = "";
-              }
-            });
-          } else {
-            formData.data.sellCityName = "";
+          if (detailCorporation.addressEn) {
+            formData.data.sellAddress = detailCorporation.addressEn;
           }
-          formData.data.sellAddress = detailCorporation.address;
+          // proxy.post("/customizeArea/list", { parentId: "0" }).then((resCountry) => {
+          //   let sellCountryData = resCountry.filter((item) => item.id === detailCorporation.countryId);
+          //   if (sellCountryData && sellCountryData.length > 0) {
+          //     formData.data.sellCountryName = sellCountryData[0].chineseName;
+          //   } else {
+          //     formData.data.sellCountryName = "";
+          //   }
+          // });
+          // if (detailCorporation.countryId) {
+          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.countryId }).then((resProvince) => {
+          //     let sellProvinceData = resProvince.filter((item) => item.id === detailCorporation.provinceId);
+          //     if (sellProvinceData && sellProvinceData.length > 0) {
+          //       formData.data.sellProvinceName = sellProvinceData[0].name;
+          //     } else {
+          //       formData.data.sellProvinceName = "";
+          //     }
+          //   });
+          // } else {
+          //   formData.data.sellProvinceName = "";
+          // }
+          // if (detailCorporation.provinceId) {
+          //   proxy.post("/customizeArea/list", { parentId: detailCorporation.provinceId }).then((resCity) => {
+          //     let sellCityData = resCity.filter((item) => item.id === detailCorporation.cityId);
+          //     if (sellCityData && sellCityData.length > 0) {
+          //       formData.data.sellCityName = sellCityData[0].name;
+          //     } else {
+          //       formData.data.sellCityName = "";
+          //     }
+          //   });
+          // } else {
+          //   formData.data.sellCityName = "";
+          // }
+          // formData.data.sellAddress = detailCorporation.address;
         });
       }
       formData.data.sellContactName = res.contactName;