|
|
|
@ -92,35 +92,16 @@
|
|
|
|
|
<el-col>
|
|
|
|
|
<el-card class="hl-incard">
|
|
|
|
|
<el-col>
|
|
|
|
|
<el-button class="hl-addbutton" type="primary" size="large" v-bind:disabled="ctrView || ctrSave" @click="openMatForm">获取物料</el-button>
|
|
|
|
|
<el-button class="hl-addbutton" type="primary" size="large" v-if="formData.checkType==1" v-bind:disabled="ctrView || ctrSave" @click="openMatForm">获取物料</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-form ref="matSubFormRef" :model="formData.matItemDOList" :rules="subFormRules" v-loading="subFormLoading" label-width="0">
|
|
|
|
|
<el-table :data="formData.matItemDOList" class="hl-table">
|
|
|
|
|
<el-table border :data="formData.matItemDOList" class="hl-table">
|
|
|
|
|
<el-table-column prop="cid" label="序号" :width="80" />
|
|
|
|
|
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" />
|
|
|
|
|
<el-table-column prop="matName" label="物料名称" min-width="140" align="center" />
|
|
|
|
|
<el-table-column prop="matType" label="物料类型" min-width="120" align="center" />
|
|
|
|
|
<el-table-column prop="shortName" label="物料简称" min-width="120" align="center" />
|
|
|
|
|
<el-table-column prop="matSpec" label="规格/型号" min-width="120" align="center" />
|
|
|
|
|
<!-- <el-table-column prop="matBrand" label="品牌" min-width="120" align="center" /> -->
|
|
|
|
|
<!-- <el-table-column prop="rgId" min-width="140" align="center">
|
|
|
|
|
<template #header> <span class="hl-table_header">*</span>库区 </template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-form-item :prop="`${scope.$index}.rgId`" :rules="subFormRules.rgId" class="mb-0px!">
|
|
|
|
|
|
|
|
|
|
<RgSelect v-model="scope.row.rgId" v-bind:disabled="ctrView || ctrSave" :anotherProp="formData.whId" @update:newValue="handleSelectedrg(scope.$index, $event)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="pnId" min-width="180" align="center">
|
|
|
|
|
<template #header> <span class="hl-table_header">*</span>库位 </template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-form-item :prop="`${scope.$index}.pnId`" :rules="subFormRules.pnId" class="mb-0px!">
|
|
|
|
|
|
|
|
|
|
<PnSelect v-model="scope.row.pnId" v-bind:disabled="ctrView || ctrSave" :anotherProp="formData.matItemDOList[scope.$index].rgId" @update:newValue="handleSelectedpn(scope.$index, $event)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<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>
|
|
|
|
@ -145,7 +126,7 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="matUnit" label="库存单位" min-width="120" align="center" />
|
|
|
|
|
<el-table-column label="操作" align="center" width="240">
|
|
|
|
|
<template #default="scope" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button link type="danger" size="small" @click.prevent="handleDelete2(scope.$index)" v-bind:disabled="ctrView || ctrDelete" v-if="scope.row.isCopy==1">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
@ -400,6 +381,7 @@ const getList = async (arrMat) => {
|
|
|
|
|
row.pnId = ''
|
|
|
|
|
row.matRest = 0
|
|
|
|
|
}
|
|
|
|
|
row.id = 0
|
|
|
|
|
formData.value.matItemDOList.push(row)
|
|
|
|
|
matCount = matCount + 1
|
|
|
|
|
}
|
|
|
|
@ -416,6 +398,7 @@ const handleCopy = (index, item) => {
|
|
|
|
|
isCopy: 1,
|
|
|
|
|
cid: matCount
|
|
|
|
|
}
|
|
|
|
|
newData.id = 0
|
|
|
|
|
// 添加新数据
|
|
|
|
|
formData.value.matItemDOList.splice(index + 1, 0, newData)
|
|
|
|
|
matCount = matCount + 1
|
|
|
|
@ -738,9 +721,13 @@ onMounted(async () => {
|
|
|
|
|
await init_page_wh()
|
|
|
|
|
await init_page_rg()
|
|
|
|
|
await init_page_pn()
|
|
|
|
|
|
|
|
|
|
const dataCheckMats = await CheckMatApi.getStorageCheckListByCheckID(query.id)
|
|
|
|
|
formData.value.matItemDOList = dataCheckMats
|
|
|
|
|
subFormLoading.value = true
|
|
|
|
|
try {
|
|
|
|
|
const dataCheckMats = await CheckMatApi.getStorageCheckListByCheckID(query.id)
|
|
|
|
|
formData.value.matItemDOList = dataCheckMats
|
|
|
|
|
} finally {
|
|
|
|
|
subFormLoading.value = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (formData.value.matItemDOList == undefined) {
|
|
|
|
|
formData.value.matItemDOList = []
|
|
|
|
@ -779,14 +766,6 @@ onMounted(async () => {
|
|
|
|
|
userList.value = await UserApi.getSimpleUserList()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//接收库区传递的数据
|
|
|
|
|
const handleSelectedrg = (currentIndex: number, newValue: any) => {
|
|
|
|
|
formData.value.matItemDOList[currentIndex].rgId = newValue?.id
|
|
|
|
|
}
|
|
|
|
|
//接收库区传递的数据
|
|
|
|
|
const handleSelectedpn= (currentIndex: number, newValue: any) => {
|
|
|
|
|
formData.value.matItemDOList[currentIndex].pnId = newValue?.id
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
a {
|
|
|
|
|