cz 1 жил өмнө
parent
commit
49055e83c8

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

@@ -269,19 +269,19 @@ const getDict = () => {
           parentId: "",
           children: [
             {
-              id: "1",
-              definition: "1",
-              label: "产品",
-              parentId: "-1",
-              children: arrayRecursion(res[0], "1"),
-            },
-            {
               id: "2",
               definition: "2",
               label: "物料",
               parentId: "-1",
               children: arrayRecursion(res[1], "2"),
             },
+            {
+              id: "1",
+              definition: "1",
+              label: "产品",
+              parentId: "-1",
+              children: arrayRecursion(res[0], "1"),
+            },
           ],
         },
       ];

+ 7 - 7
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -259,19 +259,19 @@ const getDict = () => {
           parentId: "",
           children: [
             {
-              id: "1",
-              definition: "1",
-              label: "产品",
-              parentId: "-1",
-              children: arrayRecursion(res[0], "1"),
-            },
-            {
               id: "2",
               definition: "2",
               label: "物料",
               parentId: "-1",
               children: arrayRecursion(res[1], "2"),
             },
+            {
+              id: "1",
+              definition: "1",
+              label: "产品",
+              parentId: "-1",
+              children: arrayRecursion(res[0], "1"),
+            },
           ],
         },
       ];

+ 71 - 19
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -27,7 +27,7 @@
                 </template>
               </el-table-column>
               <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
-                  (row) => dictValueLabel(row.productUnit, productUnit)
+                  (row) => dictKeyValue(row.productUnit, materialUnitData)
                 " /> -->
               <el-table-column prop="stockQuantity" label="库存数量" width="100" />
               <el-table-column label="出库数量" width="140">
@@ -91,8 +91,9 @@ const outBoundReason = ref([
 ]);
 
 const produceOrder = ref([]);
-
-const productUnit = ref([]);
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -118,6 +119,20 @@ const selectConfig = computed(() => {
       prop: "type",
       data: outBoundReason.value,
     },
+    {
+      label: "是否已归还",
+      prop: "type",
+      data: [
+        {
+          label: "是",
+          value: "1",
+        },
+        {
+          label: "否",
+          value: "0",
+        },
+      ],
+    },
   ];
 });
 const config = computed(() => {
@@ -142,7 +157,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品编码",
-        prop: "productCode",
+        prop: "productCustomCode",
         width: 160,
       },
     },
@@ -153,21 +168,60 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "规格型号",
+    //     prop: "productSpec",
+    //     width: 160,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 120,
+    //   },
+    //   render(unit) {
+    //     return proxy.dictKeyValue(unit, materialUnitData.value);
+    //   },
+    // },
     {
       attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-        width: 160,
+        label: "关联生产订单",
+        prop: "productCode",
+        width: 150,
+      },
+      render(val) {
+        if (val) {
+          return val;
+        }
+        return "-";
       },
     },
     {
       attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 120,
+        label: "约定归还日期",
+        prop: "expectRestitutionTime",
+        width: 150,
       },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
+      render(val) {
+        if (val) {
+          return val;
+        }
+        return "-";
+      },
+    },
+    {
+      attrs: {
+        label: "实际归还日期",
+        prop: "restitutionTime",
+        width: 150,
+      },
+      render(val) {
+        if (val) {
+          return val;
+        }
+        return "-";
       },
     },
     {
@@ -212,14 +266,11 @@ const getDict = () => {
         label: x.code,
         value: x.id,
       }));
+      produceOrder.value.unshift({
+        label: "无",
+        value: -1,
+      });
     });
-
-  proxy.getDictOne(["unit"]).then((res) => {
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -292,6 +343,7 @@ const formConfig = computed(() => {
       prop: "prodOrderId",
       label: "生产订单",
       data: produceOrder.value,
+      filterable: true,
       itemWidth: 50,
       isShow: ["1", "2", "0"].includes(formData.data.type),
     },

+ 48 - 25
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -27,7 +27,7 @@
                 </template>
               </el-table-column>
               <!-- <el-table-column prop="productUnit" label="单位" width="100" :formatter="
-                  (row) => dictValueLabel(row.productUnit, productUnit)
+                  (row) => dictKeyValue(row.productUnit, materialUnitData)
                 " /> -->
               <el-table-column label="入库数量" width="140">
                 <template #default="{ row, $index }">
@@ -70,10 +70,12 @@ import SelectAllGood from "@/components/product/SelectAllGood";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
-const productUnit = ref([]);
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const inBoundReason = ref([
   {
-    label: "归还入库",
+    label: "借用归还",
     value: "100",
   },
   {
@@ -88,6 +90,14 @@ const inBoundReason = ref([
     label: "丢件寻回",
     value: "103",
   },
+  {
+    label: "超领归还",
+    value: "108",
+  },
+  {
+    label: "错领归还",
+    value: "109",
+  },
 ]);
 const produceOrder = ref([]);
 const lendData = ref([]);
@@ -141,7 +151,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品编码",
-        prop: "productCode",
+        prop: "productCustomCode",
         width: 160,
       },
     },
@@ -152,21 +162,34 @@ const config = computed(() => {
         "min-width": 220,
       },
     },
+    // {
+    //   attrs: {
+    //     label: "规格型号",
+    //     prop: "productSpec",
+    //     width: 160,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 120,
+    //   },
+    //   render(unit) {
+    //     return proxy.dictKeyValue(unit, materialUnitData.value);
+    //   },
+    // },
     {
       attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-        width: 160,
-      },
-    },
-    {
-      attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 120,
+        label: "关联生产订单",
+        prop: "productCode",
+        width: 150,
       },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
+      render(val) {
+        if (val) {
+          return val;
+        }
+        return "-";
       },
     },
     {
@@ -211,6 +234,10 @@ const getDict = () => {
         label: x.code,
         value: x.id,
       }));
+      produceOrder.value.unshift({
+        label: "无",
+        value: -1,
+      });
     });
 
   proxy
@@ -238,13 +265,6 @@ const getDict = () => {
         value: x.id,
       }));
     });
-
-  proxy.getDictOne(["material_unit"]).then((res) => {
-    productUnit.value = res["material_unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -301,7 +321,7 @@ const formConfig = computed(() => {
       required: true,
       data: inBoundReason.value,
       fn: () => {
-        if (["101", "102"].includes(val)) {
+        if (["101", "102", "108", "109"].includes(val)) {
           formData.data.borrowId = "";
           formData.data.loseId = "";
         } else if (val == "103") {
@@ -319,14 +339,16 @@ const formConfig = computed(() => {
       prop: "prodOrderId",
       label: "生产订单",
       data: produceOrder.value,
+      filterable: true,
       itemWidth: 50,
-      isShow: ["101", "102"].includes(formData.data.type),
+      isShow: ["101", "102", "108", "109"].includes(formData.data.type),
     },
     {
       type: "select",
       prop: "borrowId",
       label: "借用出库单",
       data: lendData.value,
+      filterable: true,
       itemWidth: 50,
       isShow: formData.data.type == "100",
     },
@@ -335,6 +357,7 @@ const formConfig = computed(() => {
       prop: "loseId",
       label: "丢件单",
       data: lendDataOne.value,
+      filterable: true,
       itemWidth: 50,
       isShow: formData.data.type == "103",
     },

+ 56 - 57
src/views/purchaseSales/outAndInWarehouse/record/index.vue

@@ -39,17 +39,17 @@
             <td>{{ row.productCode }}</td>
             <td>{{ row.productName }}</td>
             <td>{{ row.productSpec }}</td>
-            <td>{{ dictValueLabel(row.productUnit, productUnit) }}</td>
+            <td>{{ dictKeyValue(row.productUnit, materialUnitData) }}</td>
             <td>{{ row.quantity }}</td>
             <td>
-              <!-- {{ dictValueLabel(printData.currency, currencyType) }} -->
+
               <span v-show="row.price">
                 {{ printData.currency }}
                 {{ row.price }}
               </span>
             </td>
             <td>
-              <!-- {{ dictValueLabel(printData.currency, currencyType) }} -->
+
               <span v-show="row.amount">
                 {{ printData.currency }}
                 {{ row.amount }}
@@ -78,6 +78,9 @@ import { computed, nextTick, ref, toRef } from "vue";
 import byTable from "@/components/byTable/index";
 
 const { proxy } = getCurrentInstance();
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const route = useRoute();
 const opTypeList = ref([
   {
@@ -118,10 +121,10 @@ const typeList = ref([
     label: "采购退货",
     value: "6",
   },
-  {
-    label: "调拨出库",
-    value: "7",
-  },
+  // {
+  //   label: "调拨出库",
+  //   value: "7",
+  // },
   {
     label: "盘亏出库",
     value: "8",
@@ -131,7 +134,7 @@ const typeList = ref([
     value: "9",
   },
   {
-    label: "归还入库",
+    label: "借用归还",
     value: "100",
   },
   {
@@ -150,10 +153,10 @@ const typeList = ref([
     label: "采购入库",
     value: "104",
   },
-  {
-    label: "调拨入库",
-    value: "105",
-  },
+  // {
+  //   label: "调拨入库",
+  //   value: "105",
+  // },
   {
     label: "盘盈入库",
     value: "106",
@@ -162,10 +165,16 @@ const typeList = ref([
     label: "完工入库",
     value: "107",
   },
+  {
+    label: "超领归还",
+    value: "108",
+  },
+  {
+    label: "错领归还",
+    value: "109",
+  },
 ]);
 const warehouseList = ref([]);
-const productUnit = ref([]);
-const currencyType = ref([]);
 const sourceList = ref({
   data: [],
   pagination: {
@@ -227,7 +236,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "物品编码",
-        prop: "productCode",
+        prop: "productCustomCode",
         width: 150,
       },
     },
@@ -244,16 +253,16 @@ const config = computed(() => {
     //     prop: "productSpec",
     //   },
     // },
-    {
-      attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 80,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 80,
+    //   },
+    //   render(unit) {
+    //     return proxy.dictKeyValue(unit, materialUnitData.value);
+    //   },
+    // },
     {
       attrs: {
         label: "操作数量",
@@ -275,28 +284,28 @@ const config = computed(() => {
         width: 160,
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "80",
-        align: "center",
-      },
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "打印",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              handlePrintPdf(row);
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "80",
+    //     align: "center",
+    //   },
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "打印",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           handlePrintPdf(row);
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ];
 });
 const getDict = () => {
@@ -310,16 +319,6 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["unit", "account_currency"]).then((res) => {
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    currencyType.value = res["account_currency"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };

+ 91 - 54
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -26,7 +26,9 @@ import { ElMessage } from "element-plus";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
 const productType = ref([]);
-const productUnit = ref([]);
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const status = ref([
   {
     label: "待出库",
@@ -42,33 +44,73 @@ const status = ref([
   },
 ]);
 const businessType = ref([
+  // {
+  //   label: "线边回仓",
+  //   value: 1,
+  // },
+  // {
+  //   label: "完工入库",
+  //   value: 2,
+  // },
+  // {
+  //   label: "采购到货",
+  //   value: 3,
+  // },
+  // {
+  //   label: "退货出库",
+  //   value: 4,
+  // },
+  // {
+  //   label: "京东订单",
+  //   value: 5,
+  // },
+  // {
+  //   label: "销售订单出库",
+  //   value: 6,
+  // },
+  // {
+  //   label: "生产任务出库",
+  //   value: 7,
+  // },
   {
-    label: "线边回仓",
-    value: 1,
+    label: "生产打样",
+    value: "0",
   },
   {
-    label: "完工入库",
-    value: 2,
+    label: "生产超领",
+    value: "1",
+  },
+  {
+    label: "销售出库",
+    value: "2",
+  },
+  {
+    label: "借用出库",
+    value: "3",
+  },
+  {
+    label: "补单超领",
+    value: "4",
   },
   {
-    label: "采购到货",
-    value: 3,
+    label: "丢件超领",
+    value: "5",
   },
   {
-    label: "退货出库",
-    value: 4,
+    label: "采购退货",
+    value: "6",
   },
   {
-    label: "京东订单",
-    value: 5,
+    label: "调拨出库",
+    value: "7",
   },
   {
-    label: "销售订单出库",
-    value: 6,
+    label: "盘亏出库",
+    value: "8",
   },
   {
-    label: "生产任务出库",
-    value: 7,
+    label: "生产出库",
+    value: "9",
   },
 ]);
 const sourceList = ref({
@@ -79,7 +121,7 @@ const sourceList = ref({
     pageSize: 10,
     keyword: "",
     status: "",
-    type: 2,
+    type: "2",
   },
 });
 const loading = ref(false);
@@ -90,6 +132,11 @@ const selectConfig = computed(() => {
       prop: "status",
       data: status.value,
     },
+    {
+      label: "数据来源",
+      prop: "businessType",
+      data: businessType.value,
+    },
   ];
 });
 const config = computed(() => {
@@ -111,20 +158,20 @@ const config = computed(() => {
         width: 160,
       },
     },
-    {
-      attrs: {
-        label: "物品类型",
-        prop: "productType",
-        width: 120,
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, productType.value);
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "物品类型",
+    //     prop: "productType",
+    //     width: 120,
+    //   },
+    //   render(type) {
+    //     return proxy.dictValueLabel(type, productType.value);
+    //   },
+    // },
     {
       attrs: {
         label: "物品编码",
-        prop: "productCode",
+        prop: "productCustomCode",
         width: 140,
       },
     },
@@ -135,23 +182,23 @@ const config = computed(() => {
         "min-width": 200,
       },
     },
-    {
-      attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 120,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "规格型号",
+    //     prop: "productSpec",
+    //     width: 140,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 120,
+    //   },
+    //   render(unit) {
+    //     return proxy.dictKeyValue(unit, materialUnitData.value);
+    //   },
+    // },
     {
       attrs: {
         label: "待出库数量",
@@ -206,16 +253,6 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["product_type", "unit"]).then((res) => {
-    productType.value = res["product_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };

+ 70 - 52
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -25,8 +25,9 @@ import { ElMessage } from "element-plus";
 
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);
-const productType = ref([]);
-const productUnit = ref([]);
+const materialUnitData = computed(
+  () => proxy.useUserStore().allDict["material_unit"]
+);
 const status = ref([
   {
     label: "待入库",
@@ -42,29 +43,61 @@ const status = ref([
   // },
 ]);
 const businessType = ref([
+  // {
+  //   label: "线边回仓",
+  //   value: 1,
+  // },
+  // {
+  //   label: "完工入库",
+  //   value: 2,
+  // },
+  // {
+  //   label: "采购到货",
+  //   value: 3,
+  // },
+  // {
+  //   label: "退货出库",
+  //   value: 4,
+  // },
+  // {
+  //   label: "京东订单",
+  //   value: 5,
+  // },
+  // {
+  //   label: "销售订单出库",
+  //   value: 6,
+  // },
   {
-    label: "线边回仓",
-    value: 1,
+    label: "借用归还",
+    value: "100",
   },
   {
-    label: "完工入库",
-    value: 2,
+    label: "退料入库",
+    value: "101",
+  },
+  {
+    label: "废料入库",
+    value: "102",
   },
   {
-    label: "采购到货",
-    value: 3,
+    label: "丢件寻回",
+    value: "103",
   },
   {
-    label: "退货出库",
-    value: 4,
+    label: "采购入库",
+    value: "104",
   },
   {
-    label: "京东订单",
-    value: 5,
+    label: "调拨入库",
+    value: "105",
   },
   {
-    label: "销售订单出库",
-    value: 6,
+    label: "盘盈入库",
+    value: "106",
+  },
+  {
+    label: "完工入库",
+    value: "107",
   },
 ]);
 const sourceList = ref({
@@ -86,6 +119,11 @@ const selectConfig = computed(() => {
       prop: "status",
       data: status.value,
     },
+    {
+      label: "数据来源",
+      prop: "businessType",
+      data: businessType.value,
+    },
   ];
 });
 const config = computed(() => {
@@ -109,18 +147,8 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "物品类型",
-        prop: "productType",
-        width: 120,
-      },
-      render(type) {
-        return proxy.dictValueLabel(type, productType.value);
-      },
-    },
-    {
-      attrs: {
         label: "物品编码",
-        prop: "productCode",
+        prop: "productCustomCode",
         width: 140,
       },
     },
@@ -131,23 +159,23 @@ const config = computed(() => {
         "min-width": 200,
       },
     },
-    {
-      attrs: {
-        label: "规格型号",
-        prop: "productSpec",
-        width: 140,
-      },
-    },
-    {
-      attrs: {
-        label: "单位",
-        prop: "productUnit",
-        width: 120,
-      },
-      render(unit) {
-        return proxy.dictValueLabel(unit, productUnit.value);
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "规格型号",
+    //     prop: "productSpec",
+    //     width: 140,
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "单位",
+    //     prop: "productUnit",
+    //     width: 120,
+    //   },
+    //   render(unit) {
+    //     return proxy.dictKeyValue(unit, materialUnitData.value);
+    //   },
+    // },
     {
       attrs: {
         label: "待入库数量",
@@ -202,16 +230,6 @@ const getDict = () => {
       });
     }
   });
-  proxy.getDictOne(["product_type", "unit"]).then((res) => {
-    productType.value = res["product_type"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-    productUnit.value = res["unit"].map((x) => ({
-      label: x.dictValue,
-      value: x.dictKey,
-    }));
-  });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };