diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/storagemat/vo/StorageMatValidRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/storagemat/vo/StorageMatValidRespVO.java
index a2c7aaea..edcee734 100644
--- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/storagemat/vo/StorageMatValidRespVO.java
+++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/storagemat/vo/StorageMatValidRespVO.java
@@ -27,11 +27,13 @@ public class StorageMatValidRespVO {
private String lotNo;
- private String spec;
+ private String matSpec;
- private String unit;
+ private String matUnit;
private String storageOkQty;
+ private String description;
+
}
\ No newline at end of file
diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagemat/StorageMatMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagemat/StorageMatMapper.xml
index 47bb0e92..6b49bac5 100644
--- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagemat/StorageMatMapper.xml
+++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagemat/StorageMatMapper.xml
@@ -16,13 +16,13 @@
-
-
+
+
\ No newline at end of file
diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOut.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOut.vue
index b4268ebd..c0b9a51b 100644
--- a/mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOut.vue
+++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOut.vue
@@ -3,7 +3,8 @@
-
+
@@ -51,7 +52,7 @@
-
+
@@ -62,7 +63,8 @@
-
+
@@ -95,7 +97,7 @@
v-loading="subFormLoading" label-width="0">
-
+
-
+
-
+
@@ -141,7 +143,7 @@
-
+
@@ -163,7 +165,8 @@
复制 -->
-
+
删除
@@ -465,28 +468,31 @@ const submitForm = async () => {
var matCount = 1
const onAddItem = () => {
- const newData = {
- // 新数据的属性
- cid: matCount,
- stockId: 0,
- matId: '',
- matName: '',
- matCode: '',
- matType: '',
- matSpec: '',
- matUnit: '',
- whId: '',
- rgId: '',
- pnId: '',
- pnlist: ref([]),
- storageOkQty: '',
- lotNo: '',
- description: '',
- productBomItemValueDOList: []
+ if (formData.value.whId) {
+ const newData = {
+ // 新数据的属性
+ cid: matCount,
+ stockId: 0,
+ matId: '',
+ matName: '',
+ matCode: '',
+ matType: '',
+ matSpec: '',
+ matUnit: '',
+ whId: '',
+ rgId: '',
+ pnId: '',
+ pnlist: ref([]),
+ storageOkQty: '',
+ lotNo: '',
+ description: '',
+ productBomItemValueDOList: []
+ }
+ matCount = matCount + 1
+ formData.value.matItemDOList.push(newData)
+ } else {
+ message.alertWarning('清选择出库仓库')
}
- matCount = matCount + 1
- formData.value.matItemDOList.push(newData)
-
}
//删除新增物料信息
@@ -550,7 +556,7 @@ 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 ) !== undefined)
+ matList.value = dataMat.list.filter((item) => matLastRemoteData.find((fish) => fish.matId === item.id) !== undefined)
matSelectLoading.value = false
}
@@ -558,20 +564,28 @@ const remoteMatCodeSearch = async (name) => {
const handleMatCode = async (scope, matid) => {
if (matid) {
- const matVo = await MaterialApi.getMaterial(scope.row.matId)
- scope.row.matId = matVo.id
- scope.row.matName = matVo.name
- scope.row.matCode = matVo.code
- scope.row.matSpec = matVo.spec
+ const matVo = matLastData.value.find((item) => item.matId === matid)
+ scope.row.matId = matVo.matId
+ scope.row.matName = matVo.matName
+ scope.row.matCode = matVo.matCode
+ scope.row.matSpec = matVo.matSpec
scope.row.matType = matVo.materialType
- scope.row.matUnit = matVo.unit
+ scope.row.matUnit = matVo.matUnit
+ scope.row.rgId = matVo.rgId
+ scope.row.pnId = matVo.pnId
+ scope.row.matRest = matVo.matRest
+ scope.row.lotNo = matVo.lotNo
+
+ const queryParamsRPn = reactive({
+ pageNo: 1,
+ pageSize: 99,
+ rgId: scope.row.rgId,
+ pnStatus: 1
+ })
+ const dataPn = await PnApi.getPnPage(queryParamsRPn)
+ scope.row.pnlist = dataPn.list
} else {
- scope.row.matId = ''
- scope.row.matCode = ''
- scope.row.matName = ''
- scope.row.matSpec = ''
- scope.row.matType = ''
- scope.row.matUnit = ''
+ scope.row = matLastData.value.find((item) => item.matId === matid)
}
}
@@ -579,12 +593,13 @@ const isShowBtnGroup = ref(true)
const isShowBtnCancel = ref(false)
const isShowBtnOther = ref(false)
const btnWhClickable = ref(false)
+const matLastData = ref([])
/** 初始化 **/
onMounted(async () => {
- btnWhClickable.value = query.type === 'update'?true:false
+ btnWhClickable.value = query.type === 'update' ? true : false
- const matLastData = await StorageMatApi.getStorageMatList()
+ matLastData.value = await StorageMatApi.getStorageMatList()
// 获得物料列表
let matParams = {
@@ -626,10 +641,10 @@ onMounted(async () => {
break
}
//查看页面不可以编辑
- if(query.type === 'review'){
- isShowBtnGroup.value = false;
- isShowBtnCancel.value = false;
- isShowBtnOther.value = true;
+ if (query.type === 'review') {
+ isShowBtnGroup.value = false;
+ isShowBtnCancel.value = false;
+ isShowBtnOther.value = true;
}
//获得库区列表
@@ -671,15 +686,21 @@ onMounted(async () => {
const matVos = await MaterialApi.getMaterialPage(queryParamsMat2)
formData.value.matItemDOList.forEach(item => {
- item.cid = matCount
- item.matId = matVos.list.find((record) => record.id === item.matId)?.id
- //item.matCode = matVos.list.find( (record) => record.id === item.matId)?.id
- item.matCode = matVos.list.find((record) => record.id === item.matId)?.code
- item.matSpec = matVos.list.find((record) => record.id === item.matId)?.spec
- item.matType = matVos.list.find((record) => record.id === item.matId)?.materialType
- item.matUnit = matVos.list.find((record) => record.id === item.matId)?.unit
+ // item.cid = matCount
+ // item.matId = matVos.list.find((record) => record.id === item.matId)?.id
+ // //item.matCode = matVos.list.find( (record) => record.id === item.matId)?.id
+ // item.matCode = matVos.list.find((record) => record.id === item.matId)?.code
+ // item.matSpec = matVos.list.find((record) => record.id === item.matId)?.spec
+ // item.matType = matVos.list.find((record) => record.id === item.matId)?.materialType
+ // item.matUnit = matVos.list.find((record) => record.id === item.matId)?.unit
+ // item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
+ // item.matRest = matLastData.value.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)?.matRest
+ // matCount = matCount + 1
+
+
+ item = matLastData.value.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)
item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
- item.matRest = matLastData.find((rest) => rest.rgId === item.rgId && rest.pnId === item.pnId)?.matRest
+ item.cid = matCount
matCount = matCount + 1
})