瀏覽代碼

feat: 修改传值

aXin-0810 1 年之前
父節點
當前提交
733b88002f
共有 1 個文件被更改,包括 30 次插入39 次删除
  1. 30 39
      src/views/sales_policy/components/TabelTransfer.vue

+ 30 - 39
src/views/sales_policy/components/TabelTransfer.vue

@@ -8,11 +8,13 @@
           <el-radio
             v-if="!adminWebsit || !adminWebsit.websitNumber || (adminWebsit && adminWebsit.websitNumber === 'GZ')"
             label="1"
-          >广州经销商</el-radio>
+            >广州经销商</el-radio
+          >
           <el-radio
             v-if="!adminWebsit || !adminWebsit.websitNumber || (adminWebsit && adminWebsit.websitNumber === 'FS')"
             label="2"
-          >佛山经销商</el-radio>
+            >佛山经销商</el-radio
+          >
         </el-radio-group>
         <template v-if="region == 0">
           <el-upload
@@ -31,18 +33,12 @@
         <el-col :xs="24" :sm="12" :lg="14">
           <el-input v-model="keyword" placeholder="查找经销商" size="mini" />
         </el-col>
-        <el-col
-          :xs="24"
-          :sm="1"
-          :lg="1"
-          style="margin-left: 10px"
-        ><el-button size="mini" @click="submitScreenForm">确定</el-button></el-col>
-        <el-col
-          :xs="24"
-          :sm="1"
-          :lg="1"
-          style="margin-left: 20px"
-        ><el-button size="mini" @click="resetScreenForm">重置</el-button></el-col>
+        <el-col :xs="24" :sm="1" :lg="1" style="margin-left: 10px"
+          ><el-button size="mini" @click="submitScreenForm">确定</el-button></el-col
+        >
+        <el-col :xs="24" :sm="1" :lg="1" style="margin-left: 20px"
+          ><el-button size="mini" @click="resetScreenForm">重置</el-button></el-col
+        >
       </el-row>
     </slot>
     <el-row v-if="region == 0" :gutter="20">
@@ -67,15 +63,12 @@
             <!--            label="经销商编码"-->
             <!--            align="left"-->
             <!--          />-->
-            <el-table-column
-              prop="name"
-              label="经销商名称"
-              align="left"
-            ><template slot-scope="scope">
-              <CopyButton :copy-text="scope.row.name" />
-              <span>{{ scope.row.name }}</span>
-              <span class="red">{{ scope.row.number }}</span>
-            </template>
+            <el-table-column prop="name" label="经销商名称" align="left"
+              ><template slot-scope="scope">
+                <CopyButton :copy-text="scope.row.name" />
+                <span>{{ scope.row.name }}</span>
+                <span class="red">{{ scope.row.number }}</span>
+              </template>
             </el-table-column>
           </el-table>
         </div>
@@ -149,13 +142,16 @@
             <el-button type="primary" size="mini">导入经销商</el-button>
           </el-upload>
           <el-button type="primary" size="mini" @click="hanleDownloadFilesPolicy">下载模板</el-button>
-
         </div>
         <el-row style="margin: 20px 0">
           <el-col :span="12">
             <el-row :gutter="20">
-              <el-col :span="12" :offset="0"> <el-input v-model="keyword2" placeholder="查找经销商" size="mini" /> </el-col>
-              <el-col :span="12" :offset="0"><el-input v-model="specification" placeholder="规格型号" size="mini" /></el-col>
+              <el-col :span="12" :offset="0">
+                <el-input v-model="keyword2" placeholder="查找经销商" size="mini" />
+              </el-col>
+              <el-col :span="12" :offset="0"
+                ><el-input v-model="specification" placeholder="规格型号" size="mini"
+              /></el-col>
             </el-row>
           </el-col>
           <el-col :span="10" style="margin-left: 20px">
@@ -175,10 +171,7 @@
             highlight-current-row
             stripe
           >
-            <el-table-column
-              type="selection"
-              width="55"
-            />
+            <el-table-column type="selection" width="55" />
             <el-table-column type="index" width="50" />
             <el-table-column
               prop="customerNumber"
@@ -228,7 +221,6 @@
                 {{ scope.row.limitQty }}
               </template>
             </el-table-column>
-
           </el-table>
         </div>
         <!-- 分页 -->
@@ -370,7 +362,6 @@ import {
   updateLimitGrouppdate,
   updateLimitBatchupdate,
   getPolicyLimitGroupList
-
 } from '@/api/policy_list'
 import { downloadFiles, handleImport } from '@/utils/util'
 import ImageUpload from '@/components/Common/image-upload.vue'
@@ -380,7 +371,7 @@ export default {
   name: 'Examine',
   components: {
     // eslint-disable-next-line vue/no-unused-components
-    ImageUpload,
+    ImageUpload
   },
   mixins: [Minxin],
   // eslint-disable-next-line vue/require-prop-types
@@ -586,9 +577,9 @@ export default {
         }
         this.dataL = res.data.records
         for (let k = 0; k < this.dataL.length; k++) {
-          (this.dataL[k].customerId = this.dataL[k].id),
-          (this.dataL[k].customerName = this.dataL[k].name),
-          (this.dataL[k].customerNumber = this.dataL[k].number)
+          ;(this.dataL[k].customerId = this.dataL[k].id),
+            (this.dataL[k].customerName = this.dataL[k].name),
+            (this.dataL[k].customerNumber = this.dataL[k].number)
         }
         this.clistTotal = res.data.total
       })
@@ -680,7 +671,7 @@ export default {
           result.data[i].customerId = result.data[i].id
         }
         if (this.custoList.length) {
-          this.custoList = [...this.custoList, ...this.resArr(this.custoList, result.data)]
+          this.custoList = [...this.custoList, ...this.resArr(result.data, this.custoList)]
         } else {
           this.custoList = result.data
         }
@@ -724,7 +715,7 @@ export default {
       downloadFiles('policy/limit/download')
     },
     getCommonApi(row) {
-      (this.isEdit = 2), (this.cid = row.id), (this.cpolicyId = row.policyId)
+      ;(this.isEdit = 2), (this.cid = row.id), (this.cpolicyId = row.policyId)
       console.log(this.cpolicyId, this.comCode, this.cpolicyId === this.comCode)
     },
     getCond() {
@@ -770,7 +761,7 @@ export default {
      * @param {String} index - 索引值
      * @return Boolean
      */
-    selectable: function(row, index) {
+    selectable: function (row, index) {
       // row.disabled == undefined 才能被选中
       if (row.disabled === undefined || row.disabled === false) {
         return true