|
@@ -22,6 +22,9 @@
|
|
:scroll="{ y: 200 }"
|
|
:scroll="{ y: 200 }"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <template slot="unitTypeShow" slot-scope="text,record">
|
|
|
|
+ {{ record.unitType==='SL'?'按数量设置':'按整箱设置' }}
|
|
|
|
+ </template>
|
|
</a-table>
|
|
</a-table>
|
|
<a-divider />
|
|
<a-divider />
|
|
<!-- 不可导入数据 -->
|
|
<!-- 不可导入数据 -->
|
|
@@ -37,6 +40,9 @@
|
|
:scroll="{ y: 200 }"
|
|
:scroll="{ y: 200 }"
|
|
:pagination="false"
|
|
:pagination="false"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <template slot="unitTypeShow" slot-scope="text,record">
|
|
|
|
+ {{ record.unitType==='SL'?'按数量设置':'按整箱设置' }}
|
|
|
|
+ </template>
|
|
<template slot="errorMsg" slot-scope="text,record">
|
|
<template slot="errorMsg" slot-scope="text,record">
|
|
<a-popover placement="topRight">
|
|
<a-popover placement="topRight">
|
|
<template slot="content">
|
|
<template slot="content">
|
|
@@ -100,7 +106,8 @@ export default {
|
|
loadData: [],
|
|
loadData: [],
|
|
unLoadData: [],
|
|
unLoadData: [],
|
|
loading: false,
|
|
loading: false,
|
|
- goodsFlag: ''
|
|
|
|
|
|
+ goodsFlag: '',
|
|
|
|
+ discountType: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -109,9 +116,11 @@ export default {
|
|
let columnsArr = [
|
|
let columnsArr = [
|
|
{ title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '50%', align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '起订类型', scopedSlots: { customRender: 'unitTypeShow' }, dataIndex: 'unitType', width: '20%', align: 'center' },
|
|
|
|
+ { title: '起订数量', dataIndex: 'unitQty', width: '20%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } }
|
|
]
|
|
]
|
|
- if (_this.goodsFlag == '0') {
|
|
|
|
|
|
+ if (_this.goodsFlag == '0' && _this.discountType == '0') {
|
|
const arr = [
|
|
const arr = [
|
|
{ title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
@@ -124,12 +133,14 @@ export default {
|
|
nowUnColumns () {
|
|
nowUnColumns () {
|
|
const _this = this
|
|
const _this = this
|
|
const unColumnsArr = [
|
|
const unColumnsArr = [
|
|
- { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品名称', dataIndex: 'product.name', width: '50%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'product.name', width: '25%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '起订类型', scopedSlots: { customRender: 'unitTypeShow' }, dataIndex: 'unitType', width: '15%', align: 'center' },
|
|
|
|
+ { title: '起订数量', dataIndex: 'unitQty', width: '10%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
{ title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '20%', align: 'center' }
|
|
{ title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '20%', align: 'center' }
|
|
]
|
|
]
|
|
- if (_this.goodsFlag == '0') {
|
|
|
|
|
|
+ if (_this.goodsFlag == '0' && _this.discountType == '0') {
|
|
unColumnsArr.splice(3, 0, { title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
|
|
unColumnsArr.splice(3, 0, { title: '省级特价', dataIndex: 'provinceDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
|
|
{ title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
|
|
{ title: '市级特价', dataIndex: 'cityDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } },
|
|
{ title: '特约特价', dataIndex: 'specialDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } })
|
|
{ title: '特约特价', dataIndex: 'specialDiscountPriceText', width: '10%', align: 'right', customRender: function (text) { return text || '--' } })
|
|
@@ -139,7 +150,8 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
setFlag (val) {
|
|
setFlag (val) {
|
|
- this.goodsFlag = val
|
|
|
|
|
|
+ this.goodsFlag = val.goodsFlag
|
|
|
|
+ this.discountType = val.discountType
|
|
},
|
|
},
|
|
getData () {
|
|
getData () {
|
|
const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|
|
const paramsData = JSON.parse(JSON.stringify(this.paramsData))
|