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"
@submitForm="submitForm"
:isShowButton = isShowButton
@inputNumberChange="inputNumberChange"
/>
<!-- 详情 -->
<Detail
@ -128,6 +129,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
newRow['itemCode'] = item['itemCode']
newRow['projectCode'] = item['projectCode']
newRow['uom'] = item['uom']
newRow['subSettleQty'] = item['subSettleQty']
tableData.value.push(newRow)
})
@ -355,13 +357,31 @@ const openForm = (type: string, row?: any) => {
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) => {
let data = {...submitData}
if(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 //
let isExist = false
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
}
},
tableForm:{
disabled: true
}
},
{
label: '销售订单行',
@ -344,8 +347,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
width: 150
},
tableForm:{
disabled:true,
multiple: true,
isInpuFocusShow: true, // 开启查询弹窗
// isInpuFocusShow: true, // 开启查询弹窗
searchListPlaceholder: '请选择销售订单行',
searchField: 'lineNumber',
searchTitle: '销售订单信息',
@ -527,6 +531,9 @@ export const SaleShipmentDetail = useCrudSchemas(reactive<CrudSchema[]>([
table: {
width: 150
},
tableForm:{
type:'InputNumber'
}
},
{
label: '计量单位',

Loading…
Cancel
Save