Browse Source

BUG修改

master
parent
commit
285e820684
  1. 2
      src/utils/dict.ts
  2. 13
      src/utils/disposition/defaultButtons.ts
  3. 16
      src/views/eam/item/itemOrderMain/index.vue
  4. 40
      src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

2
src/utils/dict.ts

@ -288,7 +288,7 @@ export enum DICT_TYPE {
EXECUTION_CYCLE = 'execution_cycle', //模具保养周期 EXECUTION_CYCLE = 'execution_cycle', //模具保养周期
MOLD_EXECUTION_CYCLE = 'mold_execution_cycle', //模具保养周期 MOLD_EXECUTION_CYCLE = 'mold_execution_cycle', //模具保养周期
GET_ORDER_STATUS = 'get_order_status', //模具保养周期 GET_ORDER_STATUS = 'get_order_status', //模具保养周期
IS_OPEN = 'is_open', //是否打开 IS_COMPLETE = 'is_complete', //完成/未完成
ITEM_APPLY_STATUS = 'item_apply_status',//备件申领状态 ITEM_APPLY_STATUS = 'item_apply_status',//备件申领状态
JX_DETAILS_STATUS = 'jx_details_status', //检修明细状态 JX_DETAILS_STATUS = 'jx_details_status', //检修明细状态
CLASSIFICATION = 'classification', //检修明细状态 CLASSIFICATION = 'classification', //检修明细状态

13
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) { export function mainListOrderOpeBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

16
src/views/eam/item/itemOrderMain/index.vue

@ -146,7 +146,7 @@
// //
const isShowMainButton = (row, val) => { const isShowMainButton = (row, val) => {
if (val.indexOf(row.available) > -1) { if (val.indexOf(row.status) > -1) {
return false return false
} else { } else {
return true return true
@ -156,7 +156,7 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['OPEN']) }), // defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), //
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), // defaultButtons.mainListDeleteBtn(null), //
] ]
@ -167,8 +167,8 @@
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} }
else if (val == 'mainOrderClo') { // else if (val == 'mainOrderCOMPLETE') { //
handleClose(row.id) handleCOMPLETE(row.id)
} }
else if (val == 'delete') { // else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
@ -201,14 +201,14 @@
} catch { } } catch { }
} }
/** 关闭按钮操作 */ /** 完成按钮操作 */
const handleClose = async (id : number) => { const handleCOMPLETE = async (id : number) => {
try { try {
// //
await message.confirm('是否关闭所选中数据?') await message.confirm('是否完成所选中数据?')
// //
await ItemOrderMainApi.closeItemOrderMain(id) await ItemOrderMainApi.closeItemOrderMain(id)
message.success(t('关闭成功!')) message.success(t('完成成功!'))
// //
await getList() await getList()
} catch { } } catch { }

40
src/views/eam/item/itemOrderMain/itemOrderMain.data.ts

@ -41,23 +41,11 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
}, },
{
label: '接收备件状态',
field: 'status',
sort: 'custom',
dictType: DICT_TYPE.GET_ORDER_STATUS,
dictClass: 'string',
isTable: true,
isForm: false,
tableForm: {
type: 'Select'
}
},
{ {
label: '状态', label: '状态',
field: 'available', field: 'status',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.IS_OPEN, dictType: DICT_TYPE.IS_COMPLETE,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
isForm: true, isForm: true,
@ -108,29 +96,9 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
] ]
}, },
}, },
{
label: '数量',
field: 'qty',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
componentProps: {
min: 1,
precision: 6
}
},
tableForm: {
type: 'InputNumber',
min: 1,
precision: 6
}
},
{ {
label: '库存数量', label: '库存数量',
field: 'currentQty', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -164,8 +132,6 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true disabled: true
} }
}, },
{ {
label: '是否以旧换新', label: '是否以旧换新',
field: 'isRadeIn', field: 'isRadeIn',

Loading…
Cancel
Save