Browse Source

YT-427:预生产收货、制品收货、隔离收货在提交的时候校验物料不能重复

intex_online20241111
songguoqiang 1 month ago
parent
commit
14b1548b29
  1. 8
      src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue
  2. 6
      src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue
  3. 6
      src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

8
src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue

@ -740,6 +740,14 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = false
return
}
const itemCodeCodes = data.subList.map(item => item.itemCode); // code
const hasDuplicates = itemCodeCodes.some((code, index) => itemCodeCodes.indexOf(code) !== index);//itemCode
if (hasDuplicates) {
message.warning('物料不能重复')
formRef.value.formLoading = false
return
}
formRef.value.formLoading = true
try {
if (formType === 'create') {

6
src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue

@ -638,6 +638,12 @@ const submitForm = async (formType, submitData) => {
message.warning('数量必须大于0')
return
}
const itemCodeCodes = data.subList.map(item => item.itemCode); // code
const hasDuplicates = itemCodeCodes.some((code, index) => itemCodeCodes.indexOf(code) !== index);//itemCode
if (hasDuplicates) {
message.warning('物料不能重复')
return
}
formRef.value.formLoading = true
try {
if (formType === 'create') {

6
src/views/wms/productionManage/productredress/productredressRequestMain/index.vue

@ -455,6 +455,12 @@ const submitForm = async (formType, submitData) => {
formRef.value.formLoading = false
return
}
const itemCodeCodes = data.subList.map(item => item.itemCode); // code
const hasDuplicates = itemCodeCodes.some((code, index) => itemCodeCodes.indexOf(code) !== index);//itemCode
if (hasDuplicates) {
message.warning('物料不能重复')
return
}
formRef.value.formLoading = true
try {
if (formType === 'create') {

Loading…
Cancel
Save