gjy hace 3 años
padre
commit
6febbf9bfd

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

@@ -6,6 +6,10 @@ export const API_GET_CONTRACTNO = '/warehouseBaseInfo/selectContractNoList'
 export const API_POST_AMEND_PURCHRECEIPT = '/purchaseReceiptReport/api/editProcurementReceiptReport'
 // 采购入库补货结转
 export const API_POST_REPLANISHENT = '/purchaseReceiptReport/api/replenishment'
+// 采购入库审核
+export const API_POST_AUDIT = '/purchaseReceiptReport/api/examinePurchaseOrder'
+// 采购入库付款
+export const API_POST_PAYMONEY = '/purchaseReceiptReport/api/payMoney'
 // 采购订单flag0 补充定金 1解冻定金 2完成 3更改基差
 export const API_POST_EDITSTATUS = '/purchaseOrder/api/editStatus'
 //采购状态,基差,单价修改 

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

@@ -4,7 +4,9 @@ import {
     API_GET_PURCHRECEIPT,
     API_GET_CONTRACTNO,
     API_POST_AMEND_PURCHRECEIPT,
-    API_POST_REPLANISHENT
+    API_POST_REPLANISHENT,
+    API_POST_AUDIT,
+    API_POST_PAYMONEY
 } from '@/api/V2/statisticalReport'
 //采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -13,4 +15,8 @@ export const getcontractno = appRx.get(API_GET_CONTRACTNO, errorCatcher, errorHa
 //采购入库修改
 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 postreplanishent = appRx.post(API_POST_REPLANISHENT, errorCatcher, errorHandle, filter)
+//采购入库审核
+export const postaudit = appRx.post(API_POST_AUDIT, errorCatcher, errorHandle, filter)
+//采购入库付款
+export const postpaymoney = appRx.post(API_POST_PAYMONEY, errorCatcher, errorHandle, filter)

+ 112 - 13
src/views/statisticalReport/purchaseReceiptStatisticsList.vue

@@ -7,14 +7,16 @@
           <ws-button type="primary" @click="handlestatus(1)">待审核</ws-button>
           <ws-button type="primary" @click="handlestatus(2)">待结算</ws-button>
           <ws-button type="primary" @click="handlestatus(3)">已结算</ws-button>
-          <ws-button type="primary" @click="handleAdd()">全部</ws-button>
-          <ws-button type="primary" @click="handleAdd()">通过</ws-button>
-          <ws-button type="primary" @click="handleAdd()">驳回</ws-button>
-          <ws-button type="primary" @click="dialogFormVisible1=true">付款</ws-button>
+          <ws-button type="primary" @click="handlestatus('')">全部</ws-button>
+          <ws-button type="primary" @click="handlepass1()">通过1</ws-button>
+          <ws-button type="primary" @click="handlereject(3)">驳回1</ws-button>
+          <ws-button type="primary" @click="handlepass()">通过</ws-button>
+          <ws-button type="primary" @click="handlereject(2)">驳回</ws-button>
+          <ws-button type="primary" @click="handlepayment()">付款</ws-button>
           <ws-button type="primary" @click="dialogFormVisible2=true">开发票</ws-button>
           <ws-button type="primary" @click="amend()">修改</ws-button>
           <ws-button type="primary" @click="carryover">补货结转</ws-button>
-          <ws-button type="primary" @click="handleAdd()">审核</ws-button>
+          <ws-button type="primary" @click="handleAudit()">审核</ws-button>
           <ws-select
             v-model="contractNo"
             placeholder="请选择合同"
@@ -222,7 +224,7 @@
               <el-form-item v-if='!currect' label="合同编号" :label-width="formLabelWidth">
                 <ws-select
                 v-if='carryovercontractnolist.length>0'
-            v-model="contractNo"
+            v-model="carryoverlist.contractNo"
             placeholder="请选择合同"
             clearable
             @change='contractchange'
@@ -240,21 +242,21 @@
           <div v-else>无可结转的其他合同</div>
               </el-form-item>
               <el-form-item label="结转重量" :label-width="formLabelWidth">
-                <el-input v-model="carryOverWeight" autocomplete="off" class="deal" placeholder="请输入结转重量"></el-input>
+                <el-input v-model="carryoverlist.carryOverWeight" autocomplete="off" class="deal" placeholder="请输入结转重量"></el-input>
               </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible11 = false">取 消</el-button>
-              <el-button type="primary" @click="dialogFormVisible11= false">确认</el-button>
+              <el-button type="primary" @click="carryoverconfirm()">确认</el-button>
             </div>
           </el-dialog>
   </div>
-
   <!-- </div> -->
 </template>
 <script>
 import {
-  getpurchreceipt,getcontractno,postamend,postreplanishent
+  getpurchreceipt,getcontractno,postamend,postreplanishent,postaudit,
+  postpaymoney
 } from '@/model/statisticalReport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -322,7 +324,7 @@ export default {
       currentPage: 1,
       tranTypeKey: 1,
       pageSize: 10,
-      searchType: 1,
+      searchType: '',
       searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
@@ -348,11 +350,11 @@ export default {
       deptBudgetList: {},
        currentPage: 1,
       pageSize: 10,
-      searchType: 1,
       pcFlag: 1,
       carryoverlist:{},
       modification:[],
       amendlist:{},
+      roleFlag:1,
       carryovercontractnolist:[],
       historyList: [],
       pickerBeginDateBefore: {
@@ -370,6 +372,101 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    handlepayment(){
+        this.dialogFormVisible1=true
+    },
+    handleAudit(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择一条要审核的条目')
+      }else{
+        this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        postaudit({roleFlag:1,purchaseReceiptReportList:this.modification}).toPromise()
+        .then(response => {
+          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,flag:2,purchaseReceiptReportList:this.modification}).toPromise()
+        .then(response => {
+          this.$message.success('驳回成功')
+          this.getList()
+        }).catch(req => {
+          this.$message.success('驳回失败')
+        })
+      })
+      }
+    },
+    handlepass(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择要通过的条目')
+      }else{
+        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('通过失败')
+        })
+      })
+      }
+    },
+    handlepass1(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择要通过的条目')
+      }else{
+        this.$confirm(`审核通过后,任务将发送给出纳,是否确定通过?`, {
+        cancelButtonText: '取消',
+        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('通过失败')
+        })
+      })
+      }
+    },
+    carryoverconfirm(){
+      if(this.currect==true){
+          postreplanishent({
+            customerConfirmationStatusFlag:this.modification[0].customerConfirmationStatusFlag,
+            purchaseReceiptReport:{contractNo:this.carryoverlist.contractNo,carryOverWeight:this.carryoverlist.carryOverWeight},
+            amountNotPayable:this.modification[0].amountNotPayable}).toPromise()
+        .then(response => {
+          this.$message.success('结转成功')
+          this.getList()
+        })
+      }else{
+        if(this.carryovercontractnolist.length>0){
+          
+        }else{
+          this.$message.warning('无可结转的其他合同')
+        }
+      }
+    },
     amendconfirm(){
       this.amendlist.id=this.modification[0].id
       postamend(this.amendlist).toPromise()
@@ -484,7 +581,8 @@ export default {
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
-        contractNo:this.contractNo
+        contractNo:this.contractNo,
+        roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {
@@ -494,6 +592,7 @@ export default {
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
+        roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {