|
@ -270,7 +270,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
defaultButtons.defaultAddBtn({ hasPermi: 'wms:preparetoissue-main:create' }), // 新增 |
|
|
//defaultButtons.defaultAddBtn({ hasPermi: 'wms:preparetoissue-main:create' }), // 新增 |
|
|
defaultButtons.defaultImportBtn({ hasPermi: 'wms:preparetoissue-main:import' }), // 导入 |
|
|
defaultButtons.defaultImportBtn({ hasPermi: 'wms:preparetoissue-main:import' }), // 导入 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:preparetoissue-main:export' }), // 导出 |
|
|
defaultButtons.defaultExportBtn({ hasPermi: 'wms:preparetoissue-main:export' }), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
@ -364,7 +364,7 @@ const butttondata = (row, $index) => { |
|
|
}), // 编辑 |
|
|
}), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:delete'}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:delete'}), // 删除 |
|
|
{ |
|
|
{ |
|
|
label: '生成发料申请', |
|
|
label: '试算', |
|
|
name: 'scflsq', |
|
|
name: 'scflsq', |
|
|
hide: isShowMainButton(row, ['6']), |
|
|
hide: isShowMainButton(row, ['6']), |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
@ -376,6 +376,7 @@ const butttondata = (row, $index) => { |
|
|
{ |
|
|
{ |
|
|
label: '打印补给品备料单', |
|
|
label: '打印补给品备料单', |
|
|
name: 'printSupplyList', |
|
|
name: 'printSupplyList', |
|
|
|
|
|
hide: isShowMainButton(row, ['7']), |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
|
icon: 'Select', |
|
|
icon: 'Select', |
|
|
hasPermi: 'wms:preparetoissue-main:publish', |
|
|
hasPermi: 'wms:preparetoissue-main:publish', |
|
@ -466,7 +467,7 @@ const buttonTableClick = async (val, row) => { |
|
|
try { |
|
|
try { |
|
|
await PreparetoissueMainApi.publish(row.masterId) |
|
|
await PreparetoissueMainApi.publish(row.masterId) |
|
|
message.success(t('common.updateSuccess')) |
|
|
message.success(t('common.updateSuccess')) |
|
|
await PreparetoissueMainApi.generateIssueRequest(row.number) |
|
|
//await PreparetoissueMainApi.generateIssueRequest(row.number) |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
} finally { |
|
|
} finally { |
|
@ -496,12 +497,10 @@ const buttonTableClick = async (val, row) => { |
|
|
await PreparetoissueMainApi.generateIssueRequest(row.number) |
|
|
await PreparetoissueMainApi.generateIssueRequest(row.number) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.log('返回数据', res) |
|
|
console.log('返回数据', res) |
|
|
if (res.errorCount > 0) { |
|
|
if (res.status == '2') { |
|
|
message.confirm('存在物料库存不足,创建失败。').then(() => { |
|
|
message.error(t('common.trialResultFail')) |
|
|
window.open(getBaseUrl() + '/admin-api' + res.errorFile, '222') |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.trialResultSuccess')) |
|
|
} |
|
|
} |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
buttonBaseClick('refresh', null) |
|
|
buttonBaseClick('refresh', null) |
|
@ -510,6 +509,23 @@ const buttonTableClick = async (val, row) => { |
|
|
tableObject.loading = false |
|
|
tableObject.loading = false |
|
|
console.log(err) |
|
|
console.log(err) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// .then((res) => { |
|
|
|
|
|
// console.log('返回数据', res) |
|
|
|
|
|
// if (res.errorCount > 0) { |
|
|
|
|
|
// message.confirm('存在物料库存不足,创建失败。').then(() => { |
|
|
|
|
|
// window.open(getBaseUrl() + '/admin-api' + res.errorFile, '222') |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// message.success(t('common.createSuccess')) |
|
|
|
|
|
// } |
|
|
|
|
|
// tableObject.loading = false |
|
|
|
|
|
// buttonBaseClick('refresh', null) |
|
|
|
|
|
// }) |
|
|
|
|
|
// .catch((err) => { |
|
|
|
|
|
// tableObject.loading = false |
|
|
|
|
|
// console.log(err) |
|
|
|
|
|
// }) |
|
|
} else if (val == 'edit') { |
|
|
} else if (val == 'edit') { |
|
|
// 编辑 |
|
|
// 编辑 |
|
|
openForm('update', row) |
|
|
openForm('update', row) |
|
@ -651,10 +667,10 @@ const submitForm = async (formType, submitData) => { |
|
|
try { |
|
|
try { |
|
|
if (formType === 'create') { |
|
|
if (formType === 'create') { |
|
|
await PreparetoissueMainApi.createPreparetoissueMain(data).then(async (res) => { |
|
|
await PreparetoissueMainApi.createPreparetoissueMain(data).then(async (res) => { |
|
|
if (res.status == '6') { |
|
|
// if (res.status == '6') { |
|
|
// 生成发料申请 |
|
|
// // 生成发料申请 |
|
|
await PreparetoissueMainApi.generateIssueRequest(res.number) |
|
|
// await PreparetoissueMainApi.generateIssueRequest(res.number) |
|
|
} |
|
|
// } |
|
|
getList() |
|
|
getList() |
|
|
}) |
|
|
}) |
|
|
message.success(t('common.createSuccess')) |
|
|
message.success(t('common.createSuccess')) |
|
|