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', //模具保养周期
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', //检修明细状态

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) {
return __defaultBtnOption(option,{

16
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 { }

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

@ -41,23 +41,11 @@ export const ItemOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
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<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: '库存数量',
field: 'currentQty',
field: 'qty',
sort: 'custom',
table: {
width: 150
@ -164,8 +132,6 @@ export const ItemOrderDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: true
}
},
{
label: '是否以旧换新',
field: 'isRadeIn',

Loading…
Cancel
Save