|
@ -59,7 +59,6 @@ |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@tableSelectionDelete="tableSelectionDelete" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@submitForm="submitForm" |
|
|
@submitForm="submitForm" |
|
|
@inputNumberChange="inputNumberChange" |
|
|
|
|
|
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|
|
@tableFormSelectOnBlur="tableFormSelectOnBlur" |
|
|
> |
|
|
> |
|
|
</BasicForm> |
|
|
</BasicForm> |
|
@ -76,7 +75,6 @@ |
|
|
:Echo="Echo" |
|
|
:Echo="Echo" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
@searchTableSuccessDetail="searchTableSuccessDetail" |
|
|
:detailValidate="detailValidate" |
|
|
:detailValidate="detailValidate" |
|
|
|
|
|
|
|
|
@detailOpenForm="detailOpenForm" |
|
|
@detailOpenForm="detailOpenForm" |
|
|
@onBlur="onBlur" |
|
|
@onBlur="onBlur" |
|
|
/> |
|
|
/> |
|
@ -490,6 +488,10 @@ const submitForm = async (formType, submitData) => { |
|
|
data.id = data.masterId |
|
|
data.id = data.masterId |
|
|
} |
|
|
} |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
|
|
const cmdExists = data.subList.some(filter => |
|
|
|
|
|
parseFloat(filter.inventoryQty) < parseFloat(filter.qty) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
if(data.subList.length == 0){ |
|
|
if(data.subList.length == 0){ |
|
@ -507,6 +509,10 @@ const submitForm = async (formType, submitData) => { |
|
|
if(flag){ |
|
|
if(flag){ |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
if(cmdExists){ |
|
|
|
|
|
message.warning("换货数量不能大于库存数量") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
formRef.value.formLoading = true |
|
|
formRef.value.formLoading = true |
|
|
await PurchaseBarterRequestMainApi.createPurchaseBarterRequestMain(data) |
|
|
await PurchaseBarterRequestMainApi.createPurchaseBarterRequestMain(data) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
@ -566,14 +572,6 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 创建标签 |
|
|
|
|
|
const inputNumberChange = (field, index, row, val) => { |
|
|
|
|
|
if(field == 'qty' || field == 'singlePrice'){ |
|
|
|
|
|
row.amount = row.qty * row.singlePrice |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let validityDays = 0 |
|
|
let validityDays = 0 |
|
|
const detailOpenForm = (type, row)=>{ |
|
|
const detailOpenForm = (type, row)=>{ |
|
|
console.log('detailOpenForm',row) |
|
|
console.log('detailOpenForm',row) |
|
@ -607,7 +605,6 @@ const tableFormSelectOnBlur = (field, val, row, index) => { |
|
|
tableData.value[index][field] = val.target.value |
|
|
tableData.value[index][field] = val.target.value |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|