Browse Source

修改bug

lichao 3 years ago
parent
commit
19d2333775

+ 13 - 1
src/components/finance/financialAccount.vue

@@ -137,7 +137,18 @@
             @input="amountChange(row)"
             style="width: 100%"
           />
-          <span v-else>{{ row.quantity }}</span>
+          <span v-else>{{ Number(row.quantity).toFixed(2) }}</span>
+        </template>
+        <template slot-scope="{row,index}" slot="amount">
+          <el-input-number
+            v-if="row.$cellEdit"
+            v-model="row.amount"
+            size="small"
+            :controls="false"
+            :precision="2"
+            style="width: 100%"
+          />
+          <span v-else>{{ Number(row.amount).toFixed(2) }}</span>
         </template>
       </avue-crud>
       <div class="dialogButton">
@@ -326,6 +337,7 @@
       }
     },
     created() {
+      this.option.height = window.innerHeight - 240;
       this.historyOption.searchShow = false
       customerList({
         size: 10000,

+ 1 - 16
src/views/businessManagement/deliveryNotice/configuration/customerContact.json

@@ -16,7 +16,7 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": false,
+  "index": true,
   "selection": true,
   "menuWidth": 130,
   "dialogClickModal": false,
@@ -42,21 +42,6 @@
   ],
   "column":[
     {
-      "label": "排序",
-      "prop": "sort",
-      "type": "number",
-      "index": 1,
-      "width":100,
-      "cell": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入排序",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "类别",
       "prop": "priceCategory",
       "index": 2,

+ 1 - 16
src/views/businessManagement/purchaseOrder/configuration/customerContact.json

@@ -16,7 +16,7 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": false,
+  "index": true,
   "selection": true,
   "menuWidth": 130,
   "dialogClickModal": false,
@@ -35,21 +35,6 @@
   ],
   "column":[
     {
-      "label": "排序",
-      "prop": "sort",
-      "type": "number",
-      "index": 1,
-      "width":100,
-      "cell": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入排序",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "商品类别",
       "prop": "priceCategory",
       "index": 1,

+ 3 - 19
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -1504,29 +1504,11 @@ export default {
           price: e.price,
           unit: e.unit,
           quantity: e.orderQuantity,
+          srcFeesId: e.id,
           costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
         }
         arr.push(form)
       })
-      //采购明细提单号 list
-      // this.billData = {
-      //   belongCompany: this.form.belongCompany,
-      //   srcOrderno:this.form.orderNo,
-      //   itemType:"采购",
-      //   corpsName:this.form.corpsName,
-      //   corpId:this.form.corpId,
-      //   srcParentId: this.form.id,
-      //   currency: 'CNY',
-      //   exchangeRate: '1',
-      //   taxRate: '0',
-      //   accDate: this.form.businesDate,
-      //   srcType: 1, // 1.采购or销售主表货款申请 2. 采购or销售-费用明细申请  3.收发货-费用明细
-      //   tradeType: 'GN',
-      //   optionType: 'GN',
-      //   amount: this.form.orderAmount,
-      //   costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
-      // }
-      // arr.push(this.billData)
       let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 2)
       getFeeList.forEach(item => {
         let form = {
@@ -1547,6 +1529,8 @@ export default {
           amount: item.amount,
           costType: item.itemId,
           srcFeesId: item.id,
+          quantity: item.quantity, // 数量
+          price: item.price,
         }
         arr.push(form)
       })

+ 1 - 16
src/views/businessManagement/receipt/configuration/customerContact.json

@@ -16,7 +16,7 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": false,
+  "index": true,
   "selection": true,
   "menuWidth": 130,
   "dialogClickModal": false,
@@ -34,21 +34,6 @@
   ],
   "column":[
     {
-      "label": "排序",
-      "prop": "sort",
-      "type": "number",
-      "index": 1,
-      "width":100,
-      "cell": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入排序",
-          "trigger": "blur"
-        }
-      ]
-    },{
       "label": "类别",
       "prop": "priceCategory",
       "type": "number",

+ 2 - 18
src/views/businessManagement/salesOrder/configuration/customerContact.json

@@ -16,7 +16,7 @@
   "dialogWidth": "60%",
   "tree": true,
   "border": true,
-  "index": false,
+  "index": true,
   "selection": true,
   "menuWidth": 130,
   "dialogClickModal": false,
@@ -38,23 +38,7 @@
       "decimals": 0
     }
   ],
-  "column":[
-    {
-      "label": "排序",
-      "prop": "sort",
-      "type": "number",
-      "index": 1,
-      "width":100,
-      "cell": true,
-      "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入排序",
-          "trigger": "blur"
-        }
-      ]
-    },{
+  "column":[{
       "label": "产品分类",
       "prop": "priceCategory",
       "index": 1,

+ 14 - 23
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2136,31 +2136,11 @@ export default {
           price: e.price,
           unit: e.unit,
           goodName: e.cname,
+          srcFeesId: e.id,
           costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
         }
         arr.push(form)
       })
-      // this.billData = {
-      //   belongCompany: this.form.belongCompany,
-      //   srcOrderno:this.form.orgOrderNo,
-      //   itemType:"销售",
-      //   corpsName:this.form.corpName,
-      //   corpId:this.form.corpId,
-      //   srcParentId: this.form.id,
-      //   currency: 'CNY',
-      //   exchangeRate: '1',
-      //   taxRate: '0',
-      //   accDate: this.form.businesDate,
-      //   srcType: 1,
-      //   tradeType: 'GN',
-      //   optionType: 'GN',
-      //   chargeMember: this.form.chargeMember,
-      //   amount: this.form.balanceAmount,
-      //   quantity: 0, // 数量
-      //   price: 0,
-      //   costType: this.feesOption.find(e => e.cname == '货款')? this.feesOption.find(e => e.cname == '货款').id: null,
-      // }
-      // arr.push(this.billData)
       let getFeeList = this.$refs.feeInfo.submitData().filter(item => item.feesType == 1)
       getFeeList.forEach(item => {
         let form = {
@@ -2181,6 +2161,8 @@ export default {
           amount: item.amount,
           costType: item.itemId,
           srcFeesId: item.id,
+          quantity: item.quantity, // 数量
+          price: item.price,
         }
         arr.push(form)
       })
@@ -2360,7 +2342,6 @@ export default {
     },
     //确认导入触发
     async importGoods() {
-      this.saveLoading = true;
       if (this.goodsListSave.length > 0) {
         this.goodsListSaveHandle()
       } else {
@@ -2370,6 +2351,7 @@ export default {
       }
     },
     goodsListSaveHandle() {
+      this.saveLoading = true;
       for (let item in this.goodsListSave) {
         getMarketPrice({code: this.goodsListSave[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
           if (res.data.data.length > 0) {
@@ -2438,6 +2420,7 @@ export default {
       this.dialogVisible = false
     },
     tableDataHandle() {
+      this.saveLoading = true;
       for (let item=0;item<this.tableData.length;item++) {
         getMarketPrice({code: this.tableData[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(res => {
           if (res.data.data.length > 0) {
@@ -3006,7 +2989,15 @@ export default {
       // let caseOverPayment = this.form.caseOverPayment? this.form.caseOverPayment: 0
       // 本次试用返利
       let thisUsedProfit = this.form.thisUsedProfit? this.form.thisUsedProfit: 0
-      this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(thisUsedProfit)).toFixed(2)))
+      let feeAmountD = 0; //费用明细应收
+      let feeAmountC = 0; //费用明细应付
+      this.$refs.feeInfo.submitData().filter(item => item.feesType == 1).forEach(item => {
+        feeAmountD += Number(item.amount)
+      })
+      this.$refs.feeInfo.submitData().filter(item => item.feesType == 2).forEach(item => {
+        feeAmountC += Number(item.amount)
+      })
+      this.$set(this.form, 'debitAmount', ((Number(orderAmount) - Number(thisUsedProfit) + Number(feeAmountD) - Number(feeAmountC)).toFixed(2)))
       this.$set(this.form, "balanceAmount", (Number(this.form.debitAmount) - Number(settlmentAmount)).toFixed(2));
     },
     quantityChange(row) {