Преглед на файлове

Merge branch 'feature_20251114_主管任务经销商单选&门店题型' into uat(dev)

sunny преди 1 седмица
родител
ревизия
73e42f7ca2
променени са 3 файла, в които са добавени 149 реда и са изтрити 426 реда
  1. 6 4
      src/views/week/VisitSummaryAdd.vue
  2. 67 182
      src/views/week/allowWriteAgainSummary.vue
  3. 76 240
      src/views/week/componVisitSummary.vue

+ 6 - 4
src/views/week/VisitSummaryAdd.vue

@@ -219,7 +219,7 @@
                   </el-popover>
                 </div>
               </div>
-              <div class="addJXS"><van-icon name="add-o" size="24" @click="addJXSorMD(item)" /></div>
+              <div class="addJXS"><van-icon name="add-o" size="24" @click="addJXSorMD(item,index)" /></div>
               <div class="tips">{{ item.remark }}</div>
             </div>
           </div>
@@ -428,6 +428,7 @@ export default {
       storeTypeShow: false,
       storeType: null,
       agentValue: '',
+      selectIndex: 0,
       chainsData: [],
       storesData: [],
       chainName: '',
@@ -1023,7 +1024,8 @@ export default {
       this.EndTimeShow = false;
     },
     // 添加经销商或者门店
-    addJXSorMD(val) {
+    addJXSorMD(val,index) {
+      this.selectIndex = index;
       let answerType = val.answerType;
       let dataList =  [];
       if(answerType == 'jxs'){
@@ -1094,7 +1096,7 @@ export default {
     },
     onConfirmChainsList(value) {
       if (value && value.chainName != undefined) {
-        let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
+        let JXSSataList = this.collectionItemList.find((item,index) => item.answerType == 'jxs' && index == this.selectIndex);
         if (!JXSSataList.chainList){
           JXSSataList.chainList = [];
         }
@@ -1112,7 +1114,7 @@ export default {
     },
     onConfirmStoresList(value) {
       if (value && value.storeName != undefined) {
-        let MDSataList = this.collectionItemList.find((item) => item.answerType == 'md');
+        let MDSataList = this.collectionItemList.find((item,index) => item.answerType == 'md' && index == this.selectIndex);
         if (!MDSataList.storeList) {
           MDSataList.storeList = [];
         }

+ 67 - 182
src/views/week/allowWriteAgainSummary.vue

@@ -12,12 +12,8 @@
             </template>
           </van-cell>
           <!-- allowWriteAgain 是否允许补填 true/false -->
-          <van-field
-            v-model="item.answerValue"
-            :placeholder="item.remark"
-            type="number"
-            :disabled="!item.allowWriteAgain"
-            @input="numberFn(item, index)"></van-field>
+          <van-field v-model="item.answerValue" :placeholder="item.remark" type="number"
+            :disabled="!item.allowWriteAgain" @input="numberFn(item, index)"></van-field>
           <!-- <p
             v-if="item.allowWriteAgain"
             style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
@@ -32,16 +28,9 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            v-model="item.answerValue"
-            clickable
-            name="calendar"
-            placeholder="点击选择日期"
-            readonly
-            :disabled="!item.allowWriteAgain"
-            @click="showCalendarClick(item, index)" />
-          <p
-            v-if="item.allowWriteAgain"
+          <van-field v-model="item.answerValue" clickable name="calendar" placeholder="点击选择日期" readonly
+            :disabled="!item.allowWriteAgain" @click="showCalendarClick(item, index)" />
+          <p v-if="item.allowWriteAgain"
             style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
             {{ item.remark }}
           </p>
@@ -58,21 +47,11 @@
             <p v-if="item.allowWriteAgain" style="margin-top: 0">
               <span style="font-size: 12px; color: #888">{{ item.remark }}</span>
             </p>
-            <delete-upload-img
-              :isDelete="false"
-              :imgs="item.fileInfoList"
+            <delete-upload-img :isDelete="false" :imgs="item.fileInfoList"
               :isEdit="item.allowWriteAgain"></delete-upload-img>
-            <upload-img
-              v-if="item.allowWriteAgain"
-              :uploadid="uploadid2"
-              @newimgarr="newimgarr1"
-              imgText="上传照片"
-              :indexImg="index"
-              :customId="item.customId"
-              :summaryId="item.summaryId"
-              :allowWriteAgain="item.allowWriteAgain"
-              :item="item"
-              @click="imgClick(item, index)"></upload-img>
+            <upload-img v-if="item.allowWriteAgain" :uploadid="uploadid2" @newimgarr="newimgarr1" imgText="上传照片"
+              :indexImg="index" :customId="item.customId" :summaryId="item.summaryId"
+              :allowWriteAgain="item.allowWriteAgain" :item="item" @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
         <div v-if="item.answerType == 'wb'" class="formLabel z-cell">
@@ -83,32 +62,23 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            :disabled="!item.allowWriteAgain"
-            v-model="item.answerValue"
-            :formatter="formatter"
-            autosize
-            type="textarea"
-            :placeholder="item.remark"></van-field>
+          <van-field :disabled="!item.allowWriteAgain" v-model="item.answerValue" :formatter="formatter" autosize
+            type="textarea" :placeholder="item.remark"></van-field>
           <!-- <p
             v-if="item.allowWriteAgain"
             style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
             {{ item.remark }}
           </p> -->
         </div>
-        <div
-          class="formLabel z-cell z-cells z-celly"
+        <div class="formLabel z-cell z-cells z-celly"
           v-if="item.answerType == 'gs' || item.answerType == 'dq' || item.answerType == 'xsb'">
           <van-cell>
             <template #title>
               {{ 1 + index + '.' }}
               {{ item.customName }}
-              <span
-                v-if="item.allowWriteAgain"
-                style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right"
-                >{{ item.remark }}</span
-              ></template
-            >
+              <span v-if="item.allowWriteAgain"
+                style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">{{ item.remark
+                }}</span></template>
           </van-cell>
           <p class="mg0">{{ item.answerName }}</p>
         </div>
@@ -120,13 +90,8 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <z-checkbox
-            :disabled="!item.allowWriteAgain"
-            :answerType="item.answerType"
-            :checkboxval="item.answerValue"
-            :collectionType="item.customOptionList"
-            :textc="item.customId"
-            :zCheckboxcolumns="item.customOptionList"
+          <z-checkbox :disabled="!item.allowWriteAgain" :answerType="item.answerType" :checkboxval="item.answerValue"
+            :collectionType="item.customOptionList" :textc="item.customId" :zCheckboxcolumns="item.customOptionList"
             @zSelectVal="zSelectVal"></z-checkbox>
         </div>
         <div v-if="item.answerType == 'dx'" class="formLabel z-cell">
@@ -137,16 +102,11 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <z-radio
-            :disabled="!item.allowWriteAgain"
-            :answerType="item.answerType"
-            :collectionType="item.collectionType"
-            :radio="item.answerValue"
-            :textc="item.customId"
-            :zRadiocolumns="item.customOptionList"
+          <z-radio :disabled="!item.allowWriteAgain" :answerType="item.answerType" :collectionType="item.collectionType"
+            :radio="item.answerValue" :textc="item.customId" :zRadiocolumns="item.customOptionList"
             @zSelectVal="zSelectVal"></z-radio>
         </div>
-        <div v-if="item.answerType == 'jxs'" class="formLabel z-cell">
+        <div v-if="item.answerType == 'jxs' || item.answerType == 'md'" class="formLabel z-cell">
           <van-cell>
             <template #title>
               <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -155,137 +115,66 @@
             </template>
           </van-cell>
           <div class="jxsBox">
-            <div class="jxsContent">
+            <div class="jxsContent" v-if="item.answerType == 'jxs'">
               <div class="item" v-for="(val, index) in item.chainList" :key="index">
-                <el-popover
-                  placement="bottom"
-                  trigger="click"
-                  :content="val.chainName + '(' + val.chainCode + ')'">
+                <el-popover placement="bottom" trigger="click" :content="val.chainName + '(' + val.chainCode + ')'">
                   <template slot="reference">
                     <div class="selectItem">{{ val.chainName }} &nbsp; ({{ val.chainCode }})</div>
-                    <van-icon
-                      name="clear"
-                      size="16"
-                      @click="closeJXSorMD(item, index)"
-                      v-if="item.allowWriteAgain" />
+                    <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
                   </template>
                 </el-popover>
               </div>
             </div>
-            <div class="addJXS">
-              <van-icon name="add-o" size="24" @click="addJXSorMD(item)" v-if="item.allowWriteAgain" />
-            </div>
-            <div class="tips" v-if="item.allowWriteAgain">{{ item.remark }}</div>
-          </div>
-        </div>
-        <div v-if="item.answerType == 'md'" class="formLabel z-cell">
-          <van-cell>
-            <template #title>
-              <span v-if="item.isMust == 0" class="van-f-red">*</span>
-              {{ 1 + index + '.' }}
-              {{ item.customName }}
-            </template>
-          </van-cell>
-          <div class="jxsBox">
-            <div class="jxsContent">
+            <div class="jxsContent" v-if="item.answerType == 'md'">
               <div class="item" v-for="(val, index) in item.storeList" :key="index">
-                <el-popover
-                  placement="bottom"
-                  trigger="click"
-                  :content="val.storeName + '(' + val.storeCode + ')'">
+                <el-popover placement="bottom" trigger="click" :content="val.storeName + '(' + val.storeCode + ')'">
                   <template slot="reference">
                     <div class="selectItem">{{ val.storeName }} &nbsp; ({{ val.storeCode }})</div>
-                    <van-icon
-                      name="clear"
-                      size="16"
-                      @click="closeJXSorMD(item, index)"
-                      v-if="item.allowWriteAgain" />
+                    <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
                   </template>
                 </el-popover>
               </div>
             </div>
-            <div class="addJXS">
-              <van-icon name="add-o" size="24" @click="addJXSorMD(item)" v-if="item.allowWriteAgain" />
-            </div>
-            <div class="tips" v-if="item.allowWriteAgain">{{ item.remark }}</div>
+            <div class="addJXS"><van-icon name="add-o" size="24" @click="addJXSorMD(item, index)" /></div>
+            <div class="tips">{{ item.remark }}</div>
           </div>
         </div>
         <br />
       </div>
     </van-form>
-    <van-calendar
-      v-model="showCalendar"
-      @confirm="onConfirm"
-      color="#0057ba"
-      :min-date="minDate"
-      :max-date="maxDate"
+    <van-calendar v-model="showCalendar" @confirm="onConfirm" color="#0057ba" :min-date="minDate" :max-date="maxDate"
       :show-confirm="false" />
     <van-popup v-model="RegionShow" capture position="bottom">
-      <van-picker
-        :columns="companyList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="RegionShow = false"
+      <van-picker :columns="companyList" show-toolbar value-key="deptName" @cancel="RegionShow = false"
         @confirm="onregionConfirm" />
     </van-popup>
     <van-popup v-model="SalesRegionShow" capture position="bottom">
-      <van-picker
-        :columns="regionList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="SalesRegionShow = false"
+      <van-picker :columns="regionList" show-toolbar value-key="deptName" @cancel="SalesRegionShow = false"
         @confirm="onSalesRegionConfirm" />
     </van-popup>
     <van-popup v-model="SalesDepartmentShow" capture position="bottom">
-      <van-picker
-        :columns="deptList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="SalesDepartmentShow = false"
+      <van-picker :columns="deptList" show-toolbar value-key="deptName" @cancel="SalesDepartmentShow = false"
         @confirm="onSalesDepartmentConfirm" />
     </van-popup>
     <van-popup v-model="StartTimeShow" capture position="bottom">
-      <van-datetime-picker
-        v-model="strtcurrentDate"
-        :max-date="strtmaxDate"
-        :min-date="strtminDate"
-        title="选择查找开始时间"
-        type="date"
-        @cancel="StartTimeShow = false"
-        @confirm="onStartTimeConfirm" />
+      <van-datetime-picker v-model="strtcurrentDate" :max-date="strtmaxDate" :min-date="strtminDate" title="选择查找开始时间"
+        type="date" @cancel="StartTimeShow = false" @confirm="onStartTimeConfirm" />
     </van-popup>
     <van-popup v-model="EndTimeShow" capture position="bottom">
-      <van-datetime-picker
-        v-model="endcurrentDate"
-        :max-date="endmaxDate"
-        :min-date="endminDate"
-        title="选择查找结束时间"
-        type="date"
-        @cancel="EndTimeShow = false"
-        @confirm="onEndTimeConfirm" />
+      <van-datetime-picker v-model="endcurrentDate" :max-date="endmaxDate" :min-date="endminDate" title="选择查找结束时间"
+        type="date" @cancel="EndTimeShow = false" @confirm="onEndTimeConfirm" />
     </van-popup>
     <!-- 经销商 -->
     <van-popup v-model="moreTypeShow" position="bottom">
       <van-row style="background-color: #f5f5f5">
         <van-col span="20">
-          <van-field
-            left-icon="search"
-            style="margin-top: 2px; border-radius: 6px; overflow: hidden"
-            v-model="agentValue"
-            label=""
-            placeholder="请输入关键词"
-            clearable />
+          <van-field left-icon="search" style="margin-top: 2px; border-radius: 6px; overflow: hidden"
+            v-model="agentValue" label="" placeholder="请输入关键词" clearable />
         </van-col>
-        <van-col
-          span="4"
-          style="text-align: center; line-height: 48px"
-          @click="getChainsList(agentValue)">
+        <van-col span="4" style="text-align: center; line-height: 48px" @click="getChainsList(agentValue)">
           <div style="background-color: #0057ba; color: #fff">搜索</div>
         </van-col>
       </van-row>
-      <div class="tips">
-        <div><van-icon name="warning-o" />默认显示前100条,请输入关键词查询</div>
-      </div>
       <van-picker
         show-toolbar
         :columns="chainsData"
@@ -297,26 +186,14 @@
     <van-popup v-model="storeTypeShow" position="bottom">
       <van-row style="background-color: #f5f5f5">
         <van-col span="20">
-          <van-field
-            left-icon="search"
-            style="margin-top: 2px; border-radius: 6px; overflow: hidden"
-            v-model="agentValue"
-            label=""
-            placeholder="请输入门店名称/编号/地址搜索"
-            clearable />
+          <van-field left-icon="search" style="margin-top: 2px; border-radius: 6px; overflow: hidden"
+            v-model="agentValue" label="" placeholder="请输入门店名称/编号/地址搜索" clearable />
         </van-col>
-        <van-col
-          span="4"
-          style="text-align: center; line-height: 48px"
-          @click="getStoresList(agentValue)">
+        <van-col span="4" style="text-align: center; line-height: 48px" @click="getStoresList(agentValue)">
           <div style="background-color: #0057ba; color: #fff">搜索</div>
         </van-col>
       </van-row>
-      <van-picker
-        show-toolbar
-        :columns="storesData"
-        value-key="storeName"
-        @confirm="onConfirmStoresList"
+      <van-picker show-toolbar :columns="storesData" value-key="storeName" @confirm="onConfirmStoresList"
         @cancel="storeTypeShow = false" />
     </van-popup>
   </div>
@@ -404,6 +281,7 @@ export default {
       storeTypeShow: false,
       storeType: null,
       agentValue: '',
+      selectIndex: 0,
       chainsData: [],
       storesData: [],
       chainName: '',
@@ -504,7 +382,7 @@ export default {
     dateFn(val) {
       return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
     },
-    onLoad() {},
+    onLoad() { },
     onSubmit() {
       for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
         for (var b = 0; b < this.collectionItemList.length; b++) {
@@ -857,35 +735,36 @@ export default {
       this.EndTimeShow = false;
     },
     // 添加经销商或者门店
-    addJXSorMD(val) {
+    addJXSorMD(val,index) {
+      this.selectIndex = index;
       let answerType = val.answerType;
-      let dataList =  [];
-      if(answerType == 'jxs'){
-          dataList = val.chainList ? val.chainList : [];
-      }else if(answerType == 'md'){
-          dataList = val.storeList ? val.storeList : [];
+      let dataList = [];
+      if (answerType == 'jxs') {
+        dataList = val.chainList ? val.chainList : [];
+      } else if (answerType == 'md') {
+        dataList = val.storeList ? val.storeList : [];
       }
       const isExceedLimit = dataList.length >= val.maxValue;
       if (val.maxValue !== null && isExceedLimit) {
         this.$toast('超过最大限制!');
       } else {
         this.agentValue = '';
-        if(answerType == 'jxs'){
+        if (answerType == 'jxs') {
           this.moreTypeShow = true;
           this.getChainsList();
-        }else if(answerType == 'md'){
+        } else if (answerType == 'md') {
           this.storeTypeShow = true;
           this.storeType = val.storeType;
           this.getStoresList();
         }
-        
+
       }
     },
     // 删除经销商或者门店
     closeJXSorMD(item, index) {
-      if(item.answerType == 'jxs'){
+      if (item.answerType == 'jxs') {
         item.chainList.splice(index, 1);
-      }else if(item.answerType == 'md'){
+      } else if (item.answerType == 'md') {
         item.storeList.splice(index, 1);
       }
     },
@@ -928,7 +807,7 @@ export default {
     },
     onConfirmChainsList(value) {
       if (value && value.chainName != undefined) {
-        let JXSSataList = this.collectionItemList.find((item) => item.answerType == 'jxs');
+        let JXSSataList = this.collectionItemList.find((item,index) => item.answerType == 'jxs' && index == this.selectIndex);
         if (!JXSSataList.chainList) {
           JXSSataList.chainList = [];
         }
@@ -946,7 +825,7 @@ export default {
     },
     onConfirmStoresList(value) {
       if (value && value.storeName != undefined) {
-        let MDSataList = this.collectionItemList.find((item) => item.answerType == 'md');
+        let MDSataList = this.collectionItemList.find((item,index) => item.answerType == 'md' && index == this.selectIndex);
         if (!MDSataList.storeList) {
           MDSataList.storeList = [];
         }
@@ -1017,6 +896,7 @@ export default {
   .z-cell .van-cell__title {
     font-size: 16px;
   }
+
   .van-form {
     background-color: white;
   }
@@ -1026,15 +906,18 @@ export default {
 .jxsBox {
   .jxsContent {
     margin-bottom: 10px;
+
     .item {
       padding: 5px;
       background: #e9e9e9;
       margin: 5px 0;
+
       .el-popover__reference-wrapper {
         display: flex;
         justify-content: space-between;
         align-items: center;
       }
+
       .selectItem {
         flex: 1;
         white-space: nowrap;
@@ -1044,10 +927,12 @@ export default {
       }
     }
   }
+
   .tips {
     text-align: right;
   }
 }
+
 .table-headermd {
   font-size: 12px;
   text-align: center;
@@ -1077,12 +962,12 @@ export default {
   height: 100%;
 }
 
-.table-headermd th.el-table__cell > .cell {
+.table-headermd th.el-table__cell>.cell {
   padding: 0 4px;
   text-align: center;
 }
 
-.table-headermd th.el-table__cell:first-child > .cell {
+.table-headermd th.el-table__cell:first-child>.cell {
   text-align: left;
 }
 

+ 76 - 240
src/views/week/componVisitSummary.vue

@@ -11,12 +11,8 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            v-model="item.answerValue"
-            :placeholder="item.remark"
-            type="number"
-            @input="numberFn(item, index)"
-          ></van-field>
+          <van-field v-model="item.answerValue" :placeholder="item.remark" type="number"
+            @input="numberFn(item, index)"></van-field>
           <!-- <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
             {{ item.remark }}
           </p> -->
@@ -29,23 +25,15 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            v-model="item.answerValue"
-            clickable
-            name="calendar"
-            placeholder="点击选择日期"
-            readonly
-            @click="showCalendarClick(index)"
-          />
-          <p
-            style="
+          <van-field v-model="item.answerValue" clickable name="calendar" placeholder="点击选择日期" readonly
+            @click="showCalendarClick(index)" />
+          <p style="
               color: #444;
               font-size: 12px;
               margin: 0;
               padding: 10px 0;
               text-align: right;
-            "
-          >
+            ">
             {{ item.remark }}
           </p>
         </div>
@@ -63,20 +51,10 @@
                 item.remark
               }}</span>
             </p>
-            <delete-upload-img
-              :isDelete="false"
-              :imgs="item.fileInfoList"
-            ></delete-upload-img>
-            <upload-img
-              :uploadid="uploadid2"
-              @newimgarr="newimgarr1"
-              imgText="上传照片"
-              :indexImg="index"
-              :customId="item.customId"
-              :summaryId="item.summaryId"
-              :item="item"
-              @click="imgClick(item, index)"
-            ></upload-img>
+            <delete-upload-img :isDelete="false" :imgs="item.fileInfoList"></delete-upload-img>
+            <upload-img :uploadid="uploadid2" @newimgarr="newimgarr1" imgText="上传照片" :indexImg="index"
+              :customId="item.customId" :summaryId="item.summaryId" :item="item"
+              @click="imgClick(item, index)"></upload-img>
           </van-row>
         </div>
         <div v-if="item.answerType == 'wb'" class="formLabel z-cell">
@@ -87,22 +65,13 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            v-model="item.answerValue"
-            :formatter="formatter"
-            autosize
-            type="textarea"
-            :placeholder="item.remark"
-          ></van-field>
+          <van-field v-model="item.answerValue" :formatter="formatter" autosize type="textarea"
+            :placeholder="item.remark"></van-field>
           <!-- <p style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
             {{ item.remark }}
           </p> -->
         </div>
-        <div
-          v-if="item.answerType == 'gs'"
-          class="formLabel z-cell"
-          @click="regionClick(index)"
-        >
+        <div v-if="item.answerType == 'gs'" class="formLabel z-cell" @click="regionClick(index)">
           <van-cell>
             <template #title>
               <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -110,29 +79,19 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            readonly
-            v-model="item.answerName"
-            :formatter="formatter"
-            :placeholder="item.customName"
-          ></van-field>
-          <p
-            style="
+          <van-field readonly v-model="item.answerName" :formatter="formatter"
+            :placeholder="item.customName"></van-field>
+          <p style="
               color: #444;
               font-size: 12px;
               margin: 0;
               padding: 10px 0;
               text-align: right;
-            "
-          >
+            ">
             {{ item.remark }}
           </p>
         </div>
-        <div
-          v-if="item.answerType == 'dq'"
-          class="formLabel z-cell"
-          @click="SalesRegionClick(index)"
-        >
+        <div v-if="item.answerType == 'dq'" class="formLabel z-cell" @click="SalesRegionClick(index)">
           <van-cell>
             <template #title>
               <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -140,29 +99,19 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            readonly
-            v-model="item.answerName"
-            :formatter="formatter"
-            :placeholder="item.customName"
-          ></van-field>
-          <p
-            style="
+          <van-field readonly v-model="item.answerName" :formatter="formatter"
+            :placeholder="item.customName"></van-field>
+          <p style="
               color: #444;
               font-size: 12px;
               margin: 0;
               padding: 10px 0;
               text-align: right;
-            "
-          >
+            ">
             {{ item.remark }}
           </p>
         </div>
-        <div
-          v-if="item.answerType == 'xsb'"
-          class="formLabel z-cell"
-          @click="SalesDepartmentClick(index)"
-        >
+        <div v-if="item.answerType == 'xsb'" class="formLabel z-cell" @click="SalesDepartmentClick(index)">
           <van-cell>
             <template #title>
               <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -170,21 +119,15 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <van-field
-            readonly
-            v-model="item.answerName"
-            :formatter="formatter"
-            :placeholder="item.customName"
-          ></van-field>
-          <p
-            style="
+          <van-field readonly v-model="item.answerName" :formatter="formatter"
+            :placeholder="item.customName"></van-field>
+          <p style="
               color: #444;
               font-size: 12px;
               margin: 0;
               padding: 10px 0;
               text-align: right;
-            "
-          >
+            ">
             {{ item.remark }}
           </p>
         </div>
@@ -196,14 +139,9 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <z-checkbox
-            :answerType="item.answerType"
-            :checkboxval="item.answerValue"
-            :collectionType="item.customOptionList"
-            :textc="item.customId"
-            :zCheckboxcolumns="item.customOptionList"
-            @zSelectVal="zSelectVal"
-          ></z-checkbox>
+          <z-checkbox :answerType="item.answerType" :checkboxval="item.answerValue"
+            :collectionType="item.customOptionList" :textc="item.customId" :zCheckboxcolumns="item.customOptionList"
+            @zSelectVal="zSelectVal"></z-checkbox>
         </div>
         <div v-if="item.answerType == 'dx'" class="formLabel z-cell">
           <van-cell>
@@ -213,19 +151,10 @@
               {{ item.customName }}
             </template>
           </van-cell>
-          <z-radio
-            :answerType="item.answerType"
-            :collectionType="item.collectionType"
-            :radio="item.answerValue"
-            :textc="item.customId"
-            :zRadiocolumns="item.customOptionList"
-            @zSelectVal="zSelectVal"
-          ></z-radio>
+          <z-radio :answerType="item.answerType" :collectionType="item.collectionType" :radio="item.answerValue"
+            :textc="item.customId" :zRadiocolumns="item.customOptionList" @zSelectVal="zSelectVal"></z-radio>
         </div>
-        <div
-          v-if="item.answerType == 'jxs' || item.answerType == 'md'"
-          class="formLabel z-cell"
-        >
+        <div v-if="item.answerType == 'jxs' || item.answerType == 'md'" class="formLabel z-cell">
           <van-cell>
             <template #title>
               <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -235,55 +164,31 @@
           </van-cell>
           <div class="jxsBox">
             <div class="jxsContent" v-if="item.answerType == 'jxs'">
-              <div
-                class="item"
-                v-for="(val, index) in item.chainList"
-                :key="index"
-              >
-                <el-popover
-                  placement="bottom"
-                  trigger="click"
-                  :content="val.chainName + '(' + val.chainCode + ')'"
-                >
+              <div class="item" v-for="(val, index) in item.chainList" :key="index">
+                <el-popover placement="bottom" trigger="click" :content="val.chainName + '(' + val.chainCode + ')'">
                   <template slot="reference">
                     <div class="selectItem">
                       {{ val.chainName }} &nbsp; ({{ val.chainCode }})
                     </div>
-                    <van-icon
-                      name="clear"
-                      size="16"
-                      @click="closeJXSorMD(item, index)"
-                    />
+                    <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
                   </template>
                 </el-popover>
               </div>
             </div>
             <div class="jxsContent" v-if="item.answerType == 'md'">
-              <div
-                class="item"
-                v-for="(val, index) in item.storeList"
-                :key="index"
-              >
-                <el-popover
-                  placement="bottom"
-                  trigger="click"
-                  :content="val.storeName + '(' + val.storeCode + ')'"
-                >
+              <div class="item" v-for="(val, index) in item.storeList" :key="index">
+                <el-popover placement="bottom" trigger="click" :content="val.storeName + '(' + val.storeCode + ')'">
                   <template slot="reference">
                     <div class="selectItem">
                       {{ val.storeName }} &nbsp; ({{ val.storeCode }})
                     </div>
-                    <van-icon
-                      name="clear"
-                      size="16"
-                      @click="closeJXSorMD(item, index)"
-                    />
+                    <van-icon name="clear" size="16" @click="closeJXSorMD(item, index)" />
                   </template>
                 </el-popover>
               </div>
             </div>
             <div class="addJXS">
-              <van-icon name="add-o" size="24" @click="addJXSorMD(item)" />
+              <van-icon name="add-o" size="24" @click="addJXSorMD(item, index)" />
             </div>
             <div class="tips">{{ item.remark }}</div>
           </div>
@@ -291,126 +196,55 @@
         </div>
       </div>
     </van-form>
-    <van-calendar
-      v-model="showCalendar"
-      @confirm="onConfirm"
-      color="#0057ba"
-      :min-date="minDate"
-      :max-date="maxDate"
-      :show-confirm="false"
-    />
+    <van-calendar v-model="showCalendar" @confirm="onConfirm" color="#0057ba" :min-date="minDate" :max-date="maxDate"
+      :show-confirm="false" />
     <van-popup v-model="RegionShow" capture position="bottom">
-      <van-picker
-        :columns="companyList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="RegionShow = false"
-        @confirm="onregionConfirm"
-      />
+      <van-picker :columns="companyList" show-toolbar value-key="deptName" @cancel="RegionShow = false"
+        @confirm="onregionConfirm" />
     </van-popup>
     <van-popup v-model="SalesRegionShow" capture position="bottom">
-      <van-picker
-        :columns="regionList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="SalesRegionShow = false"
-        @confirm="onSalesRegionConfirm"
-      />
+      <van-picker :columns="regionList" show-toolbar value-key="deptName" @cancel="SalesRegionShow = false"
+        @confirm="onSalesRegionConfirm" />
     </van-popup>
     <van-popup v-model="SalesDepartmentShow" capture position="bottom">
-      <van-picker
-        :columns="deptList"
-        show-toolbar
-        value-key="deptName"
-        @cancel="SalesDepartmentShow = false"
-        @confirm="onSalesDepartmentConfirm"
-      />
+      <van-picker :columns="deptList" show-toolbar value-key="deptName" @cancel="SalesDepartmentShow = false"
+        @confirm="onSalesDepartmentConfirm" />
     </van-popup>
     <van-popup v-model="StartTimeShow" capture position="bottom">
-      <van-datetime-picker
-        v-model="strtcurrentDate"
-        :max-date="strtmaxDate"
-        :min-date="strtminDate"
-        title="选择查找开始时间"
-        type="date"
-        @cancel="StartTimeShow = false"
-        @confirm="onStartTimeConfirm"
-      />
+      <van-datetime-picker v-model="strtcurrentDate" :max-date="strtmaxDate" :min-date="strtminDate" title="选择查找开始时间"
+        type="date" @cancel="StartTimeShow = false" @confirm="onStartTimeConfirm" />
     </van-popup>
     <van-popup v-model="EndTimeShow" capture position="bottom">
-      <van-datetime-picker
-        v-model="endcurrentDate"
-        :max-date="endmaxDate"
-        :min-date="endminDate"
-        title="选择查找结束时间"
-        type="date"
-        @cancel="EndTimeShow = false"
-        @confirm="onEndTimeConfirm"
-      />
+      <van-datetime-picker v-model="endcurrentDate" :max-date="endmaxDate" :min-date="endminDate" title="选择查找结束时间"
+        type="date" @cancel="EndTimeShow = false" @confirm="onEndTimeConfirm" />
     </van-popup>
     <!-- 经销商 -->
     <van-popup v-model="moreTypeShow" position="bottom">
       <van-row style="background-color: #f5f5f5">
         <van-col span="20">
-          <van-field
-            left-icon="search"
-            style="margin-top: 2px; border-radius: 6px; overflow: hidden"
-            v-model="agentValue"
-            label=""
-            placeholder="请输入关键词"
-            clearable
-          />
+          <van-field left-icon="search" style="margin-top: 2px; border-radius: 6px; overflow: hidden"
+            v-model="agentValue" label="" placeholder="请输入关键词" clearable />
         </van-col>
-        <van-col
-          span="4"
-          style="text-align: center; line-height: 48px"
-          @click="getChainsList(agentValue)"
-        >
+        <van-col span="4" style="text-align: center; line-height: 48px" @click="getChainsList(agentValue)">
           <div style="background-color: #0057ba; color: #fff">搜索</div>
         </van-col>
       </van-row>
-      <div class="tips">
-        <div><van-icon name="warning-o" />默认显示前100条,请输入关键词查询</div>
-      </div>
-      <van-picker
-        show-toolbar
-        :columns="chainsData"
-        value-key="chainName"
-        @confirm="onConfirmChainsList"
-        @cancel="moreTypeShow = false"
-      />
+      <van-picker show-toolbar :columns="chainsData" value-key="chainName" @confirm="onConfirmChainsList"
+        @cancel="moreTypeShow = false" />
     </van-popup>
     <!-- 门店 -->
     <van-popup v-model="storeTypeShow" position="bottom">
       <van-row style="background-color: #f5f5f5">
         <van-col span="20">
-          <van-field
-            left-icon="search"
-            style="margin-top: 2px; border-radius: 6px; overflow: hidden"
-            v-model="agentValue"
-            label=""
-            placeholder="请输入关键词"
-            clearable
-          />
+          <van-field left-icon="search" style="margin-top: 2px; border-radius: 6px; overflow: hidden"
+            v-model="agentValue" label="" placeholder="请输入门店名称/编号/地址搜索" clearable />
         </van-col>
-        <van-col
-          span="4"
-          style="text-align: center; line-height: 48px"
-          @click="getStoresList(agentValue)"
-        >
+        <van-col span="4" style="text-align: center; line-height: 48px" @click="getStoresList(agentValue)">
           <div style="background-color: #0057ba; color: #fff">搜索</div>
         </van-col>
       </van-row>
-      <!-- <div class="tips">
-        <div><van-icon name="warning-o" />默认显示前100条,请输入关键词查询</div>
-      </div> -->
-      <van-picker
-        show-toolbar
-        :columns="storesData"
-        value-key="storeName"
-        @confirm="onConfirmStoresList"
-        @cancel="storeTypeShow = false"
-      />
+      <van-picker show-toolbar :columns="storesData" value-key="storeName" @confirm="onConfirmStoresList"
+        @cancel="storeTypeShow = false" />
     </van-popup>
   </div>
 </template>
@@ -505,6 +339,7 @@ export default {
       storeTypeShow: false,
       storeType: null,
       agentValue: "",
+      selectIndex: 0,
       chainsData: [],
       storesData: [],
       chainName: "",
@@ -611,7 +446,7 @@ export default {
     dateFn(val) {
       return val.slice(0, 4) + "-" + val.slice(4, 6) + "-" + val.slice(6, 8);
     },
-    onLoad() {},
+    onLoad() { },
     onSubmit() {
       for (var c = 0; c < this.collectionAnswerlisd.length; c++) {
         for (var b = 0; b < this.collectionItemList.length; b++) {
@@ -857,10 +692,10 @@ export default {
           var dayTime = row.showDate;
           var times = new Date(
             dayTime.slice(0, 4) +
-              "-" +
-              dayTime.slice(4, 6) +
-              "-" +
-              dayTime.slice(6, 8)
+            "-" +
+            dayTime.slice(4, 6) +
+            "-" +
+            dayTime.slice(6, 8)
           ).getTime();
           var time = new Date("2022-08-25").getTime();
           if (times < time) {
@@ -965,9 +800,9 @@ export default {
       );
       if (
         new Date(this.formData.startTime).getTime() >
-          new Date(this.formData.endTime).getTime() ||
+        new Date(this.formData.endTime).getTime() ||
         new Date(this.endmaxDate).getTime() <
-          new Date(this.formData.endTime).getTime()
+        new Date(this.formData.endTime).getTime()
       ) {
         this.formData.endTime =
           this.parseTime(new Date(val), "{y}-{m}-{d}") + "";
@@ -990,7 +825,8 @@ export default {
       this.EndTimeShow = false;
     },
     // 添加经销商或者门店
-    addJXSorMD(val) {
+    addJXSorMD(val, index) {
+      this.selectIndex = index;
       let answerType = val.answerType;
       let dataList = [];
       if (answerType == "jxs") {
@@ -1061,7 +897,7 @@ export default {
     onConfirmChainsList(value) {
       if (value && value.chainName != undefined) {
         let JXSSataList = this.collectionItemList.find(
-          (item) => item.answerType == "jxs"
+          (item, index) => item.answerType == "jxs" && index == this.selectIndex
         );
         if (!JXSSataList.chainList) {
           JXSSataList.chainList = [];
@@ -1083,7 +919,7 @@ export default {
     onConfirmStoresList(value) {
       if (value && value.storeName != undefined) {
         let MDSataList = this.collectionItemList.find(
-          (item) => item.answerType == "md"
+          (item, index) => item.answerType == "md" && index == this.selectIndex
         );
         if (!MDSataList.storeList) {
           MDSataList.storeList = [];
@@ -1223,12 +1059,12 @@ export default {
   height: 100%;
 }
 
-.table-headermd th.el-table__cell > .cell {
+.table-headermd th.el-table__cell>.cell {
   padding: 0 4px;
   text-align: center;
 }
 
-.table-headermd th.el-table__cell:first-child > .cell {
+.table-headermd th.el-table__cell:first-child>.cell {
   text-align: left;
 }