diff --git a/src/utils/dict.ts b/src/utils/dict.ts index d6007ee..39755c4 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -288,7 +288,7 @@ export enum DICT_TYPE { EXECUTION_CYCLE = 'execution_cycle', //模具保养周期 MOLD_EXECUTION_CYCLE = 'mold_execution_cycle', //模具保养周期 GET_ORDER_STATUS = 'get_order_status', //模具保养周期 - IS_OPEN = 'is_open', //是否打开 + IS_COMPLETE = 'is_complete', //完成/未完成 ITEM_APPLY_STATUS = 'item_apply_status',//备件申领状态 JX_DETAILS_STATUS = 'jx_details_status', //检修明细状态 CLASSIFICATION = 'classification', //检修明细状态 diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 95c1cbf..6613500 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -355,6 +355,19 @@ export function mainListOrderCloBtn(option:any) { }) } +// 完成按钮 +export function mainListOrderCOMPLETEBtn(option:any) { + return __defaultBtnOption(option,{ + label: '完成', + name: 'mainOrderCOMPLETE', + hide: false, + type: 'danger', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-订单流程-打开按钮 export function mainListOrderOpeBtn(option:any) { return __defaultBtnOption(option,{ diff --git a/src/views/eam/item/itemOrderMain/index.vue b/src/views/eam/item/itemOrderMain/index.vue index 9707cca..c17baf8 100644 --- a/src/views/eam/item/itemOrderMain/index.vue +++ b/src/views/eam/item/itemOrderMain/index.vue @@ -146,7 +146,7 @@ // 根据状态返回该按钮是否显示 const isShowMainButton = (row, val) => { - if (val.indexOf(row.available) > -1) { + if (val.indexOf(row.status) > -1) { return false } else { return true @@ -156,7 +156,7 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['OPEN']) }), // 关闭 + defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 defaultButtons.mainListEditBtn(null), // 编辑 defaultButtons.mainListDeleteBtn(null), // 删除 ] @@ -167,8 +167,8 @@ if (val == 'edit') { // 编辑 openForm('update', row) } - else if (val == 'mainOrderClo') { // 关闭 - handleClose(row.id) + else if (val == 'mainOrderCOMPLETE') { // 关闭 + handleCOMPLETE(row.id) } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -201,14 +201,14 @@ } catch { } } - /** 关闭按钮操作 */ - const handleClose = async (id : number) => { + /** 完成按钮操作 */ + const handleCOMPLETE = async (id : number) => { try { // 关闭的二次确认 - await message.confirm('是否关闭所选中数据?') + await message.confirm('是否完成所选中数据?') // 发起关闭 await ItemOrderMainApi.closeItemOrderMain(id) - message.success(t('关闭成功!')) + message.success(t('完成成功!')) // 刷新列表 await getList() } catch { } diff --git a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts index 47fa422..f59acc1 100644 --- a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts +++ b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts @@ -41,23 +41,11 @@ export const ItemOrderMain = useCrudSchemas(reactive([ isForm: false, isSearch: false, }, - { - label: '接收备件状态', - field: 'status', - sort: 'custom', - dictType: DICT_TYPE.GET_ORDER_STATUS, - dictClass: 'string', - isTable: true, - isForm: false, - tableForm: { - type: 'Select' - } - }, { label: '状态', - field: 'available', + field: 'status', sort: 'custom', - dictType: DICT_TYPE.IS_OPEN, + dictType: DICT_TYPE.IS_COMPLETE, dictClass: 'string', isTable: true, isForm: true, @@ -108,29 +96,9 @@ export const ItemOrderDetail = useCrudSchemas(reactive([ ] }, }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { - min: 1, - precision: 6 - } - }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 - } - }, { label: '库存数量', - field: 'currentQty', + field: 'qty', sort: 'custom', table: { width: 150 @@ -164,8 +132,6 @@ export const ItemOrderDetail = useCrudSchemas(reactive([ disabled: true } }, - - { label: '是否以旧换新', field: 'isRadeIn',