东驰前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1452 lines
35 KiB

// 页面基础按钮样式
/**
* 如果需要更改配置,格式如:defaultExportBtn({label:'自定义'})
* @param {*} option
* @returns
*/
const { t } = useI18n()
// 新增按钮
export function defaultAddBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.动态数据`).replace('ts.', ''),
name: 'add',
hide: false,
type: 'primary',
icon: 'ep:plus',
color: '',
hasPermi: ''
})
}
export function defaultAddStaticBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.静态数据`).replace('ts.', ''),
name: 'add',
hide: false,
type: 'warning',
icon: 'ep:plus',
color: '',
hasPermi: ''
})
}
// 导入按钮
export function defaultImportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导入`).replace('ts.', ''),
name: 'import',
hide: false,
type: 'warning',
icon: 'ep:upload',
color: '',
hasPermi: ''
})
}
// 导出按钮
export function defaultExportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出数据`).replace('ts.', ''),
name: 'export',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
})
}
// 导出明细按钮
export function defaultExportDetailsBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出明细`).replace('ts.', ''),
name: 'export-details',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
})
}
// 导出明细按钮
export function defaultExportTableBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.导出二维表`).replace('ts.', ''),
name: 'export-table',
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: t(`ts.刷新`).replace('ts.', ''),
name: 'refresh',
hide: false,
type: 'primary',
icon: 'ep:refresh',
color: '',
float: 'right',
hasPermi: ''
})
}
// 重置按钮
export function defaultResetBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.重置`).replace('ts.', ''),
name: 'reset',
hide: false,
type: 'info',
icon: '',
color: '',
float: 'right',
hasPermi: ''
})
}
// 字段设置
export function defaultSetBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.设置`).replace('ts.', ''),
name: 'set',
hide: false,
type: 'info',
icon: 'ep:setting',
color: '',
float: 'right',
hasPermi: ''
})
}
// 筛选按钮
export function defaultFilterBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.筛选`).replace('ts.', ''),
name: 'filtrate',
hide: false,
type: 'info',
icon: 'ep:operation',
color: '',
float: 'right',
hasPermi: ''
})
}
// 筛选——查询按钮
export function defaultSearchBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.搜索`).replace('ts.', ''),
name: 'search',
hide: false,
type: 'primary',
icon: '',
color: '',
float: 'right',
hasPermi: ''
})
}
// 筛选——重置按钮
export function defaultSearchResetBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.重置`).replace('ts.', ''),
name: 'searchReset',
hide: false,
type: 'info',
icon: '',
color: '',
float: 'right',
hasPermi: ''
})
}
// 选择当页
export function defaultWhenPageBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.选择当页`).replace('ts.', ''),
name: 'WhenPage',
hide: false,
type: 'primary',
color: '',
float: 'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// 反选当页
export function defaultUnselectPageBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.反选当页`).replace('ts.', ''),
name: 'UnselectPage',
hide: false,
type: 'primary',
color: '',
float: 'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// 取消全选
export function defaultDeselectAllBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.取消全选`).replace('ts.', ''),
name: 'DeselectAll',
hide: false,
type: 'primary',
color: '',
float: 'right',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// form表单-保存按钮
export function formSaveBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.保存`).replace('ts.', ''),
name: 'save',
hide: false,
type: 'primary',
icon: 'ep:select',
color: '',
float: 'right',
hasPermi: ''
})
}
// form表单-关闭按钮
export function formCloseBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'close',
hide: false,
icon: 'ep:close',
color: '',
float: 'right',
hasPermi: ''
})
}
// form表单-关闭按钮
export function formStagingBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`btn.暂存`).replace('btn.', ''),
name: 'staging',
hide: false,
color: 'green',
float: 'right',
hasPermi: ''
})
}
// form表单-下一步按钮
export function formNextStepBtn(option:any) {
return __defaultBtnOption(option,{
label: t(`ts.下一步`).replace('ts.', ''),
name: 'nextStep',
hide: false,
type: 'primary',
icon: 'ep:select',
color: '',
float:'right',
hasPermi: ''
})
}
// drawer抽屉头部-编辑按钮
export function drawerEditBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.编辑`).replace('ts.', ''),
name: 'edit',
hide: false,
type: 'warning',
icon: 'ep:editPen',
color: '',
hasPermi: ''
})
}
// drawer抽屉头部-删除按钮
export function drawerDeleteBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.删除`).replace('ts.', ''),
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: t(`ts.编辑`).replace('ts.', ''),
name: 'edit',
hide: false,
type: 'warning',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListReleaseBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发布`).replace('ts.', ''),
name: 'release',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-删除按钮
export function mainListDeleteBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.删除`).replace('ts.', ''),
name: 'delete',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListEnableBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.启用`).replace('ts.', ''),
name: 'enable',
hide: false,
type: 'success',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListDisableBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.禁用`).replace('ts.', ''),
name: 'disable',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-中止按钮1
export function mainListSuspend1Btn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.中止`).replace('ts.', ''),
name: 'suspend',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-中止按钮2
export function mainListSuspend2Btn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.中止`).replace('ts.', ''),
name: 'suspend',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-领取按钮
export function mainListReceiveBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.领取`).replace('ts.', ''),
name: 'receive',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-接单按钮
export function mainListReceiveOrderBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.接单`).replace('ts.', ''),
name: 'receive',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-执行按钮
export function mainListExecuteBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.执行`).replace('ts.', ''),
name: 'execute',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-转办按钮
export function mainListTransferBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.转办`).replace('ts.', ''),
name: 'transfer',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-完成按钮
export function mainListFinishBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.完成`).replace('ts.', ''),
name: 'finish',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListSendBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发送邮件`).replace('ts.', ''),
name: 'send',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-作废按钮
export function mainListCancelBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.作废`).replace('ts.', ''),
name: 'cancel',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-验证按钮
export function mainListValidateBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.验证`).replace('ts.', ''),
name: 'validate',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-报修验证按钮
export function mainListValidateReportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.报修验证`).replace('ts.', ''),
name: 'validate_report',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-维修验证按钮
export function mainListValidateRepairBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.维修验证`).replace('ts.', ''),
name: 'validate_repair',
hide: false,
type: 'primary',
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 mainListAuditingBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.审核`).replace('ts.', ''),
name: 'auditing',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-审核完成按钮
export function mainListAuditedBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.审核完成`).replace('ts.', ''),
name: 'audited',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-撤回按钮
export function mainListRevokeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.撤回`).replace('ts.', ''),
name: 'revoke',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-绑定
export function mainListBindBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.绑定`).replace('ts.', ''),
name: 'bind',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-关闭按钮
export function mainListCloseBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainClose',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-重新添加按钮
export function mainListReAddBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.重新添加`).replace('ts.', ''),
name: 'mainReAdd',
hide: false,
type: 'warning',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-提交审批按钮
export function mainListSubmitBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.提交审批`).replace('ts.', ''),
name: 'mainSubmit',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-驳回按钮
export function mainListTurnDownBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.驳回`).replace('ts.', ''),
name: 'mainTurnDown',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-审批通过按钮
export function mainListApproveBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.审批通过`).replace('ts.', ''),
name: 'mainApprove',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-处理按钮
export function mainListHandleBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.处理`).replace('ts.', ''),
name: 'mainHandle',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-申请流程-作废按钮
export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.撤销`).replace('ts.', ''),
name: 'abort',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-发布按钮
export function mainListOrderPubBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发布`).replace('ts.', ''),
name: 'mainOrderPub',
hide: false,
type: 'success',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-批量发布按钮
export function mainListSelectionOrderPubBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.批量发布`).replace('ts.', ''),
name: 'mainOrderSelectionPub',
hide: false,
type: 'primary',
color: '',
float: 'left',
link: false, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-关闭按钮
export function mainListOrderCloBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainOrderClo',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-打开按钮
export function mainListOrderOpeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打开`).replace('ts.', ''),
name: 'mainOrderOpe',
hide: false,
type: 'warning',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-下架按钮
export function mainListOrderWitBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.下架`).replace('ts.', ''),
name: 'mainOrderWit',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-打开按钮
export function mainListPlanOpeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打开`).replace('ts.', ''),
name: 'mainPlanOpe',
hide: false,
type: 'warning',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-关闭按钮
export function mainListPlanCloBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainPlanClo',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-上传质量报告
export function mainListPlanUploadQualityReportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.上传质量报告`).replace('ts.', ''),
name: 'mainPlanUploadQualityReport',
hide: false,
type: 'primary',
width: 86,
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListPlanCheckQualityReportBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.查看质检报告`).replace('ts.', ''),
name: 'mainPlanCheckQualityReport',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListSupplierResumeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.查看履历表`).replace('ts.', ''),
name: 'mainSupplierResume',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-提交审批按钮
export function mainListPlanSubBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.提交审批`).replace('ts.', ''),
name: 'mainPlanSub',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-驳回按钮
export function mainListPlanTurBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.驳回`).replace('ts.', ''),
name: 'mainPlanTur',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-重置按钮
export function mainListPlanResBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.重置`).replace('ts.', ''),
name: 'mainPlanRes',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-审批通过按钮
export function mainListPlanAppBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.审批通过`).replace('ts.', ''),
name: 'mainPlanApp',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-发布按钮
export function mainListPlanPubBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发布`).replace('ts.', ''),
name: 'mainPlanPub',
hide: false,
type: 'success',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-计划流程-执行按钮
export function mainListPlanComBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.执行`).replace('ts.', ''),
name: 'mainPlanCom',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-修改按钮
export function mainListPurchasePlanModBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.修改`).replace('ts.', ''),
name: 'mainPurPlanMod',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-下架按钮
export function mainListPurchasePlanWitBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.下架`).replace('ts.', ''),
name: 'mainPurPlanWit',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-不接受按钮
export function mainListPurchasePlanRejBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.不接受`).replace('ts.', ''),
name: 'mainPurPlanRej',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-接受按钮
export function mainListPurchasePlanAccBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.接受`).replace('ts.', ''),
name: 'mainPurPlanAcc',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-发布按钮
export function mainListPurchasePlanPubBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发布`).replace('ts.', ''),
name: 'mainPurPlanPub',
hide: false,
type: 'success',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-关闭按钮
export function mainListPurchasePlanCloBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainPurPlanClo',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-要货计划流程-打开按钮
export function mainListPurchasePlanOpeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打开`).replace('ts.', ''),
name: 'mainPurPlanOpe',
hide: false,
type: 'warning',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-任务流程-承接按钮
export function mainListJobAccBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.承接`).replace('ts.', ''),
name: 'mainJobAcc',
hide: false,
type: 'success',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-任务流程-关闭按钮
export function mainListJobCloBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.关闭`).replace('ts.', ''),
name: 'mainJobClo',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-任务流程-放弃按钮
export function mainListJobAbaBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.取消承接`).replace('ts.', ''),
name: 'mainJobAba',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-任务流程-执行按钮
export function mainListJobExeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.执行`).replace('ts.', ''),
name: 'mainJobExe',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-任务流程-执行按钮(与执行按钮一致 只是名改叫'收货'而已)
export function mainListJobRecBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.收货`).replace('ts.', ''),
name: 'mainJobExe',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-包装按钮
export function mainListPackageBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.包装`).replace('ts.', ''),
name: 'mainPackage',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-供应商对账打印
export function mainListPrintBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打印`).replace('ts.', ''),
name: 'print',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-供应商对账回函录入
export function mainListReplyInputBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.回函录入`).replace('ts.', ''),
name: 'replyInput',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-打印
export function mainListPointBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打印标签`).replace('ts.', ''),
name: 'point',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
export function mainListPrintInspectionBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.打印检验指引单`).replace('ts.', ''),
name: 'printInspection',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-回收
export function mainListRecoveryBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.撤销报工`).replace('ts.', ''),
name: 'recovery',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-批量打印
export function mainLisSelectiontPointBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.批量打印`).replace('ts.', ''),
name: 'selection_point',
hide: false,
type: 'primary',
icon: 'ep:download',
color: '',
float: 'left',
hasPermi: ''
})
}
// 主列表-批量删除
export function mainLisSelectiontDeleteBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.批量删除`).replace('ts.', ''),
name: 'selection_delete',
hide: false,
type: 'primary',
icon: 'ep:download',
color: '',
float: 'left',
hasPermi: ''
})
}
// 主列表-生成采购收货申请
export function mainListGenerateApplicationBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.生成采购收货申请`).replace('ts.', ''),
name: 'generateApplication',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-打印
export function mainListDocumentPrintBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.单据打印`).replace('ts.', ''),
name: 'documentPrint',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成到货检验申请
export function mainInspectRequestBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.发送到货检验申请`).replace('ts.', ''),
name: 'inspectRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成采购上架申请
export function mainPutawayRequestBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.生成采购上架申请`).replace('ts.', ''),
name: 'putawayRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成采购退货记录
export function mainPurchasereturnRecordBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.生成采购退货记录`).replace('ts.', ''),
name: 'purchasereturnRecord',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成制品上架申请
export function mainPutawayRequestCpBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.生成制品上架申请`).replace('ts.', ''),
name: 'putawayRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成盘点调整申请
export function mainCountAdjustRequesttBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.生成盘点调整申请`).replace('ts.', ''),
name: 'countAdjustRequest',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-重盘
export function mainReCountBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.重盘`).replace('ts.', ''),
name: 'mainReCount',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-监盘
export function mainSuperviseCountBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.监盘`).replace('ts.', ''),
name: 'mainSuperviseCount',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-解冻
export function mainThawRequesttBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.解冻`).replace('ts.', ''),
name: 'mainThaw',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-更新检验记录
export function mainUpdataRecodeBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.更新检验记录`).replace('ts.', ''),
name: 'updataRecode',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-使用决策
export function mainApplyDecisionBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.使用决策`).replace('ts.', ''),
name: 'applyDecision',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-复制
export function mainCopyBtn(option: any) {
return __defaultBtnOption(option, {
label: '复制',
name: 'copy',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-部件
export function componentBtn(option: any) {
return __defaultBtnOption(option, {
label: '关联部件',
name: 'component',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-备件
export function sparePartBtn(option: any) {
return __defaultBtnOption(option, {
label: '关联备件',
name: 'sparePart',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成维修经验
export function repairExperienceBtn(option: any) {
return __defaultBtnOption(option, {
label: '生成维修经验',
name: 'repairExperience',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-生成保养经验
export function maintainExperienceBtn(option: any) {
return __defaultBtnOption(option, {
label: '生成保养经验',
name: 'maintainExperience',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-撤销
export function backoutBtn(option: any) {
return __defaultBtnOption(option, {
label: '撤销',
name: 'backout',
hide: false,
type: 'danger',
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 mainAdjustImport(option: any) {
return __defaultBtnOption(option, {
label: '导入',
name: 'mainAdjustImport',
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 approveBtn(option: any) {
return __defaultBtnOption(option, {
label: '审批',
name: 'approve',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-出库
export function outBtn(option: any) {
return __defaultBtnOption(option, {
label: '出库',
name: 'out',
hide: false,
type: 'danger',
color: '',
link: true, // 文本展现按钮
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,
width: option && option.width ? option.width : specific.width,
...option
}
}