Browse Source

Merge branch 'master' of http://git.echepei.com/zhujiawei/Warehouse_management_ui

tong 4 years ago
parent
commit
89efd315b2

+ 6 - 6
src/views/basicdata/corps/index.vue

@@ -690,9 +690,14 @@
         const fId = row.fId || this.ids
         getCorps(fId).then(response => {
           this.form = response.data["corp"];
+          var contactList1=response.data["customerContact"];
+          if(contactList1!=null){
+            this.contactList=contactList1;
+          }else {
+            this.query();
+          }
           this.open = true;
           this.title = "修改客户详情";
-          this.contactList=response.data["customerContact"];
         });
       },
       /** 提交按钮 */
@@ -700,11 +705,6 @@
         this.$refs["form"].validate(valid => {
           if (valid) {
             if (this.form.fId != null) {
-              /*updateCorps(this.form).then(response => {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              });*/
               let formDate= new FormData()
               formDate.append('corps',JSON.stringify(this.form));
               formDate.append('customerContacts',JSON.stringify(this.contactList));

+ 175 - 47
src/views/finance/charge/index.vue

@@ -121,16 +121,25 @@
       <!--      </el-table-column>-->
       <!--      <el-table-column label="制单部门" align="center" prop="fId"/>-->
       <!--      <el-table-column label="结算单位" align="center" prop="fCorpid"/>-->
-      <el-table-column label="对账日期" align="center" prop="tMblno"/>
+      <el-table-column label="对账日期" align="center" prop="fAccbilldate"/>
       <el-table-column label="提单号" align="center" prop="tMblno"/>
       <el-table-column label="应收合计" align="center" prop="fAmtdr"/>
       <el-table-column label="应付合计" align="center" prop="fAmtcr"/>
       <el-table-column label="备注" align="center" prop="fRemarks"/>
-      <el-table-column label="状态" align="center" prop="fBillstatus"/>
+      <el-table-column label="状态" align="center" prop="fBillstatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fBillstatus == '1'">新建</span>
+          <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
+          <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
+          <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
+          <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
+          <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
+        </template>
+      </el-table-column>
 
       <!--      <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
       <!--      <el-table-column label="制单部门" align="center" prop="fDeptid"/>-->
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" width="100" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -161,7 +170,7 @@
     />
 
     <!-- 添加或修改财务数据主对话框 -->
-    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="65%" append-to-body>
+    <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="70%" append-to-body>
       <el-form :model="queryParams" :rules="ruless" ref="ruless" :inline="true" v-show="showSearch"
                label-width="68px"
       >
@@ -234,30 +243,46 @@
         <el-table-column label="提单号" align="center" prop="fMblno"/>
         <el-table-column label="存货单号" align="center" prop="fBscorpno"/>
         <el-table-column label="品名" align="center" prop="fProductName"/>
-        <el-table-column label="业务日期" align="center" prop="fBsdate"/>
+        <el-table-column label="业务日期" align="center" prop="fBsdate">
+          <template slot-scope="scope">
+            <span>{{scope.row.fBsdate.slice(0,10)}}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="费用名称" align="center" prop="fFeeName"/>
-        <el-table-column label="收/付" align="center" prop="fDc">
+        <el-table-column label="收/付" align="center" prop="fSrcdc">
           <template slot-scope="scope">
-            <span v-if="scope.row.fDc =='D'">收</span>
-            <span v-else="scope.row.fDc =='C'">付</span>
+            <span v-if="scope.row.fSrcdc =='D'">收</span>
+            <span v-else-if="scope.row.fSrcdc =='C'">付</span>
           </template>
         </el-table-column>
         <el-table-column label="业务类型" align="center" prop="fBilltype">
           <template slot-scope="scope">
             <span v-if="scope.row.fBilltype =='SJRK'">入库</span>
+
             <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
-            <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
-            <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
+            <span v-else>{{scope.row.fBilltype}}</span>
           </template>
         </el-table-column>
         <el-table-column label="本次金额" align="center" prop="fAmt"/>
         <el-table-column label="备注" align="center" prop="fRemarks"/>
+
+        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click.native.prevent="deleteRow(scope.$index, increase_s)"
+            >删除
+            </el-button>
+          </template>
+        </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button type="primary" @click="submitForm">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
-      <el-dialog :close-on-click-modal="false" width="65%" :visible.sync="innerVisible" title="导入数据" append-to-body>
+      <el-dialog :close-on-click-modal="false" width="70%" :visible.sync="innerVisible" title="导入数据" append-to-body>
         <el-form ref="form" :model="queryParameter" :rules="rules" label-width="80px"
                  style="display: flex;flex-wrap: wrap;"
         >
@@ -271,7 +296,7 @@
               style="width: 200px"
               @keyup.enter.native="handleQuery"
               :remote-method="corpsRemoteMethod"
-              placeholder="请输入结算单位"
+              placeholder="请选择货权方"
             >
               <el-option
                 v-for="(dict, index) in fMblnoOptions"
@@ -312,7 +337,6 @@
                 v-model="queryParameter.fFeeid"
                 filterable
                 remote
-                :disabled="browseStatus"
                 :remote-method="fWRemoteMethod"
                 placeholder="费用名称"
                 multiple
@@ -353,9 +377,9 @@
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery_s">重1置</el-button>
           </el-form-item>
         </el-form>
-        <el-table v-loading="loading" :data="chargeList_s" @selection-change="handleSelectionChange_s">
+        <el-table v-loading="loading" :data="chargeList_s" show-summary :summary-method="getSummaries" @selection-change="handleSelectionChange_s">
           <el-table-column type="selection" width="55" align="center"/>
-          <el-table-column label="序号" type="index" width="55" align="center"/>
+          <el-table-column label="序2号" type="index" width="55" align="center"/>
           <el-table-column label="货权方" align="center" prop="fName"/>
           <el-table-column label="提单号" align="center" prop="fMblno"/>
           <el-table-column label="品名" align="center" prop="fProductName"/>
@@ -364,7 +388,8 @@
             <template slot-scope="scope">
               <span v-if="scope.row.fBilltype =='SJRK'">入库</span>
 
-              <span v-else="scope.row.fBilltype == 'SJCK'">出库</span>
+              <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
+              <span v-else>{{scope.row.fBilltype}}</span>
             </template>
           </el-table-column>
           <el-table-column label="审核日期" align="center" prop="fReviewDate"/>
@@ -373,14 +398,16 @@
           <el-table-column label="本次金额" align="center" prop="fAmt">
             <template slot-scope="scope">
               <el-input
-                v-model="scope.row.fNewAmount"
+                v-model="scope.row.fAmt"
                 placeholder="请输入本次金额"
                 clearable
                 size="small"
+                oninput="value=value.replace(/[^\d]/g,'')"
+                @input="imgChange1(scope.row.fAmtdr,scope.row.fAmt)"
               />
             </template>
           </el-table-column>
-          <el-table-column label="备注" align="center" prop="fRemarks">
+          <el-table-column label="备1注" align="center" prop="fRemarks">
             <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fRemarks"
@@ -412,13 +439,16 @@ import {
   listCorps
 } from '@/api/finance/charge'
 import { listFees } from '@/api/basicdata/fees'
+import log from '@/views/monitor/job/log'
 
 export default {
   name: 'Charge',
   components: {},
   data() {
     return {
-      browseStatus: false,
+      browseStatus: true,
+      //导入状态
+      state_s: true ,
       fWbuOptions: [],
       options:'',
       // 遮罩层
@@ -438,6 +468,8 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
+      //提单号暂存
+      fMblno:'',
       // 财务数据主表格数据
       chargeList: [],
       // 弹出层标题
@@ -455,8 +487,16 @@ export default {
         timeExamine: '',
         timeInterval: ''
       },
+      //导入从表传主表
+      pass:{
+        fAmtdr:'',    //应收合计
+        fAmtcr:'',    //应付合计
+        fMblno:'',    //提单号
+        fName:''      //货权方
+      },
       // 查询参数
       queryParams: {
+        fId: null,
         pageNum: 1,
         pageSize: 10,
         fBillno: null,
@@ -525,23 +565,80 @@ export default {
     this.getList()
   },
   methods: {
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        const values = data.map(item => Number(item[column.property]));
+        if (!values.every(value => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[0] = '合计';
+          sums[3] = '';
+          this.pass.fAmtdr = sums[9]
+          this.pass.fAmtcr = sums[10]
+        }
+      });
+      return sums;
+    },
+    imgChange1(fAmtdr,fAmt){
+      if (fAmt <= fAmtdr){
+        console.log("小了!")
+        this.state_s = true
+      }else if(fAmt > fAmtdr){
+        console.log("大了!")
+        this.$message.error('本次金额不能大于原定金额');
+        this.state_s = false
+      }
+    },
     //确认导入
     confirmImport() {
-      if (this.selection.length == '0') {
-        console.log('未选择')//写入提示
-      } else {
-        this.increase_s = this.selection
-        this.innerVisible = false
-        this.chargeList_s = []
-        this.queryParameter = {
-          fCorpid: '',
-          fToCorpid: '',
-          fMblno: '',
-          fStatementNo: '',
-          fFeeid: '',
-          timeExamine: '',
-          timeInterval: ''
+      console.log(this.state_s)
+      if(this.state_s == true){
+        if (this.selection.length == '0') {
+          console.log('未选择')//写入提示
+        }else {
+          console.log(this.selection[0].fMblno)
+          for (let item in this.selection){
+            console.log(this.selection[item])
+            console.log(this.selection[item].fMblno)
+
+            console.log(this.selection[item].fName)
+            if(item > 1){
+              this.pass.fMblno = this.selection[item].fMblno + "..."
+              this.pass.fName = this.selection[item].fName + "..."
+
+            }else if(item == 0){
+              this.pass.fMblno = this.selection[item].fMblno
+              this.pass.fName = this.selection[item].fName
+            }
+          }
+          this.increase_s = this.selection
+          this.queryParams.tMblno = this.pass.fMblno //提单号
+          this.queryParams.fCtrlcorpid = this.pass.fName
+          this.queryParams.fAmtcr = this.pass.fAmtcr
+          this.queryParams.fAmtdr = this.pass.fAmtdr
+          console.log(this.queryParams)
+          this.innerVisible = false
+          this.chargeList_s = []
+          this.queryParameter = {
+            fCorpid: '',
+            fToCorpid: '',
+            fMblno: '',
+            fStatementNo: '',
+            fFeeid: '',
+            timeExamine: '',
+            timeInterval: ''
+          }
         }
+      }else if(this.state_s == false){
+        this.$message.error('本次金额不能大于原定金额');
       }
     },
     /** 查询财务数据主列表 */
@@ -593,16 +690,14 @@ export default {
     },
     /** 导入搜索 */
     importSearch() {
-      console.log(this.queryParameter.fFeeid)
-      // console.log(this.queryParameter.fFeeid.join(','))
+      console.log(this.queryParameter)
+      // console.log(this.queryParameter[0].fFeeid.join(','))
       // .join(',')
       this.chargeList_s = []
       this.$refs['form'].validate(valid => {
         if (valid) {
-          console.log(this.queryParameter)
           search(this.queryParameter).then(response => {
             this.chargeList_s = response.rows
-            console.log(response)
           })
         }
       })
@@ -662,41 +757,70 @@ export default {
       this.reset()
       // this.queryParams = []
       this.increase_s = []
+      this.queryParams = {
+        pageNum: 1,
+          pageSize: 10,
+          fBillno: null,
+          fCtrlcorpid: null,
+          fCorpid: null,
+          tMblno: null,
+          fAmtdr: null,
+          fAmtcr: null,
+          fBilltype: null,
+          fBillstatus: null,
+          fRemarks: null,
+          fAccbilldate: null,
+          fDeptid: null
+      },
       this.resetForm('queryParams')
       this.open = true
       this.title = '添加财务数据主'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      console.log(row)
       this.reset()
       const fId = row.fId || this.ids
+      console.log(fId)
       getCharge(fId).then(response => {
         console.log(response)
-        this.increase_s = response.data.tFeeDoList
+        this.increase_s = response.data.feeDoList
+        this.fWbuOptions = response.data.feesList
         this.queryParams = response.data.tFee
         this.fWbuOptions = response.data.feesList
+        this.fMblnoOptions = response.data.corps
         this.open = true
-        this.title = '修改财务数据主'
+        this.title = '修改收费列表'
       })
     },
     /** 提交按钮 */
     submitForm() {
+      console.log(this.queryParameter)
       this.$refs['ruless'].validate(valid => {
         console.log(valid)
         if (valid) {
-          if (this.form.fId != null) {
-            updateCharge(this.form).then(response => {
-              this.msgSuccess('修改成功')
+          if(this.queryParams.fId == null){
+            console.log(this.queryParams)
+            // this.chargeList.fBillstatus = '1'
+            this.queryParams.fBillstatus = '1'
+            let formData = new window.FormData()
+            formData.append('tFee', JSON.stringify(this.queryParams))
+            formData.append('tFeeDo', JSON.stringify(this.increase_s))
+            addCharge(formData).then(response => {
+              this.msgSuccess('新增成功')
+              this.increase_s = []
               this.open = false
               this.getList()
             })
-          } else {
+          }else {
+            console.log(this.queryParams)
+            // this.chargeList.fBillstatus = '1'
+            this.queryParams.fBillstatus = '1'
             let formData = new window.FormData()
             formData.append('tFee', JSON.stringify(this.queryParams))
             formData.append('tFeeDo', JSON.stringify(this.increase_s))
-
             addCharge(formData).then(response => {
-              this.msgSuccess('新增成功')
+              this.msgSuccess('修改成功')
               this.increase_s = []
               this.open = false
               this.getList()
@@ -731,7 +855,11 @@ export default {
       }).then(response => {
         this.download(response.msg)
       })
-    }
+    },
+    //清空一行
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
   }
 }
 </script>

File diff suppressed because it is too large
+ 466 - 315
src/views/finance/contrast/index.vue


+ 2 - 3
src/views/warehouseBusiness/outStock/index.vue

@@ -4022,7 +4022,7 @@ export default {
               for (let i in this.dataList) {
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
+
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;
@@ -4116,7 +4116,7 @@ export default {
           // }
         }
           this.$refs["form"].validate((valid) => {
-            
+
             if (valid) {
               let formData = new window.FormData();
               console.log(this.form);
@@ -4141,7 +4141,6 @@ export default {
               for (let i in this.dataList) {
                 let fQty =
                   this.dataList[i].fQty === this.dataListSelection[li].fQty;
-              
                 let fGoodsid =
                   this.dataList[i].fGoodsid ===
                   this.dataListSelection[li].fGoodsid;

+ 107 - 64
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -167,57 +167,51 @@
       <el-table-column type="index" label="行号" align="center"/>
       <el-table-column
         :show-overflow-tooltip="true"
-        label="货权方"
+        label="单据编号"
         align="center"
-        prop="fCorpid"
+        prop="fBillno"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno"/>
+      <el-table-column label="客户名称" align="center" prop="fCorpid"/>
       <el-table-column
-        label="唛头"
+        label="计费日期"
         align="center"
-        prop="fMarks"
-      />
-      <el-table-column
-        label="出库日期"
-        align="center"
-        prop="createTime"
+        prop="fBillingDeadline"
         width="180"
       >
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
+          <span>{{ parseTime(scope.row.fBillingDeadline, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="仓库" align="center" prop="fWarehouseid"/>
-
-      <el-table-column label="出库件数" align="center" prop="fQty"/>
-      <!--      <el-table-column label="入库毛重" align="center" prop="fGrossweight"/>-->
-      <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
-      <el-table-column label="出库毛重" align="center" prop="fGrossweight"/>
-      <el-table-column label="净重" align="center" prop="fNetweight"/>
       <el-table-column
-        width="100"
-        label="入库状态"
+        label="备注"
         align="center"
-        prop="fItemsStatus">
+        prop="remark"
+      />
+      <el-table-column
+        label="单据状态"
+        align="center"
+        prop="fBillstatus"
+      >
         <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === '1'">未入账</span>
-          <span v-if="scope.row.fItemsStatus === '2'">部分入账</span>
-          <span v-if="scope.row.fItemsStatus === '6'">全部入账</span>
+          <span v-if="scope.row.fBillstatus === 1">新建</span>
+          <span v-if="scope.row.fBillstatus === 2">暂存</span>
+          <span v-if="scope.row.fBillstatus === 3">审核驳回</span>
+          <span v-if="scope.row.fBillstatus === 4">提交审核</span>
+          <span v-if="scope.row.fBillstatus === 5">审核中</span>
+          <span v-if="scope.row.fBillstatus === 6">审核通过</span>
         </template>
       </el-table-column>
       <el-table-column
-        width="100"
-        label="费用状态"
+        label="制单人"
         align="center"
-        prop="fBillstatus">
-        <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus === '1'">录入</span>
-          <span v-if="scope.row.fBillstatus === '2'">录入</span>
-          <span v-if="scope.row.fBillstatus === '3'">驳回</span>
-          <span v-if="scope.row.fBillstatus === '4'">请核</span>
-          <span v-if="scope.row.fBillstatus === '5'">审核中</span>
-          <span v-if="scope.row.fBillstatus === '6'">全部入账</span>
-        </template>
+        prop="createBy"
+      />
+      <el-table-column
+        label="制单日期"
+        align="center"
+        prop="createTime"
+        width="180"
+      >
       </el-table-column>
       <el-table-column
         label="操作"
@@ -230,7 +224,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            v-if="scope.row.fBillstatus === '6'"
+            v-if="scope.row.fBillstatus > 3"
             @click="handleUpdate(scope.row, true)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >查看
@@ -239,6 +233,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
           >修改
@@ -247,6 +242,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
+            v-if="scope.row.fBillstatus <= 3"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
           >删除
@@ -335,6 +331,16 @@
         </el-row>
         <el-row>
           <el-col :span="5">
+            <el-form-item label="业务编号" prop="fBillno">
+              <el-input
+                disabled
+                v-model="form.fBillno"
+                style="width: 80%"
+                placeholder="业务编号"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="5">
             <el-form-item label="制单人" prop="createBy">
               <el-input
                 disabled
@@ -357,11 +363,21 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
+          <el-col :span="5">
+            <el-form-item disabled label="备注" prop="remark">
+              <el-input
+                :disabled="browseStatus"
+                v-model="form.remark"
+                placeholder="制单人"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <div style="font-size:18px">
         计费物资明细
-        <el-button @click="calculateCost">计算仓储费</el-button>
+        <el-button :disabled="browseStatus" @click="calculateCost">计算仓储费</el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
       </div>
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -433,6 +449,13 @@
             </template>
           </el-table-column>
           <el-table-column
+            prop="fMarks"
+            header-align="center"
+            align="center"
+            width="140px"
+            label="唛头"
+          />
+          <el-table-column
             prop="fBsdate"
             header-align="center"
             align="center"
@@ -554,6 +577,12 @@
           </el-table-column>
         </el-table>
       </div>
+      <div>
+        <el-button :disabled="browseStatus" @click.prevent="addCollection()"
+        >新行
+        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
+      </div>
       <div style="font-size:18px">应收款明细</div>
       <div class="dialogTableTitle flex a-center jlr"
            style="display:flex;justify-content:space-between;align-items:center;margin: 10px 0;">
@@ -660,7 +689,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="funitprice"
+            prop="fUnitprice"
             header-align="center"
             align="center"
             width="150px"
@@ -670,7 +699,7 @@
               <el-input
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 v-model="scope.row.fUnitprice"
-                @change="changeContractAmt(scope.row)"
+                @change="changeEstmateAmt(scope.row)"
                 :disabled="browseStatus"
                 placeholder="单价"
                 show-word-limit
@@ -743,7 +772,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="remarks"
+            prop="remark"
             header-align="center"
             align="center"
             width="150px"
@@ -751,7 +780,7 @@
           >
             <template slot-scope="scope">
               <el-input
-                v-model="scope.row.remarks"
+                v-model="scope.row.remark"
                 :disabled="browseStatus"
                 placeholder="备注"
                 show-word-limit
@@ -780,15 +809,12 @@
         <el-button type="success" prop="取 消" @click="cancel"
         >取 消
         </el-button>
-        <el-button type="warning" prop="保 存" @click="submitForm(2)"
-        >保 存
-        </el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           :disabled="browseStatus"
           style="background-color: #008000; color: #fff"
           @click="submitForm(6)"
-        >请 核</el-button
-        >
+        >请 核</el-button>
       </div>
     </el-dialog>
   </div>
@@ -808,6 +834,7 @@
   import { listGoods } from "@/api/basicdata/goods";
   import { listFees } from "@/api/basicdata/fees";
   import { listCorps } from "@/api/basicdata/corps";
+  import moment from 'moment'
 
   export default {
     name: "StorageFeeCalculation",
@@ -853,7 +880,7 @@
           fId: 'SJCK',
           fName: '出库'
         }, {
-          fId: 'CKZZ',
+          fId: 'KCZZ',
           fName: '库存总账'
         }],
         // 货权方(客户数据)
@@ -879,6 +906,7 @@
           dictLabel: '固定',
           dictValue: 5
         }],
+        fTaxrate: 0,
         // 费用名称
         fWbuOptions: [],
         // 查询参数
@@ -939,6 +967,9 @@
     },
     created() {
       this.getList();
+      this.getDicts("tax_rate").then((response) => {
+        this.fTaxrate = response.data[0].dictValue
+      });
     },
     methods: {
       queryUser() {
@@ -963,6 +994,7 @@
         this.loading = true;
         listStorageFeeCalculation(this.queryParams).then((response) => {
           this.warehousebillsList = response.rows;
+          this.$set(this.form, 'createTime', moment(Date.parse(this.warehousebillsList.createTime)).format("YYYY-MM-DD HH:mm:ss"))
           this.total = response.total;
           this.loading = false;
         });
@@ -971,6 +1003,7 @@
       cancel() {
         this.open = false;
         this.reset();
+        this.getList();
       },
       // 计算仓储费
       calculateCost() {
@@ -992,11 +1025,30 @@
           this.getStorageFee()
         }
       },
+      // 添加费用新行
+      // 收款信息
+      addCollection() {
+        this.warehouseDrList.push({
+          fCorpid: null,
+          fFeeid: null,
+          fFeeunitid: 2,
+          fQty: 0,
+          fUnitprice: 0,
+          fAmount: 0,
+          fCurrency: "RMB",
+          fExrate: "1",
+          fTaxrate: this.fTaxrate,
+          fCxrate: "1",
+          fRate: null,
+          remark: null,
+        });
+      },
       getStorageFee () {
         calculateStorageFees(this.form).then((response) => {
           this.dataList = []
           this.warehouseDrList = []
           this.form.fId = response.data.warehouseBills.fId
+          this.form.fBillno = response.data.warehouseBills.fBillno
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
           }
@@ -1147,24 +1199,16 @@
           this.title = "编辑仓储费计算";
         });
       },
-      // 数量计算
-      changeContractAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, 'fAmount', Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, 'fAmount', row.fUnitprice);
-          }
-        }
-      },
       changeEstmateAmt(row) {
-        if (row.fUnitprice !== "") {
-          if (row.fQty !== "") {
-            this.$set(row, "fAmount", Number(row.fUnitprice) * Number(row.fQty)).toFixed(2);
-          } else {
-            this.$set(row, "fAmount", row.fUnitprice);
-          }
+        let fQty = 0
+        let fUnitprice = 0
+        if (row.fUnitprice && row.fUnitprice !== "") {
+          fUnitprice = row.fUnitprice
+        }
+        if (row.fQty && row.fQty !== "") {
+          fQty = row.fQty
         }
+        this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
       },
       changefBsdate(row) {
         if (this.dataList.length > 0) {
@@ -1175,7 +1219,6 @@
       },
       // 合计
       getSummaries(param) {
-        console.log(param);
         const {columns, data} = param;
         const sums = [];
         var values = [];

Some files were not shown because too many files changed in this diff