Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

silent vor 4 Jahren
Ursprung
Commit
4ba9e193c4
2 geänderte Dateien mit 42 neuen und 26 gelöschten Zeilen
  1. 41 25
      src/views/ldt_mall/comps/mall_audit.vue
  2. 1 1
      src/views/ldt_mall/mall.vue

+ 41 - 25
src/views/ldt_mall/comps/mall_audit.vue

@@ -70,6 +70,9 @@
         <el-form-item :required="true" label="商场全称" prop="signName">
           <el-input v-model="merchantSubjectForm.signName"></el-input>
         </el-form-item>
+        <el-form-item :required="true" label="营业执照编号" prop="licenceNo">
+          <el-input v-model="merchantSubjectForm.licenceNo"></el-input>
+        </el-form-item>
         <el-form-item :required="true" label="商场简称" prop="shortName">
           <el-input v-model="merchantSubjectForm.shortName"></el-input>
         </el-form-item>
@@ -133,7 +136,8 @@
     mallAudit,
   } from "@/api/ldt_mall/mall";
   import {
-    getList
+    getList,
+    update as updateAudit
   } from "@/api/ldt_shop/audit";
   import {
     dictionaryPage
@@ -153,7 +157,7 @@
     data() {
       return {
         active: 1,
-        totalStep: 3,
+        totalStep: 4,
         mallDetail: {},
         //审核表单
         auditForm: {
@@ -344,7 +348,7 @@
         //银行账户开户总行编码
         bankCodeList: [],
         //账户类型
-        bankAccountTypeList: [],
+        bankAccountTypeList: [{label:"企业对公账户",value: "ENTERPRISE_ACCOUNT"}],
 
         merchantCorporationRules: {
           idCardFront: [{
@@ -401,6 +405,11 @@
             message: '请输入商场全称',
             trigger: 'blur'
           }],
+          licenceNo: [{
+            required: true,
+            message: '请输入营业执照编号',
+            trigger: 'blur'
+          }],
           shortName: [{
             required: true,
             message: '请输入商场简称',
@@ -454,7 +463,9 @@
         this.getProcessDefinitionId()
         this.getDetail()
         this.getBankCode()
-        this.getBankAccountType()
+        // this.getBankAccountType()
+        this.settlementAccountForm.bankCode = this.bankAccountTypeList[0].value
+        this.settlementAccountForm.bankCodeLabel = this.bankAccountTypeList[0].label
         if(this.isResubmit){
           this.initResubmit();
         }
@@ -466,13 +477,13 @@
         getList(0,10,{entityId: this.operateId}).then(res => {
           if(res.data.data.records.length>0){
             let data = res.data.data.records[0];
-            this.merchantCorporationForm = data;
-            this.merchantContactForm = data;
-            this.merchantSubjectForm = data;
-            this.businessAddressForm = data;
-            this.settlementAccountForm = data;
+            Object.keys(this.merchantCorporationForm).forEach((key) => {this.merchantCorporationForm[key] = data[key];});
+            Object.keys(this.merchantContactForm).forEach((key) => {this.merchantContactForm[key] = data[key];});
+            Object.keys(this.merchantSubjectForm).forEach((key) => {this.merchantSubjectForm[key] = data[key];});
+            Object.keys(this.businessAddressForm).forEach((key) => {this.businessAddressForm[key] = data[key];});
+            Object.keys(this.settlementAccountForm).forEach((key) => {this.settlementAccountForm[key] = data[key];});
             this.processInstanceId = data.processInstanceId;
-            this.auditForm = data;
+            this.auditForm.id = data.id;
           }
         })
       },
@@ -517,7 +528,7 @@
           }
         })
       },
-      getBankAccountType() {
+     getBankAccountType() {
         let params = {
           current: 1,
           size: 10,
@@ -601,7 +612,7 @@
       resetForm(formName) {
         this.$refs[formName].resetFields();
       },
-      submit() {
+      async submit() {
         Object.assign(this.auditForm, this.merchantCorporationForm,
           this.merchantContactForm, this.merchantSubjectForm,
           this.businessAddressForm)
@@ -614,27 +625,31 @@
         this.auditForm.idCard = this.merchantCorporationForm.idCardFront
         this.auditForm.entityId = this.operateId
         this.auditForm.entity = this.merchantSubjectForm.enterpriseName
-
+        console.log(this.auditForm,123)
         if(this.isResubmit){
-          todoList(0,10,{
+          let res = ( await todoList(0,10,{
             assignee: "$INITIATOR",
             processInstanceId: this.processInstanceId
-          }).then(res => {
-            if(res.data.data.records.length>0){
+          }))
+          if(res.data.data.records.length>0){
               let task = res.data.data.records[0];
-              completeTask(task).then(res => {
+              let updateRes = await updateAudit(this.auditForm);
+              completeTask(task).then(res=> {
                 this.$message({
-                type: "success",
-                message: "操作成功!"
-            });
+                  type: "success",
+                  message: "修改成功!"
+                });
               })
             }
-          })
         }else{
-          mallAudit(this.auditForm).then(res => {
-                    console.log(res);
-                  })
+          mallAudit(this.auditForm).then(res=> {
+                this.$message({
+                  type: "success",
+                  message: "修改成功!"
+                });
+              }) 
         }
+        this.$emit(finish,{});
       },
       /**
        * 上传法人身份证正面照
@@ -707,7 +722,7 @@
         this.merchantSubjectForm.signType = "ENTERPRISE"
         this.merchantSubjectForm.signName = this.merchantSubjectForm.enterpriseName
         this.merchantSubjectForm.shortName = this.mallDetail.mallName
-        this.merchantSubjectForm.licenceNo = source.serial
+        this.merchantSubjectForm.licenceNo = source.regNum
         this.merchantSubjectForm.businessLicense = e.data[1].link
         console.log(this.merchantSubjectForm);
       },
@@ -718,6 +733,7 @@
       handleUploadOpenAccountLicence(e) {
         this.merchantSubjectForm.openAccountLicenceUrl = e.data.link
       },
+
       /**
        * 上传手持营业执照的照片
        * @param {Object} e

+ 1 - 1
src/views/ldt_mall/mall.vue

@@ -3,7 +3,7 @@
     <el-dialog @close="dialogShow=false" append-to-body :close-on-click-modal="false" :visible.sync="dialogShow"
                :title="dialogTitle" width="60%">
       <mall-audit v-if="dialogTitle=='商场进件'&& dialogShow" ref="refName" :operateId="operateId"
-                  :isResubmit="isResubmit"></mall-audit>
+                  :isResubmit="isResubmit" @finish="dialogShow=false"></mall-audit>
     </el-dialog>
 
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"