Browse Source

仓储业务更新03

wengyuwen 4 years ago
parent
commit
63e2d12529

+ 2 - 2
src/api/warehouseBusiness/agreement.js

@@ -107,7 +107,7 @@ export function PleaseCheck(data) {
 }
 
 // 撤销请核
-export function ReturnCheck(data) {
+export function backFee(data) {
   return request({
     url: '/warehouseBusiness/agreementStorage/revoke',
     method: 'post',
@@ -116,7 +116,7 @@ export function ReturnCheck(data) {
 }
 
 // 撤销审批
-export function revocation(data) {
+export function RevocationApproval(data) {
   return request({
     url: '/warehouse/paths/revoke',
     method: 'post',

+ 11 - 16
src/views/warehouseBusiness/agreement/index.vue

@@ -427,9 +427,9 @@
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
-        <el-button type="danger" :disabled="disappear" @click="approvalRevocation" v-if="form.fBillstatus === '4'">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" @click="backApproval" v-if="form.fBillstatus == '4'">撤销审批</el-button>
         <el-button type="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
-        <el-button type="success" @click="BackSubmit" v-if="form.fBillstatus === '6'">撤销请核</el-button>
+        <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus === '6'">撤销请核</el-button>
         <el-button type="primary" @click="submitForm" :disabled="notChange">确 定</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
@@ -441,8 +441,8 @@
 <script>
 import moment from 'moment'
 import {
-  revocation,
-  ReturnCheck,
+  RevocationApproval,
+  backFee,
   PleaseCheck,
   listAgreements,
   getAgreement,
@@ -766,14 +766,13 @@ export default {
       })
     },
     //撤销审批
-    approvalRevocation() {
+    backApproval() {
       let data = {
         id: this.form.fId,
         actId: this.agreementId,
         billId: this.form.fId
       }
-      console.log(this.queryParams)
-      revocation(data).then(data => {
+      RevocationApproval(data).then(data => {
         console.log(data)
         if (data.code === 200) {
           this.$message.success('撤销成功')
@@ -783,18 +782,14 @@ export default {
       })
     },
     // 撤销请核
-    BackSubmit() {
-      console.log(this.form)
+    backrRconciliation() {
       this.form.fBillstatus = '1'
-      let formDate = new window.FormData()
-      formDate.append('agreement', JSON.stringify(this.form))
-      formDate.append('agreementitems', JSON.stringify(this.agreementitemsList))
-      console.log(formDate)
-      ReturnCheck(formDate).then(response => {
-        this.open = false
-        this.msgSuccess('操作成功')
+      backFee(this.form.fId).then(response=>{
+        this.msgSuccess("撤回成功")
         this.getList()
       })
+      this.open = false
+      this.getList()
     },
     // 请核按钮
     submit() {

+ 7 - 11
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -1389,7 +1389,7 @@
         <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
         <el-button type="primary" :disabled="notChange" @click="submitForm">提交审核</el-button>
-        <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4'" @click="backApproval">撤销审批</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>
@@ -1732,16 +1732,12 @@
     methods: {
       // 撤销审核
       backrRconciliation(){
-        this.queryParams.fBillstatus = '1'
-        // let formDate = new window.FormData()
-        // formDate.append('tFee',JSON.stringify(this.queryParams))
-        // formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
-
+        this.form.fBillstatus = '1'
         backFee(this.form.fId).then(response=>{
           this.msgSuccess("撤回成功")
-
+          this.getList()
         })
-        // this.open = false
+        this.open = false
         this.getList()
       },
       // 默认录入人
@@ -1851,7 +1847,7 @@
       // 撤销审批
       backApproval(){
         let data = {
-          // id:this.form.fId,
+          id:this.form.fId,
           actId:this.goodsTransferId,
           billId:this.form.fId
         }
@@ -2538,8 +2534,8 @@
         this.dataListSelection = row
       },
       saveForm() {
-        this.notChange = true
-        this.browseStatus = true
+        // this.notChange = true
+        // this.browseStatus = true
         this.updateDeduplication()
         this.$refs['form'].validate((valid) => {
           if (this.form.fCorpid === this.form.fTocorpid) {

+ 19 - 4
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -1549,7 +1549,7 @@
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
         <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
-        <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4'" @click="backApproval">撤销审批</el-button>
         <el-button type="success" @click="backrRconciliation" v-if="form.fBillstatus == '6'">撤销请核</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
@@ -2377,12 +2377,12 @@ export default {
   methods: {
     // 撤销审核
     backrRconciliation(){
-      this.queryParams.fBillstatus = '1'
+      this.form.fBillstatus = '1'
       backFee(this.form.fId).then(response=>{
         this.msgSuccess("撤回成功")
-
+        this.getList()
       })
-      // this.open = false
+      this.open = false
       this.getList()
     },
     // 默认录入人
@@ -3158,7 +3158,22 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
+      this.form = {
+        fCorpid: '',
+        fTocorpid: '',
+        fBillno: '',
+        fBsdate: '',
+        fChargedate: '',
+        fWarehouseid: '',
+        fStltypeid: '',
+        fFeetunit: '',
+        fTrademodeid: '',
+        fMblno: '',
+        fOriginalbillno: '',
+        orgStorageDate: ''
+      }
       this.browseStatus = status;
+      this.notChange = false
       this.reset();
       this.queryUser();
       this.open = true;