瀏覽代碼

提交嘉通木材

caojunjie 2 年之前
父節點
當前提交
031e39880e

+ 49 - 1
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -18,6 +18,12 @@
         <el-button type="primary" size="small" v-if="form.status == 1"
                    class="el-button--small-yh " @click.stop="withdraw(1)">撤销
         </el-button>
+        <el-button type="primary" size="small" v-if="form.status == 1"
+                   class="el-button--small-yh " @click.stop="withdraw(2)">入库确认
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.status == 2"
+                   class="el-button--small-yh " @click.stop="withdraw(3)">入库撤销
+        </el-button>
         <el-button type="primary" @click="editCustomer" :loading="subLoading"
                    size="small">保存数据
         </el-button>
@@ -786,7 +792,49 @@ export default {
               })
             })
         })
-      } else {
+      } else if(type == 2){
+        this.$confirm("是否确认入库?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          withdraw({
+            id: this.form.id,
+            type: "RK",
+            status: 2,
+            isIssue: 3,
+            toolType: 'app'
+          }).then(res => {
+            this.$message({
+              type: "success",
+              message: "撤销成功!"
+            });
+            this.getDetail(this.form.id);
+            this.subLoading = false;
+          })
+        })
+      } else if(type == 3){
+        this.$confirm("是否确认撤销?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          withdraw({
+            id: this.form.id,
+            type: "RK",
+            status: 1,
+            isIssue: 1,
+            toolType: 'app'
+          }).then(res => {
+            this.$message({
+              type: "success",
+              message: "撤销成功!"
+            });
+            this.getDetail(this.form.id);
+            this.subLoading = false;
+          })
+        })
+      }else {
         this.$confirm("是否确认撤销?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",

+ 50 - 1
src/views/salesManagement/outStock/detailsPage.vue

@@ -15,6 +15,12 @@
         <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 3"
                    size="small">保存数据
         </el-button>
+        <el-button type="primary" @click="withdraw(0)" :loading="subLoading" v-if="form.status == 8"
+                   size="small">确认出库
+        </el-button>
+        <el-button type="primary" @click="withdraw(0)" :loading="subLoading" v-if="form.status == 2"
+                   size="small">撤销出库
+        </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
@@ -226,7 +232,7 @@ import {
   financingExcess,
   revokeWarehousing,
   delItem,
-  scanningCodeAddPc
+  scanningCodeAddPc, withdraw
 } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import tableOptionTwo from "./config/customerContactTwo.json";
@@ -835,6 +841,49 @@ export default {
         }
       });
     },
+    withdraw(type) {
+      if (type == 0) {
+        this.$confirm("是否确认出库?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.subLoading = true
+          withdraw({
+            id: this.form.id,
+            type: "CK",
+            status: 2,
+            isIssue: 7,
+            toolType: 'app',
+            scanningComparison: "Y"
+          }).then(res => {
+            this.$message.success("出库成功")
+            this.getDetail(this.form.id)
+            this.subLoading = false
+          })
+        })
+      }else {
+        this.$confirm("是否确认撤销?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.subLoading = true
+          withdraw({
+            id: this.form.id,
+            type: "CK",
+            status: 8,
+            isIssue: 5,
+            toolType: 'app',
+            scanningComparison: "N",
+          }).then(res => {
+            this.$message.success("撤销成功")
+            this.getDetail(this.form.id)
+            this.subLoading = false
+          })
+        })
+      }
+    },
     //请核
     auditCheck() {
       let orderFeesList = this.$refs.feeInfo.submitData();