|
|
@ -253,7 +253,7 @@ const butttondata = (row,$index) => { |
|
|
|
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 |
|
|
|
{ |
|
|
|
label: '生成备料计划/收货申请', |
|
|
|
label: '生成备料计划', |
|
|
|
name: 'scbljh', |
|
|
|
hide: isShowMainButton(row,['6']), |
|
|
|
type: 'primary', |
|
|
@ -262,6 +262,16 @@ const butttondata = (row,$index) => { |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
color: '' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '生成收货申请', |
|
|
|
name: 'scshsq', |
|
|
|
hide: isShowMainButton(row,['6']), |
|
|
|
type: 'primary', |
|
|
|
icon: 'Select', |
|
|
|
hasPermi:'wms:production-main:publish', |
|
|
|
link: true, // 文本展现按钮 |
|
|
|
color: '' |
|
|
|
}, |
|
|
|
] |
|
|
|
} |
|
|
|
|
|
|
@ -364,9 +374,21 @@ const buttonTableClick = async (val, row) => { |
|
|
|
}) |
|
|
|
} else if(val == 'scbljh') { |
|
|
|
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') |
|
|
|
await message.confirm('确认要生成备料计划/收货申请吗?') |
|
|
|
await message.confirm('确认要生成备料计划吗?') |
|
|
|
tableObject.loading = true |
|
|
|
await ProductionMainApi.generatePreparetoissue(row.number).then(() => { |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
getList() |
|
|
|
}).catch(err => { |
|
|
|
tableObject.loading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if(val == 'scshsq') { |
|
|
|
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') |
|
|
|
await message.confirm('确认要生成收货申请吗?') |
|
|
|
tableObject.loading = true |
|
|
|
await ProductionMainApi.generateRequest(row.number).then(() => { |
|
|
|
await ProductionMainApi.generateProductreceiptRequest(row.number).then(() => { |
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
tableObject.loading = false |
|
|
|
getList() |
|
|
@ -374,7 +396,8 @@ const buttonTableClick = async (val, row) => { |
|
|
|
tableObject.loading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} else if (val == 'edit') { // 编辑 |
|
|
|
} |
|
|
|
if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} else if (val == 'delete') { // 删除 |
|
|
|
handleDelete(row.masterId) |
|
|
|