qukaidi hace 4 años
padre
commit
db5b800e81

+ 5 - 4
src/views/finance/charge/index.vue

@@ -2214,10 +2214,11 @@ export default {
       this.doNot = true;
       this.hide = true;
       for (let item in this.selection) {
-        this.pass.fAmtcr += Number(this.selection[item].fAmt).toFixed(2);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtcr += Number(this.selection[item].fAmt);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
       console.log(this.pass.fAmtcr);
+      console.log(this.pass.fAmtdr);
       // this.pass.fAmtcr.toFixed(2);
       if (this.state_s == true) {
         if (this.selection.length == "0") {
@@ -2248,8 +2249,8 @@ export default {
           this.queryParams.tMblno = this.pass.fMblno; //提单号
           this.queryParams.fCtrlcorpid = this.pass.fName;
           this.queryParams.fCorpid = this.queryParameter.fToCorpid;
-          this.queryParams.fAmtcr = this.pass.fAmtcr;
-          this.queryParams.fAmtdr = this.pass.fAmtdr;
+          this.queryParams.fAmtcr = Number(this.pass.fAmtcr).toFixed(2);
+          this.queryParams.fAmtdr = Number(this.pass.fAmtdr).toFixed(2);
           this.innerVisible = false;
           this.chargeList_s = [];
           this.queryParameter = {

+ 5 - 5
src/views/finance/contrast/index.vue

@@ -798,15 +798,15 @@
               size="small"
             />
           </el-form-item>
-          <el-form-item label="收付" prop="fDc">
+          <el-form-item label="付" prop="fDc">
             <el-col :span="8">
               <el-select
                 v-model="TWareHouseFees.fDc"
                 size="small"
                 style="width: 200px"
               >
-                <el-option label="收" value="D" />
-                <el-option label="付" value="C" />
+                <el-option label="收" value="D" />
+                <el-option label="付" value="C" />
               </el-select>
             </el-col>
           </el-form-item>
@@ -2070,9 +2070,9 @@ export default {
         this.pass.fAmtcr = Number(this.pass.fAmtcr);
         this.pass.fAmtdr = Number(this.pass.fAmtdr);
         this.pass.fAmtcr += Number(this.selection[item].fAmt);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
-      this.pass.fAmtcr.toFixed(2);
+      // this.pass.fAmtcr.toFixed(2);
       if (this.state_s == true) {
         if (this.selection.length == "0") {
           this.$message.error("未选择导入行");

+ 2 - 2
src/views/finance/payment/index.vue

@@ -2259,8 +2259,8 @@ export default {
       this.doNot = true;
       this.hide = true;
       for (let item in this.selection) {
-        this.pass.fAmtcr += Number(this.selection[item].fAmt).toFixed(2);
-        this.pass.fAmtdr += Number(this.selection[item].fAmtdr).toFixed(2);
+        this.pass.fAmtcr += Number(this.selection[item].fAmt);
+        this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
       }
       console.log(this.pass.fAmtcr);
       if (this.state_s == true) {

+ 260 - 169
src/views/track/singleCost/AddOrUpdate.vue

@@ -817,11 +817,71 @@ export default {
     deleteRow(index) {
       this.feesList.splice(index, 1);
     },
+     // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        billNo: null,
+        actId: null,
+        corpId: null,
+        transUserName: null,
+        planUserName: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        ifContracted: null,
+        contractNo: null,
+        refNo: null,
+        accstlType: null,
+        accdays: null,
+        goodsId: null,
+        goodsPrice: null,
+        goodsLossType: null,
+        goodsLossStd: null,
+        mblno: null,
+        ysl: null,
+        voy: null,
+        pol: null,
+        pod: null,
+        qtyPlan: null,
+        qtyDisPatch: null,
+        weightPlan: null,
+        cntrDesc: null,
+        carNoList: null,
+        loadAddr: null,
+        loadAttn: null,
+        loadAttntel: null,
+        loadDate: null,
+        mdLoadAddr: null,
+        mdLoadAttn: null,
+        mdLoadAttnTel: null,
+        mdLoadDate: null,
+        unLoadAddr: null,
+        unLoadAttn: null,
+        unLoadAttnTel: null,
+        unLoadDate: null,
+        routeId: null,
+        routeDesc: null,
+        ifWaybill: null,
+        ifNeedinvDr: null,
+        postDate: null,
+        billStatus: 0,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remarks: null,
+      };
+      this.disabled = false;
+      this.feesList=[]
+    },
     init() {
+      this.reset()
       this.showDialog = true;
       // console.log(this.fname.id)
       selectCorpList(this.fname.id).then((response) => {
-         this.fMblnoOptions = response;
+        this.fMblnoOptions = response;
       });
       query(this.fname.id).then((data) => {
         if (data.data.billType) {
@@ -879,13 +939,26 @@ export default {
     },
     addRelevt2() {
       let arr = this.feesList;
-      let arr2 = [];
-      arr.forEach((e) => {
-        arr2.push(e.fFeeid);
-      });
-      if (arr2.length > 0) {
-        return this.$message.error("费用已导入,请勿重复导入");
+      arr.filter((e) => e.actId == "1080");
+      if (arr.length > 0) {
+      this.$confirm('已生成费用信息, 是否重新生成?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+            this.feesList=this.feesList.filter((e) => e.actId != "1080");
+            this.addRelevt3()
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          });          
+        });
+      } else {
+        this.addRelevt3()
       }
+    },
+    addRelevt3() {
       if (this.form.oilAmt > 0) {
         this.feesList.push({
           actId: "1080",
@@ -935,178 +1008,196 @@ export default {
         });
       }
       if (this.form.costomAmt03 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 55,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt03,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt03,
-          fExrate: 1,
-          remarks:this.form.costomStr02,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 55,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt03,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt03,
-          fExrate: 1,
-          remarks: this.form.costomStr02,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 55,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt03,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt03,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 55,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt03,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt03,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt04 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 56,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt04,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt04,
-          fExrate: 1,
-          remarks: this.form.costomStr02,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 56,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt04,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt04,
-          fExrate: 1,
-          remarks: this.form.costomStr02,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 56,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt04,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt04,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 56,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt04,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt04,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt02 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 57,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt02,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt02,
-          fExrate: 1,
-          remarks: this.form.costomStr02,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 57,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt02,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt02,
-          fExrate: 1,
-          remarks: this.form.costomStr02,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 57,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt02,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt02,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 57,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt02,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt02,
+            fExrate: 1,
+            remarks: this.form.costomStr02,
+          }
+        );
       }
       if (this.form.costomAmt05 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 58,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt05,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt05,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 58,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt05,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt05,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 58,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt05,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt05,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 58,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt05,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt05,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          }
+        );
       }
       if (this.form.costomAmt06 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 59,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt06,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt06,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 59,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt06,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt06,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 59,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt06,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt06,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 59,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt06,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt06,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          }
+        );
       }
       if (this.form.costomAmt01 > 0) {
-        this.feesList.push({
-          actId: "1080",
-          fCorpid: this.form.fCorpId,
-          fFeeid: 60,
-          fDc: "D",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt01,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt01,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        },{
-          actId: "1080",
-          fCorpid: this.form.driverUserId,
-          fFeeid: 60,
-          fDc: "C",
-          fFeeunitid: "6",
-          fBillingQty: 1,
-          fUnitprice: this.form.costomAmt01,
-          fCurrency: "RMB",
-          fTaxrate: 3,
-          fAmount: this.form.costomAmt01,
-          fExrate: 1,
-          remarks: this.form.costomStr01,
-        });
+        this.feesList.push(
+          {
+            actId: "1080",
+            fCorpid: this.form.fCorpId,
+            fFeeid: 60,
+            fDc: "D",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt01,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt01,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          },
+          {
+            actId: "1080",
+            fCorpid: this.form.driverUserId,
+            fFeeid: 60,
+            fDc: "C",
+            fFeeunitid: "6",
+            fBillingQty: 1,
+            fUnitprice: this.form.costomAmt01,
+            fCurrency: "RMB",
+            fTaxrate: 3,
+            fAmount: this.form.costomAmt01,
+            fExrate: 1,
+            remarks: this.form.costomStr01,
+          }
+        );
       }
     },
     deleteplansRow(index, rows, row) {