Browse Source

要货计划创建发货:超发的默认为0 让供应商手动填写 不超发的默认发货数量,点击报错的时候明细所有的数据都应该大于0

intex_online20250327
张立 7 days ago
parent
commit
8f9c16120e
  1. 1
      src/locales/en-US.ts
  2. 1
      src/locales/zh-CN.ts
  3. 30
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

1
src/locales/en-US.ts

@ -1325,6 +1325,7 @@ export default {
退:'Return',
: 'Invalid successfully',
'索赔金额不能为0,请修改后提交。': 'The claim amount cannot be 0, please modify and submit.',
'发货数量必须大于0': 'The shipment quantity must be greater than 0',
: 'Create Shift',
:'More',
:'Batch retry',

1
src/locales/zh-CN.ts

@ -1324,6 +1324,7 @@ export default {
:'作废成功',
退: '退回',
'索赔金额不能为0,请修改后提交。': '索赔金额不能为0,请修改后提交。',
'发货数量必须大于0': '发货数量必须大于0',
:'新增班次',
:'更多',
:'批量重试',

30
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -312,8 +312,11 @@ const getSearchTableData = async (number,formField,searchField,isAll)=>{
let produceDateStr = formatDate(newRow['produceDate'],'YYYYMMDD');
newRow['batch'] = produceDateStr
newRow['supplierBatch'] = produceDateStr
newRow.expireDate = row['expireTime']?addDay(newRow['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf()
newRow.expireDate = row['expireTime'] ? addDay(newRow['produceDate'], row['expireTime']).valueOf() : dayjs('2099-12-31').valueOf()
//
if (newRow['allowOverShipment'] == 'TRUE') {
newRow['qty'] =0
}
tableData.value.push(newRow)
itemCodes.push(row['itemCode'])
})
@ -356,9 +359,9 @@ const submitForm = async (formType, submitData) => {
// data.subList = tableData.value //
data.subList = []
for (let item of tableData.value) {
if(item.qty>0){
// if(item.qty>0){
data.subList.push(item) //
}
// }
}
let isHave = data.subList.some((item) => {
@ -374,6 +377,9 @@ const submitForm = async (formType, submitData) => {
// 2.2. -
let itemCodes = []
let itemCodeSum = []
// 2.3 0
let itemCodesQtyIsZ = []
console.log(222, data.subList)
data.subList.forEach(item=>{
if(item['allowOverShipment']!='TRUE'){
let qtyDefault = item['planQty'] - item['shippedQty']
@ -395,7 +401,23 @@ const submitForm = async (formType, submitData) => {
}
}
}
console.log(item['qty'])
if(!item['qty']||item['qty']==0){
itemCodesQtyIsZ.push({
itemCode:item['itemCode'],
poLine:item['poLine']
})
}
})
if(itemCodesQtyIsZ.length>0){
let str = ''
itemCodesQtyIsZ.forEach(cur => {
str += `【物料号${cur.itemCode}-订单行${cur.poLine}`
})
message.error(`${str}${t('ts.发货数量必须大于0')}`)
return
}
return
if(itemCodes.length>0){
let str = ''
itemCodes.forEach(cur => {

Loading…
Cancel
Save