Sfoglia il codice sorgente

财务对账收费修改6

wengyuwen 4 anni fa
parent
commit
1f843b6d33

+ 8 - 0
src/api/finance/charge.js

@@ -84,3 +84,11 @@ export function delCharge_s(fId) {
     method: 'delete'
   })
 }
+// 撤销收费C
+export function backCharge(queryParameter) {
+  return request({
+    url: '/finance/charge/revoke',
+    method: 'post',
+    data: queryParameter
+  })
+}

+ 86 - 29
src/views/finance/charge/index.vue

@@ -129,7 +129,7 @@
       <el-table-column label="备注" align="center" prop="fRemarks"/>
       <el-table-column label="状态" align="center" prop="fBillstatus">
         <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus == '1'">新建</span>
+          <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>
@@ -137,11 +137,29 @@
           <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
         </template>
       </el-table-column>
-        <el-table-column label="操作" width="100" align="center" class-name="small-padding fixed-width">
+        <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
               size="mini"
               type="text"
+              icon="el-icon-view"
+              @click="check(scope.row)"
+              v-hasPermi="['finance:contrast:edit']"
+              v-if="scope.row.fBillstatus == 6"
+            >查看</el-button
+            >
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="check(scope.row)"
+              v-hasPermi="['finance:contrast:edit']"
+              v-if="scope.row.fBillstatus >= 3 && scope.row.fBillstatus <= 6"
+            >审批进度</el-button
+            >
+            <el-button
+              size="mini"
+              type="text"
               icon="el-icon-edit"
               @click="handleUpdate(scope.row)"
               v-hasPermi="['finance:charge:edit']"
@@ -157,20 +175,20 @@
               v-if="scope.row.fBillstatus <= 3"
             >删除
             </el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              v-if="scope.row.fBillstatus === 6"
-            >查看
-            </el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"
-            >查看审批流
-            </el-button>
+<!--            <el-button-->
+<!--              size="mini"-->
+<!--              type="text"-->
+<!--              icon="el-icon-delete"-->
+<!--              v-if="scope.row.fBillstatus === 6"-->
+<!--            >查看-->
+<!--            </el-button>-->
+<!--            <el-button-->
+<!--              size="mini"-->
+<!--              type="text"-->
+<!--              icon="el-icon-delete"-->
+<!--              v-if="scope.row.fBillstatus > 3 && scope.row.fBillstatus < 6"-->
+<!--            >查看审批流-->
+<!--            </el-button>-->
           </template>
         </el-table-column>
       <!--      <el-table-column label="单据类型" align="center" prop="fBilltype"/>-->
@@ -255,15 +273,15 @@
       <div style="width: 100%;">
         <el-button type="warning" size="small" @click="charGe" :disabled="notChange">收费</el-button>
         <el-button type="primary" size="small" @click="confirmCharge" :disabled="notChange">确认收费</el-button>
-        <el-button type="success" size="small" :disabled="notChange" @click="backCharge" v-show="hide !== true">撤销收费</el-button>
+        <el-button type="success" size="small" @click="revokeCharge" v-if="queryParams.fBillstatus === '6'">撤销收费</el-button>
         <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
-        <el-button type="danger" size="small" :disabled="notChange" v-show="hide !== true">撤销收费</el-button>
+        <el-button type="danger" size="small" :disabled="notChange" v-show="Lander == Operator">撤销审批</el-button>
       </div>
       <el-table v-loading="loading" :data="increase_s" @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="提单号" align="center" prop="fMblno"/>
-        <el-table-column label="存货单号" align="center" prop="fBscorpno"/>
+        <el-table-column label="存货单号" align="center" prop="fBscorpno"/>if
         <el-table-column label="品名" align="center" prop="fProductName"/>
         <el-table-column label="业务日期" align="center" prop="fBsdate">
           <template slot-scope="scope">
@@ -302,7 +320,9 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button type="info" v-if="notChange">查看审批流</el-button>
+        <el-button v-if="approve = false" @click="addOrUpdateHand">审批</el-button>
+        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
+        <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
@@ -454,7 +474,7 @@
       width="80%"
       :before-close="closePrinting"
     >
-      <el-table id="print_area2" v-loading="loading" :data="printObject" @selection-change="handleSelectionChange_s">
+      <el-table id="print_area2" v-loading="loading" ref="table" :data="printObject" @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="提单号" align="center" prop="fMblno"/>
@@ -502,16 +522,24 @@ import {
   exportCharge,
   search,
   listCorps,
-  delCharge_s
+  delCharge_s,
+  backCharge
 } from '@/api/finance/charge'
 import { listFees } from '@/api/basicdata/fees'
 import print from 'print-js'
+import AddOrUpdate from '@/views/viewApproval'
+import ApprovalComments from '@/views/startApproval'
+import { queryUserVal } from '@/api/warehouseBusiness/agreement'
 
 export default {
   name: 'Charge',
-  components: {},
   data() {
     return {
+      Lander:'',
+      Operator:'',
+      approve:true,
+      addOrUpdateVisible: false,
+      contrastId:220,
       hide:false,
       openPrint:false,
       notChange:false,
@@ -635,22 +663,48 @@ export default {
       }
     }
   },
+  components: {
+    AddOrUpdate,
+    ApprovalComments
+  },
   created() {
     this.getList()
+    this.register()
   },
   methods: {
+    register(){
+      queryUserVal().then((response)=>{
+        this.Lander = response.user.userName
+      })
+    },
+    getDataList(){
+      this.addOrUpdateVisible = false
+    },
+    // 查看审批流
+    addOrUpdateHandle(){
+      this.addOrUpdateVisible = true
+      this.addOrUpdateVisib = false
+      let id = '448'
+      let actId = '110'
+      console.log(this.queryParams.fId)
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
+      })
+    },
+
     // 撤销收费
-    backCharge(){
+    revokeCharge(){
       this.queryParams.fBillstatus = '1'
       let formDate = new window.FormData()
       formDate.append('tFee', JSON.stringify(this.queryParams))
       formDate.append('tFeeDo', JSON.stringify(this.increase_s))
 
-      collectFee(formDate).then(response => {
+      backCharge(formDate).then(response => {
         console.log(response)
         this.msgSuccess('操作成功')
       })
-      this.open = false
+      // this.open = false
+      this.getList()
     },
 
     // 查看按钮
@@ -690,8 +744,7 @@ export default {
     printSomething() {
       console.log('22222')
       // 此处的style即为打印时的样式
-      const style =
-        '@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}'
+      const style ='table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}'
       print({
         printable: 'print_area2',
         type: 'html',
@@ -703,6 +756,7 @@ export default {
     closePrinting() {
       this.$confirm('确认关闭?')
         .then(_ => {
+          this.printStatus = false
         })
         .catch(_ => {
 
@@ -720,6 +774,7 @@ export default {
         this.msgSuccess('操作成功')
       })
       this.open = false
+      this.getList()
     },
     charGe() {
       this.queryParameter.fToCorpid = this.queryParams.fCorpid
@@ -795,7 +850,7 @@ export default {
             this.pass.fName = this.nothing[0] + '...'
           }
 
-          this.increase_s = this.selection
+          this.increase_s = this.increase_s.concat(this.selection)
           this.queryParams.tMblno = this.pass.fMblno //提单号
           this.queryParams.fCtrlcorpid = this.pass.fName
           this.queryParams.fCorpid = this.queryParameter.fToCorpid
@@ -966,6 +1021,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       console.log(row)
+      this.hide = false
       this.notChange = false
       this.reset()
       this.pass = {
@@ -980,6 +1036,7 @@ export default {
       console.log(fId)
       getCharge(fId).then(response => {
         console.log(response)
+        this.Operator = response.data.tFee.createBy
         this.increase_s = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
         this.queryParams = response.data.tFee

+ 121 - 74
src/views/finance/contrast/index.vue

@@ -48,15 +48,13 @@
         </el-select>
       </el-form-item>
 
-      <el-form-item label="录入人" prop="createBy">
-        <el-input
-          v-model="queryParams_s.createBy"
-
-
-          size="small"
-          disabled
-        />
-      </el-form-item>
+<!--      <el-form-item label="录入人" prop="createBy">-->
+<!--        <el-input-->
+<!--          v-model="queryParams_s.createBy"-->
+<!--          size="small"-->
+<!--          disabled-->
+<!--        />-->
+<!--      </el-form-item>-->
 
       <!-- <el-form-item label="提单号" prop="tMblno">
         <el-input
@@ -104,17 +102,18 @@
         ></el-date-picker>
       </el-form-item>
 
-      <el-form-item label="状态" prop="fBillstatus">
-        <el-select v-model="queryParams_s.fBillstatus" placeholder="请选择">
-          <el-option
-            v-for="item in options"
-            :key="item.value"
-            :label="item.dictLabel"
-            :value="item.dictValue"
-          >
-          </el-option>
-        </el-select>
-      </el-form-item>
+<!--      <el-form-item label="状态" prop="fBillstatus">-->
+<!--        <el-select v-model="queryParams_s.fBillstatus" placeholder="请选择">-->
+<!--          <el-option-->
+<!--            -->
+<!--            v-for="item in options"-->
+<!--            :key="item.value"-->
+<!--            :label="item.dictLabel"-->
+<!--            :value="item.dictValue"-->
+<!--          >-->
+<!--          </el-option>-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
       <!-- <el-form-item label="备注" prop="fRemarks">
         <el-input
           v-model="queryParams.fRemarks"
@@ -223,7 +222,7 @@
       <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>
       <el-table-column label="状态" align="center" prop="fBillstatus" width="120">
         <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus == '1'">新建</span>
+          <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>
@@ -246,18 +245,26 @@
             icon="el-icon-view"
             @click="check(scope.row)"
             v-hasPermi="['finance:contrast:edit']"
-            v-if="scope.row.fBillstatus == 1 "
+            v-if="scope.row.fBillstatus == 6"
           >查看</el-button
           >
           <el-button
             size="mini"
             type="text"
+            icon="el-icon-view"
+            @click="check(scope.row)"
+            v-hasPermi="['finance:contrast:edit']"
+            v-if="scope.row.fBillstatus >= 3 && scope.row.fBillstatus <= 6"
+          >审批进度</el-button>
+          <el-button
+            size="mini"
+            type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['finance:contrast:edit']"
-            v-if="scope.row.fBillstatus <= 3"
-            >修改</el-button
-          >
+            v-if="scope.row.fBillstatus <= 3">
+            修改</el-button>
+
           <el-button
             size="mini"
             type="text"
@@ -376,9 +383,9 @@
           <el-button type="warning" size="small" @click="reconciliation" :disabled="notChange"
             >对账</el-button>
           <el-button type="primary" size="small" @click="confirmReconciliation" :disabled="notChange">确认对账</el-button>
-          <el-button type="success" size="small" :disabled="notChange" @click="backrRconciliation" v-show="hide !== true">撤销对账</el-button>
+          <el-button type="success" size="small" @click="backrRconciliation" v-if="queryParams.fBillstatus === '6'">撤销对账</el-button>
           <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
-          <el-button type="danger" size="small" :disabled="notChange" v-show="hide !== true">撤销审批</el-button>
+          <el-button type="danger" size="small" v-show="Lander == Operator">撤销审批</el-button>
         </div>
 
         <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
@@ -416,6 +423,7 @@
             <span v-else>{{scope.row.fBilltype}}</span>
           </template>
         </el-table-column>
+        <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
@@ -431,9 +439,9 @@
       </el-table>
 
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve">审批</el-button>
-        <el-button type="info" v-if="notChange" @click="">查看审批流</el-button>
-        <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" :dataForm="editModel"></add-or-update>
+        <el-button v-if="approve = false" @click="addOrUpdateHand">审批</el-button>
+        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
+        <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
@@ -502,6 +510,7 @@
 
           <el-form-item label="提单号" prop="fMblno">
             <el-input
+              clearable
               v-model="TWareHouseFees.fMblno"
               placeholder="请输入提单号"
               style="width: 200px"
@@ -622,7 +631,7 @@
               prop="fReviewDate"
             />
             <el-table-column label="金额" align="center" prop="fAmtdr" />
-            <el-table-column label="本次金额" align="center" prop="fAmt">
+            <el-table-column label="本次金额" align="center" prop="fAmt"  width="100">
               <template slot-scope="scope">
                 <el-input
                   v-model="scope.row.fAmt"
@@ -635,13 +644,14 @@
               </template>
             </el-table-column>
             <el-table-column label="费用名称" align="center" prop="fFeeName" />
-            <el-table-column label="备1注" align="center" prop="fRemarks">
+            <el-table-column label="备注" align="center" prop="fRemarks">
               <template slot-scope="scope">
               <el-input
                 v-model="scope.row.fRemarks"
                 placeholder="请输入备注"
                 clearable
                 size="small"
+                width="100"
               />
             </template>
             </el-table-column>
@@ -699,12 +709,13 @@
       title="对账单"
     >
       <el-table
+        ref="table"
         id="print_area2"
         v-loading="loading"
         :data="printObject"
         @selection-change="handleSelectionChange_s">
 
-        <el-table-column label="行号" align="center" type="index" />
+        <el-table-column label="行号" align="center" type="index" width="70"/>
         <el-table-column label="提单号" align="center" prop="fMblno" />
         <el-table-column label="业务日期" align="center" prop="fBsdate">
           <template slot-scope="scope">
@@ -719,7 +730,7 @@
           </template>
         </el-table-column>
         <el-table-column label="金额" align="center" prop="fAmtdr" />
-        <el-table-column label="本次金额" align="center" prop="fAmt" />
+        <el-table-column label="本次金额" align="center" prop="fAmt"/>
         <el-table-column label="业务类型" align="center" prop="fBilltype">
           <template slot-scope="scope">
             <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
@@ -746,21 +757,19 @@ import AddOrUpdate from '@/views/viewApproval'
 import { queryUserVal } from '@/api/warehouseBusiness/agreement'
 import moment from 'moment'
 import print from "print-js"
+import ApprovalComments from '@/views/startApproval'
 export default {
   name: "Fee",
-  components: {
-  },
+
   data() {
     return {
       addOrUpdateVisible: false,
-      components: {
-        AddOrUpdate
-      },
       contrastId:210,
       // 审批状态
-      approve:'',
+      approve:true,
       // 打印表
       printObject:[],
+      Lander:'',
       openPrint:false,
       statrGo:true,
       state_s: true,
@@ -797,8 +806,8 @@ export default {
       selection: '',
       // 弹出层标题
       title: "",
-      // //
-      // createBy:response.user.userName,
+      //  录人
+      Operator:'',
       // 是否显示弹出层
       open: false,
       dialogVisible: false,
@@ -910,31 +919,53 @@ export default {
       }
     };
   },
+  components: {
+    AddOrUpdate,
+    ApprovalComments
+  },
   created() {
     this.getList()
     this.register()
   },
   methods: {
+    getDataList(){
+    this.addOrUpdateVisible = false
+  },
+    // 审批
+    addOrUpdateHand(){
+      this.addOrUpdateVisib = true
+      this.addOrUpdateVisible = false
+      let id = '448'
+      let actId = '110'
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(id,actId)
+      })
+    },
     // 查看审批流
-    // addOrUpdateHandle(){
-    //   this.addOrUpdateVisible = true
-    //   this.$nextTick(() => {
-    //     this.$refs.addOrUpdate.init(this.fId,this.contrastId)
-    //   })
-    // },
+    addOrUpdateHandle(){
+      this.addOrUpdateVisible = true
+      this.addOrUpdateVisib = false
+      let id = '448'
+      let actId = '110'
+      console.log(this.queryParams.fId)
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
+      })
+    },
     // 撤销对账
     backrRconciliation(){
-      this.queryParams.fBillstatus = '1'
-      let formDate = new window.FormData()
-      formDate.append('tFee',JSON.stringify(this.queryParams))
-      formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
+        this.queryParams.fBillstatus = '1'
+        let formDate = new window.FormData()
+        formDate.append('tFee',JSON.stringify(this.queryParams))
+        formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
 
-      backFee(formDate).then(response=>{
-        console.log(response)
-        this.msgSuccess("撤回成功")
+        backFee(formDate).then(response=>{
+          console.log(response)
+          this.msgSuccess("撤回成功")
 
-      })
-      this.open = false
+        })
+        // this.open = false
+      this.getList()
     },
 
     // 打印功能
@@ -950,12 +981,15 @@ export default {
     printSomething() {
       console.log("22222");
       // 此处的style即为打印时的样式
-      const style =
-        "@media print {} }";
+      const style ='table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}'
+        // "@media print {} }";
+
       print({
         printable: "print_area2",
         type: "html",
-        style: style, // 亦可使用引入的外部css;
+        header:"对账表",
+        headerStyle: 'text-align:center;color:#000;width:100%;',
+        style: style,// 亦可使用引入的外部css;
         scanStyles: false,
       });
     },
@@ -972,17 +1006,22 @@ export default {
 
       })
       this.open = false
+      this.getList()
     },
     // 对账按钮功能
     reconciliation(){
       this.TWareHouseFees.fToCorpid = this.queryParams.fCorpid
+      console.log(this.TWareHouseFees)
       console.log(this.queryParams.fCorpid)
       this.innerVisible = true
     },
     // 默认录入人
     register() {
       queryUserVal().then((response)=>{
-      this.queryParams_s.createBy = response.user.userName
+        // this.Lander = response.user.userName
+        console.log(response)
+        this.Lander = response.user.userName
+        this.queryParams_s.createBy = response.user.userName
       this.queryParams.createBy = response.user.userName
       console.log(this.DzfeeList.createBy)
       console.log(response.user.userName)
@@ -1069,6 +1108,7 @@ export default {
       this.open = false;
       // this.feeList = []
       this.reset();
+      this.getList()
     },
     // 表单重置
     reset() {
@@ -1114,7 +1154,7 @@ export default {
         timeExamine:'',
         timeInterval:'',
         fSrcdc:'',
-        fReconciliation:''
+        fReconciliation:'1'
       }
     },
     //导入重置按钮
@@ -1248,6 +1288,9 @@ export default {
       getFee(fId).then(response => {
         console.log(this.DzfeeList)
         console.log(response)
+        console.log(response.data.tFee.createBy)
+        this.Operator = response.data.tFee.createBy
+        console.log(this.Operator)
         this.DzfeeList = response.data.feeDoList
         this.fWbuOptions = response.data.feesList
         this.queryParams = response.data.tFee
@@ -1288,7 +1331,7 @@ export default {
             updateFee(formDate).then(response => {
               this.msgSuccess("新增成功");
               this.DzfeeList = []
-              this.open = false;
+              // this.open = false;
               this.getList();
             });
 
@@ -1370,7 +1413,7 @@ export default {
           //   this.pass.fCorpid = this.nothing[0] + "..."
           //   console.log(this.nothing)
           // }
-        this.DzfeeList = this.selection
+          this.DzfeeList = this.DzfeeList.concat(this.selection)
         this.queryParams.tMblno = this.pass.fMblno //提单号
         // this.queryParams.fCorpid = this.pass.fFeesName
 
@@ -1395,8 +1438,9 @@ export default {
           timeExamine:'',
           timeInterval:'',
           fSrcdc:'',
-          fReconciliation:'',
-          timeReconci: ''
+          fReconciliation:'1',
+          timeReconci: '',
+          fDc:'D'
         }
       }
     }else if(this.state_s == false){
@@ -1412,21 +1456,24 @@ export default {
         console.log(res.msg)
 
         switch (res.msg) {
-          case '0':
+          case '0':{
             this.$message.error("当前数据已被其他操作员操作,请刷新页面")
             break
-          case '1':
+          }
+          case '1':{
             tips="当前主表有数据,从表无数据,确认是否删除?"
             this.delete_s(fIds,tips)
             break
-          case '2':
-            tips="当前主要有数据,从表有数据,确认是否删除?"
-            this.delete_s(fIds,tips)
-            break
-          case '3':
-            tips="当前主要有数据,从表有数据,确认是否删除?"
+          }
+          case '2':{
+            tips="当前主表有数据,从表有数据,确认是否删除?"
             this.delete_s(fIds,tips)
             break
+          }
+           default:{
+             return this.$message.error("未知错误,无状态")
+           }
+
         }
       })
     },