|
@@ -175,7 +175,7 @@ import { STable, VSelect } from '@/components'
|
|
import editPriceModal from './editPriceModal.vue'
|
|
import editPriceModal from './editPriceModal.vue'
|
|
export default {
|
|
export default {
|
|
name: 'ProductJgList',
|
|
name: 'ProductJgList',
|
|
- components: { STable, VSelect, ProductType, ProductBrand,editPriceModal },
|
|
|
|
|
|
+ components: { STable, VSelect, ProductType, ProductBrand, editPriceModal },
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -223,12 +223,13 @@ export default {
|
|
itemId: '', // 当前产品id
|
|
itemId: '', // 当前产品id
|
|
productTypeList: [], // 分类下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
rowSelectionInfo: null,
|
|
rowSelectionInfo: null,
|
|
- currentDealerInfo:{}
|
|
|
|
|
|
+ currentDealerInfo: {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
rowSelection () {
|
|
rowSelection () {
|
|
return {
|
|
return {
|
|
|
|
+ columnWidth: 40,
|
|
getCheckboxProps: record => ({
|
|
getCheckboxProps: record => ({
|
|
props: {
|
|
props: {
|
|
disabled: record.enabledFlag == undefined // Column configuration not to be checked
|
|
disabled: record.enabledFlag == undefined // Column configuration not to be checked
|
|
@@ -236,9 +237,9 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- columns(){
|
|
|
|
|
|
+ columns () {
|
|
const _this = this
|
|
const _this = this
|
|
- let arr = [
|
|
|
|
|
|
+ let arr = [
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
{ title: '产品编码', dataIndex: 'code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'code', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'name', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'name', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
@@ -254,7 +255,7 @@ export default {
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
|
|
]
|
|
]
|
|
if (_this.currentDealerInfo.dealerLevel && _this.currentDealerInfo.dealerLevel == 'PROVINCE') { // 省级
|
|
if (_this.currentDealerInfo.dealerLevel && _this.currentDealerInfo.dealerLevel == 'PROVINCE') { // 省级
|
|
- arr.push(
|
|
|
|
|
|
+ arr.push(
|
|
{ title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '省级价', dataIndex: 'provincePrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
|
|
{ title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
{ title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
|
|
)
|
|
)
|
|
@@ -314,11 +315,11 @@ export default {
|
|
this.rowSelectionInfo = null
|
|
this.rowSelectionInfo = null
|
|
this.$refs.table.clearSelected()
|
|
this.$refs.table.clearSelected()
|
|
},
|
|
},
|
|
- //获取省级经销商、市级经销商和特约经销商信息
|
|
|
|
- getCurrentDealerInfo(){
|
|
|
|
|
|
+ // 获取省级经销商、市级经销商和特约经销商信息
|
|
|
|
+ getCurrentDealerInfo () {
|
|
getCurrentDealer().then(res => {
|
|
getCurrentDealer().then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.currentDealerInfo=res.data
|
|
|
|
|
|
+ this.currentDealerInfo = res.data
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -392,7 +393,7 @@ export default {
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
_this.setTableH()
|
|
_this.setTableH()
|
|
})
|
|
})
|
|
- this.getCurrentDealerInfo()
|
|
|
|
|
|
+ this.getCurrentDealerInfo()
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
@@ -400,10 +401,10 @@ export default {
|
|
},
|
|
},
|
|
// 打开自定义报价弹窗
|
|
// 打开自定义报价弹窗
|
|
handleEditPrice (row) {
|
|
handleEditPrice (row) {
|
|
- this.itemId = row.productSn;
|
|
|
|
- let _this=this
|
|
|
|
- this.$nextTick(()=>{
|
|
|
|
- _this.openEditPriceModal = true
|
|
|
|
|
|
+ this.itemId = row.productSn
|
|
|
|
+ const _this = this
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ _this.openEditPriceModal = true
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -423,7 +424,6 @@ export default {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
this.pageInit()
|
|
this.pageInit()
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
-
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|