| | |
| | | |
| | | /** 状态常量 */ |
| | | export const PURCHASE_REQUEST_STATUS = { |
| | | PENDING: 0, // 待审批 |
| | | APPROVED: 1, // 已审批 |
| | | REJECTED: 2, // 已拒绝 |
| | | CONVERTED: 3, // 已转订单 |
| | | DRAFT: 0, // 未提交(草稿) |
| | | PROCESSING: 10, // 审批中 |
| | | APPROVED: 20, // 审核通过 |
| | | REJECTED: 30, // 审核不通过 |
| | | CANCELLED: 40, // 已取消 |
| | | }; |
| | | |
| | | /** 表单的配置项 */ |
| | |
| | | rules: 'required', |
| | | }, |
| | | { |
| | | label: '供应商', |
| | | label: '供应商(可选)', |
| | | fieldName: 'supplierId', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'reason', |
| | | fieldName: 'discountPercent', |
| | | label: '优惠率(%)', |
| | | component: 'InputNumber', |
| | | componentProps: { |
| | | placeholder: '请输入优惠率', |
| | | min: 0, |
| | | max: 100, |
| | | precision: 2, |
| | | disabled: formType === 'detail', |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'requestReason', |
| | | label: '申请理由', |
| | | component: 'Textarea', |
| | | componentProps: { |
| | | placeholder: '请输入申请理由', |
| | | autoSize: { minRows: 1, maxRows: 1 }, |
| | | disabled: formType === 'detail', |
| | | }, |
| | | formItemClass: 'col-span-2', |
| | | }, |
| | | { |
| | | fieldName: 'fileUrl', |
| | | label: '附件', |
| | | component: 'FileUpload', |
| | | componentProps: { |
| | | placeholder: '请上传附件', |
| | | maxNumber: 5, |
| | | maxSize: 20, |
| | | accept: ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'jpg', 'png'], |
| | | disabled: formType === 'detail', |
| | | }, |
| | | formItemClass: 'col-span-2', |
| | |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | field: 'requestCount', |
| | | title: '申请数量', |
| | | field: 'count', |
| | | title: '数量', |
| | | minWidth: 120, |
| | | fixed: 'right', |
| | | slots: { default: 'requestCount' }, |
| | | slots: { default: 'count' }, |
| | | }, |
| | | { |
| | | field: 'estimatedPrice', |
| | | title: '预估单价', |
| | | field: 'productPrice', |
| | | title: '单价(参考价)', |
| | | minWidth: 120, |
| | | fixed: 'right', |
| | | slots: { default: 'estimatedPrice' }, |
| | | slots: { default: 'productPrice' }, |
| | | }, |
| | | { |
| | | field: 'totalPrice', |
| | |
| | | formatter: 'formatAmount2', |
| | | }, |
| | | { |
| | | field: 'requiredDate', |
| | | field: 'taxPercent', |
| | | title: '税率(%)', |
| | | minWidth: 100, |
| | | fixed: 'right', |
| | | slots: { default: 'taxPercent' }, |
| | | }, |
| | | { |
| | | field: 'demandTime', |
| | | title: '需求日期', |
| | | minWidth: 140, |
| | | fixed: 'right', |
| | | slots: { default: 'requiredDate' }, |
| | | slots: { default: 'demandTime' }, |
| | | }, |
| | | { |
| | | field: 'remark', |
| | |
| | | }, |
| | | }, |
| | | { |
| | | fieldName: 'requesterId', |
| | | fieldName: 'requestUserId', |
| | | label: '申请人', |
| | | component: 'ApiSelect', |
| | | componentProps: { |
| | |
| | | component: 'Select', |
| | | componentProps: { |
| | | options: [ |
| | | { label: '待审批', value: 0 }, |
| | | { label: '已审批', value: 1 }, |
| | | { label: '已拒绝', value: 2 }, |
| | | { label: '已转订单', value: 3 }, |
| | | { label: '未提交', value: 0 }, |
| | | { label: '审批中', value: 10 }, |
| | | { label: '审核通过', value: 20 }, |
| | | { label: '审核不通过', value: 30 }, |
| | | { label: '已取消', value: 40 }, |
| | | ], |
| | | placeholder: '请选择状态', |
| | | allowClear: true, |
| | |
| | | formatter: 'formatDate', |
| | | }, |
| | | { |
| | | field: 'requesterName', |
| | | field: 'requestUserName', |
| | | title: '申请人', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'estimatedAmount', |
| | | field: 'requestDeptName', |
| | | title: '申请部门', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'totalCount', |
| | | title: '申请数量', |
| | | minWidth: 120, |
| | | formatter: 'formatAmount3', |
| | | }, |
| | | { |
| | | field: 'totalPrice', |
| | | title: '预估金额', |
| | | formatter: 'formatAmount2', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'productNames', |
| | | title: '申请产品', |
| | | minWidth: 150, |
| | | showOverflow: 'tooltip', |
| | | }, |
| | | { |
| | | field: 'orderNo', |
| | | title: '采购订单', |
| | | minWidth: 180, |
| | | }, |
| | | { |
| | | field: 'status', |
| | |
| | | slots: { default: 'status' }, |
| | | }, |
| | | { |
| | | field: 'reason', |
| | | field: 'requestReason', |
| | | title: '申请理由', |
| | | minWidth: 150, |
| | | showOverflow: 'tooltip', |
| | |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 200, |
| | | width: 240, |
| | | fixed: 'right', |
| | | slots: { default: 'actions' }, |
| | | }, |