فهرست منبع

添加出库审批

caojunjie 4 سال پیش
والد
کامیت
373650bff6

+ 9 - 1
src/api/warehouseBusiness/warehouseOutStock.js

@@ -25,7 +25,7 @@ export function addWhgenleg(data) {
   })
 }
 
-// 货权转移提交
+// 请核
 export function warehouseSubmission(data) {
   return request({
     url: '/warehouseBusiness/outStock/warehouseSubmission',
@@ -102,3 +102,11 @@ export function revoke(fId) {
     method: 'get',
   })
 }
+// 状态为4撤销(请核)
+export function revokeTwo(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 23 - 20
src/views/warehouseBusiness/inStock/index.vue

@@ -343,7 +343,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
-            v-if="scope.row.fBillstatus == 4"
+            v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 6"
             @click="handleUpdate(scope.row, true)"
           >审核进度
           </el-button>
@@ -480,6 +480,7 @@
               <el-input
                 v-model="form.fPlanqty"
                 style="width: 80%"
+                maxlength="9"
                 laceholder="计划件数"
                 oninput='this.value=this.value.replace(/\D/g,"")'
                 :disabled="browseStatus"
@@ -491,8 +492,9 @@
               <el-input
                 v-model="form.fPlannetweight"
                 style="width: 80%"
+                maxlength="9"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-                laceholder="计划重"
+                laceholder="计划重"
                 :disabled="browseStatus"
               />
             </el-form-item>
@@ -504,6 +506,7 @@
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 style="width: 80%"
                 laceholder="计划毛重"
+                maxlength="9"
                 :disabled="browseStatus"
               />
             </el-form-item>
@@ -822,10 +825,10 @@
             "
           >{{ detailsHidden ? "隐藏" : "展开" }}</el-button
           >
-          <el-button type="info" prop="打印" @click="showEditDialog_sss"
+          <el-button type="info" :disabled="browseStatus" prop="打印" @click="showEditDialog_sss"
           >作业单
           </el-button>
-          <el-button @click="discharge">卸货 </el-button>
+          <el-button @click="discharge" :disabled="browseStatus">卸货 </el-button>
           <el-button
             :disabled="dataListSelection.length <= 0"
             @click.prevent="creditClick"
@@ -836,10 +839,10 @@
             @click.prevent="withdrawClick"
           >撤回入库</el-button
           >
-          <el-button type="success" prop="打印" @click="showEditDialog_ss"
+          <el-button type="success" :disabled="browseStatus" prop="打印" @click="showEditDialog_ss"
           >收货单
           </el-button>
-          <el-button type="warning" prop="打印" @click="showEditDialog_s"
+          <el-button type="warning" :disabled="browseStatus" prop="打印" @click="showEditDialog_s"
           >入库单
           </el-button>
           <!--
@@ -1933,16 +1936,6 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button
-          type="primary"
-          :disabled="approvalStatus"
-          @click="addOrUpdateHandle(form)"
-        >查看审批</el-button>
-        <el-button
-          type="primary"
-          v-if="approVal === true"
-          @click="addOrUpdateHand(form)"
-        >审批</el-button>
         <!-- 弹窗, 新增 / 修改 -->
         <add-or-update
           v-if="addOrUpdateVisible"
@@ -1954,14 +1947,24 @@
           ref="ApprovalComments"
           @refreshDataList="returnData"
         ></approval-comments>
-        <el-button type="success" prop="打印" @click="showEditDialog_ss"
+        <el-button
+          type="primary"
+          :disabled="approvalStatus"
+          @click="addOrUpdateHandle(form)"
+        >查看审批</el-button>
+        <el-button
+          type="primary"
+          v-if="approVal === true"
+          @click="addOrUpdateHand(form)"
+        >审批</el-button>
+        <el-button :disabled="browseStatus" type="success" prop="打印" @click="showEditDialog_ss"
         >收货单
         </el-button>
-        <el-button type="warning" prop="打印" @click="showEditDialog_s"
+        <el-button :disabled="browseStatus" type="warning" prop="打印" @click="showEditDialog_s"
         >入库单
         </el-button>
-        <el-button @click="discharge">卸货 </el-button>
-        <el-button type="info" prop="打印" @click="showEditDialog_sss"
+        <el-button @click="discharge" :disabled="browseStatus">卸货 </el-button>
+        <el-button type="info" :disabled="browseStatus" prop="打印" @click="showEditDialog_sss"
         >作业单
         </el-button>
         <el-button

+ 215 - 8
src/views/warehouseBusiness/outStock/index.vue

@@ -293,8 +293,8 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row, true)"
-            v-hasPermi="['warehouseBusiness:outStock:edit']"
-            >查看
+            v-hasPermi="['warehouseBusiness:inStock:edit']"
+          >查看
           </el-button>
           <el-button
             size="mini"
@@ -306,8 +306,8 @@
               scope.row.fBillstatus === 3
             "
             @click="handleUpdate(scope.row, false)"
-            v-hasPermi="['warehouseBusiness:outStock:edit']"
-            >修改
+            v-hasPermi="['warehouseBusiness:inStock:edit']"
+          >修改
           </el-button>
           <el-button
             size="mini"
@@ -315,12 +315,26 @@
             icon="el-icon-delete"
             v-if="scope.row.fBillstatus !== 6 && scope.row.fItemsStatus === 1"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['warehouseBusiness:outStock:remove']"
-            >删除
+            v-hasPermi="['warehouseBusiness:inStock:remove']"
+          >删除
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
+            @click="handleUpdate(scope.row, true)"
+          >审核进度
           </el-button>
         </template>
       </el-table-column>
     </el-table>
+    <add-or-update
+      v-if="addOrUpdateVisible"
+      ref="addOrUpdate"
+      @refreshDataList="getDataList"
+    ></add-or-update>
+    <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
     <pagination
       v-show="total > 0"
       :total="total"
@@ -501,6 +515,7 @@
                 v-model="form.fPlanqty"
                 style="width: 80%"
                 laceholder="计划件数"
+                maxlength="9"
                 oninput='this.value=this.value.replace(/\D/g,"")'
                 :disabled="browseStatus"
               />
@@ -511,8 +526,9 @@
               <el-input
                 v-model="form.fPlannetweight"
                 style="width: 80%"
+                maxlength="9"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
-                laceholder="计划重"
+                laceholder="计划重"
                 :disabled="browseStatus"
               />
             </el-form-item>
@@ -523,6 +539,7 @@
                 v-model="form.fPlangrossweight"
                 oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
                 style="width: 80%"
+                maxlength="9"
                 laceholder="计划毛重"
                 :disabled="browseStatus"
               />
@@ -1656,6 +1673,17 @@
         <!-- <el-button type="success" prop="打印" @click="showEditDialog_ss"
           >收货单
         </el-button> -->
+        <el-button
+          type="primary"
+          :disabled="approvalStatus"
+          @click="addOrUpdateHandle(form)"
+          v-if="form.fBillstatus > 3"
+        >查看审批</el-button>
+        <el-button
+          type="primary"
+          v-if="approVal === true"
+          @click="addOrUpdateHand(form)"
+        >审批</el-button>
         <el-button type="warning" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="showEditDialog_s"
         >出库单
         </el-button>
@@ -1670,7 +1698,10 @@
           :disabled="browseStatus"
         >请核</el-button
         >
-        <el-button @click="cancel">取 消</el-button>
+        <el-button type="danger" v-if="form.fBillstatus == '6'" @click="revoke">撤销请核</el-button>
+        <el-button type="danger" v-if="form.fBillstatus == '4' && current == before" @click="revokeTwo">撤销请核</el-button>
+        <el-button @click="cancelTwo" v-if="approVal === true">取 消</el-button>
+        <el-button @click="cancel" v-else>取 消</el-button>
       </div>
       <!-- 选择库存总账数据 -->
       <el-dialog
@@ -2207,6 +2238,8 @@ import {
   warehouseSubmission,
   updateWarehousebills,
   exportWarehousebills,
+  revokeTwo,
+  revoke,
 } from "@/api/warehouseBusiness/warehouseOutStock";
 
 import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
@@ -2228,14 +2261,21 @@ import { listUser, queryUserVal } from "@/api/system/user";
 import UploadFile from "@/components/Uploadfile";
 
 import { listWhgenleg } from "@/api/reportManagement/whgenleg";
+import Global from '@/layout/components/global'
+import AddOrUpdate from "@/views/viewApproval";
+import ApprovalComments from '@/views/startApproval'
 
 export default {
   name: "Warehousebills",
   components: {
     UploadFile,
+    AddOrUpdate,
+    ApprovalComments,
   },
   data() {
     return {
+      addOrUpdateVisible: false,
+      addOrUpdateVisib: false,
       fFeeUnitid: null,
       fFeeUnitids: null,
       formBrowseStatus: false,
@@ -2255,6 +2295,7 @@ export default {
       fid: 0,
       fQty: 0,
       fSbu: 0,
+      before:'',
       // 遮罩层
       loading: true,
       // 打印地址
@@ -2280,6 +2321,7 @@ export default {
       whgenlegVisible: false,
       // 收费多选框
       feelDrSelection: [],
+      approvalStatus: false,
       // 新增用户对话框
       editDialogVisible_s: false,
       editDialogVisible_ss: false,
@@ -2288,6 +2330,7 @@ export default {
       storageAgreements: false,
       dataList: [],
       warehouseCrList: [],
+      current:'',
       warehouseDrList: [],
       printinglist: [],
       browseStatus: false,
@@ -2346,6 +2389,7 @@ export default {
       fBillstatusOptions: [],
       // 费用名称
       fWbuOptions: [],
+      approVal:false,
       // 计价单位
       jFeetunitOptions: [
         {dictLabel: "件数",dictValue: 1},
@@ -2480,7 +2524,151 @@ export default {
       this.fBillstatusOptions = response.data;
     });
   },
+  activated() {
+    this.adoPt()
+  },
   methods: {
+    adoPt(){
+      this.approval = this.$route.query.data
+      if (this.approval){
+        this.closeButton = false
+        this.approval = JSON.parse(this.approval)
+        this.approVal = true
+        this.browseStatus = status;
+        this.reset();
+        this.detailsHidden = false;
+        this.formBrowseStatus = false;
+        this.dataList = [];
+        getWarehousebills(this.approval.billId).then((response) => {
+          if (response.data.warehousebills) {
+            this.form = response.data.warehousebills;
+            if (this.form.fBillstatus > 2) {
+              this.approvalStatus = false;
+            } else {
+              this.approvalStatus = true;
+            }
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+            for (let list in this.dataList) {
+              if (this.dataList[list].fBillstatus > 10) {
+                this.formBrowseStatus = true;
+              }
+            }
+          }
+          if (response.data.corps) {
+            this.fMblnoOptions = response.data.corps;
+            this.KHblnoOptions = response.data.corps;
+            this.fSbuOptions = response.data.corps;
+          }
+          if (response.data.feesList) {
+            this.fWbuOptions = response.data.feesList;
+          }
+          if (response.data.warehouse) {
+            this.warehouseOptions = response.data.warehouse;
+          }
+          if (response.data.warehouseBillsItem) {
+            this.dataList = response.data.warehouseBillsItem;
+          }
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
+          }
+          this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
+          this.$set(this.form, "fEta", Date.parse(this.form.fEta));
+          this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+          this.$set(this.form, "createTime", Date.parse(this.form.createTime));
+          this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+          this.$set(
+            this.form,
+            "fPlannetweight",
+            this.form.fPlannetweight.toFixed(2)
+          );
+          this.$set(
+            this.form,
+            "fPlangrossweight",
+            this.form.fPlangrossweight.toFixed(2)
+          );
+          for (let list in this.dataList) {
+            this.$set(
+              this.dataList[list],
+              "fBsdate",
+              Date.parse(this.dataList[list].fBsdate)
+            );
+          }
+          this.goodsOptions = response.data.goodsList;
+          this.kqhouseOptions = response.data.warehouseAreas;
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          for (let dr in this.warehouseDrList) {
+            this.$set(
+              this.warehouseDrList[dr],
+              "fFeeUnitid",
+              this.warehouseDrList[dr].fFeeunitid + ""
+            );
+            this.$set(
+              this.warehouseDrList[dr],
+              "fQty",
+              this.warehouseDrList[dr].fQty.toFixed(2)
+            );
+            this.$set(
+              this.warehouseDrList[dr],
+              "fAmount",
+              this.warehouseDrList[dr].fAmount.toFixed(2)
+            );
+          }
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          for (let cr in this.warehouseCrList) {
+            this.$set(
+              this.warehouseCrList[cr],
+              "fFeeUnitid",
+              this.warehouseCrList[cr].fFeeunitid + ""
+            );
+          }
+          this.userOptions = response.data.sysUser;
+          this.open = true;
+          this.title = "修改仓入库";
+        });
+      }
+    },
+    getDataList() {
+      this.addOrUpdateVisible = false;
+    },
+    returnData() {
+      this.addOrUpdateVisib = false;
+      this.cancelTwo()
+    },
+    addOrUpdateHandle(form) {
+      this.addOrUpdateVisible = true;
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(form.fId, 120);
+      });
+    },
+    addOrUpdateHand(form) {
+      this.addOrUpdateVisib = true;
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(form.fId, 120);
+      });
+    },
+    cancelTwo(){
+      this.open = false
+      let view = {
+        fullPath: "/business/outStock",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "OutStock",
+        params: Object,
+        path: "/business/outStock",
+        query: Object,
+        title: "出库"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
     //关闭弹框的事件
     addCloseDialog(){
       this.getList()
@@ -2492,6 +2680,14 @@ export default {
         this.$set(this.relevantAttachments[list], "fName", row.fileName);
       }
     },
+    revoke(){
+      revoke(this.form.fId).then(data=>{
+        console.log(data)
+        if (data.code == 200){
+          this.open = false;
+        }
+      })
+    },
     printSomething() {
       // 此处的style即为打印时的样式
       const style = "@media print { .print-div{ padding:8px;background-color:#cccccc;line-height:12px } .red{ color:#f00} .green{color:green} td{text-align: center}}";
@@ -2556,6 +2752,17 @@ export default {
         this.whgenlegTotal = response.total;
       });
     },
+    revokeTwo(){
+      let data = {
+        actId:120,
+        billId:this.form.fId,
+        id:this.form.fId
+      }
+      console.log(data)
+      revokeTwo(data).then(data =>{
+        console.log(data)
+      })
+    },
     // 导入付款信息
     whgenlegDatas() {
       if (this.dialogWhgenlegList.length === 0) {