Bladeren bron

修改国内贸易

lichao 3 jaren geleden
bovenliggende
commit
0c4ef8e5b8

+ 47 - 18
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -144,7 +144,7 @@
               :cell-style="goodsRowClassName"
           >
             <template slot="code" slot-scope="{row,index}">
-              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit || arrivalDisabled || deliverDisabled">选择</el-button>
+<!--              <el-button type="text" size="mini" style="padding:4px 10px;float:left" @click="commodityChoice(row)" :disabled="detailData.seeDisabled || !row.$cellEdit || arrivalDisabled || deliverDisabled">选择</el-button>-->
               <span>{{ row.code }}</span>
             </template>
             <template slot-scope="{row,index}" slot="menu">
@@ -822,6 +822,8 @@ export default {
       // 查询时loading页面
       pageLoading: false,
       goodsActives: 'goods',
+      // 用于判断 tab是否是当前
+      saveActives: '',
       goodsDisabled: false,
       // 赠品信息数据
       giftData: [],
@@ -908,6 +910,7 @@ export default {
         this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
         this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
         this.$set(item, "srcId", item.id)
+        this.$set(item, 'actualQuantity', item.orderQuantity)
         delete item.id
         delete item.pid
         delete item.createTime
@@ -1198,16 +1201,13 @@ export default {
     },
     //点击行可编辑
     handleRowClick(row, event, column) {
-      console.log(row.$index)
     },
     //商品编辑
     rowCell(row, index) {
-      console.log(row)
       this.$refs.crudContact.rowCell(row, index)
     },
     //费用编辑
     rowCellTwo(row, index) {
-      console.log(row)
       this.$refs.crudProject.rowCell(row, index)
     },
     //费用新增触发
@@ -1225,14 +1225,12 @@ export default {
     choice(row) {
       this.dialogCost = !this.dialogCost
       this.choiceData = true
-      console.log(row)
       this.choiceIndex = row.$index
     },
     //点击商品明细选择触发
     commodityChoice(row) {
       this.dialogVisible = !this.dialogVisible
       this.commodityData = true
-      console.log(row)
       this.choiceIndexT = row.$index
     },
     //导入商品触发
@@ -1257,7 +1255,6 @@ export default {
     },
     //费用编辑导入触发
     choiceCost() {
-      console.log('1111')
       if (this.tableDataCost.length === 1) {
         this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
         this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
@@ -1271,7 +1268,6 @@ export default {
       // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
       if (this.tableDataCost.length > 0) {
         for (let item in this.tableDataCost) {
-          console.log(this.tableDataCost[item])
           this.tableDataCost[item].itemId = this.tableDataCost[item].id
           this.tableDataCost[item].feeName = this.tableDataCost[item].cname
           this.tableDataCost[item].sort = this.maxFeeNum + 1
@@ -1289,7 +1285,6 @@ export default {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length > 0) {
         for (let item in this.tableData) {
-          console.log(this.tableData[item])
           selectGoodsNum({
             goodsId: this.tableData[item].id,
             itemType: this.tableData[item].typeno,
@@ -1307,18 +1302,26 @@ export default {
             this.$set(this.tableData[item], 'actualQuantity', 0)
             this.$set(this.tableData[item], 'inventoryAmount', 0)
             this.$set(this.tableData[item], 'deliveryAmount', 0)
-            this.$set(this.tableData[item], 'integral', '0')
             this.tableData[item].price = 0
             this.tableData[item].amount = 0
             if (this.goodsActives == "goods") {
               this.$set(this.tableData[item], 'goodType', 0)
+              this.arrivalQuantityChange(this.tableData[item])
             } else {
               this.$set(this.tableData[item], 'goodType', 1)
+              this.$set(this.tableData[item], 'integralMultiples', this.tableData[item].integral)
+              this.actualQuantityChange(this.tableData[item])
             }
+            this.$set(this.tableData[item], 'integral', '0')
             this.tableData[item].sort = this.maxGoodsNum + 1
             this.maxGoodsNum++
             this.$refs.crudContact.rowCellAdd(this.tableData[item]);
             this.$refs.crudContact.rowCell(this.tableData[item], this.contactsData.length - 1)
+            if (this.goodsActives == "goods") {
+              this.arrivalQuantityChange(this.tableData[item])
+            } else {
+              this.actualQuantityChange(this.tableData[item])
+            }
           })
         }
       }
@@ -1334,12 +1337,10 @@ export default {
     },
     //选中触发
     selectionChange(list) {
-      console.log(list);
       this.tableData = list
     },
     //费用选中触发
     selectionChangeCost(list) {
-      console.log(list);
       this.tableDataCost = list
     },
     //导入页左商品类型查询
@@ -1368,8 +1369,6 @@ export default {
     },
     //新增商品信息保存触发
     rowSave(row, done, loading) {
-      console.log(row)
-      console.log(this.contactsData)
       // this.contactsData.push(row)
       done()
     },
@@ -1392,6 +1391,18 @@ export default {
               message: "操作成功!"
             });
             this.goodsShowData.splice(index, 1);
+            // 删除时主表积分跟着改变
+            if (this.goodsActives == 'goods') {
+              this.form.presenterIntegral = 0;
+              this.goodsShowData.forEach(item => {
+                this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
+              })
+            } else {
+              this.form.convertIntegral = 0;
+              this.goodsShowData.forEach(item => {
+                this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
+              })
+            }
           })
         } else {
           this.$message({
@@ -1399,6 +1410,18 @@ export default {
             message: "操作成功!"
           });
           this.goodsShowData.splice(index, 1);
+          // 删除时主表积分跟着改变
+          if (this.goodsActives == 'goods') {
+            this.form.presenterIntegral = 0;
+            this.goodsShowData.forEach(item => {
+              this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
+            })
+          } else {
+            this.form.convertIntegral = 0;
+            this.goodsShowData.forEach(item => {
+              this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
+            })
+          }
         }
       })
     },
@@ -1420,7 +1443,6 @@ export default {
     onLoad(page, params = {}) {
       this.loading = true;
       getList(page.currentPage, page.pageSize, Object.assign(params, this.query), this.treeDeptId).then(res => {
-        console.log(res)
         const data = res.data.data;
         this.page.total = data.total;
         this.data = data.records;
@@ -1443,7 +1465,6 @@ export default {
         feesTypeId: this.treeDeptIdCost
       })
       customerList(queryParams).then(res => {
-        console.log(res)
         const data = res.data.data;
         this.pageCost.total = data.total;
         this.dataCost = data.records;
@@ -1564,6 +1585,7 @@ export default {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
             } else {
+              this.saveActives = ''
               this.queryData(res.data.data.id, false, type)
             }
           }).catch(() => {
@@ -1649,7 +1671,11 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           //商品信息
-          this.form.deliveryItemsList = this.contactsData
+          if (this.goodsShowData.findIndex(item => item.goodType == 0) == -1) {
+            this.form.deliveryItemsList = this.goodsShowData.concat(this.contactsData)
+          } else {
+            this.form.deliveryItemsList = this.goodsShowData.concat(this.giftData)
+          }
           this.form.deliveryFeesList = this.advantageProjectData
           this.form.deliveryFilesList = this.bankOfDepositData
           if (typeof this.form.corpsTypeId == 'object') {
@@ -1726,7 +1752,6 @@ export default {
         this.$set(item, 'actualQuantity', item.orderQuantity)
         this.$set(item, 'inventoryNumber', item.storageQuantity)
         this.$set(item, 'integral', 0)
-        this.$set(item, 'arrivalQuantity', 0)
         this.$set(item, 'orgOrderNo', this.form.orgOrderNo)
         this.$set(item, 'srcOrderNo', this.form.srcOrderNo)
         this.$set(item, 'arrivalQuantity', item.actualQuantity)
@@ -1740,7 +1765,9 @@ export default {
         delete item.createTime
         delete item.createUser
         delete item.pid
+        this.arrivalQuantityChange(item)
         this.$refs.crudContact.rowCellAdd(item);
+        this.arrivalQuantityChange(item)
       })
       this.marketDialog = false;
     },
@@ -1801,6 +1828,8 @@ export default {
     },
     // 商品信息标签页切换
     handleClick(data) {
+      if (this.saveActives == data.name) return
+      this.saveActives = data.name
       this.goodsDisabled = true
       if (data.name == 'goods') {
         this.giftData = this.goodsShowData

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

@@ -319,9 +319,11 @@ export default {
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      this.gobackSearch(this.search)
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.gobackSearch(this.search)
     },
     refreshChange() {
       this.page.currentPage = 1;
@@ -376,7 +378,6 @@ export default {
         data.createTimeEnd = data.createTime[1]+ " " + "23:59:59"
         this.$delete(data,'createTime')
       }
-      this.page.currentPage = 1;
       this.onLoad(this.page, data);
     },
     //列保存触发

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

@@ -215,7 +215,7 @@
                          icon="el-icon-plus"
                          size="small"
                          :disabled="selection.length < 1 || detailData.seeDisabled"
-                         @click="getShipmentC">生成收货单
+                         @click="getShipmentC">生成采购确认
               </el-button>
               <el-button type="info" :size="size" icon="el-icon-printer">报 表</el-button>
             </template>
@@ -227,6 +227,7 @@
           :disabled="detailData.seeDisabled"
           feeUrl="/trade-purchase/purchase-order/removeByFees"
           optionType="GN"
+          itemType="采购"
           @beforeFinance="beforeFinance"
         />
 <!--        <containerTitle title="费用明细"></containerTitle>-->
@@ -460,6 +461,7 @@
       <apply-payment
         :billType="billType"
         :billData="billData"
+        itemType="采购"
         @choceFun="choceFun"
       >
       </apply-payment>
@@ -783,6 +785,7 @@ export default {
         currentPage: 1,
         total: 0
       },
+      itemType: '采购',
     }
   },
   mounted() {

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

@@ -293,9 +293,11 @@ export default {
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      this.gobackSearch(this.search)
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.gobackSearch(this.search)
     },
     refreshChange() {
       this.page.currentPage = 1;
@@ -348,7 +350,6 @@ export default {
         data.createEndTime = data.createTime[1]+ " " + "23:59:59"
         this.$delete(data,'createTime')
       }
-      this.page.currentPage = 1;
       this.onLoad(this.page, data);
     },
     //列保存触发

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

@@ -322,9 +322,11 @@ export default {
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      this.gobackSearch(this.search)
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.gobackSearch(this.search)
     },
     refreshChange() {
       this.page.currentPage = 1;
@@ -382,7 +384,6 @@ export default {
         this.$set(data, 'createEndTime', data.createTime[1]+ " " + "23:59:59")
         this.$delete(data,'createTime')
       }
-      this.page.currentPage = 1;
       this.onLoad(this.page, data);
     },
     //列保存触发

+ 99 - 37
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -193,16 +193,7 @@
                     autocomplete="off"
                     @change="computedCost"
                     :disabled="detailData.seeDisabled"
-                    style="width: 50%"
                     v-input-limit="2"></el-input>
-<!--                  总溢付款-->
-                   <el-input
-                     v-model="form['overPayment']"
-                     size="small"
-                     autocomplete="off"
-                     disabled
-                     placeholder="总溢付款"
-                     style="width: 50%"></el-input>
                 </span>
                 <el-select v-else-if="item.prop === 'orderStatus'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled || item.disabled">
                   <el-option v-for="(item,index) in statusOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
@@ -336,9 +327,9 @@
             </template>
             <template slot="menuLeft" slot-scope="{size}">
               <el-tabs v-model="goodsActives" @tab-click="handleClick" :before-leave="beforeLeave">
-                <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled || goodsActives == 'goods'">
+                <el-tab-pane label="商品" name="goods" :key="'first'" :disabled="goodsDisabled">
                 </el-tab-pane>
-                <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled || goodsActives == 'gift'">
+                <el-tab-pane label="赠品" name="gift" :key="'second'" :disabled="goodsDisabled">
                 </el-tab-pane>
               </el-tabs>
               <el-button type="primary"
@@ -360,7 +351,7 @@
                          size="small"
                          :disabled="selection.length < 1 || detailData.seeDisabled"
                          @click="getShipmentD"
-                         v-show="goodsActives == 'goods'">生成发货单
+                         v-show="goodsActives == 'goods'">生成客户确认
               </el-button>
               <el-button type="info"
                          :size="size"
@@ -403,6 +394,7 @@
           :disabled="detailData.seeDisabled"
           feeUrl="/blade-purchase-sales/orderfees/update"
           optionType="GN"
+          itemType="销售"
         />
 <!--        <containerTitle title="费用明细"></containerTitle>-->
 <!--        <basic-container style="margin-bottom: 10px">-->
@@ -685,6 +677,7 @@
       <apply-payment
         :billType="billType"
         :billData="billData"
+        itemType="销售"
         @choceFun="choceFun"
       >
       </apply-payment>
@@ -732,6 +725,7 @@ import {
   getlistBankBy,
 } from "@/api/basicData/configuration"
 import {getCorpDetail} from "@/api/maintenance/overpayment"
+import {integralDetail} from "@/api/maintenance/integral"
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import customerContact from "./configuration/customerContact.json"
 import advantageProject from "./configuration/advantageProject.json"
@@ -969,7 +963,7 @@ export default {
                 trigger: 'blur'
               }
             ]
-          },  {
+          }, {
             label: '本次溢付款',
             prop: 'caseOverPayment',
             rules: [
@@ -979,10 +973,22 @@ export default {
                 trigger: 'blur'
               }
             ]
+          }, {
+            label: '总溢付款',
+            prop: 'overPayment',
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
           },{
             label: '应收账款',
             prop: 'debitAmount',
             type: 'number',
+            disabled: true,
             rules: [
               {
                 required: false,
@@ -1421,6 +1427,7 @@ export default {
       goodsListTotal: 0,
       goodsListSaveTotal: 0,
       goodsActives: 'goods',
+      saveActives: '',
       goodsDisabled: false,
       // 赠品信息数据
       giftData: [],
@@ -1429,6 +1436,7 @@ export default {
       arrivalOptions: [],
       shippingOptions: [],
       applicationDialog:false,
+      itemType: '销售',
     }
   },
   mounted() {
@@ -1491,6 +1499,17 @@ export default {
       row.typeno = event.typeno
       row.itemType = event.typeno
       row.itemId = event.id
+      row.corpId = event.corpId
+      row.corpName = event.corpName
+      selectGoodsNum({
+        goodsId: event.id,
+        itemType: event.typeno,
+        tradeType: 'GN'
+      }).then(res => {
+        row.storageQuantity =  res.data.data
+      })
+      row.integralMultiples = event.integralMultiples
+      this.quantityChange(row)
     },
     queryData(id, isCopy = false){
       this.pageLoading = true
@@ -1895,13 +1914,15 @@ export default {
       this.removeRepeat()
     },
     receiveGoodList(data) {
-      console.log(data)
       this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(data)
       this.removeGoodsRepeat()
     },
     async getCorpRow(data) {
       getCorpDetail({corpId:data.id}).then(res => {
-        this.form.overPayment = res.data.data.balanceOverpaymen
+        this.form.overPayment = res.data.data? res.data.data.balanceOverpaymen: 0
+      })
+      integralDetail({corpId:data.id}).then(res => {
+        this.form.pointMutiple = res.data.data? res.data.data.balancePoints: 0
       })
       this.arrivalOptions = [];
       this.arrivalOptions = await this.corpAddr(data.id)
@@ -1949,6 +1970,17 @@ export default {
       row.typeno = event[0].typeno
       row.itemType = event[0].typeno
       row.itemId = event[0].id
+      row.corpId = event[0].corpId
+      row.corpName = event[0].corpName
+      selectGoodsNum({
+        goodsId: event[0].id,
+        itemType: event[0].typeno,
+        tradeType: 'GN'
+      }).then(res => {
+        row.storageQuantity =  res.data.data
+      })
+      row.integralMultiples = event[0].integralMultiples
+      this.quantityChange(row)
     },
     //点击商品明细选择触发
     commodityChoice(row) {
@@ -1961,18 +1993,22 @@ export default {
     importChoice() {
       // this.contactsData = this.contactsData.concat(this.tableData)
       if (this.tableData.length === 1) {
-        this.contactsData[this.choiceIndexT].cname = this.tableData[0].cname
-        this.contactsData[this.choiceIndexT].code = this.tableData[0].code
-        this.contactsData[this.choiceIndexT].typeno = this.tableData[0].typeno
-        this.contactsData[this.choiceIndexT].itemType = this.tableData[0].typeno
-        this.contactsData[this.choiceIndexT].itemId = this.tableData[0].id
-        this.contactsData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
+        this.goodsShowData[this.choiceIndexT].cname = this.tableData[0].cname
+        this.goodsShowData[this.choiceIndexT].code = this.tableData[0].code
+        this.goodsShowData[this.choiceIndexT].typeno = this.tableData[0].typeno
+        this.goodsShowData[this.choiceIndexT].itemType = this.tableData[0].typeno
+        this.goodsShowData[this.choiceIndexT].itemId = this.tableData[0].id
+        this.goodsShowData[this.choiceIndexT].priceCategory = this.tableData[0].goodsTypeName
+        this.goodsShowData[this.choiceIndexT].integralMultiples = this.tableData[0].integralMultiples
+        this.goodsShowData[this.choiceIndexT].corpId = this.tableData[0].corpId
+        this.goodsShowData[this.choiceIndexT].corpName = this.tableData[0].corpName
+        this.quantityChange(this.goodsShowData[this.choiceIndexT])
         selectGoodsNum({
           goodsId: this.tableData[0].id,
           itemType: this.tableData[0].typeno,
           tradeType: 'GN'
         }).then(res => {
-          this.contactsData[this.choiceIndexT].storageQuantity =  res.data.data
+          this.goodsShowData[this.choiceIndexT].storageQuantity =  res.data.data
         })
       }
       this.dialogVisible = !this.dialogVisible
@@ -2049,14 +2085,15 @@ export default {
           this.$set(this.goodsListSave[item], 'itemType', this.goodsListSave[item].typeno)
           this.$set(this.goodsListSave[item], 'orderQuantity', 1)
           this.$set(this.goodsListSave[item], 'actualQuantity', 0)
-          this.$set(this.goodsListSave[item], 'integral', '0')
           this.$set(this.goodsListSave[item], 'invoiceWeight', this.goodsListSave[item].cartonWeight)
           this.goodsListSave[item].amount = 0
           if (this.goodsActives == "goods") {
             this.$set(this.goodsListSave[item], 'goodType', 0)
           } else {
             this.$set(this.goodsListSave[item], 'goodType', 1)
+            this.$set(this.goodsListSave[item], 'integralMultiples', this.goodsListSave[item].integral)
           }
+          this.$set(this.goodsListSave[item], 'integral', '0')
           this.goodsListSave[item].sort = this.maxGoodsNum + 1
           if (this.form.packageRemarks) {
             this.goodsListSave[item].packageRemarks = this.form.packageRemarks
@@ -2071,9 +2108,9 @@ export default {
           delete this.goodsListSave[item].updateUserName
           this.maxGoodsNum++
           this.quantityChange(this.goodsListSave[item])
-          console.log(this.goodsListSave[item])
+          this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
           this.$nextTick(() => {
-            this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
+            this.quantityChange(this.goodsListSave[item])
           })
           // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
         })
@@ -2110,14 +2147,15 @@ export default {
           this.$set(this.tableData[item], 'itemType', this.tableData[item].typeno)
           this.$set(this.tableData[item], 'orderQuantity', 1)
           this.$set(this.tableData[item], 'actualQuantity', 0)
-          this.$set(this.tableData[item], 'integral', '0')
           this.$set(this.tableData[item], 'invoiceWeight', this.tableData[item].cartonWeight)
           this.tableData[item].amount = 0
           if (this.goodsActives == "goods") {
             this.$set(this.tableData[item], 'goodType', 0)
           } else {
             this.$set(this.tableData[item], 'goodType', 1)
+            this.$set(this.tableData[item], 'integralMultiples', this.tableData[item].integral)
           }
+          this.$set(this.tableData[item], 'integral', '0')
           this.tableData[item].sort = this.maxGoodsNum + 1
           if (this.form.packageRemarks) {
             this.tableData[item].packageRemarks = this.form.packageRemarks
@@ -2132,9 +2170,9 @@ export default {
           delete this.tableData[item].updateUserName
           this.maxGoodsNum++
           this.quantityChange(this.tableData[item])
-          console.log(this.tableData[item])
+          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
           this.$nextTick(() => {
-            this.$refs.crudContact.rowCellAdd(this.tableData[item]);
+            this.quantityChange(this.tableData[item])
           })
           // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
         })
@@ -2337,6 +2375,17 @@ export default {
               message: "操作成功!"
             });
             this.goodsShowData.splice(index, 1);
+            if (this.goodsActives == 'goods') {
+              this.form.presenterIntegral = 0;
+              this.goodsShowData.forEach(item => {
+                this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
+              })
+            } else {
+              this.form.convertIntegral = 0;
+              this.goodsShowData.forEach(item => {
+                this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
+              })
+            }
           })
         } else {
           this.$message({
@@ -2344,6 +2393,17 @@ export default {
             message: "操作成功!"
           });
           this.goodsShowData.splice(index, 1);
+          if (this.goodsActives == 'goods') {
+            this.form.presenterIntegral = 0;
+            this.goodsShowData.forEach(item => {
+              this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
+            })
+          } else {
+            this.form.convertIntegral = 0;
+            this.goodsShowData.forEach(item => {
+              this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
+            })
+          }
         }
       })
     },
@@ -2491,9 +2551,10 @@ export default {
               return this.$message.error('商品信息第'+ (parseInt(item) + 1) + '行订货数量不能小于发货数量')
             }
           }
+          this.form.orderFeesList = this.$refs.feeInfo.submitData()
           let packFee;
           if (this.form.packageRemarks) {
-            packFee = this.advantageProjectData.findIndex(item => item.feeName == '包装费')
+            packFee = this.form.orderFeesList.findIndex(item => item.feeName == '包装费')
           }
           if (packFee == -1) {
             return this.$message.error('费用明细未有包装费')
@@ -2528,7 +2589,6 @@ export default {
             }
           }
           // this.form.orderFeesList = this.advantageProjectData
-          this.form.orderFeesList = this.$refs.feeInfo.submitData()
           this.form.orderFilesList = this.bankOfDepositData
           if (typeof this.form.corpsTypeId == 'object') {
             this.form.corpsTypeId = this.form.corpsTypeId.join(",")
@@ -2541,6 +2601,7 @@ export default {
               //成功关闭此页面回到列表页
               this.$emit("goBack");
             } else {
+              this.saveActives = ''
               this.queryData(res.data.data.id)
             }
             if (type == '发货') {
@@ -2606,6 +2667,7 @@ export default {
       this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(caseOverPayment)).toFixed(2)))
     },
     quantityChange(row) {
+      console.log(row)
       if (!row.orderQuantity) {
         row.orderQuantity = 0;
       } else {
@@ -2617,14 +2679,14 @@ export default {
       }
       row.integral = (Number(row.orderQuantity) * Number(row.integralMultiples)).toFixed(2)
 
-
       if (this.goodsActives == 'goods') {
-        this.$set(this.form, 'presenterIntegral' , 0)
+        // this.$set(this.form, 'presenterIntegral' , 0)
+        this.form.presenterIntegral = 0;
         this.goodsShowData.forEach(item => {
           this.form.presenterIntegral = (Number(this.form.presenterIntegral) + Number(item.integral)).toFixed(2)
         })
       } else {
-        this.$set(this.form, 'convertIntegral' , 0)
+        this.form.convertIntegral = 0;
         this.goodsShowData.forEach(item => {
           this.form.convertIntegral = (Number(this.form.convertIntegral) + Number(item.integral)).toFixed(2)
         })
@@ -2778,9 +2840,11 @@ export default {
     },
     // 商品信息标签页切换
     handleClick(data) {
+      if (this.saveActives == data.name) return
+      this.saveActives = data.name
       this.goodsDisabled = true
       if (data.name == 'goods') {
-        this.giftData = this.goodsShowData
+        this.giftData = this.goodsShowData.filter(item => item.goodType == 1)
         // 显示
         this.customerContact.column.forEach(item => {
           if (item.prop == 'integralMultiples') item.label = '积分倍数'
@@ -2801,9 +2865,7 @@ export default {
         },500)
       } else {
         // 隐藏字段
-        this.contactsData = this.deepClone(this.goodsShowData)
-        // this.contactsData=this.goodsShowData.filter(e=>e.typegood==0)
-        console.log(this.contactsData)
+        this.contactsData = this.goodsShowData.filter(item => item.goodType == 0)
         this.customerContact.column.forEach(item => {
           if (item.prop == 'deliveryAmount') item.label = '积分'
           if (item.prop == 'actualQuantity') item.label = '数量'

+ 5 - 7
src/views/businessManagement/salesOrder/index.vue

@@ -335,12 +335,17 @@ export default {
     },
     currentChange(currentPage) {
       this.page.currentPage = currentPage;
+      // this.gobackSearch(this.search)
     },
     sizeChange(pageSize) {
       this.page.pageSize = pageSize;
+      this.gobackSearch(this.search)
     },
     //列表刷新触发
     refreshChange() {
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false)
+      })
       this.page.currentPage = 1;
       this.onLoad(this.page,this.search);
     },
@@ -399,12 +404,6 @@ export default {
     gobackSearch(params) {
       let data = {};
       data = Object.assign({}, params)
-      // console.log(data.businesDate)
-      // if (data.businesDate && data.businessDate != '') {
-      //   data.orderStartDate = data.businesDate[0]+ " " + "00:00:00"
-      //   data.orderEndDate = data.businesDate[1]+ " " + "23:59:59"
-      //   delete data.businesDate;
-      // }
       if (data.requiredDeliveryDate && data.requiredDeliveryDate != '') {
         data.deliveryStartDate = data.requiredDeliveryDate[0]+ " " + "00:00:00"
         data.deliveryEndDate = data.requiredDeliveryDate[1]+ " " + "23:59:59"
@@ -425,7 +424,6 @@ export default {
         data.createTimeEnd = data.createTime[1]+ " " + "23:59:59"
         this.$delete(data,'createTime')
       }
-      this.page.currentPage = 1;
       this.onLoad(this.page, data);
     },
     //列保存触发