Browse Source

维修备件收货申请添加直接生成记录字段,收货数量不可以大于订单数量

hella_online_20240823
zhang_li 3 months ago
parent
commit
256aea309b
  1. 4
      src/locales/en-US.ts
  2. 3
      src/locales/zh-CN.ts
  3. 8
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue
  4. 5
      src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

4
src/locales/en-US.ts

@ -1280,8 +1280,8 @@ export default {
:'Rule configuration',
:'Please enter a contact number',
:'Please enter a name',
'确认撤销报工吗?':'Are you sure to cancel the job application?',
'确认撤销报工吗?': 'Are you sure to cancel the job application?',
'收货数量不可以大于订单数量!': 'The received quantity cannot exceed the order quantity'
},

3
src/locales/zh-CN.ts

@ -1276,7 +1276,8 @@ export default {
:'规则配置',
:'请输入联系电话',
:'请选择范围',
'确认撤销报工吗?':"确认撤销报工吗?",
'确认撤销报工吗?': "确认撤销报工吗?",
'收货数量不可以大于订单数量!':'收货数量不可以大于订单数量'
},
}

8
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue

@ -238,6 +238,7 @@ const updateTableData = (tableList)=>{
newRow['uom'] = row['uom']
newRow['poNumber'] =row['number']
newRow['supplierCode'] =row['supplierCode']
newRow['qty'] =row['orderQty']
//
newRow['produceDate'] = dayjs().valueOf()
newRow['arriveDate'] = dayjs().valueOf()
@ -600,6 +601,13 @@ const submitForm = async (formType, submitData) => {
if(data.masterId){
data.id = data.masterId
}
let isThen = tableData.value.some(item => {
return parseFloat(item.qty) > parseFloat(item.orderQty)
})
if(isThen){
message.error(t('ts.收货数量不可以大于订单数量!'))
return;
}
data.subList = tableData.value //
formRef.value.formLoading = true
try {

5
src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/sparereceiptRequestMain.data.ts

@ -18,7 +18,7 @@ const { t } = useI18n() // 国际化
const queryParams = {
pageSize:10,
pageNo:1,
code:'PurchaseReceiptRequest'
code:'PurchaseReceiptSpareRequest'
}
const data = await getRequestsettingApi.getRequestsettingPage(queryParams)
const requestsettingData =data?.list[0]||{}
@ -465,7 +465,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
field: 'directCreateRecord',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isForm: false,
isForm: true,
isTable: false,
sort: 'custom',
table: {
@ -477,7 +477,6 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE',
disabled: true,
}
}
},

Loading…
Cancel
Save