wenjie 1 éve
szülő
commit
d2b1d7b1b2

+ 5 - 5
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-03-29 11:43:36
+ * @LastEditTime: 2024-04-09 17:53:28
  * @FilePath: \admin-manage\src\router\index.js
  * @Description: 
  * 
@@ -187,7 +187,7 @@ export let constantRoutes = [{
             hidden: true,
             component: () => import('@/views/operationManage/shopManage/shopAdd1.vue'),
             meta: {
-              title: '店铺添加',
+              title: '银联认证',
               activeMenu: '/operationManage/shopManage/index'
 
             },
@@ -199,7 +199,7 @@ export let constantRoutes = [{
             hidden: true,
             component: () => import('@/views/operationManage/shopManage/shopAdd2.vue'),
             meta: {
-              title: '店铺添加',
+              title: '银联认证',
               activeMenu: '/operationManage/shopManage/index'
 
             },
@@ -211,7 +211,7 @@ export let constantRoutes = [{
             hidden: true,
             component: () => import('@/views/operationManage/shopManage/shopAdd3.vue'),
             meta: {
-              title: '店铺添加',
+              title: '银联认证',
               activeMenu: '/operationManage/shopManage/index'
 
             },
@@ -223,7 +223,7 @@ export let constantRoutes = [{
             hidden: true,
             component: () => import('@/views/operationManage/shopManage/shopAdd4.vue'),
             meta: {
-              title: '店铺添加',
+              title: '银联认证',
               activeMenu: '/operationManage/shopManage/index'
 
             },

+ 1 - 0
src/styles/index.scss

@@ -73,6 +73,7 @@ div:focus {
 .search {
   display: flex;
   align-items: center;
+  justify-content: space-between;
   width: 100%;
   margin-bottom: 20px;
 }

+ 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-01 10:24:34
+ * @LastEditTime: 2024-04-08 09:05:56
  * @FilePath: \admin-manage\src\utils\config.js
  * @Description: 124234
  * 

+ 1 - 0
src/views/merchantManage/addUser.vue

@@ -90,6 +90,7 @@
           :maxlength="11"
           size="small"
           class="item-width-300"
+           :disabled="this.$route.query.id"
         ></el-input>
       </el-form-item>
       <el-form-item label="备注:" prop="notes">

+ 21 - 20
src/views/operationManage/goodsManage/goodsDetail.vue

@@ -2,7 +2,7 @@
  * @Author: wj 1454560336@qq.com
  * @Date: 2023-11-24 14:39:54
  * @LastEditors: wenjie 1454560336@qq.com
- * @LastEditTime: 2024-03-30 00:50:01
+ * @LastEditTime: 2024-04-11 17:20:38
  * @FilePath: \admin-manage\src\views\operationManage\goodsManage\goodsDetail.vue
  * @Description: 
  * 
@@ -510,6 +510,7 @@ export default Vue.extend({
           { required: true, message: "请输入提现手续费", trigger: "blur" },
         ],
         shareId: [{ required: true, message: "请输入分账规则", trigger: "change" }],
+          checkDetail: [{ required: true, message: "请输入审核意见", trigger: "blur" }],
        
        
       },
@@ -627,29 +628,29 @@ export default Vue.extend({
     save(applyState) {
        if(applyState == 2){
         this.setQuery.checkDetail = this.setQuery.checkDetail || '通过'
-        this.rules = {
-          shareId: [{ required: true, message: "请选择分账规则", trigger: "change" }],
-           taxRate: [
-          { required: true, message: "请输入商品税费", trigger: "blur" },
-          ],
-          withdrawalRate: [
-            { required: true, message: "请输入提现手续费", trigger: "blur" },
-          ],
-        }
+        // this.rules = {
+        //   shareId: [{ required: true, message: "请选择分账规则", trigger: "change" }],
+        //    taxRate: [
+        //   { required: true, message: "请输入商品税费", trigger: "blur" },
+        //   ],
+        //   withdrawalRate: [
+        //     { required: true, message: "请输入提现手续费", trigger: "blur" },
+        //   ],
+        // }
       }else if(applyState == 3){
         if(this.setQuery.checkDetail == '通过'){
           this.setQuery.checkDetail = ''
         }
-        this.rules = {
-          checkDetail: [{ required: true, message: "请输入审核意见", trigger: "blur" }],
-          shareId: [{ required: true, message: "请选择分账规则", trigger: "change" }],
-          taxRate: [
-          { required: true, message: "请输入商品税费", trigger: "blur" },
-          ],
-          withdrawalRate: [
-            { required: true, message: "请输入提现手续费", trigger: "blur" },
-          ],
-        }
+        // this.rules = {
+        //   checkDetail: [{ required: true, message: "请输入审核意见", trigger: "blur" }],
+        //   shareId: [{ required: true, message: "请选择分账规则", trigger: "change" }],
+        //   taxRate: [
+        //   { required: true, message: "请输入商品税费", trigger: "blur" },
+        //   ],
+        //   withdrawalRate: [
+        //     { required: true, message: "请输入提现手续费", trigger: "blur" },
+        //   ],
+        // }
       }
       this.$nextTick(()=>{
 

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

@@ -2,6 +2,8 @@
 <template>
   <div class="orderManage app-container">
     <div class="search">
+      <div>
+
         <el-input
           v-model="query.noOrGName"
           size="small"
@@ -42,6 +44,7 @@
       >
         搜索
       </el-button>
+      </div>
     </div>
 
     <el-table
@@ -65,7 +68,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsModelList[0].goodsInfo.goodsName}}
+        {{scope.row.goodsModelList[0].goodsInfo.activityName||scope.row.goodsModelList[0].goodsInfo.goodsName}}
       </template>
       </el-table-column>
       <!-- <el-table-column
@@ -82,7 +85,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsModelList[0].goodsInfo.realPrice}}
+        {{scope.row.goodsModelList[0].goodsInfo.price||scope.row.goodsModelList[0].goodsInfo.realPrice}}
       </template>
       </el-table-column>
       <el-table-column

+ 44 - 41
src/views/operationManage/orderManage/list.vue

@@ -2,46 +2,49 @@
 <template>
   <div class="list app-container">
     <div class="search">
-        <el-input
-          v-model="query.noOrGName"
-          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.orderType"
+      <div>
+
+          <el-input
+            v-model="query.noOrGName"
+            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.orderType"
+            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-button
+          class="ml10"
+          type="primary"
           size="small"
-          clearable
-          class="item-width-200 ml10"
-          placeholder="请选择订单状态"
+          icon="el-icon-search"
+          @click="handleSearch"
         >
-          <el-option
-            v-for="item in options"
-            :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>
+          搜索
+        </el-button>
+      </div>
     </div>
 
     <el-table
@@ -65,7 +68,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        <img :src="scope.row.goodsModelList[0].goodsInfo.goodsPath" alt="" class="icon">
+        <img :src="scope.row.goodsModelList[0].goodsInfo.activityCover||scope.row.goodsModelList[0].goodsInfo.goodsPath" alt="" class="icon">
       </template>
       </el-table-column>
       <el-table-column
@@ -75,7 +78,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsModelList[0].goodsInfo.goodsName}}
+        {{scope.row.goodsModelList[0].goodsInfo.activityName||scope.row.goodsModelList[0].goodsInfo.goodsName}}
       </template>
       </el-table-column>
       <el-table-column
@@ -85,7 +88,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{goodsTypeObj[scope.row.goodsModelList[0].goodsInfo.goodsType] }}
+        {{goodsTypeObj[scope.row.goodsModelList[0].goodsInfo.goodsType] || '活动报名' }}
       </template>
       </el-table-column>
     

+ 12 - 11
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-03-31 11:47:46
+ * @LastEditTime: 2024-04-12 15:42:49
  * @FilePath: \admin-manage\src\views\operationManage\orderManage\orderDetail.vue
  * @Description: 
  * 
@@ -132,7 +132,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        <img :src="scope.row.goodsList[0].goodsInfo.goodsPath" alt="" class="icon">
+        <img :src="scope.row.goodsList[0].goodsInfo.activityCover||scope.row.goodsList[0].goodsInfo.goodsPath" alt="" class="icon">
       </template>
       </el-table-column>
       <el-table-column
@@ -142,7 +142,7 @@
         show-overflow-tooltip
       >
       <template slot-scope="scope">
-        {{scope.row.goodsList[0].goodsInfo.goodsName}}
+        {{scope.row.goodsList[0].goodsInfo.activityName||scope.row.goodsList[0].goodsInfo.goodsName}}
       </template>
       </el-table-column>
       <el-table-column
@@ -152,7 +152,7 @@
         show-overflow-tooltip
       >
        <template slot-scope="scope">
-        {{scope.row.goodsList[0].goodsInfo.realPrice}}
+        {{scope.row.goodsList[0].goodsInfo.price||scope.row.goodsList[0].goodsInfo.realPrice}}
       </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] || '报名活动' }}
       </template>
       </el-table-column>
     </el-table>
@@ -254,13 +254,13 @@
         </el-select>
         </el-form-item>
         <el-form-item label="购买店铺退款金额" prop="buyShopAmount">
-            <el-input type="number" v-model.number="query.buyShopAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
+            <el-input type="number" v-model="query.buyShopAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
         </el-form-item>
          <el-form-item label="核销店铺退款金额" prop="useShopAmount">
-            <el-input type="number" v-model.number="query.useShopAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
+            <el-input type="number" v-model="query.useShopAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
         </el-form-item>
          <el-form-item label="平台退款金额" prop="platformAmount">
-            <el-input type="number" v-model.number="query.platformAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
+            <el-input type="number" v-model="query.platformAmount" :disabled="query.type == 1" size="small" class="item-width-200" autocomplete="off"></el-input>
         </el-form-item>
          <el-form-item label="用户总退款金额">
             <el-input v-model="total" disabled size="small" class="item-width-200" autocomplete="off"></el-input>
@@ -324,7 +324,7 @@ import {auditRefund,transfer,orderDetail,subOrdersConfirm} from '@/api/order'
         },
         computed: {
             total() {
-                this.query.refundAmount = this.query.useShopAmount + this.query.platformAmount+ this.query.buyShopAmount
+                this.query.refundAmount = (this.query.useShopAmount*1000 + this.query.platformAmount*1000+ this.query.buyShopAmount*1000)/1000
                 return this.query.refundAmount
             }
         },
@@ -391,8 +391,9 @@ import {auditRefund,transfer,orderDetail,subOrdersConfirm} from '@/api/order'
                  this.$refs.query.validate((v) => {
                     if (v) {
                         this.btnLoading = true
-                        // let obj = JSON.parse(JSON.stringify(this.query))
-                        // obj.
+                        this.query.platformAmount = Number(this.query.platformAmount)
+                        this.query.buyShopAmount = Number(this.query.buyShopAmount)
+                        this.query.useShopAmount = Number(this.query.useShopAmount)
                         auditRefund(this.query).then(res=>{
                             this.btnLoading = false
                             if(res.state == 'Success'){

+ 4 - 4
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-03-28 18:45:55
+ * @LastEditTime: 2024-04-08 15:16:14
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd.vue
  * @Description: 
  * 
@@ -181,7 +181,7 @@
 
        <el-radio-group :disabled="!setQuery.authAccount" v-model="setQuery.state">
         <el-radio :label="1">运营中</el-radio>
-        <el-radio :label="3">关闭</el-radio>
+        <el-radio :label="2">关闭</el-radio>
       </el-radio-group>
       </el-form-item>
 
@@ -268,7 +268,7 @@ export default {
         serviceCate:[],//商品分类
         authAccount:"",
         searchEnable:1,
-        state:3,
+        state:2,
       },
       authOptions:[],//银联账号
       typeOptions:[],//商品分类
@@ -368,7 +368,7 @@ export default {
     },
     'setQuery.authAccount'(val){
         if(!val){
-          this.setQuery.state = 3
+          this.setQuery.state = 2
         }
     }
   },

+ 37 - 2
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-03-29 15:39:45
+ * @LastEditTime: 2024-04-07 15:03:37
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd1.vue
  * @Description: 
  * 
@@ -76,6 +76,7 @@
           <el-select
             v-model="setQuery.mccCode"
             class="item-width-300"
+            filterable
             placeholder="请选择所属行业"
           >
             <el-option
@@ -548,7 +549,7 @@ export default {
         legal_sex: "1",
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
-        mccCode: "8041",
+        mccCode: "",
         mchntType: "",
         pic_list: [
           {
@@ -810,21 +811,55 @@ export default {
         this.setQuery.legal_card_deadline = val[1];
       }
     },
+    // "setQuery.shop_addr_ext": 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) {
+    //           that.marker = new BMapGL.Marker(point, { title: val });
+    //           if (that.map) {
+    //             that.map.centerAndZoom(point, 16);
+    //             that.map.addOverlay(that.marker);
+    //           }
+    //         }
+    //       },
+    //       that.city
+    //     );
+    //   }
+    // }),
     "setQuery.shop_addr_ext": 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) {
+            console.log(point);
             if (point) {
               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.province = result.addressComponents.province;
+                      that.city = result.addressComponents.city;
+                      that.district = result.addressComponents.district;
+                    }      
+                });
               }
             }
           },

+ 155 - 76
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-03-29 14:11:00
+ * @LastEditTime: 2024-04-12 15:22:29
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd2.vue
  * @Description: 
  * 
@@ -74,6 +74,7 @@
           <el-select
             v-model="setQuery.mccCode"
             class="item-width-300"
+            filterable
             placeholder="请选择所属行业"
           >
             <el-option
@@ -369,48 +370,54 @@
 
         <div class="line"></div>
 
-        <div class="title">受益人1</div>
-        <el-form-item label="受益人:" prop="bnfName">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfName"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人姓名"
-          ></el-input>
-          <el-button type="text" class="ml10" @click="handleCopy(2)"
-            >同步股东信息</el-button
-          >
-        </el-form-item>
-        <el-form-item label="身份证号码:" prop="bnfCertno">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfCertno"
-            size="small"
-            :maxlength="18"
-            class="item-width-300"
-            placeholder="请输入受益人身份证号码"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="身份证有效期:" prop="bnfCertExpire">
-          <el-date-picker
-            v-model="date2"
-            :disabled="checked2"
-            size="small"
-            type="daterange"
-            range-separator="至"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          >
-          </el-date-picker>
-          <el-checkbox v-model="checked2">长期</el-checkbox>
-        </el-form-item>
-        <el-form-item label="家庭地址:" prop="legal_idcard_no">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfHomeAddr"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人家庭地址"
-          ></el-input>
+        <div v-for="(item,index) in setQuery.bnfList" :key="index">
+          <div class="title">受益人{{index+1}}</div>
+          <el-form-item label="受益人:" :prop="'bnfList.'+index+'.bnfName'" :rules="{ required: true, message: '请输入受益人', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfName"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人姓名"
+            ></el-input>
+            <el-button type="text" class="ml10" v-if="index == 0" @click="handleCopy(2)"
+              >同步股东信息</el-button
+            >
+          </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="请输入受益人身份证号码"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+            <el-date-picker
+              v-model="perSonObj['date'+(index+1)]"
+              :disabled="perSonObj['checked'+(index+1)]"
+              size="small"
+              type="daterange"
+              @change="changeTime($event,index)"
+              range-separator="至"
+              value-format="yyyy-MM-dd"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+          </el-form-item>
+          <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfHomeAddr"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人家庭地址"
+            ></el-input>
+          </el-form-item>
+        </div>
+        <el-form-item>
+           <el-button @click="addPerson">添加受益人</el-button>
         </el-form-item>
       </template>
 
@@ -618,14 +625,16 @@ export default {
       showMap: false, //地图显示
       checked: false,
       checked1: false,
-      checked2: false,
+      perSonObj:{
+        checked1: false,
+        date1: [],
+      },
       showSign: false, //控制签约按钮页面
       signLoading: false,
       loading: false,
       imgList: [],
       date: [],
       date1: [],
-      date2: [],
       accesseId:'',
       setQuery: {
         accesser_user_id: "",
@@ -661,7 +670,7 @@ export default {
         legal_sex: "1",
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
-        mccCode: "8041",
+        mccCode: "",
         mchntType: "",
         pic_list: [
           {
@@ -791,9 +800,16 @@ export default {
         agreement: [
           { required: true, message: "请上传租聘协议", trigger: "change" },
         ],
-        //  bnfList: [
-        //   { required: true, message: "请上传租聘协议", trigger: "change" },
-        // ],
+        shareholderHomeAddr: [
+          { required: true, message: "请输入家庭地址", trigger: "blur" },
+        ],
+        shareholderCertno: [
+          { required: true, message: "请输入身份证号", trigger: "blur" },
+        ],
+        shareholderName: [
+          { required: true, message: "请输入股东姓名", trigger: "blur" },
+        ],
+        
       },
       typeOptions: [
         {
@@ -952,26 +968,26 @@ export default {
 
       }
     },
-    date2(val) {
-      if (val == null) {
-        this.setQuery.bnfList[0].bnfCertBeginDate = ''
-         this.setQuery.bnfList[0].bnfCertExpire = ''
-      } else {
-         this.setQuery.bnfList[0].bnfCertBeginDate = val[0]
-         this.setQuery.bnfList[0].bnfCertExpire = val[1]
-      }
-    },
-    checked2(val) {
-      if (val) {
-        this.setQuery.bnfList[0].bnfCertBeginDate = "9999-12-31"
-        this.setQuery.bnfList[0].bnfCertExpire = "9999-12-31"
-          this.date2 = ["9999-12-31", "9999-12-31"];
+    // date2(val) {
+    //   if (val == null) {
+    //     this.setQuery.bnfList[0].bnfCertBeginDate = ''
+    //      this.setQuery.bnfList[0].bnfCertExpire = ''
+    //   } else {
+    //      this.setQuery.bnfList[0].bnfCertBeginDate = val[0]
+    //      this.setQuery.bnfList[0].bnfCertExpire = val[1]
+    //   }
+    // },
+    // checked2(val) {
+    //   if (val) {
+    //     this.setQuery.bnfList[0].bnfCertBeginDate = "9999-12-31"
+    //     this.setQuery.bnfList[0].bnfCertExpire = "9999-12-31"
+    //       this.date2 = ["9999-12-31", "9999-12-31"];
 
-      } else {
-           this.date2 = [];
+    //   } else {
+    //        this.date2 = [];
         
-      }
-    },
+    //   }
+    // },
 
     "setQuery.bank_province_id": function (val, old) {
       if (val) {
@@ -988,15 +1004,27 @@ export default {
         //创建地址解析器实例
         var myGeo = new BMapGL.Geocoder();
         that.marker ? that.map.removeOverlay(that.marker) : "";
+
         // 将地址解析结果显示在地图上,并调整地图视野
         myGeo.getPoint(
           val,
           function (point) {
+            console.log(point);
             if (point) {
               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.province = result.addressComponents.province;
+                      that.city = result.addressComponents.city;
+                      that.district = result.addressComponents.district;
+                    }      
+                });
               }
             }
           },
@@ -1006,6 +1034,49 @@ export default {
     }),
   },
   methods: {
+    changeTime(val,index){
+      console.log(val,index);
+      if (val == null) {
+        this.setQuery.bnfList[index].bnfCertBeginDate = ''
+         this.setQuery.bnfList[index].bnfCertExpire = ''
+      } else {
+         this.setQuery.bnfList[index].bnfCertBeginDate = val[0]
+         this.setQuery.bnfList[index].bnfCertExpire = val[1]
+      }
+    },
+    // 受益人身份证是否长期
+    checkChange(val,index){
+      console.log(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"];
+
+      } else {
+           this.perSonObj['date'+(index+1)]= [];
+        
+      }
+    },
+    // 添加受益人
+    addPerson(){
+      this.setQuery.bnfList.push(
+        {
+            bnfCertBeginDate: "",
+            bnfCertExpire: "",
+            bnfCertType: "1",
+            bnfCertno: "",
+            bnfName: "",
+            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
+      })
+
+    },
     // 同步信息
     handleCopy(type) {
       if (type == 1) {
@@ -1020,12 +1091,12 @@ export default {
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
-          this.checked2 = true;
+          this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
-          this.date2 = this.date1
+          this.perSonObj.date1 = this.date1
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1235,13 +1306,21 @@ export default {
                     bnfHomeAddr: "",
                   },
                 ];
-              }else if (this.setQuery.bnfList[0].bnfCertExpire == "9999-12-31") {
-                this.checked2 = true;
-              } else if (this.setQuery.shareholderCertExpire) {
-                this.date2 = [
-                  this.setQuery.bnfList[0].bnfCertBeginDate,
-                  this.setQuery.bnfList[0].bnfCertExpire
-                ];
+              }else{
+                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)] = [
+                     item.bnfCertBeginDate,
+                     item.bnfCertExpire
+                   ];
+                 }
+                })
               }
 
               // if (this.setQuery.bnfList[0].bnfCertExpire == "9999-12-31") {

+ 191 - 73
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-03-29 14:18:59
+ * @LastEditTime: 2024-04-12 15:22:27
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd3.vue
  * @Description: 
  * 
@@ -74,6 +74,7 @@
           <el-select
             v-model="setQuery.mccCode"
             class="item-width-300"
+            filterable
             placeholder="请选择所属行业"
           >
             <el-option
@@ -346,48 +347,54 @@
 
         <div class="line"></div>
 
-        <div class="title">受益人1</div>
-        <el-form-item label="受益人:" prop="bnfName">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfName"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人姓名"
-          ></el-input>
-          <el-button type="text" class="ml10" @click="handleCopy(2)"
-            >同步股东信息</el-button
-          >
-        </el-form-item>
-        <el-form-item label="身份证号码:" prop="bnfCertno">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfCertno"
-            size="small"
-            :maxlength="18"
-            class="item-width-300"
-            placeholder="请输入受益人身份证号码"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="身份证有效期:" prop="bnfCertExpire">
-          <el-date-picker
-            v-model="date2"
-            :disabled="checked2"
-            size="small"
-            type="daterange"
-            range-separator="至"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          >
-          </el-date-picker>
-          <el-checkbox v-model="checked2">长期</el-checkbox>
-        </el-form-item>
-        <el-form-item label="家庭地址:" prop="legal_idcard_no">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfHomeAddr"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人家庭地址"
-          ></el-input>
+        <div v-for="(item,index) in setQuery.bnfList" :key="index">
+          <div class="title">受益人{{index+1}}</div>
+          <el-form-item label="受益人:" :prop="'bnfList.'+index+'.bnfName'" :rules="{ required: true, message: '请输入受益人', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfName"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人姓名"
+            ></el-input>
+            <el-button type="text" class="ml10" v-if="index == 0" @click="handleCopy(2)"
+              >同步股东信息</el-button
+            >
+          </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="请输入受益人身份证号码"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+            <el-date-picker
+              v-model="perSonObj['date'+(index+1)]"
+              :disabled="perSonObj['checked'+(index+1)]"
+              size="small"
+              type="daterange"
+              @change="changeTime($event,index)"
+              range-separator="至"
+              value-format="yyyy-MM-dd"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+          </el-form-item>
+          <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfHomeAddr"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人家庭地址"
+            ></el-input>
+          </el-form-item>
+        </div>
+        <el-form-item>
+           <el-button @click="addPerson">添加受益人</el-button>
         </el-form-item>
       </template>
 
@@ -595,14 +602,16 @@ export default {
       showMap: false, //地图显示
       checked: false,
       checked1: false,
-      checked2: false,
+      perSonObj:{
+        checked1: false,
+        date1: [],
+      },
       showSign: false, //控制签约按钮页面
       signLoading: false,
       loading: false,
       imgList: [],
       date: [],
       date1: [],
-      date2: [],
       accesseId:'',
       setQuery: {
         accesser_user_id: "",
@@ -638,7 +647,7 @@ export default {
         legal_sex: "1",
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
-        mccCode: "8041",
+        mccCode: "",
         mchntType: "",
         pic_list: [
           {
@@ -768,6 +777,30 @@ export default {
         agreement: [
           { required: true, message: "请上传租聘协议", trigger: "change" },
         ],
+        shareholderHomeAddr: [
+          { required: true, message: "请输入家庭地址", trigger: "blur" },
+        ],
+        shareholderCertno: [
+          { required: true, message: "请输入身份证号", trigger: "blur" },
+        ],
+        shareholderName: [
+          { required: true, message: "请输入股东姓名", trigger: "blur" },
+        ],
+         shareholderCertExpire: [
+          { required: true, message: "请输选择身份证有效期", trigger: "change" },
+        ],
+        // 'bnfList.0.bnfHomeAddr': [
+        //   { required: true, message: "请输入家庭地址", trigger: "blur" },
+        // ],
+        // 'bnfList.0.bnfCertno': [
+        //   { required: true, message: "请输入身份证号", trigger: "blur" },
+        // ],
+        // 'bnfList.0.bnfName': [
+        //   { required: true, message: "请输入受益人", trigger: "blur" },
+        // ],
+        //  'bnfList.0.bnfCertExpire': [
+        //   { required: true, message: "请输选择身份证有效期", trigger: "change" },
+        // ],
         //  bnfList: [
         //   { required: true, message: "请上传租聘协议", trigger: "change" },
         // ],
@@ -929,26 +962,26 @@ export default {
 
       }
     },
-    date2(val) {
-      if (val == null) {
-        this.setQuery.bnfList[0].bnfCertBeginDate = ''
-         this.setQuery.bnfList[0].bnfCertExpire = ''
-      } else {
-         this.setQuery.bnfList[0].bnfCertBeginDate = val[0]
-         this.setQuery.bnfList[0].bnfCertExpire = val[1]
-      }
-    },
-    checked2(val) {
-      if (val) {
-        this.setQuery.bnfList[0].bnfCertBeginDate = "9999-12-31"
-        this.setQuery.bnfList[0].bnfCertExpire = "9999-12-31"
-          this.date2 = ["9999-12-31", "9999-12-31"];
+    // date2(val) {
+    //   if (val == null) {
+    //     this.setQuery.bnfList[0].bnfCertBeginDate = ''
+    //      this.setQuery.bnfList[0].bnfCertExpire = ''
+    //   } else {
+    //      this.setQuery.bnfList[0].bnfCertBeginDate = val[0]
+    //      this.setQuery.bnfList[0].bnfCertExpire = val[1]
+    //   }
+    // },
+    // checked2(val) {
+    //   if (val) {
+    //     this.setQuery.bnfList[0].bnfCertBeginDate = "9999-12-31"
+    //     this.setQuery.bnfList[0].bnfCertExpire = "9999-12-31"
+    //       this.date2 = ["9999-12-31", "9999-12-31"];
 
-      } else {
-           this.date2 = [];
+    //   } else {
+    //        this.date2 = [];
         
-      }
-    },
+    //   }
+    // },
     "setQuery.bank_province_id": function (val, old) {
       if (val) {
         this.getRegion("city");
@@ -958,21 +991,55 @@ export default {
       }
     },
 
+    // "setQuery.shop_addr_ext": 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) {
+    //           that.marker = new BMapGL.Marker(point, { title: val });
+    //           if (that.map) {
+    //             that.map.centerAndZoom(point, 16);
+    //             that.map.addOverlay(that.marker);
+    //           }
+    //         }
+    //       },
+    //       that.city
+    //     );
+    //   }
+    // }),
     "setQuery.shop_addr_ext": 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) {
+            console.log(point);
             if (point) {
               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.province = result.addressComponents.province;
+                      that.city = result.addressComponents.city;
+                      that.district = result.addressComponents.district;
+                    }      
+                });
               }
             }
           },
@@ -982,6 +1049,49 @@ export default {
     }),
   },
   methods: {
+     changeTime(val,index){
+      console.log(val,index);
+      if (val == null) {
+        this.setQuery.bnfList[index].bnfCertBeginDate = ''
+         this.setQuery.bnfList[index].bnfCertExpire = ''
+      } else {
+         this.setQuery.bnfList[index].bnfCertBeginDate = val[0]
+         this.setQuery.bnfList[index].bnfCertExpire = val[1]
+      }
+    },
+    // 受益人身份证是否长期
+    checkChange(val,index){
+      console.log(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"];
+
+      } else {
+           this.perSonObj['date'+(index+1)]= [];
+        
+      }
+    },
+    // 添加受益人
+    addPerson(){
+      this.setQuery.bnfList.push(
+        {
+            bnfCertBeginDate: "",
+            bnfCertExpire: "",
+            bnfCertType: "1",
+            bnfCertno: "",
+            bnfName: "",
+            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
+      })
+
+    },
     // 同步信息
     handleCopy(type) {
       if (type == 1) {
@@ -996,12 +1106,12 @@ export default {
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
-          this.checked2 = true;
+          this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
-          this.date2 = this.date1
+          this.perSonObj.date1 = this.date1
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1210,13 +1320,21 @@ export default {
                     bnfHomeAddr: "",
                   },
                 ];
-              }else if (this.setQuery.bnfList[0].bnfCertExpire == "9999-12-31") {
-                this.checked2 = true;
-              } else if (this.setQuery.shareholderCertExpire) {
-                this.date2 = [
-                  this.setQuery.bnfList[0].bnfCertBeginDate,
-                  this.setQuery.bnfList[0].bnfCertExpire
-                ];
+              }else{
+                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)] = [
+                     item.bnfCertBeginDate,
+                     item.bnfCertExpire
+                   ];
+                 }
+                })
               }
 
               // 提取图片

+ 169 - 62
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-03-29 15:40:32
+ * @LastEditTime: 2024-04-12 15:30:04
  * @FilePath: \admin-manage\src\views\operationManage\shopManage\shopAdd4.vue
  * @Description: 
  * 
@@ -74,6 +74,7 @@
           <el-select
             v-model="setQuery.mccCode"
             class="item-width-300"
+            filterable
             placeholder="请选择所属行业"
           >
             <el-option
@@ -346,48 +347,54 @@
 
         <div class="line"></div>
 
-        <div class="title">受益人1</div>
-        <el-form-item label="受益人:" prop="bnfName">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfName"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人姓名"
-          ></el-input>
-          <el-button type="text" class="ml10" @click="handleCopy(2)"
-            >同步股东信息</el-button
-          >
-        </el-form-item>
-        <el-form-item label="身份证号码:" prop="bnfCertno">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfCertno"
-            size="small"
-            :maxlength="18"
-            class="item-width-300"
-            placeholder="请输入受益人身份证号码"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="身份证有效期:" prop="bnfCertExpire">
-           <el-date-picker
-            v-model="date2"
-            :disabled="checked2"
-            size="small"
-            type="daterange"
-            range-separator="至"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          >
-          </el-date-picker>
-          <el-checkbox v-model="checked2">长期</el-checkbox>
-        </el-form-item>
-        <el-form-item label="家庭地址:" prop="legal_idcard_no">
-          <el-input
-            v-model="setQuery.bnfList[0].bnfHomeAddr"
-            size="small"
-            class="item-width-300"
-            placeholder="请输入受益人家庭地址"
-          ></el-input>
+        <div v-for="(item,index) in setQuery.bnfList" :key="index">
+          <div class="title">受益人{{index+1}}</div>
+          <el-form-item label="受益人:" :prop="'bnfList.'+index+'.bnfName'" :rules="{ required: true, message: '请输入受益人', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfName"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人姓名"
+            ></el-input>
+            <el-button type="text" class="ml10" v-if="index == 0" @click="handleCopy(2)"
+              >同步股东信息</el-button
+            >
+          </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="请输入受益人身份证号码"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="身份证有效期:" :prop="'bnfList.'+index+'.bnfCertExpire'" :rules="{ required: true, message: '请输选择身份证有效期', trigger: 'change' }">
+            <el-date-picker
+              v-model="perSonObj['date'+(index+1)]"
+              :disabled="perSonObj['checked'+(index+1)]"
+              size="small"
+              type="daterange"
+              @change="changeTime($event,index)"
+              range-separator="至"
+              value-format="yyyy-MM-dd"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+            <el-checkbox v-model="perSonObj['checked'+(index+1)]" @change="checkChange($event,index)">  长期</el-checkbox>
+          </el-form-item>
+          <el-form-item label="家庭地址:" :prop="'bnfList.'+index+'.bnfHomeAddr'" :rules="{ required: true, message: '请输入家庭地址', trigger: 'blur' }">
+            <el-input
+              v-model="item.bnfHomeAddr"
+              size="small"
+              class="item-width-300"
+              placeholder="请输入受益人家庭地址"
+            ></el-input>
+          </el-form-item>
+        </div>
+        <el-form-item>
+           <el-button @click="addPerson">添加受益人</el-button>
         </el-form-item>
       </template>
 
@@ -592,14 +599,16 @@ export default {
       showMap: false, //地图显示
       checked: false,
       checked1: false,
-      checked2: false,
+      perSonObj:{
+        checked1: false,
+        date1: [],
+      },
       showSign: false, //控制签约按钮页面
       signLoading: false,
       loading: false,
       imgList: [],
       date: [],
       date1: [],
-      date2: [],
       accesseId:'',
       setQuery: {
         accesser_user_id: "",
@@ -635,7 +644,7 @@ export default {
         legal_sex: "1",
         legalmanCareerDesc: "",
         legalmanHomeAddr: "",
-        mccCode: "8041",
+        mccCode: "",
         mchntType: "",
         pic_list: [
           {
@@ -765,6 +774,27 @@ export default {
         agreement: [
           { required: true, message: "请上传租聘协议", trigger: "change" },
         ],
+        shareholderHomeAddr: [
+          { required: true, message: "请输入家庭地址", trigger: "blur" },
+        ],
+        shareholderCertno: [
+          { required: true, message: "请输入身份证号", trigger: "blur" },
+        ],
+        shareholderName: [
+          { required: true, message: "请输入股东姓名", trigger: "blur" },
+        ],
+        // 'bnfList.0.bnfHomeAddr': [
+        //   { required: true, message: "请输入家庭地址", trigger: "blur" },
+        // ],
+        // 'bnfList.0.bnfCertno': [
+        //   { required: true, message: "请输入身份证号", trigger: "blur" },
+        // ],
+        // 'bnfList.0.bnfName': [
+        //   { required: true, message: "请输入受益人", trigger: "blur" },
+        // ],
+        //  'bnfList.0.bnfCertExpire': [
+        //   { required: true, message: "请输选择身份证有效期", trigger: "change" },
+        // ],
         //  bnfList: [
         //   { required: true, message: "请上传租聘协议", trigger: "change" },
         // ],
@@ -905,20 +935,34 @@ export default {
         this.setQuery.legal_card_deadline = val[1];
       }
     },
-    checked1(val) {
-      if (val) {
-        this.setQuery.shareholderCertExpire = "9999-12-31";
+    date1(val) {
+      if (val == null) {
+          this.setQuery.shareholderCertBeginDate = ''
+          this.setQuery.shareholderCertExpire = ''
+
       } else {
-        this.setQuery.shareholderCertExpire = "";
+          this.setQuery.shareholderCertBeginDate = val[0]
+          this.setQuery.shareholderCertExpire = val[1]
       }
     },
-    checked2(val) {
+    checked1(val) {
       if (val) {
-        this.setQuery.bnfCertExpire = "9999-12-31";
+        this.setQuery.shareholderCertBeginDate = "9999-12-31";
+        this.setQuery.shareholderCertExpire = "9999-12-31";
+          this.date1 = ["9999-12-31", "9999-12-31"];
+        
       } else {
-        this.setQuery.bnfCertExpire = "";
+           this.date1 = [];
+
       }
     },
+    // checked2(val) {
+    //   if (val) {
+    //     this.setQuery.bnfCertExpire = "9999-12-31";
+    //   } else {
+    //     this.setQuery.bnfCertExpire = "";
+    //   }
+    // },
 
     "setQuery.bank_province_id": function (val, old) {
       if (val) {
@@ -935,15 +979,27 @@ export default {
         //创建地址解析器实例
         var myGeo = new BMapGL.Geocoder();
         that.marker ? that.map.removeOverlay(that.marker) : "";
+
         // 将地址解析结果显示在地图上,并调整地图视野
         myGeo.getPoint(
           val,
           function (point) {
+            console.log(point);
             if (point) {
               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.province = result.addressComponents.province;
+                      that.city = result.addressComponents.city;
+                      that.district = result.addressComponents.district;
+                    }      
+                });
               }
             }
           },
@@ -953,6 +1009,49 @@ export default {
     }),
   },
   methods: {
+    changeTime(val,index){
+      console.log(val,index);
+      if (val == null) {
+        this.setQuery.bnfList[index].bnfCertBeginDate = ''
+         this.setQuery.bnfList[index].bnfCertExpire = ''
+      } else {
+         this.setQuery.bnfList[index].bnfCertBeginDate = val[0]
+         this.setQuery.bnfList[index].bnfCertExpire = val[1]
+      }
+    },
+    // 受益人身份证是否长期
+    checkChange(val,index){
+      console.log(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"];
+
+      } else {
+           this.perSonObj['date'+(index+1)]= [];
+        
+      }
+    },
+    // 添加受益人
+    addPerson(){
+      this.setQuery.bnfList.push(
+        {
+            bnfCertBeginDate: "",
+            bnfCertExpire: "",
+            bnfCertType: "1",
+            bnfCertno: "",
+            bnfName: "",
+            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
+      })
+
+    },
     // 同步信息
     handleCopy(type) {
       if (type == 1) {
@@ -967,12 +1066,12 @@ export default {
         this.setQuery.shareholderName = this.setQuery.legal_name;
       } else {
         if (this.setQuery.legal_card_deadline == "9999-12-31") {
-          this.checked2 = true;
+          this.perSonObj.checked1 = true;
         } else {
           // this.setQuery.bnfList[0].bnfCertExpire =
           //   this.setQuery.legal_card_deadline;
         }
-          this.date2 = this.date1
+          this.perSonObj.date1 = this.date1
         this.setQuery.bnfList[0].bnfCertExpire =this.setQuery.shareholderCertExpire;
         this.setQuery.bnfList[0].bnfCertno = this.setQuery.shareholderCertno;
         this.setQuery.bnfList[0].bnfHomeAddr = this.setQuery.shareholderHomeAddr;
@@ -1181,13 +1280,21 @@ export default {
                     bnfHomeAddr: "",
                   },
                 ];
-              }else if (this.setQuery.bnfList[0].bnfCertExpire == "9999-12-31") {
-                this.checked2 = true;
-              } else if (this.setQuery.shareholderCertExpire) {
-                this.date2 = [
-                  this.setQuery.bnfList[0].bnfCertBeginDate,
-                  this.setQuery.bnfList[0].bnfCertExpire
-                ];
+              }else{
+                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)] = [
+                     item.bnfCertBeginDate,
+                     item.bnfCertExpire
+                   ];
+                 }
+                })
               }
 
               // 提取图片

+ 4 - 4
src/views/studyManage/courseManage/addCourse.vue

@@ -135,7 +135,7 @@
 
 <script>
 import Upload from '@/components/Upload'
-import {addOrUpdateCourse,getData,courseDetail} from '@/api/study'
+import {addOrUpdateCourse,getAllColumn,courseDetail} from '@/api/study'
 import { requestUploadImg, finishUploadImg } from '@/api/common';
 import OSS from "ali-oss";
 export default {
@@ -288,8 +288,8 @@ export default {
       this.setQuery[val.type] = val.url
     },
     // 获取栏目
-    getData() {
-      getData().then((res) => {
+    getAllColumn() {
+      getAllColumn().then((res) => {
         if (res.state == "Success") {
           res.content.map((item) => {
             this.options.push({
@@ -352,7 +352,7 @@ export default {
     }
   },
   created () {
-    this.getData()
+    this.getAllColumn()
     this.mode = this.$route.query.mode
     if(this.$route.query.mode == 'edit' || this.$route.query.mode == 'detail'){
         this.courseDetail()

+ 4 - 4
src/views/studyManage/courseManage/index.vue

@@ -118,7 +118,7 @@
   
   <script>
   import {debounce} from '@/utils/index'
-  import {courseList,operateByState,operateByStatus,delCourse,getData} from '@/api/study'
+  import {courseList,operateByState,operateByStatus,delCourse,getAllColumn} from '@/api/study'
 export default {
   name: "courseManage",
   data() {
@@ -291,8 +291,8 @@ export default {
       })
     },
     // 获取栏目
-    getData() {
-      getData().then((res) => {
+    getAllColumn() {
+      getAllColumn().then((res) => {
         if (res.state == "Success") {
           res.content.map((item) => {
             this.options.push({
@@ -306,7 +306,7 @@ export default {
   },
   created() {
    this.courseList()
-   this.getData()
+   this.getAllColumn()
   },
 };
 </script>

+ 4 - 4
src/views/studyManage/questionBankManage/editQuestions.vue

@@ -132,7 +132,7 @@
 
 <script>
 import Upload from "@/components/Upload";
-import { addOrUpdateQuestions, getTestList, getData,delQuestions,setResult,getResult } from "@/api/study";
+import { addOrUpdateQuestions, getTestList, getAllColumn,delQuestions,setResult,getResult } from "@/api/study";
 export default {
   components: {
     Upload,
@@ -225,8 +225,8 @@ export default {
             questionsName: row.questionsName,
         };
     },
-    getData() {
-      getData().then((res) => {
+    getAllColumn() {
+      getAllColumn().then((res) => {
         if (res.state == "Success") {
           res.content.map((item) => {
             this.options.push({
@@ -313,7 +313,7 @@ export default {
     this.title = sessionStorage.getItem("questionsTitle");
     this.result.paperId = this.$route.query.id
     this.getTestList();
-    this.getData();
+    this.getAllColumn();
   },
 };
 </script>

+ 2 - 2
vue.config.js

@@ -6,7 +6,7 @@ const webpack = require('webpack')
 const CompressionWebpackPlugin = require('compression-webpack-plugin')//这个插件可以看官网还是很好用的
 const productionGzipExtensions = ['js', 'css']//对什么文件进行压缩
 const Timestamp = new Date().getTime();//防止http的缓存每次打包用时间戳进行区分
-const url = require('./src/utils/config.js');
+const {BASE_URL }= require('./src/utils/config.js');
 
 function resolve(dir) {
   return path.join(__dirname, dir)
@@ -54,7 +54,7 @@ module.exports = {
       // },
       '^/api': {
         // target: 'http://192.168.110.153:9002/',//代理
-        target: url.BASE_URL,//代理
+        target: BASE_URL,//代理
         changeOrigin: true,//是否跨域
         pathRewrite: {
           '^/api': ''