|
@@ -1,3 +1,5 @@
|
|
|
|
+import CONFIG from "@/config";
|
|
|
|
+
|
|
export const TableColumns = [
|
|
export const TableColumns = [
|
|
{
|
|
{
|
|
item: { key: "supplierName", title: "供应商" },
|
|
item: { key: "supplierName", title: "供应商" },
|
|
@@ -13,7 +15,7 @@ export const TableColumns = [
|
|
},
|
|
},
|
|
{
|
|
{
|
|
item: { key: "priceType", title: "价格类型" },
|
|
item: { key: "priceType", title: "价格类型" },
|
|
- attr: { component: "dict-tag", dictName: "sys_price_type" },
|
|
|
|
|
|
+ attr: { component: "el-dict-tag", dictName: "sys_price_type" },
|
|
},
|
|
},
|
|
{
|
|
{
|
|
item: { key: "effectiveDate", title: "价格生效日期" },
|
|
item: { key: "effectiveDate", title: "价格生效日期" },
|
|
@@ -24,32 +26,34 @@ export const TableColumns = [
|
|
attr: {},
|
|
attr: {},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- item: { key: "newTax", title: "税率" },
|
|
|
|
|
|
+ item: { key: "tax", title: "税率" },
|
|
attr: {
|
|
attr: {
|
|
- component: "dr-computed-input",
|
|
|
|
|
|
+ component: "el-computed-input-v2",
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- const { tax } = prop;
|
|
|
|
- return (tax * 1).toFixed(6) + "%";
|
|
|
|
|
|
+ return (prop * 1).toFixed(CONFIG.precision) + "%";
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
item: { key: "taxFreePrice", title: "无税单价" },
|
|
item: { key: "taxFreePrice", title: "无税单价" },
|
|
attr: {
|
|
attr: {
|
|
- component: "dr-computed-input",
|
|
|
|
|
|
+ component: "el-computed-input-v2",
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- const { taxFreePrice } = prop;
|
|
|
|
- return (taxFreePrice * 1).toFixed(6);
|
|
|
|
|
|
+ return (prop * 1).toFixed(CONFIG.precision);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ listeners: {
|
|
|
|
+ click: (prop) => {
|
|
|
|
+ console.log("prop", prop);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
item: { key: "taxPrice", title: "主含税单价" },
|
|
item: { key: "taxPrice", title: "主含税单价" },
|
|
attr: {
|
|
attr: {
|
|
- component: "dr-computed-input",
|
|
|
|
|
|
+ component: "el-computed-input-v2",
|
|
formatter: (prop) => {
|
|
formatter: (prop) => {
|
|
- const { taxPrice } = prop;
|
|
|
|
- return (taxPrice * 1).toFixed(6);
|
|
|
|
|
|
+ return (prop * 1).toFixed(CONFIG.precision);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -59,7 +63,8 @@ export const TableColumns = [
|
|
component: "el-input-number",
|
|
component: "el-input-number",
|
|
min: () => 0,
|
|
min: () => 0,
|
|
max: (prop) => {
|
|
max: (prop) => {
|
|
- return prop.puQty - (prop.executeQty || 0);
|
|
|
|
|
|
+ const { puQty = 0, executeQty = 0 } = prop;
|
|
|
|
+ return puQty - executeQty;
|
|
},
|
|
},
|
|
controlsPosition: "right",
|
|
controlsPosition: "right",
|
|
},
|
|
},
|
|
@@ -69,7 +74,6 @@ export const TableColumns = [
|
|
attr: {
|
|
attr: {
|
|
component: "el-date-picker",
|
|
component: "el-date-picker",
|
|
valueFormat: "yyyy-MM-dd",
|
|
valueFormat: "yyyy-MM-dd",
|
|
- width: 300,
|
|
|
|
pickerOptions: {
|
|
pickerOptions: {
|
|
disabledDate(time) {
|
|
disabledDate(time) {
|
|
return time.getTime() < Date.now();
|
|
return time.getTime() < Date.now();
|