Prechádzať zdrojové kódy

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

caojunjie 4 rokov pred
rodič
commit
6f88210bad

+ 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',
+  })
+}

+ 3 - 4
src/views/finance/contrast/index.vue

@@ -941,13 +941,12 @@ export default {
         let formDate = new window.FormData()
         formDate.append('tFee',JSON.stringify(this.queryParams))
         formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
-
         backFee(formDate).then(response=>{
           this.msgSuccess("撤回成功")
-
+          this.open = false
+          this.reset()
+          this.getList()
         })
-        // this.open = false
-      this.getList()
     },
 
     // 打印功能

+ 22 - 93
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -344,7 +344,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择货权方"
@@ -364,7 +364,7 @@
                 v-model="form.fTocorpid"
                 filterable
                 remote
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
                 @change="changefCorpid(form)"
                 :remote-method="corpsRemoteMethod"
@@ -397,7 +397,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 value-format="timestamp"
                 placeholder="货转日期"
               >
@@ -410,7 +410,7 @@
                 v-model="form.fChargedate"
                 style="width: 80%"
                 type="date"
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 value-format="timestamp"
                 placeholder="仓储计费日期">
               </el-date-picker>
@@ -421,7 +421,7 @@
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 remote
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
@@ -443,7 +443,7 @@
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -461,7 +461,7 @@
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -479,7 +479,7 @@
                 v-model="form.fTrademodeid"
                 placeholder="请选择贸易方式"
                 clearable
-                :disabled="notChange"
+                :disabled="notChange || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -497,7 +497,7 @@
             <el-form-item label="提单号" prop="fMblno">
               <el-input
                 v-model="form.fMblno"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 style="width: 80%"
                 placeholder="手工输入"
               />
@@ -508,7 +508,7 @@
               <el-input
                 v-model="form.fOriginalbillno"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 placeholder="原始入库单号"
               />
             </el-form-item>
@@ -521,7 +521,7 @@
                 value-format="yyyy-MM-dd"
                 range-separator="至"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="notChange"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期"
               >
@@ -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)
         })
       },
 

+ 11 - 13
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -292,7 +292,7 @@
             type="text"
             icon="el-icon-edit"
             @click="check(scope.row, true)"
-            v-hasPermi="['warehouseBusiness:warehousebills:edit']"
+            v-hasPermi="['warehouseBusiness:stockTransfer:query']"
             >查看
           </el-button>
           <el-button
@@ -301,7 +301,7 @@
             icon="el-icon-edit"
             v-if="scope.row.fBillstatus === 4 || scope.row.fBillstatus === 5"
             @click="check(scope.row, true)"
-            v-hasPermi="['warehouseBusiness:goodsTransfer:edit']"
+            v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
           >审批进度
           </el-button>
           <el-button
@@ -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