Browse Source

前端gjy

gjy 3 years ago
parent
commit
794f2b162a

+ 5 - 1
src/api/V2/purchasingManagement/index.js

@@ -25,4 +25,8 @@ export const API_POST_EDITSTATUS = '/purchaseOrder/api/editStatus'
 //采购状态,基差,单价修改 
 export const API_POST_PROCUREMENT_EDITSTATUS = '/procurementPlanInfo/api/editStatus'
 // 采购订单删除
-export const API_POST_DELETEPURCHASE = '/purchaseOrder/api/deletePurchaseOrder'
+export const API_POST_DELETEPURCHASE = '/purchaseOrder/api/deletePurchaseOrder'
+// 测试
+export const API_POST_SUBMIT = '/purchaseOrder/api/submitPurchaseOrder'
+// 审核通过不通过接口
+export const API_POST_WORKFLOW_API_HANDLE = `/workflow/api/handle`

+ 7 - 1
src/model/purchasingManagement/index.js

@@ -14,7 +14,9 @@ import {
     API_POST_EDITSTATUS,
     API_POST_PROCUREMENT_EDITSTATUS,
     API_POST_DELETEPURCHASE,
-    API_GET_PRICE_PURCHASE
+    API_GET_PRICE_PURCHASE,
+    API_POST_SUBMIT,
+    API_POST_WORKFLOW_API_HANDLE
 } from '@/api/V2/purchasingManagement'
 // import { API_GET_PROCUREMENT_LOOK } from '../../api/V2/purchasingManagement'
 //采购详情列表
@@ -45,3 +47,7 @@ export const procurementEditOther = appRx.post(API_POST_PROCUREMENT_EDITSTATUS,
 export const deletepurchase = appRx.post(API_POST_DELETEPURCHASE, errorCatcher,errorHandle,filter)
 //采购订单平仓查看成交价
 export const getTransactionPriceList = appRx.get(API_GET_PRICE_PURCHASE, errorCatcher,errorHandle,filter)
+//测试
+export const postsubmit = appRx.post(API_POST_SUBMIT, errorCatcher,errorHandle,filter)
+// 审核通过不通过
+export const posthandle = appRx.post(API_POST_WORKFLOW_API_HANDLE, errorCatcher,errorHandle,filter)

+ 22 - 2
src/views/purchasingManagement/purchaseOrderList.vue

@@ -2,7 +2,7 @@
 <template>
   <div>
     <BaseHeaderLayout :leftSpan="15">
-      <template slot="left"> </template>
+      <template slot="left"></template>
       <template slot="right">
         <ws-select
           v-model="searchTypeText"
@@ -374,7 +374,7 @@
           <!-- 审核 -->
           <!-- "(scope.row.status == '已通过' || scope.row.status == '已成交') && scope.row.procurementPlanType != '现货'" -->
           <div
-            v-if="scope.row.status == '待审核'"
+            v-if="scope.row.status == '待审核'&&scope.row.taskId!=null"
             type="text"
             class="record"
             @click="aduit(scope.row)"
@@ -845,6 +845,8 @@ import {
   aduitcontractno,
   editStatus,
   deletepurchase,
+  postsubmit,
+  posthandle
 } from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -971,6 +973,16 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    handletest(){
+      postsubmit({ id: 'b1df1547e79e4d4aaa92b4ce8793d0a1'})
+          .toPromise()
+          .then((response) => {
+            console.log(111)
+          })
+          .catch((req) => {
+
+          })
+    },
     transaction(e){
       for (let i = 0; i < this.transactionRecordList1.length; i++) {
         if(this.transactionRecordList1[i].key==e){
@@ -1312,6 +1324,7 @@ export default {
     aduit(item) {
       this.dialogFormVisible4 = true
       this.aduitlist.id = item.id
+      this.aduitlist.taskId=item.taskId
       this.aduitlist.type = '采购'
       this.$set(this.aduitlist, 'seller', item.seller)
       this.$set(this.aduitlist, 'sellerPhone', item.sellerPhone)
@@ -1422,10 +1435,17 @@ export default {
       }).then(() => {
         aduitpurchase(this.aduitlist)
           .toPromise()
+          .then((response) => {
+            posthandle({ taskId: this.aduitlist.taskId,
+            approved: true,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
           .then((response) => {
             this.$message.success('审核成功')
             this.aduitlist = {}
             this.getList()
+            })
           })
       })
     },

+ 1 - 0
src/views/salesManagement/salesPlanAdd.vue

@@ -320,6 +320,7 @@
               type="year"
               align="right"
               unlink-panels
+              value-format='yyyy'
               range-separator="至"
               placeholder="产出年份"
             ></el-date-picker>

+ 13 - 0
src/views/salesManagement/salesPlanOrderList.vue

@@ -936,6 +936,9 @@ import {
   deletesale,
   getsalepricelist,
 } from '@/model/salesManagement/index'
+import {
+  posthandle
+} from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -1362,6 +1365,7 @@ export default {
           this.closePositionList1 = {}
           this.dialogFormVisible2 = false
           this.getList()
+          
         })
         .catch((req) => {
           this.$message.warning('平仓失败')
@@ -1500,6 +1504,7 @@ export default {
     aduit(item) {
       this.dialogFormVisible4 = true
       this.aduitlist.id = item.id
+      this.aduitlist.taskId=item.taskId
       this.aduitlist.type = '销售'
       this.$set(this.aduitlist, 'buyer', item.buyer)
       this.$set(this.aduitlist, 'buyerPhone', item.buyerPhone)
@@ -1604,9 +1609,17 @@ export default {
       }).then(() => {
         aduitsale(this.aduitlist)
           .toPromise()
+          .then((response) => {
+            posthandle({ taskId: this.aduitlist.taskId,
+            approved: true,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
           .then((response) => {
             this.$message.success('审核成功')
+            this.aduitlist = {}
             this.getList()
+            })
           })
       })
     },

+ 131 - 46
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -8,25 +8,25 @@
           <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-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+         <ws-button  type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handlepass1()">通过</ws-button>
-          <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handlereject(3)">驳回</ws-button>
-          <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handlepass()">通过</ws-button>
-          <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handlereject(2)">驳回</ws-button>
-          <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.view`
           " @click="handleAudit()">审核</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.payment`
           " @click="handlepayment()">付款</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.procurementCloseReport.recive`
           " @click="handlecollect()">收款</ws-button>
         </el-col>
@@ -70,6 +70,7 @@
           border
           :summary-method="getSummaries"
           show-summary
+          :selectable='selectInit'
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="55"></el-table-column>
@@ -90,7 +91,12 @@
           <el-table-column class="table_td" prop="collectionDate" label="收款日期"></el-table-column>
           <el-table-column class="table_td" prop="customerName" label="客户"></el-table-column>
           <el-table-column class="table_td" prop="warehouseName" label="库点"></el-table-column>
-          <el-table-column prop="status" label="状态"></el-table-column>
+          <el-table-column prop="status" label="状态">
+            <template slot-scope="scope">
+            <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
+            <span v-else>{{ scope.row.status }}</span>
+          </template>
+          </el-table-column>
         </el-table>
 
         <!-- 页数 -->
@@ -220,6 +226,9 @@ import {
   closepaymoney,
   closecollmoney
 } from '@/model/statisticalReport/index'
+import {
+  posthandle
+} from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -319,6 +328,18 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    selectInit(row){
+//在这里一定要记得类型匹配的上。
+            if(row.approveStatus==null){
+                return true  
+            }else if(row.approveStatus!=null){    
+              if(row.taskId==null){
+                return false 
+              }else{
+                return true  
+              }
+            }
+        },
     contractchange(e){ 
       this.contractNo=e
       this.getList()
@@ -349,8 +370,66 @@ export default {
         }
       }
     },
+    audit(item,index,status,status1){
+      if(index<this.modification.length){
+        posthandle({ taskId: item.taskId,
+            approved: status,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index+1],index+1,status,status1)
+          }).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){
+            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,
+          })
+            .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{
@@ -359,16 +438,18 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        closeaudit({roleFlag:1,flag:1,purchaseClosingReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('审核成功')
-          this.getList()
-        }).catch
+        // closeaudit({roleFlag:1,flag:1,purchaseClosingReportList: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{
@@ -377,13 +458,14 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        postaudit({roleFlag:status,flag:2,purchaseClosingReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('驳回成功')
-          this.getList()
-        }).catch(req => {
-          this.$message.success('驳回失败')
-        })
+        // postaudit({roleFlag:status,flag:2,purchaseClosingReportList:this.modification}).toPromise()
+        // .then(response => {
+        //   this.$message.success('驳回成功')
+        //   this.getList()
+        // }).catch(req => {
+        //   this.$message.success('驳回失败')
+        // })
+            that.audit(this.modification[0],0,false,status)
       })
       }
     },
@@ -448,24 +530,24 @@ export default {
         })
     },
     getList() {
-      if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
-        this.roleFlag=1
-      }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
-        this.roleFlag=2
-      }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
-        this.roleFlag=3
-      }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
-        this.roleFlag=4
-      }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
-        this.roleFlag=''
-      }
+      // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
+      //   this.roleFlag=1
+      // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
+      //   this.roleFlag=2
+      // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
+      //   this.roleFlag=3
+      // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
+      //   this.roleFlag=4
+      // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
+      //   this.roleFlag=''
+      // }
       getclose({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         contractNo:this.contractNo,
-        roleFlag:this.roleFlag
+        // roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {
@@ -509,6 +591,7 @@ export default {
     },
     //财务通过
     handlepass(){
+      var that=this
       if(this.modification.length==0){
         this.$message.warning('请选择要通过的条目')
       }else{
@@ -517,13 +600,14 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        postaudit({roleFlag:2,flag:1,purchaseClosingReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('通过成功')
-          this.getList()
-        }).catch(req => {
-          this.$message.success('通过失败')
-        })
+        // postaudit({roleFlag:2,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,2)
       })
       }
     },
@@ -537,13 +621,14 @@ export default {
         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('通过失败')
-        })
+        // 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)
       })
       }
     },

+ 154 - 66
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -8,31 +8,31 @@
           <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-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary"  v-hasPermission="
+        <ws-button type="primary"  v-hasPermission="
             `report.procurementInReport.view`
           " @click="handlepass1()">通过</ws-button>
-        <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
           " @click="handlereject(3)">驳回</ws-button>
-        <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
           " @click="handlepass()">通过</ws-button>
-        <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
           " @click="handlereject(2)">驳回</ws-button>
-        <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.payment`
           " @click="handlepayment">付款</ws-button>
-        <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.draw`
           " @click="handleninvoice">开发票</ws-button>
-        <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.edit`
           " @click="amend()">修改</ws-button>
-        <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.carry`
           " @click="carryover">补货结转</ws-button>
-        <ws-button  v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+        <ws-button type="primary" v-hasPermission="
             `report.procurementInReport.view`
           " @click="handleAudit()">审核</ws-button>
         </el-col>
@@ -79,6 +79,7 @@
         border
         :summary-method="getSummaries"
         show-summary
+        :selectable='selectInit'
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55"></el-table-column>
@@ -228,7 +229,13 @@
           </template>
         </el-table-column>
 
-        <el-table-column label="状态" prop="status"></el-table-column>
+        <el-table-column label="状态" prop="status">
+          <template slot-scope="scope">
+            <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
+            <span v-else>{{ scope.row.status }}</span>
+          </template>
+        </el-table-column>
+        
       </el-table>
 
       <!-- 页数 -->
@@ -472,6 +479,9 @@ import {
   postopeninvoice,
   postbatchopeninvoice,
 } from '@/model/statisticalReport/index'
+import {
+  posthandle
+} from '@/model/purchasingManagement/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -599,6 +609,18 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+     selectInit(row){
+//在这里一定要记得类型匹配的上。
+            if(row.approveStatus==null){
+                return true  
+            }else if(row.approveStatus!=null){    
+              if(row.taskId==null){
+                return false 
+              }else{
+                return true  
+              }
+            }
+        },
     //付款
     handlepayment() {
       this.amountNotPayable = 0
@@ -799,6 +821,7 @@ export default {
 
     //审核
     handleAudit() {
+      var that=this
       if (this.modification.length == 0) {
         this.$message.warning('请选择一条要审核的条目')
       } else {
@@ -807,29 +830,60 @@ export default {
           confirmButtonText: '确定',
           type: 'warning',
         }).then(() => {
-          postaudit({
-            roleFlag: 1,
+          // postaudit({
+          //   roleFlag: 1,
+          //   purchaseReceiptReportList: this.modification,
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     this.$message.success('审核成功')
+          //     this.getList()
+          //   })
+            that.audit(this.modification[0],0,true,1)
+          
+        })
+      }
+    },
+    audit(item,index,status,status1){
+      if(index<this.modification.length){
+        posthandle({ taskId: item.taskId,
+            approved: status,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index+1],index+1,status,status1)
+          }).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){
+            postaudit({
+            roleFlag: status1,
+            flag: 2,
             purchaseReceiptReportList: this.modification,
           })
             .toPromise()
             .then((response) => {
-              this.$message.success('审核成功')
+              this.$message.success('驳回成功')
               this.getList()
-            }).catch
-        })
-      }
-    },
-    handlereject(status) {
-      if (this.modification.length == 0) {
-        this.$message.warning('请选择要驳回的条目')
-      } else {
-        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
-          cancelButtonText: '取消',
-          confirmButtonText: '确定',
-          type: 'warning',
-        }).then(() => {
-          postaudit({
-            roleFlag: status,
+            })
+            .catch((req) => {
+              this.$message.success('驳回失败')
+            })
+          }else if(status1==3){
+            postaudit({
+            roleFlag: status1,
             flag: 2,
             purchaseReceiptReportList: this.modification,
           })
@@ -841,10 +895,41 @@ export default {
             .catch((req) => {
               this.$message.success('驳回失败')
             })
+          }
+        }
+         
+         
+      }
+    },
+    handlereject(status) {
+      var that=this
+      if (this.modification.length == 0) {
+        this.$message.warning('请选择要驳回的条目')
+      } else {
+        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          type: 'warning',
+        }).then(() => {
+          // postaudit({
+          //   roleFlag: status,
+          //   flag: 2,
+          //   purchaseReceiptReportList: this.modification,
+          // })
+          //   .toPromise()
+          //   .then((response) => {
+          //     this.$message.success('驳回成功')
+          //     this.getList()
+          //   })
+          //   .catch((req) => {
+          //     this.$message.success('驳回失败')
+          //   })
+            that.audit(this.modification[0],0,false,status)
         })
       }
     },
     handlepass() {
+      var that=this
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
@@ -853,23 +938,25 @@ export default {
           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('通过失败')
-            })
+          // 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)
         })
       }
     },
     handlepass1() {
+      var that=this
       if (this.modification.length == 0) {
         this.$message.warning('请选择要通过的条目')
       } else {
@@ -878,19 +965,20 @@ export default {
           confirmButtonText: '确定',
           type: 'warning',
         }).then(() => {
-          postaudit({
-            roleFlag: 3,
-            flag: 1,
-            purchaseReceiptReportList: this.modification,
-          })
-            .toPromise()
-            .then((response) => {
-              this.$message.success('通过成功')
-              this.getList()
-            })
-            .catch((req) => {
-              this.$message.success('通过失败')
-            })
+          // postaudit({
+          //   roleFlag: 3,
+          //   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,3)
         })
       }
     },
@@ -1036,24 +1124,24 @@ export default {
       })
     },
     getList() {
-      if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
-        this.roleFlag=1
-      }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
-        this.roleFlag=2
-      }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
-        this.roleFlag=3
-      }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
-        this.roleFlag=4
-      }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
-        this.roleFlag=''
-      }
+      // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
+      //   this.roleFlag=1
+      // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
+      //   this.roleFlag=2
+      // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
+      //   this.roleFlag=3
+      // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
+      //   this.roleFlag=4
+      // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
+      //   this.roleFlag=''
+      // }
       getpurchreceipt({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         contractNo: this.contractNo,
-        roleFlag: this.roleFlag,
+        // roleFlag: this.roleFlag,
       })
         .toPromise()
         .then((response) => {

+ 136 - 55
src/views/statisticalReport/salesClosingCashierList.vue

@@ -7,25 +7,25 @@
           <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-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button v-hasPermission="
             `report.saleCloseReport.view`
           " @click="handleAudit(3,2)">驳回</ws-button>
-          <ws-button v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
           " @click="handleAudit(3,1)">通过</ws-button>
-          <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
           " @click="handleAudit(2,2)">驳回</ws-button>
-          <ws-button v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
           " @click="handleAudit(2,1)">通过</ws-button>
-          <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.view`
           " @click="handleAudit(1)">审核</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.payment`
           " @click="payment()">付款</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleCloseReport.recive`
           " @click="collection()">收款</ws-button>
            </el-col>
@@ -69,6 +69,7 @@
           @selection-change="handleSelectionChange"
           ref="warehouseList"
           border
+          :selectable='selectInit'
           :summary-method="getSummaries"
           show-summary
         >
@@ -120,7 +121,12 @@
           <el-table-column class="table_td" prop="collectionDate" label="收款日期"></el-table-column>
           <el-table-column class="table_td"  prop="customerName"  width='60' label="客户"></el-table-column>
           <el-table-column class="table_td"  prop="warehouseName"  width='60' label="库点"></el-table-column>
-          <el-table-column prop="status" label="状态"></el-table-column>
+          <el-table-column prop="status" label="状态">
+            <template slot-scope="scope">
+            <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
+            <span v-else>{{ scope.row.status }}</span>
+          </template>
+          </el-table-column>
         </el-table>
 
         <!-- 页数 -->
@@ -316,6 +322,75 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    selectInit(row){
+//在这里一定要记得类型匹配的上。
+            if(row.approveStatus==null){
+                return true  
+            }else if(row.approveStatus!=null){    
+              if(row.taskId==null){
+                return false 
+              }else{
+                return true  
+              }
+            }
+        },
+        audit(item,index,status,status1){
+      if(index<this.modification.length){
+        posthandle({ taskId: item.taskId,
+            approved: status,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index+1],index+1,status,status1)
+          }).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,
+          })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('驳回成功')
+              this.getList()
+            })
+            .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('驳回失败')
+            })
+          }
+        }
+         
+         
+      }
+    },
     contractchange(e) {
       this.contractNo = e
       this.getList()
@@ -452,6 +527,7 @@ export default {
       }
     },
     handleAudit(status,flag){
+      var that=this
       if(status==1){
         if(this.multipleSelection.length>0){
           this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
@@ -459,13 +535,14 @@ export default {
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:1,flag:1}).toPromise()
-            .then(response => {
-              this.$message.success('通过成功')
-              this.getList()
-            }) .catch(() => {
-              this.$message.warning('通过失败')
-            })
+            // postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:1,flag:1}).toPromise()
+            // .then(response => {
+            //   this.$message.success('通过成功')
+            //   this.getList()
+            // }) .catch(() => {
+            //   this.$message.warning('通过失败')
+            // })
+            that.audit(this.modification[0],0,true,1)
           })
         }else{
             this.$message.warning('请选择要审核的条目')
@@ -477,13 +554,14 @@ export default {
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:1}) .toPromise()
-            .then(response => {
-              this.$message.success('通过成功')
-              this.getList()
-            }) .catch(() => {
-              this.$message.warning('通过失败')
-            })
+            // 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('请选择要通过的条目')
@@ -495,13 +573,14 @@ export default {
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:2}) .toPromise()
-            .then(response => {
-              this.$message.success('驳回成功')
-              this.getList()
-            }) .catch(() => {
-              this.$message.warning('驳回失败')
-            })
+            // 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('请选择要驳回的条目')
@@ -514,13 +593,14 @@ export default {
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:3,flag:1}) .toPromise()
-            .then(response => {
-              this.$message.success('通过成功')
-              this.getList()
-            }) .catch(() => {
-              this.$message.warning('通过失败')
-            })
+            // 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('请选择要通过的条目')
@@ -532,13 +612,14 @@ export default {
             confirmButtonText: '确定',
             type: 'warning'
           }).then(() => {
-            postsaleaudit({salesClosingReportList:this.multipleSelection,roleFlag:2,flag:2}) .toPromise()
-            .then(response => {
-              this.$message.success('驳回成功')
-              this.getList()
-            }) .catch(() => {
-              this.$message.warning('驳回失败')
-            })
+            // 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)
           })
         }else{
             this.$message.warning('请选择要驳回的条目')
@@ -607,24 +688,24 @@ export default {
       })
     },
     getList() {
-      if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
-        this.roleFlag=1
-      }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
-        this.roleFlag=2
-      }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
-        this.roleFlag=3
-      }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
-        this.roleFlag=4
-      }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
-        this.roleFlag=''
-      }
+      // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
+      //   this.roleFlag=1
+      // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
+      //   this.roleFlag=2
+      // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
+      //   this.roleFlag=3
+      // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
+      //   this.roleFlag=4
+      // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
+      //   this.roleFlag=''
+      // }
       getsalelist({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         contractNo:this.contractNo,
-        roleFlag:this.roleFlag
+        // roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {

+ 130 - 47
src/views/statisticalReport/salesDeliveryReportList.vue

@@ -8,28 +8,28 @@
           <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-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handlepass1()">通过</ws-button>
-          <ws-button  v-if='roleId=="9ad8abb997714ef29068f23c2ad3b125"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handlereject(3)">驳回</ws-button>
-          <ws-button  v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handlepass()">通过</ws-button>
-          <ws-button  v-if='roleId=="cca3cf0ca2814d1e918f5b0a4380fe69"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handlereject(2)">驳回</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.payment`
           " @click="handlecollect()">收款</ws-button>
-          <ws-button v-if='roleId=="3d7b9179552b4c3e9c2d7af43962e2e4"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.draw`
           " @click="handleninvoice()">开发票</ws-button>
-          <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.carry`
           " @click="amend()">最终结算价</ws-button>
-          <ws-button v-if='roleId=="4c2d50d8ff2943c1b7a1e947feefe048"||roleId=="4ef070439cd64784bce8844fd3f0f8e1"' type="primary" v-hasPermission="
+          <ws-button type="primary" v-hasPermission="
             `report.saleOutReport.view`
           " @click="handleAudit()">审核</ws-button>
           </el-col>
@@ -80,6 +80,7 @@
           border
           :summary-method="getSummaries"
           show-summary
+          :selectable='selectInit'
           @selection-change="handleSelectionChange"
         >
           <el-table-column type="selection" width="55"></el-table-column>
@@ -115,7 +116,12 @@
               alt=""
             />
           </template></el-table-column>
-          <el-table-column label="状态" prop="status"></el-table-column>
+          <el-table-column label="状态" prop="status">
+            <template slot-scope="scope">
+            <span v-if='scope.row.approveStatus!=null'>{{ scope.row.approveStatus }}</span>
+            <span v-else>{{ scope.row.status }}</span>
+          </template>
+          </el-table-column>
         </el-table>
 
         <!-- 页数 -->
@@ -392,8 +398,78 @@ export default {
 
   },
   methods: {
+    selectInit(row){
+//在这里一定要记得类型匹配的上。
+            if(row.approveStatus==null){
+                return true  
+            }else if(row.approveStatus!=null){    
+              if(row.taskId==null){
+                return false 
+              }else{
+                return true  
+              }
+            }
+        },
+     audit(item,index,status,status1){
+      if(index<this.modification.length){
+        posthandle({ taskId: item.taskId,
+            approved: status,
+            auditMind: '34',
+            needReapply: false,})
+             .toPromise()
+          .then((response) => {
+            this.audit(this.modification[index+1],index+1,status,status1)
+          }).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){
+            issueapproval({
+            roleFlag: status1,
+            flag: 2,
+            purchaseReceiptReportList: this.modification,
+          })
+            .toPromise()
+            .then((response) => {
+              this.$message.success('驳回成功')
+              this.getList()
+            })
+            .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{
@@ -402,15 +478,17 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        issueapproval({roleFlag:1,salesDeliveryReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('审核成功')
-          this.getList()
-        }).catch
+        // 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{
@@ -419,17 +497,19 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        issueapproval({roleFlag:status,flag:2,salesDeliveryReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('驳回成功')
-          this.getList()
-        }).catch(req => {
-          this.$message.success('驳回失败')
-        })
+        that.audit(this.modification[0],0,false,status)
+        // issueapproval({roleFlag:status,flag:2,salesDeliveryReportList:this.modification}).toPromise()
+        // .then(response => {
+        //   this.$message.success('驳回成功')
+        //   this.getList()
+        // }).catch(req => {
+        //   this.$message.success('驳回失败')
+        // })
       })
       }
     },
     handlepass(){
+      var that=this
       if(this.modification.length==0){
         this.$message.warning('请选择要通过的条目')
       }else{
@@ -438,17 +518,19 @@ export default {
         confirmButtonText: '确定',
         type: 'warning'
       }).then(() => {
-        issueapproval({roleFlag:2,flag:1,salesDeliveryReportList:this.modification}).toPromise()
-        .then(response => {
-          this.$message.success('通过成功')
-          this.getList()
-        }).catch(req => {
-          this.$message.success('通过失败')
-        })
+        // issueapproval({roleFlag:2,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,2)
       })
       }
     },
     handlepass1(){
+      var that=this
       if(this.modification.length==0){
         this.$message.warning('请选择要通过的条目')
       }else{
@@ -457,13 +539,14 @@ export default {
         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('通过失败')
-        })
+        // 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)
       })
       }
     },
@@ -723,24 +806,24 @@ export default {
     },
     //列表
     getList() {
-      if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
-        this.roleFlag=1
-      }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
-        this.roleFlag=2
-      }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
-        this.roleFlag=3
-      }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
-        this.roleFlag=4
-      }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
-        this.roleFlag=''
-      }
+      // if(this.roleId=='4c2d50d8ff2943c1b7a1e947feefe048'){
+      //   this.roleFlag=1
+      // }else if(this.roleId=='cca3cf0ca2814d1e918f5b0a4380fe69'){
+      //   this.roleFlag=2
+      // }else if(this.roleId=='9ad8abb997714ef29068f23c2ad3b125'){
+      //   this.roleFlag=3
+      // }else if(this.roleId=='3d7b9179552b4c3e9c2d7af43962e2e4'){
+      //   this.roleFlag=4
+      // }else if(this.roleId=="4ef070439cd64784bce8844fd3f0f8e1"){
+      //   this.roleFlag=''
+      // }
       salelist({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         contractNo:this.contractNo,
-        roleFlag:this.roleFlag
+        // roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {

+ 1 - 1
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.120:8090/',
+        target: 'http://192.168.1.110:8090/',
         // target: 'http://192.168.1.112:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',