Ver Fonte

前端gjy

gjy há 3 anos atrás
pai
commit
7fa3f22632

+ 2 - 0
src/api/V2/statisticalReport/index.js

@@ -12,6 +12,8 @@ export const API_GET_PURCHASE_IN_CONTRACTNO = '/purchaseReceiptReport/selectCont
 export const API_POST_AMEND_PURCHRECEIPT = '/purchaseReceiptReport/api/editProcurementReceiptReport'
 // 采购入库补货结转
 export const API_POST_REPLANISHENT = '/purchaseReceiptReport/api/replenishment'
+// 采购入库补货结转其他合同
+export const API_GET_SELECTCONTRACTNO = '/purchaseReceiptReport/selectContractNo'
 // 采购入库审核
 export const API_POST_AUDIT = '/purchaseReceiptReport/api/examinePurchaseOrder'
 // 采购入库付款

+ 4 - 2
src/model/statisticalReport/index.js

@@ -27,8 +27,8 @@ import {
     API_GET_PURCHASE_CONTRACTNO,
     API_GET_PURCHASE_IN_CONTRACTNO,
     API_GET_SELECTORDER,
-    API_GET_SELECTSALEORDER
-
+    API_GET_SELECTSALEORDER,
+    API_GET_SELECTCONTRACTNO
 } from '@/api/V2/statisticalReport'
 //采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -44,6 +44,8 @@ export const getpurchaseincontractno = appRx.get(API_GET_PURCHASE_IN_CONTRACTNO,
 export const postamend = appRx.post(API_POST_AMEND_PURCHRECEIPT, errorCatcher, errorHandle, filter)
 //采购入库补货结转
 export const postreplanishent = appRx.post(API_POST_REPLANISHENT, errorCatcher, errorHandle, filter)
+//采购入库补货结转其他合同
+export const getselectctcontractno = appRx.get(API_GET_SELECTCONTRACTNO, errorCatcher, errorHandle, filter)
 //采购入库审核
 export const postaudit = appRx.post(API_POST_AUDIT, errorCatcher, errorHandle, filter)
 //采购入库付款

+ 10 - 66
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -8,21 +8,12 @@
           <ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
           <ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
-         <ws-button  type="primary" v-hasPermission="
-            `report.procurementCloseReport.view`
-          " @click="handlepass1()">通过</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.procurementCloseReport.view`
-          " @click="handlereject(3)">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handlepass()">通过</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
-          " @click="handlereject(2)">驳回</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.procurementCloseReport.view`
-          " @click="handleAudit()">审核</ws-button>
+          " @click="handlereject()">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.payment`
           " @click="handlepayment()">付款</ws-button>
@@ -70,10 +61,10 @@
           border
           :summary-method="getSummaries"
           show-summary
-          :selectable='selectInit'
+          
           @selection-change="handleSelectionChange"
         >
-          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column :selectable='selectInit' type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
           <el-table-column class="table_td" prop="closePositionDate" label="平仓日期"></el-table-column>
@@ -370,7 +361,7 @@ export default {
         }
       }
     },
-    audit(item,index,status,status1){
+    audit(item,index,status){
       if(index<this.modification.length){
         posthandle({ taskId: item.taskId,
             approved: status,
@@ -378,38 +369,16 @@ export default {
             needReapply: false,})
              .toPromise()
           .then((response) => {
-            this.audit(this.modification[index+1],index+1,status,status1)
+            this.audit(this.modification[index+1],index+1,status)
           }).catch((req) => {
               this.$message.warning(req.message)
             })
       }else{
         if(status){
-          if(status1==1){
-            this.$message.success('审核成功')
-          }else if(status1==2){
-            this.$message.success('通过成功')
-          }else if(status1==3){
-            this.$message.success('通过成功')
-          }
+          this.$message.success('通过成功')
           this.getList()
         }else if(!status){
-          if(status1==2){
-            closeaudit({
-            roleFlag: status1,
-            flag: 2,
-            purchaseReceiptReportList: this.modification,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$message.success('驳回成功')
-              this.getList()
-            })
-            .catch((req) => {
-              this.$message.success('驳回失败')
-            })
-          }else if(status1==3){
             closeaudit({
-            roleFlag: status1,
             flag: 2,
             purchaseReceiptReportList: this.modification,
           })
@@ -421,10 +390,7 @@ export default {
             .catch((req) => {
               this.$message.success('驳回失败')
             })
-          }
         }
-         
-         
       }
     },
     //统计审核
@@ -453,7 +419,7 @@ export default {
       if(this.modification.length==0){
         this.$message.warning('请选择要驳回的条目')
       }else{
-        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
+        this.$confirm(`是否确定驳回?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning'
@@ -465,7 +431,7 @@ export default {
         // }).catch(req => {
         //   this.$message.success('驳回失败')
         // })
-            that.audit(this.modification[0],0,false,status)
+            that.audit(this.modification[0],0,false)
       })
       }
     },
@@ -589,13 +555,12 @@ export default {
     handleDownload(file) {
       console.log(file)
     },
-    //财务通过
     handlepass(){
       var that=this
       if(this.modification.length==0){
         this.$message.warning('请选择要通过的条目')
       }else{
-        this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
+        this.$confirm(`是否确定通过?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning'
@@ -607,28 +572,7 @@ export default {
         // }).catch(req => {
         //   this.$message.success('通过失败')
         // })
-            that.audit(this.modification[0],0,true,2)
-      })
-      }
-    },
-    //决策人通过
-    handlepass1(){
-      if(this.modification.length==0){
-        this.$message.warning('请选择要通过的条目')
-      }else{
-        this.$confirm(`审核通过后,任务将发送给出纳,是否确定通过?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      }).then(() => {
-        // closeaudit({roleFlag:3,flag:1,purchaseClosingReportList:this.modification}).toPromise()
-        // .then(response => {
-        //   this.$message.success('通过成功')
-        //   this.getList()
-        // }).catch(req => {
-        //   this.$message.success('通过失败')
-        // })
-            that.audit(this.modification[0],0,true,3)
+            that.audit(this.modification[0],0,true)
       })
       }
     },

+ 65 - 75
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -8,18 +8,12 @@
           <ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
           <ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
-        <ws-button type="primary"  v-hasPermission="
-            `report.procurementInReport.view`
-          " @click="handlepass1()">通过</ws-button>
-        <ws-button type="primary" v-hasPermission="
-            `report.procurementInReport.view`
-          " @click="handlereject(3)">驳回</ws-button>
         <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
           " @click="handlepass()">通过</ws-button>
         <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
-          " @click="handlereject(2)">驳回</ws-button>
+          " @click="handlereject()">驳回</ws-button>
         <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.payment`
           " @click="handlepayment">付款</ws-button>
@@ -32,15 +26,6 @@
         <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.carry`
           " @click="carryover">补货结转</ws-button>
-        <ws-button type="primary" v-hasPermission="
-            `report.procurementInReport.view`
-          " @click="handleAudit()">审核</ws-button> 
-        <ws-button  type="primary"  v-hasPermission="
-            `report.procurementInReport.view`
-          " @click="handlepass1()">通过</ws-button>
-        <ws-button type="primary" v-hasPermission="
-            `report.procurementInReport.view`
-          " @click="handlereject(3)">驳回</ws-button>
         </el-col>
         <el-col style='text-align:right;line-height:60px;padding-right:10px;' :span="8">
         <ws-select
@@ -89,10 +74,10 @@
         border
         :summary-method="getSummaries"
         show-summary
-        :selectable='selectInit'
+        
         @selection-change="handleSelectionChange"
       >
-        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :selectable='selectInit' type="selection" width="55"></el-table-column>
         <el-table-column type="index" label="序号" width="50"></el-table-column>
         <el-table-column
           class="table_td"
@@ -433,10 +418,10 @@
       :append-to-body="true"
     >
       <el-form :model="form">
-        <el-button :type="currect ? 'primary' : ''" @click="currect = true"
+        <el-button :type="currect ? 'primary' : ''" @click="cur(0)"
           >本合同</el-button
         >
-        <el-button :type="!currect ? 'primary' : ''" @click="currect = false"
+        <el-button :type="!currect ? 'primary' : ''" @click="cur(1)"
           >其他合同</el-button
         >
         <el-form-item
@@ -445,11 +430,11 @@
           :label-width="formLabelWidth"
         >
           <ws-select
-            v-if="carryovercontractnolist.length > 0"
+            v-if="carryovercontractnolist"
             v-model="carryoverlist.contractNo"
             placeholder="请选择合同"
             clearable
-            @change="contractchange"
+            @change="carryovercontractchange"
             maxlength="500"
             type="input"
           >
@@ -490,6 +475,7 @@ import {
   postpaymoney,
   postopeninvoice,
   postbatchopeninvoice,
+  getselectctcontractno
 } from '@/model/statisticalReport/index'
 import {
   posthandle
@@ -621,6 +607,23 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    cur(status){
+      if(status==0){
+        this.currect=true
+      }else{
+        var that=this
+        this.currect=false
+        getselectctcontractno({customerName:this.modification[0].customerName,contractNo:this.modification[0].contractNo}).toPromise()
+            .then((response) => {
+
+              that.carryovercontractnolist=response
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+      }
+    },
      selectInit(row){
 //在这里一定要记得类型匹配的上。
             if(row.approveStatus==null){
@@ -851,12 +854,12 @@ export default {
           //     this.$message.success('审核成功')
           //     this.getList()
           //   })
-            that.audit(this.modification[0],0,true,1)
+            that.audit(this.modification[0],0,true)
           
         })
       }
     },
-    audit(item,index,status,status1){
+    audit(item,index,status){
       if(index<this.modification.length){
         posthandle({ taskId: item.taskId,
             approved: status,
@@ -864,38 +867,17 @@ export default {
             needReapply: false,})
              .toPromise()
           .then((response) => {
-            this.audit(this.modification[index+1],index+1,status,status1)
+            this.audit(this.modification[index+1],index+1,status)
           }).catch((req) => {
               this.$message.warning(req.message)
             })
       }else{
         if(status){
-          if(status1==1){
-            this.$message.success('审核成功')
-          }else if(status1==2){
-            this.$message.success('通过成功')
-          }else if(status1==3){
-            this.$message.success('通过成功')
-          }
+          this.$message.success('通过成功')
           this.getList()
         }else if(!status){
           if(status1==2){
             postaudit({
-            roleFlag: status1,
-            flag: 2,
-            purchaseReceiptReportList: this.modification,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$message.success('驳回成功')
-              this.getList()
-            })
-            .catch((req) => {
-              this.$message.success('驳回失败')
-            })
-          }else if(status1==3){
-            postaudit({
-            roleFlag: status1,
             flag: 2,
             purchaseReceiptReportList: this.modification,
           })
@@ -918,7 +900,7 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要驳回的条目')
       } else {
-        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
+        this.$confirm(`是否确定驳回?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
           type: 'warning',
@@ -936,7 +918,7 @@ export default {
           //   .catch((req) => {
           //     this.$message.success('驳回失败')
           //   })
-            that.audit(this.modification[0],0,false,status)
+            that.audit(this.modification[0],0,false)
         })
       }
     },
@@ -945,24 +927,11 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
-        this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
+        this.$confirm(`是否确定通过?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
           type: 'warning',
         }).then(() => {
-          // postaudit({
-          //   roleFlag: 2,
-          //   flag: 1,
-          //   purchaseReceiptReportList: this.modification,
-          // })
-          //   .toPromise()
-          //   .then((response) => {
-          //     this.$message.success('通过成功')
-          //     this.getList()
-          //   })
-          //   .catch((req) => {
-          //     this.$message.success('通过失败')
-          //   })
             that.audit(this.modification[0],0,true,2)
         })
       }
@@ -995,8 +964,17 @@ export default {
       }
     },
     carryoverconfirm() {
+      var data={}
+      if(!this.carryoverlist.carryOverWeight){
+        this.$message.warning('结转重量不能为空')
+        return
+      }
+      if(this.carryoverlist.carryOverWeight>this.modification[0].netWeight){
+        this.$message.warning('结转重量不能超过净重')
+        return
+      }
       if (this.currect == true) {
-        postreplanishent({
+        data={
           customerConfirmationStatusFlag:
             this.modification[0].customerConfirmationStatusFlag,
             id:this.modification[0].id,
@@ -1007,17 +985,28 @@ export default {
             carryOverWeight: this.carryoverlist.carryOverWeight,
             },
           amountNotPayable: this.modification[0].amountNotPayable,
-        })
+        }
+      }else{
+        data={
+          customerConfirmationStatusFlag:
+            this.modification[0].customerConfirmationStatusFlag,
+            id:this.modification[0].id,
+            contractNo:this.carryoverlist.contractNo,
+            carryOverWeight: this.carryoverlist.carryOverWeight,
+            purchaseReceiptReport: {
+            contractNo: this.carryoverlist.contractNo,
+            carryOverWeight: this.carryoverlist.carryOverWeight,
+            },
+          amountNotPayable: this.modification[0].amountNotPayable,
+        }
+      }
+      postreplanishent(data)
           .toPromise()
           .then((response) => {
             this.dialogFormVisible11=false
             this.$message.success('结转成功')
-            this.dialogFormVisible11 = false
             this.getList()
           })
-      } else if (this.carryovercontractnolist.length <=0){
-          this.$message.warning('无可结转的其他合同')
-      }
     },
     amendconfirm() {
       this.amendlist.id = this.modification[0].id
@@ -1045,12 +1034,6 @@ export default {
         this.$message.warning('请选择一条要结转的条目')
       } else {
         this.dialogFormVisible11 = true
-        console.log(this.contractNoList.records)
-        this.carryovercontractnolist = this.contractNoList.records.filter(
-          (item) => {
-            return this.modification[0].id != item.id
-          }
-        )
         
       }
     },
@@ -1074,6 +1057,13 @@ export default {
         })
       this.getList()
     },
+    carryovercontractchange(e) {
+      for (let i = 0; i < this.carryovercontractnolist.length; i++) {
+        if(this.carryovercontractnolist[i].contractNo==e){
+          this.carryoverlist.netWeight=this.carryovercontractnolist[i].netWeight
+        }
+      }
+    },
     updated() {
       this.$nextTick(() => {
         this.$refs.warehouseList.doLayout()

+ 12 - 118
src/views/statisticalReport/salesClosingCashierList.vue

@@ -7,21 +7,12 @@
           <ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
           <ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
-          <ws-button v-hasPermission="
-            `report.saleCloseReport.view`
-          " @click="handleAudit(3,2)">驳回</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.saleCloseReport.view`
-          " @click="handleAudit(3,1)">通过</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.saleCloseReport.view`
-          " @click="handleAudit(2,2)">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
-          " @click="handleAudit(2,1)">通过</ws-button>
+          " @click="handleAudit(0)">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
-          " @click="handleAudit(1)">审核</ws-button>
+          " @click="handleAudit(1)">通过</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.payment`
           " @click="payment()">付款</ws-button>
@@ -69,11 +60,11 @@
           @selection-change="handleSelectionChange"
           ref="warehouseList"
           border
-          :selectable='selectInit'
+          
           :summary-method="getSummaries"
           show-summary
         >
-          <el-table-column type="selection" :selectable="checkSelectable" width="55"></el-table-column>
+          <el-table-column type="selection" :selectable='selectInit' width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
           <el-table-column class="table_td" prop="closePositionDate" label="平仓日期"></el-table-column>
@@ -334,7 +325,7 @@ export default {
               }
             }
         },
-        audit(item,index,status,status1){
+        audit(item,index,status){
       if(index<this.modification.length){
         posthandle({ taskId: item.taskId,
             approved: status,
@@ -342,24 +333,16 @@ export default {
             needReapply: false,})
              .toPromise()
           .then((response) => {
-            this.audit(this.modification[index+1],index+1,status,status1)
+            this.audit(this.modification[index+1],index+1,status)
           }).catch((req) => {
               this.$message.warning(req.message)
             })
       }else{
         if(status){
-          if(status1==1){
-            this.$message.success('审核成功')
-          }else if(status1==2){
             this.$message.success('通过成功')
-          }else if(status1==3){
-            this.$message.success('通过成功')
-          }
           this.getList()
         }else if(!status){
-          if(status1==2){
             postsaleaudit({
-            roleFlag: status1,
             flag: 2,
             purchaseReceiptReportList: this.modification,
           })
@@ -371,21 +354,6 @@ export default {
             .catch((req) => {
               this.$message.success('驳回失败')
             })
-          }else if(status1==3){
-            postsaleaudit({
-            roleFlag: status1,
-            flag: 2,
-            purchaseReceiptReportList: this.modification,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$message.success('驳回成功')
-              this.getList()
-            })
-            .catch((req) => {
-              this.$message.success('驳回失败')
-            })
-          }
         }
          
          
@@ -477,15 +445,6 @@ export default {
         })
       })
     },
-    checkSelectable (row) {
-      console.log(row)
-      let mark = 0
-      if(row.status!='全部付款'&&row.status!='全部收款'){
-        return true
-      }else{
-          return false
-      }
-    },
     handlepaymentScreenshot(res,fire){
       this.paymentlist.paymentScreenshot=res.url
     },
@@ -528,9 +487,9 @@ export default {
     },
     handleAudit(status,flag){
       var that=this
-      if(status==1){
+      if(status==0){
         if(this.multipleSelection.length>0){
-          this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
+          this.$confirm(`是否确定通过?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
             type: 'warning'
@@ -542,84 +501,19 @@ export default {
             // }) .catch(() => {
             //   this.$message.warning('通过失败')
             // })
-            that.audit(this.modification[0],0,true,1)
+            that.audit(this.modification[0],0,true)
           })
         }else{
             this.$message.warning('请选择要审核的条目')
         }
-      }else if(status==2&&flag==1){
-        if(this.multipleSelection.length>0){
-          this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
-            cancelButtonText: '取消',
-            confirmButtonText: '确定',
-            type: 'warning'
-          }).then(() => {
-            // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:1}) .toPromise()
-            // .then(response => {
-            //   this.$message.success('通过成功')
-            //   this.getList()
-            // }) .catch(() => {
-            //   this.$message.warning('通过失败')
-            // })
-            that.audit(this.modification[0],0,true,2)
-          })
-        }else{
-            this.$message.warning('请选择要通过的条目')
-        }
-      }else if(status==2&&flag==2){
-        if(this.multipleSelection.length>0){
-          this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
-            cancelButtonText: '取消',
-            confirmButtonText: '确定',
-            type: 'warning'
-          }).then(() => {
-            // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:2}) .toPromise()
-            // .then(response => {
-            //   this.$message.success('驳回成功')
-            //   this.getList()
-            // }) .catch(() => {
-            //   this.$message.warning('驳回失败')
-            // })
-            that.audit(this.modification[0],0,false,2)
-          })
-        }else{
-            this.$message.warning('请选择要驳回的条目')
-        }
-      }
-      else if(status==3&&flag==1){
+      }else if(status==1){
         if(this.multipleSelection.length>0){
-          this.$confirm(`审核通过后,任务将发送给出纳,是否确定通过?`, {
+          this.$confirm(`是否确定驳回?`, {
             cancelButtonText: '取消',
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:3,flag:1}) .toPromise()
-            // .then(response => {
-            //   this.$message.success('通过成功')
-            //   this.getList()
-            // }) .catch(() => {
-            //   this.$message.warning('通过失败')
-            // })
-            that.audit(this.modification[0],0,true,3)
-          })
-        }else{
-            this.$message.warning('请选择要通过的条目')
-        }
-      }else if(status==3&&flag==2){
-        if(this.multipleSelection.length>0){
-          this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
-            cancelButtonText: '取消',
-            confirmButtonText: '确定',
-            type: 'warning'
-          }).then(() => {
-            // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:2}) .toPromise()
-            // .then(response => {
-            //   this.$message.success('驳回成功')
-            //   this.getList()
-            // }) .catch(() => {
-            //   this.$message.warning('驳回失败')
-            // })
-            that.audit(this.modification[0],0,false,3)
+            that.audit(this.modification[0],0,false)
           })
         }else{
             this.$message.warning('请选择要驳回的条目')

+ 10 - 83
src/views/statisticalReport/salesDeliveryReportList.vue

@@ -8,18 +8,12 @@
           <ws-button :type="searchType==2?'primary':''" @click="handlestatus(2)">待结算</ws-button>
           <ws-button :type="searchType==3?'primary':''" @click="handlestatus(3)">已结算</ws-button>
           <ws-button :type="searchType==''?'primary':''" @click="handlestatus('')">全部</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.saleOutReport.view`
-          " @click="handlepass1()">通过</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.saleOutReport.view`
-          " @click="handlereject(3)">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handlepass()">通过</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
-          " @click="handlereject(2)">驳回</ws-button>
+          " @click="handlereject()">驳回</ws-button>
           <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.payment`
           " @click="handlecollect()">收款</ws-button>
@@ -29,9 +23,6 @@
           <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.carry`
           " @click="amend()">最终结算价</ws-button>
-          <ws-button type="primary" v-hasPermission="
-            `report.saleOutReport.view`
-          " @click="handleAudit()">审核</ws-button>
           </el-col>
         <el-col style='text-align:right;line-height:60px;padding-right:10px;' :span="8">
           <ws-select
@@ -84,10 +75,10 @@
           border
           :summary-method="getSummaries"
           show-summary
-          :selectable='selectInit'
+          
           @selection-change="handleSelectionChange"
         >
-          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column :selectable='selectInit' type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
           <el-table-column class="table_td" prop="goodsName" label="货名"></el-table-column>
@@ -417,7 +408,7 @@ export default {
               }
             }
         },
-     audit(item,index,status,status1){
+     audit(item,index,status){
       if(index<this.modification.length){
         posthandle({ taskId: item.taskId,
             approved: status,
@@ -425,24 +416,16 @@ export default {
             needReapply: false,})
              .toPromise()
           .then((response) => {
-            this.audit(this.modification[index+1],index+1,status,status1)
+            this.audit(this.modification[index+1],index+1,status)
           }).catch((req) => {
               this.$message.warning(req.message)
             })
       }else{
         if(status){
-          if(status1==1){
-            this.$message.success('审核成功')
-          }else if(status1==2){
-            this.$message.success('通过成功')
-          }else if(status1==3){
-            this.$message.success('通过成功')
-          }
+          this.$message.success('通过成功')
           this.getList()
         }else if(!status){
-          if(status1==2){
             issueapproval({
-            roleFlag: status1,
             flag: 2,
             purchaseReceiptReportList: this.modification,
           })
@@ -454,57 +437,22 @@ export default {
             .catch((req) => {
               this.$message.success('驳回失败')
             })
-          }else if(status1==3){
-            issueapproval({
-            roleFlag: status1,
-            flag: 2,
-            purchaseReceiptReportList: this.modification,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$message.success('驳回成功')
-              this.getList()
-            })
-            .catch((req) => {
-              this.$message.success('驳回失败')
-            })
-          }
         }
          
          
       }
     },
-    //审核
-    handleAudit(){
-      var that=this
-      if(this.modification.length==0){
-        this.$message.warning('请选择一条要审核的条目')
-      }else{
-        this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      }).then(() => {
-        // issueapproval({roleFlag:1,salesDeliveryReportList:this.modification}).toPromise()
-        // .then(response => {
-        //   this.$message.success('审核成功')
-        //   this.getList()
-        // })
-        that.audit(this.modification[0],0,true,1)
-      })
-      }
-    },
     handlereject(status){
       var that=this
       if(this.modification.length==0){
         this.$message.warning('请选择要驳回的条目')
       }else{
-        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
+        this.$confirm(`是否确定驳回?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        that.audit(this.modification[0],0,false,status)
+        that.audit(this.modification[0],0,false)
         // issueapproval({roleFlag:status,flag:2,salesDeliveryReportList:this.modification}).toPromise()
         // .then(response => {
         //   this.$message.success('驳回成功')
@@ -520,7 +468,7 @@ export default {
       if(this.modification.length==0){
         this.$message.warning('请选择要通过的条目')
       }else{
-        this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
+        this.$confirm(`是否确定通过?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning'
@@ -532,28 +480,7 @@ export default {
         // }).catch(req => {
         //   this.$message.success('通过失败')
         // })
-        that.audit(this.modification[0],0,false,2)
-      })
-      }
-    },
-    handlepass1(){
-      var that=this
-      if(this.modification.length==0){
-        this.$message.warning('请选择要通过的条目')
-      }else{
-        this.$confirm(`审核通过后,任务将发送给出纳,是否确定通过?`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning'
-      }).then(() => {
-        // issueapproval({roleFlag:3,flag:1,salesDeliveryReportList:this.modification}).toPromise()
-        // .then(response => {
-        //   this.$message.success('通过成功')
-        //   this.getList()
-        // }).catch(req => {
-        //   this.$message.success('通过失败')
-        // })
-        that.audit(this.modification[0],0,false,3)
+        that.audit(this.modification[0],0,false)
       })
       }
     },