diff --git a/src/api/wms/productreceiptRecordMain/index.ts b/src/api/wms/productreceiptRecordMain/index.ts index e3dd420d9..d7637d4d0 100644 --- a/src/api/wms/productreceiptRecordMain/index.ts +++ b/src/api/wms/productreceiptRecordMain/index.ts @@ -126,3 +126,8 @@ export const createPutawayRequest = async (number:string) => { export const createInspectRequest = async (number:string) => { return await request.post({ url: `/wms/productreceipt-record-main/createInspectRequest?number=`+number }) } + +//制品收货记录子执行回收操作 +export const handleRecoveryProductreceiptRecord = async (data: ProductreceiptRecordMainVO) => { + return await request.put({ url: `/wms/productreceipt-record-main/handleRecovery`, data }) +} diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 27b9c7ea8..dc2d547ea 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -615,11 +615,11 @@ export default { code:'Code', name:'Name', }, - - - - - + + + + + ts: { 代码:'Code', 全部:'All', @@ -1126,7 +1126,7 @@ export default { 请输入包装规格2:'Please input package specification2', 请输入包装数量2:'Please input package quantity2', 提交审批:'submit for approval', - // 系统管理:'system management', + // 系统管理:'system management', // 基础设施:'infrastructure', // 报表管理:'report manager', // 报表:'statement', @@ -1280,9 +1280,9 @@ export default { 规则配置:'Rule configuration', 请输入联系电话:'Please enter a contact number', 请选择范围:'Please enter a name', - + '确认撤销报工吗?':'Are you sure to cancel the job application?', }, - + } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index e0aaf5f4b..43f0afa23 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -538,7 +538,7 @@ export default { 'pcs':'个', free_library_bits_or_total_library_bits:'空闲库位数/总库位数', - + slack_stock_warning:'呆滞库存预警', package_number:'包装号', @@ -1276,6 +1276,7 @@ export default { 规则配置:'规则配置', 请输入联系电话:'请输入联系电话', 请选择范围:'请选择范围', + '确认撤销报工吗?':"确认撤销报工吗?", }, } diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 70f714e53..cf8050651 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -1054,6 +1054,18 @@ export function mainListPointBtn(option: any) { hasPermi: '' }) } +// 主列表-回收 +export function mainListRecoveryBtn(option: any) { + return __defaultBtnOption(option, { + label: t(`ts.撤销报工`).replace('ts.', ''), + name: 'recovery', + hide: false, + type: 'primary', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} // 主列表-批量打印 export function mainLisSelectiontPointBtn(option: any) { return __defaultBtnOption(option, { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 542698de4..ca527db82 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -198,6 +198,7 @@ const butttondata = (row,$index) => { // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:productreceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainInspectRequestBtn({hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainListPointBtn(null), // 标签打印 + defaultButtons.mainListRecoveryBtn(null), // 制品回收 ] } @@ -207,8 +208,11 @@ const buttonTableClick = async (val, row) => { handleCreateInspectRequest(row.number) } else if (val == 'point') { // 标签打印 labelPrint(row) + } else if (val == 'recovery') { //制品回收 + labelRecovery(row) } } + const BASE_URL = getJmreportBaseUrl() // 标签打印 const searchTableRef = ref() @@ -241,6 +245,18 @@ const labelPrint = async (row) => { }) searchTableRef.value.openData("标签信息",tableObjectPrint,{tableColumns},true) } +//制品回收按钮事件 +const labelRecovery = async (row) => { + try { + await message.confirm(t('ts.确认撤销报工吗?')) + tableObject.loading = true + let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row) + message.success(t('ts.确认撤销报工成功')) + } catch { + } finally { + tableObject.loading = false + } +} // 批量打印--预生产收货 const searchTableSuccessLabel = async (formField, searchField, val, formRef, type, row) => { console.log('批量打印',val) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index 773573524..3fa05b7aa 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -236,6 +236,7 @@ const butttondata = (row,$index) => { defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请 defaultButtons.mainPutawayRequestCpBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请 defaultButtons.mainListPointBtn(null), // 标签打印 + defaultButtons.mainListRecoveryBtn(null), // 制品回收 ] } @@ -247,6 +248,8 @@ const buttonTableClick = async (val, row) => { handleCreateInspectRequest(row.number) }else if (val == 'putawayRequest') { // 生成采购上架申请 handleCreatePutawayRequest(row.number) + } else if (val == 'recovery') { //制品回收 + labelRecovery(row) } } /** 生成到货检验申请按钮操作 */ @@ -274,9 +277,19 @@ const handleCreatePutawayRequest = async (number:string) => { tableObject.loading = false } } +const labelRecovery = async (row) => { + try { + await message.confirm(t('ts.确认撤销报工吗?')) + let resType = await ProductreceiptRecordMainApi.handleRecoveryProductreceiptRecord(row) + message.success(t('ts.确认撤销报工成功')) + } catch { + } finally { + tableObject.loading = false + } +} const searchTableRef = ref() -const labelType = ref('') // 标签类别 采购还是制造等 +const labelType = ref('') // 标签类别 采购还是制造等 const labelPrint = async (row) => { console.log(7777,row); tableObject.loading = true