zh 2 роки тому
батько
коміт
5d1d9dfa68
35 змінених файлів з 28750 додано та 436 видалено
  1. 27292 1
      package-lock.json
  2. 31 1
      src/api/policy_list.js
  3. 30 2
      src/views/basic_data/priceSalesType.vue
  4. 1 1
      src/views/basic_data/warehouse/warehouse_site.vue
  5. 237 186
      src/views/deposit_home/components/refund_list-detail.vue
  6. 1 0
      src/views/finance/receivable_list.vue
  7. 1 1
      src/views/login/index.vue
  8. 18 5
      src/views/sales_policy/components/AddPolicy.vue
  9. 21 6
      src/views/sales_policy/components/Examine.vue
  10. 506 0
      src/views/sales_policy/components/LinitVisible.vue
  11. 34 52
      src/views/sales_policy/components/TabelTransfer.vue
  12. 162 30
      src/views/sales_policy/components/details.vue
  13. 15 5
      src/views/sales_policy/components/editPolicy.vue
  14. 0 0
      src/views/secondaryMerchant/components/subMerchantDetail.vue
  15. 0 0
      src/views/secondaryMerchant/components/subMerchantForm.vue
  16. 0 0
      src/views/secondaryMerchant/subMerchant.vue
  17. 102 83
      src/views/setting/account.vue
  18. 197 28
      src/views/supply/displace/displace_list.vue
  19. 2 0
      src/views/supply/engin/components/commerce_detail.vue
  20. 3 1
      src/views/supply/engin/components/commerce_examine.vue
  21. 16 6
      src/views/supply/engin/components/commerce_form.vue
  22. 3 1
      src/views/supply/engin/components/commerce_return.vue
  23. 6 4
      src/views/supply/engin/components/engin_form.vue
  24. 2 0
      src/views/supply/engin/components/home_detail.vue
  25. 2 0
      src/views/supply/engin/components/home_examine.vue
  26. 2 0
      src/views/supply/engin/components/home_form.vue
  27. 2 0
      src/views/supply/engin/components/home_return.vue
  28. 21 2
      src/views/supply/pickup/components/pickup_form.vue
  29. 2 0
      src/views/supply/policy/components/retail_detail.vue
  30. 3 1
      src/views/supply/policy/components/retail_examine.vue
  31. 6 0
      src/views/supply/policy/components/retail_form.vue
  32. 2 0
      src/views/supply/retail/components/retail_detail.vue
  33. 2 0
      src/views/supply/retail/components/retail_examine.vue
  34. 6 0
      src/views/supply/retail/components/retail_form.vue
  35. 22 20
      src/views/supply/retail/components/retail_return.vue

Різницю між файлами не показано, бо вона завелика
+ 27292 - 1
package-lock.json


+ 31 - 1
src/api/policy_list.js

@@ -581,4 +581,34 @@ export function updateLimitGrouppdate(params) {
     method: 'post',
     params
   })
-}
+}
+
+export function delLimit(params) {
+  return request({
+    url: '/policy/limit/delete',
+    method: 'post',
+    params
+  })
+}
+export function saveLimit(params) {
+  return request({
+    url: '/policy/limit/save',
+    method: 'post',
+    data: params
+  })
+}
+
+export function delLimitGroup(params) {
+  return request({
+    url: '/policy/limit/group/delete',
+    method: 'post',
+    params
+  })
+}
+export function saveLimitGroup(params) {
+  return request({
+    url: '/policy/limit/group/save',
+    method: 'post',
+    data: params
+  })
+}

+ 30 - 2
src/views/basic_data/priceSalesType.vue

@@ -34,6 +34,16 @@
         <el-form-item label="销售类型编码" prop="saleCode">
           <el-input v-model="formData.saleCode" disabled placeholder="请选择销售类型生成" />
         </el-form-item>
+        <el-form-item label="钱包" prop="walletId">
+          <el-select v-model="formData.walletId" placeholder="请选择钱包名称" clearable filterable @change="handleWalletChange">
+            <el-option
+              v-for="item in walletList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-switch v-model="formData.status" :active-value="true" :inactive-value="false" />
         </el-form-item>
@@ -52,7 +62,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
-import { saleTypeRebateListV2 } from '@/api/policy_list'
+import { saleTypeRebateListV2, getNoRebateWalletList } from '@/api/policy_list'
 import {
   getProductPriceListV2,
   getPriceSalesRelaListV2,
@@ -120,10 +130,13 @@ export default {
         priceTypeId: '',
         saleId: '',
         saleCode: '',
+        walletId: '',
+        walletName: '',
         status: true
       },
       priceTypeList: [],
-      saleypeList: []
+      saleypeList: [],
+      walletList: []
     }
   },
   methods: {
@@ -216,6 +229,7 @@ export default {
       this.visible = true
       this.getProductPriceListV2()
       this.getSaleTypeRebateListV2()
+      this.getNoRebateWalletList()
     },
     handleChange(e) {
       if (e) {
@@ -224,6 +238,13 @@ export default {
         this.formData.saleCode = ''
       }
     },
+    handleWalletChange(e) {
+      if (e) {
+        this.formData.walletName = this.walletList.find(k => k.id === e).name
+      } else {
+        this.formData.walletName = ''
+      }
+    },
     getProductPriceListV2() {
       getProductPriceListV2({
         'pageNum': 1,
@@ -250,6 +271,13 @@ export default {
         this.saleypeList = res.data.records
       })
     },
+    getNoRebateWalletList() {
+      getNoRebateWalletList({
+        walletName: ''
+      }).then(res => {
+        this.walletList = res.data
+      })
+    },
     async getDetail(priceSaleTypeRelaId) {
       const { data } = await getPriceSalesRelaDetail({ priceSaleTypeRelaId })
       this.formData = { ...data }

+ 1 - 1
src/views/basic_data/warehouse/warehouse_site.vue

@@ -251,7 +251,6 @@ export default {
       let row
       getStockDetailStock({ id }).then(res => {
         row = res.data
-        this.type = 2
         const arr = []
         if (row.kingDeeStocks && row.kingDeeStocks.length > 0) {
           row.kingDeeStocks.forEach(el => {
@@ -259,6 +258,7 @@ export default {
           })
         }
         this.newData()
+        this.type = 2
         this.diaLogForm = {
           id,
           name: row.name,

+ 237 - 186
src/views/deposit_home/components/refund_list-detail.vue

@@ -82,12 +82,12 @@
               detailList.examineStatus == 'SAVE'
                 ? '保存'
                 : detailList.examineStatus == 'WAIT'
-                ? '待审核'
-                : detailList.examineStatus == 'OK'
-                ? '通过'
-                : detailList.examineStatus == 'FAIL'
-                ? '不通过'
-                : '关闭'
+                  ? '待审核'
+                  : detailList.examineStatus == 'OK'
+                    ? '通过'
+                    : detailList.examineStatus == 'FAIL'
+                      ? '不通过'
+                      : '关闭'
             }}
           </div>
         </el-col>
@@ -135,35 +135,43 @@
           <div class="value">{{ detailList.refInstallAddress }}</div>
         </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">登录有效期</div>
-              <div class="value">
-                {{ detailList.refBillsExpireDate }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际使用单位</div>
-              <div class="value">
-                {{ detailList.realUseUnit }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">实际安装地址</div>
-              <div class="value">
-                {{ detailList.realInstallAddress }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">项目编号</div>
-              <div class="value">
-                {{ detailList.refProjectNo }}
-              </div>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="8" class="item">
-              <div class="label">购买单位</div>
-              <div class="value">
-                {{ detailList.refBuyUnitName }}
-              </div>
-            </el-col>
+          <div class="label">登录有效期</div>
+          <div class="value">
+            {{ detailList.refBillsExpireDate }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际使用单位</div>
+          <div class="value">
+            <el-input
+              v-model="detailList.realUseUnit"
+              :readonly="detailList.examineStatus !== 'WAIT'"
+              placeholder="请输入内容"
+            />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">实际安装地址</div>
+          <div class="value">
+            <el-input
+              v-model="detailList.realInstallAddress"
+              :readonly="detailList.examineStatus !== 'WAIT'"
+              placeholder="请输入内容"
+            />
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">项目编号</div>
+          <div class="value">
+            {{ detailList.refProjectNo }}
+          </div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">购买单位</div>
+          <div class="value">
+            {{ detailList.refBuyUnitName }}
+          </div>
+        </el-col>
         <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">工程订单号</div>
           <div class="value">{{ detailList.customerName }}</div>
@@ -177,19 +185,6 @@
           <div class="label">项目说明</div>
           <div class="value">{{ detailList.refProjectNote }}</div>
         </el-col>
-        <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
-          <div class="label">订单日期</div>
-          <div class="value">{{ detailList.customerName }}</div>
-        </el-col> -->
-
-        <!-- <el-col :xs="24" :sm="24" :lg="24" class="item">
-          <div class="label">格力内部备注</div>
-          <div class="value">{{ detailList.customerName }}</div>
-        </el-col> -->
-        <!-- <el-col :xs="24" :sm="24" :lg="8" class="item">
-          <div class="label">文件编码</div>
-          <div class="value">{{ detailList.customerName }}</div>
-        </el-col> -->
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">备注</div>
           <!-- <div class="value">{{ detailList.remark }}</div> -->
@@ -207,19 +202,24 @@
           <div class="value">
             <el-input
               v-model="detailList.geLiInerNote"
+              placeholder="请输入内容"
+            />
+          </div>
+        </el-col>
+        <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">格力内部资料备注</div>
+          <div class="value">
+            <el-input
+              v-model="detailList.geLiInnerDataNote"
               :readonly="detailList.examineStatus !== 'WAIT'"
               placeholder="请输入内容"
             />
           </div>
         </el-col>
         <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">格力内部资料备注</div>
-              <div class="value">{{ detailList.geLiInnerDataNote }}</div>
-            </el-col>
-            <el-col v-if="!isCustomer" :xs="24" :sm="24" :lg="24" class="item">
-              <div class="label">订单格力内部备注</div>
-              <div class="value">{{ detailList. orderGeLiInnerNote }}</div>
-            </el-col>
+          <div class="label">订单格力内部备注</div>
+          <div class="value">{{ detailList.orderGeLiInnerNote }}</div>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="8" class="item">
           <div class="label">提交保证函</div>
           <!-- <div class="value">{{ detailList.remark }}</div> -->
@@ -597,101 +597,149 @@
       </div>
     </div>
     <h3>押金货品信息</h3>
-      <el-divider />
-      <!-- 列表 -->
-      <div class="mymain-container">
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="detailList.collectList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-            show-summary
-            :summary-method="$getSummaries"
+    <el-divider />
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="detailList.collectList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+          show-summary
+          :summary-method="$getSummaries"
+        >
+          <el-table-column
+            align="left"
+            label="工程登录单号"
+            prop="refEnginRecordNo"
+            min-width="130"
+            show-overflow-tooltip
           >
-            <el-table-column align="left" label="工程登录单号" prop="refEnginRecordNo" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.refEnginRecordNo" />
-                <span>{{ scope.row.refEnginRecordNo }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.unit" />
-                <span>{{ scope.row.unit }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包" prop="customerWalletName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletName" />
-                <span>{{ scope.row.customerWalletName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="现金钱包编码" prop="customerWalletNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.customerWalletNumber" />
-                <span>{{ scope.row.customerWalletNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型名称" prop="k3CategoryName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryName" />
-                <span>{{ scope.row.k3CategoryName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料类型编码" prop="k3CategoryNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.k3CategoryNumber" />
-                <span>{{ scope.row.k3CategoryNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料编码" prop="materialNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="金蝶物料旧编码" prop="materialOldNumber" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copy-text="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.refEnginRecordNo" />
+              <span>{{ scope.row.refEnginRecordNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="规格型号" prop="specification" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.specification" />
+              <span>{{ scope.row.specification }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="基本单位编码" prop="unit" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.unit" />
+              <span>{{ scope.row.unit }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="现金钱包"
+            prop="customerWalletName"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletName" />
+              <span>{{ scope.row.customerWalletName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="现金钱包编码"
+            prop="customerWalletNumber"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.customerWalletNumber" />
+              <span>{{ scope.row.customerWalletNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="金蝶物料类型名称"
+            prop="k3CategoryName"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryName" />
+              <span>{{ scope.row.k3CategoryName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="金蝶物料类型编码"
+            prop="k3CategoryNumber"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.k3CategoryNumber" />
+              <span>{{ scope.row.k3CategoryNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="金蝶物料名称" prop="materialName" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialName" />
+              <span>{{ scope.row.materialName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="金蝶物料编码"
+            prop="materialNumber"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialNumber" />
+              <span>{{ scope.row.materialNumber }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="金蝶物料旧编码"
+            prop="materialOldNumber"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <CopyButton :copy-text="scope.row.materialOldNumber" />
+              <span>{{ scope.row.materialOldNumber }}</span>
+            </template>
+          </el-table-column>
 
-            <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
-            <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.price | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="已退押金金额" prop="refundDepositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.refundDepositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
-              <template slot-scope="scope">
-                {{ scope.row.depositAmount | numToFixed }}
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
+          <el-table-column align="left" label="已发押金数量" prop="hasSendQty" min-width="130" show-overflow-tooltip />
+          <el-table-column align="left" label="单价" prop="price" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.price | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="已退押金金额"
+            prop="refundDepositAmount"
+            min-width="130"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.refundDepositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+          <el-table-column align="left" label="押金金额" prop="depositAmount" min-width="130" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.depositAmount | numToFixed }}
+            </template>
+          </el-table-column>
+        </el-table>
       </div>
+    </div>
     <h3 class="gdzl">工程资料</h3>
     <!--    <el-button :readonly="isDis" class="batchDownload" type="primary" size="small" @click="batchDownloadFn"-->
     <!--      >批量下载</el-button-->
@@ -723,11 +771,11 @@
                 fit="cover"
                 :preview-src-list="[imageURL + scope.row.fileUrl]"
               />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png" />
-              <img v-if="checkFileType(scope.row.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg" />
+              <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'excel'" class="file" src="@/assets/common/excel.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png">
+              <img v-if="checkFileType(scope.row.fileUrl) == 'file'" class="file aaa" src="@/assets/common/zip.jpeg">
             </template>
           </el-table-column>
           <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
@@ -737,9 +785,11 @@
           </el-table-column>
           <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
-                >下载</el-button
-              >
+              <el-button
+                type="text"
+                class="textColor"
+                @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
+              >下载</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -930,19 +980,19 @@
                     fit="cover"
                     :preview-src-list="[imageURL + scope.row.fileUrl]"
                   />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png" />
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'word'" class="file" src="@/assets/common/word.png">
                   <img
                     v-if="checkFileType(scope.row.fileUrl) == 'excel'"
                     class="file"
                     src="@/assets/common/excel.png"
-                  />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png" />
-                  <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png" />
+                  >
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'ppt'" class="file" src="@/assets/common/ppt.png">
+                  <img v-if="checkFileType(scope.row.fileUrl) == 'pdf'" class="file" src="@/assets/common/pdf.png">
                   <img
                     v-if="checkFileType(scope.row.fileUrl) == 'file'"
                     class="file aaa"
                     src="@/assets/common/zip.jpeg"
-                  />
+                  >
                 </template>
               </el-table-column>
               <el-table-column align="left" label="下载文件名称" prop="fileName" min-width="160" show-overflow-tooltip>
@@ -952,9 +1002,11 @@
               </el-table-column>
               <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <el-button type="text" class="textColor" @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
-                    >下载</el-button
-                  >
+                  <el-button
+                    type="text"
+                    class="textColor"
+                    @click="downLoadFn(scope.row.fileUrl, scope.row.fileName)"
+                  >下载</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -1010,17 +1062,23 @@
         </div>
       </div>
     </div>
-    <br />
+    <br>
     <!-- 按钮 -->
     <!-- detailList.examineStatus != 'OK' || detailList.examineStatus != 'FAIL' -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="adoptFn"
-          >审批通过</el-button
-        >
-        <el-button v-if="detailList.examineStatus == 'WAIT'" type="primary" size="small" @click="rejectFn"
-          >审批驳回</el-button
-        >
+        <el-button
+          v-if="detailList.examineStatus == 'WAIT'"
+          type="primary"
+          size="small"
+          @click="adoptFn"
+        >审批通过</el-button>
+        <el-button
+          v-if="detailList.examineStatus == 'WAIT'"
+          type="primary"
+          size="small"
+          @click="rejectFn"
+        >审批驳回</el-button>
         <el-button v-if="detailList.examineStatus == 'OK'" type="primary" size="small" @click="saveFn">保存</el-button>
       </div>
     </div>
@@ -1029,19 +1087,14 @@
 
 <script>
 import imageUpload from '@/components/Common/image-upload.vue'
-import { downloadFiles, downloadPdf } from '@/utils/util'
-import { getFileUrl } from '@/api/common'
+import { downloadFiles } from '@/utils/util'
 import { mapGetters } from 'vuex'
 import {
   getDepositManageDetail,
   getDepositManageExamine,
-  getDepositManageDownZip,
-  getDepositManageEdit,
-  getCommonFileGetStream
-} from '@/api/engin_deposit/refund_list'
-import { applyDeposit, computeDiff } from '@/api/engin_deposit.js'
+  getDepositManageEdit } from '@/api/engin_deposit/refund_list'
+import { computeDiff } from '@/api/engin_deposit.js'
 
-import ret from 'bluebird/js/release/util'
 export default {
   components: { imageUpload },
   props: {
@@ -1065,7 +1118,6 @@ export default {
       isDis: true,
       imageURL: this.$imageUrl,
       title: '审批',
-      imageURL: this.$imageUrl,
       listLoading: false, // 列表加载loading
       dataList: [], // 列表数据
       detailList: {},
@@ -1399,16 +1451,15 @@ export default {
         ]
       })
       res.data.collectList.forEach(item => {
-
-// item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
-item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
-item.sums2 = [ 'price', 'refundDepositAmount', 'depositAmount']
-})
+        // item.number = (item.qty*100 - item.directTransferQty*100 - item.retiredQty*100) / 100;
+        item.sums1 = ['orderHasSendQty', 'dataQty', 'hasSendQty']
+        item.sums2 = ['price', 'refundDepositAmount', 'depositAmount']
+      })
       res.data.items = arr
       this.amendData = res.data.dataList.filter(k => k.dataPosition == 'AMEND')
       this.original = res.data.dataList.filter(k => k.dataPosition != 'AMEND')
-      res.data.realUseUnit =res.data.realUseUnit || res.data.refUseUnit
-          res.data.realInstallAddress =   res.data.realInstallAddress ||res.data.refInstallAddress
+      res.data.realUseUnit = res.data.realUseUnit || res.data.refUseUnit
+      res.data.realInstallAddress = res.data.realInstallAddress || res.data.refInstallAddress
       this.detailList = res.data
       if (res.data.examineStatus == 'SAVE' || res.data.examineStatus == 'OK' || res.data.examineStatus == 'FAIL') {
         this.title = '详情'

+ 1 - 0
src/views/finance/receivable_list.vue

@@ -4,6 +4,7 @@
     :getList="getList"
     :exportList="exportList"
     :operation="operation()"
+    :operationColumnWidth="200"
     :optionsEvensGroup="optionsEvensGroup"
     :columnParsing="columnParsing"
     :tableAttributes="tableAttributes"

+ 1 - 1
src/views/login/index.vue

@@ -105,7 +105,7 @@
                     </div>
 
                     <div class="checkbox">
-                      <div class="check-yes">
+                      <div class="check-yes" @click="isRemenberPw = !isRemenberPw">
                         <el-image
                           style="width: 16px; height: 16px"
                           :src="require('@/assets/login/icon_004.png')"

+ 18 - 5
src/views/sales_policy/components/AddPolicy.vue

@@ -334,6 +334,7 @@
                   size="mini"
                   multiple
                   filterable
+                  placeholder="请选择价格类型带出钱包"
                   @change="setText($event, scope.$index, scope.row, 'walletIds')"
                 >
                   <el-option v-for="item in NoRebateWalletList" :key="item.id" :label="item.name" :value="item.id" />
@@ -610,12 +611,22 @@ export default {
       })
     },
     setText(e, index, row, name) {
-      if (name === 'priceType') {
-        console.log(e, this.priceList.find(k => k.priceTypeId === e).priceTypeName)
-        this.dataList[index][name] = this.priceList.find(k => k.priceTypeId === e).priceTypeName
-        return
+      if (e) {
+        if (name === 'priceType') {
+          const item = this.priceList.find(k => k.priceTypeId === e)
+          this.dataList[index][name] = item.priceTypeName
+          this.$set(row, 'walletIds', [])
+
+          if (item.walletId) {
+            this.$set(row, 'walletIds', [...row.walletIds, item.walletId])
+          }
+          return
+        }
+        this.dataList[index][name] = row[name]
+      } else {
+        this.dataList[index][name] = ''
+        this.$set(row, 'walletIds', [])
       }
-      this.dataList[index][name] = row[name]
     },
     // 下载excel模板
     handleDownloadFiles() {
@@ -1061,6 +1072,8 @@ export default {
       })
     },
     handlePriceType(e) {
+      this.priceList = []
+
       if (e.saleTypeCode) {
         this.getPriceSalesRelaListV2(e.saleTypeCode)
       }

+ 21 - 6
src/views/sales_policy/components/Examine.vue

@@ -497,21 +497,27 @@
                   {{ scope.row.materialNumber }}
                 </template>
               </el-table-column>
-              <el-table-column prop="limitQty" label="订货上限" align="left" min-width="200">
+              <el-table-column prop="specification" label="规格型号" align="left" min-width="200">
                 <template slot-scope="scope">
-                  {{ scope.row.limitQty }}
+                  {{ scope.row.specification }}
                 </template>
               </el-table-column>
-              <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
+
+              <el-table-column prop="orderNums" label="已下订单台数" align="left" min-width="200">
                 <template slot-scope="scope">
                   {{ scope.row.orderNums }}
                 </template>
               </el-table-column>
-              <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
+              <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
                 <template slot-scope="scope">
                   {{ scope.row.examineOrderNums }}
                 </template>
               </el-table-column>
+              <el-table-column prop="limitQty" label="订货上限" align="left" min-width="200">
+                <template slot-scope="scope">
+                  {{ scope.row.limitQty }}
+                </template>
+              </el-table-column>
             </el-table>
             <!-- 分页 -->
             <div style="margin: 20px 0">
@@ -607,7 +613,16 @@
                         </template>
                       </el-table-column>
                     </template>
-                    <!-- <el-table-column prop="orderNums" label="配提上限已下订单数" align="left" width="200">
+                    <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
+                      <template slot-scope="scope">
+                        {{ scope.row.orderNums }}
+                      </template>
+                    </el-table-column>
+                    <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
+                      <template slot-scope="scope">
+                        {{ scope.row.examineOrderNums }}
+                      </template>
+                      <!-- <el-table-column prop="orderNums" label="配提上限已下订单数" align="left" width="200">
                       <template slot-scope="scope">
                         {{ scope.row.orderNums }}
                       </template>
@@ -617,7 +632,7 @@
                         {{ scope.row.examineOrderNums }}
                       </template>
                     </el-table-column> -->
-                  </el-table>
+                    </el-table-column></el-table>
                 </div>
                 <!-- 分页 -->
                 <div style="margin: 20px 0">

+ 506 - 0
src/views/sales_policy/components/LinitVisible.vue

@@ -0,0 +1,506 @@
+<template>
+  <el-dialog
+    :title=" !operationType ? '经销商上限':'经销商提货上限'"
+    :visible.sync="linitVisible"
+    width="60%"
+    :show-close="false"
+    :append-to-body="true"
+    :close-on-click-modal="false"
+    @close="onCancel"
+  >
+    <div>
+      <zj-table :table-attributes="tableAttributes" :is-drop="true" :columns="columns" :table-data="dataList" />
+    </div>
+    <span slot="footer">
+      <el-button size="mini" @click="onCancel">取消</el-button>
+      <el-button size="mini" type="primary" @click="onSbumit">确定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { getMaterialListV2 } from '@/api/basic_data/material'
+import { getDealerListV2 } from '@/api/basic_data/dealer'
+import { getCustomerList, getMaterialList } from '@/api/policy_list'
+export default {
+  props: {
+    operationType: {
+      type: String,
+      default: null
+    },
+    detailType: {
+      type: String,
+      default: null
+    },
+    linitVisible: {
+      type: Boolean,
+      default: false
+    },
+    showClose: {
+      type: Boolean,
+      default: false
+    },
+    dataList: {
+      type: Array,
+      default: () => []
+    },
+    linitType: {
+      type: String,
+      default: null
+    },
+    policyId: {
+      type: String,
+      default: null
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      k3List: [],
+      dealerList: [],
+      tableAttributes: {
+        border: true,
+        maxHeight: '600px',
+        headerCellClassName: 'headerRowColor',
+        size: 'mini'
+      }
+    }
+  },
+  computed: {
+    columns() {
+      return [
+        {
+          columnAttributes: {
+            label: '经销商编号',
+            prop: 'customerNumber',
+            'min-width': '200px'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div style='margin:0 10px'>
+                <el-select
+                  style='width:100%'
+                  value={row.customerNumber}
+                  onInput={e => (row.customerNumber = e)}
+                  onChange={e => this.handleChange(e, row)}
+                  filterable
+                  disabled={this.linitType === 'edit'}
+                  size='mini'
+                  placeholder='请输入经销商编号'
+                  loading={this.loading}
+                >
+                  {this.dealerList.map(k => {
+                    return <el-option key={k.id} label={k.customerNumber} value={k.id}></el-option>
+                  })}
+                </el-select>
+              </div>
+            )
+          }
+        },
+        {
+          columnAttributes: {
+            label: '经销商名称',
+            prop: 'customerName',
+            'min-width': '200px'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div style='margin:0 10px'>
+                <el-select
+                  style='width:100%'
+                  value={row.customerName}
+                  onInput={e => (row.customerName = e)}
+                  onChange={e => this.handleChange(e, row)}
+                  filterable
+                  disabled={this.linitType === 'edit'}
+                  size='mini'
+                  placeholder='请输入经销商名称'
+                  loading={this.loading}
+                >
+                  {this.dealerList.map(k => {
+                    return <el-option key={k.id} label={k.customerName} value={k.id}></el-option>
+                  })}
+                </el-select>
+              </div>
+            )
+          }
+        },
+        ...(() => {
+          return !this.operationType
+            ? [
+              {
+                columnAttributes: {
+                  label: '物料名称',
+                  prop: 'materialName',
+                  'min-width': '200px'
+                },
+                render: (h, { column, row, index }) => {
+                  return (
+                    <div style='margin:0 10px'>
+                      <el-select
+                        style='width:100%'
+                        value={row.materialName}
+                        onInput={e => (row.materialName = e)}
+                        onChange={e => this.handleChange2(e, row)}
+                        filterable
+                        size='mini'
+                        disabled={this.linitType === 'edit'}
+                        placeholder='请输入物料名称'
+                        loading={this.loading}
+                      >
+                        {this.k3List.map(k => {
+                          return <el-option key={k.id} label={k.materialName} value={k.id}></el-option>
+                        })}
+                      </el-select>
+                    </div>
+                  )
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '物料编号',
+                  prop: 'materialNumber',
+                  'min-width': '200px'
+                },
+                render: (h, { column, row, index }) => {
+                  return (
+                    <div style='margin:0 10px'>
+                      <el-select
+                        style='width:100%'
+                        value={row.materialNumber}
+                        onInput={e => (row.materialNumber = e)}
+                        onChange={e => this.handleChange2(e, row)}
+                        disabled={this.linitType === 'edit'}
+                        filterable
+                        size='mini'
+                        placeholder='请输入物料编号'
+                        loading={this.loading}
+                      >
+                        {this.k3List.map(k => {
+                          return <el-option key={k.id} label={k.materialNumber} value={k.id}></el-option>
+                        })}
+                      </el-select>
+                    </div>
+                  )
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '规格型号',
+                  prop: 'specification',
+                  'min-width': '200px'
+                },
+                render: (h, { column, row, index }) => {
+                  return (
+                    <div style='margin:0 10px'>
+                      <el-select
+                        style='width:100%'
+                        value={row.specification}
+                        onInput={e => (row.specification = e)}
+                        onChange={e => this.handleChange2(e, row)}
+                        disabled={this.linitType === 'edit'}
+                        filterable
+                        size='mini'
+                        placeholder='请输入规格型号'
+                        loading={this.loading}
+                      >
+                        {this.k3List.map(k => {
+                          return <el-option key={k.id} label={k.specification} value={k.id}></el-option>
+                        })}
+                      </el-select>
+                    </div>
+                  )
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '订货上限',
+                  prop: 'limitQty',
+                  'min-width': '100px'
+                },
+                render: (h, { column, row, index }) => {
+                  return (
+                    <div style='margin:0 10px'>
+                      <el-input
+                        type='number'
+                        value={row.limitQty}
+                        onInput={e => (row.limitQty = e)}
+                        placeholder='请输入'
+                        size='mini'
+                        clearable
+                      ></el-input>
+                    </div>
+                  )
+                }
+              }
+            ]
+            : this.detailType === 'LIMIT'
+              ? [
+                {
+                  columnAttributes: {
+                    label: '最小提货数量',
+                    prop: 'minBuyNum',
+                    'min-width': '100px'
+                  },
+                  render: (h, { column, row, index }) => {
+                    return (
+                      <div style='margin:0 10px'>
+                        <el-input
+                          type='number'
+                          value={row.minBuyNum}
+                          onInput={e => (row.minBuyNum = e)}
+                          placeholder='请输入'
+                          size='mini'
+                          clearable
+                        ></el-input>
+                      </div>
+                    )
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '最大提货组数',
+                    prop: 'maxBuyNum',
+                    'min-width': '100px'
+                  },
+                  render: (h, { column, row, index }) => {
+                    return (
+                      <div style='margin:0 10px'>
+                        <el-input
+                          type='number'
+                          value={row.maxBuyNum}
+                          onInput={e => (row.maxBuyNum = e)}
+                          placeholder='请输入'
+                          size='mini'
+                          clearable
+                        ></el-input>
+                      </div>
+                    )
+                  }
+                }
+              ]
+              : [
+                {
+                  columnAttributes: {
+                    label: '配提上限组数',
+                    prop: 'groupLimitNum',
+                    'min-width': '100px'
+                  },
+                  render: (h, { column, row, index }) => {
+                    return (
+                      <div style='margin:0 10px'>
+                        <el-input
+                          type='number'
+                          value={row.groupLimitNum}
+                          onInput={e => (row.groupLimitNum = e)}
+                          placeholder='请输入'
+                          size='mini'
+                          clearable
+                        ></el-input>
+                      </div>
+                    )
+                  }
+                }
+              ]
+        })(),
+        {
+          columnAttributes: {
+            label: '已下订单数',
+            prop: 'orderNums',
+            'min-width': '100px'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div style='margin:0 10px'>
+                <el-input
+                  type='number'
+                  value={row.orderNums}
+                  disabled={true}
+                  onInput={e => (row.orderNums = e)}
+                  placeholder='请输入'
+                  size='mini'
+                  clearable
+                ></el-input>
+              </div>
+            )
+          }
+        },
+        {
+          columnAttributes: {
+            label: '已审订单数',
+            prop: 'examineOrderNums',
+            'min-width': '100px'
+          },
+          render: (h, { column, row, index }) => {
+            return (
+              <div style='margin:0 10px'>
+                <el-input
+                  type='number'
+                  value={row.examineOrderNums}
+                  onInput={e => (row.examineOrderNums = e)}
+                  disabled={true}
+                  placeholder='请输入'
+                  size='mini'
+                  clearable
+                ></el-input>
+              </div>
+            )
+          }
+        }
+      ]
+    }
+  },
+  mounted() {
+    if (!this.operationType) {
+      if (this.linitType === 'add') {
+        this.dataList.push({
+          customerId: '',
+          id: '',
+          limitQty: null,
+          materialId: '',
+          policyId: this.policyId,
+          customerName: '',
+          customerNumber: '',
+          examineOrderNums: 0,
+          materialName: '',
+          materialNumber: '',
+          orderNums: 0,
+          policyType: '',
+          specification: ''
+        })
+      }
+    } else {
+      if (this.linitType === 'add') {
+        this.dataList.push({
+          customerId: '',
+          id: '',
+          minBuyNum: null,
+          maxBuyNum: null,
+          groupLimitNum: null,
+          policyId: this.policyId,
+          customerName: '',
+          customerNumber: '',
+          examineOrderNums: 0,
+          orderNums: 0,
+          policyType: '',
+          specification: ''
+        })
+      }
+    }
+  },
+  created() {
+    this.getCustomerList()
+    this.getMaterialList()
+  },
+  methods: {
+    remoteMethod(query, name) {
+      const params = []
+      switch (name) {
+        case 'number':
+          params.push({
+            param: 'a.number',
+            compare: 'like',
+            value: query
+          })
+          break
+        case 'name':
+          params.push({
+            param: 'a.name',
+            compare: 'like',
+            value: query
+          })
+          break
+        default:
+          params.push({
+            param: 'a.specification',
+            compare: 'like',
+            value: query
+          })
+          break
+      }
+      if (query !== '') {
+        this.loading = true
+        getMaterialListV2({
+          pageNum: 1,
+          pageSize: 100,
+          params
+        }).then(res => {
+          this.k3List = res.data.records
+          this.loading = false
+        })
+      }
+    },
+    remoteMethod2(query, name) {
+      const params = []
+      switch (name) {
+        case 'number':
+          params.push({
+            param: 'a.number',
+            compare: 'like',
+            value: query
+          })
+          break
+        default:
+          params.push({
+            param: 'a.name',
+            compare: 'like',
+            value: query
+          })
+          break
+      }
+      if (query !== '') {
+        this.loading = true
+        getDealerListV2({
+          pageNum: 1,
+          pageSize: 100,
+          params
+        }).then(res => {
+          this.dealerList = res.data.records
+          this.loading = false
+        })
+      }
+    },
+    getCustomerList() {
+      getCustomerList({
+        pageNum: 1,
+        pageSize: -1,
+        policyId: this.policyId
+      }).then(res => {
+        this.dealerList = res.data.records
+        this.loading = false
+      })
+    },
+    getMaterialList() {
+      getMaterialList({
+        pageNum: 1,
+        pageSize: -1,
+        policyId: this.policyId
+      }).then(res => {
+        this.k3List = res.data.records
+        this.loading = false
+      })
+    },
+    handleChange(e, row) {
+      const item = this.dealerList.find(k => k.id === e)
+      this.$set(row, 'customerId', item.customerId)
+      this.$set(row, 'customerName', item.customerName)
+      this.$set(row, 'customerNumber', item.customerNumber)
+    },
+    handleChange2(e, row) {
+      const item = this.k3List.find(k => k.id === e)
+      this.$set(row, 'materialId', item.materialId)
+      this.$set(row, 'materialName', item.materialName)
+      this.$set(row, 'materialNumber', item.materialNumber)
+      this.$set(row, 'specification', item.specification)
+    },
+    onSbumit() {
+      this.$emit('sbumit', { dataList: this.dataList, type: this.linitType, operationType: this.operationType })
+    },
+    onCancel() {
+      this.$emit('cancel')
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 34 - 52
src/views/sales_policy/components/TabelTransfer.vue

@@ -133,7 +133,6 @@
     </el-row>
     <!-- 销售政策类型 ———— 限量-->
     <div>
-
       <div>
         <div>
           <h4 style="display: inline-block; margin-right: 20px">经销商上限</h4>
@@ -150,35 +149,18 @@
             <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-input v-model="keyword2" placeholder="查找经销商" size="mini" />
+            <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-row>
           </el-col>
           <el-col :span="10" style="margin-left: 20px">
             <el-button size="mini" @click="submitScreenForm2">确定</el-button>
             <el-button size="mini" @click="resetScreenForm2">重置</el-button>
-            <template v-if="batch">
-              <!-- <el-button
-                v-if="list.length"
-                type="primary"
-                size="mini"
-                @click="()=>{
-                  visible = true
-                  handelBatchData()
-                }"
-              >批量修改上限</el-button> -->
-
-              <!-- <el-button
-                v-if="list.length"
-                type="primary"
-                size="mini"
-                @click="()=>{
-                  maxBuyNumVisible = true
-                  handelBatchData()
-                }"
-              >批量修改组数</el-button> -->
-            </template>
           </el-col>
         </el-row>
       </div>
@@ -192,9 +174,11 @@
             fit
             highlight-current-row
             stripe
-            @select-all="handleSelectionAllChange2"
-            @selection-change="handleSelectionChange2"
           >
+            <el-table-column
+              type="selection"
+              width="55"
+            />
             <el-table-column type="index" width="50" />
             <el-table-column
               prop="customerNumber"
@@ -224,21 +208,27 @@
                 {{ scope.row.materialNumber }}
               </template>
             </el-table-column>
-            <el-table-column prop="limitQty" label="订货上限" align="left" min-width="200">
+            <el-table-column prop="specification" label="规格型号" align="left" min-width="200">
               <template slot-scope="scope">
-                {{ scope.row.limitQty }}
+                {{ scope.row.specification }}
               </template>
             </el-table-column>
-            <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
+            <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
               <template slot-scope="scope">
                 {{ scope.row.orderNums }}
               </template>
             </el-table-column>
-            <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
+            <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
               <template slot-scope="scope">
                 {{ scope.row.examineOrderNums }}
               </template>
             </el-table-column>
+            <el-table-column prop="limitQty" label="订货上限" align="left" min-width="200">
+              <template slot-scope="scope">
+                {{ scope.row.limitQty }}
+              </template>
+            </el-table-column>
+
           </el-table>
         </div>
         <!-- 分页 -->
@@ -256,7 +246,7 @@
       </div>
       <div>
         <div>
-          <h4 style="display: inline-block; margin-right: 20px"> 经销商提货上限</h4>
+          <h4 style="display: inline-block; margin-right: 20px">经销商提货上限</h4>
           <el-divider />
         </div>
         <div style="margin: 20px 0">
@@ -270,21 +260,12 @@
             <el-button type="primary" size="mini">导入经销商配提套数</el-button>
           </el-upload>
           <ExportButton
-            style="display: inline-block;margin-right: 10px;"
+            style="display: inline-block; margin-right: 10px"
             :ex-url="'policy/limit/group/export'"
             ex-text="导出经销商配提套数"
             :ex-params="{ policyId: comCode || code }"
           />
           <el-button type="primary" size="mini" @click="hanleDownloadFilesPolicyLimitGroupPolicy">下载模板</el-button>
-          <!-- <el-button
-            v-if="policyLimitGroupList.length"
-            type="primary"
-            size="mini"
-            @click="()=>{
-              limitGroupvisible = true
-              handelLimitGroupData()
-            }"
-          >批量修改配提套数上限</el-button> -->
         </div>
         <el-row style="margin: 20px 0">
           <el-col :span="12">
@@ -307,13 +288,7 @@
               stripe
             >
               <el-table-column type="index" width="50" />
-              <el-table-column
-                prop="customerNumber"
-                label="经销商编号
-"
-                align="left"
-                min-width="300"
-              >
+              <el-table-column prop="customerNumber" label="经销商编号" align="left" min-width="300">
                 <template slot-scope="scope">
                   <CopyButton :copy-text="scope.row.customerNumber" />
                   <span>{{ scope.row.customerNumber }}</span>
@@ -345,16 +320,16 @@
                   </template>
                 </el-table-column>
               </template>
-              <!-- <el-table-column prop="orderNums" label="配提上限已下订单数" align="left">
+              <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
                 <template slot-scope="scope">
                   {{ scope.row.orderNums }}
                 </template>
               </el-table-column>
-              <el-table-column prop="examineOrderNums" label="配提上限已审订单数" align="left">
+              <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
                 <template slot-scope="scope">
                   {{ scope.row.examineOrderNums }}
                 </template>
-              </el-table-column> -->
+              </el-table-column>
             </el-table>
           </div>
           <!-- 分页 -->
@@ -395,6 +370,7 @@ import {
   updateLimitGrouppdate,
   updateLimitBatchupdate,
   getPolicyLimitGroupList
+
 } from '@/api/policy_list'
 import { downloadFiles, handleImport } from '@/utils/util'
 import ImageUpload from '@/components/Common/image-upload.vue'
@@ -404,7 +380,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
@@ -413,6 +389,7 @@ export default {
     return {
       keyword: '',
       keyword2: '',
+      specification: '',
       region: '0',
       baseURL: '',
       dcurrentPage: 1,
@@ -446,6 +423,9 @@ export default {
         title: '',
         type: ''
       },
+      linitVisible: false,
+      linitType: null,
+      recordSelected: [],
       conditionList: [],
       custoList: [],
       isEdit: 1,
@@ -619,7 +599,8 @@ export default {
         pageNum: this.policyList.currentPages,
         pageSize: this.policyList.pageSize,
         policyId: this.comCode || this.code,
-        keyword: this.keyword2
+        keyword: this.keyword2,
+        specification: this.specification
       }).then(res => {
         this.list = res.data.records
         console.log(this.list, '785787')
@@ -668,6 +649,7 @@ export default {
     // 重置筛选表单
     resetScreenForm2() {
       this.keyword2 = ''
+      this.specification = ''
       this.policyList.currentPages = 1
       this.getPolicyList()
     },

+ 162 - 30
src/views/sales_policy/components/details.vue

@@ -506,17 +506,29 @@
                   }"
                 >批量修改</el-button> -->
                 <template v-if="detail.type !== 'LIMIT'">
-
                   <el-button
                     v-if="list.length"
                     type="primary"
                     size="mini"
-                    @click="()=>{
-                      visible = true
-                      handelBatchData()
-                    }"
+                    @click="
+                      () => {
+                        visible = true
+                        handelBatchData()
+                      }
+                    "
                   >批量修改上限</el-button>
                 </template>
+                <el-button
+                  v-if="detail.flag == 0"
+                  type="primary"
+                  size="mini"
+                  @click="
+                    operationType = null
+                    linitVisible = true
+                    linitType = 'add'
+                    recordSelected = []
+                  "
+                >添加</el-button>
                 <el-divider />
               </div>
               <div>
@@ -529,8 +541,7 @@
                     fit
                     highlight-current-row
                     stripe
-                    @select-all="handleSelectionAllChange2"
-                    @selection-change="handleSelectionChange2"
+                    @selection-change="hanldeSelectionChange"
                   >
                     <el-table-column type="index" width="50" />
                     <el-table-column
@@ -561,21 +572,43 @@
                         {{ scope.row.materialNumber }}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="limitQty" label="购买量上限" align="left" min-width="200">
+                    <el-table-column prop="specification" label="规格型号" align="left" min-width="200">
                       <template slot-scope="scope">
-                        {{ scope.row.limitQty }}
+                        {{ scope.row.specification }}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
+
+                    <el-table-column prop="orderNums" label="已下订单台数" align="left" min-width="200">
                       <template slot-scope="scope">
                         {{ scope.row.orderNums }}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
+                    <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
                       <template slot-scope="scope">
                         {{ scope.row.examineOrderNums }}
                       </template>
                     </el-table-column>
+                    <el-table-column prop="limitQty" label="购买量上限" align="left" min-width="200">
+                      <template slot-scope="scope">
+                        {{ scope.row.limitQty }}
+                      </template>
+                    </el-table-column>
+                    <el-table-column fixed="right" label="操作" width="120">
+                      <template slot-scope="scope">
+                        <el-button
+                          type="text"
+                          size="mini"
+                          @click="operationType = null , (linitVisible = true), (linitType = 'edit'), (recordSelected = [scope.row])"
+                        >编辑</el-button>
+                        <el-popconfirm
+                          style="margin-left: 10px"
+                          title="是否确定需要克隆该项内容?"
+                          @onConfirm="handleDelLinit(scope.row.id)"
+                        >
+                          <el-button slot="reference" type="text" size="mini">删除</el-button>
+                        </el-popconfirm>
+                      </template>
+                    </el-table-column>
                   </el-table>
                 </div>
                 <!-- 分页 -->
@@ -595,7 +628,7 @@
 
             <div>
               <div>
-                <h4 style="display: inline-block; margin-right: 20px"> 经销商提货上限</h4>
+                <h4 style="display: inline-block; margin-right: 20px">经销商提货上限</h4>
                 <el-divider />
               </div>
               <div style="margin: 20px 0">
@@ -619,10 +652,12 @@
                     v-if="policyLimitGroupList.length"
                     type="primary"
                     size="mini"
-                    @click="()=>{
-                      limitGroupvisible = true
-                      handelLimitGroupData()
-                    }"
+                    @click="
+                      () => {
+                        limitGroupvisible = true
+                        handelLimitGroupData()
+                      }
+                    "
                   >批量修改配提套数上限</el-button>
                 </template>
                 <template v-else>
@@ -630,12 +665,25 @@
                     v-if="policyLimitGroupList.length"
                     type="primary"
                     size="mini"
-                    @click="()=>{
-                      buyNumvisible = true
-                      handelLimitGroupData()
-                    }"
+                    @click="
+                      () => {
+                        buyNumvisible = true
+                        handelLimitGroupData()
+                      }
+                    "
                   >批量修改上限</el-button>
                 </template>
+                <el-button
+                  v-if="detail.flag == 0"
+                  type="primary"
+                  size="mini"
+                  @click="
+                    operationType = 'group'
+                    linitVisible = true
+                    linitType = 'add'
+                    recordSelected = []
+                  "
+                >添加</el-button>
                 <!-- <el-button type="primary" size="mini" @click="hanleDownloadFilesPolicyLimitGroupPolicy"
                   >下载模板</el-button
                 > -->
@@ -698,16 +746,32 @@
                         </template>
                       </el-table-column>
                     </template>
-                    <!-- <el-table-column prop="orderNums" label="配提上限已下订单数" align="left" width="200">
+                    <el-table-column prop="orderNums" label="已下订单数" align="left" min-width="200">
                       <template slot-scope="scope">
                         {{ scope.row.orderNums }}
                       </template>
                     </el-table-column>
-                    <el-table-column prop="examineOrderNums" label="配提上限已审订单数" align="left" width="200">
+                    <el-table-column prop="examineOrderNums" label="已审订单数" align="left" min-width="200">
                       <template slot-scope="scope">
                         {{ scope.row.examineOrderNums }}
                       </template>
-                    </el-table-column> -->
+                    </el-table-column>
+                    <el-table-column fixed="right" label="操作" width="120">
+                      <template slot-scope="scope">
+                        <el-button
+                          type="text"
+                          size="mini"
+                          @click="operationType = 'group' , (linitVisible = true), (linitType = 'edit'), (recordSelected = [scope.row])"
+                        >编辑</el-button>
+                        <el-popconfirm
+                          style="margin-left: 10px"
+                          title="是否确定需要克隆该项内容?"
+                          @onConfirm="handleDelLimitGroup(scope.row.id)"
+                        >
+                          <el-button slot="reference" type="text" size="mini">删除</el-button>
+                        </el-popconfirm>
+                      </template>
+                    </el-table-column>
                   </el-table>
                 </div>
                 <!-- 分页 -->
@@ -772,7 +836,12 @@
           <el-col :span="24" :offset="0" style="margin-bottom: 20px">
             <div style="display: flex">
               <el-input v-model="limitQtyKeyWord" placeholder="输入关键字搜索" size="mini" />
-              <el-button style="margin-left: 20px" type="primary" size="mini" @click="handelBatchData('search')">查询</el-button>
+              <el-button
+                style="margin-left: 20px"
+                type="primary"
+                size="mini"
+                @click="handelBatchData('search')"
+              >查询</el-button>
               <el-button size="mini" @click="onReset">重置</el-button>
             </div>
           </el-col>
@@ -798,7 +867,7 @@
         </div>
         <span slot="footer">
           <el-button @click="handleDialogVisible">取消</el-button>
-          <el-button type="primary" @click="onSubmit($event,'limit')">确定</el-button>
+          <el-button type="primary" @click="onSubmit($event, 'limit')">确定</el-button>
         </span>
       </el-dialog>
       <el-dialog
@@ -812,12 +881,22 @@
         <el-row :gutter="20">
           <el-col :span="24" style="display: flex; align-items: center; margin-bottom: 20px">
             <el-col :span="4" :offset="0"> 配提套数上限 </el-col>
-            <el-col :span="8" :offset="0"> <el-input v-model.number="limitGroupNum" type="number" size="mini" /></el-col>
+            <el-col :span="8" :offset="0">
+              <el-input
+                v-model.number="limitGroupNum"
+                type="number"
+                size="mini"
+              /></el-col>
           </el-col>
           <el-col :span="24" :offset="0" style="margin-bottom: 20px">
             <div style="display: flex">
               <el-input v-model="limitGroupKeyWord" placeholder="输入关键字搜索" size="mini" />
-              <el-button style="margin-left: 20px" type="primary" size="mini" @click="handelLimitGroupData('search')">查询</el-button>
+              <el-button
+                style="margin-left: 20px"
+                type="primary"
+                size="mini"
+                @click="handelLimitGroupData('search')"
+              >查询</el-button>
               <el-button size="mini" @click="onLimitReset">重置</el-button>
             </div>
           </el-col>
@@ -906,6 +985,17 @@
       @close="handleConditionClose"
       @back="handleBack"
     />
+    <LinitVisible
+      v-if="linitVisible"
+      :policy-id="id || detail.code"
+      :linit-visible="linitVisible"
+      :data-list="recordSelected"
+      :linit-type="linitType"
+      :detail-type="detail.type"
+      :operation-type="operationType"
+      @cancel="linitVisible = false"
+      @sbumit="handleLinitSave"
+    />
   </div>
 </template>
 
@@ -923,12 +1013,17 @@ import {
   getPolicyList,
   updateLimitBatchupdate,
   getPolicyLimitGroupList,
-  updateLimitGrouppdate
+  updateLimitGrouppdate,
+  delLimit,
+  saveLimit,
+  delLimitGroup,
+  saveLimitGroup
 } from '@/api/policy_list'
 import { downloadFiles, handleImport } from '@/utils/util'
 import AddCondition from './AddCondition'
 import ImageUpload from '@/components/Common/image-upload.vue'
 import OperationRecords from './OperationRecords.vue'
+import LinitVisible from './LinitVisible.vue'
 
 import Minxin from '@/mixin'
 
@@ -937,7 +1032,8 @@ export default {
   components: {
     AddCondition,
     ImageUpload,
-    OperationRecords
+    OperationRecords,
+    LinitVisible
   },
   mixins: [Minxin],
   props: ['id', 'isShow'],
@@ -1041,7 +1137,11 @@ export default {
       limitPageSizes: 10,
       limitTableData: [],
       buyNumvisible: false,
-      minBuyNum: null
+      minBuyNum: null,
+      linitVisible: false,
+      linitType: null,
+      recordSelected: [],
+      operationType: null
     }
   },
   computed: {
@@ -1676,6 +1776,38 @@ export default {
       this.minBuyNum = null
       this.limitQtyKeyWord = ''
       this.maxBuyNumKeyWord = ''
+    },
+    hanldeSelectionChange(data) {
+      this.recordSelected = JSON.parse(JSON.stringify(data))
+    },
+    handleDelLinit(id) {
+      delLimit({ id }).then(res => {
+        this.$successMsg('删除成功')
+        this.getPolicyList()
+      })
+    },
+    handleDelLimitGroup(id) {
+      delLimitGroup({ id }).then(res => {
+        this.$successMsg('删除成功')
+        this.getPolicyLimitGroupList()
+      })
+    },
+    handleLinitSave({ dataList, type, operationType }) {
+      if (!operationType) {
+        saveLimit(dataList[0]).then(res => {
+          this.$successMsg(type === 'add' ? '新增成功' : '修改成功')
+          this.getPolicyList()
+          this.linitVisible = false
+        })
+      } else {
+        saveLimitGroup(dataList[0]).then(res => {
+          this.$successMsg(type === 'add' ? '新增成功' : '修改成功')
+          this.getPolicyLimitGroupList()
+          this.linitVisible = false
+        })
+      }
+      this.linitType = 'add'
+      this.operationType = null
     }
   }
 }

+ 15 - 5
src/views/sales_policy/components/editPolicy.vue

@@ -653,12 +653,21 @@ export default {
       })
     },
     setText(e, index, row, name) {
-      if (name === 'priceType') {
-        console.log(e, this.priceList.find(k => k.priceTypeId === e).priceTypeName)
-        this.dataList[index][name] = this.priceList.find(k => k.priceTypeId === e).priceTypeName
-        return
+      if (e) {
+        if (name === 'priceType') {
+          const item = this.priceList.find(k => k.priceTypeId === e)
+          this.dataList[index][name] = item.priceTypeName
+          this.$set(row, 'walletIds', [])
+          if (item.walletId) {
+            this.$set(row, 'walletIds', [...row.walletIds, item.walletId])
+          }
+          return
+        }
+        this.dataList[index][name] = row[name]
+      } else {
+        this.dataList[index][name] = ''
+        this.$set(row, 'walletIds', [])
       }
-      this.dataList[index][name] = row[name]
     },
     // 下载excel模板
     handleDownloadFiles() {
@@ -1152,6 +1161,7 @@ export default {
       })
     },
     handlePriceType(e) {
+      this.priceList = []
       if (e.saleTypeCode) {
         this.getPriceSalesRelaListV2(e.saleTypeCode)
       }

+ 0 - 0
src/views/basic_data/dealer/components/subMerchantDetail.vue → src/views/secondaryMerchant/components/subMerchantDetail.vue


+ 0 - 0
src/views/basic_data/dealer/components/subMerchantForm.vue → src/views/secondaryMerchant/components/subMerchantForm.vue


+ 0 - 0
src/views/basic_data/dealer/subMerchant.vue → src/views/secondaryMerchant/subMerchant.vue


+ 102 - 83
src/views/setting/account.vue

@@ -5,27 +5,26 @@
         <el-button
           icon="el-icon-refresh-right"
           size="small"
-          @click="refreshDepartment()"
           style="padding: 9px 10px; margin-right: 6px"
-        ></el-button>
-        <el-input placeholder="输入关键字进行过滤" size="small" clearable v-model="filterText"> </el-input>
+          @click="refreshDepartment()"
+        />
+        <el-input v-model="filterText" placeholder="输入关键字进行过滤" size="small" clearable />
       </div>
       <el-tree
+        ref="listTree"
         :data="departmentList"
         :props="defaultProps"
         default-expand-all
         highlight-current
         :expand-on-click-node="false"
         :filter-node-method="filterNode"
-        @node-click="handleNodeClick"
         node-key="id"
-        ref="listTree"
+        @node-click="handleNodeClick"
       >
-        <div class="custom-tree-node" slot-scope="{ node, data }">
+        <div slot-scope="{ node, data }" class="custom-tree-node">
           <i
             :class="data.children && data.children.length > 0 ? 'el-icon-folder-opened' : 'el-icon-document-remove'"
-          ></i
-          ><span>{{ node.label }}</span>
+          /><span>{{ node.label }}</span>
         </div>
       </el-tree>
     </div>
@@ -44,14 +43,13 @@
               <el-row :gutter="20">
                 <el-col :xs="24" :sm="12" :lg="8">
                   <el-form-item label="账号/用户名名称:" prop="name">
-                    <el-input v-model="screenForm.name" placeholder="请输入账号/用户名名称"></el-input>
+                    <el-input v-model="screenForm.name" placeholder="请输入账号/用户名名称" />
                   </el-form-item>
                 </el-col>
                 <el-col :xs="24" :sm="12" :lg="8">
                   <el-form-item label="角色:" prop="roleId">
-                    <el-select class="selectStyle" v-model="screenForm.roleId" placeholder="请选择" filterable>
-                      <el-option v-for="(v, i) in roleList" :key="i" :label="v.name" :value="v.adminRoleId">
-                      </el-option>
+                    <el-select v-model="screenForm.roleId" class="selectStyle" placeholder="请选择" filterable>
+                      <el-option v-for="(v, i) in roleList" :key="i" :label="v.name" :value="v.adminRoleId" />
                     </el-select>
                   </el-form-item>
                 </el-col>
@@ -65,13 +63,18 @@
           <el-button size="mini" type="primary" @click="openAccountForm('add')">添加账号</el-button>
         </div>
         <div class="fr">
-          <el-button size="mini" @click="handleDownload" v-if="checkBtnRole('download')">下载导入模板</el-button>
-          <ExportButton class="import-btn" :exUrl="'admin/user/user/listExport'" :exParams="exParams" />
-          <ImportButton class="import-btn"  im-text="批量变更仓库和产品分类" :imUrl="'admin/user/batch/update'" @importSuccess="getList" />
+          <el-button v-if="checkBtnRole('download')" size="mini" @click="handleDownload">下载导入模板</el-button>
+          <ExportButton class="import-btn" :ex-url="'admin/user/user/listExport'" :ex-params="exParams" />
+          <ImportButton
+            class="import-btn"
+            im-text="批量变更仓库和产品分类"
+            :im-url="'admin/user/batch/update'"
+            @importSuccess="getList"
+          />
 
           <el-upload
-            class="import-btn"
             v-if="checkBtnRole('import')"
+            class="import-btn"
             action=""
             :http-request="handleImport"
             :file-list="importFileList"
@@ -107,35 +110,49 @@
             label="账号"
             prop="userName"
             min-width="120"
-          ></el-table-column>
+          />
           <el-table-column
             show-overflow-tooltip
             align="center"
             label="用户名"
             prop="nickName"
             min-width="160"
-          ></el-table-column>
+          />
           <el-table-column
             show-overflow-tooltip
             align="center"
             label="角色"
             prop="roleName"
             min-width="100"
-          ></el-table-column>
+          />
+          <el-table-column
+            show-overflow-tooltip
+            align="center"
+            label="修改人"
+            prop="updateBy"
+            min-width="160"
+          />
+          <el-table-column
+            show-overflow-tooltip
+            align="center"
+            label="修改时间"
+            prop="updateTime"
+            min-width="160"
+          />
           <el-table-column
             show-overflow-tooltip
             align="center"
             label="创建时间"
             prop="createTime"
             min-width="160"
-          ></el-table-column>
+          />
           <el-table-column
             show-overflow-tooltip
             align="center"
             label="最后登录时间"
             prop="lastLoginTime"
             min-width="160"
-          ></el-table-column>
+          />
           <el-table-column show-overflow-tooltip align="center" label="状态" class-name="status-col">
             <template slot-scope="scope">
               <el-tag size="mini" :type="scope.row.status ? 'success' : 'danger'">{{
@@ -164,12 +181,16 @@
                 </el-popconfirm>
               </template>
 
-              <el-button type="text" @click="openAccountForm('edit', scope.row.adminUserId)" v-if="checkBtnRole('edit')"
-                >编辑</el-button
-              >
-              <el-button type="text" @click="handleReset(scope.row.adminUserId)" v-if="checkBtnRole('reset')"
-                >重置密码</el-button
-              >
+              <el-button
+                v-if="checkBtnRole('edit')"
+                type="text"
+                @click="openAccountForm('edit', scope.row.adminUserId)"
+              >编辑</el-button>
+              <el-button
+                v-if="checkBtnRole('reset')"
+                type="text"
+                @click="handleReset(scope.row.adminUserId)"
+              >重置密码</el-button>
 
               <!-- <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="deleteAccount(scope.row.id)" v-if="checkBtnRole('del')">
                 <el-button slot="reference" type="text">删除</el-button>
@@ -182,15 +203,14 @@
       <div class="pagination clearfix">
         <div class="fr">
           <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
             :total="listTotal"
-          >
-          </el-pagination>
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+          />
         </div>
       </div>
     </div>
@@ -211,119 +231,118 @@
         label-width="80px"
       >
         <el-form-item label="账号" prop="account">
-          <el-input v-model="AccountForm.account" autocomplete="off" placeholder="请输入账号"></el-input>
+          <el-input v-model="AccountForm.account" autocomplete="off" placeholder="请输入账号" />
         </el-form-item>
         <el-form-item label="用户名" prop="nickName">
-          <el-input v-model="AccountForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
+          <el-input v-model="AccountForm.nickName" autocomplete="off" placeholder="请输入用户名" />
         </el-form-item>
 
         <el-form-item label="角色组" prop="role">
           <el-select v-model="AccountForm.role" placeholder="请选择角色组" style="width: 100%" filterable>
             <el-option
-              :label="item.name"
-              :value="item.adminRoleId"
               v-for="(item, index) in roleList"
               :key="index"
-            ></el-option>
+              :label="item.name"
+              :value="item.adminRoleId"
+            />
           </el-select>
         </el-form-item>
-        <el-form-item label="部门" prop="department" v-show="roleObj.type === 0">
+        <el-form-item v-show="roleObj.type === 0" label="部门" prop="department">
           <el-tree
+            ref="tree"
             :data="departmentList"
             show-checkbox
             :check-strictly="true"
             node-key="adminWebsitId"
-            ref="tree"
             highlight-current
             :props="props"
-          >
-          </el-tree>
+          />
         </el-form-item>
-        <el-form-item label="经销商" prop="dealer" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
+        <el-form-item v-show="roleObj.type === 0 && roleObj.name === '经销商'" label="经销商" prop="dealer">
           <el-select v-model="AccountForm.dealer" placeholder="请选择经销商" style="width: 100%" filterable>
-            <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
+            <el-option v-for="(item, index) in dealerList" :key="index" :label="item.name" :value="item.id" />
           </el-select>
         </el-form-item>
-        <el-form-item label="商户" prop="merchant" v-show="roleObj.type === 1 || roleObj.type === 2">
+        <el-form-item v-show="roleObj.type === 1 || roleObj.type === 2" label="商户" prop="merchant">
           <el-select v-model="AccountForm.merchant" placeholder="请选择商户" style="width: 100%" filterable>
             <el-option
-              :label="item.adminCompanyName"
-              :value="item.adminCompanyId"
               v-for="(item, index) in merchantList"
               :key="index"
-            ></el-option>
+              :label="item.adminCompanyName"
+              :value="item.adminCompanyId"
+            />
           </el-select>
         </el-form-item>
-        <el-form-item label="集团公司" prop="isGroup" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
+        <el-form-item v-show="roleObj.type === 0 && roleObj.name === '经销商'" label="集团公司" prop="isGroup">
           <el-radio-group v-model="AccountForm.isGroup">
             <el-radio :label="true">是</el-radio>
             <el-radio :label="false">否</el-radio>
           </el-radio-group>
         </el-form-item>
         <el-form-item
+          v-show="roleObj.type === 0 && roleObj.name === '经销商' && !AccountForm.isGroup"
           label="所属集团"
           prop="company"
-          v-show="roleObj.type === 0 && roleObj.name === '经销商' && !AccountForm.isGroup"
         >
           <el-select v-model="AccountForm.company" placeholder="请选择所属集团" style="width: 100%" filterable>
-            <el-option :label="item.name" :value="item.id" v-for="(item, index) in groupList" :key="index"></el-option>
+            <el-option v-for="(item, index) in groupList" :key="index" :label="item.name" :value="item.id" />
           </el-select>
         </el-form-item>
-        <el-form-item label="是否折让" prop="isDiscount" v-show="roleObj.type === 0 && roleObj.name === '经销商'">
+        <el-form-item v-show="roleObj.type === 0 && roleObj.name === '经销商'" label="是否折让" prop="isDiscount">
           <el-radio-group v-model="AccountForm.isDiscount">
             <el-radio :label="true">是</el-radio>
             <el-radio :label="false">否</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item label="密码" prop="newPassword" v-if="AccountFormType == 'add'">
+        <el-form-item v-if="AccountFormType == 'add'" label="密码" prop="newPassword">
           <el-input
-            v-model="AccountForm.newPassword"
             ref="password1"
+            v-model="AccountForm.newPassword"
             autocomplete="off"
             placeholder="请输入密码"
             :type="passwordType1"
-          ></el-input>
+          />
           <span class="show-pwd" @click="showPwd(1)">
             <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
-        <el-form-item label="确认密码" prop="confirmPassword" v-if="AccountFormType == 'add'">
+        <el-form-item v-if="AccountFormType == 'add'" label="确认密码" prop="confirmPassword">
           <el-input
-            v-model="AccountForm.confirmPassword"
             ref="password2"
+            v-model="AccountForm.confirmPassword"
             autocomplete="off"
             placeholder="请再次输入密码"
             :type="passwordType2"
-          ></el-input>
+          />
           <span class="show-pwd" @click="showPwd(2)">
             <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
         <el-form-item label="可用仓库" prop="correspondIds">
           <el-select
-            multiple
             v-model="AccountForm.correspondIds"
+            multiple
             placeholder="请选择可用仓库"
             style="width: 100%"
             filterable
           >
-            <el-option :label="item.name" :value="item.id" v-for="(item, index) in stockList" :key="index"></el-option>
+            <el-option v-for="(item, index) in stockList" :key="index" :label="item.name" :value="item.id" />
           </el-select>
         </el-form-item>
         <el-form-item label="物料分类" prop="k3CategoryIds">
           <el-select
-            multiple
             v-model="AccountForm.k3CategoryIds"
+            multiple
             placeholder="请选择物料分类"
             style="width: 100%"
             filterable
           >
             <el-option
-              :label="item.name"
-              :value="item.id"
               v-for="(item, index) in categoryList"
               :key="index"
-            ></el-option>
+              :label="item.name"
+              :value="item.id"
+            />
           </el-select>
         </el-form-item>
       </el-form>
@@ -344,24 +363,24 @@
       <el-form ref="resetForm" :model="resetForm" :rules="resetFormRules" label-position="left" label-width="100px">
         <el-form-item label="输入新密码" prop="newPassword">
           <el-input
-            v-model="resetForm.newPassword"
             ref="password1"
+            v-model="resetForm.newPassword"
             autocomplete="off"
             placeholder="请输入新密码"
             :type="passwordType1"
-          ></el-input>
+          />
           <span class="show-pwd" @click="showPwd(1)">
             <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
           </span>
         </el-form-item>
         <el-form-item label="确认密码" prop="confirmPassword">
           <el-input
-            v-model="resetForm.confirmPassword"
             ref="password2"
+            v-model="resetForm.confirmPassword"
             autocomplete="off"
             placeholder="请再次输入新密码"
             :type="passwordType2"
-          ></el-input>
+          />
           <span class="show-pwd" @click="showPwd(2)">
             <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
           </span>
@@ -444,7 +463,7 @@ export default {
       }
     }
     return {
-      stockList: [], //仓库列表
+      stockList: [], // 仓库列表
       baseURL: process.env.VUE_APP_BASE_API,
       dataList: null, // 列表数据
       moduleList: null, // 模块列表
@@ -465,9 +484,9 @@ export default {
         account: '', // 账号
         nickName: '', // 用户名
         merchant: '', // 商户
-        dealer: '', //经销商
+        dealer: '', // 经销商
         role: '', // 角色组
-        correspondIds: [], //仓库
+        correspondIds: [], // 仓库
         isGroup: false,
         company: '',
         isDiscount: true,
@@ -540,7 +559,7 @@ export default {
     },
     'AccountForm.role'() {
       if (this.AccountForm.role) {
-        let index = findElem(this.roleList, 'adminRoleId', this.AccountForm.role)
+        const index = findElem(this.roleList, 'adminRoleId', this.AccountForm.role)
         this.roleObj = this.roleList[index]
       }
     }
@@ -552,9 +571,9 @@ export default {
     await this.getRoleList()
   },
   methods: {
-    //获取仓库仓位对应关系列表
+    // 获取仓库仓位对应关系列表
     async getStockList() {
-      let res = await getStockListStock({ pageSize: -1, pageNum: 1 })
+      const res = await getStockListStock({ pageSize: -1, pageNum: 1 })
       this.stockList = res.data.records
     },
     // 查询按钮权限
@@ -661,7 +680,7 @@ export default {
     getList() {
       this.listLoading = true
 
-      let params = {
+      const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         adminWebsitId: this.selectDepartment ? this.selectDepartment.adminWebsitId : '',
@@ -698,7 +717,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$refs.screenForm.resetFields()
+      this.$refs.screenForm.resetFields()
       this.currentPage = 1
       this.getList()
     },
@@ -790,7 +809,7 @@ export default {
             })
           })
 
-          let params = {
+          const params = {
             userName: this.AccountForm.account,
             nickName: this.AccountForm.nickName,
             roleId: this.AccountForm.role,
@@ -845,7 +864,7 @@ export default {
         type: 'warning'
       })
         .then(() => {
-          let AccountIds = []
+          const AccountIds = []
           this.tableSelection.forEach(item => {
             AccountIds.push(item.id)
           })
@@ -869,7 +888,7 @@ export default {
 
     // 操作 - 更改状态(type: 禁用0,启用1)
     changeStatus(id, type) {
-      type = type ? true : false
+      type = !!type
       changeAccountStatus({ adminUserId: id, status: type }).then(res => {
         this.getList()
         this.$successMsg()
@@ -918,7 +937,7 @@ export default {
     submitResetForm() {
       this.$refs.resetForm.validate(valid => {
         if (valid) {
-          let params = {
+          const params = {
             password: this.resetForm.newPassword,
             adminUserId: this.resetId
           }
@@ -933,7 +952,7 @@ export default {
 
     // 导出
     handleExport() {
-      let screenData = {
+      const screenData = {
         adminWebsitId: this.selectDepartment ? this.selectDepartment.websitId : '',
         keyword: this.screenForm.name
       }
@@ -961,7 +980,7 @@ export default {
       const formData = new FormData()
       formData.append('file', file)
 
-      let result = await handleImportTwo('/admin/user/importUser', formData)
+      const result = await handleImportTwo('/admin/user/importUser', formData)
       this.importLoading = false
       this.importFileList = []
       // console.log(result,999);
@@ -970,11 +989,11 @@ export default {
         this.$alert(result.message, '导入成功', {
           confirmButtonText: '确定'
         })
-        let blob = new Blob([result], {
+        const blob = new Blob([result], {
           type: 'application/vnd.ms-excel,charset=utf-8'
         })
-        let urll = window.URL.createObjectURL(blob)
-        let link = document.createElement('a')
+        const urll = window.URL.createObjectURL(blob)
+        const link = document.createElement('a')
         link.download = '导入失败数据.xlsx'
         link.href = urll
         link.click()

+ 197 - 28
src/views/supply/displace/displace_list.vue

@@ -62,7 +62,7 @@
     <div class="main-title">
       <div class="title">可置换产品信息</div>
       <div>
-        <!-- <el-radio-group v-model="isEquivalent" :disabled="orderList.length">
+        <el-radio-group v-model="isEquivalent" :disabled="!!orderList.length" @change="handleRadioChange">
           <el-radio
             v-for="item in [
               { label: '同价置换', value: 0 },
@@ -70,9 +70,8 @@
             ]"
             :key="item.value"
             :label="item.value"
-            >{{ item.label }}</el-radio
-          >
-        </el-radio-group> -->
+          >{{ item.label }}</el-radio>
+        </el-radio-group>
         <el-button size="mini" type="primary" @click="openKeGoodsDialog">选择机型</el-button>
       </div>
     </div>
@@ -218,7 +217,172 @@
       </div>
     </div>
     <div class="table">
-      <el-table :data="orderList" border fit highlight-current-row stripe>
+      <el-table v-show="isEquivalent === 0" :data="orderList" border fit highlight-current-row stripe>
+        <el-table-column align="left" label="订单号" prop="id" min-width="120" show-overflow-tooltip />
+        <el-table-column align="left" label="经销商信息" prop="displaceOrderId" min-width="250" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ scope.row.customerName + '(' + scope.row.customerNumber + ')' }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="被置换机型" prop="displaceOrderId" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="销售类型"
+            prop="saleTypeName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="产品名称"
+            prop="materialName"
+            min-width="160"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="规格型号"
+            prop="specification"
+            min-width="250"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="单价"
+            prop="price"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="可被置换数量"
+            prop="refundableQty"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="返利类型"
+            prop="rebateWalletName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="使用返利金额"
+            prop="payRebateAmount"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="格力折扣"
+            prop="totalDiscAmount"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="现金钱包"
+            prop="walletName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="实付金额"
+            prop="payAmount"
+            min-width="100"
+            show-overflow-tooltip
+          />
+        </el-table-column>
+        <el-table-column align="center" label="置换机型" prop="displaceOrderId" min-width="160" show-overflow-tooltip>
+          <el-table-column
+            align="left"
+            label="销售类型"
+            prop="saleTypeName"
+            min-width="160"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="产品名称"
+            prop="ke_materialName"
+            min-width="160"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="left"
+            label="规格型号"
+            prop="ke_specification"
+            min-width="350"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="单价"
+            prop="price"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column align="right" label="置换数量" prop="ke_refundableQty" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.ke_refundableQty" size="mini" type="number" />
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="返利类型"
+            prop="rebateWalletName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column
+            align="right"
+            label="使用返利金额"
+            prop="singleRebateAmount"
+            min-width="100"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.singleRebateAmount * scope.row.ke_refundableQty }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="right"
+            label="格力折扣"
+            prop="discAmount"
+            min-width="100"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              {{ scope.row.discAmount * scope.row.ke_refundableQty }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
+            label="现金钱包"
+            prop="walletName"
+            min-width="100"
+            show-overflow-tooltip
+          />
+          <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{
+                (scope.row.price * scope.row.ke_refundableQty) -
+                  ( scope.row.singleRebateAmount * scope.row.ke_refundableQty) -
+                  ( scope.row.discAmount*scope.row.ke_refundableQty)
+              }}
+            </template>
+          </el-table-column>
+        </el-table-column>
+        <el-table-column align="center" label="操作" min-width="100" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteOrderList(scope.$index)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-table v-show="isEquivalent === 1" :data="orderList" border fit highlight-current-row stripe>
         <el-table-column align="left" label="订单号" prop="id" min-width="120" show-overflow-tooltip />
         <el-table-column align="left" label="经销商信息" prop="displaceOrderId" min-width="250" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -949,7 +1113,7 @@ export default {
         { label: '家用产品价格表', value: '2' },
         { label: '商用产品价格表', value: '3' }
       ],
-      isEquivalent: 1,
+      isEquivalent: 0,
       saleList: [],
       rebateSaletypelist: [],
       priceTypeLilst: []
@@ -959,8 +1123,7 @@ export default {
     keGoodsList: {
       deep: true,
       handler: function(val, oal) {
-        if (this.orderList.length && this.type === 2) {
-
+        if (this.orderList.length && this.type === 2 && this.isEquivalent === 1) {
           this.orderList.forEach(item => {
             item.ke_materialName = val[0].name
             item.ke_specification = val[0].specification
@@ -973,9 +1136,7 @@ export default {
             item.ke_walletRebateId = val[0].walletRebateId
             item.ke_discAmount = val[0].discAmount
             item.ke_rebateRate = val[0].rebateRate
-
           })
-
         }
       }
     }
@@ -1021,6 +1182,7 @@ export default {
           this.$set(row, 'rebateWalletName', item.name)
           this.$set(row, 'walletRebateId', item.walletRebateId)
           this.$set(row, 'rebateRate', item.rebateRate)
+          console.log(item.rebateRate)
         }
       } else {
         this.$set(row, 'rebateWalletName', '')
@@ -1231,14 +1393,16 @@ export default {
       }
       // 批量置换(单选)
       else {
-        this.$set(item, 'saleTypeName', '')
-        this.$set(item, 'saleTypeCode', '')
-        this.$set(item, 'saleTypeId', '')
-        this.$set(item, 'price', 0)
-        this.$set(item, 'discAmount', 0)
-        this.$set(item, 'rebateWalletName', '')
-        this.$set(item, 'walletRebateId', '')
-        this.$set(item, 'rebateRate', '')
+        if (this.isEquivalent === 1) {
+          this.$set(item, 'saleTypeName', '')
+          this.$set(item, 'saleTypeCode', '')
+          this.$set(item, 'saleTypeId', '')
+          this.$set(item, 'price', 0)
+          this.$set(item, 'discAmount', 0)
+          this.$set(item, 'rebateWalletName', '')
+          this.$set(item, 'walletRebateId', '')
+          this.$set(item, 'rebateRate', '')
+        }
 
         this.keGoodsList = [item]
       }
@@ -1337,14 +1501,16 @@ export default {
           item.ke_materialName = this.keGoodsList[0].name
           item.ke_specification = this.keGoodsList[0].specification
           item.ke_refundableQty = ''
-          item.ke_saleTypeName = this.keGoodsList[0].saleTypeName
-          item.ke_saleTypeCode = this.keGoodsList[0].saleTypeCode
-          item.ke_saleTypeId = this.keGoodsList[0].saleTypeId
-          item.ke_price = this.keGoodsList[0].price
-          item.ke_rebateWalletName = this.keGoodsList[0].rebateWalletName
-          item.ke_walletRebateId = this.keGoodsList[0].walletRebateId
-          item.ke_discAmount = this.keGoodsList[0].discAmount
-          item.ke_rebateRate = this.keGoodsList[0].rebateRate
+          if (this.isEquivalent === 1) {
+            item.ke_saleTypeName = this.keGoodsList[0].saleTypeName
+            item.ke_saleTypeCode = this.keGoodsList[0].saleTypeCode
+            item.ke_saleTypeId = this.keGoodsList[0].saleTypeId
+            item.ke_price = this.keGoodsList[0].price
+            item.ke_rebateWalletName = this.keGoodsList[0].rebateWalletName
+            item.ke_walletRebateId = this.keGoodsList[0].walletRebateId
+            item.ke_discAmount = this.keGoodsList[0].discAmount
+            item.ke_rebateRate = this.keGoodsList[0].rebateRate
+          }
         })
         this.orderList = this.orderList.concat(orderList)
       }
@@ -1386,11 +1552,11 @@ export default {
           return {
             orderId: item.id,
             orderItemId: item.orderItemId,
-            displaceQty: item.ke_refundableQty
+            displaceQty: item.ke_refundableQty,
+            flag: !this.isEquivalent ? 1 : 2
           }
         })
       }
-      console.log(params, 999)
       addDisplace(params).then(res => {
         this.$successMsg('提交成功')
         this.resetForm()
@@ -1402,6 +1568,9 @@ export default {
       this.beiGoodsList = []
       this.keGoodsList = []
       this.orderList = []
+    },
+    handleRadioChange() {
+      this.keGoodsList = []
     }
   }
 }

+ 2 - 0
src/views/supply/engin/components/commerce_detail.vue

@@ -230,6 +230,8 @@
                 {{ scope.row.payRebateAmount | numToFixed }}
               </template>
             </el-table-column>
+            <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
             <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.discAmount | numToFixed }}

+ 3 - 1
src/views/supply/engin/components/commerce_examine.vue

@@ -200,6 +200,8 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
@@ -361,7 +363,7 @@ export default {
           examineCom(params).then(res => {
             this.$successMsg()
             this.goBack()
-            
+
           })
         })
         .catch(() => {})

+ 16 - 6
src/views/supply/engin/components/commerce_form.vue

@@ -318,6 +318,8 @@
             {{ (scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100 }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="center" label="格力折扣" prop="zk" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.qty * scope.row.discAmount }}
@@ -391,7 +393,7 @@
     <div class="page-footer">
       <div class="footer">
         <!-- <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button> -->
-        <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
+        <el-button type="primary" :loading="btnLoading" @click="clickSubmitForm(2)">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" style="margin-left: 10px" @onConfirm="goBack">
           <el-button slot="reference">返回列表</el-button>
         </el-popconfirm>
@@ -581,7 +583,8 @@ export default {
       flag: false,
       isFirst: false,
       salesmanList: [],
-      isPlanOrder: ''
+      isPlanOrder: '',
+      btnLoading: false
     }
   },
 
@@ -1032,6 +1035,7 @@ export default {
 
     // 保存 / 提交审核
     clickSubmitForm(type) {
+      this.btnLoading = true
       this.$refs.mainForm.validate(valid => {
         if (valid) {
           if (this.goodsList.length < 1) {
@@ -1105,7 +1109,9 @@ export default {
               editCom(params).then(res => {
                 this.$successMsg('编辑成功')
                 this.goBack()
-                
+
+              }).finally(() => {
+                this.btnLoading = false
               })
             } else {
               params.customerNumber = this.mainForm.jxsNum
@@ -1114,7 +1120,9 @@ export default {
               addCom(params).then(res => {
                 this.$successMsg('新增成功')
                 this.goBack()
-                
+
+              }).finally(() => {
+                this.btnLoading = false
               })
             }
           } else if (type === 2) {
@@ -1124,8 +1132,10 @@ export default {
             submitCom(params).then(res => {
               this.$successMsg('提交审核成功')
               this.goBack()
-              
-            })
+
+            }).finally(() => {
+                this.btnLoading = false
+              })
           }
         }
       })

+ 3 - 1
src/views/supply/engin/components/commerce_return.vue

@@ -182,6 +182,8 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}
@@ -353,7 +355,7 @@ export default {
           returnCom(params).then(res => {
             this.$successMsg()
             this.goBack()
-           
+
           })
         })
         .catch(() => {})

+ 6 - 4
src/views/supply/engin/components/engin_form.vue

@@ -963,10 +963,10 @@ export default {
             if (this.listItem) {
               params.enginInfoId = this.listItem.enginInfoId
               editEngin(params).then(res => {
-                this.btnLoading = false
-
                 this.$successMsg('编辑成功')
                 this.goBack()
+              }).finally(() => {
+                this.btnLoading = false
               })
             } else {
               params.customerNumber = this.mainForm.jxsNum
@@ -974,9 +974,9 @@ export default {
               params.customerId = this.mainForm.jxsId
               addEngin(params).then(res => {
                 this.$successMsg('保存成功')
-                this.btnLoading = false
-
                 this.goBack()
+              }).finally(() => {
+                this.btnLoading = false
               })
             }
           } else {
@@ -990,6 +990,8 @@ export default {
             submitEngin(params).then(res => {
               this.$successMsg('提交审核成功')
               this.goBack()
+            }).finally(() => {
+              this.btnLoading = false
             })
           }
         }

+ 2 - 0
src/views/supply/engin/components/home_detail.vue

@@ -289,6 +289,8 @@
                 {{ scope.row.payRebateAmount | numToFixed }}
               </template>
             </el-table-column>
+            <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
             <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.discAmount | numToFixed }}

+ 2 - 0
src/views/supply/engin/components/home_examine.vue

@@ -354,6 +354,8 @@
             {{ ((scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100) | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}

+ 2 - 0
src/views/supply/engin/components/home_form.vue

@@ -384,6 +384,8 @@
             {{ (scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100 }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="center" label="格力折扣" prop="ko" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.qty * scope.row.discAmount }}

+ 2 - 0
src/views/supply/engin/components/home_return.vue

@@ -271,6 +271,8 @@
             {{ scope.row.rebateAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.discAmount | numToFixed }}

+ 21 - 2
src/views/supply/pickup/components/pickup_form.vue

@@ -281,7 +281,17 @@
               </template>
             </el-table-column>
           </template>
-
+          <el-table-column
+            align="left"
+            label="经销商订单"
+            prop="customerOrderId"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.customerOrderId" placeholder="请输入" size="mini" clearable @input="handleOrderIdChange($event, scope.row)" />
+            </template>
+          </el-table-column>
           <el-table-column
             align="left"
             label="发货申请单"
@@ -991,7 +1001,7 @@ export default {
             prop: 'warehouse',
             width: 200
           }
-        },
+        }
       ]
     }
   },
@@ -1061,6 +1071,13 @@ export default {
         }
       })
     },
+    handleOrderIdChange(e, row) {
+      this.deliverList.forEach(item => {
+        if (item.invoiceId === row.invoiceId) {
+          this.$set(item, 'customerOrderId', e)
+        }
+      })
+    },
     handleInput(e, id, type) {
       console.log(e)
       this.deliverList.forEach(k => {
@@ -1253,6 +1270,7 @@ export default {
         this.deliverList = res.data
         this.deliverList.forEach(k => {
           this.$set(k, 'warehouseFlag', null)
+          this.$set(k, 'customerOrderId', k.customerOrderId || null)
           // 注释默认不选择仓库
           // if (this.mainForm.pickupWay == 2 && this.logisticsNumber === '001') {
           //   if (k.refLinkman || k.refPhone || k.refInstallAddress) {
@@ -1368,6 +1386,7 @@ export default {
         }
         orderList.push({
           warehouseFlag: item.warehouseFlag,
+          customerOrderId: item.customerOrderId,
           address: item.address,
           id: this.listItem ? item.id : '',
           invoiceOrderId: item.invoiceOrderId,

+ 2 - 0
src/views/supply/policy/components/retail_detail.vue

@@ -160,6 +160,8 @@
               {{ scope.row.payRebateAmount | numToFixed }}
             </template>
           </el-table-column>
+          <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
           <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalDiscAmount | numToFixed }}

+ 3 - 1
src/views/supply/policy/components/retail_examine.vue

@@ -174,6 +174,8 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column
           align="center"
           label="格力折扣"
@@ -379,7 +381,7 @@ export default {
         .then(res => {
           this.$successMsg('审批成功')
           this.goBack()
-         
+
         })
         .finally(res => {
           this.formLoading = false

+ 6 - 0
src/views/supply/policy/components/retail_form.vue

@@ -177,6 +177,8 @@
             {{ ((scope.row.price - scope.row.discAmount) * scope.row.qty * ((scope.row.rebateRate || 0) * 100)) / 100 }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" min-width="100" prop="compute_zkAmount" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ (scope.row.qty * scope.row.discAmount) | numToFixed }}
@@ -1938,6 +1940,8 @@ export default {
               this.$successMsg('编辑成功')
               this.btnLoading = false
               this.goBack()
+            }).finally(() => {
+              this.btnLoading = false
             })
           } else {
             console.log('添加成功', this.policyConditionId)
@@ -1950,6 +1954,8 @@ export default {
               this.btnLoading = false
 
               this.goBack()
+            }).finally(() => {
+              this.btnLoading = false
             })
           }
         }

+ 2 - 0
src/views/supply/retail/components/retail_detail.vue

@@ -176,6 +176,8 @@
               {{ scope.row.payRebateAmount | numToFixed }}
             </template>
           </el-table-column>
+          <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
           <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
             <template slot-scope="scope">
               {{ scope.row.totalDiscAmount | numToFixed }}

+ 2 - 0
src/views/supply/retail/components/retail_examine.vue

@@ -146,6 +146,8 @@
             {{ scope.row.payRebateAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.totalDiscAmount | numToFixed }}

+ 6 - 0
src/views/supply/retail/components/retail_form.vue

@@ -245,6 +245,8 @@
             }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column align="right" label="格力折扣" prop="compute_zkAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ (scope.row.qty * scope.row.discAmount) | numToFixed }}
@@ -1139,6 +1141,8 @@ export default {
               this.btnLoading = false
 
               this.goBack()
+            }).finally(() => {
+              this.btnLoading = false
             })
           } else {
             addData(params).then(res => {
@@ -1146,6 +1150,8 @@ export default {
               this.btnLoading = false
 
               this.goBack()
+            }).finally(() => {
+              this.btnLoading = false
             })
           }
         }

+ 22 - 20
src/views/supply/retail/components/retail_return.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="detail-container">
-    <el-page-header @back="goBack" content="退订"></el-page-header>
+    <el-page-header content="退订" @back="goBack" />
 
     <div class="main-title">
       <div class="title">
@@ -69,62 +69,62 @@
         show-summary
         :summary-method="$getSummaries"
       >
-        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="序号" type="index" width="50" />
         <el-table-column
           align="center"
           label="销售类型"
           prop="saleTypeName"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="center"
           label="物料编码"
           prop="materialCode"
           min-width="120"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="center"
           label="产品编码"
           prop="materialOldNumber"
           min-width="120"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="center"
           label="产品名称"
           prop="materialName"
           min-width="160"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="center"
           label="规格型号"
           prop="specification"
           min-width="160"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="center"
           label="单位"
           prop="unit"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="单价" prop="price" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price | numToFixed }}
           </template>
         </el-table-column>
-        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="right" label="数量" prop="qty" min-width="100" show-overflow-tooltip />
         <el-table-column
           align="center"
           label="已退订数量"
           prop="retiredQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
 
         <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -137,7 +137,7 @@
           prop="customerWalletName2"
           min-width="140"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.rebateAmount | numToFixed }}
@@ -148,13 +148,15 @@
             {{ scope.row.totalDiscAmount | numToFixed }}
           </template>
         </el-table-column>
+        <el-table-column align="right" label="返利比例" min-width="100" prop="rebateRate" show-overflow-tooltip />
+
         <el-table-column
           align="center"
           label="现金钱包"
           prop="customerWalletName"
           min-width="140"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.payAmount | numToFixed }}
@@ -171,17 +173,17 @@
           prop="directTransferQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column
           align="right"
           label="可退数量"
           prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
-        ></el-table-column>
+        />
         <el-table-column align="right" label="退订数量" prop="tdQty" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-input v-model="scope.row.tdQty" size="small" type="number" @mousewheel.native.prevent></el-input>
+            <el-input v-model="scope.row.tdQty" size="small" type="number" @mousewheel.native.prevent />
           </template>
         </el-table-column>
         <el-table-column
@@ -190,8 +192,8 @@
           prop="remark"
           min-width="160"
           show-overflow-tooltip
-        ></el-table-column>
-        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
+        />
+        <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip />
       </el-table>
     </div>
 
@@ -217,7 +219,7 @@
 
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{
+        <el-button type="primary" :loading="formLoading" @click="clickSubmitForm">{{
           formLoading ? '提交中 ...' : '提 交'
         }}</el-button>
         <el-button @click="goBack">返回列表</el-button>
@@ -232,7 +234,6 @@ import { getDetail, returnData } from '@/api/supply/retail'
 export default {
   name: 'RetailReturn',
   componentName: 'RetailReturn',
-  props: ['listItem'],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -241,10 +242,11 @@ export default {
         { label: '审核通过', value: 'OK' }
         // { label: '审核驳回', value: 'FAIL' },,
       ]
-      let obj = statusList.find(o => o.value == val)
+      const obj = statusList.find(o => o.value == val)
       return obj ? obj.label : ''
     }
   },
+  props: ['listItem'],
   data() {
     return {
       detailData: {},

Деякі файли не було показано, через те що забагато файлів було змінено