|
|
@ -39,7 +39,7 @@
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
style="width: 100%"
|
|
|
|
style="width: 100%"
|
|
|
|
@change="handleStockType"
|
|
|
|
@change="handleStockType"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || query.type !== 'create'"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || enableHeadNo || activetypetype !== 'create'"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.BIZ_STORAGE_OUT_TYPE)"
|
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.BIZ_STORAGE_OUT_TYPE)"
|
|
|
@ -73,7 +73,7 @@
|
|
|
|
<!-- <el-input v-model="formData.headerNo" class="!w-400px" @click="handleHeaderNo" v-bind:disabled="ctrView || ctrSave || enableHeadNo" /> -->
|
|
|
|
<!-- <el-input v-model="formData.headerNo" class="!w-400px" @click="handleHeaderNo" v-bind:disabled="ctrView || ctrSave || enableHeadNo" /> -->
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
|
class="!w-400px"
|
|
|
|
class="!w-400px"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || enableHeadNo || query.type !== 'create'"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || enableHeadNo || activetype !== 'create'"
|
|
|
|
v-model="formData.headerNo"
|
|
|
|
v-model="formData.headerNo"
|
|
|
|
@click.prevent="handleHeaderNo"
|
|
|
|
@click.prevent="handleHeaderNo"
|
|
|
|
:readonly="!isEditing"
|
|
|
|
:readonly="!isEditing"
|
|
|
@ -82,7 +82,7 @@
|
|
|
|
<template #append
|
|
|
|
<template #append
|
|
|
|
><el-button
|
|
|
|
><el-button
|
|
|
|
v-bind:disabled="
|
|
|
|
v-bind:disabled="
|
|
|
|
ctrView || ctrSave || enableHeadNo || query.type !== 'create'
|
|
|
|
ctrView || ctrSave || enableHeadNo || activetype !== 'create'
|
|
|
|
"
|
|
|
|
"
|
|
|
|
:icon="Search"
|
|
|
|
:icon="Search"
|
|
|
|
@click="handleHeaderNo"
|
|
|
|
@click="handleHeaderNo"
|
|
|
@ -122,7 +122,7 @@
|
|
|
|
clearable
|
|
|
|
clearable
|
|
|
|
class="!w-400px"
|
|
|
|
class="!w-400px"
|
|
|
|
@change="handleWh"
|
|
|
|
@change="handleWh"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || query.type !== 'create'"
|
|
|
|
v-bind:disabled="ctrView || ctrSave || activetype !== 'create'"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in whList"
|
|
|
|
v-for="dict in whList"
|
|
|
@ -152,7 +152,7 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
<!-- 物料信息 -->
|
|
|
|
<!-- 物料信息 -->
|
|
|
|
<el-card class="hl-card-info" :style="{ display: query.type == 'create' ? 'none' : '' }">
|
|
|
|
<el-card class="hl-card-info" :style="{ display: activetype == 'create' ? 'none' : '' }">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">物料信息</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -214,7 +214,7 @@
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
prop="materialType"
|
|
|
|
prop="materialType"
|
|
|
|
label="物料类型"
|
|
|
|
label="物料类型"
|
|
|
|
min-width="150"
|
|
|
|
min-width="170"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
@ -365,7 +365,7 @@
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
prop="materialType"
|
|
|
|
prop="materialType"
|
|
|
|
label="物料类型"
|
|
|
|
label="物料类型"
|
|
|
|
min-width="150"
|
|
|
|
min-width="170"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #default="scope">
|
|
|
|
<template #default="scope">
|
|
|
@ -459,7 +459,7 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
<!-- 附件信息 -->
|
|
|
|
<!-- 附件信息 -->
|
|
|
|
<el-card class="hl-card-info" :style="{ display: query.type == 'create' ? 'none' : '' }">
|
|
|
|
<el-card class="hl-card-info" :style="{ display: activetype == 'create' ? 'none' : '' }">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">附件信息</span>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">附件信息</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -539,7 +539,7 @@
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
</el-card>
|
|
|
|
<!-- 系统信息 -->
|
|
|
|
<!-- 系统信息 -->
|
|
|
|
<el-card class="hl-card-info" :style="{ display: query.type == 'create' ? 'none' : '' }">
|
|
|
|
<el-card class="hl-card-info" :style="{ display: activetype == 'create' ? 'none' : '' }">
|
|
|
|
<template #header>
|
|
|
|
<template #header>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">系统信息</span>
|
|
|
|
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">系统信息</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -590,7 +590,7 @@
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
@click="saveFormDataSUBMIT('SUBMIT', 2)"
|
|
|
|
@click="saveFormDataSUBMIT('SUBMIT', 2)"
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
v-if="btnSave && query.type !== 'create'"
|
|
|
|
v-if="btnSave && activetype !== 'create'"
|
|
|
|
size="large"
|
|
|
|
size="large"
|
|
|
|
>提 交</el-button
|
|
|
|
>提 交</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -636,9 +636,13 @@ import materials from './materials.vue'
|
|
|
|
import materials2 from './materials2.vue'
|
|
|
|
import materials2 from './materials2.vue'
|
|
|
|
import projects from './subproject.vue'
|
|
|
|
import projects from './subproject.vue'
|
|
|
|
import taskdispatchselect from './taskdispatchselect.vue'
|
|
|
|
import taskdispatchselect from './taskdispatchselect.vue'
|
|
|
|
|
|
|
|
import { useCommonStore } from '@/store/modules/common'
|
|
|
|
|
|
|
|
|
|
|
|
const reload: any = inject('reload')
|
|
|
|
const reload: any = inject('reload')
|
|
|
|
|
|
|
|
const commonStore = useCommonStore()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const activetype = toRef(commonStore.getStore('active'))
|
|
|
|
|
|
|
|
const activeId = toRef(commonStore.getStore('id'))
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
const { query } = useRoute()
|
|
|
|
const { query } = useRoute()
|
|
|
@ -862,16 +866,19 @@ const saveFormData = async (active, status, type) => {
|
|
|
|
await formRef.value.validate()
|
|
|
|
await formRef.value.validate()
|
|
|
|
formData.value.active = active
|
|
|
|
formData.value.active = active
|
|
|
|
formData.value.status = status
|
|
|
|
formData.value.status = status
|
|
|
|
|
|
|
|
await initStatus(formData.value.status)
|
|
|
|
// 提交请求
|
|
|
|
// 提交请求
|
|
|
|
formLoading.value = true
|
|
|
|
formLoading.value = true
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const data = formData.value as unknown as StorageApi.StorageVO
|
|
|
|
const data = formData.value as unknown as StorageApi.StorageVO
|
|
|
|
if (query.type === 'create') {
|
|
|
|
if (activetype.value === 'create') {
|
|
|
|
//库存信息保存
|
|
|
|
//库存信息保存
|
|
|
|
formData.value.id = await StorageApi.createStorage(data)
|
|
|
|
formData.value.id = await StorageApi.createStorage(data)
|
|
|
|
commonResult = 'common.createSuccess'
|
|
|
|
commonStore.setStore('active', 'update')
|
|
|
|
query.type = 'update'
|
|
|
|
commonStore.setStore('id', formData.value.id)
|
|
|
|
|
|
|
|
reload()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
await StorageApi.updateStorage(data)
|
|
|
|
await StorageApi.updateStorage(data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var repeatItem = []
|
|
|
|
var repeatItem = []
|
|
|
@ -902,7 +909,7 @@ const saveFormData = async (active, status, type) => {
|
|
|
|
matUploadData.value.businessId = formData.value.id
|
|
|
|
matUploadData.value.businessId = formData.value.id
|
|
|
|
await matUploadRef.value!.submit()
|
|
|
|
await matUploadRef.value!.submit()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
await initStatus(formData.value.status)
|
|
|
|
|
|
|
|
if (type == 'suc') {
|
|
|
|
if (type == 'suc') {
|
|
|
|
commonResult = 'common.updateSuccess'
|
|
|
|
commonResult = 'common.updateSuccess'
|
|
|
|
message.success(t(commonResult))
|
|
|
|
message.success(t(commonResult))
|
|
|
@ -1000,7 +1007,7 @@ const initStatus = async (status) => {
|
|
|
|
break
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 查看页面时可操作控件禁用
|
|
|
|
// 查看页面时可操作控件禁用
|
|
|
|
if (query.type === 'review') {
|
|
|
|
if (activetype === 'review') {
|
|
|
|
ctrView.value = true
|
|
|
|
ctrView.value = true
|
|
|
|
ctrSave.value = true
|
|
|
|
ctrSave.value = true
|
|
|
|
ctrCancel.value = true
|
|
|
|
ctrCancel.value = true
|
|
|
@ -1018,7 +1025,7 @@ const matSimpVirtualList = ref([]) // 物料基本信息列表
|
|
|
|
/** 初始化 **/
|
|
|
|
/** 初始化 **/
|
|
|
|
onMounted(async () => {
|
|
|
|
onMounted(async () => {
|
|
|
|
// 页面标题展示
|
|
|
|
// 页面标题展示
|
|
|
|
dialogTitle.value = query.type === 'review' ? '查看' : t('action.' + query.type)
|
|
|
|
dialogTitle.value = activetype.value === 'review' ? '查看' : t('action.' + activetype.value)
|
|
|
|
|
|
|
|
|
|
|
|
//- 获取仓库全数据
|
|
|
|
//- 获取仓库全数据
|
|
|
|
whList.value = await WarehouseApi.getWarehouseSimpList()
|
|
|
|
whList.value = await WarehouseApi.getWarehouseSimpList()
|
|
|
@ -1030,7 +1037,7 @@ onMounted(async () => {
|
|
|
|
matLastData.value = await StorageMatApi.getStorageMatList(0)
|
|
|
|
matLastData.value = await StorageMatApi.getStorageMatList(0)
|
|
|
|
|
|
|
|
|
|
|
|
// 编辑时获取入库单据信息,包括基础信息、物料信息、附件信息
|
|
|
|
// 编辑时获取入库单据信息,包括基础信息、物料信息、附件信息
|
|
|
|
if (query.id) {
|
|
|
|
if (activeId.value) {
|
|
|
|
// 获取原始物料信息
|
|
|
|
// 获取原始物料信息
|
|
|
|
matSimpList.value = await MaterialApi.getSimpList()
|
|
|
|
matSimpList.value = await MaterialApi.getSimpList()
|
|
|
|
matSimpVirtualList.value = await MaterialApi.getSimpVirtualList()
|
|
|
|
matSimpVirtualList.value = await MaterialApi.getSimpVirtualList()
|
|
|
@ -1038,7 +1045,7 @@ onMounted(async () => {
|
|
|
|
matEditList.value = matSimpList.value //matSimpList.value.filter( mat => matLastData.value.filter( row => row.matId == mat.id).length>0)
|
|
|
|
matEditList.value = matSimpList.value //matSimpList.value.filter( mat => matLastData.value.filter( row => row.matId == mat.id).length>0)
|
|
|
|
|
|
|
|
|
|
|
|
// 获取库存信息
|
|
|
|
// 获取库存信息
|
|
|
|
formData.value = await StorageApi.getStorage(query.id)
|
|
|
|
formData.value = await StorageApi.getStorage(activeId.value)
|
|
|
|
if (formData.value.vmatName) {
|
|
|
|
if (formData.value.vmatName) {
|
|
|
|
matEditList.value = matSimpVirtualList.value
|
|
|
|
matEditList.value = matSimpVirtualList.value
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1050,7 +1057,7 @@ onMounted(async () => {
|
|
|
|
const queryParamsMat = reactive({
|
|
|
|
const queryParamsMat = reactive({
|
|
|
|
pageNo: 1,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 99,
|
|
|
|
pageSize: 99,
|
|
|
|
stockId: query.id,
|
|
|
|
stockId: activeId.value,
|
|
|
|
whId: formData.value.whId
|
|
|
|
whId: formData.value.whId
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const dataMats = await StorageMatApi.getStorageMatPage(queryParamsMat)
|
|
|
|
const dataMats = await StorageMatApi.getStorageMatPage(queryParamsMat)
|
|
|
@ -1060,7 +1067,7 @@ onMounted(async () => {
|
|
|
|
let attParams = {
|
|
|
|
let attParams = {
|
|
|
|
pageNo: 1,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 99,
|
|
|
|
pageSize: 99,
|
|
|
|
businessId: query.id,
|
|
|
|
businessId: activeId.value,
|
|
|
|
businessType: 'STORAGE'
|
|
|
|
businessType: 'STORAGE'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
formData.value.attachments = (await getFilePage(attParams)).list
|
|
|
|
formData.value.attachments = (await getFilePage(attParams)).list
|
|
|
|