|
@@ -14,8 +14,10 @@ import router from '@/router'
|
|
|
*/
|
|
*/
|
|
|
export function getClassName(val: string): BtnClassName {
|
|
export function getClassName(val: string): BtnClassName {
|
|
|
let result: BtnClassName = 'btnDeafault'
|
|
let result: BtnClassName = 'btnDeafault'
|
|
|
|
|
+ // 红色按钮
|
|
|
const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked', 'refuse']
|
|
const btnDanger = ['disable', 'cancle', 'cancel', 'delete', 'logout', 'locked', 'refuse']
|
|
|
- const operBtn = ['add', 'modify', 'check', 'reset', 'credit', 'payment', 'confirm_withdrawal', 'complete_stocking', 'upload_logistics', 'buy', 'listed', 'delisting',
|
|
|
|
|
|
|
+ // 蓝色按钮
|
|
|
|
|
+ const operBtn = ['add', 'close', 'modify', 'check', 'reset', 'credit', 'payment', 'confirm_withdrawal', 'complete_stocking', 'upload_logistics', 'buy', 'listed', 'delisting',
|
|
|
'receipt', 'confirm_pickup']
|
|
'receipt', 'confirm_pickup']
|
|
|
const map = new Map<BtnClassName, string[]>([
|
|
const map = new Map<BtnClassName, string[]>([
|
|
|
['btnDanger', btnDanger],
|
|
['btnDanger', btnDanger],
|
|
@@ -59,7 +61,6 @@ export function handleBtnList(list: OperationTabMenu | undefined, menuType: keyo
|
|
|
// }
|
|
// }
|
|
|
// }
|
|
// }
|
|
|
// })
|
|
// })
|
|
|
- debugger
|
|
|
|
|
} else {
|
|
} else {
|
|
|
console.warn(`menuType: ${menuType}未找到`)
|
|
console.warn(`menuType: ${menuType}未找到`)
|
|
|
}
|
|
}
|
|
@@ -88,7 +89,6 @@ export function _handleBtnList_(list: OperationTabMenu | undefined, hasDetail: b
|
|
|
// const item = { lable: title, code, className: getClassName(code) }
|
|
// const item = { lable: title, code, className: getClassName(code) }
|
|
|
// result.value[index].push(item)
|
|
// result.value[index].push(item)
|
|
|
// }
|
|
// }
|
|
|
- debugger
|
|
|
|
|
})
|
|
})
|
|
|
const children = temp[1][0].children
|
|
const children = temp[1][0].children
|
|
|
if (children && children.length) {
|
|
if (children && children.length) {
|
|
@@ -133,7 +133,6 @@ export function _handleBtnList(list: OperationTabMenu | undefined, hasDetail: bo
|
|
|
// const item = { lable: title, callback: openAction, className: getClassName(code), code: code }
|
|
// const item = { lable: title, callback: openAction, className: getClassName(code), code: code }
|
|
|
// result.value[index].push(item)
|
|
// result.value[index].push(item)
|
|
|
// }
|
|
// }
|
|
|
- debugger
|
|
|
|
|
})
|
|
})
|
|
|
const children = temp[1][0].children
|
|
const children = temp[1][0].children
|
|
|
if (children && children.length) {
|
|
if (children && children.length) {
|
|
@@ -162,14 +161,13 @@ export function _handleBtnList(list: OperationTabMenu | undefined, hasDetail: bo
|
|
|
// 获取单据按钮列表
|
|
// 获取单据按钮列表
|
|
|
export function getOrderBtnList(list: OperationTabMenu[], hasDetail = false) {
|
|
export function getOrderBtnList(list: OperationTabMenu[], hasDetail = false) {
|
|
|
const result = ref<BtnListType[]>([])
|
|
const result = ref<BtnListType[]>([])
|
|
|
- list.forEach(el => {
|
|
|
|
|
- // const { code, type, title, isshow } = el;
|
|
|
|
|
- // if (type === 2 && isshow) {
|
|
|
|
|
- // const item = { lable: title, code, className: getClassName(code) }
|
|
|
|
|
- // result.value.push(item)
|
|
|
|
|
- // }
|
|
|
|
|
- debugger
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // list.forEach(el => {
|
|
|
|
|
+ // const { code, type, title, isshow } = el;
|
|
|
|
|
+ // if (type === 2 && isshow) {
|
|
|
|
|
+ // const item = { lable: title, code, className: getClassName(code) }
|
|
|
|
|
+ // result.value.push(item)
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
// 详情
|
|
// 详情
|
|
|
if (hasDetail) {
|
|
if (hasDetail) {
|
|
|
const item = { lable: '详情', code: 'detail', className: getClassName('') }
|
|
const item = { lable: '详情', code: 'detail', className: getClassName('') }
|