import CONFIG from "@/config"; export const TableColumns = [ { item: { key: "supplierName", title: "供应商" }, attr: {}, }, { item: { key: "puOrgName", title: "采购组织" }, attr: {}, }, { item: { key: "customerName", title: "客户" }, attr: {}, }, { item: { key: "priceType", title: "价格类型" }, attr: { component: "el-dict-tag", dictName: "sys_price_type" }, }, { item: { key: "effectiveDate", title: "价格生效日期" }, attr: {}, }, { item: { key: "endDate", title: "价格失效日期" }, attr: {}, }, { item: { key: "tax", title: "税率 (%)" }, attr: { component: "el-computed-input-v2", formatter: (prop) => { return (prop.tax * 1).toFixed(CONFIG.precision); }, }, }, { item: { key: "taxFreePrice", title: "无税单价" }, attr: { component: "el-computed-input-v2", formatter: (prop = 0) => { return (prop.tax * 1).toFixed(CONFIG.precision); }, }, }, { item: { key: "taxPrice", title: "主含税单价" }, attr: { component: "el-computed-input-v2", formatter: (prop = 0) => { return (prop.tax * 1).toFixed(CONFIG.precision); }, }, }, { item: { key: "purchaseQuantity", title: "本次采购数量" }, attr: { component: "el-input-number", min: () => 0, max: (prop) => { const { puQty = 0, executeQty = 0 } = prop; return puQty - executeQty; }, controlsPosition: "right", }, }, { item: { key: "arrivalDatePlan", title: "计划到货日期" }, attr: { component: "el-date-picker", valueFormat: "yyyy-MM-dd", pickerOptions: { disabledDate(time) { return time.getTime() < Date.now(); }, }, }, }, { item: { key: "note", title: "备注" }, attr: { component: "el-input", autosize: true, type: "textarea", }, }, ];