Parcourir la source

手动出入库bug

cz il y a 1 an
Parent
commit
2a1eb646d4

+ 7 - 1
src/components/product/SelectAllGood.vue

@@ -301,7 +301,13 @@ const getList = (req) => {
     const productIdList = res.rows.map((x) => x.id);
     // 请求文件数据并回显
     if (productIdList.length > 0) {
-      proxy.getFile(productIdList, sourceList.value.data, "id");
+      proxy.getFileData({
+        businessIdList: productIdList,
+        data: sourceList.value.data,
+        att: "id",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
     }
   });
 };

+ 21 - 5
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -73,8 +73,8 @@ const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
 const outBoundReason = ref([
   {
-    label: "生产出库",
-    value: "9",
+    label: "生产打样",
+    value: "0",
   },
   {
     label: "生产超领",
@@ -101,7 +101,8 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     warehouseId: "",
-    type: "2",
+    type: "",
+    opType: "2",
   },
 });
 const loading = ref(false);
@@ -112,12 +113,27 @@ const selectConfig = computed(() => {
       prop: "warehouseId",
       data: warehouseList.value,
     },
+    {
+      label: "出库原因",
+      prop: "type",
+      data: outBoundReason.value,
+    },
   ];
 });
 const config = computed(() => {
   return [
     {
       attrs: {
+        label: "出库原因",
+        prop: "type",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, outBoundReason.value);
+      },
+    },
+    {
+      attrs: {
         label: "仓库名称",
         prop: "warehouseName",
         width: 220,
@@ -263,7 +279,7 @@ const formConfig = computed(() => {
       required: true,
       data: outBoundReason.value,
       fn: (val) => {
-        if (["1", "2", "9"].includes(val)) {
+        if (["1", "2", "0"].includes(val)) {
           formData.data.expectRestitutionTime = "";
         } else {
           formData.data.prodOrderId = "";
@@ -277,7 +293,7 @@ const formConfig = computed(() => {
       label: "生产订单",
       data: produceOrder.value,
       itemWidth: 50,
-      isShow: ["1", "2", "9"].includes(formData.data.type),
+      isShow: ["1", "2", "0"].includes(formData.data.type),
     },
     // {
     //   type: "select",

+ 51 - 2
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -84,9 +84,14 @@ const inBoundReason = ref([
     label: "废料入库",
     value: "102",
   },
+  {
+    label: "丢件寻回",
+    value: "103",
+  },
 ]);
 const produceOrder = ref([]);
 const lendData = ref([]);
+const lendDataOne = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -95,7 +100,8 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     warehouseId: "",
-    type: "1",
+    type: "",
+    opType: "1",
   },
 });
 const loading = ref(false);
@@ -106,12 +112,27 @@ const selectConfig = computed(() => {
       prop: "warehouseId",
       data: warehouseList.value,
     },
+    {
+      label: "入库原因",
+      prop: "type",
+      data: inBoundReason.value,
+    },
   ];
 });
 const config = computed(() => {
   return [
     {
       attrs: {
+        label: "入库原因",
+        prop: "type",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, inBoundReason.value);
+      },
+    },
+    {
+      attrs: {
         label: "仓库名称",
         prop: "warehouseName",
         width: 220,
@@ -205,6 +226,19 @@ const getDict = () => {
       }));
     });
 
+  proxy
+    .post("/stockJournal/page", {
+      pageNum: 1,
+      pageSize: 9999,
+      isSeek: 0,
+    })
+    .then((res) => {
+      lendDataOne.value = res.rows.map((x) => ({
+        label: x.code,
+        value: x.id,
+      }));
+    });
+
   proxy.getDictOne(["material_unit"]).then((res) => {
     productUnit.value = res["material_unit"].map((x) => ({
       label: x.dictValue,
@@ -269,7 +303,12 @@ const formConfig = computed(() => {
       fn: () => {
         if (["101", "102"].includes(val)) {
           formData.data.borrowId = "";
+          formData.data.loseId = "";
+        } else if (val == "103") {
+          formData.data.borrowId = "";
+          formData.data.prodOrderId = "";
         } else {
+          formData.data.loseId = "";
           formData.data.prodOrderId = "";
         }
       },
@@ -292,6 +331,15 @@ const formConfig = computed(() => {
       isShow: formData.data.type == "100",
     },
     {
+      type: "select",
+      prop: "loseId",
+      label: "丢件单",
+      data: lendDataOne.value,
+      itemWidth: 50,
+      isShow: formData.data.type == "103",
+    },
+
+    {
       type: "input",
       itemType: "textarea",
       prop: "remarks",
@@ -317,12 +365,13 @@ const rules = ref({
   borrowId: [
     { required: true, message: "请选择借用出库单", trigger: "change" },
   ],
+  loseId: [{ required: true, message: "请选择丢件单", trigger: "change" }],
   quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
   remarks: [{ required: true, message: "请输入备注", trigger: "blur" }],
 });
 const openModal = () => {
   formData.data = {
-    type: "1",
+    type: "",
     list: [],
   };
   loadingDialog.value = false;