Browse Source

子表bom增加数量校验

master
zhaoxuebing 10 months ago
parent
commit
6d9ec31175
  1. 11
      src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue
  2. 11
      src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue
  3. 17
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue
  4. 19
      src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts

11
src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue

@ -172,9 +172,14 @@ const buttonBaseClickBom = async (val) => {
} }
}) })
} else { } else {
// bom if(tableListBom.value.length > 0){
await dismantleRequestDetailbApi.updateDismantleRequestDetailb(rowId.value, tableListBom.value) // bom
message.success(t('common.updateSuccess')) await dismantleRequestDetailbApi.updateDismantleRequestDetailb(rowId.value, tableListBom.value)
message.success(t('common.updateSuccess'))
}else{
message.warning('数量不能为0!')
return
}
} }
bomModelVisible.value = false bomModelVisible.value = false
} }

11
src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue

@ -176,9 +176,14 @@ const buttonBaseClickBom = (val) => {
} }
}) })
}else { }else {
// bom if(tableListBom.value.length > 0){
ProductrepairRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) // bom
message.success(t('common.updateSuccess')) ProductrepairRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value)
message.success(t('common.updateSuccess'))
}else{
message.warning('数量不能为0!')
return
}
} }
bomModelVisible.value = false bomModelVisible.value = false
} }

17
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -158,6 +158,7 @@ const buttonBaseClickBom = (val) => {
// //
let flag = false; let flag = false;
detatableDataBom.tableList.forEach((item) => { detatableDataBom.tableList.forEach((item) => {
console.log("AAAAAA",item.qty)
if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){ if(item.qty!=0 && (item.bomQty * detailQty.value < item.qty)){
flag = true; flag = true;
return; return;
@ -168,6 +169,8 @@ const buttonBaseClickBom = (val) => {
return return
} }
tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && (item.bomQty * detailQty.value >= item.qty))) tableListBom.value = detatableDataBom.tableList.filter(item => (item.qty!=0 && (item.bomQty * detailQty.value >= item.qty)))
console.log("tableListBom",tableListBom.value)
console.log("lsBomSave",lsBomSave.value)
if (lsBomSave.value) { if (lsBomSave.value) {
tableData.value.forEach((item, index) => { tableData.value.forEach((item, index) => {
if(tableListBom.value[0].rowId == index) { if(tableListBom.value[0].rowId == index) {
@ -175,12 +178,16 @@ const buttonBaseClickBom = (val) => {
} }
}) })
}else { }else {
// if(tableListBom.value.length > 0){
// bom //
ProductscrapRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value) // bom
message.success(t('common.updateSuccess')) ProductscrapRequestMainApi.updateProductscrapDetailRequestBom(rowId.value, tableListBom.value)
message.success(t('common.updateSuccess'))
}else{
message.warning('数量不能为0!')
return
}
} }
// console.log(157, tableData.value)
bomModelVisible.value = false bomModelVisible.value = false
} }
// //

19
src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/inspectRequestMain.data.ts

@ -51,17 +51,26 @@ export const InspectRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ {
label: '发货单号', label: '采购收货记录单号',
field: 'asnNumber', field: 'purchaseReceiptRecordNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 180
},
isForm: false,
},
{
label: '订单号',
field: 'poNumber',
sort: 'custom',
table: {
width: 180
}, },
isForm: false, isForm: false,
}, },
{ {
label: '要货计划单号', label: '订单行',
field: 'ppNumber', field: 'poLine',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150

Loading…
Cancel
Save