|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
<template #header>
|
|
|
|
|
<span v-text="dialogTitle"></span>
|
|
|
|
|
</template>
|
|
|
|
|
<div class="hl-card-scrollable-content">
|
|
|
|
|
<el-form
|
|
|
|
|
ref="formRef"
|
|
|
|
|
:model="formData"
|
|
|
|
@ -167,7 +168,12 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="matCode"
|
|
|
|
|
label="物料编码"
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag
|
|
|
|
@ -177,7 +183,12 @@
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="matSpec"
|
|
|
|
|
label="规格/型号"
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<el-table-column prop="matUnit" label="系统单位" min-width="120" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
@ -232,7 +243,12 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="matRest" label="库存数量" min-width="120" align="center" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="matRest"
|
|
|
|
|
label="库存数量"
|
|
|
|
|
min-width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column prop="storageOkQty" min-width="120" align="center">
|
|
|
|
|
<template #header> <span class="hl-table_header">*</span>出库数量</template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
@ -392,6 +408,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-center hl-footer">
|
|
|
|
|
<el-button @click="() => router.go(-1)" size="large">取 消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
@ -489,10 +506,9 @@ const subFormRules = reactive({
|
|
|
|
|
storageOkQty: [{ required: true, message: '出库数量不能为空', trigger: 'blur' }]
|
|
|
|
|
})
|
|
|
|
|
const handleStatus = async (num) => {
|
|
|
|
|
|
|
|
|
|
// 校验表单
|
|
|
|
|
await formRef.value.validate()
|
|
|
|
|
if(formData.value.matItemDOList.length === 0){
|
|
|
|
|
if (formData.value.matItemDOList.length === 0) {
|
|
|
|
|
message.alertWarning('请添加物料信息!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -547,7 +563,7 @@ const handleStatus = async (num) => {
|
|
|
|
|
isShowBtnDelete.value = false
|
|
|
|
|
}
|
|
|
|
|
query.id = storageid.value
|
|
|
|
|
query.type= 'update'
|
|
|
|
|
query.type = 'update'
|
|
|
|
|
reload()
|
|
|
|
|
}
|
|
|
|
|
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
|
|
|
@ -611,7 +627,7 @@ var commonResult = ''
|
|
|
|
|
/** 提交表单 */
|
|
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
|
|
|
|
|
|
|
|
const saveFormData = async () =>{
|
|
|
|
|
const saveFormData = async () => {
|
|
|
|
|
//获取最新库存信息
|
|
|
|
|
const matCurrentData = await StorageMatApi.getStorageMatList()
|
|
|
|
|
var hasRestNum = true
|
|
|
|
@ -660,9 +676,6 @@ const saveFormData = async () =>{
|
|
|
|
|
}
|
|
|
|
|
formData.value = await StorageApi.getStorage(storageid.value)
|
|
|
|
|
message.success(t(commonResult))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
formLoading.value = false
|
|
|
|
|
}
|
|
|
|
@ -670,7 +683,7 @@ const saveFormData = async () =>{
|
|
|
|
|
const submitForm = async () => {
|
|
|
|
|
// 校验表单
|
|
|
|
|
await formRef.value.validate()
|
|
|
|
|
if(formData.value.matItemDOList.length === 0){
|
|
|
|
|
if (formData.value.matItemDOList.length === 0) {
|
|
|
|
|
message.alertWarning('请添加物料信息!')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -684,7 +697,7 @@ const submitForm = async () => {
|
|
|
|
|
await saveFormData()
|
|
|
|
|
// 成功后刷新
|
|
|
|
|
query.id = storageid.value
|
|
|
|
|
query.type= 'update'
|
|
|
|
|
query.type = 'update'
|
|
|
|
|
reload()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -712,7 +725,6 @@ const onAddItem = () => {
|
|
|
|
|
}
|
|
|
|
|
matCount = matCount + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formData.value.matItemDOList.push(newData)
|
|
|
|
|
} else {
|
|
|
|
|
message.alertWarning('请选择出库仓库')
|
|
|
|
@ -748,11 +760,14 @@ const handleWh = async (wid) => {
|
|
|
|
|
let matParams = {
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: 99,
|
|
|
|
|
status: "1"
|
|
|
|
|
status: '1'
|
|
|
|
|
}
|
|
|
|
|
const dataMat = await MaterialApi.getMaterialPage(matParams)
|
|
|
|
|
matList.value = []
|
|
|
|
|
matList.value = dataMat.list.filter((item) => matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == wid) !== undefined)
|
|
|
|
|
matList.value = dataMat.list.filter(
|
|
|
|
|
(item) =>
|
|
|
|
|
matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == wid) !== undefined
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
formData.value.matItemDOList = []
|
|
|
|
|
// formData.value.matItemDOList.forEach(item => {
|
|
|
|
@ -792,7 +807,12 @@ const remoteMatCodeSearch = async (name) => {
|
|
|
|
|
|
|
|
|
|
const dataMat = await MaterialApi.getMaterialPage(matParams)
|
|
|
|
|
matList.value = []
|
|
|
|
|
matList.value = dataMat.list.filter((item) => matLastRemoteData.find((fish) => fish.matId === item.id && fish.whId == formData.value.whId) !== undefined)
|
|
|
|
|
matList.value = dataMat.list.filter(
|
|
|
|
|
(item) =>
|
|
|
|
|
matLastRemoteData.find(
|
|
|
|
|
(fish) => fish.matId === item.id && fish.whId == formData.value.whId
|
|
|
|
|
) !== undefined
|
|
|
|
|
)
|
|
|
|
|
matSelectLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -862,8 +882,6 @@ onMounted(async () => {
|
|
|
|
|
dialogTitle.value = t('action.' + query.type)
|
|
|
|
|
dialogTitle.value = query.type === 'review' ? '查看' : dialogTitle.value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------仓库全数据
|
|
|
|
|
const data = await WarehouseApi.getWarehouseSimpList()
|
|
|
|
|
warehouseList.value = data
|
|
|
|
|