123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- import CONFIG from "@/config";
- export default function useColumns() {
- const TableColumns = [
- { item: { key: "priceCode", title: "价格编码", width: 150 }, attr: {} },
- {
- item: { key: "status", title: "状态", width: 100 },
- attr: { is: "el-dict-tag", dictName: "sys_status", width: 100 },
- },
- { item: { key: "supplierName", title: "供应商", width: 150 }, attr: {} },
- { item: { key: "currencyName", title: "币种", width: 100 }, attr: {} },
- {
- item: { key: "explainStr", title: "价格合理性说明", width: 100 },
- attr: {},
- },
- { item: { key: "buyerName", title: "采购员", width: 100 }, attr: {} },
- { item: { key: "puDeptName", title: "采购部门", width: 100 }, attr: {} },
- {
- item: { key: "file", title: "附件", filter: false, width: 100 },
- attr: { is: "el-file-preview" },
- },
- { item: { key: "createByName", title: "创建人", width: 100 }, attr: {} },
- {
- item: { key: "isEffective", title: "是否已推价格", width: 100 },
- attr: { is: "el-dict-tag", dictName: "is_effective"},
- },
- {
- item: { key: "approveTime", title: "单据申请日期", width: 100 },
- attr: {},
- },
- {
- item: { key: "sourceType", title: "来源单据类型", width: 100 },
- attr: { is: "el-dict-tag", dictName: "price_source" },
- },
- // 加个字典获取收回模板id
- {
- item: { key: "", title: "", width: 0 },
- attr: { dictName: "oa_templete_id" },
- },
- ].map(({ item, attr }) => ({
- attr,
- item: {
- ...item,
- sortabled: true,
- fixedabled: true,
- filterabled: true,
- hiddenabled: true,
- },
- }));
- const SearchColumns = [
- {
- item: {
- key: "priceCode",
- title: "价格编码",
- },
- attr: {
- clearable: true,
- is: "el-input",
- },
- },
- {
- item: { key: "supplierName", title: "供应商" },
- attr: {
- is: "el-popover-select-v2",
- referName: "SUPPLIER_PARAM",
- valueKey: "name",
- dataMapping: { supplier: "id", supplierName: "name" },
- },
- },
- {
- item: { key: "puOrgName", title: "采购组织" },
- attr: {
- is: "el-popover-select-v2",
- referName: "ORG_PARAM",
- valueKey: "name",
- dataMapping: { puOrg: "id", puOrgName: "name" },
- },
- },
- // {
- // item: { key: "buyerName", title: "采购员" },
- // attr: {
- // is: "el-popover-select-v2",
- // referName: "CONTACTS_PARAM",
- // valueKey: "name",
- // dataMapping: { buyer: "code", buyerName: "name" },
- // },
- // },
- {
- item: {
- key: "buyerList",
- title: "采购员",
- },
- attr: {
- clearable: true,
- is: "el-popover-multiple-select-v2",
- referName: "CONTACTS_PARAM",
- valueKey: "code",
- },
- },
- {
- item: { key: "materialCodeList", title: "物料编码" },
- attr: {
- clearable: true,
- is: "el-popover-multiple-select-v2",
- valueKey: "code",
- referName: "MATERIAL_PARAM",
- },
- },
- {
- item: { key: "materialCodes", title: "物料编码" },
- attr: {
- clearable: true,
- is: "el-input",
- placeholder: '多物料编码使用 , 隔开',
- },
- },
- {
- item: { width: 100, key: "manufacturer", title: "生产厂家" },
- attr: {
- is: "el-popover-select-v2",
- clearable: true,
- referName: "MANUFACTURER_PARAM",
- valueKey: "id",
- dataMapping: {
- manufacturer: "id",
- manufacturerName: "name",
- },
- },
- },
- // {
- // item: { key: "currencyName", title: "币种" },
- // attr: {
- // is: "el-popover-select-v2",
- // referName: "CURRENCY_PARAM",
- // valueKey: "name",
- // dataMapping: { currency: "id", currencyName: "name" },
- // },
- // },
- // {
- // item: { key: "puDeptName", title: "采购部门" },
- // attr: {
- // is: "el-popover-select-v2",
- // referName: "DEPT_PARAM",
- // valueKey: "name",
- // dataMapping: { puDept: "id", puDeptName: "name" },
- // },
- // },
- {
- item: { key: "isEffective", title: "是否推价" },
- attr: {
- is: "el-select",
- dictName: "is_effective",
- clearable: true,
- },
- },
- {
- item: { key: "status", title: "状态" },
- attr: {
- is: "el-select",
- dictName: "sys_status",
- clearable: true,
- },
- },
- {
- item: { key: "explainStr", title: "内审备注" },
- attr: {
- clearable: true,
- is: "el-input",
- },
- },
- {
- item: { width: 100, key: "billDates", title: "单据日期", span: 8 },
- attr: {
- clearable: true,
- is: "el-date-picker",
- type: "datetimerange",
- rangeSeparator: "至",
- startPlaceholder: "开始日期",
- endPlaceholder: "结束日期",
- valueFormat: "yyyy-MM-dd hh:mm:ss",
- },
- },
- ];
- return { TableColumns, SearchColumns };
- }
|