luobang 2 年之前
父節點
當前提交
3ac59fe9eb

+ 58 - 5
src/views/WMS/components/steel/addSteelInbound.vue

@@ -28,7 +28,7 @@
       <el-input class="input" v-model="remark"> </el-input>
     </div>
     <!-- 模态窗口 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" size="40%">
+    <el-drawer :visible.sync="drawer" :direction="direction" size="50%">
       <div style="margin-bottom: 10px">
         <el-input
           placeholder="请输入内容"
@@ -41,10 +41,20 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column>
+        </dilTable>
       </div>
       <div v-show="a == 2">
         <dilTable
@@ -122,6 +132,49 @@ export default {
     this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=3&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  3 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
     getTheoreticalByInfo() {
       this.axios
         .post(

+ 57 - 4
src/views/WMS/components/steel/bar1_steel/bar1_addSteelInbound.vue

@@ -41,10 +41,20 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column></dilTable
+        >
       </div>
       <div v-show="a == 2">
         <dilTable
@@ -122,6 +132,49 @@ export default {
     this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=1&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  1 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
     getTheoreticalByInfo() {
       this.axios
         .post(

+ 57 - 4
src/views/WMS/components/steel/bar2_steel/bar2_addSteelInbound.vue

@@ -41,10 +41,20 @@
         </el-button>
       </div>
       <div v-show="a == 1">
-        <dilTable
-          v-bind.sync="first"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
+        <dilTable v-bind.sync="first" @radio-change="currentRadioChange1">
+          <el-table-column label="操作" width="140px">
+            <template slot-scope="scope">
+              <el-input v-model.number="scope.row.quantity" style="width:60px">
+              </el-input>
+              <el-button
+                type="text"
+                size="mini"
+                @click="deleteInboundMaterial(scope.row)"
+                >删除</el-button
+              >
+            </template>
+          </el-table-column></dilTable
+        >
       </div>
       <div v-show="a == 2">
         <dilTable
@@ -122,6 +132,49 @@ export default {
     this.endTime = new Date(this.startTime + 86400000);
   },
   methods: {
+    deleteInboundMaterial(row) {
+      if (Number(row.quantity) > 0) {
+        this.$confirm("确定删除?继续", "提示", {
+          cancelButtonText: "取消",
+          confirmButtonText: "确定"
+        }).then(() => {
+          console.log(row);
+          this.axios
+            .post(
+              "/api/v1/wms/deleteInboundMaterial?warehouseId=2&materialCode=" +
+                row.materialCode +
+                "&materialSpecification=" +
+                row.materialSpecification +
+                "&materialModel=" +
+                row.materialModel +
+                "&quantity=" +
+                row.quantity
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message.success("删除成功");
+                this.first.requestUrl =
+                  "/api/v1/wms/getSteelMaterialModelList?apiId=447&warehouseId=" +
+                  2 +
+                  "&status=" +
+                  1 +
+                  "&con=" +
+                  "" +
+                  "&startTime=" +
+                  sjTime(this.startTime) +
+                  "&endTime=" +
+                  sjTime(this.endTime) +
+                  "&i=" +
+                  new Date();
+              } else {
+                this.$message.error("删除失败");
+              }
+            });
+        });
+      } else {
+        this.$message.warning("请输入需要删除的物资件数");
+      }
+    },
     getTheoreticalByInfo() {
       this.axios
         .post(