Browse Source

YT-588物料隔离变更

intex_online20241111
zhaoyiran 3 weeks ago
parent
commit
7b0a71310a
  1. 7
      src/api/wms/inventorymoveRequestDetail/index.ts
  2. 10
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue
  3. 15
      src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

7
src/api/wms/inventorymoveRequestDetail/index.ts

@ -22,12 +22,13 @@ export interface InventorymoveRequestDetailVO {
itemDesc2: string
projectCode: string
qty: number
inventoryQty: number
uom: string
updateTime: Date
updater: string
itemCode: string
}
const message = useMessage() // 消息弹窗
// 查询库存转移申请子列表
export const getInventorymoveRequestDetailPage = async (params) => {
if (params.isSearch) {
@ -51,6 +52,10 @@ export const createInventorymoveRequestDetail = async (data: InventorymoveReques
// 修改库存转移申请子
export const updateInventorymoveRequestDetail = async (data: InventorymoveRequestDetailVO) => {
if(parseFloat(data.inventoryQty) < parseFloat(data.qty)){
message.warning("数量不能大于库存数量")
return
}
return await request.put({ url: `/wms/inventorymove-request-detail/update`, data })
}

10
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue

@ -332,7 +332,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['fromContainerNumber'] = item['containerNumber']
newRow['itemCode'] = item['itemCode']
newRow['fromBatch'] = item['batch']
newRow['inventoryQty'] = item['qty']
//
await ruleApi.getManagementPrecision({
itemCodes: [item['itemCode']],
@ -704,6 +705,13 @@ const submitForm = async (formType, submitData) => {
return
}
data.subList = tableData.value //
const cmdExists = data.subList.some(filter =>
parseFloat(filter.inventoryQty) < parseFloat(filter.qty)
);
if(cmdExists){
message.warning("数量不能大于库存数量")
return
}
let isExist = false
tableData.value.forEach(item => {
item['toLocationCode'] = toLocationCode

15
src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/inventorymoveRequestMain.data.ts

@ -1230,6 +1230,21 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
// isTableForm: false,
// isForm: false,
// },
{
label: '库存数量 ',
field: 'inventoryQty',
sort: 'custom',
isSearch: false,
isTable: false,
tableForm: {
disabled: true
},
form:{
componentProps:{
disabled:true
}
}
},
{
label: '数量',
field: 'qty',

Loading…
Cancel
Save