瀏覽代碼

导入费用

qukaidi 4 年之前
父節點
當前提交
8728ee8c71
共有 1 個文件被更改,包括 83 次插入22 次删除
  1. 83 22
      src/views/track/singleCost/AddOrUpdate.vue

+ 83 - 22
src/views/track/singleCost/AddOrUpdate.vue

@@ -178,7 +178,7 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-           <el-col :span="6">
+          <el-col :span="6">
             <el-form-item label="回单时间" prop="waybillDate">
               <el-date-picker
                 clearable
@@ -297,7 +297,7 @@
             </el-form-item>
           </el-col>
         </el-row>
-         <el-row>
+        <el-row>
           <el-col :span="6">
             <el-form-item label="油气费" prop="oilAmt">
               <el-input
@@ -397,9 +397,9 @@
         </el-row>
         <el-row v-if="form.billType == 2">
           <el-col :span="6">
-            <el-form-item label="港杂费" prop="costomAmt03">
+            <el-form-item label="港杂费" prop="costomAmt05">
               <el-input
-                v-model="form.costomAmt03"
+                v-model="form.costomAmt05"
                 placeholder="请输入港杂费"
                 size="mini"
                 style="width: 180px"
@@ -409,14 +409,14 @@
             </el-form-item>
           </el-col>
           <el-col :span="6">
-            <el-form-item label="提箱费" prop="costomAmt04">
+            <el-form-item label="提箱费" prop="costomAmt06">
               <el-input
-                v-model="form.costomAmt04"
+                v-model="form.costomAmt06"
                 placeholder="请输入提箱费"
                 size="mini"
                 style="width: 180px"
                 v-input-limit="2"
-               disabled
+                disabled
               />
             </el-form-item>
           </el-col>
@@ -465,6 +465,14 @@
               :disabled="disabled"
               >添加费用</el-button
             >
+            <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="addRelevt2"
+              :disabled="disabled"
+              >导入费用</el-button
+            >
           </div>
         </div>
       </div>
@@ -483,7 +491,7 @@
               filterable
               size="mini"
               style="width: 160px"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
             >
               <el-option
                 v-for="(dict, index) in fMblnoOptions"
@@ -499,7 +507,7 @@
             <el-select
               v-model="scope.row.fFeeid"
               filterable
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               remote
               placeholder="费用名称"
             >
@@ -517,7 +525,7 @@
             <el-select
               v-model="scope.row.fDc"
               placeholder="请选择"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
             >
               <el-option label="收" value="D"></el-option>
               <el-option label="付" value="C"></el-option>
@@ -529,7 +537,7 @@
             <el-select
               v-model="scope.row.fFeeunitid"
               placeholder="请选择计费单位"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               clearable
             >
               <el-option
@@ -545,7 +553,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fBillingQty"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
               @input="total(scope.row)"
               v-input-limit="2"
@@ -556,7 +564,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fUnitprice"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
               @input="total(scope.row)"
               v-input-limit="2"
@@ -567,7 +575,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fCurrency"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
             ></el-input>
           </template>
@@ -576,7 +584,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fExrate"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
             ></el-input>
           </template>
@@ -585,7 +593,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fAmount"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
             ></el-input>
           </template>
@@ -594,7 +602,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.fTaxrate"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
             ></el-input>
           </template>
@@ -603,7 +611,7 @@
           <template slot-scope="scope">
             <el-input
               v-model="scope.row.remarks"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               placeholder="请输入内容"
             ></el-input>
           </template>
@@ -630,7 +638,7 @@
               size="mini"
               type="text"
               icon="el-icon-delete"
-              :disabled="scope.row.actId != 1090||disabled"
+              :disabled="scope.row.actId != 1090 || disabled"
               @click.native.prevent="deleteRow(scope.$index)"
               >删除</el-button
             >
@@ -736,7 +744,7 @@ export default {
       cntrId2List: [],
       goodsOptions: [],
       fWbuOptions: [],
-      disabled:false,
+      disabled: false,
     };
   },
   created() {
@@ -793,8 +801,8 @@ export default {
         for (let item in this.feesList) {
           this.feesList[item].fFeeunitid = this.feesList[item].fFeeunitid + "";
         }
-        if(this.feesList.length>=0){
-          this.disabled=true
+        if (this.feesList.length >= 0) {
+          this.disabled = true;
         }
       });
     },
@@ -838,6 +846,59 @@ export default {
         remarks: "",
       });
     },
+    addRelevt2() {
+      // if(this.feesList.length){
+
+      // }
+      if (this.form.oilAmt > 0) {
+        this.feesList.push({
+          actId: "1090",
+          fCorpid: this.form.fCorpId,
+          fFeeid: 52,
+          fDc: "C",
+          fFeeunitid: "6",
+          fBillingQty: 1,
+          fUnitprice: this.form.oilAmt,
+          fCurrency: "RMB",
+          fTaxrate: 3,
+          fAmount: this.form.oilAmt,
+          fExrate: 1,
+          remarks: "",
+        });
+      }
+      if (this.form.costomAmt03 > 0) {
+        this.feesList.push({
+          actId: "1090",
+          fCorpid: this.form.fCorpId,
+          fFeeid: 55,
+          fDc: "C",
+          fFeeunitid: "6",
+          fBillingQty: 1,
+          fUnitprice: this.form.costomAmt03,
+          fCurrency: "RMB",
+          fTaxrate: 3,
+          fAmount: this.form.costomAmt03,
+          fExrate: 1,
+          remarks: "",
+        });
+      }
+      if (this.form.costomAmt05 > 0) {
+        this.feesList.push({
+          actId: "1090",
+          fCorpid: this.form.fCorpId,
+          fFeeid: 58,
+          fDc: "C",
+          fFeeunitid: "6",
+          fBillingQty: 1,
+          fUnitprice: this.form.costomAmt05,
+          fCurrency: "RMB",
+          fTaxrate: 3,
+          fAmount: this.form.costomAmt05,
+          fExrate: 1,
+          remarks: "",
+        });
+      }
+    },
     deleteplansRow(index, rows, row) {
       let arr = this.schedulingList;
       let arr2 = arr.filter((e) => e.cntrId == row.cntrId && e.cntrId != null);