cz 2 жил өмнө
parent
commit
e3154b3e08

+ 2 - 0
src/App.vue

@@ -14,6 +14,7 @@ export default {
   },
   watch: {},
   created() {
+    console.log("aawss");
     getBusinessDict({ current: 1, size: 999 }).then(
       (res) => {
         const list = res.data.data;
@@ -25,6 +26,7 @@ export default {
     );
   },
   methods: {},
+  mounted() {},
   computed: {},
 };
 </script>

+ 2 - 2
src/components/DetailsComponents/QualityDetails.vue

@@ -34,7 +34,7 @@
         <labelTitle content="质检明细"></labelTitle>
       </div>
       <div style="padding: 0px 20px">
-        <el-table :data="form.qualityDetailsList">
+        <el-table :data="form.qualityRecordsVoList">
           <el-table-column label="产品编码" prop="productCode" width="150" />
           <el-table-column label="产品名称" prop="productName" width="150" />
           <!-- <el-table-column label="质检合格" prop="qualifiedQuantity" width="100" /> -->
@@ -96,7 +96,7 @@ export default {
   methods: {
     async getDetails() {
       this.loading = true;
-      qualityTestingDetails1({ qualityInfoId: this.rowData.id }).then((res) => {
+      qualityTestingDetails1({ id: this.rowData.id }).then((res) => {
         this.form = res.data.data;
         this.loading = false;
       });

+ 67 - 10
src/views/inbound-outbound/transfer/JDtransfer.vue

@@ -70,6 +70,17 @@ export default {
         remark: "",
         changeProductList: [],
       },
+      openOne: false,
+      formOne: {},
+      rules: {
+        inQuantity: [
+          {
+            required: true,
+            message: "请输入接收数量",
+            trigger: "blur",
+          },
+        ],
+      },
     };
   },
   created() {
@@ -154,15 +165,25 @@ export default {
       );
     },
     handleReceive(row) {
-      this.$confirm("是否确认接收 ?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        API.receive({ id: row.id, inQuantity: row.outQuantity }).then(() => {
-          this.msgSuccess("接收成功");
-          this.getList();
-        });
+      this.openOne = true;
+      this.formOne = {
+        id: row.id,
+        inQuantity: "",
+        canSum: Number(row.outQuantity),
+      };
+    },
+    handleSubmitOne() {
+      this.$refs.formOne.validate((valid) => {
+        if (valid) {
+          if (Number(this.formOne.inQuantity) > this.formOne.canSum) {
+            return this.msgInfo("数量不可大于调出数量");
+          }
+          API.receive(this.formOne).then(() => {
+            this.msgSuccess("接收成功");
+            this.openOne = false;
+            this.getList();
+          });
+        }
       });
     },
 
@@ -259,7 +280,9 @@ export default {
           <template slot-scope="scope">
             <el-button
               type="text"
-              v-if="scope.row.inStatus === 0"
+              v-if="
+                scope.row.inStatus === 0 && Number(scope.row.outQuantity) > 0
+              "
               @click="handleReceive(scope.row)"
               >接收
             </el-button>
@@ -291,6 +314,40 @@ export default {
         ref="sendTransfer"
       ></send-transfer>
     </el-dialog>
+
+    <el-dialog
+      title="接收"
+      :visible.sync="openOne"
+      v-if="openOne"
+      width="30%"
+      top="20vh"
+    >
+      <el-form
+        ref="formOne"
+        :model="formOne"
+        :rules="rules"
+        label-width="100px"
+        label-position="right"
+      >
+        <el-form-item label="调出数量" prop="canSum">
+          <el-input v-model="formOne.canSum" size="small" disabled> </el-input>
+        </el-form-item>
+        <el-form-item label="接收数量" prop="inQuantity">
+          <el-input
+            v-model="formOne.inQuantity"
+            placeholder="请输入接收数量"
+            size="small"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div style="text-align: center; margin-top: 15px">
+        <el-button size="small" @click="openOne = false">取消 </el-button>
+        <el-button type="primary" size="small" @click="handleSubmitOne">
+          确定</el-button
+        >
+      </div>
+    </el-dialog>
   </div>
 </template>