|
@@ -15,11 +15,11 @@
|
|
|
<template slot="productType" slot-scope="text, record,index">
|
|
|
<div style="max-height:126px;width:100%;overflow-y:scroll;" v-if="record.dataSourceOrigin=='0'">
|
|
|
<a-row v-if="record.productTypeArr && record.productTypeArr.length>0">
|
|
|
- <a-col :span="16">
|
|
|
+ <a-col :span="17">
|
|
|
<div v-for="con in record.productTypeArr" :key="con.id">
|
|
|
- <a-tooltip v-if="con.title&&con.title.length > 3" :title="con.title">
|
|
|
+ <a-tooltip v-if="con.title&&con.title.length > 7" :title="con.title">
|
|
|
<a-tag style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,con,'typeList')">
|
|
|
- {{ `${con.title.slice(0, 3)}...` }}
|
|
|
+ {{ `${con.title.slice(0, 7)}...` }}
|
|
|
</a-tag>
|
|
|
</a-tooltip>
|
|
|
<a-tag v-else style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,con,'typeList')">
|
|
@@ -27,7 +27,7 @@
|
|
|
</a-tag>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
- <a-col :span="4" style="text-align:right;">
|
|
|
+ <a-col :span="6" style="text-align:right;">
|
|
|
<a-tag style="background: #fff; borderStyle: dashed;" @click="addClassifyTag(index, record)" color="blue">
|
|
|
<a-icon type="plus" />
|
|
|
</a-tag>
|
|
@@ -47,11 +47,11 @@
|
|
|
<template slot="productBrand" slot-scope="text, record,index">
|
|
|
<div style="max-height:126px;overflow-y:scroll;" v-if="record.dataSourceOrigin=='0'">
|
|
|
<a-row v-if="record.productBrandArr && record.productBrandArr.length>0">
|
|
|
- <a-col :span="16">
|
|
|
+ <a-col :span="17">
|
|
|
<div v-for="item in record.productBrandArr" :key="item.brandSn">
|
|
|
- <a-tooltip v-if="item.brandName&&item.brandName.length > 3" :title="item.brandName">
|
|
|
+ <a-tooltip v-if="item.brandName&&item.brandName.length > 7" :title="item.brandName">
|
|
|
<a-tag style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
|
|
|
- {{ `${item.brandName.slice(0, 3)}...` }}
|
|
|
+ {{ `${item.brandName.slice(0, 7)}...` }}
|
|
|
</a-tag>
|
|
|
</a-tooltip>
|
|
|
<a-tag v-else style="margin-bottom:10px;" closable @close.prevent="delLabel(record.productScopeSn,item,'brandList')">
|
|
@@ -60,7 +60,7 @@
|
|
|
</div>
|
|
|
</a-col>
|
|
|
|
|
|
- <a-col :span="4" style="text-align:right;">
|
|
|
+ <a-col :span="6" style="text-align:right;">
|
|
|
<a-tag style="background: #fff; borderStyle: dashed;" @click="addBrandTag(index, record)" color="blue">
|
|
|
<a-icon type="plus" />
|
|
|
</a-tag>
|
|
@@ -86,13 +86,13 @@
|
|
|
<div v-if="record.dataSourceOrigin=='1'">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
+ style="width:90%;"
|
|
|
v-model="record.provinceDiscountPrice"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
:precision="2"
|
|
|
placeholder="请输入"
|
|
|
- :max="record.provincePrice"
|
|
|
+ :max="999999"
|
|
|
@blur="e=>calculatePrice(e.target.value,record.productScopeSn,'province')"/>
|
|
|
</div>
|
|
|
<span v-else>--</span>
|
|
@@ -101,29 +101,30 @@
|
|
|
<template slot="provinceDiscount" slot-scope="text, record">
|
|
|
<div v-if="record.dataSourceOrigin=='0'">
|
|
|
<a-input-number
|
|
|
+ style="width:80%;"
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
v-model="record.provinceDiscountRate"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
- :max="100"
|
|
|
+ :max="999999"
|
|
|
+ :precision="2"
|
|
|
placeholder="请输入"
|
|
|
/>%
|
|
|
</div>
|
|
|
- <span v-else>{{ record.provinceDiscountRate?record.provinceDiscountRate+'%':'--' }}</span>
|
|
|
+ <span v-else>{{ (record.provinceDiscountRate||record.provinceDiscountRate==0)?record.provinceDiscountRate+'%':'--' }}</span>
|
|
|
</template>
|
|
|
<!-- 市价特价 -->
|
|
|
<template slot="cityPrice" slot-scope="text, record">
|
|
|
<div v-if="record.dataSourceOrigin=='1'">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
+ style="width:90%;"
|
|
|
v-model="record.cityDiscountPrice"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
:precision="2"
|
|
|
placeholder="请输入"
|
|
|
- :max="record.cityPrice"
|
|
|
+ :max="999999"
|
|
|
@blur="e=>calculatePrice(e.target.value,record.productScopeSn,'city')"/>
|
|
|
</div>
|
|
|
<span v-else>--</span>
|
|
@@ -133,27 +134,28 @@
|
|
|
<div v-if="record.dataSourceOrigin=='0'">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
+ style="width:80%;"
|
|
|
v-model="record.cityDiscountRate"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
- :max="100"
|
|
|
+ :max="999999"
|
|
|
+ :precision="2"
|
|
|
placeholder="请输入"/>%
|
|
|
</div>
|
|
|
- <span v-else>{{ record.cityDiscountRate?record.cityDiscountRate+'%':'--' }}</span>
|
|
|
+ <span v-else>{{ (record.cityDiscountRate||record.cityDiscountRate==0)?record.cityDiscountRate+'%':'--' }}</span>
|
|
|
</template>
|
|
|
<!-- 特约特价 -->
|
|
|
<template slot="specialPrice" slot-scope="text, record">
|
|
|
<div v-if="record.dataSourceOrigin=='1'">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
+ style="width:90%;"
|
|
|
v-model="record.specialDiscountPrice"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
:precision="2"
|
|
|
placeholder="请输入"
|
|
|
- :max="record.specialPrice"
|
|
|
+ :max="999999"
|
|
|
@blur="e=>calculatePrice(e.target.value,record.productScopeSn,'special')"/>
|
|
|
</div>
|
|
|
<span v-else>--</span>
|
|
@@ -163,35 +165,34 @@
|
|
|
<div v-if="record.dataSourceOrigin=='0'">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- style="width:75%;"
|
|
|
+ style="width:80%;"
|
|
|
v-model="record.specialDiscountRate"
|
|
|
:min="0"
|
|
|
:step="1"
|
|
|
- :max="100"
|
|
|
- placeholder="请输入"/>
|
|
|
+ :precision="2"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入"/>%
|
|
|
</div>
|
|
|
- <span v-else>{{ record.specialDiscountRate ? record.specialDiscountRate+'%':'--' }}</span>
|
|
|
+ <span v-else>{{ (record.specialDiscountRate||record.specialDiscountRate==0) ? record.specialDiscountRate+'%':'--' }}</span>
|
|
|
</template>
|
|
|
<!-- 设置起订量 -->
|
|
|
<template slot="setNum" slot-scope="text, record">
|
|
|
- <div>
|
|
|
- <v-select
|
|
|
- v-model="record.unitType"
|
|
|
- size="small"
|
|
|
- style="width:55%;"
|
|
|
- ref="returnReason"
|
|
|
- code="SCOPE_UNIT_TYPE"
|
|
|
- placeholder="请选择"
|
|
|
- allowClear></v-select>
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- style="margin-left:10px;width:30%;"
|
|
|
- v-model="record.unitQty"
|
|
|
- :min="0"
|
|
|
- :step="1"
|
|
|
- :precision="0"
|
|
|
- placeholder="请输入"/>
|
|
|
- </div>
|
|
|
+ <v-select
|
|
|
+ v-model="record.unitType"
|
|
|
+ size="small"
|
|
|
+ ref="returnReason"
|
|
|
+ code="SCOPE_UNIT_TYPE"
|
|
|
+ placeholder="请选择"
|
|
|
+ allowClear></v-select>
|
|
|
+ <a-input-number
|
|
|
+ size="small"
|
|
|
+ style="margin-top:8px;width:100%;"
|
|
|
+ v-model="record.unitQty"
|
|
|
+ :min="0"
|
|
|
+ :step="1"
|
|
|
+ :precision="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入"/>
|
|
|
</template>
|
|
|
<span slot="action" slot-scope="text,record">
|
|
|
<a-button
|
|
@@ -247,20 +248,20 @@ export default {
|
|
|
return {
|
|
|
spinning: false,
|
|
|
columns: [
|
|
|
- { title: '产品分类', width: '11%', scopedSlots: { customRender: 'productType' }, align: 'center' },
|
|
|
- { title: '品牌', width: '11%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
|
|
|
- { title: '产品', scopedSlots: { customRender: 'product' }, width: '8%', align: 'center' },
|
|
|
- { title: '省级原价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '省级特价', scopedSlots: { customRender: 'provincePrice' }, width: '6%', align: 'center' },
|
|
|
- { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '6%', align: 'center' },
|
|
|
- { title: '市级原价', dataIndex: 'cityPrice', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '市级特价', scopedSlots: { customRender: 'cityPrice' }, width: '6%', align: 'center' },
|
|
|
- { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '6%', align: 'center' },
|
|
|
- { title: '特约原价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
- { title: '特约特价', scopedSlots: { customRender: 'specialPrice' }, width: '6%', align: 'center' },
|
|
|
- { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '6%', align: 'center' },
|
|
|
- { title: '设置起订量', width: '12%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
|
|
|
+ { title: '产品分类', width: '16%', scopedSlots: { customRender: 'productType' }, align: 'center' },
|
|
|
+ { title: '品牌', width: '16%', scopedSlots: { customRender: 'productBrand' }, align: 'center' },
|
|
|
+ { title: '产品', scopedSlots: { customRender: 'product' }, width: '10%', align: 'center' },
|
|
|
+ { title: '省级原价', dataIndex: 'provincePrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '省级特价', scopedSlots: { customRender: 'provincePrice' }, width: '5%', align: 'center' },
|
|
|
+ { title: '省级折扣', scopedSlots: { customRender: 'provinceDiscount' }, width: '5%', align: 'center' },
|
|
|
+ { title: '市级原价', dataIndex: 'cityPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '市级特价', scopedSlots: { customRender: 'cityPrice' }, width: '5%', align: 'center' },
|
|
|
+ { title: '市级折扣', scopedSlots: { customRender: 'cityDiscount' }, width: '5%', align: 'center' },
|
|
|
+ { title: '特约原价', dataIndex: 'specialPrice', width: '5%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
|
+ { title: '特约特价', scopedSlots: { customRender: 'specialPrice' }, width: '5%', align: 'center' },
|
|
|
+ { title: '特约折扣', scopedSlots: { customRender: 'specialDiscount' }, width: '5%', align: 'center' },
|
|
|
+ { title: '设置起订量', width: '7%', scopedSlots: { customRender: 'setNum' }, align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
],
|
|
|
dataSource: [],
|
|
|
openBrandModal: false,
|
|
@@ -452,6 +453,7 @@ export default {
|
|
|
})
|
|
|
return snArr
|
|
|
},
|
|
|
+ // 获取最后结果
|
|
|
getResultVal () {
|
|
|
const resultObj = JSON.parse(JSON.stringify(this.dataSource))
|
|
|
resultObj.map(item => {
|