Эх сурвалжийг харах

添加银联主商户绑定

wenjie 1 жил өмнө
parent
commit
af12d682d7

BIN
dist.zip


+ 21 - 2
src/api/common.js

@@ -1,8 +1,8 @@
 /*
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-16 15:14:42
- * @LastEditors: wj 1454560336@qq.com
- * @LastEditTime: 2024-01-04 17:23:20
+ * @LastEditors: wenjie 1454560336@qq.com
+ * @LastEditTime: 2024-04-18 16:41:40
  * @FilePath: \admin-manage\src\api\common.js
  * @Description: 
  * 
@@ -101,3 +101,22 @@ export function getType(params) {
     params
   })
 }
+
+// 地图搜索
+export function getSearchList(params) {
+  return request({
+    url: '/baidu/place/v2/suggestion',
+    method: 'get',
+    params
+  })
+}
+
+
+// 通过uid查询地址
+export function uidToAddress(params) {
+  return request({
+    url: '/baidu/place/v2/detail',
+    method: 'get',
+    params
+  })
+}

+ 4 - 4
src/api/order.js

@@ -2,7 +2,7 @@
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Date: 2023-08-15 17:33:37
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-03-29 11:25:48
+ * @LastEditTime: 2024-05-16 09:20:29
  * @FilePath: \admin-manage\src\api\order.js
  * @Description: 
  * 
@@ -77,11 +77,11 @@ export function withdrawals(params) {
 
 
 // 查询提现
-export function getDetail(params) {
+export function getDetail(data) {
   return request({
     url: '/springbatchservice/pay/account/platformDetail',
-    method: 'get',
-    params
+    method: 'post',
+    data
   })
 }
 

+ 18 - 1
src/api/user.js

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-09-18 10:57:47
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-03-25 11:59:15
+ * @LastEditTime: 2024-04-23 16:19:02
  * @FilePath: \admin-manage\src\api\user.js
  * @Description: 
  * 
@@ -90,3 +90,20 @@ export function userList(params) {
     params
   })
 }
+
+// 查询商户下签约完成的所有银联账号
+export function allFinish(params) {
+  return request({
+    url: '/paymentserver/signature/allFinish',
+    method: 'get',
+    params
+  })
+}
+// 添加绑定
+export function bindComplex(data) {
+  return request({
+    url: '/paymentserver/signature/bindComplex',
+    method: 'post',
+    data
+  })
+}

+ 22 - 1
src/router/index.js

@@ -2,7 +2,7 @@
  * @Author: wenjie 1454560336@qq.com
  * @Date: 2024-03-05 11:36:07
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-09 17:53:28
+ * @LastEditTime: 2024-05-13 14:10:22
  * @FilePath: \admin-manage\src\router\index.js
  * @Description: 
  * 
@@ -692,6 +692,27 @@ export let constantRoutes = [{
           },
         ]
       },
+      {
+        id: 0,
+        path: '/operationManage/couponManage/index',
+        component: operationLayout,
+        meta: {
+          title: '优惠券管理',
+          icon: ''
+        },
+        alwaysShow: true,
+        children: [{
+            id: 1,
+            path: '/operationManage/couponManage/index',
+            name: '/operationManage/couponManage/index',
+            component: () => import('@/views/operationManage/couponManage/index.vue'),
+            meta: {
+              title: '优惠券列表',
+              icon: ''
+            },
+          },
+        ]
+      },
       
       // {
       //   id: 0,

+ 15 - 1
src/styles/index.scss

@@ -115,7 +115,7 @@ div:focus {
   width: 600px !important;
 }
 .ml10{
-  margin-left: 10px;
+  margin-left: 10px!important;
 }
 .mb10{
   margin-bottom: 10px;
@@ -189,4 +189,18 @@ div:focus {
   
     margin: 0;
   
+  }
+  .el-input {
+    input[type="number"] {
+      padding-right: 0px;
+      -moz-appearance: textfield;
+      -webkit-appearance: textfield;
+      // 解决el-input设置类型为number时,中文输入法光标上移问题
+      line-height: 1px !important;
+    }
+    input[type="number"]::-webkit-inner-spin-button,
+    input[type="number"]::-webkit-outer-spin-button {
+      -webkit-appearance: none;
+      margin: 0;
+    }
   }

+ 1 - 1
src/utils/config.js

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2024-01-05 16:08:18
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-15 09:23:29
+ * @LastEditTime: 2024-05-06 09:13:39
  * @FilePath: \admin-manage\src\utils\config.js
  * @Description: 124234
  * 

+ 3 - 2
src/utils/request.js

@@ -2,7 +2,7 @@
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Date: 2022-08-02 14:50:38
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-03-29 09:24:08
+ * @LastEditTime: 2024-04-17 16:16:14
  * @FilePath: \admin-manage\src\utils\request.js
  * @Description: 
  * 
@@ -58,9 +58,10 @@ service.interceptors.response.use(
    * You can also judge the status by HTTP Status Code
    */
   response => {
+    console.log(response);
     const res = response.data
     // 如果code不是 0, 这被判定为一个错误。
-    if (res.state !== "Success") {
+    if (res.state !== "Success" && res.status != 0) {
       Message({
         message: (!Array.isArray[res.content]?res.content:false)|| res.msg||res.exception.message|| 'Error',
         type: 'error',

+ 53 - 3
src/views/merchantManage/addUser.vue

@@ -23,6 +23,12 @@
           </el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="绑定主商户" prop="platformType">
+          <el-checkbox-group v-model="setQuery.platformType">
+            <el-checkbox label="1">慧研学惠生活</el-checkbox>
+            <el-checkbox label="2" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
       <el-form-item label="商户名称:" prop="accountName">
         <el-input
           v-model="setQuery.accountName"
@@ -93,6 +99,21 @@
            :disabled="this.$route.query.id"
         ></el-input>
       </el-form-item>
+      <el-form-item label="商品分账规则:" prop="shareId">
+        <el-select
+          v-model="setQuery.shareId"
+          class="item-width-300"
+          placeholder="请选择商品分账规则"
+        >
+          <el-option
+            v-for="item in ruleOptions"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
       <el-form-item label="备注:" prop="notes">
         <el-input
           v-model="setQuery.notes"
@@ -115,6 +136,8 @@
 import { getShopType,addOrUpdateAccount,accountDetail } from "@/api/user";
 import {getRegion} from '@/api/payment';
 import {debounce} from '@/utils/index';
+import {getRuleList} from '@/api/rule'
+
 export default {
   data() {
     var validatePhone = (rule, value, callback) => {
@@ -141,6 +164,8 @@ export default {
         notes: "",
         phoneNum: "",
         province: "",
+        shareId:'',
+        platformType:[]
       },
       region:{
         "code": "",
@@ -151,9 +176,9 @@ export default {
         accountChildType: [
           { required: true, message: "请选择账户类型", trigger: "change" },
         ],
-        // district: [
-        //   { required: true, message: "请选择所在区域", trigger: "change" },
-        // ],
+        shareId: [
+          { required: true, message: "请选择商品分账规则", trigger: "change" },
+        ],
         contactName: [
           { required: true, message: "请输入联系人", trigger: "blur" },
         ],
@@ -161,6 +186,9 @@ export default {
           { required: true, message: "请输入手机号", trigger: "blur" },
             { validator: validatePhone, trigger: 'blur' }
         ],
+        platformType: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
         // notes: [
         //   { required: true, message: "请输入备注", trigger: "blur" },
         // ],
@@ -170,6 +198,8 @@ export default {
       provinceList: [],//省
       cityList: [],//市
       countyList: [],//区
+      ruleOptions:[],
+      
     };
   },
   watch: {
@@ -225,6 +255,8 @@ export default {
       accountDetail({accountId}).then((res) => {
         if (res.state == "Success") {
           this.setQuery = res.content
+          this.setQuery.platformType = this.setQuery.platformType.split(',')
+
           setTimeout(() => {
             this.isInit = false
           }, 1000);
@@ -232,6 +264,20 @@ export default {
         }
       });
     },
+    // 规则
+    getRuleList() {
+      getRuleList({currentPage:1,pageSize:999}).then((res) => {
+        if (res.state == "Success") {
+          res.content.records.map(item=>{
+            this.ruleOptions.push({
+              label:item.shareRule,
+              value:item.id
+            })
+          })
+        }
+      });
+    },
+    
      save() {
          this.$refs.setQuery.validate((v) => {
              if (v) {
@@ -240,6 +286,8 @@ export default {
             if(this.$route.query.id){
               delete obj.phoneNum
             }
+            obj.platformType = obj.platformType.toString()
+
           addOrUpdateAccount(obj).then((res) => {
             this.loading = false;
             if (res.state == "Success") {
@@ -262,6 +310,7 @@ export default {
                 notes: "",
                 phoneNum: "",
                 province: "",
+                platformType:[]
               };
               this.$router.push("/merchantManage/index");
             }
@@ -272,6 +321,7 @@ export default {
   },
 
   created() {
+    this.getRuleList()
     if(this.$route.query.title == '编辑商户'){
       // this.setQuery = JSON.parse( sessionStorage.getItem('shopUser') )
       this.accountDetail(this.$route.query.id)

+ 141 - 10
src/views/merchantManage/index.vue

@@ -38,6 +38,17 @@
         show-overflow-tooltip
       >
       </el-table-column>
+      <el-table-column
+        prop="accountChildType"
+        align="center"
+        label="所属平台"
+        fit
+      >
+      <template slot-scope="scope">
+        {{scope.row.platformType | filterName}}
+      </template>
+      </el-table-column>
+
       <el-table-column
         prop="accountChildType"
         align="center"
@@ -62,13 +73,6 @@
         show-overflow-tooltip
       >
       </el-table-column>
-      <el-table-column
-        align="center"
-        prop="province"
-        label="地区"
-        show-overflow-tooltip
-      >
-      </el-table-column>
       <el-table-column
         align="center"
         prop="shopNum"
@@ -110,6 +114,11 @@
       <el-table-column align="center" property="shop_name" label="营业名称" ></el-table-column>
       <el-table-column align="center" property="shop_lic" label="营业执照号码"></el-table-column>
       <el-table-column align="center" property="mer_no" label="银联子商户账号"></el-table-column>
+      <el-table-column align="center" property="remark" label="绑定主商户">
+        <template slot-scope="scope">
+          {{scope.row.remark | filterShopName}}
+        </template>
+      </el-table-column>
       <el-table-column align="center" property="apply_status_msg" label="状态"></el-table-column>
       <el-table-column align="center" property="address" label="操作">
          <template slot-scope="scope">
@@ -126,9 +135,49 @@
       </el-table-column>
     </el-table>
      <div slot="footer" class="dialog-footer">
+    <el-button @click="handleBind">从已有银联账号选择</el-button>
     <el-button @click="dialogTableVisible = false">关闭</el-button>
     <el-button type="primary" @click="handleAccountAdd">添加</el-button>
   </div>
+  </el-dialog>
+
+   <el-dialog title="从已有银联账号选择" width="500px" append-to-body :visible.sync="bindDialog">
+      <el-form
+      :model="setQuery"
+      ref="setQuery"
+      :rules="rules"
+      label-width="130px"
+    >
+     <el-form-item label="营业名称:" prop="accesseId">
+        <el-select
+          v-model="setQuery.accesseId"
+          class="item-width-300"
+          filterable
+          placeholder="请选择营业名称"
+        >
+          <el-option
+            @click.native="choose(item.mer_no)"
+            v-for="item in accountList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="银联商户号:">
+        <el-input
+          v-model="mer_no"
+          size="small"
+          class="item-width-300"
+          disabled
+        ></el-input>
+      </el-form-item>
+      </el-form>
+     <div slot="footer" class="dialog-footer">
+    <el-button @click="bindDialog = false">取消</el-button>
+    <el-button type="primary" :loading='btnLoading' @click="submit">确定</el-button>
+  </div>
   </el-dialog>
 
   </div>
@@ -136,7 +185,7 @@
   
   <script>
   import {debounce} from '@/utils/index';
-  import { getList,getShopType,delAccount } from '@/api/user'
+  import { getList,getShopType,delAccount,allFinish,bindComplex } from '@/api/user'
   import { complexList,deleteComplex} from '@/api/payment';
   
 export default {
@@ -149,7 +198,9 @@ export default {
       options: [],
       loading: false,
       loading1: false,
+      btnLoading: false,
       dialogTableVisible:false,
+      bindDialog:false,
       accountId:'',//当前弹框的主体id
       query: {
         shopName: "",
@@ -157,6 +208,15 @@ export default {
         pageSize: 10,
       },
       total: 0,
+      mer_no:'',//银联账号
+      accountList:[],
+      setQuery:{
+        epId:'',
+        accesseId:''
+      },
+      rules: {
+        accesseId: [{ required: true, message: "请选择营业名称", trigger: "chenge" }],
+      }
     };
   },
   // watch: {
@@ -175,11 +235,47 @@ export default {
           msg = item.label
         }
       })
-      console.log(msg);
       return msg
-    }
+    },
+    filterName(val){
+      let list = val.split(",")
+      let arr = []
+       list.map(item=>{
+        if(item == 1){
+          arr.push('慧研学惠生活')
+        }else if(item == 2){
+          arr.push('印象贵大')
+        }
+       })
+       arr = arr.join()
+      return arr
+    },
+    filterShopName(val){
+      let list = val.split(",")
+      let arr = []
+       list.map(item=>{
+        if(item == '89852017372911Y中数'){
+          arr.push('慧研学惠生活')
+        }else if(item == '89852017372912Y贵大'){
+          arr.push('印象贵大')
+        }else if(!arr.length){
+          arr.push('无')
+        }
+       })
+       arr = arr.join()
+      return arr
+    },
+    
   },
   methods: {
+    choose(val){
+      this.mer_no = val
+    },
+    handleBind(){
+      this.bindDialog = true
+      this.allFinish()
+      this.setQuery.accesseId = ''
+    },
     handleSearch(){
       this.query.currentPage = 1
       this.getList();
@@ -250,6 +346,7 @@ export default {
     },
     handle(id,type) {
       this.accountId = id
+      this.setQuery.epId = id
        this.dialogTableVisible = true
         this.complexList(id)
       // if(type == 302){//入驻商户
@@ -329,6 +426,40 @@ export default {
         }
       })
     },
+    // 获取所有的已认证银联号
+    allFinish() {
+      allFinish().then((res) => {
+        if (res.state == "Success") {
+          res.content.map(item=>{
+            this.accountList.push({
+              label:item.shop_name||item.accesser_user_id,
+              value:item.accesser_user_id,
+              mer_no:item.mer_no,
+            })
+          })
+        }
+      });
+    },
+    submit(){
+      this.$refs.setQuery.validate((v) => {
+          if (v) {
+            this.btnLoading = true
+            bindComplex(this.setQuery).then(res=>{
+             this.btnLoading = false
+                if (res.state == "Success") {
+                  this.bindDialog = false
+                  this.complexList(this.accountId)
+                  this.$notify({
+                    title: '成功',
+                    message: '操作成功',
+                    type: 'success'
+                  });
+                }
+
+            })
+          }
+      })
+    }
   },
   created() {
     this.getList()

+ 352 - 0
src/views/operationManage/couponManage/index.vue

@@ -0,0 +1,352 @@
+
+<template>
+  <div class="couponManage app-container">
+    <div class="search">
+      <div>
+        <el-input
+          v-model="query.shopNameOrPhoneNum"
+          size="small"
+          placeholder="请输入优惠券名称"
+          class="item-width-200"
+        ></el-input>
+         <el-date-picker
+          v-model="date"
+          size="small"
+          value-format="timestamp"
+          class="item-width-350 ml10"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+        <el-select
+          v-model="query.shopMenuId"
+          size="small"
+          clearable
+          class="item-width-200 ml10"
+          placeholder="请选择类型"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+        <el-select
+          v-model="query.state"
+          size="small"
+          class="item-width-200 ml10"
+          placeholder="请选择状态"
+        >
+          <el-option
+            v-for="item in options1"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+        <el-button
+        class="ml10"
+        type="primary"
+        size="small"
+        icon="el-icon-search"
+        @click="handleSearch"
+      >
+        搜索
+      </el-button>
+      </div>
+
+      <el-button
+        class="add-btn"
+        type="primary"
+        size="small"
+        @click="handleAdd(0)"
+      >
+        添加
+      </el-button>
+  
+    </div>
+
+    <el-table
+      :data="tableData"
+      tooltip-effect="dark"
+      border
+      v-loading="loading"
+      style="width: 100%"
+    >
+      <el-table-column
+        align="center"
+        label="优惠券名称"
+        prop="shopName"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      
+      <el-table-column
+        prop="shopMenuId"
+        align="center"
+        label="优惠券类型"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+
+      <el-table-column
+        prop="shopMainName"
+        align="center"
+        label="优惠内容"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="shopId"
+        align="center"
+        label="发放数量"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="applyTime"
+        align="center"
+        label="已领取"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="applyTime"
+        align="center"
+        label="剩余数量"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="applyTime"
+        align="center"
+        label="已使用"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="createTime"
+        align="center"
+        label="创建时间"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+     
+      <el-table-column
+        align="center"
+        prop="state"
+        label="状态"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+     
+      <el-table-column prop="address" width="180px" fixed="right" align="center" label="操作">
+        <template slot-scope="scope">
+          <el-button
+            type="text"
+            size="small"
+            @click="handleDetail(scope.row)"
+            >查看</el-button
+          >
+           <el-button
+            type="text"
+            size="small"
+            @click="handleDetail(scope.row)"
+            >编辑</el-button
+          >
+        
+           <el-button type="text" size="small" @click="handle(scope.row)">{{
+            scope.row.state == 1 ? "停止" : "启用"
+          }}</el-button>
+          <el-button type="text" size="small" @click="handleDel(scope.row.shopId)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="page-box">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        background
+        :current-page="query.currentPage"
+        :page-sizes="[10, 20, 30, 40]"
+        :page-size="query.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="total"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+  
+  <script>
+import { debounce } from "@/utils/index";
+import { getList, updateState } from "@/api/shop";
+import {getMenuName} from '@/api/appConfig';
+import axios from 'axios'
+const BASE_URL = require('@/utils/config')
+export default {
+  name: "couponManage",
+  data() {
+    return {
+      tableData: [],
+      options: [],
+      options1: [
+        {
+          value: null,
+          label: "全部状态",
+        },
+        {
+          value: "1",
+          label: "启用",
+        },
+        {
+          value: "4",
+          label: "禁用",
+        },
+      ],
+      loading: false,
+      query: {
+        state: null,
+        province: "",
+        startTime:'',
+        endTime:'',
+        currentPage: 1,
+        pageSize: 10,
+      },
+      total: 0,
+    };
+  },
+  watch: {
+    date(val){
+      if(val){
+        this.query.startTime = val[0]
+        this.query.endTime = val[1]
+      }else{
+        this.query.startTime = ''
+        this.query.endTime = ''
+      }
+    }
+  },
+  methods: {
+    handleSearch(){
+      this.query.currentPage = 1
+      this.getList();
+
+    },
+    handleAdd(val) {
+      this.$router.push({
+        path: "/operationManage/couponManage/shopAdd" + (val || ""),
+      });
+    },
+    handle(row) {
+      let msg;
+      if (row.state == 1) {
+        msg = "禁用";
+      } else {
+        msg = "启用";
+      }
+      this.$confirm(`此操作将${msg}该商铺, 是否继续?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        updateState({
+          shopId: row.shopId,
+          state: row.state == 1 ? 4 : 1,
+        }).then((res) => {
+          if (res.state == "Success") {
+            this.$notify({
+              title: "成功",
+              message: "操作成功",
+              type: "success",
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+    handleEdit(id) {
+      this.$router.push({
+        path: "/operationManage/couponManage/shopAdd",
+        query: {
+          title: "店铺编辑",
+          id,
+        },
+      });
+    },
+    handleDetail(id,title) {
+      this.$router.push({
+        path: "/operationManage/couponManage/shopAdd",
+        query: {
+          title: "店铺详情",
+          id,
+        },
+      });
+    },
+
+    handleDel(shopId){
+      this.$confirm(`此操作将删除该商铺, 是否继续?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        updateState({
+          shopId,
+          state: 3,
+        }).then((res) => {
+          if (res.state == "Success") {
+            this.$notify({
+              title: "成功",
+              message: "操作成功",
+              type: "success",
+            });
+            this.getList();
+          }
+        });
+      });
+    },
+
+    handleSizeChange(val) {
+      this.query.currentPage = 1;
+      this.query.pageSize = val;
+      this.getList();
+    },
+    handleCurrentChange(val) {
+      this.query.currentPage = val;
+      this.getList();
+    },
+
+    getList() {
+      this.loading = true;
+      getList(this.query).then((res) => {
+        this.loading = false;
+        if (res.state == "Success") {
+          this.tableData = res.content.records;
+          this.total = res.content.total;
+        }
+      });
+    },
+  },
+  created() {
+    this.getList();
+  },
+};
+</script>
+  
+<style lang="scss" scoped>
+.couponManage {
+  .search {
+    justify-content: space-between;
+    .add-btn {
+      // margin-right: 20px;
+    }
+  }
+}
+</style>
+  

+ 40 - 31
src/views/operationManage/financeManage/index.vue

@@ -2,26 +2,42 @@
   <div class="financeManage app-container">
    
     <div class="search">
-        <el-input
-          v-model="query.noOrGName"
+      <div>
+          <el-input
+            v-model="query.noOrGName"
+            size="small"
+            placeholder="请输入订单编号"
+            class="item-width-200 "
+          ></el-input>
+          <el-select
+          v-model="query.channel"
           size="small"
-          placeholder="请输入订单编号"
-          class="item-width-200 "
-        ></el-input>
+          class="item-width-200 ml10"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
 
-        <el-date-picker
-          size="small"
-        v-model="date"
-        value-format="timestamp"
-        class="item-width-400 ml10"
-        type="daterange"
-        :default-time="['00:00:00','23:59:59']"
-        :picker-options="pickerOptions"
-        range-separator="至"
-        start-placeholder="开始日期"
-        end-placeholder="结束日期"
-        align="right">
-    </el-date-picker>
+          <el-date-picker
+            size="small"
+          v-model="date"
+          value-format="timestamp"
+          class="item-width-400 ml10"
+          type="daterange"
+          :default-time="['00:00:00','23:59:59']"
+          :picker-options="pickerOptions"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          align="right">
+      </el-date-picker>
+      </div>
      <el-button
         class="ml10"
         type="primary"
@@ -139,21 +155,13 @@ export default {
     return {
       options: [
         {
-          value: "0",
-          label: "全部状态",
-        },
-        {
-          value: "1",
-          label: "已完成",
+          value: "ZhongShu",
+          label: "中数未来",
         },
         {
-          value: "2",
-          label: "进行中",
-        },
-        {
-          value: "3",
-          label: "失败",
-        },
+          value: "GuiDa",
+          label: "印象贵大",
+        }
       ],
       date:'',
       tableData: [],
@@ -162,6 +170,7 @@ export default {
         noOrGName: "",
         startTime: "",
         endTime: "",
+        channel:"ZhongShu",
         page: 1,
         size: 10,
       },

+ 46 - 10
src/views/operationManage/financeManage/withdraw.vue

@@ -44,7 +44,7 @@
 
     </div>
     <div class="right">
-      {{shopName}}
+      {{query.channel | filterName(that)}}
     </div>
    </div>
    
@@ -56,6 +56,21 @@
           class="item-width-200 "
         ></el-input>
 
+         <el-select
+          v-model="query.channel"
+          size="small"
+          class="item-width-200 ml10"
+          placeholder="请选择"
+        >
+          <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+
         <el-date-picker
           size="small"
         v-model="date"
@@ -102,7 +117,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-          {{scope.row.goodsInfo.goodsName}}
+          {{scope.row.goodsInfo.activityName||scope.row.goodsInfo.goodsName}}
         </template>
       </el-table-column>
        <el-table-column
@@ -235,6 +250,7 @@ export default {
   name: "withdraw",
   data() {
     return {
+      that:this,
       date:'',
       shopName:localStorage.getItem('shopName'),
       dialogFormVisible:false,
@@ -248,6 +264,7 @@ export default {
         noOrGName: "",
         startTime: "",
         endTime: "",
+        channel:"ZhongShu",
         page: 1,
         size: 10,
       },
@@ -262,6 +279,16 @@ export default {
         freeze:0,
         ready:0
       },
+      options: [
+        {
+          value: "ZhongShu",
+          label: "中数未来",
+        },
+        {
+          value: "GuiDa",
+          label: "印象贵大",
+        }
+      ],
       pickerOptions: {
           shortcuts: [{
             text: '最近一周',
@@ -292,13 +319,11 @@ export default {
     };
   },
   watch: {
-    // query: {
-    //   handler: debounce(function(val) {
-    //     this.query.page = 1
-    //     this.getTransferList()
-    //   }),
-    //   deep:true
-    // },
+    'query.channel'(val) {
+        this.query.page = 1
+        this.getTransferList();
+        this.getDetail()
+    },
     date(val){
       if(val){
         this.query.startTime = val[0]
@@ -309,6 +334,17 @@ export default {
       }
     }
   },
+  filters: {
+    filterName: function(value,that) {
+      let msg
+      that.options.map(item=>{
+        if(value == item.value){
+          msg = item.label
+        }
+      })
+      return msg;
+    }
+  },
   methods: {
     handleSearch(){
       this.query.page = 1
@@ -392,7 +428,7 @@ export default {
     },
     getDetail(){
       this.moneyLoading = true
-      getDetail().then(res=>{
+      getDetail({channel:this.query.channel}).then(res=>{
         this.moneyLoading = false
          if(res.state == 'Success'){
           this.money = res.content

+ 28 - 5
src/views/operationManage/orderManage/index.vue

@@ -68,7 +68,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsModelList[0].goodsInfo.activityName||scope.row.goodsModelList[0].goodsInfo.goodsName}}
+        {{formatData(scope.row.goodsModelList).goodsName }}
       </template>
       </el-table-column>
       <!-- <el-table-column
@@ -85,7 +85,8 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsModelList[0].goodsInfo.price||scope.row.goodsModelList[0].goodsInfo.realPrice}}
+        {{formatData(scope.row.goodsModelList).price }}
+
       </template>
       </el-table-column>
       <el-table-column
@@ -239,12 +240,34 @@ export default {
       }else if(val == 'WAIT_PAYMENT'){
           return "待付款"
         
-      }else{
-          return "待使用"
+      }else if(val =='AOUTO_REFUNDED'){
+          return '自动退款'
       }
-    }
+      else if(val == 'WAIT_USE'){
+          return '待使用'
+      }
+    },
+   
   },
   methods: {
+    formatData(goodsModelList){
+        if(goodsModelList[0].jobFlowMap == 'XiaoJu'){
+          return {
+            goodsName:goodsModelList[0].goodsInfo.goodsName,
+            price:goodsModelList[0].goodsInfo.storePrice
+          }
+        }else if(goodsModelList[0].jobFlowMap == 'Activity'){
+          return {
+            goodsName:goodsModelList[0].goodsInfo.activityName,
+            price:goodsModelList[0].goodsInfo.price
+          }
+        }else{
+          return {
+            goodsName:goodsModelList[0].goodsInfo.goodsName,
+            price:goodsModelList[0].goodsInfo.realPrice
+          }
+        }
+    },
      handleSearch(){
       this.query.page = 1
       this.getList();

+ 17 - 4
src/views/operationManage/orderManage/list.vue

@@ -88,7 +88,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{goodsTypeObj[scope.row.goodsModelList[0].goodsInfo.goodsType] || '活动报名' }}
+        {{goodsTypeObj[scope.row.goodsModelList[0].goodsInfo.goodsType] || formatType(scope.row) }}
       </template>
       </el-table-column>
     
@@ -135,7 +135,7 @@
        <el-table-column prop="address" align="center" label="操作">
         <template slot-scope="scope">
           <el-button type="text" size="small" @click="handleDetail(scope.row,'detail')">详情</el-button>
-          <el-button type="text" size="small" v-if="scope.row.goodsModelList[0].goodsState == 'APPLY_REFUND'" @click="handleDetail(scope.row,'refund')">介入处理</el-button>
+          <el-button type="text" size="small" v-if="scope.row.goodsModelList[0].goodsState == 'APPLY_REFUND'&&scope.row.goodsModelList[0].jobFlowMap!='XiaoJu'" @click="handleDetail(scope.row,'refund')">介入处理</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -248,12 +248,25 @@ export default {
       }else if(val == 'WAIT_PAYMENT'){
           return "待付款"
         
-      }else{
-          return "待使用"
+      }else if(val =='AOUTO_REFUNDED'){
+          return '自动退款'
+      }
+      else if(val == 'WAIT_USE'){
+          return '待使用'
       }
+     
     }
   },
   methods: {
+    formatType(row){
+      if(row.goodsModelList[0].jobFlowMap == 'XiaoJu'){
+        return '加油充电'
+      }else if(row.goodsModelList[0].jobFlowMap == 'Activity'){
+        return '活动报名'
+      }else{
+        return '-'
+      }
+    },
     handleSearch(){
       this.query.page = 1
       this.getList();

+ 58 - 9
src/views/operationManage/orderManage/orderDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-01 14:21:43
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-12 15:42:49
+ * @LastEditTime: 2024-05-07 16:35:56
  * @FilePath: \admin-manage\src\views\operationManage\orderManage\orderDetail.vue
  * @Description: 
  * 
@@ -33,7 +33,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{scope.row.payment&&scope.row.payment.paymentTime?scope.row.payment.paymentTime : '-'}}
+       {{ formatData(scope.row).paymentTime || '-'}}
       </template>
      
       </el-table-column>
@@ -51,7 +51,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-        {{scope.row.payment.paymentWay | filterPay}}
+        {{ formatData(scope.row).paymentWay |filterPay}}
       </template>
       </el-table-column>
       <el-table-column
@@ -89,7 +89,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-        {{scope.row.payment&&scope.row.payment.createTime? timeFormat(scope.row.payment.createTime):'-' }}
+          {{timeFormat(scope.row.createTime) }}
       </template>
       </el-table-column>
       <el-table-column
@@ -142,7 +142,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsList[0].goodsInfo.activityName||scope.row.goodsList[0].goodsInfo.goodsName}}
+        {{formatData(scope.row).goodsName }}
       </template>
       </el-table-column>
       <el-table-column
@@ -152,7 +152,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{scope.row.goodsList[0].goodsInfo.price||scope.row.goodsList[0].goodsInfo.realPrice}}
+        {{formatData(scope.row).price }}
       </template>
       </el-table-column>
        <el-table-column
@@ -162,7 +162,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{goodsTypeObj[scope.row.goodsList[0].goodsInfo.goodsType] || '报名活动' }}
+        {{goodsTypeObj[scope.row.goodsList[0].goodsInfo.goodsType]  || formatType(scope.row) }}
       </template>
       </el-table-column>
     </el-table>
@@ -185,7 +185,7 @@
             show-overflow-tooltip
         >
         <template slot-scope="scope">
-            {{scope.row.goodsList[0].verifyModel.goodsName }}
+        {{formatData(scope.row).goodsName }}
         </template>
         </el-table-column>
         <el-table-column
@@ -344,6 +344,8 @@ import {auditRefund,transfer,orderDetail,subOrdersConfirm} from '@/api/order'
                     return '待付款'
                 }else if(val == 'WAIT_USE'){
                     return '待使用'
+                }else if(val =='AOUTO_REFUNDED'){
+                    return '自动退款'
                 }
             },
             filterPay(val){
@@ -359,6 +361,53 @@ import {auditRefund,transfer,orderDetail,subOrdersConfirm} from '@/api/order'
             }
         },
         methods: {
+            formatType(row){
+                if(row.goodsList[0].jobFlowMap == 'XiaoJu'){
+                    return '加油充电'
+                }else if(row.goodsList[0].jobFlowMap == 'Activity'){
+                    return '活动报名'
+                }else{
+                    return '-'
+                }
+            },
+             formatData(row){
+                if(row.goodsList[0].jobFlowMap == 'XiaoJu'){
+                    if(JSON.parse(row.goodsList[0].extend).hasOwnProperty('notifyOrderInfo')){
+                        return {
+                            paymentTime:JSON.parse(row.goodsList[0].extend).notifyOrderInfo.payTime,
+                            paymentWay:'-',
+                            price:(row.goodsList[0].goodsInfo.storePrice/100).toFixed(2) +'/L',
+                            goodsName:row.goodsList[0].goodsInfo.goodsName,
+
+                        }
+                    }else{
+                        return {
+                            paymentTime:'-',
+                            paymentWay:'',
+                            price:(row.goodsList[0].goodsInfo.storePrice/100).toFixed(2) +'/L',
+                            goodsName:row.goodsList[0].goodsInfo.goodsName,
+
+                        }
+                    }
+                }else if(row.goodsList[0].jobFlowMap == 'Activity'){
+                    return {
+                        paymentTime:row.payment?row.payment.paymentTime:'',
+                        paymentWay:row.payment?row.payment.paymentWay:'',
+                        price:row.goodsList[0].goodsInfo.price,
+                        goodsName:row.goodsList[0].goodsInfo.activityName,
+
+                    }
+                }else{
+                    return {
+                        paymentTime:row.payment?row.payment.paymentTime:'',
+                        paymentWay:row.payment?row.payment.paymentWay:'',
+                        price:row.goodsList[0].goodsInfo.realPrice,
+                        goodsName:row.goodsList[0].goodsInfo.goodsName,
+
+                    }
+                }
+                
+            },
             timeFormat(val){
                  return timeFormat(val)
             },
@@ -433,7 +482,7 @@ import {auditRefund,transfer,orderDetail,subOrdersConfirm} from '@/api/order'
             this.query.id = this.$route.query.id
             this.mode = this.$route.query.mode
             this.orderDetail(this.$route.query.orderNo)
-            if(this.$route.query.mode != 'detail'){
+            if(this.$route.query.mode == 'refund'){
                 this.transfer(this.$route.query.id)
             }
         },

+ 31 - 8
src/views/operationManage/orderManage/payDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-01 14:21:43
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-03-27 19:35:59
+ * @LastEditTime: 2024-04-29 11:33:30
  * @FilePath: \admin-manage\src\views\operationManage\orderManage\payDetail.vue
  * @Description: 
  * 
@@ -33,7 +33,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-          {{ scope.row.payment.paymentTime || "-" }}
+          {{ formatData(scope.row).paymentTime}}
         </template>
       </el-table-column>
       <el-table-column
@@ -50,7 +50,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-          {{ scope.row.payment.paymentWay | filterPay }}
+          {{ formatData(scope.row).paymentWay |filterPay}}
         </template>
       </el-table-column>
       <el-table-column
@@ -88,11 +88,7 @@
         show-overflow-tooltip
       >
         <template slot-scope="scope">
-          {{
-            scope.row.payment && scope.row.payment.createTime
-              ? timeFormat(scope.row.payment.createTime)
-              : "-"
-          }}
+          {{timeFormat(scope.row.createTime) }}
         </template>
       </el-table-column>
       <el-table-column
@@ -169,6 +165,8 @@ export default {
         return "待付款";
       } else if (val == "WAIT_USE") {
         return "待使用";
+      }else if(val =='AOUTO_REFUNDED'){
+          return '自动退款'
       }
     },
     filterPay(val) {
@@ -184,6 +182,31 @@ export default {
     },
   },
   methods: {
+    formatData(row){
+        if(row.goodsList[0].jobFlowMap == 'XiaoJu'){
+          if(JSON.parse(row.goodsList[0].extend).hasOwnProperty('notifyOrderInfo')){
+            return {
+              paymentTime:JSON.parse(row.goodsList[0].extend).notifyOrderInfo.payTime,
+              paymentWay:'-'
+            }
+          }else{
+            return {
+              paymentTime:'-',
+              paymentWay:''
+            }
+          }
+        }else if(row.goodsList[0].jobFlowMap == 'Activity'){
+          return {
+            paymentTime:row.payment?row.payment.paymentTime:'',
+            paymentWay:row.payment?row.payment.paymentWay:'',
+          }
+        }else{
+          return {
+            paymentTime:row.payment?row.payment.paymentTime:'',
+            paymentWay:row.payment?row.payment.paymentWay:'',
+          }
+        }
+    },
     timeFormat(val) {
       return timeFormat(val);
     },

+ 214 - 101
src/views/operationManage/shopManage/shopAdd.vue

@@ -2,7 +2,7 @@
  * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  * @Date: 2023-05-26 16:37:34
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-16 11:00:27
+ * @LastEditTime: 2024-05-15 15:57:35
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd.vue
  * @Description: 
  * 
@@ -54,9 +54,8 @@
       </el-form-item>
       <el-form-item label="店铺名称:" prop="shopName">
         <el-input
-          v-model.number="setQuery.shopName"
+          v-model="setQuery.shopName"
           size="small"
-          :maxlength="18"
           class="item-width-300"
         ></el-input>
       </el-form-item>
@@ -117,6 +116,7 @@
           @uploadEnd="uploadEnd"
         ></Upload>
       </el-form-item>
+
        <!-- <el-form-item label="店铺状态:">
         <el-radio-group v-model="setQuery.doorImg">
             <el-radio :label="1">关闭</el-radio>
@@ -149,8 +149,8 @@
       <el-form-item label="银联分账帐户:">
         <el-select v-model="setQuery.authAccount" size="small" filterable class="item-width-300" placeholder="请搜索选择店铺主体">
           <el-option
-            v-for="item in authOptions"
-            :key="item.value"
+            v-for="(item,index) in authOptions"
+            :key="index"
             :label="item.label"
             :value="item.value">
           </el-option>
@@ -186,6 +186,12 @@
         <el-radio :label="2">关闭</el-radio>
       </el-radio-group>
       </el-form-item>
+      <el-form-item label="绑定主商户" prop="platformType">
+          <el-checkbox-group v-model="setQuery.platformType">
+            <el-checkbox label="1">慧研学惠生活</el-checkbox>
+            <el-checkbox label="2" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
 
     </el-tab-pane>
     
@@ -195,17 +201,35 @@
    
     </el-form>
 
-    <el-dialog title="选择地址" close="chose-model" :close-on-press-escape="false" :show-close="false" :close-on-click-modal="false" width="60vw" :visible.sync="showMap">
+    <el-dialog title="选择地址" close="chose-model" :close-on-press-escape="false" :close-on-click-modal="false" width="60vw" :visible.sync="showMap">
       <div id="container"></div>
-      <div class="address-input-box">
-        <el-input
-              v-model="setQuery.address"
-              size="small"
-              class="address-input"
-              placeholder="请先点击地图定位,再修改详细地址"
-            ></el-input>
-        <el-button type="primary" size="small" class="address-btn"  @click="saveAddress">提 交</el-button>
-      </div>
+        <el-form
+          :model="setQuery"
+          ref="address"
+          :rules="rules1"
+        >
+        <el-form-item label="" prop="address">
+          <div class="address-input-box">
+            <el-select v-model="setQuery.address" :loading="addressLoading" filterable remote :remote-method="searchAddress" @change="selectAddress" class="address-input" placeholder="请选择输入地址或者点击地图">
+              <el-option
+                v-for="item in addressOptions"
+                :key="item.label+item.value"
+                :label="item.label+'  '+item.value"
+                :value="item.value">
+                <span style="color: #222; font-size: 13px">{{ item.label }}</span>
+                  <span style="margin-left:10px; color: #8492a6; font-size: 13px">{{ item.value }}</span>
+              </el-option>
+            </el-select>
+              <!-- <el-input
+                    v-model="setQuery.address"
+                    size="small"
+                    class="address-input"
+                    placeholder="请先点击地图定位,再修改详细地址"
+                  ></el-input> -->
+              <el-button type="primary" size="small" class="address-btn"  @click="saveAddress">提 交</el-button>
+            </div>
+        </el-form-item>
+        </el-form>
     </el-dialog>
 
 
@@ -233,6 +257,7 @@ import {getMenuData} from '@/api/appConfig';
 import {getRuleList} from '@/api/rule'
 import {getData} from '@/api/goods'
 import {finishComplexList} from '@/api/payment'
+import {getSearchList,uidToAddress} from '@/api/common'
 import { debounce } from "@/utils/index";
 export default {
   components: {
@@ -245,6 +270,8 @@ export default {
       map:null,
       mode:'detail',//编辑模式
       showMap:false,
+      cityName:'',
+      addressLoading:false,
       setQuery: {
         address: "",
         businessImg: "",
@@ -271,11 +298,13 @@ export default {
         authAccount:"",
         searchEnable:1,
         state:2,
+        platformType:[]
       },
       authOptions:[],//银联账号
       typeOptions:[],//商品分类
       ruleOptions:[],
       options:[],
+      addressOptions:[],
       options1:[
          {
           value: 1,
@@ -335,40 +364,48 @@ export default {
         serviceCode: [
           { required: true, message: "请选择经营商品类型", trigger: "change" },
         ],
+        platformType: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
       },
+      rules1:{
+        address: [
+          { required: true, message: "请输入商铺地址或者点击地图", trigger: "blur" },
+        ],
+      }
     };
   },
   watch: {
-    'setQuery.address':debounce(function(val){
-      if(this.map){
-        let that = this
-        //创建地址解析器实例
-        var myGeo = new BMapGL.Geocoder();
-            that.marker? that.map.removeOverlay(that.marker):''
-        // 将地址解析结果显示在地图上,并调整地图视野
-        myGeo.getPoint(val, function(point){
-            if(point ){
-              console.log(point);
-              that.setQuery.mapLat = point.lat
-              that.setQuery.mapLon = point.lng
-               that.marker = new BMapGL.Marker(point, {title: val})
-               if(that.map){
-                 that.map.centerAndZoom(point, 16);
-                 that.map.addOverlay(that.marker)
-                 myGeo.getLocation(new BMapGL.Point(point.lng, point.lat), function(result){      
-                    if (result){      
-                      console.log(result);
-                       // 选择营业地址时保存省市区
-                      that.setQuery.province = result.addressComponents.province;
-                      that.setQuery.city = result.addressComponents.city;
-                      that.setQuery.district = result.addressComponents.district;
-                    }      
-                });
-               }
-            }
-        }, that.setQuery.city)
-      }
-    }),
+    // 'setQuery.address':debounce(function(val){
+    //   if(this.map){
+    //     let that = this
+    //     //创建地址解析器实例
+    //     var myGeo = new BMapGL.Geocoder();
+    //         that.marker? that.map.removeOverlay(that.marker):''
+    //     // 将地址解析结果显示在地图上,并调整地图视野
+    //     myGeo.getPoint(val, function(point){
+    //         if(point ){
+    //           console.log(point);
+    //           that.setQuery.mapLat = point.lat
+    //           that.setQuery.mapLon = point.lng
+    //            that.marker = new BMapGL.Marker(point, {title: val})
+    //            if(that.map){
+    //              that.map.centerAndZoom(point, 16);
+    //              that.map.addOverlay(that.marker)
+    //              myGeo.getLocation(new BMapGL.Point(point.lng, point.lat), function(result){      
+    //                 if (result){      
+    //                   console.log(result);
+    //                    // 选择营业地址时保存省市区
+    //                   that.setQuery.province = result.addressComponents.province;
+    //                   that.setQuery.city = result.addressComponents.city;
+    //                   that.setQuery.district = result.addressComponents.district;
+    //                 }      
+    //             });
+    //            }
+    //         }
+    //     }, that.setQuery.city)
+    //   }
+    // }),
     "setQuery.shopMainId":function(val){
       if(val){
         this.finishComplexList()
@@ -384,6 +421,49 @@ export default {
     }
   },
   methods: {
+    // 选择地址
+    selectAddress(val){
+      let item = this.addressOptions.filter(item=>item.value==val)[0]
+      console.log(val,item);
+      this.setQuery.mapLat = item.location.lat
+      this.setQuery.mapLon = item.location.lng
+      this.map.removeOverlay(this.marker); //移除点标记
+      this.marker = new BMapGL.Marker(item.location, {title: val})
+      this.map.addOverlay(this.marker)
+      this.setQuery.province = item.province;
+      this.setQuery.city = item.city;
+      this.setQuery.district = item.district;
+       this.map.centerAndZoom(item.location, 19);
+
+     
+    },
+    // 查询地址
+    searchAddress(val){
+      if(val){
+        this.addressLoading = true
+        getSearchList({query:val,region:this.cityName,output:'json',ak:'7aGqlyBw6mGwS6vNMLbmMlsHqE2OGV0E',ret_coordtype:'gcj02'}).then(res=>{
+          this.addressLoading = false
+          if(res.status == 0){
+            this.addressOptions = []
+            res.result.map(item=>{
+              this.addressOptions.push({
+                label:item.name,
+                value:item.address,
+                location:item.location,
+                province:item.province,
+                city:item.city,
+                district:item.district,
+              })
+            })
+          }
+        })
+      }else{
+            this.addressOptions = []
+
+      }
+      // ?query=天安门&region=北京&city_limit=true&output=json&ak=7aGqlyBw6mGwS6vNMLbmMlsHqE2OGV0E
+      // }
+    },
     edit(){
           this.$router.push({
             path: "/operationManage/shopManage/shopAdd",
@@ -397,30 +477,32 @@ export default {
       this.$refs.setQuery.validate((v) => {
         if (v) {
           if(this.loading) return
+          let obj = JSON.parse(JSON.stringify(this.setQuery))
+          obj.serviceCode = obj.serviceCode.toString()
+          let str = ''
+          obj.serviceCate.map((item,index)=>{
+            if(index != (obj.serviceCate.length -1 )){
+              str += item.toString()+'/'
+            }else{
+              str += item.toString()
+            }
+          })
+          obj.serviceCate = str
+          obj.shopMenuId = obj.shopMenuId.toString()
+          obj.platformType = obj.platformType.toString()
           if (this.setQuery.shopId) {
-            this.update();
+            this.update(obj);
           } else {
-            this.add();
+            this.add(obj);
           }
         }else{
           this.$message.error('请检查是否有必填项未填');
         }
       });
     },
-    add() {
+    add(obj) {
       this.loading = true;
-      let obj = JSON.parse(JSON.stringify(this.setQuery))
-      obj.serviceCode = obj.serviceCode.toString()
-      let str = ''
-      obj.serviceCate.map((item,index)=>{
-        if(index != (obj.serviceCate.length -1 )){
-          str += item.toString()+'/'
-        }else{
-           str += item.toString()
-        }
-      })
-      obj.serviceCate = str
-      obj.shopMenuId = obj.shopMenuId.toString()
+      
       add(obj).then((res) => {
         this.loading = false;
         if (res.state == "Success") {
@@ -434,20 +516,21 @@ export default {
         }
       });
     },
-    update() {
+    update(obj) {
       this.loading = true;
-      let obj = JSON.parse(JSON.stringify(this.setQuery))
-      obj.serviceCode = obj.serviceCode.toString()
-      let str = ''
-      obj.serviceCate.map((item,index)=>{
-        if(index != (obj.serviceCate.length -1 )){
-          str += item.toString()+'/'
-        }else{
-           str += item.toString()
-        }
-      })
-      obj.serviceCate = str
-      obj.shopMenuId = obj.shopMenuId.toString()
+      // let obj = JSON.parse(JSON.stringify(this.setQuery))
+      // obj.serviceCode = obj.serviceCode.toString()
+      // let str = ''
+      // obj.serviceCate.map((item,index)=>{
+      //   if(index != (obj.serviceCate.length -1 )){
+      //     str += item.toString()+'/'
+      //   }else{
+      //      str += item.toString()
+      //   }
+      // })
+      // obj.serviceCate = str
+      // obj.shopMenuId = obj.shopMenuId.toString()
+      // obj.platformType = obj.platformType.toString()
 
       update(obj).then((res) => {
         this.loading = false;
@@ -475,6 +558,7 @@ export default {
           this.setQuery.serviceCode = this.setQuery.serviceCode.split(',')
           this.setQuery.serviceCate = this.setQuery.serviceCate.split('/').map(item=>{return item = item.split(',').map(item=> Number(item))})
           this.setQuery.shopMenuId = this.setQuery.shopMenuId.split(',').map(item=> Number(item))
+          this.setQuery.platformType = this.setQuery.platformType.split(',')
         }
       });
     },
@@ -508,12 +592,13 @@ export default {
       let that = this
       
       this.$nextTick(() => {
-        this.map = new BMapGL.Map("container");
+        this.map = new BMapGL.Map("container",{enableIconClick: true});
         var geoc = new BMapGL.Geocoder();
-        that.map.enableScrollWheelZoom(); // 启用滚轮放大缩小
+        this.map.enableScrollWheelZoom(true)
         var myCity = new BMapGL.LocalCity();
         myCity.get((result)=> {
           console.log(result);
+          that.cityName =  result.name
           var cityName = result.name;
           that.map.setCenter(cityName);
           var point = new BMapGL.Point(result.center.lat, result.center.lng);
@@ -527,23 +612,43 @@ export default {
         });
        
         that.map.addEventListener("click", function (e) {
-          console.log(1111111,e.latlng);
-          var pt = e.latlng;
-          that.map.removeOverlay(that.marker); //移除点标记
-          geoc.getLocation(pt, function (rs) {
-            var addComp = rs.addressComponents;
-            let point1 = new BMapGL.Point(rs.point.lng, rs.point.lat);
-            that.marker = new BMapGL.Marker(point1); // 创建标注
-            that.map.addOverlay(that.marker); // 将标注添加到地图中
-            that.setQuery.address = rs.address +rs.content.poi_desc
-            // 选择营业地址时保存省市区
-            that.setQuery.province = addComp.province
-            that.setQuery.city = addComp.city
-            that.setQuery.district = addComp.district
-            that.setQuery.mapLat = rs.point.lat
-            that.setQuery.mapLon = rs.point.lng
-            console.log(rs);
-          });
+          let itemId = that.map.getIconByClickPosition(e)
+          console.log(1111111,itemId);
+
+          if (itemId) {
+            uidToAddress({uid:itemId.uid,scope:2,output:'json',ak:'7aGqlyBw6mGwS6vNMLbmMlsHqE2OGV0E',ret_coordtype:'gcj02'}).then(res=>{
+              if(res.status == 0){
+                 that.setQuery.mapLat = res.result.location.lat
+                that.setQuery.mapLon = res.result.location.lng
+                that.map.removeOverlay(that.marker); //移除点标记
+                that.marker = new BMapGL.Marker(res.result.location, {title: res.result.name})
+                that.map.addOverlay(that.marker)
+                that.setQuery.address = res.result.address;
+                that.setQuery.province = res.result.province;
+                that.setQuery.city = res.result.city;
+                that.setQuery.district = res.result.area;
+                that.map.centerAndZoom(res.result.location, 19);
+              }
+            })
+            // let url = "//api.map.baidu.com/?qt=inf&uid="+itemId.uid+'&operate=mapclick&clicktype=tile&ie=utf-8&oue=1&fromproduct=jsapi&res=api&&ak=7aGqlyBw6mGwS6vNMLbmMlsHqE2OGV0E&callback=sucess'
+            
+          }
+          // var pt = e.latlng;
+          // that.map.removeOverlay(that.marker); //移除点标记
+          // geoc.getLocation(pt, function (rs) {
+          //   var addComp = rs.addressComponents;
+          //   let point1 = new BMapGL.Point(rs.point.lng, rs.point.lat);
+          //   that.marker = new BMapGL.Marker(point1); // 创建标注
+          //   that.map.addOverlay(that.marker); // 将标注添加到地图中
+          //   that.setQuery.address = rs.address +rs.content.poi_desc
+          //   // 选择营业地址时保存省市区
+          //   that.setQuery.province = addComp.province
+          //   that.setQuery.city = addComp.city
+          //   that.setQuery.district = addComp.district
+          //   that.setQuery.mapLat = rs.point.lat
+          //   that.setQuery.mapLon = rs.point.lng
+          //   console.log(rs);
+          // });
         });
         
 
@@ -551,13 +656,17 @@ export default {
     },
     // 保存地址
     saveAddress(){
-        this.$confirm('请确认地址信息准确无误,并精确到门牌号?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          this.showMap = false
-        })
+      this.$refs.address.validate((v) => {
+        if (v) {
+          this.$confirm('请确认地址信息准确无误,并精确到门牌号?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.showMap = false
+          })
+        }
+      })
     },
     // 规则
     getRuleList() {
@@ -613,8 +722,6 @@ export default {
     }
   },
   created() {
-   
-
     // this.finishComplexList()
     this.getData()
     this.getRuleList()
@@ -652,5 +759,11 @@ export default {
     width: 100%;
     height: 600px;
   }
+  .address-input-box {
+  display: flex;
+  .address-input {
+    flex: 1;
+  }
+}
 }
 </style>

+ 26 - 10
src/views/operationManage/shopManage/shopAdd1.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-09-18 10:57:47
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-15 19:41:31
+ * @LastEditTime: 2024-05-16 09:37:58
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd1.vue
  * @Description: 
  * 
@@ -57,7 +57,7 @@
             @click="chooseAddress"
           ></i>
         </el-form-item>
-        <el-form-item label="商户类型:" prop="mchntType">
+        <!-- <el-form-item label="商户类型:" prop="mchntType">
           <el-select
             v-model="setQuery.mchntType"
             class="item-width-300"
@@ -71,7 +71,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="所属行业:" prop="mccCode">
           <el-select
             v-model="setQuery.mccCode"
@@ -94,6 +94,13 @@
           <el-radio label="1">否</el-radio>
         </el-radio-group>
         </el-form-item>
+
+        <el-form-item label="绑定主商户" prop="remark">
+          <el-checkbox-group v-model="setQuery.remark">
+            <el-checkbox label="89852017372911Y中数">慧研学惠生活</el-checkbox>
+            <el-checkbox label="89852017372912Y贵大" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
         <!-- <el-form-item label="业务选择:" prop="shopName">
           <div class="tabs">
             <div
@@ -139,7 +146,7 @@
             placeholder="请输入身份证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="legal_card_deadline">
+        <el-form-item label="身份证有效期:" prop="legal_card_start">
           <el-date-picker
             v-model="date"
             :disabled="checked"
@@ -557,7 +564,7 @@ export default {
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
         mccCode: "",
-        mchntType: "",
+        mchntType: "1",
         pic_list: [
           {
             epId: "",
@@ -567,7 +574,7 @@ export default {
         ],
         product: "",
         reg_mer_type: "01",
-        remark: "",
+        remark: [],
         serviceDistrict: "",
         shareholderCertExpire: "",
         shareholderCertType: "",
@@ -609,13 +616,16 @@ export default {
         mccCode: [
           { required: true, message: "请选择所属行业", trigger: "change" },
         ],
+        remark: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
         legal_name: [
           { required: true, message: "请输入身份证姓名", trigger: "blur" },
         ],
         legal_idcard_no: [
           { required: true, message: "请输入身份证号码", trigger: "blur" },
         ],
-        legal_card_deadline: [
+        legal_card_start: [
           { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         legal_occupation: [
@@ -798,8 +808,8 @@ export default {
     checked(val) {
       if (val) {
         this.setQuery.legal_card_deadline = "9999-12-31";
-        this.setQuery.legal_card_start = "9999-12-31";
-        this.date = ["9999-12-31", "9999-12-31"];
+        this.date = [this.setQuery.legal_card_start, "9999-12-31"];
+
       } else {
         this.date = [];
       }
@@ -1043,6 +1053,12 @@ export default {
                 });
               }
               this.setQuery = res.content;
+              if(this.setQuery.remark){
+                this.setQuery.remark = this.setQuery.remark.split(',')
+              }else{
+                this.setQuery.remark = []
+              }
+              
               if (this.setQuery.legal_card_deadline == "9999-12-31") {
                 this.checked = true;
               } else if (this.setQuery.legal_card_deadline) {
@@ -1185,7 +1201,7 @@ export default {
         legal_mobile: this.setQuery.legal_mobile,
         bank_no: this.setQuery.bank_no,
         epId: this.$route.query.id,
-        remark: "",
+        remark: this.setQuery.remark.join(),
         bank_province_id: this.setQuery.bank_province_id,
         bank_city_id: this.setQuery.bank_city_id,
       };

+ 159 - 42
src/views/operationManage/shopManage/shopAdd2.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-09-18 10:57:47
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-12 15:22:29
+ * @LastEditTime: 2024-05-16 09:38:09
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd2.vue
  * @Description: 
  * 
@@ -55,7 +55,7 @@
           ></el-input>
           <i class="el-icon-location position red ml10" @click="chooseAddress"></i>
         </el-form-item>
-        <el-form-item label="商户类型:" prop="mchntType">
+        <!-- <el-form-item label="商户类型:" prop="mchntType">
           <el-select
             v-model="setQuery.mchntType"
             class="item-width-300"
@@ -69,7 +69,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="所属行业:" prop="mccCode">
           <el-select
             v-model="setQuery.mccCode"
@@ -114,6 +114,12 @@
             (图片支持jpg, png, bmp格式,建议上传100kb~500kb大小文件)
           </div>
         </el-form-item>
+         <el-form-item label="绑定主商户" prop="remark">
+          <el-checkbox-group v-model="setQuery.remark">
+            <el-checkbox label="89852017372911Y中数">慧研学惠生活</el-checkbox>
+            <el-checkbox label="89852017372912Y贵大" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
       </template>
 
       <template v-if="step == 2">
@@ -134,7 +140,7 @@
             placeholder="请输入身份证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="legal_card_deadline">
+        <el-form-item label="身份证有效期:" prop="legal_card_start">
           <el-date-picker
             v-model="date"
             :disabled="checked"
@@ -146,7 +152,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked">长期</el-checkbox>
+          <el-checkbox v-model="checked" :disabled="!setQuery.legal_card_start">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="职业:" prop="legal_occupation">
           <el-select
@@ -341,17 +347,32 @@
             >同步法人信息</el-button
           >
         </el-form-item>
-
-        <el-form-item label="身份证号码:" prop="shareholderCertno">
+         <el-form-item label="证件类型:" prop="shareholderCertType">
+          <el-select
+            v-model="setQuery.shareholderCertType"
+            size="small"
+            class="item-width-300"
+            placeholder="请选择证件类型"
+          >
+            <el-option
+              v-for="item in cardOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="证件号码:" prop="shareholderCertno">
           <el-input
             v-model="setQuery.shareholderCertno"
             size="small"
             :maxlength="18"
             class="item-width-300"
-            placeholder="请输入身份证号码"
+            placeholder="请输入证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="shareholderCertExpire">
+        <el-form-item label="身份证有效期:" prop="shareholderCertBeginDate">
           <el-date-picker
             v-model="date1"
             :disabled="checked1"
@@ -363,7 +384,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked1">长期</el-checkbox>
+          <el-checkbox :disabled="!setQuery.shareholderCertBeginDate" v-model="checked1">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="家庭地址:" prop="shareholderHomeAddr">
           <el-input
@@ -389,16 +410,32 @@
               >同步股东信息</el-button
             >
           </el-form-item>
-          <el-form-item label="身份证号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
+          <el-form-item label="证件类型:" :prop="'bnfList.'+index+'.bnfCertType'" :rules="{ required: true, message: '请选择证件类型', trigger: 'change' }">
+            <el-select
+              v-model="item.bnfCertType"
+              size="small"
+              class="item-width-300"
+              placeholder="请选择证件类型"
+            >
+              <el-option
+                v-for="item in cardOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="证件号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
             <el-input
               v-model="item.bnfCertno"
               size="small"
               :maxlength="18"
               class="item-width-300"
-              placeholder="请输入受益人身份证号码"
+              placeholder="请输入受益人证号码"
             ></el-input>
           </el-form-item>
-          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertBeginDate'" :rules="{ required: true, message: '请选择身份证有效期', trigger: 'change' }">
             <el-date-picker
               v-model="perSonObj['date'+(index+1)]"
               :disabled="perSonObj['checked'+(index+1)]"
@@ -411,7 +448,7 @@
               end-placeholder="结束日期"
             >
             </el-date-picker>
-            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)" :disabled="!setQuery.bnfList[index].bnfCertBeginDate">  长期</el-checkbox>
           </el-form-item>
           <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
             <el-input
@@ -420,10 +457,11 @@
               class="item-width-300"
               placeholder="请输入受益人家庭地址"
             ></el-input>
+           <el-button size="small" class="ml10" type="danger" v-if="setQuery.bnfList.length>1" @click="delPerson(index)">删除受益人</el-button> 
           </el-form-item>
         </div>
         <el-form-item>
-           <el-button @click="addPerson">添加受益人</el-button>
+           <el-button size="small" @click="addPerson">添加受益人</el-button> 
         </el-form-item>
       </template>
 
@@ -668,6 +706,7 @@ export default {
         fax: "",
         lastClientManager: "",
         lastTerminalManager: "",
+        legal_card_start: "",
         legal_card_deadline: "",
         legal_email: "",
         legal_idcard_no: "",
@@ -678,7 +717,7 @@ export default {
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
         mccCode: "",
-        mchntType: "",
+        mchntType: "1",
         pic_list: [
           {
             epId: "",
@@ -688,7 +727,7 @@ export default {
         ],
         product: "",
         reg_mer_type: "01",
-        remark: "",
+        remark: [],
         serviceDistrict: "",
         shareholderCertBeginDate:'',
         shareholderCertExpire: "",
@@ -736,13 +775,16 @@ export default {
         mccCode: [
           { required: true, message: "请选择所属行业", trigger: "change" },
         ],
+        remark: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
         legal_name: [
           { required: true, message: "请输入身份证姓名", trigger: "blur" },
         ],
         legal_idcard_no: [
           { required: true, message: "请输入身份证号码", trigger: "blur" },
         ],
-        legal_card_deadline: [
+        legal_card_start: [
           { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         legal_occupation: [
@@ -813,14 +855,82 @@ export default {
         shareholderCertno: [
           { required: true, message: "请输入身份证号", trigger: "blur" },
         ],
+        shareholderCertType: [
+          { required: true, message: "请选择证件类型", trigger: "change" },
+        ],
         shareholderName: [
           { required: true, message: "请输入股东姓名", trigger: "blur" },
+        ],
+         shareholderCertBeginDate: [
+          { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         isChain: [
           { required: true, message: "请选择是否连锁", trigger: "change" },
         ],
         
       },
+      cardOptions:[
+        {
+          value: "1",
+          label: "身份证",
+        },
+        {
+          value: "2",
+          label: "护照",
+        },
+        {
+          value: "3",
+          label: "军官证",
+        },
+        {
+          value: "4",
+          label: "警官证",
+        },
+        {
+          value: "5",
+          label: "士兵证",
+        },
+        {
+          value: "6",
+          label: "台湾居民来往大陆通行证",
+        },
+        {
+          value: "7",
+          label: "回乡证",
+        },
+        {
+          value: "8",
+          label: "港澳居民来往内地通行证",
+        },
+        {
+          value: "10",
+          label: "港澳台居民居住证",
+        },
+        {
+          value: "11",
+          label: "营业执照",
+        },
+        {
+          value: "12",
+          label: "组织机构代码证",
+        },
+        {
+          value: "13",
+          label: "税务登记证",
+        },
+        {
+          value: "14",
+          label: "商业登记证",
+        },
+        {
+          value: "15",
+          label: "民办非企业登记证书",
+        },
+        {
+          value: "16",
+          label: "批文证明",
+        },
+      ],
       typeOptions: [
         {
           value: "0",
@@ -942,8 +1052,10 @@ export default {
     checked(val) {
       if (val) {
         this.setQuery.legal_card_deadline = "9999-12-31";
-        this.setQuery.legal_card_start = "9999-12-31";
-        this.date = ["9999-12-31", "9999-12-31"];
+        // this.setQuery.legal_card_start = "9999-12-31";
+        // this.date = ["9999-12-31", "9999-12-31"];
+          this.date = [this.setQuery.legal_card_start, "9999-12-31"];
+
       } else {
         this.date = [];
       }
@@ -969,9 +1081,9 @@ export default {
     },
     checked1(val) {
       if (val) {
-        this.setQuery.shareholderCertBeginDate = "9999-12-31";
+        // this.setQuery.shareholderCertBeginDate = "9999-12-31";
         this.setQuery.shareholderCertExpire = "9999-12-31";
-          this.date1 = ["9999-12-31", "9999-12-31"];
+          this.date1 = [this.setQuery.shareholderCertBeginDate, "9999-12-31"];
         
       } else {
            this.date1 = [];
@@ -1056,15 +1168,15 @@ export default {
     },
     // 受益人身份证是否长期
     checkChange(val,index){
-      console.log(val,index);
+      console.log(111111111111,val,index);
       if (val) {
-        this.setQuery.bnfList[index].bnfCertBeginDate = "9999-12-31"
-        this.setQuery.bnfList[index].bnfCertExpire = "9999-12-31"
-          this.perSonObj['date'+(index+1)]= ["9999-12-31", "9999-12-31"];
+        this.$set(this.perSonObj,['date'+(index+1)],[this.setQuery.bnfList[index].bnfCertBeginDate, "9999-12-31"])
+        this.$set(this.setQuery.bnfList[index],'bnfCertExpire',"9999-12-31")
 
       } else {
            this.perSonObj['date'+(index+1)]= [];
-        
+            this.setQuery.bnfList[index].bnfCertBeginDate = ''
+            this.setQuery.bnfList[index].bnfCertExpire = ''
       }
     },
     // 添加受益人
@@ -1079,34 +1191,36 @@ export default {
             bnfHomeAddr: "",
           }
       )
-      this.$nextTick(()=>{
-        // this['date'+(2+this.setQuery.bnfList.length -1)] = []
-        // this['checked'+(2+this.setQuery.bnfList.length -1)] = false
-        // this.perSonObj['date'+(1+this.setQuery.bnfList.length -1)] = []
-        // this.perSonObj['checked'+(1+this.setQuery.bnfList.length -1)] = false
-      })
+     
 
+    },
+    delPerson(index){
+      this.setQuery.bnfList.splice(index,1)
     },
     // 同步信息
     handleCopy(type) {
       if (type == 1) {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
           this.checked1 = true;
+
         } else {
           // this.setQuery.shareholderCertExpire =this.setQuery.legal_card_deadline;
         }
           this.date1 = this.date
+          this.setQuery.shareholderCertType = '1'
         this.setQuery.shareholderCertno = this.setQuery.legal_idcard_no;
         // this.setQuery.shareholderHomeAddr = this.setQuery.legalmanHomeAddr;
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
-        if (this.setQuery.legal_card_deadline == "9999-12-31") {
+        if (this.setQuery.shareholderCertExpire == "9999-12-31") {
           this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
           this.perSonObj.date1 = this.date1
+        this.setQuery.bnfList[0].bnfCertType =this.setQuery.shareholderCertType;
+        this.setQuery.bnfList[0].bnfCertBeginDate =this.setQuery.shareholderCertBeginDate;
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1287,6 +1401,11 @@ export default {
               }
               //有数据时 回填数据
               this.setQuery = res.content;
+              if(this.setQuery.remark){
+                this.setQuery.remark = this.setQuery.remark.split(',')
+              }else{
+                this.setQuery.remark = []
+              }
               if (this.setQuery.legal_card_deadline == "9999-12-31") {
                 this.checked = true;
               } else if (this.setQuery.legal_card_deadline) {
@@ -1320,16 +1439,14 @@ export default {
                 this.setQuery.bnfList.map((item,index)=>{
                   if (item.bnfCertExpire == "9999-12-31") {
                    this.perSonObj['checked'+(index+1)] = true;
-                    this.perSonObj['date'+(index+1)] = [
-                     "9999-12-31",
-                     "9999-12-31"
-                   ];
+                 
                  } else if (item.bnfCertExpire) {
-                   this.perSonObj['date'+(index+1)] = [
+                   this.perSonObj['checked'+(index+1)] = false;
+                 }
+                 this.$set( this.perSonObj,'date'+(index+1),[
                      item.bnfCertBeginDate,
                      item.bnfCertExpire
-                   ];
-                 }
+                   ])
                 })
               }
 
@@ -1499,7 +1616,7 @@ export default {
         legal_mobile: this.setQuery.legal_mobile,
         bank_no: this.setQuery.bank_no,
         epId: this.$route.query.id,
-        remark: "",
+        remark: this.setQuery.remark.join(),
         bank_province_id: this.setQuery.bank_province_id,
         bank_city_id: this.setQuery.bank_city_id,
       };

+ 160 - 38
src/views/operationManage/shopManage/shopAdd3.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-09-18 10:57:47
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-15 17:29:09
+ * @LastEditTime: 2024-05-16 09:38:24
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd3.vue
  * @Description: 
  * 
@@ -55,7 +55,7 @@
           ></el-input>
           <i class="el-icon-location position red ml10" @click="chooseAddress"></i>
         </el-form-item>
-        <el-form-item label="商户类型:" prop="mchntType">
+        <!-- <el-form-item label="商户类型:" prop="mchntType">
           <el-select
             v-model="setQuery.mchntType"
             class="item-width-300"
@@ -69,7 +69,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="所属行业:" prop="mccCode">
           <el-select
             v-model="setQuery.mccCode"
@@ -114,6 +114,12 @@
             (图片支持jpg, png, bmp格式,建议上传100kb~500kb大小文件)
           </div>
         </el-form-item>
+         <el-form-item label="绑定主商户" prop="remark">
+          <el-checkbox-group v-model="setQuery.remark">
+            <el-checkbox label="89852017372911Y中数">慧研学惠生活</el-checkbox>
+            <el-checkbox label="89852017372912Y贵大" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
       </template>
 
       <template v-if="step == 2">
@@ -134,7 +140,7 @@
             placeholder="请输入身份证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="legal_card_deadline">
+        <el-form-item label="身份证有效期:" prop="legal_card_start">
           <el-date-picker
             v-model="date"
             :disabled="checked"
@@ -146,7 +152,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked">长期</el-checkbox>
+          <el-checkbox :disabled="!setQuery.legal_card_start" v-model="checked">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="职业:" prop="legal_occupation">
           <el-select
@@ -319,16 +325,32 @@
           >
         </el-form-item>
 
-        <el-form-item label="身份证号码:" prop="shareholderCertno">
+        <el-form-item label="证件类型:" prop="shareholderCertType">
+          <el-select
+            v-model="setQuery.shareholderCertType"
+            size="small"
+            class="item-width-300"
+            placeholder="请选择证件类型"
+          >
+            <el-option
+              v-for="item in cardOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="证件号码:" prop="shareholderCertno">
           <el-input
             v-model="setQuery.shareholderCertno"
             size="small"
             :maxlength="18"
             class="item-width-300"
-            placeholder="请输入身份证号码"
+            placeholder="请输入证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="shareholderCertExpire">
+        <el-form-item label="身份证有效期:" prop="shareholderCertBeginDate">
           <el-date-picker
             v-model="date1"
             :disabled="checked1"
@@ -340,7 +362,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked1">长期</el-checkbox>
+          <el-checkbox :disabled="!setQuery.shareholderCertBeginDate" v-model="checked1">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="家庭地址:" prop="shareholderHomeAddr">
           <el-input
@@ -366,16 +388,32 @@
               >同步股东信息</el-button
             >
           </el-form-item>
-          <el-form-item label="身份证号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
+          <el-form-item label="证件类型:" :prop="'bnfList.'+index+'.bnfCertType'" :rules="{ required: true, message: '请选择证件类型', trigger: 'change' }">
+            <el-select
+              v-model="item.bnfCertType"
+              size="small"
+              class="item-width-300"
+              placeholder="请选择证件类型"
+            >
+              <el-option
+                v-for="item in cardOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="证件号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
             <el-input
               v-model="item.bnfCertno"
               size="small"
               :maxlength="18"
               class="item-width-300"
-              placeholder="请输入受益人身份证号码"
+              placeholder="请输入受益人证号码"
             ></el-input>
           </el-form-item>
-          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertBeginDate'" :rules="{ required: true, message: '请选择身份证有效期', trigger: 'change' }">
             <el-date-picker
               v-model="perSonObj['date'+(index+1)]"
               :disabled="perSonObj['checked'+(index+1)]"
@@ -388,7 +426,7 @@
               end-placeholder="结束日期"
             >
             </el-date-picker>
-            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)" :disabled="!setQuery.bnfList[index].bnfCertBeginDate">  长期</el-checkbox>
           </el-form-item>
           <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
             <el-input
@@ -397,10 +435,12 @@
               class="item-width-300"
               placeholder="请输入受益人家庭地址"
             ></el-input>
+           <el-button size="small" class="ml10" type="danger" v-if="setQuery.bnfList.length>1" @click="delPerson(index)">删除受益人</el-button> 
+
           </el-form-item>
         </div>
         <el-form-item>
-           <el-button @click="addPerson">添加受益人</el-button>
+           <el-button size="small" @click="addPerson">添加受益人</el-button>
         </el-form-item>
       </template>
 
@@ -645,6 +685,7 @@ export default {
         fax: "",
         lastClientManager: "",
         lastTerminalManager: "",
+        legal_card_start: "",
         legal_card_deadline: "",
         legal_email: "",
         legal_idcard_no: "",
@@ -655,7 +696,7 @@ export default {
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
         mccCode: "",
-        mchntType: "",
+        mchntType: "1",
         pic_list: [
           {
             epId: "",
@@ -665,7 +706,7 @@ export default {
         ],
         product: "",
         reg_mer_type: "01",
-        remark: "",
+        remark: [],
         serviceDistrict: "",
         shareholderCertBeginDate:'',
         shareholderCertExpire: "",
@@ -713,13 +754,16 @@ export default {
         mccCode: [
           { required: true, message: "请选择所属行业", trigger: "change" },
         ],
+        remark: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
         legal_name: [
           { required: true, message: "请输入身份证姓名", trigger: "blur" },
         ],
         legal_idcard_no: [
           { required: true, message: "请输入身份证号码", trigger: "blur" },
         ],
-        legal_card_deadline: [
+        legal_card_start: [
           { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         legal_occupation: [
@@ -790,11 +834,14 @@ export default {
         shareholderCertno: [
           { required: true, message: "请输入身份证号", trigger: "blur" },
         ],
+        shareholderCertType: [
+          { required: true, message: "请选择证件类型", trigger: "change" },
+        ],
         shareholderName: [
           { required: true, message: "请输入股东姓名", trigger: "blur" },
         ],
-         shareholderCertExpire: [
-          { required: true, message: "请选择身份证有效期", trigger: "change" },
+         shareholderCertBeginDate: [
+          { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         isChain: [
           { required: true, message: "请选择是否连锁", trigger: "change" },
@@ -815,6 +862,68 @@ export default {
         //   { required: true, message: "请上传租聘协议", trigger: "change" },
         // ],
       },
+      cardOptions:[
+        {
+          value: "1",
+          label: "身份证",
+        },
+        {
+          value: "2",
+          label: "护照",
+        },
+        {
+          value: "3",
+          label: "军官证",
+        },
+        {
+          value: "4",
+          label: "警官证",
+        },
+        {
+          value: "5",
+          label: "士兵证",
+        },
+        {
+          value: "6",
+          label: "台湾居民来往大陆通行证",
+        },
+        {
+          value: "7",
+          label: "回乡证",
+        },
+        {
+          value: "8",
+          label: "港澳居民来往内地通行证",
+        },
+        {
+          value: "10",
+          label: "港澳台居民居住证",
+        },
+        {
+          value: "11",
+          label: "营业执照",
+        },
+        {
+          value: "12",
+          label: "组织机构代码证",
+        },
+        {
+          value: "13",
+          label: "税务登记证",
+        },
+        {
+          value: "14",
+          label: "商业登记证",
+        },
+        {
+          value: "15",
+          label: "民办非企业登记证书",
+        },
+        {
+          value: "16",
+          label: "批文证明",
+        },
+      ],
       typeOptions: [
         {
           value: "0",
@@ -936,8 +1045,10 @@ export default {
     checked(val) {
       if (val) {
         this.setQuery.legal_card_deadline = "9999-12-31";
-        this.setQuery.legal_card_start = "9999-12-31";
-        this.date = ["9999-12-31", "9999-12-31"];
+        // this.setQuery.legal_card_start = "9999-12-31";
+        // this.date = ["9999-12-31", "9999-12-31"];
+          this.date = [this.setQuery.legal_card_start, "9999-12-31"];
+      
       } else {
         this.date = [];
       }
@@ -963,9 +1074,9 @@ export default {
     },
     checked1(val) {
       if (val) {
-        this.setQuery.shareholderCertBeginDate = "9999-12-31";
+        // this.setQuery.shareholderCertBeginDate = "9999-12-31";
         this.setQuery.shareholderCertExpire = "9999-12-31";
-          this.date1 = ["9999-12-31", "9999-12-31"];
+          this.date1 = [this.setQuery.shareholderCertBeginDate, "9999-12-31"];
         
       } else {
            this.date1 = [];
@@ -1071,15 +1182,15 @@ export default {
     },
     // 受益人身份证是否长期
     checkChange(val,index){
-      console.log(val,index);
+      console.log(111111111111,val,index);
       if (val) {
-        this.setQuery.bnfList[index].bnfCertBeginDate = "9999-12-31"
-        this.setQuery.bnfList[index].bnfCertExpire = "9999-12-31"
-          this.perSonObj['date'+(index+1)]= ["9999-12-31", "9999-12-31"];
+        this.$set(this.perSonObj,['date'+(index+1)],[this.setQuery.bnfList[index].bnfCertBeginDate, "9999-12-31"])
+        this.$set(this.setQuery.bnfList[index],'bnfCertExpire',"9999-12-31")
 
       } else {
            this.perSonObj['date'+(index+1)]= [];
-        
+            this.setQuery.bnfList[index].bnfCertBeginDate = ''
+            this.setQuery.bnfList[index].bnfCertExpire = ''
       }
     },
     // 添加受益人
@@ -1102,26 +1213,33 @@ export default {
       })
 
     },
-    // 同步信息
+    delPerson(index){
+      this.setQuery.bnfList.splice(index,1)
+    },
+    /// 同步信息
     handleCopy(type) {
       if (type == 1) {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
           this.checked1 = true;
+
         } else {
           // this.setQuery.shareholderCertExpire =this.setQuery.legal_card_deadline;
         }
           this.date1 = this.date
+          this.setQuery.shareholderCertType = '1'
         this.setQuery.shareholderCertno = this.setQuery.legal_idcard_no;
         // this.setQuery.shareholderHomeAddr = this.setQuery.legalmanHomeAddr;
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
-        if (this.setQuery.legal_card_deadline == "9999-12-31") {
+        if (this.setQuery.shareholderCertExpire == "9999-12-31") {
           this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
           this.perSonObj.date1 = this.date1
+        this.setQuery.bnfList[0].bnfCertType =this.setQuery.shareholderCertType;
+        this.setQuery.bnfList[0].bnfCertBeginDate =this.setQuery.shareholderCertBeginDate;
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1301,6 +1419,11 @@ export default {
               }
               //有数据时 回填数据
               this.setQuery = res.content;
+              if(this.setQuery.remark){
+                this.setQuery.remark = this.setQuery.remark.split(',')
+              }else{
+                this.setQuery.remark = []
+              }
               if (this.setQuery.legal_card_deadline == "9999-12-31") {
                 this.checked = true;
               } else if (this.setQuery.legal_card_deadline) {
@@ -1334,16 +1457,14 @@ export default {
                 this.setQuery.bnfList.map((item,index)=>{
                   if (item.bnfCertExpire == "9999-12-31") {
                    this.perSonObj['checked'+(index+1)] = true;
-                    this.perSonObj['date'+(index+1)] = [
-                     "9999-12-31",
-                     "9999-12-31"
-                   ];
+                 
                  } else if (item.bnfCertExpire) {
-                   this.perSonObj['date'+(index+1)] = [
+                   this.perSonObj['checked'+(index+1)] = false;
+                 }
+                 this.$set( this.perSonObj,'date'+(index+1),[
                      item.bnfCertBeginDate,
                      item.bnfCertExpire
-                   ];
-                 }
+                   ])
                 })
               }
 
@@ -1509,7 +1630,7 @@ export default {
         legal_mobile: this.setQuery.legal_mobile,
         bank_no: this.setQuery.bank_no,
         epId: this.$route.query.id,
-        remark: "",
+        remark: this.setQuery.remark.join(),
         bank_province_id: this.setQuery.bank_province_id,
         bank_city_id: this.setQuery.bank_city_id,
       };
@@ -1799,6 +1920,7 @@ export default {
           }
           return this.getRegion("province");
         })
+
     }else{
       this.complexIng().then((res) => {
           // 没有开始填写

+ 92 - 37
src/views/operationManage/shopManage/shopAdd4.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-09-18 10:57:47
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-04-15 19:41:59
+ * @LastEditTime: 2024-05-16 09:38:37
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd4.vue
  * @Description: 
  * 
@@ -55,7 +55,7 @@
           ></el-input>
           <i class="el-icon-location position red ml10" @click="chooseAddress"></i>
         </el-form-item>
-        <el-form-item label="商户类型:" prop="mchntType">
+        <!-- <el-form-item label="商户类型:" prop="mchntType">
           <el-select
             v-model="setQuery.mchntType"
             class="item-width-300"
@@ -69,7 +69,7 @@
             >
             </el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="所属行业:" prop="mccCode">
           <el-select
             v-model="setQuery.mccCode"
@@ -114,6 +114,12 @@
             (图片支持jpg, png, bmp格式,建议上传100kb~500kb大小文件)
           </div>
         </el-form-item>
+         <el-form-item label="绑定主商户" prop="remark">
+          <el-checkbox-group v-model="setQuery.remark">
+            <el-checkbox label="89852017372911Y中数">慧研学惠生活</el-checkbox>
+            <el-checkbox label="89852017372912Y贵大" >印象贵大</el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
       </template>
 
       <template v-if="step == 2">
@@ -134,7 +140,7 @@
             placeholder="请输入身份证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="legal_card_deadline">
+        <el-form-item label="身份证有效期:" prop="legal_card_start">
           <el-date-picker
             v-model="date"
             :disabled="checked"
@@ -146,7 +152,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked">长期</el-checkbox>
+          <el-checkbox :disabled="!setQuery.legal_card_start" v-model="checked">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="职业:" prop="legal_occupation">
           <el-select
@@ -319,16 +325,32 @@
           >
         </el-form-item>
 
-        <el-form-item label="身份证号码:" prop="shareholderCertno">
+         <el-form-item label="证件类型:" prop="shareholderCertType">
+          <el-select
+            v-model="setQuery.shareholderCertType"
+            size="small"
+            class="item-width-300"
+            placeholder="请选择证件类型"
+          >
+            <el-option
+              v-for="item in cardOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="证件号码:" prop="shareholderCertno">
           <el-input
             v-model="setQuery.shareholderCertno"
             size="small"
             :maxlength="18"
             class="item-width-300"
-            placeholder="请输入身份证号码"
+            placeholder="请输入证号码"
           ></el-input>
         </el-form-item>
-        <el-form-item label="身份证有效期:" prop="shareholderCertExpire">
+        <el-form-item label="身份证有效期:" prop="shareholderCertBeginDate">
           <el-date-picker
             v-model="date1"
             :disabled="checked1"
@@ -340,7 +362,7 @@
             end-placeholder="结束日期"
           >
           </el-date-picker>
-          <el-checkbox v-model="checked1">长期</el-checkbox>
+          <el-checkbox :disabled="!setQuery.shareholderCertBeginDate" v-model="checked1">长期</el-checkbox>
         </el-form-item>
         <el-form-item label="家庭地址:" prop="shareholderHomeAddr">
           <el-input
@@ -366,16 +388,32 @@
               >同步股东信息</el-button
             >
           </el-form-item>
-          <el-form-item label="身份证号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
+          <el-form-item label="证件类型:" :prop="'bnfList.'+index+'.bnfCertType'" :rules="{ required: true, message: '请选择证件类型', trigger: 'change' }">
+            <el-select
+              v-model="item.bnfCertType"
+              size="small"
+              class="item-width-300"
+              placeholder="请选择证件类型"
+            >
+              <el-option
+                v-for="item in cardOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="证件号码:" :prop="'bnfList.'+index+'.bnfCertno'" :rules="{ required: true, message: '请输入身份证号', trigger: 'blur' }">
             <el-input
               v-model="item.bnfCertno"
               size="small"
               :maxlength="18"
               class="item-width-300"
-              placeholder="请输入受益人身份证号码"
+              placeholder="请输入受益人证号码"
             ></el-input>
           </el-form-item>
-          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertBeginDate'" :rules="{ required: true, message: '请选择身份证有效期', trigger: 'change' }">
             <el-date-picker
               v-model="perSonObj['date'+(index+1)]"
               :disabled="perSonObj['checked'+(index+1)]"
@@ -388,7 +426,7 @@
               end-placeholder="结束日期"
             >
             </el-date-picker>
-            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)" :disabled="!setQuery.bnfList[index].bnfCertBeginDate">  长期</el-checkbox>
           </el-form-item>
           <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
             <el-input
@@ -397,10 +435,11 @@
               class="item-width-300"
               placeholder="请输入受益人家庭地址"
             ></el-input>
+           <el-button size="small" class="ml10" type="danger" v-if="setQuery.bnfList.length>1" @click="delPerson(index)">删除受益人</el-button> 
           </el-form-item>
         </div>
         <el-form-item>
-           <el-button @click="addPerson">添加受益人</el-button>
+           <el-button size="small" @click="addPerson">添加受益人</el-button>
         </el-form-item>
       </template>
 
@@ -642,6 +681,7 @@ export default {
         fax: "",
         lastClientManager: "",
         lastTerminalManager: "",
+        legal_card_start: "",
         legal_card_deadline: "",
         legal_email: "",
         legal_idcard_no: "",
@@ -652,7 +692,7 @@ export default {
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
         mccCode: "",
-        mchntType: "",
+        mchntType: "1",
         pic_list: [
           {
             epId: "",
@@ -662,7 +702,7 @@ export default {
         ],
         product: "",
         reg_mer_type: "01",
-        remark: "",
+        remark: [],
         serviceDistrict: "",
         shareholderCertBeginDate:'',
         shareholderCertExpire: "",
@@ -710,13 +750,16 @@ export default {
         mccCode: [
           { required: true, message: "请选择所属行业", trigger: "change" },
         ],
+        remark: [
+          { type: 'array', required: true, message: '请至少绑定一个主商户', trigger: 'change' }
+        ],
         legal_name: [
           { required: true, message: "请输入身份证姓名", trigger: "blur" },
         ],
         legal_idcard_no: [
           { required: true, message: "请输入身份证号码", trigger: "blur" },
         ],
-        legal_card_deadline: [
+        legal_card_start: [
           { required: true, message: "请选择身份证有效期", trigger: "change" },
         ],
         legal_occupation: [
@@ -927,11 +970,13 @@ export default {
     };
   },
   watch: {
-    checked(val) {
+     checked(val) {
       if (val) {
         this.setQuery.legal_card_deadline = "9999-12-31";
-        this.setQuery.legal_card_start = "9999-12-31";
-        this.date = ["9999-12-31", "9999-12-31"];
+        // this.setQuery.legal_card_start = "9999-12-31";
+        // this.date = ["9999-12-31", "9999-12-31"];
+          this.date = [this.setQuery.legal_card_start, "9999-12-31"];
+
       } else {
         this.date = [];
       }
@@ -957,9 +1002,9 @@ export default {
     },
     checked1(val) {
       if (val) {
-        this.setQuery.shareholderCertBeginDate = "9999-12-31";
+        // this.setQuery.shareholderCertBeginDate = "9999-12-31";
         this.setQuery.shareholderCertExpire = "9999-12-31";
-          this.date1 = ["9999-12-31", "9999-12-31"];
+          this.date1 = [this.setQuery.shareholderCertBeginDate, "9999-12-31"];
         
       } else {
            this.date1 = [];
@@ -1031,15 +1076,15 @@ export default {
     },
     // 受益人身份证是否长期
     checkChange(val,index){
-      console.log(val,index);
+      console.log(111111111111,val,index);
       if (val) {
-        this.setQuery.bnfList[index].bnfCertBeginDate = "9999-12-31"
-        this.setQuery.bnfList[index].bnfCertExpire = "9999-12-31"
-          this.perSonObj['date'+(index+1)]= ["9999-12-31", "9999-12-31"];
+        this.$set(this.perSonObj,['date'+(index+1)],[this.setQuery.bnfList[index].bnfCertBeginDate, "9999-12-31"])
+        this.$set(this.setQuery.bnfList[index],'bnfCertExpire',"9999-12-31")
 
       } else {
            this.perSonObj['date'+(index+1)]= [];
-        
+            this.setQuery.bnfList[index].bnfCertBeginDate = ''
+            this.setQuery.bnfList[index].bnfCertExpire = ''
       }
     },
     // 添加受益人
@@ -1062,26 +1107,33 @@ export default {
       })
 
     },
+    delPerson(index){
+      this.setQuery.bnfList.splice(index,1)
+    },
     // 同步信息
     handleCopy(type) {
       if (type == 1) {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
           this.checked1 = true;
+
         } else {
           // this.setQuery.shareholderCertExpire =this.setQuery.legal_card_deadline;
         }
           this.date1 = this.date
+          this.setQuery.shareholderCertType = '1'
         this.setQuery.shareholderCertno = this.setQuery.legal_idcard_no;
         // this.setQuery.shareholderHomeAddr = this.setQuery.legalmanHomeAddr;
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
-        if (this.setQuery.legal_card_deadline == "9999-12-31") {
+        if (this.setQuery.shareholderCertExpire == "9999-12-31") {
           this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
           this.perSonObj.date1 = this.date1
+        this.setQuery.bnfList[0].bnfCertType =this.setQuery.shareholderCertType;
+        this.setQuery.bnfList[0].bnfCertBeginDate =this.setQuery.shareholderCertBeginDate;
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1261,6 +1313,11 @@ export default {
               }
               //有数据时 回填数据
               this.setQuery = res.content;
+              if(this.setQuery.remark){
+                this.setQuery.remark = this.setQuery.remark.split(',')
+              }else{
+                this.setQuery.remark = []
+              }
               if (this.setQuery.legal_card_deadline == "9999-12-31") {
                 this.checked = true;
               } else if (this.setQuery.legal_card_deadline) {
@@ -1279,7 +1336,7 @@ export default {
                 ];
               }
 
-              if (!this.setQuery.bnfList) {
+               if (!this.setQuery.bnfList) {
                 this.setQuery.bnfList = [
                   {
                     bnfCertBeginDate: "",
@@ -1294,16 +1351,14 @@ export default {
                 this.setQuery.bnfList.map((item,index)=>{
                   if (item.bnfCertExpire == "9999-12-31") {
                    this.perSonObj['checked'+(index+1)] = true;
-                    this.perSonObj['date'+(index+1)] = [
-                     "9999-12-31",
-                     "9999-12-31"
-                   ];
+                 
                  } else if (item.bnfCertExpire) {
-                   this.perSonObj['date'+(index+1)] = [
+                   this.perSonObj['checked'+(index+1)] = false;
+                 }
+                 this.$set( this.perSonObj,'date'+(index+1),[
                      item.bnfCertBeginDate,
                      item.bnfCertExpire
-                   ];
-                 }
+                   ])
                 })
               }
 
@@ -1469,7 +1524,7 @@ export default {
         legal_mobile: this.setQuery.legal_mobile,
         bank_no: this.setQuery.bank_no,
         epId: this.$route.query.id,
-        remark: "",
+        remark: this.setQuery.remark.join(),
         bank_province_id: this.setQuery.bank_province_id,
         bank_city_id: this.setQuery.bank_city_id,
       };

+ 7 - 7
vue.config.js

@@ -45,13 +45,13 @@ module.exports = {
     },
     //	反向代理
     proxy: {
-      // '^/api/zswl-cloud-shop': {
-      //   target: 'http://g3710170f8.zicp.fun/',//代理
-      //   changeOrigin: true,//是否跨域
-      //   pathRewrite: {
-      //     '^/api/zswl-cloud-shop': ''
-      //   }
-      // },
+      '^/api/baidu': {
+        target: 'https://api.map.baidu.com/',//代理
+        changeOrigin: true,//是否跨域
+        pathRewrite: {
+          '^/api/baidu': ''
+        }
+      },
       '^/api': {
         // target: 'http://192.168.110.153:9002/',//代理
         target: BASE_URL,//代理