Kaynağa Gözat

仓储业务货转调拨修改

wengyuwen 4 yıl önce
ebeveyn
işleme
83cc835087

+ 7 - 0
src/api/warehouseBusiness/storageFeeCalculation.js

@@ -78,3 +78,10 @@ export function exportStorageFeeCalculation(query) {
     params: query
   })
 }
+ // 撤销请核
+export function backFee(fId) {
+  return request({
+    url: '/warehouseBusiness/storageFeeCalculation/withdrawById/' + fId,
+    method: 'get',
+  })
+}

+ 11 - 82
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" :disabled="disappear" v-if="form.fBillstatus == '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @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>
@@ -1509,6 +1509,8 @@
     },
     data() {
       return {
+        Lander:'',
+        Operator:'',
         colseButton:true,
         cancelButton:true,
         disappear:false,
@@ -1736,9 +1738,9 @@
         backFee(this.form.fId).then(response=>{
           this.msgSuccess("撤回成功")
           this.getList()
+          this.open = false
+          this.getList()
         })
-        this.open = false
-        this.getList()
       },
       // 默认录入人
       register() {
@@ -2160,11 +2162,14 @@
         this.title = '货权转移'
       },
       // 查看按钮
-      check(row, res) {
+      check(row) {
+        this.disappear = false
         this.notChange = true
         this.browseStatus = true
         const fId = row.fId || this.ids
         getGoodsTransfer(fId).then((response) => {
+          console.log(response.data.corps[0].createBy)
+          this.Operator = response.data.corps[0].createBy
           this.form = response.data.warehousebills
           this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
           this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
@@ -2195,84 +2200,8 @@
           this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
           this.open = true
           this.title = '修改货存转移'
-          // if (res == 1) {
-          //   this.notChange = true
-          //   if (this.Operator == this.Lander) {
-          //     this.disappear = false
-          //     this.reset()
-          //     const fId = row.fId || this.ids
-          //     getGoodsTransfer(fId).then((response) => {
-          //       this.form = response.data.warehousebills
-          //       this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-          //       this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
-          //       this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-          //       this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-          //       this.fMblnoOptions = response.data.corps
-          //       this.KHblnoOptions = response.data.corps
-          //       this.fWbuOptions = response.data.feesList
-          //       this.warehouseOptions = response.data.warehouse
-          //       this.dataList = response.data.warehouseBillsItem
-          //       for (let list in this.dataList) {
-          //         if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
-          //           this.formBrowseStatus = true
-          //         }
-          //         this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-          //       }
-          //       this.goodsOptions = response.data.goodsList
-          //       if (response.data.warehousebillsfeesDr) {
-          //         this.warehouseDrList = response.data.warehousebillsfeesDr
-          //       }
-          //       if (response.data.warehousebillsfeesCr) {
-          //         this.warehouseCrList = response.data.warehousebillsfeesCr
-          //       }
-          //       if (response.data.enclosures) {
-          //         this.relevantAttachments = response.data.enclosures;
-          //       }
-          //       this.userOptions = response.data.sysUser
-          //       this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-          //       this.open = true
-          //       this.title = '修改货存转移'
-          //     })
-          //   } else {
-          //     // this.notChange = true
-          //   }
-          // } else {
-          //   // this.notChange = true
-          //   this.reset()
-          //   const fId = row.fId || this.ids
-          //   getGoodsTransfer(fId).then((response) => {
-          //     this.form = response.data.warehousebills
-          //     this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-          //     this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
-          //     this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-          //     this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-          //     this.fMblnoOptions = response.data.corps
-          //     this.KHblnoOptions = response.data.corps
-          //     this.fWbuOptions = response.data.feesList
-          //     this.warehouseOptions = response.data.warehouse
-          //     this.dataList = response.data.warehouseBillsItem
-          //     for (let list in this.dataList) {
-          //       if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {
-          //         this.formBrowseStatus = true
-          //       }
-          //       this.$set(this.dataList[list], 'fBsdate', Date.parse(this.dataList[list].fBsdate))
-          //     }
-          //     this.goodsOptions = response.data.goodsList
-          //     if (response.data.warehousebillsfeesDr) {
-          //       this.warehouseDrList = response.data.warehousebillsfeesDr
-          //     }
-          //     if (response.data.warehousebillsfeesCr) {
-          //       this.warehouseCrList = response.data.warehousebillsfeesCr
-          //     }
-          //     if (response.data.enclosures) {
-          //       this.relevantAttachments = response.data.enclosures;
-          //     }
-          //     this.userOptions = response.data.sysUser
-          //     this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-          //     this.open = true
-          //     this.title = '修改货存转移'
-          //   })
-          // }
+          console.log(this.Operator)
+          console.log(this.Lander)
         })
       },
 

+ 9 - 11
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" :disabled="disappear" v-if="form.fBillstatus == '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @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>
@@ -2130,6 +2130,8 @@ export default {
   },
   data() {
     return {
+      Lander:'',
+      Operator:'',
       cancelButton:true,
       approve:false,
       disappear:false,
@@ -2381,8 +2383,8 @@ export default {
       backFee(this.form.fId).then(response=>{
         this.msgSuccess("撤回成功")
         this.getList()
+        this.open = false
       })
-      this.open = false
       this.getList()
     },
     // 默认录入人
@@ -3185,14 +3187,15 @@ export default {
       this.title = "调拨单";
       this.formBrowseStatus = false;
     },
-    check(row, status){
-      this.disappear = false
+    check(row,status,res){
       this.notChange = true
       this.browseStatus = status;
       this.reset();
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
+        console.log(response.data.corps[0].createBy)
+        this.Operator = response.data.corps[0].createBy
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           this.$set(this.form, "fEta", Date.parse(this.form.fEta));
@@ -3257,13 +3260,6 @@ export default {
         this.open = true;
         this.title = "修改调拨";
       });
-      if (res == 1) {
-        this.notChange = true
-        if (this.Operator == this.Lander) {
-          this.disappear = false
-          this.reset()
-        }
-      }
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
@@ -3273,6 +3269,8 @@ export default {
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
+        console.log(response)
+
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           this.$set(this.form, "fEta", Date.parse(this.form.fEta));

+ 30 - 4
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -8,7 +8,7 @@
       v-show="showSearch"
       label-width="88px"
     >
-      <el-form-item label="业务编号" prop="fBillno">
+      <el-form-item label="业务1编号" prop="fBillno">
         <el-input
           v-model="queryParams.fBillno"
           placeholder="请输入业务编号"
@@ -235,7 +235,7 @@
             size="mini"
             type="text"
             icon="el-icon-view"
-            @click="check(scope.row,1)"
+            @click="handleUpdate(scope.row, true)"
             v-hasPermi="['warehouseBusiness:storageFeeCalculation:edit']"
             v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
           >审批进度</el-button
@@ -815,12 +815,12 @@
         </el-table>
       </div>
       <div slot="footer" class="dialog-footer">
-        <el-button type="success" size="small" v-if="form.fBillstatus === '6'">撤销请核</el-button>
+        <el-button type="success" v-if="form.fBillstatus == '6'" @click="backrRconciliation">撤销请核</el-button>
         <el-button v-if="approve === true" @click="goApproval">审批</el-button>
         <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle">查看审批流</el-button>
         <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
         <el-button v-if="cancelButton === false" @click="homePage">取 消</el-button>
-        <el-button type="danger" size="small" :disabled="disappear" v-if="queryParams.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
+        <el-button type="danger" size="small" :disabled="disappear" v-if="form.fBillstatus == '4' && Operator == Lander" @click="backApproval">撤销审批</el-button>
         <el-button type="primary" :disabled="browseStatus" @click="submitForm(2)">保 存</el-button>
         <el-button
           :disabled="browseStatus"
@@ -836,6 +836,7 @@
 
 <script>
   import {
+    backFee,
     calculateStorageFees,
     getStorageFeeCalculation,
     delStorageFeeCalculation,
@@ -863,6 +864,8 @@
     },
     data() {
       return {
+        Lander:'',
+        Operator:'',
         actId: 150,
         disappear:false,
         cancelButton:true,
@@ -990,11 +993,29 @@
       this.getDicts("tax_rate").then((response) => {
         this.fTaxrate = response.data[0].dictValue
       });
+      this.register()
     },
     activated(){
       this.Jump()
     },
     methods: {
+      // 撤销审核
+      backrRconciliation(){
+        // this.form.fBillstatus = '1'
+        backFee(this.form.fId).then(response=>{
+          this.msgSuccess("撤回成功")
+          this.getList()
+          this.open = false
+          this.getList()
+        })
+      },
+
+      // 默认录入人
+      register() {
+        queryUserVal().then((response)=>{
+          this.Lander = response.user.userName
+        })
+      },
       // 撤销审批
       backApproval(){
         let data = {
@@ -1312,6 +1333,7 @@
         this.relevantAttachments = [];
         this.title = "出库单";
       },
+
       /** 修改按钮操作 */
       handleUpdate(row, status) {
         this.notChange = true
@@ -1319,6 +1341,7 @@
         this.reset();
         let data = row || this.ids;
         getStorageFeeCalculation(data.fId).then((response) => {
+          this.Operator = response.data.corps.createBy
           this.fMblnoOptions = []
           if (response.data.corps) {
             this.fMblnoOptions.push(response.data.corps)
@@ -1350,7 +1373,10 @@
           this.userOptions = response.data.sysUser;
           this.open = true;
           this.title = "编辑仓储费计算";
+          console.log(this.Operator)
+          console.log(this.Lander)
         });
+
       },
       changeEstmateAmt(row) {
         let fQty = 0