|
|
|
// 页面基础按钮样式
|
|
|
|
/**
|
|
|
|
* 如果需要更改配置,格式如:defaultExportBtn({label:'自定义'})
|
|
|
|
* @param {*} option
|
|
|
|
* @returns
|
|
|
|
*/
|
|
|
|
|
|
|
|
// 新增按钮
|
|
|
|
export function defaultAddBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '新增',
|
|
|
|
name: 'add',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
icon: 'ep:plus',
|
|
|
|
color: '',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导入按钮
|
|
|
|
export function defaultImportBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '导入',
|
|
|
|
name: 'import',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
icon: 'ep:upload',
|
|
|
|
color: '',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出按钮
|
|
|
|
export function defaultExportBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '导出',
|
|
|
|
name: 'export',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
icon: 'ep:download',
|
|
|
|
color: '',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 字段设置
|
|
|
|
// export function defaultFieldSettingBtn(option:any) {
|
|
|
|
// // todo:监听已经配置过的字段按钮更改状态特殊显示
|
|
|
|
// const routeName = route.name
|
|
|
|
// let _local = localStorage.getItem('tableColumns_' + this.$store.getters.name.userName + '_' + routeName)
|
|
|
|
// let _type = ''
|
|
|
|
// let _num = 0
|
|
|
|
// if(_local){
|
|
|
|
// JSON.parse(_local).forEach((item: any) => {
|
|
|
|
// if(item.istrue == true){
|
|
|
|
// _num ++
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
// if(_num >= JSON.parse(_local).length){
|
|
|
|
// _type = ''
|
|
|
|
// }else{
|
|
|
|
// _type= 'warning'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// return __defaultBtnOption(option,{
|
|
|
|
// type: _type,
|
|
|
|
// plain: true,
|
|
|
|
// icon: "el-icon-setting",
|
|
|
|
// label: "字段设置",
|
|
|
|
// name: "field",
|
|
|
|
// size: "small",
|
|
|
|
// float: 'right',
|
|
|
|
// class: "rowDropNotHideItem"
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 刷新按钮
|
|
|
|
export function defaultFreshBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '刷新',
|
|
|
|
name: 'refresh',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
icon: 'ep:refresh',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 重置按钮
|
|
|
|
export function defaultResetBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '重置',
|
|
|
|
name: 'reset',
|
|
|
|
hide: false,
|
|
|
|
type: 'info',
|
|
|
|
icon: '',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 字段设置
|
|
|
|
export function defaultSetBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '设置',
|
|
|
|
name: 'set',
|
|
|
|
hide: false,
|
|
|
|
type: 'info',
|
|
|
|
icon: 'ep:setting',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 筛选按钮
|
|
|
|
export function defaultFilterBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '筛选',
|
|
|
|
name: 'filtrate',
|
|
|
|
hide: false,
|
|
|
|
type: 'info',
|
|
|
|
icon: 'ep:operation',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 筛选——查询按钮
|
|
|
|
export function defaultSearchBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '搜索',
|
|
|
|
name: 'search',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
icon: '',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 筛选——重置按钮
|
|
|
|
export function defaultSearchResetBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '重置',
|
|
|
|
name: 'searchReset',
|
|
|
|
hide: false,
|
|
|
|
type: 'info',
|
|
|
|
icon: '',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// form表单-保存按钮
|
|
|
|
export function formSaveBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '保存',
|
|
|
|
name: 'save',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
icon: 'ep:select',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// form表单-关闭按钮
|
|
|
|
export function formCloseBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'close',
|
|
|
|
hide: false,
|
|
|
|
icon: 'ep:close',
|
|
|
|
color: '',
|
|
|
|
float:'right',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// drawer抽屉头部-编辑按钮
|
|
|
|
export function drawerEditBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '编辑',
|
|
|
|
name: 'edit',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
icon: 'ep:editPen',
|
|
|
|
color: '',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// drawer抽屉头部-删除按钮
|
|
|
|
export function drawerDeleteBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '删除',
|
|
|
|
name: 'delete',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
icon: 'ep:delete',
|
|
|
|
color: '',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//主列表-详情按钮
|
|
|
|
export function mainListDetailBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '详情',
|
|
|
|
name: 'detail',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-编辑按钮
|
|
|
|
export function mainListEditBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '编辑',
|
|
|
|
name: 'edit',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-删除按钮
|
|
|
|
export function mainListDeleteBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '删除',
|
|
|
|
name: 'delete',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-关闭按钮
|
|
|
|
export function mainListCloseBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'mainClose',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-重新添加按钮
|
|
|
|
export function mainListReAddBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '重新添加',
|
|
|
|
name: 'mainReAdd',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-提交审批按钮
|
|
|
|
export function mainListSubmitBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '提交审批',
|
|
|
|
name: 'mainSubmit',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-驳回按钮
|
|
|
|
export function mainListTurnDownBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '驳回',
|
|
|
|
name: 'mainTurnDown',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-审批通过按钮
|
|
|
|
export function mainListApproveBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '审批通过',
|
|
|
|
name: 'mainApprove',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-申请流程-处理按钮
|
|
|
|
export function mainListHandleBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '处理',
|
|
|
|
name: 'mainHandle',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-订单流程-发布按钮
|
|
|
|
export function mainListOrderPubBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '发布',
|
|
|
|
name: 'mainOrderPub',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-订单流程-关闭按钮
|
|
|
|
export function mainListOrderCloBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'mainOrderClo',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 完成按钮
|
|
|
|
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,{
|
|
|
|
label: '打开',
|
|
|
|
name: 'mainOrderOpe',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-订单流程-下架按钮
|
|
|
|
export function mainListOrderWitBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '下架',
|
|
|
|
name: 'mainOrderWit',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-打开按钮
|
|
|
|
export function mainListPlanOpeBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '打开',
|
|
|
|
name: 'mainPlanOpe',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-关闭按钮
|
|
|
|
export function mainListPlanCloBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'mainPlanClo',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-提交审批按钮
|
|
|
|
export function mainListPlanSubBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '提交审批',
|
|
|
|
name: 'mainPlanSub',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-驳回按钮
|
|
|
|
export function mainListPlanTurBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '驳回',
|
|
|
|
name: 'mainPlanTur',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-重置按钮
|
|
|
|
export function mainListPlanResBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '重置',
|
|
|
|
name: 'mainPlanRes',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-审批通过按钮
|
|
|
|
export function mainListPlanAppBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '审批通过',
|
|
|
|
name: 'mainPlanApp',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-发布按钮
|
|
|
|
export function mainListPlanPubBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '发布',
|
|
|
|
name: 'mainPlanPub',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-计划流程-执行按钮
|
|
|
|
export function mainListPlanComBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '执行',
|
|
|
|
name: 'mainPlanCom',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-修改按钮
|
|
|
|
export function mainListPurchasePlanModBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '修改',
|
|
|
|
name: 'mainPurPlanMod',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-下架按钮
|
|
|
|
export function mainListPurchasePlanWitBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '下架',
|
|
|
|
name: 'mainPurPlanWit',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-不接受按钮
|
|
|
|
export function mainListPurchasePlanRejBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '不接受',
|
|
|
|
name: 'mainPurPlanRej',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-接受按钮
|
|
|
|
export function mainListPurchasePlanAccBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '接受',
|
|
|
|
name: 'mainPurPlanAcc',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-发布按钮
|
|
|
|
export function mainListPurchasePlanPubBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '发布',
|
|
|
|
name: 'mainPurPlanPub',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-关闭按钮
|
|
|
|
export function mainListPurchasePlanCloBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'mainPurPlanClo',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-要货计划流程-打开按钮
|
|
|
|
export function mainListPurchasePlanOpeBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '打开',
|
|
|
|
name: 'mainPurPlanOpe',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-任务流程-承接按钮
|
|
|
|
export function mainListJobAccBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '承接',
|
|
|
|
name: 'mainJobAcc',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-任务流程-关闭按钮
|
|
|
|
export function mainListJobCloBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '关闭',
|
|
|
|
name: 'mainJobClo',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-任务流程-放弃按钮
|
|
|
|
export function mainListJobAbaBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '放弃',
|
|
|
|
name: 'mainJobAba',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-任务流程-执行按钮
|
|
|
|
export function mainListJobExeBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '执行',
|
|
|
|
name: 'mainJobExe',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-打印
|
|
|
|
export function mainListPointBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '标签打印',
|
|
|
|
name: 'point',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-生成采购收货申请
|
|
|
|
export function mainListGenerateApplicationBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '生成采购收货申请',
|
|
|
|
name: 'generateApplication',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-打印
|
|
|
|
export function mainListDocumentPrintBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '单据打印',
|
|
|
|
name: 'documentPrint',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-盘点导出
|
|
|
|
export function mainExport(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '导出',
|
|
|
|
name: 'mainExport',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-盘点调整
|
|
|
|
export function mainAdjust(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '盘点调整',
|
|
|
|
name: 'mainAdjust',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-盘点导入
|
|
|
|
export function mainAdjustImport(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '导入',
|
|
|
|
name: 'mainAdjustImport',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 主列表-生成到货检验申请
|
|
|
|
export function mainInspectRequestBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '生成到货检验申请',
|
|
|
|
name: 'inspectRequest',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-生成采购上架申请
|
|
|
|
export function mainPutawayRequestBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '生成采购上架申请',
|
|
|
|
name: 'putawayRequest',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-生成盘点调整申请
|
|
|
|
export function mainCountAdjustRequesttBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '生成盘点调整申请',
|
|
|
|
name: 'countAdjustRequest',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-重盘
|
|
|
|
export function mainReCountBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '重盘',
|
|
|
|
name: 'mainReCount',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-监盘
|
|
|
|
export function mainSuperviseCountBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '监盘',
|
|
|
|
name: 'mainSuperviseCount',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
// 主列表-解冻
|
|
|
|
export function mainThawRequesttBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '解冻',
|
|
|
|
name: 'mainThaw',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-选择设备
|
|
|
|
export function selectDeviceBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '选择设备',
|
|
|
|
name: 'selectDevice',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-二维码
|
|
|
|
export function selectQrCodeBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '二维码',
|
|
|
|
name: 'qrCode',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-备件
|
|
|
|
export function selectItemBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '备件',
|
|
|
|
name: 'selectItem',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-备件
|
|
|
|
export function replaceLocation(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '更换库位',
|
|
|
|
name: 'replaceLocation',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 主列表-备件选设备
|
|
|
|
export function chooseDeviceBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '选择设备',
|
|
|
|
name: 'chooseDevice',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 审批通过按钮
|
|
|
|
export function agree(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '通过',
|
|
|
|
name: 'agree',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
// icon: 'ep:plus',
|
|
|
|
color: 'green',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 审批驳回按钮
|
|
|
|
export function disAgree(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '驳回',
|
|
|
|
name: 'disAgree',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
// icon: 'ep:plus',
|
|
|
|
color: 'red',
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-撤销
|
|
|
|
export function backoutBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '撤销',
|
|
|
|
name: 'backout',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-撤销
|
|
|
|
export function approveBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '审批',
|
|
|
|
name: 'approve',
|
|
|
|
hide: false,
|
|
|
|
type: 'danger',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-接单
|
|
|
|
export function acceptOrderBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '接单',
|
|
|
|
name: 'acceptOrder',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-转办
|
|
|
|
export function turnOrderBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '转办',
|
|
|
|
name: 'turnOrder',
|
|
|
|
hide: false,
|
|
|
|
type: 'warning',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
//主列表-维修
|
|
|
|
export function repairBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '维修',
|
|
|
|
name: 'repair',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-验证
|
|
|
|
export function verifyOrderBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '验证',
|
|
|
|
name: 'verifyOrder',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-检修
|
|
|
|
export function mainInspectionOrderBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '检修',
|
|
|
|
name: 'mainInspectionOrder',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-完成
|
|
|
|
export function finishOrderBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '完成',
|
|
|
|
name: 'finishOrder',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 主列表-完成
|
|
|
|
export function uploadFileBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '文件操作',
|
|
|
|
name: 'upload',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-完成
|
|
|
|
export function viewBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '预览',
|
|
|
|
name: 'view',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-完成
|
|
|
|
export function pictureBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '照片',
|
|
|
|
name: 'picture',
|
|
|
|
hide: false,
|
|
|
|
type: 'success',
|
|
|
|
color: '',
|
|
|
|
link: true, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 主列表-二维码
|
|
|
|
export function selectQrCodeBatchBtn(option:any) {
|
|
|
|
return __defaultBtnOption(option,{
|
|
|
|
label: '批量生成标签',
|
|
|
|
name: 'qrCodeBatch',
|
|
|
|
hide: false,
|
|
|
|
type: 'primary',
|
|
|
|
color: '',
|
|
|
|
link: false, // 文本展现按钮
|
|
|
|
hasPermi: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// 默认按钮规则
|
|
|
|
function __defaultBtnOption(option:any,specific:any){
|
|
|
|
return {
|
|
|
|
type:option && option.type ? option.type : specific.type,
|
|
|
|
disabled:option && option.disabled ? option.disabled : specific.disabled,
|
|
|
|
plain:option && option.plain ? option.plain : specific.plain,
|
|
|
|
icon:option && option.icon ? option.icon : specific.icon,
|
|
|
|
label:option && option.label ? option.label : specific.label,
|
|
|
|
name:option && option.name ? option.name : specific.name,
|
|
|
|
size:option && option.size ? option.size : specific.size,
|
|
|
|
float:option && option.float ? option.float : (specific.float || null),
|
|
|
|
url:option && option.url ? option.url : (specific.url || null),
|
|
|
|
background:option && option.background ? option.background : (specific.background || null),
|
|
|
|
class:option && option.class ? option.class : specific.class,
|
|
|
|
color:option && option.color ? option.color : specific.color,
|
|
|
|
hide:option && option.hide ? option.hide : specific.hide,
|
|
|
|
link:option && option.link ? option.link : specific.link,
|
|
|
|
hasPermi:option && option.hasPermi ? option.hasPermi : specific.hasPermi,
|
|
|
|
...option
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|