Explorar o código

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-new

cz hai 1 ano
pai
achega
f7f5f9f609

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

@@ -737,7 +737,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);

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

@@ -786,7 +786,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);

+ 6 - 2
src/components/process/EHSD/PriceSheet.vue

@@ -636,7 +636,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);
@@ -863,7 +865,9 @@ onMounted(() => {
       delete formData.data.id;
       delete formData.data.code;
       getCityData(formData.data.countryId, "20");
-      getCityData(formData.data.provinceId, "30");
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
       if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
         formData.data.quotationProductList = formData.data.quotationProductList.map((item) => {
           delete item.id;

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

@@ -726,9 +726,15 @@ const changeSupplier = (val) => {
       formData.data.sellAddress = data[0].areaDetail;
       formData.data.sellContactName = data[0].contactPerson;
       formData.data.sellContactNumber = data[0].contactNumber;
-      Promise.all([getCityData(formData.data.countryId, "20"), getCityData(formData.data.provinceId, "30")]).then(() => {
-        changeAddress();
-      });
+      if (formData.data.provinceId) {
+        Promise.all([getCityData(formData.data.countryId, "20"), getCityData(formData.data.provinceId, "30")]).then(() => {
+          changeAddress();
+        });
+      } else {
+        Promise.all([getCityData(formData.data.countryId, "20")]).then(() => {
+          changeAddress();
+        });
+      }
     }
   }
 };

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

@@ -796,7 +796,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);

+ 6 - 2
src/components/process/PriceSheet.vue

@@ -581,7 +581,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);
@@ -761,7 +763,9 @@ onMounted(() => {
       delete formData.data.id;
       delete formData.data.code;
       getCityData(formData.data.countryId, "20");
-      getCityData(formData.data.provinceId, "30");
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
       if (formData.data.quotationProductList && formData.data.quotationProductList.length > 0) {
         formData.data.quotationProductList = formData.data.quotationProductList.map((item) => {
           delete item.id;

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

@@ -572,7 +572,9 @@ const changeCustomer = (val) => {
         formData.data.buyPostalCode = res.zipCode;
         formData.data.buyAddress = res.address;
         getCityData(formData.data.countryId, "20");
-        getCityData(formData.data.provinceId, "30");
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
       },
       (err) => {
         console.log(err);

+ 2 - 7
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -25,11 +25,6 @@
             <span v-else>未到账</span>
           </div>
         </template>
-        <template #contractVersion="{ item }">
-          <div style="width: 100%">
-            <span v-if="item.contractVersion">V{{ item.contractVersion }}</span>
-          </div>
-        </template>
         <template #timeSpent="{ item }">
           <div style="width: 100%">
             <span>{{ getTimeSpent(item) }}</span>
@@ -108,7 +103,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "版本号",
-        slot: "contractVersion",
+        prop: "contractVersion",
         width: 100,
       },
     },
@@ -265,7 +260,7 @@ const formConfig = computed(() => {
   return [
     {
       type: "input",
-      prop: "code",
+      prop: "contractCode",
       label: "合同编号",
       itemType: "text",
       disabled: true,

+ 2 - 7
src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue

@@ -25,11 +25,6 @@
             <span v-else>未到账</span>
           </div>
         </template>
-        <template #contractVersion="{ item }">
-          <div style="width: 100%">
-            <span v-if="item.contractVersion">V{{ item.contractVersion }}</span>
-          </div>
-        </template>
         <template #timeSpent="{ item }">
           <div style="width: 100%">
             <span>{{ getTimeSpent(item) }}</span>
@@ -108,7 +103,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "版本号",
-        slot: "contractVersion",
+        prop: "contractVersion",
         width: 100,
       },
     },
@@ -265,7 +260,7 @@ const formConfig = computed(() => {
   return [
     {
       type: "input",
-      prop: "code",
+      prop: "contractCode",
       label: "交接单编号",
       itemType: "text",
       disabled: true,

+ 3 - 1
src/views/WDLY/basic/customer/index.vue

@@ -1595,7 +1595,9 @@ const update = (row) => {
     }
     formData.data = res;
     getCityData(formData.data.countryId, "20");
-    getCityData(formData.data.provinceId, "30");
+    if (formData.data.provinceId) {
+      getCityData(formData.data.provinceId, "30");
+    }
     loadingOperation.value = false;
     dialogVisible.value = true;
   });

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

@@ -1186,7 +1186,9 @@ const update = (row) => {
     }
     formData.data = res;
     getCityData(formData.data.countryId, "20");
-    getCityData(formData.data.provinceId, "30");
+    if (formData.data.provinceId) {
+      getCityData(formData.data.provinceId, "30");
+    }
     loadingOperation.value = false;
     dialogVisible.value = true;
   });

+ 104 - 118
src/views/publicModule/companyConfig/index.vue

@@ -19,7 +19,7 @@
       @get-list="getList">
       <template #timeSlot="{ item }"> {{ item.startDate }} - {{ item.stopDate }} </template>
     </byTable>
-    <el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-model="dialogVisible" width="600" v-loading="loading">
+    <el-dialog :title="modalType == 'add' ? '添加公司' : '编辑公司'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #timeGanger>
           <div style="width: 100%">
@@ -32,8 +32,9 @@
                 <el-input v-model="formData.data.stopDate" placeholder="请输入" />
               </el-col>
             </el-row>
-          </div> </template
-        ><template #allAddress>
+          </div>
+        </template>
+        <template #allAddress>
           <el-row style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="countryId">
@@ -185,7 +186,6 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
-import useUserStore from "@/store/modules/user";
 import { computed, ref } from "vue";
 import selectCity from "@/components/selectCity/index.vue";
 
@@ -207,6 +207,8 @@ let rules = ref({
   countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
+const contactInformationType = ref([]);
+const enterpriseType = ref([]);
 const selectConfig = [];
 const config = computed(() => {
   return [
@@ -228,7 +230,7 @@ const config = computed(() => {
         prop: "type",
       },
       render(type) {
-        return proxy.dictDataEcho(type, enterpriseType.value);
+        return proxy.dictValueLabel(type, enterpriseType.value);
       },
     },
     {
@@ -262,7 +264,7 @@ const config = computed(() => {
         prop: "taxpayerQualification",
       },
       render(type) {
-        return proxy.dictDataEcho(type, contactInformationType.value);
+        return proxy.dictValueLabel(type, contactInformationType.value);
       },
     },
     {
@@ -338,116 +340,100 @@ const formOption = reactive({
   rules: [],
 });
 const byform = ref(null);
-const formConfig = reactive([
-  {
-    type: "input",
-    prop: "name",
-    label: "公司名称",
-    required: true,
-  },
-  {
-    type: "input",
-    prop: "nameEn",
-    label: "英文名",
-  },
-  {
-    type: "select",
-    prop: "type",
-    label: "企业类型",
-  },
-  {
-    type: "input",
-    prop: "uscCode",
-    label: "统一社会信用代码",
-  },
-  {
-    type: "input",
-    prop: "legalPersonName",
-    label: "法定代表人",
-  },
-  {
-    type: "input",
-    prop: "registeredCapital",
-    label: "注册资本",
-  },
-  {
-    type: "slot",
-    slotName: "timeGanger",
-    prop: "startDate",
-    label: "营业期限",
-  },
-  {
-    type: "slot",
-    slotName: "allAddress",
-    label: "公司地址",
-  },
-  {
-    type: "slot",
-    slotName: "allAddressEnglish",
-    label: "公司地址 (英文)",
-  },
-  {
-    type: "input",
-    prop: "corporationNumber",
-    label: "公司电话",
-    itemType: "text",
-    placeholder: "请输入公司电话",
-  },
-  {
-    type: "select",
-    prop: "taxpayerQualification",
-    label: "纳税人资质",
-    data: [],
-  },
-  {
-    type: "input",
-    prop: "iaeeCode",
-    label: "进出口企业代码",
-    required: true,
-  },
-  {
-    type: "input",
-    prop: "crCode",
-    label: "海关注册代码",
-    required: true,
-  },
-  {
-    type: "slot",
-    prop: "file",
-    slotName: "file",
-    label: "签章",
-  },
-]);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "name",
+      label: "公司名称",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "nameEn",
+      label: "英文名",
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "企业类型",
+      data: enterpriseType.value,
+    },
+    {
+      type: "input",
+      prop: "uscCode",
+      label: "统一社会信用代码",
+    },
+    {
+      type: "input",
+      prop: "legalPersonName",
+      label: "法定代表人",
+    },
+    {
+      type: "input",
+      prop: "registeredCapital",
+      label: "注册资本",
+    },
+    {
+      type: "slot",
+      slotName: "timeGanger",
+      prop: "startDate",
+      label: "营业期限",
+    },
+    {
+      type: "slot",
+      slotName: "allAddress",
+      label: "公司地址",
+    },
+    {
+      type: "slot",
+      slotName: "allAddressEnglish",
+      label: "公司地址 (英文)",
+    },
+    {
+      type: "input",
+      prop: "corporationNumber",
+      label: "公司电话",
+      itemType: "text",
+      placeholder: "请输入公司电话",
+    },
+    {
+      type: "select",
+      prop: "taxpayerQualification",
+      label: "纳税人资质",
+      data: contactInformationType.value,
+    },
+    {
+      type: "input",
+      prop: "iaeeCode",
+      label: "进出口企业代码",
+      required: true,
+    },
+    {
+      type: "input",
+      prop: "crCode",
+      label: "海关注册代码",
+      required: true,
+    },
+    {
+      type: "slot",
+      prop: "file",
+      slotName: "file",
+      label: "签章",
+    },
+  ];
+});
 const getDict = () => {
-  const tenantId = useUserStore().user.tenantId;
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      tenantId: tenantId,
-      dictCode: "enterprise_type",
-    })
-    .then((res) => {
-      formConfig[2].data = res.rows.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      enterpriseType.value = res.rows;
-    });
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      tenantId: tenantId,
-      dictCode: "taxpayer_qualification",
-    })
-    .then((res) => {
-      formConfig[7].data = res.rows.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      contactInformationType.value = res.rows;
-    });
+  proxy.getDictOne(["enterprise_type", "taxpayer_qualification"]).then((res) => {
+    enterpriseType.value = res["enterprise_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    contactInformationType.value = res["taxpayer_qualification"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -529,7 +515,9 @@ const getDtl = (row) => {
     res.taxpayerQualification = res.taxpayerQualification + "";
     formData.data = res;
     getCityData(formData.data.countryId, "20");
-    getCityData(formData.data.provinceId, "30");
+    if (formData.data.provinceId) {
+      getCityData(formData.data.provinceId, "30");
+    }
     proxy.post("/fileInfo/getList", { businessIdList: [res.id], fileType: 1 }).then((resFile) => {
       formData.data.enterpriseLogoList = resFile[res.id];
     });
@@ -545,8 +533,6 @@ const getDtl = (row) => {
     dialogVisible.value = true;
   });
 };
-const enterpriseType = ref([]);
-const contactInformationType = ref([]);
 const uploadDataOne = ref({});
 const uploadFileOne = async (file) => {
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });