Ver código fonte

修改财务对账

翁玉文 4 anos atrás
pai
commit
5fa8a765a1
2 arquivos alterados com 57 adições e 25 exclusões
  1. 2 2
      src/api/finance/contrast.js
  2. 55 23
      src/views/finance/contrast/index.vue

+ 2 - 2
src/api/finance/contrast.js

@@ -20,7 +20,7 @@ export function getFee(fId) {
 // 新增财务数据主
 export function addFee(data) {
   return request({
-    url: '/finance/contrast',
+    url: '/finance/contrast/add',
     method: 'post',
     data: data
   })
@@ -29,7 +29,7 @@ export function addFee(data) {
 // 修改财务数据主
 export function updateFee(data) {
   return request({
-    url: '/finance/contrast',
+    url: '/finance/contrast/add',
     method: 'put',
     data: data
   })

+ 55 - 23
src/views/finance/contrast/index.vue

@@ -217,7 +217,17 @@
       <el-table-column label="应付合计" align="center" prop="fAmtcr" />
       <!--       <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
       <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="fDeptid" /> -->
       <el-table-column
         label="操作"
@@ -366,7 +376,7 @@
         <el-table-column label="行号" align="center" type="index" />
         <el-table-column label="提单号" align="center" prop="fMblno" />
         <el-table-column label="业务日期" align="center" prop="fBsdate" />
-        <el-table-column label="费用名称" align="center" prop="fFeeid" />
+        <el-table-column label="费用名称" align="center" prop="fFeeName" />
         <el-table-column label="收/付" align="center" prop="fSrcdc">
           <template slot-scope="scope">
             <span v-if="scope.row.fSrcdc == 'D'">收</span>
@@ -595,14 +605,21 @@
                   placeholder="请输入本次金额"
                   clearable
                   size="small"
-                  oninput="value=value.replace(/[^\d]/g,'')"
-                  @input="imgChange1(scope.row.fAmtdr, scope.row.fAmt)"
+                  oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                  @change="imgChange1(scope.row)"
                 />
               </template>
             </el-table-column>
             <el-table-column label="费用名称" align="center" prop="fFeeName" />
-            <el-table-column label="备注" align="center" prop="fRemarks">
-              <el-input placeholder="请输入内容"></el-input>
+            <el-table-column label="备1注" align="center" prop="fRemarks">
+              <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fRemarks"
+                placeholder="请输入备注"
+                clearable
+                size="small"
+              />
+            </template>
             </el-table-column>
           </el-table>
 
@@ -807,17 +824,7 @@ export default {
     this.register()
   },
   methods: {
-    // 金额筛选
-    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
-      }
-    },
+   
     // 默认录入人
     register() {
       queryUserVal().then((response)=>{
@@ -843,10 +850,29 @@ export default {
             sums[0] = '合计';
           } else {
             sums[4] = '';
+          this.pass.fAmtdr = sums[9]
+          this.pass.fAmtcr = sums[10]
           }
         })
         return sums;
       },
+       // 金额筛选
+       imgChange1(row){
+      if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)){
+        this.$set(row, 'fAmt', row.fAmtdr)
+        this.state_s = true
+      }
+    },
+    // 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
+    //   }
+    // },
     // 导入搜索
     searchFee() {
       console.log(this.TWareHouseFees)
@@ -885,7 +911,7 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
-      this.feeList = []
+      // this.feeList = []
       this.reset();
     },
     // 表单重置
@@ -909,17 +935,17 @@ export default {
         updateBy: null,
         updateTime: null
       };
-      // this.resetForm("form");
+      this.resetForm("form");
     },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.getList();
-      this.searchFee()
+      // this.searchFee()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm("queryParams_s");
       this.handleQuery();
       this.TWareHouseFees={
         fCorpid:'',
@@ -1000,10 +1026,12 @@ export default {
     handleUpdate(row) {
       this.reset();
       const fId = row.fId || this.ids
+      console.log(fId)
       getFee(fId).then(response => {
-        this.DzfeeList = response.data.tFeeDoList
+        this.DzfeeList = response.data.feeDoList
         this.TWareHouseFees = response.data.tFee
         this.fWbuOptions = response.data.feesList
+        this.fMblnoOptions = response.data.corps
         this.open = true;
         this.title = "修改财务数据主";
       });
@@ -1024,7 +1052,8 @@ export default {
     submitForm() {
       this.$refs["ruless"].validate(valid => {
         if (valid) {
-          if (this.queryParams.fId != null) {
+          if (this.queryParams.fId = null) {
+            console.log(this.queryParams)
             this.queryParams.fBillstatus = '1'
             let formDate = new window.FormData()
             formDate.append('tFee',JSON.stringify(this.TWareHouseFees))
@@ -1068,6 +1097,7 @@ export default {
       if(this.state_s == true) {
         if (this.selection.length == '0') {
           console.log('未选择')//写入提示
+          this.$message.error('未选择导入行');
         } else {
           console.log(this.selection[0].fMblno)
           for (let item in this.selection){
@@ -1106,6 +1136,8 @@ export default {
           timeReconci: ''
         }
       }
+    }else if(this.state_s == false){
+      this.$message.error('本次金额不能大于原定金额');     
     }
   },