|
@@ -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",
|
|
|
},
|