Quellcode durchsuchen

Merge branch 'stage' into dev0.3

asd26269546 vor 1 Jahr
Ursprung
Commit
d9259ff997

+ 20 - 26
src/components/process/ServiceContract.vue

@@ -85,8 +85,9 @@
             :data="uploadData"
             multiple
             :before-upload="uploadFile"
-            :on-success="handleSuccess2"
-            :on-preview="onPreviewFile2">
+            :on-success="handleSuccess"
+            :on-preview="onPreviewFile"
+          >
             <el-button>选择</el-button>
           </el-upload>
         </div>
@@ -117,8 +118,15 @@
                     placeholder="国家"
                     filterable
                     @change="(val) => getCityData(val, '20', true)"
-                    :no-match-text="'无数据,请联系管理员添加'">
-                    <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
+                    :no-match-text="'无数据,请联系管理员添加'"
+                  >
+                    <el-option
+                      v-for="item in countryData"
+                      :key="item.id"
+                      :label="item.chineseName + '(' + item.name + ')'"
+                      :value="item.id"
+                    >
+                    </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -716,7 +724,6 @@ const rules = ref({
   ],
 });
 
-
 const getDict = () => {
   proxy.getDictOne(["account_currency", "funds_payment_method"]).then((res) => {
     accountCurrency.value = res["account_currency"].map((x) => ({
@@ -1067,27 +1074,16 @@ const uploadFile = async (file) => {
   return true;
 };
 
-const handleSuccess2 = (any, UploadFile) => {
-  console.log(any, UploadFile);
-  console.log(formData.data)
-  formData.data.fileList.push({
-    id: UploadFile.raw.id,
-    fileName: UploadFile.raw.fileName,
-    fileUrl: UploadFile.raw.fileUrl,
-    uploadState: UploadFile.raw.uploadState,
-  });
-};
-
 const handleSuccess = (any, UploadFile) => {
   UploadFile.raw.uploadState = false;
 };
 
-const onPreviewFile2 = (file) => {
-  window.open(file.fileUrl, "_blank");
-};
-
 const onPreviewFile = (file) => {
-  window.open(file.raw.fileUrl, "_blank");
+  if (file.fileUrl) {
+    window.open(file.fileUrl, "_blank");
+  } else {
+    window.open(file.raw.fileUrl, "_blank");
+  }
 };
 const submitHandoverForm = () => {
   formData.data.serviceContractProductList[productIndex.value].remark =
@@ -1277,18 +1273,16 @@ watch(
       ["10", "20", "30"].includes(route.query.processType)
     ) {
       for (var text in props.queryData) {
-        
         formData.data[text] = props.queryData[text];
-        
       }
       formData.data.fileList = formData.data.fileList.map((item) => {
         return {
           name: item.fileName,
           url: item.fileUrl,
-          ...item
-        }
+          ...item,
+        };
       });
-      console.log(formData.data)
+      console.log(formData.data);
       if (formData.data.countryId) {
         getCityData(formData.data.countryId, "20");
       }

+ 1 - 1
src/views/finance/fundManage/accountPayment/index.vue

@@ -17,7 +17,7 @@
       >
         <template #amount="{ item }">
           <div style="width: 100%">
-            <span>{{ item.currency }} {{ item.amount }}</span>
+            <span>{{ item.currency }} {{ item.incomeAmount }}</span>
           </div>
         </template>
       </byTable>

+ 2 - 1
src/views/finance/fundManage/accountStatement/index.vue

@@ -761,7 +761,7 @@ const formConfig = computed(() => {
       isShow: formData.data.isTransaction == "1",
       fn: (val) => {
         if (val) {
-          let list = transactionDepartmentData.value.filter((item) => item.id === val);
+          let list = transactionDepartmentData.value.filter((item) => item.value === val);
           if (list && list.length > 0) {
             formData.data.deptType = list[0].deptType;
           } else {
@@ -815,6 +815,7 @@ const getTransactionDepartment = () => {
         return {
           label: item.name,
           value: item.id,
+          deptType: item.deptType,
         };
       });
     });

+ 7 - 1
src/views/finance/fundManage/flow/index.vue

@@ -596,8 +596,13 @@ const formConfig = computed(() => {
       data: [],
       isShow: formData.data.isTransaction == 1,
       fn: (val) => {
+        
         if (val) {
-          let list = transactionDepartmentData.value.filter((item) => item.id === val);
+          console.log(transactionDepartmentData.value);
+          let list = transactionDepartmentData.value.filter((item) => {
+            if(item.value == val) return item
+          });
+          console.log(list);
           if (list && list.length > 0) {
             formData.data.deptType = list[0].deptType;
           } else {
@@ -736,6 +741,7 @@ const getTransactionDepartment = () => {
         return {
           label: item.name,
           value: item.id,
+          deptType: item.deptType,
         };
       });
       formConfig.value[7].data = transactionDepartmentData.value

+ 90 - 11
src/views/publicModule/companyConfig/index.vue

@@ -38,26 +38,74 @@
           <el-row style="width: 100%;display: flex;justify-content: space-between;">
             <el-col :span="7">
               <el-form-item prop="countryId">
-                <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
+                  v-model="formData.data.countryId"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="请输入关键字"
+                  remote-show-suffix
+                  no-data-text="无数据,请联系管理员添加"
+                  :loading="loadingSearch"
+                  :remote-method="(val) => remoteMethod(val, '0')"
+                  @input="(val) => remoteMethod(val, '0')"
+                  @change="(val) => getCityData(val, '20')"
+                >
+                  <el-option
+                    v-for="item in countryData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item prop="provinceName">
-                <selectCity
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  addressId="provinceId"
-                  addressName="provinceName"
-                  v-model="formData.data"
-                  :data="provinceData">
-                </selectCity>
+                <el-select
+                  v-model="formData.data.provinceId"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="请输入关键字"
+                  remote-show-suffix
+                  no-data-text="无数据,请联系管理员添加"
+                  :loading="loadingSearchProvince"
+                  :remote-method="(val) => remoteMethod(val, '1')"
+                  @input="(val) => remoteMethod(val, '1')"
+                  @change="(val) => getCityData(val, '30')"
+                >
+                  <el-option
+                    v-for="item in provinceData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+                
               </el-form-item>
             </el-col>
             <el-col :span="7">
               <el-form-item prop="cityName">
-                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
+                <el-select
+                  v-model="formData.data.cityId"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="请输入关键字"
+                  remote-show-suffix
+                  no-data-text="无数据,请联系管理员添加"
+                  :loading="loadingSearchCity"
+                  :remote-method="(val) => remoteMethod(val, '2')"
+                  @input="(val) => remoteMethod(val, '2')"
+                >
+                  <el-option
+                    v-for="item in cityData"
+                    :label="item.name"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
           </el-row>
@@ -633,6 +681,37 @@ const contractSealListSuccess = (response, uploadFile) => {
     },
   ];
 };
+
+const loadingSearch = ref(false);
+const loadingSearchProvince = ref(false);
+const remoteMethod = (keyword, type) => {
+  if (keyword && typeof keyword === "string") {
+    let parentId = "0";
+    if (type == "0") {
+      loadingSearch.value = true;
+    } else if (type == "1") {
+      parentId = formData.data.countryId;
+      loadingSearchProvince.value = true;
+    } else if (type == "2") {
+      parentId = formData.data.provinceId;
+      loadingSearchCity.value = true;
+    }
+    proxy.post("/customizeArea/page", { parentId, keyword }).then((res) => {
+      if (type == "0") {
+        countryData.value = res.rows;
+        loadingSearch.value = false;
+      } else if (type == "1") {
+        provinceData.value = res.rows;
+        loadingSearchProvince.value = false;
+      } else if (type == "2") {
+        cityData.value = res.rows;
+        loadingSearchCity.value = false;
+      }
+    });
+  }
+  return;
+};
+
 </script>
 
 <style lang="scss" scoped>

+ 7 - 2
src/views/salesMange/salesMange/invoice/index.vue

@@ -31,7 +31,7 @@
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     <el-form-item :prop="'invoiceDetailsList.' + $index + '.contractId'" :rules="rules.contractId" :inline-message="true">
-                      <el-select v-model="row.contractId" placeholder="请选择合同编号" style="width: 100%">
+                      <el-select v-model="row.contractId" filterable placeholder="请选择合同编号" style="width: 100%">
                         <el-option v-for="item in contractList" :key="item.value" :label="item.label" :value="item.value" />
                       </el-select>
                     </el-form-item>
@@ -166,7 +166,7 @@ const config = computed(() => {
                 type: "warning",
               }).then(() => {
                 proxy
-                  .post("/supplierInfo/delete", {
+                  .post("/invoice/delete", {
                     id: row.id,
                   })
                   .then((res) => {
@@ -257,6 +257,7 @@ const formConfig = computed(() => {
       label: "归属公司",
       prop: "corporationId",
       data: corporationList.value,
+      filterable: true,
       style: {
         width: "100%",
       },
@@ -359,6 +360,10 @@ const submitForm = () => {
         }
       }
     }
+    const total =  formData.data.invoiceDetailsList.reduce((val,x)=>val+=Number(x.money),0)
+    if(formData.data.money !=  Number( parseFloat(total).toFixed(2))){
+       return ElMessage("关联金额总合必须等于发票金额");
+    }
     submitLoading.value = true;
     proxy.post("/contractInvoice/add", formData.data).then(
       () => {