|
@@ -4,10 +4,13 @@
|
|
|
class="productPreview-modal"
|
|
|
:footer="null"
|
|
|
:maskClosable="false"
|
|
|
- :title="title"
|
|
|
v-model="isShow"
|
|
|
@cancel="isShow=false"
|
|
|
width="80%">
|
|
|
+ <template slot="title">
|
|
|
+ <div v-if="resObj"><strong>{{ resObj.tit }}</strong>(已选<span style="color:#ed1c24;">{{ dataList.length }}</span>项)</div>
|
|
|
+ <span v-else>预览弹窗</span>
|
|
|
+ </template>
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<div style="height:540px;">
|
|
|
<ve-table
|
|
@@ -20,8 +23,8 @@
|
|
|
<div v-show="newDataList&&newDataList.length==0" class="empty-data" style="height:'300px'"><a-empty description="暂无数据" :image="simpleImage"/></div>
|
|
|
</div>
|
|
|
<div class="btn-cont">
|
|
|
- <a-button type="primary" v-if="resObj&&resObj.promotionRuleSn" style="margin-right:20px;" @click="handleExport" :loading="exportLoading">导出</a-button>
|
|
|
- <a-button id="productPreview-back" @click="isShow = false">关闭</a-button>
|
|
|
+ <a-button type="primary" v-if="resObj&&resObj.promotionRuleSn" style="margin-right:20px;" @click="handleExport" :loading="exportLoading">导出</a-button>
|
|
|
+ <a-button id="productPreview-back" @click="isShow = false">关闭</a-button>
|
|
|
</div>
|
|
|
</a-spin>
|
|
|
</a-modal>
|
|
@@ -49,7 +52,6 @@ export default {
|
|
|
return {
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
|
- title: '预览弹窗',
|
|
|
titName: '',
|
|
|
resObj: {},
|
|
|
exportLoading: false,
|
|
@@ -59,15 +61,12 @@ export default {
|
|
|
{ title: '产品编码', field: 'productCode', key: 'b', width: '40%', align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } },
|
|
|
{ title: '起订量', field: 'unitTypeInfo', key: 'c', width: '40%', align: 'center', operationColumn: false, renderBodyCell: ({ row, column }) => { return row[column.field] || '--' } }
|
|
|
],
|
|
|
- newDataList:this.dataList
|
|
|
+ newDataList: this.dataList
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
pageInit (obj) {
|
|
|
this.resObj = obj
|
|
|
- this.$nextTick(()=>{
|
|
|
- this.title = obj.tit + '(已选' + this.dataList.length + '项)'
|
|
|
- })
|
|
|
},
|
|
|
// 导出
|
|
|
handleExport () {
|
|
@@ -94,10 +93,10 @@ export default {
|
|
|
isShow (newValue, oldValue) {
|
|
|
if (!newValue) {
|
|
|
this.$emit('close')
|
|
|
- }else{
|
|
|
- if(this.dataList&&this.dataList.length>0){
|
|
|
- this.newDataList = this.dataList.map((item,i)=>{
|
|
|
- item.no = i*1+1
|
|
|
+ } else {
|
|
|
+ if (this.dataList && this.dataList.length > 0) {
|
|
|
+ this.newDataList = this.dataList.map((item, i) => {
|
|
|
+ item.no = i * 1 + 1
|
|
|
return item
|
|
|
})
|
|
|
}
|