Browse Source

HL-5657结算出库 根据订单行的数量做校验(目前存在问题在于订单行数量已经满足了,但还能创建申请,容易产生迷惑性)

hella_online_20240828
wangyufei 3 months ago
parent
commit
87e657307d
  1. 22
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue
  2. 9
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

22
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -61,6 +61,7 @@
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @submitForm="submitForm"
:isShowButton = isShowButton :isShowButton = isShowButton
@inputNumberChange="inputNumberChange"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -128,6 +129,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['itemCode'] = item['itemCode'] newRow['itemCode'] = item['itemCode']
newRow['projectCode'] = item['projectCode'] newRow['projectCode'] = item['projectCode']
newRow['uom'] = item['uom'] newRow['uom'] = item['uom']
newRow['subSettleQty'] = item['subSettleQty']
tableData.value.push(newRow) tableData.value.push(newRow)
}) })
@ -355,13 +357,31 @@ const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row) basicFormRef.value.open(type, row)
} }
const inputNumberChange = (field, val,row, index) => {
if(field=='qty'){
if(row['subSettleQty']&&row['qty']>row['subSettleQty']){
message.error(`物料${row['itemCode']}最大数量为${row['subSettleQty']}`)
}
}
console.log('inputNumberChange',field, val,row, index)
}
// //
const submitForm = async (formType, submitData) => { const submitForm = async (formType, submitData) => {
let data = {...submitData} let data = {...submitData}
if(data.masterId){ if(data.masterId){
data.id = data.masterId data.id = data.masterId
} }
let flag = true
tableData.value.forEach(item=>{
if(item['subSettleQty']&&item['qty']>item['subSettleQty']){
flag = false
message.error(`物料${item['itemCode']}最大数量为${item['subSettleQty']}`)
}
})
if(!flag){
return
}
data.subList = tableData.value // data.subList = tableData.value //
let isExist = false let isExist = false
tableData.value.forEach(item => { tableData.value.forEach(item => {

9
src/views/wms/deliversettlementManage/saleShipmentMainRequest/saleShipmentMain.data.ts

@ -335,6 +335,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
tableForm:{
disabled: true
}
}, },
{ {
label: '销售订单行', label: '销售订单行',
@ -344,8 +347,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
tableForm:{ tableForm:{
disabled:true,
multiple: true, multiple: true,
isInpuFocusShow: true, // 开启查询弹窗 // isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行', searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber', searchField: 'lineNumber',
searchTitle: '销售订单信息', searchTitle: '销售订单信息',
@ -527,6 +531,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: 150 width: 150
}, },
tableForm:{
type:'InputNumber'
}
}, },
{ {
label: '计量单位', label: '计量单位',

Loading…
Cancel
Save