食堂进销
This commit is contained in:
1 parent
971fe011cc
commit
c8fc7b04a5
2 files changed
+16
-11
No files matched your search
@@ -183,14 +183,20 @@ const getInitData = async () => {
|
||||
baseForm.id = undefined
|
||||
const id = props.formId
|
||||
if (id) {
|
||||
// loading.value = true
|
||||
// // 获取清单数据
|
||||
// const [cgPlanData] = await Promise.allSettled([getObj(id)])
|
||||
// .then((results) => results.map((result) => (result.status === "fulfilled" ? result.value : null)))
|
||||
// .finally(() => (loading.value = false))
|
||||
// if (cgPlanData && cgPlanData.code === 0) {
|
||||
// Object.assign(baseForm, cgPlanData.data)
|
||||
// }
|
||||
loading.value = true
|
||||
// 获取清单数据
|
||||
const [res] = await Promise.allSettled([getObj(id)])
|
||||
.then((results) => results.map((result) => (result.status === "fulfilled" ? result.value : null)))
|
||||
.finally(() => (loading.value = false))
|
||||
if (res && res.code == 0) {
|
||||
Object.assign(baseForm, res.data, { items: "" })
|
||||
state.itemTableForm = res.data.items.map((item: any) => ({
|
||||
...item,
|
||||
realPrice: displayPrice(item.realPrice, ""),
|
||||
totalAmount: displayPrice(item.totalNumber, ""),
|
||||
unitPrice: displayPrice(item.unitPrice, ""),
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
loading.value = true
|
||||
// 获取采购入库编号
|
||||
@@ -260,7 +266,6 @@ const tableFormItems = () => {
|
||||
totalAmount: storePrice((Number(item.quantity || 0) * Number(item.realPrice || 0)).toFixed(2)),
|
||||
stock: item.stock,
|
||||
remark: item.remark,
|
||||
orderType: 1,
|
||||
totalNumber: item.totalNumber,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="inventoryCode" label="单据编号" show-overflow-tooltip />
|
||||
<el-table-column prop="inventoryDate" label="单据日期" show-overflow-tooltip />
|
||||
<el-table-column prop="productName" label="商品" show-overflow-tooltip />
|
||||
<el-table-column prop="productName" label="商品" show-overflow-tooltip />
|
||||
<el-table-column prop="handlerUserName" label="经办人" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="checkStatus" label="审批状态" show-overflow-tooltip /> -->
|
||||
<!-- <el-table-column prop="checkUserId" label="审批人id" show-overflow-tooltip /> -->
|
||||
@@ -174,6 +174,6 @@ const handleDelete = async (ids: string[]) => {
|
||||
const formClose = () => {
|
||||
formState.showForm = false
|
||||
formState.formId = undefined
|
||||
fetchList()
|
||||
getDataList()
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user