Bladeren bron

商户审核

lianghanqiang 4 jaren geleden
bovenliggende
commit
386eec397b

+ 5 - 0
jsconfig.json

@@ -0,0 +1,5 @@
+  {
+    "include": [
+      "./src/**/*"
+    ]
+  }

+ 8 - 0
src/api/base/region.js

@@ -33,6 +33,14 @@ export const getDetail = (code) => {
   })
 }
 
+export const getOne = (params) => {
+  return request({
+    url: '/api/blade-system/region/detail',
+    method: 'get',
+    params
+  })
+}
+
 export const remove = (id) => {
   return request({
     url: '/api/blade-system/region/remove',

+ 7 - 0
src/api/ldt_mall/mall.js

@@ -57,3 +57,10 @@ export const mallAudit = (row) => {
   })
 }
 
+export const downloadSign = (row) => {
+  return request({
+    url: '/api/mall/downloadSign',
+    method: 'get',
+    params: row
+  })
+}

+ 7 - 0
src/api/ldt_shop/audit.js

@@ -21,6 +21,13 @@ export const getDetail = (id) => {
     }
   })
 }
+export const getOne = (params) => {
+  return request({
+    url: '/api/ldt_shop/audit/detail',
+    method: 'get',
+    params
+  })
+}
 
 export const remove = (ids) => {
   return request({

+ 53 - 9
src/views/ldt_mall/comps/mall_audit.vue

@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <div>
     <el-steps :active="active" align-center>
       <el-step title="商场法人信息"></el-step>
       <el-step title="商场联系人信息"></el-step>
@@ -124,25 +124,31 @@
       <el-button v-else type="primary" @click="next">确认</el-button>
     </div>
 
-  </basic-container>
+  </div>
 </template>
 
 <script>
   import {
     getDetail,
-    mallAudit
+    mallAudit,
   } from "@/api/ldt_mall/mall";
+  import {
+    getList
+  } from "@/api/ldt_shop/audit";
   import {
     dictionaryPage
   } from "@/api/system/dictbiz.js";
 
   import {
-    startList
+    startList,
+    todoList,
+    completeTask
   } from "@/api/work/work.js"
 
   export default {
     props: {
-      operateId: String
+      operateId: String,
+      isResubmit: Boolean
     },
     data() {
       return {
@@ -449,7 +455,29 @@
         this.getDetail()
         this.getBankCode()
         this.getBankAccountType()
+        if(this.isResubmit){
+          this.initResubmit();
+        }
+      },
+      /**
+       * 修改资料重新提交初始化
+       */
+      initResubmit(){
+        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;
+            this.processInstanceId = data.processInstanceId;
+            this.auditForm = data;
+          }
+        })
       },
+
+
       /**
        * 获取流程定义id
        *
@@ -587,10 +615,26 @@
         this.auditForm.entityId = this.operateId
         this.auditForm.entity = this.merchantSubjectForm.enterpriseName
 
-        mallAudit(this.auditForm).then(res => {
-          console.log(res);
-        })
-
+        if(this.isResubmit){
+          todoList(0,10,{
+            assignee: "$INITIATOR",
+            processInstanceId: this.processInstanceId
+          }).then(res => {
+            if(res.data.data.records.length>0){
+              let task = res.data.data.records[0];
+              completeTask(task).then(res => {
+                this.$message({
+                type: "success",
+                message: "操作成功!"
+            });
+              })
+            }
+          })
+        }else{
+          mallAudit(this.auditForm).then(res => {
+                    console.log(res);
+                  })
+        }
       },
       /**
        * 上传法人身份证正面照

+ 132 - 64
src/views/ldt_mall/mall.vue

@@ -1,8 +1,8 @@
 <template>
   <basic-container>
-    <el-dialog @close="dialogShow=false" append-to-body   :close-on-click-modal="false" :visible.sync="dialogShow"
+    <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=='商场进件'" ref="refName" :operateId="operateId"></mall-audit>
+      <mall-audit v-if="dialogTitle=='商场进件'&& dialogShow" ref="refName" :operateId="operateId" :isResubmit="isResubmit"></mall-audit>
     </el-dialog>
 
     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
@@ -29,14 +29,14 @@
       <template slot-scope="scope" slot="dataInfo">
         <div style="display: flex;">
           <div>
-             会员数量:
+            会员数量:
             <div
               style="background-color: #3296fa;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
               {{scope.row.memberNum}}
             </div>
           </div>
           <div>
-             账户余额:
+            账户余额:
             <div
               style="background-color: #5289ff;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
               {{scope.row.balance}}
@@ -45,7 +45,7 @@
         </div>
 
         <div>
-           积分数量:
+          积分数量:
           <div
             style="background-color: #ffaa7f;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
             {{scope.row.point}}
@@ -53,7 +53,7 @@
         </div>
 
         <div>
-           积分兑率:
+          积分兑率:
           <div
             style="background-color: #00aa7f;color: white; border-radius: 5px; margin:10px; padding:0 10px 0 10px ; display:inline;">
             {{scope.row.pointRate}}
@@ -61,10 +61,20 @@
         </div>
       </template>
 
+      <!-- 进件状态 -->
+      <template slot-scope="scope" slot="auditStatus">
+        <div>{{ auditStatusKey(scope.row.auditStatus) }}</div>
+        <el-tag  v-if="scope.row.auditStatus=='WAITING_SIGN'" @click.stop="downloadFile(scope.row)" type="warning" style="margin-top: 3px;cursor: pointer;"> 打开签约页
+        </el-tag><br>
+        <el-tag   @click.stop="openDialog(scope.row.id,'商场进件',true)" type="danger" style="margin-top: 3px;cursor: pointer;"> 修改进件资料</el-tag><br>
+        <el-tag v-if="!$isEmpty(scope.row.auditStatus)"  @click.stop="toFlowDetail(scope.row)" type="success" style="margin-top: 3px;cursor: pointer;"> 状态跟踪</el-tag><br>
+      </template>
+    
       <!-- 操作菜单 -->
       <template slot-scope="scope" slot="menu">
         <el-button type="text" size="small" icon="el-icon-view" plain class="none-border"
-          @click.stop="openDialog(scope.row.id,'商场进件')">商场进件
+          :disabled= "!$isEmpty(scope.row.auditStatus)"
+          @click.stop="openDialog(scope.row.id,'商场进件',false)">商场进件
         </el-button>
       </template>
 
@@ -83,8 +93,15 @@
     getDetail,
     add,
     update,
+    downloadSign,
     remove
   } from "@/api/ldt_mall/mall";
+    import {
+    getOne as getAudit
+  } from "@/api/ldt_shop/audit";
+  import {
+    getOne as getRegion
+  } from "@/api/base/region";
   import {
     mapGetters
   } from "vuex";
@@ -92,19 +109,63 @@
     getLazyTree
   } from "@/api/base/region";
 
-import mallAudit from "./comps/mall_audit.vue"
+  const auditKV = [{
+      label: "待商场审核",
+      value: "WAITING_MALL"
+    },
+    {
+      label: "待平台审核",
+      value: "WAITING_PLATFORM"
+    },
+    {
+      label: "商户入驻评估",
+      value: "WAITING_INVITATION"
+    },
+    {
+      label: "待商户签约",
+      value: "WAITING_SIGN"
+    },
+    {
+      label: "待商户认证",
+      value: "WAITING_AUTH"
+    },
+    {
+      label: "审核通过",
+      value: "PASS"
+    },
+    {
+      label: "审核驳回",
+      value: "FAIL"
+    },
+    {
+      label: "停用",
+      value: "STOP"
+    },
+  ]
+
+
+  import mallAudit from "./comps/mall_audit.vue"
   export default {
-    components:{
+    components: {
       mallAudit
     },
+    watch:{
+      "form.locationCode"(val){
+          if(!this.$isEmpty(val)){
+            let regions = val.split(",");
+            getRegion({code: regions[regions.length-1]}).then(res => {
+              let region = res.data.data;
+              this.form.location = region.provinceName+","+region.cityName+","+region.districtName
+            })
+          }
+        }
+    },
     data() {
       return {
         //弹框
-        dialogShow:false,
+        dialogShow: false,
         operateId: '',
-        dialogTitle:'',
-
-
+        dialogTitle: '',
         form: {
           longitude: "",
         },
@@ -120,13 +181,14 @@ import mallAudit from "./comps/mall_audit.vue"
           height: 'auto',
           calcHeight: 30,
           tip: false,
+          viewBtn: false,
           searchShow: true,
           searchMenuSpan: 6,
           searchLabelWidth: 120,
           border: true,
           index: true,
-          viewBtn: true,
           addBtn: true,
+          card: true,
           selection: true,
           dialogClickModal: false,
           labelWidth: 150,
@@ -185,6 +247,7 @@ import mallAudit from "./comps/mall_audit.vue"
             {
               label: "是否启用会员中心",
               prop: "useMember",
+              addDisplay: false,
               type: "radio",
               dicData: [{
                 label: '否',
@@ -225,19 +288,8 @@ import mallAudit from "./comps/mall_audit.vue"
               label: "所在区域",
               width: 150,
               prop: "location",
-              type: "cascader",
-              typeslot: true,
-              separator: "-",
-              dicUrl: 'https://cli.avuejs.com/api/area/getProvince',
-              lazy: true,
-              emitPath: true,
-              region: [],
-              lazyLoad: this.region,
-              dataType: "string",
-              props: {
-                label: 'title',
-                value: 'title'
-              },
+              hide: true,
+              display: false,
               rules: [{
                 required: true,
                 message: "请输入所在区域",
@@ -249,7 +301,7 @@ import mallAudit from "./comps/mall_audit.vue"
               prop: "address",
               type: "map",
               dataType: "string",
-              hide:true,
+              hide: true,
               rules: [{
                 required: true,
                 message: "请选择具体地址",
@@ -257,11 +309,20 @@ import mallAudit from "./comps/mall_audit.vue"
               }]
             },
             {
-              label: "所在区域编码",
+              label: "所在区域",
               prop: "locationCode",
               hide: true,
-              display: false,
-              disabled: false,
+              type: "cascader",
+              typeslot: true,
+              separator: ",",
+              lazy: true,
+              emitPath: true,
+              lazyLoad: this.region,
+              dataType: "string",
+              props: {
+                label: 'title',
+                value: 'id'
+              },
               rules: [{
                 required: false,
                 message: "请输入所在区域编码",
@@ -289,9 +350,14 @@ import mallAudit from "./comps/mall_audit.vue"
               }]
             },
             {
-              label: "商场描述",
-              prop: "intro",
-              type: "textarea",
+              label: "进件状态",
+              prop: "auditStatus",
+              type: "select",
+              addDisplay: false,
+              search: true,
+              slot: true,
+              editDisplay: false,
+              dicData: auditKV
             },
             {
               label: "会员数量",
@@ -352,13 +418,32 @@ import mallAudit from "./comps/mall_audit.vue"
         });
         return ids.join(",");
       }
+
     },
     methods: {
-      openDialog(id,name) {
-        this.dialogTitle=name
+      auditStatusKey(value) {
+        if(this.$isEmpty(value)){return "暂无进件信息"}
+        return auditKV.filter(item => item.value == value)[0].label;
+      },
+      downloadFile(row) {
+        downloadSign(row).then(res => {
+          window.open(res.data.data);
+        })
+      },
+      toFlowDetail(row){
+        console.log(row);
+          getAudit({entityId: row.id}).then(res => {
+             let audit = res.data.data;
+             console.log(audit.processInstanceId,row.id)
+             this.$router.push(`/work/process/shop/handle/${audit.processInstanceId}/${audit.id}`)
+          })
+      },
+      openDialog(id, name,isResubmit) {
+        this.dialogTitle = name
         this.operateId = id
         this.dialogShow = true
-        if (this.canReset && this.dialogTitle!='商场进件') {
+        this.isResubmit  = isResubmit;
+        if (this.canReset && this.dialogTitle != '商场进件') {
           this.$refs.refName.refreshChange()
         }
         this.canReset = true
@@ -466,44 +551,26 @@ import mallAudit from "./comps/mall_audit.vue"
         let stop_level = 2;
         let level = node.level;
         let data = node.data || {}
-        let parentCode = data.id;
+        let code = data.id;
         let list = [];
-        if (level > 0) {
-          let col = this.option.column.find((item) => {
-            return item.prop === "location";
-          });
-          col.region[level - 1] = data.id;
-          if (level > 2) {
-            this.form.locationCode = col.region.join(',');
-          }
-        }
+
         let callback = () => {
           resolve((list || []).map(ele => {
-            return Object.assign(ele, {
+            ele.hasChildren = false;
+            ele.children = [];
+            return Object.assign(ele,{
               leaf: level >= stop_level
             })
           }));
         }
-        if (level == 0) {
-          getLazyTree().then(res => {
-            list = res.data.data;
-            callback()
-          })
-        }
-        if (level == 1) {
-          getLazyTree(parentCode).then(res => {
-            list = res.data.data;
-            callback()
-          })
-        } else if (level == 2) {
-          getLazyTree(parentCode).then(res => {
+
+        getLazyTree(code).then(res => {
             list = res.data.data;
             callback()
           })
-        } else {
-          callback()
-        }
       },
+
+
       onLoad(page, params = {}) {
         this.loading = true;
         getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
@@ -516,6 +583,7 @@ import mallAudit from "./comps/mall_audit.vue"
       }
     }
   };
+
 </script>
 
 <style>

+ 17 - 2
src/views/ldt_shop/audit.vue

@@ -43,6 +43,7 @@
         },
         selectionList: [],
         option: {
+          card: true,
           addBtn: false,
           height:'auto',
           calcHeight: 30,
@@ -58,7 +59,7 @@
           dialogClickModal: false,
           column: [
             {
-              label: "商户名称",
+              label: "名称",
               prop: "shopName",
             },
             {
@@ -74,16 +75,30 @@
               label: "法人姓名",
               prop: "legalPerson",
             },
+            {
+              label: "进件类型",
+              prop: "type",
+              type: "select",
+              search: true,
+              dicData: [
+                {label: "商场",value:"MALL"},
+                {label: "商户",value:"SHOP"},
+              ]
+            },
             {
               label: "审核状态",
               prop: "auditStatus",
               type: "select",
               search: true,
               dicData: [
-                {label: "待平台审核",value:"WAITING_PLATFORM"},
                 {label: "待商场审核",value:"WAITING_MALL"},
+                {label: "待平台审核",value:"WAITING_PLATFORM"},
+                {label: "商户入驻评估",value:"WAITING_INVITATION"},
+                {label: "待商户签约",value:"WAITING_SIGN"},
+                {label: "待商户认证",value:"WAITING_AUTH"},
                 {label: "审核通过",value:"PASS"},
                 {label: "审核驳回",value:"FAIL"},
+                {label: "停用",value:"STOP"},
               ]
             },
             {