Browse Source

备货申请前端代码验证

master_hella_20240701
chenfang 8 months ago
parent
commit
4107a5687b
  1. 10
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue
  2. 10
      src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

10
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue

@ -122,9 +122,12 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
row['containerNumber'] = val[0]['containerNumber'] row['containerNumber'] = val[0]['containerNumber']
row['batch'] = val[0]['batch'] row['batch'] = val[0]['batch']
row['inventoryStatus'] = val[0]['inventoryStatus'] row['inventoryStatus'] = val[0]['inventoryStatus']
row['fromLocationCode'] = val[0]['locationCode']
row['itemCode'] = val[0]['itemCode'] row['itemCode'] = val[0]['itemCode']
row['uom'] = val[0]['uom'] row['uom'] = val[0]['uom']
} else if(formField == 'toLocationCode'){
console.log(row,111);
row['toLocationCode'] = val[0]['code']
}else{ }else{
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
} }
@ -297,7 +300,6 @@ const formRef = ref()
const openForm = (type: string, row?: number) => { const openForm = (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
formRef.value.open(type, row) formRef.value.open(type, row)
} }
/** /**
@ -419,10 +421,10 @@ const submitForm = async (formType, data) => {
formRef.value.formLoading = false formRef.value.formLoading = false
return; return;
} }
await StockupDetailRequestApi.createStockupDetailRequest(data) await StockupMainRequestApi.createStockupMainRequest(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
} else { } else {
await StockupDetailRequestApi.updateStockupDetailRequest(data) await StockupMainRequestApi.updateStockupMainRequest(data)
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
formRef.value.dialogVisible = false formRef.value.dialogVisible = false

10
src/views/wms/deliversettlementManage/stockup/stockupMainRequest/stockupMainRequest.data.ts

@ -458,7 +458,7 @@ export const StockupDetailRequestRules = reactive({
{ required: true, message: '请选择物料代码', trigger: 'change' } { required: true, message: '请选择物料代码', trigger: 'change' }
], ],
toLocationCode : [ toLocationCode : [
{ required: true, message: '请选择计量单位', trigger: 'change' } { required: true, message: '请选择到库代码', trigger: 'change' }
] ]
}) })
@ -518,6 +518,14 @@ export const StockupDetailRequest = useCrudSchemas(reactive<CrudSchema[]>([
field: 'batch', field: 'batch',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
tableForm: {
disabled: true,
},
form: {
componentProps: {
disabled: true
}
}
}, },
{ {
label: '库存状态', label: '库存状态',

Loading…
Cancel
Save