Browse Source

内贸修改

lichao 4 years ago
parent
commit
611c60de98

+ 3 - 3
src/views/basicData/productInformation/configuration/mainList.json

@@ -78,13 +78,13 @@
       "overHidden": true
     },
     {
-      "label": "规格尺寸1",
+      "label": "负荷指数",
       "prop": "specsOne",
       "width": 100,
       "overHidden": true
     },
     {
-      "label": "规格尺寸2",
+      "label": "速级",
       "prop": "specsTwo",
       "width": 100,
       "overHidden": true
@@ -96,7 +96,7 @@
       "overHidden": true
     },
     {
-      "label": "级别",
+      "label": "加强型",
       "prop": "level",
       "width": 100,
       "overHidden": true

+ 21 - 25
src/views/businessManagement/deliveryNotice/configuration/commodity.json

@@ -6,14 +6,17 @@
   "addBtn": false,
   "searchShow": true,
   "searchShowBtn": false,
-  "menu": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
   "searchSpan": 8,
   "searchMenuSpan": 8,
   "searchMenuPosition": "right",
   "border": true,
   "index": true,
   "selection": true,
-  "viewBtn": true,
   "dialogClickModal": false,
   "column": [
     {
@@ -34,9 +37,9 @@
       "label": "商品名称",
       "prop": "cname",
       "slot": true,
+      "search": true,
       "width": 100,
       "overHidden": true,
-      "search": true,
       "rules": [
         {
           "required": true,
@@ -59,26 +62,32 @@
       }]
     },
     {
-      "label": "规格编码",
+      "label": "规格",
       "prop": "typeno",
       "search": false,
       "overHidden": true
     },
     {
-      "label": "品牌",
-      "prop": "brand",
+      "label": "负荷指数",
+      "prop": "specsOne",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "花纹",
-      "prop": "brandItem",
+      "label": "速级",
+      "prop": "specsTwo",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "花纹",
+      "prop": "brandItem",
       "slot": true,
       "overHidden": true
     },
@@ -96,19 +105,7 @@
     },
     {
       "label": "供应商",
-      "prop": "providers",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
+      "prop": "corpName",
       "slot": true,
       "overHidden": true
     },
@@ -130,8 +127,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true,
-      "overHidden": true
+      "slot": true
     }
   ]
 }

+ 20 - 7
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -454,12 +454,13 @@ import {
   corpsattn,
   corpsbank,
   corpsitem,
-  getList,
+  // getList,
   sendOutGoods,
   revokeOutGoods,
   confirmArrival,
   cancelArrival
 } from "@/api/basicData/deliveryNotice"
+import {getList} from "@/api/basicData/commodityType";
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"
@@ -1618,14 +1619,18 @@ export default {
     //返回列表
     backToList() {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
         contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {
@@ -1650,14 +1655,18 @@ export default {
             return this.$message.error('商品信息为空')
           }
           let getGoodsList = []
+          let getGiftList = []
           let getFeeList = this.$refs.feeInfo.submitData()
           if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-            getGoodsList = this.goodsShowData.concat(this.contactsData)
+            getGiftList = this.goodsShowData
+            getGoodsList = this.contactsData
           } else {
-            getGoodsList = this.goodsShowData.concat(this.giftData)
+            getGoodsList = this.goodsShowData
+            getGiftList = this.giftData
           }
           if (contrastObj(this.form, this.oldForm) ||
             contrastList(getGoodsList, this.oldGoodsList) ||
+            contrastList(getGiftList, this.oldGiftList) ||
             contrastList(getFeeList, this.oldFeesList) ||
             contrastList(this.bankOfDepositData, this.oldUploadList)
           ) {
@@ -1727,14 +1736,18 @@ export default {
     // 确认到货
     confirmArrival() {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
         contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {

+ 14 - 1
src/views/businessManagement/deliveryNotice/index.vue

@@ -21,7 +21,8 @@
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
                  @tree-load="treeLoad"
-                 @saveColumn="saveColumn">
+                 @saveColumn="saveColumn"
+                 @resetColumn="resetColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -400,6 +401,18 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    async resetColumn() {
+      const inSave = await this.delColumnData(
+        this.getColumnName(20),
+        option
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.option = option;
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 16 - 23
src/views/businessManagement/purchaseOrder/configuration/commodity.json

@@ -36,8 +36,8 @@
     {
       "label": "商品名称",
       "prop": "cname",
-      "search": true,
       "slot": true,
+      "search": true,
       "width": 100,
       "overHidden": true,
       "rules": [
@@ -62,26 +62,32 @@
       }]
     },
     {
-      "label": "规格编码",
+      "label": "规格",
       "prop": "typeno",
       "search": false,
       "overHidden": true
     },
     {
-      "label": "品牌",
-      "prop": "brand",
+      "label": "负荷指数",
+      "prop": "specsOne",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "花纹",
-      "prop": "brandItem",
+      "label": "速级",
+      "prop": "specsTwo",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "花纹",
+      "prop": "brandItem",
       "slot": true,
       "overHidden": true
     },
@@ -99,19 +105,7 @@
     },
     {
       "label": "供应商",
-      "prop": "providers",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
+      "prop": "corpName",
       "slot": true,
       "overHidden": true
     },
@@ -133,8 +127,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true,
-      "overHidden": true
+      "slot": true
     }
   ]
 }

+ 2 - 1
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -494,11 +494,12 @@ import {
   corpsattn,
   corpsbank,
   corpsitem,
-  getList,
+  // getList,
   getDeptLazyTreeS,
   getSysNo,
   generateShipment
 } from "@/api/basicData/purchaseOrder"
+import {getList} from "@/api/basicData/commodityType";
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"

+ 14 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -19,7 +19,8 @@
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
                  @tree-load="treeLoad"
-                 @saveColumn="saveColumn">
+                 @saveColumn="saveColumn"
+                 @resetColumn="resetColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" icon="el-icon-copy-document" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -367,6 +368,18 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    async resetColumn() {
+      const inSave = await this.delColumnData(
+        this.getColumnName(17),
+        option
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.option = option;
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
     // 申请货款
     applyPayment() {
       this.applyPaymentList = []

+ 21 - 24
src/views/businessManagement/receipt/configuration/commodity.json

@@ -6,14 +6,17 @@
   "addBtn": false,
   "searchShow": true,
   "searchShowBtn": false,
-  "menu": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
   "searchSpan": 8,
   "searchMenuSpan": 8,
   "searchMenuPosition": "right",
   "border": true,
   "index": true,
   "selection": true,
-  "viewBtn": true,
   "dialogClickModal": false,
   "column": [
     {
@@ -34,6 +37,7 @@
       "label": "商品名称",
       "prop": "cname",
       "slot": true,
+      "search": true,
       "width": 100,
       "overHidden": true,
       "rules": [
@@ -58,26 +62,32 @@
       }]
     },
     {
-      "label": "规格编码",
+      "label": "规格",
       "prop": "typeno",
       "search": false,
       "overHidden": true
     },
     {
-      "label": "品牌",
-      "prop": "brand",
+      "label": "负荷指数",
+      "prop": "specsOne",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "花纹",
-      "prop": "brandItem",
+      "label": "速级",
+      "prop": "specsTwo",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "品牌",
+      "prop": "brand",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
       "slot": true,
       "overHidden": true
     },
@@ -95,19 +105,7 @@
     },
     {
       "label": "供应商",
-      "prop": "providers",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
+      "prop": "corpName",
       "slot": true,
       "overHidden": true
     },
@@ -129,8 +127,7 @@
     {
       "label": "备注",
       "prop": "remarks",
-      "slot": true,
-      "overHidden": true
+      "slot": true
     }
   ]
 }

+ 2 - 1
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -362,10 +362,11 @@ import {
   corpsbank,
   corpsfiles,
   corpsitem,
-  getList,
+  // getList,
   sendInGoods,
   revokeInGoods
 } from "@/api/basicData/receipt"
+import {getList} from "@/api/basicData/commodityType";
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
 import bankOfDeposit from "./configuration/bankOfDeposit.json"

+ 14 - 1
src/views/businessManagement/receipt/index.vue

@@ -21,7 +21,8 @@
                  @refresh-change="refreshChange"
                  @on-load="onLoad"
                  @tree-load="treeLoad"
-                 @saveColumn="saveColumn">
+                 @saveColumn="saveColumn"
+                 @resetColumn="resetColumn">
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
@@ -397,6 +398,18 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    async resetColumn() {
+      const inSave = await this.delColumnData(
+        this.getColumnName(23),
+        option
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.option = option;
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
   }
 }
 </script>

+ 12 - 18
src/views/businessManagement/salesOrder/configuration/commodity.json

@@ -68,20 +68,26 @@
       "overHidden": true
     },
     {
-      "label": "品牌",
-      "prop": "brand",
+      "label": "负荷指数",
+      "prop": "specsOne",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "花纹",
-      "prop": "brandItem",
+      "label": "速级",
+      "prop": "specsTwo",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brand",
       "slot": true,
       "overHidden": true
     },
     {
-      "label": "规格尺寸",
-      "prop": "specs",
+      "label": "花纹",
+      "prop": "brandItem",
       "slot": true,
       "overHidden": true
     },
@@ -104,18 +110,6 @@
       "overHidden": true
     },
     {
-      "label": "计量单位",
-      "prop": "unit",
-      "slot": true,
-      "overHidden": true
-    },
-    {
-      "label": "包装单位",
-      "prop": "packgeunit",
-      "slot": true,
-      "overHidden": true
-    },
-    {
       "label": "商品图片",
       "prop": "url",
       "type": "upload",

+ 129 - 22
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -23,7 +23,7 @@
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="true">请核数据</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status > 0" @click.native="pleaseCheck">请核数据</el-dropdown-item>
             <el-dropdown-item v-if="false">审核进度</el-dropdown-item>
             <el-dropdown-item v-if="false">撤销请核</el-dropdown-item>
           </el-dropdown-menu>
@@ -352,7 +352,7 @@
               <el-button type="warning"
                          icon="el-icon-plus"
                          size="small"
-                         :disabled="selection.length < 1 || detailData.seeDisabled"
+                         :disabled="selection.length < 1 || detailData.seeDisabled || form.status != 3"
                          @click="getShipmentD"
                          v-show="goodsActives == 'goods'">生成客户确认
               </el-button>
@@ -364,6 +364,12 @@
                          v-show="goodsActives == 'goods'"
               >报 表</el-button>
               <el-button
+                type="info"
+                size="small"
+                v-show="goodsActives == 'goods'"
+                @click="exportHandle"
+              >导 出</el-button>
+              <el-button
                 type="primary"
                 size="small"
                 icon="el-icon-download"
@@ -379,6 +385,7 @@
                 accept=".xls,.xlsx"
                 multiple
                 :on-success="importTemplate"
+                :on-error="uploadError"
                 style="float: right"
               >
                 <el-button
@@ -722,12 +729,14 @@ import {
   corpsbank,
   corpsfiles,
   corpsitem,
-  getList,
+  // getList,
   detailList,
   generateShipment,
   saveSell,
   getlistBankBy,
+  pleaseCheck,
 } from "@/api/basicData/configuration"
+import {getList} from "@/api/basicData/commodityType";
 import {getCorpDetail} from "@/api/maintenance/overpayment"
 import {integralDetail} from "@/api/maintenance/integral"
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
@@ -1405,6 +1414,7 @@ export default {
         orderStatus: "录入"
       },
       oldGoodsList: [],
+      oldGiftList: [],
       oldFeesList: [],
       oldUploadList: [],
       // 采购价格
@@ -1597,9 +1607,11 @@ export default {
         }
         this.oldForm = Object.assign({}, this.form)
         this.oldGoodsList = []
+        this.oldGiftList = []
         this.oldFeesList = []
         this.oldUploadList = []
         this.oldGoodsList = this.deepClone(this.contactsData)
+        this.oldGiftList = this.deepClone(this.giftData)
         this.oldFeesList = this.deepClone(this.advantageProjectData)
         this.oldUploadList = this.deepClone(this.bankOfDepositData)
         if (isCopy) {
@@ -1652,15 +1664,19 @@ export default {
     // 生成采购单
     saveSell() {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
-        contrastList(getFeeList, this.oldFeesList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
+        // contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
@@ -1723,6 +1739,25 @@ export default {
     openReport() {
       this.switchDialog =! this.switchDialog;
     },
+    // 导出
+    exportHandle() {
+      this.$confirm('是否导出产品信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/blade-client/goodsdesc/export-out-info?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      })
+    },
     // 下载模板
     downloadHandle() {
       this.$confirm('是否下载模板文件?', '提示', {
@@ -1750,17 +1785,17 @@ export default {
       this.openFullScreen(true)
       let goodsData = []
       res.data.forEach(item => {
-        getMarketPrice({code: item.code}).then(res => {
-          if (res.data.data.length > 0) {
-            this.$set(item, 'price', res.data.data[0].salesPrice)
+        getMarketPrice({code: item.code}).then(response => {
+          if (response.data.data.length > 0) {
+            this.$set(item, 'price', response.data.data[0].salesPrice)
           } else {
             this.$set(item, 'price', '0')
           }
           this.$set(item, 'amount', (Number(item.price) * Number(item.orderQuantity)).toFixed(2))
         })
-        getPurchasePrice({code: item.code}).then(res => {
-          if (res.data.data.length > 0) {
-            this.$set(item, 'purchaseAmount', res.data.data[0].purchasePrice)
+        getPurchasePrice({code: item.code}).then(response => {
+          if (response.data.data.length > 0) {
+            this.$set(item, 'purchaseAmount', response.data.data[0].purchasePrice)
           } else {
             this.$set(item, 'purchaseAmount', '0')
           }
@@ -1781,6 +1816,10 @@ export default {
       this.goodsShowData = this.goodsShowData.concat(res.data)
 
     },
+    uploadError(err, file, fileList) {
+      this.openFullScreen(true)
+      this.$message.error(JSON.parse(err.message).msg)
+    },
     //遮罩层
     openFullScreen(res, text) {
       const loading = this.$loading({
@@ -1815,15 +1854,19 @@ export default {
     //生成发货单
     async generateShipmentD() {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
-        contrastList(getFeeList, this.oldFeesList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
+        // contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否保存?", "提示", {
@@ -1862,15 +1905,19 @@ export default {
     // 生成结算
     applySettlement(type) {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
-        contrastList(getFeeList, this.oldFeesList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
+        // contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
@@ -1878,7 +1925,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.editCustomer(true)
+          this.editCustomer(false, type)
         }).catch(() => {
         })
       } else {
@@ -2679,6 +2726,9 @@ export default {
                   }
                 });
               });
+            } else if (type == '收费') {
+              this.beforeBillData(true,type)
+              this.applySettlementDialog = true;
             }
           }).finally(() => {
             this.saveLoading = false
@@ -2759,15 +2809,19 @@ export default {
     //返回列表
     backToList() {
       let getGoodsList = []
+      let getGiftList = []
       let getFeeList = this.$refs.feeInfo.submitData()
       if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
-        getGoodsList = this.goodsShowData.concat(this.contactsData)
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
       } else {
-        getGoodsList = this.goodsShowData.concat(this.giftData)
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
       }
       if (contrastObj(this.form, this.oldForm) ||
         contrastList(getGoodsList, this.oldGoodsList) ||
-        contrastList(getFeeList, this.oldFeesList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
+        // contrastList(getFeeList, this.oldFeesList) ||
         contrastList(this.bankOfDepositData, this.oldUploadList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
@@ -2984,6 +3038,59 @@ export default {
       params.srcOrderno = this.form.orderNo
       callback(params)
     },
+    // 请核
+    pleaseCheck() {
+      if (this.verification()) {
+        this.$confirm("您确定提交此次申请吗?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          const data = {
+            id : this.form.id,
+          }
+          this.pageLoading = true
+          pleaseCheck(data).then(res => {
+            console.log(res)
+            this.pageLoading = false
+          }).finally(() => {
+            this.pageLoading = false
+          })
+        })
+      } else {
+      }
+    },
+    // 验证新旧值对比
+    verification() {
+      let getGoodsList = []
+      let getGiftList = []
+      let getFeeList = this.$refs.feeInfo.submitData()
+      if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+        getGiftList = this.goodsShowData
+        getGoodsList = this.contactsData
+      } else {
+        getGoodsList = this.goodsShowData
+        getGiftList = this.giftData
+      }
+      if (contrastObj(this.form, this.oldForm) ||
+        contrastList(getGoodsList, this.oldGoodsList) ||
+        contrastList(getGiftList, this.oldGiftList) ||
+        // contrastList(getFeeList, this.oldFeesList) ||
+        contrastList(this.bankOfDepositData, this.oldUploadList)
+      ) {
+        this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.editCustomer(false)
+        }).catch(() => {
+          return false;   //取消改动数据
+        })
+      } else {
+        return true;  //没有动过数据
+      }
+    },
   },
 }
 </script>

+ 61 - 0
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -86,6 +86,30 @@
                 size="small"
                 @click.stop="newSpecial"
               >新增明细</el-button>
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-download"
+                @click="downloadHandle"
+              >下载模板</el-button>
+              <el-upload
+                :action="baseURL"
+                :headers="headers"
+                :disabled="detailData.seeDisabled"
+                :on-progress="uploading"
+                :show-file-list=false
+                accept=".xls,.xlsx"
+                multiple
+                :on-success="importTemplate"
+                :on-error="uploadError"
+                style="float: right"
+              >
+                <el-button
+                  type="primary"
+                  size="small"
+                  icon="el-icon-upload"
+                >导 入</el-button>
+              </el-upload>
             </template>
             <template slot-scope="{row,index}" slot="menu">
               <el-button
@@ -234,6 +258,7 @@ import {
 } from "@/api/basicData/customerInquiry";
 import goodsOption from "./configuration/commodity.json";
 import { contrastObj, contrastList } from "@/util/contrastData";
+import { getToken } from "@/util/auth";
 
 export default {
   name: "detailsPage",
@@ -396,6 +421,8 @@ export default {
       oldForm: {},
       oldSpecialOffer: [],
       oldBuyFree: [],
+      baseURL: '/api/blade-mocha-item/salespolicy/import-sales-policy',
+      headers: { "Blade-Auth": 'Bearer ' + getToken()},
     }
   },
   //初始化查询
@@ -728,6 +755,40 @@ export default {
     getcorpFeesId(row) {
       this.contactsDataBuyFree[row.index].corpId = row.id;
     },
+    // 下载模板
+    downloadHandle() {
+      this.$confirm('是否下载模板文件?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/blade-mocha-item/salespolicy/export-sales-policy?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      })
+    },
+    //文件上传时
+    uploading(event, file, fileList) {
+      this.openFullScreen(false, '文件正在解析中');
+    },
+    importTemplate(res, file) {
+      this.openFullScreen(true)
+      let contactsData = [];
+      contactsData = res.data;
+      this.contactsData = this.contactsData.concat(contactsData)
+      // console.log(res.data)
+    },
+    uploadError(err, file, fileList) {
+      this.openFullScreen(true)
+      this.$message.error(JSON.parse(err.message).msg)
+    },
   }
 }
 </script>