diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 62c5b415b..9ad53f092 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -79,6 +79,8 @@ export default { confirmPublish: 'Confirm Publish', retrySuccess: 'Retry successfully', retryFinish: 'Retry Finished', + trialResultSuccess:'Trial Result Success', + trialResultFail:'Trial Result Fail', }, error: { noPermission: `Sorry, you don't have permission to access this page.`, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 01ff97a27..1507cbc4c 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -84,6 +84,8 @@ export default { confirmOutStorage: '确认出库吗?', confirmInStorage: '确认入库吗?', confirmSuspend: '确认中止吗?', + trialResultSuccess:'试算成功', + trialResultFail:'试算失败', }, error: { noPermission: `抱歉,您无权访问此页面。`, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index b9fee71b9..0e8dabc7f 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -425,6 +425,6 @@ export enum DICT_TYPE { DUTY_DETAILS ="duty_details",//责任明细字典 SHIFT = "shift",// 班次 ISSUE_SOURCE="issue_source",//发料来源 - + ISSUE_PLAN_TRIAL_RESULT="issue_plan_trial_result",//备料计划试算结果 } diff --git a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts index e3a7065ea..4b3f79820 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts +++ b/src/views/wms/issueManage/issue/issueRequestMain/issueRequestMain.data.ts @@ -339,16 +339,16 @@ export const IssueRequestMain = useCrudSchemas( value: '1' } }, - { - label: '备料计划单据号', - field: 'preparetoissuePlanNumber', - isSearch: false, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '备料计划单据号', + // field: 'preparetoissuePlanNumber', + // isSearch: false, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '从库区类型范围', field: 'fromAreaTypes', diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index 16d3fe149..f2829298b 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -270,7 +270,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - defaultButtons.defaultAddBtn({ hasPermi: 'wms:preparetoissue-main:create' }), // 新增 + //defaultButtons.defaultAddBtn({ hasPermi: 'wms:preparetoissue-main:create' }), // 新增 defaultButtons.defaultImportBtn({ hasPermi: 'wms:preparetoissue-main:import' }), // 导入 defaultButtons.defaultExportBtn({ hasPermi: 'wms:preparetoissue-main:export' }), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 @@ -364,7 +364,7 @@ const butttondata = (row, $index) => { }), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:delete'}), // 删除 { - label: '生成发料申请', + label: '试算', name: 'scflsq', hide: isShowMainButton(row, ['6']), type: 'primary', @@ -376,6 +376,7 @@ const butttondata = (row, $index) => { { label: '打印补给品备料单', name: 'printSupplyList', + hide: isShowMainButton(row, ['7']), type: 'primary', icon: 'Select', hasPermi: 'wms:preparetoissue-main:publish', @@ -466,7 +467,7 @@ const buttonTableClick = async (val, row) => { try { await PreparetoissueMainApi.publish(row.masterId) message.success(t('common.updateSuccess')) - await PreparetoissueMainApi.generateIssueRequest(row.number) + //await PreparetoissueMainApi.generateIssueRequest(row.number) } catch (err) { console.log(err) } finally { @@ -496,12 +497,10 @@ const buttonTableClick = async (val, row) => { await PreparetoissueMainApi.generateIssueRequest(row.number) .then((res) => { console.log('返回数据', res) - if (res.errorCount > 0) { - message.confirm('存在物料库存不足,创建失败。').then(() => { - window.open(getBaseUrl() + '/admin-api' + res.errorFile, '222') - }) + if (res.status == '2') { + message.error(t('common.trialResultFail')) } else { - message.success(t('common.createSuccess')) + message.success(t('common.trialResultSuccess')) } tableObject.loading = false buttonBaseClick('refresh', null) @@ -510,6 +509,23 @@ const buttonTableClick = async (val, row) => { tableObject.loading = false 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') { // 编辑 openForm('update', row) @@ -651,10 +667,10 @@ const submitForm = async (formType, submitData) => { try { if (formType === 'create') { await PreparetoissueMainApi.createPreparetoissueMain(data).then(async (res) => { - if (res.status == '6') { - // 生成发料申请 - await PreparetoissueMainApi.generateIssueRequest(res.number) - } + // if (res.status == '6') { + // // 生成发料申请 + // await PreparetoissueMainApi.generateIssueRequest(res.number) + // } getList() }) message.success(t('common.createSuccess')) diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index cbcbfa05d..0b988cebc 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -74,6 +74,24 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ } } }, + { + label: '试算状态', + field: 'trialResult', + sort: 'custom', + table: { + width: 150 + }, + dictType: DICT_TYPE.ISSUE_PLAN_TRIAL_RESULT, + dictClass: 'string', + isSearch: true, + isForm: false, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '车间', field: 'workshop', diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index c0dd437d6..e4e45fff2 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -432,9 +432,9 @@ const buttonTableClick = async (val, row) => { if (Array.isArray(res) && res.length > 0) { res.forEach(item => { // 已发布 - if(item.status == '6'){ - ProductionMainApi.generateIssueRequest(item.number) - } + // if(item.status == '6'){ + // ProductionMainApi.generateIssueRequest(item.number) + // } }); } }).catch(err => { @@ -486,9 +486,9 @@ const autoCreatePlanRequest = async (row)=>{ if (Array.isArray(res) && res.length > 0) { res.forEach(item => { // 已发布 - if(item.status == '6'){ - ProductionMainApi.generateIssueRequest(item.number) - } + // if(item.status == '6'){ + // ProductionMainApi.generateIssueRequest(item.number) + // } }); } }