|
@@ -115,11 +115,6 @@
|
|
|
<div v-if="row.itemSku.barcode">条码:{{row.itemSku.barcode}}</div>
|
|
<div v-if="row.itemSku.barcode">条码:{{row.itemSku.barcode}}</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="单位">
|
|
|
|
|
- <template #default="scope">
|
|
|
|
|
- {{ scope.row.item.unit }}
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
<el-table-column label="数量" prop="quantity" width="180">
|
|
<el-table-column label="数量" prop="quantity" width="180">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-input-number
|
|
<el-input-number
|
|
@@ -131,6 +126,13 @@
|
|
|
></el-input-number>
|
|
></el-input-number>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column label="单位">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-select v-model="scope.row.unit">
|
|
|
|
|
+ <el-option v-for="item in scope.row.unitList" :value="item.value" :label="item.label" ></el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="金额" prop="amount" width="180">
|
|
<el-table-column label="金额" prop="amount" width="180">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-input-number
|
|
<el-input-number
|
|
@@ -188,6 +190,7 @@ import {getWarehouseAndSkuKey} from "@/utils/wmsUtil";
|
|
|
|
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
const {proxy} = getCurrentInstance();
|
|
|
const { wms_receipt_type } = proxy.useDict("wms_receipt_type");
|
|
const { wms_receipt_type } = proxy.useDict("wms_receipt_type");
|
|
|
|
|
+const { conventional_units } = proxy.useDict('conventional_units')
|
|
|
const selectedSku = ref([])
|
|
const selectedSku = ref([])
|
|
|
const mode = ref(false)
|
|
const mode = ref(false)
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -227,6 +230,13 @@ const data = reactive({
|
|
|
});
|
|
});
|
|
|
const { form, rules} = toRefs(data);
|
|
const { form, rules} = toRefs(data);
|
|
|
|
|
|
|
|
|
|
+const changeUnit = (unit) => {
|
|
|
|
|
+ let list = []
|
|
|
|
|
+ let type = conventional_units.value.filter(item => item.value === unit)
|
|
|
|
|
+ list = conventional_units.value.filter(item => item.remark === type?.[0]?.remark)
|
|
|
|
|
+ return list
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const cancel = async () => {
|
|
const cancel = async () => {
|
|
|
await proxy?.$modal.confirm('确认取消编辑入库单吗?');
|
|
await proxy?.$modal.confirm('确认取消编辑入库单吗?');
|
|
|
close()
|
|
close()
|
|
@@ -254,7 +264,8 @@ const handleOkClick = (item) => {
|
|
|
item: it.item,
|
|
item: it.item,
|
|
|
amount: undefined,
|
|
amount: undefined,
|
|
|
quantity: it.quantity,
|
|
quantity: it.quantity,
|
|
|
- warehouseId: form.value.warehouseId
|
|
|
|
|
|
|
+ warehouseId: form.value.warehouseId,
|
|
|
|
|
+ unitList: changeUnit(it.itemSku.unit)
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
@@ -280,6 +291,7 @@ const getParamsBeforeSave = (orderStatus) => {
|
|
|
amount: it.amount,
|
|
amount: it.amount,
|
|
|
quantity: it.quantity,
|
|
quantity: it.quantity,
|
|
|
warehouseId: form.value.warehouseId,
|
|
warehouseId: form.value.warehouseId,
|
|
|
|
|
+ unit: it.unit
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -387,6 +399,9 @@ const loadDetail = (id) => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
getReceiptOrder(id).then((response) => {
|
|
getReceiptOrder(id).then((response) => {
|
|
|
form.value = {...response.data}
|
|
form.value = {...response.data}
|
|
|
|
|
+ form.value.details.forEach(item => {
|
|
|
|
|
+ item.unitList = item.itemSku.unit?changeUnit(item.itemSku.unit): conventional_units.value
|
|
|
|
|
+ })
|
|
|
if (response.data.details?.length) {
|
|
if (response.data.details?.length) {
|
|
|
selectedSku.value = response.data.details.map(it => {
|
|
selectedSku.value = response.data.details.map(it => {
|
|
|
return {
|
|
return {
|