Commit 1de39b12 by zhangquan

table宽度修改

1 parent a1366f5f
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope"> <div slot="orderNoSlot" class="userInfoSlot" slot-scope="scope">
<p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p> <p class="name">第三方:{{ scope.scope.thirdSubOrderCode || '--' }}</p>
<p class="name">平台:{{ scope.scope.orderCode || '--'}}</p> <p class="name">平台:{{ scope.scope.subOrderCode || '--'}}</p>
</div> </div>
<div slot="auth-button" slot-scope="scope"> <div slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="buttonList" :buttonItem="scope" :buttonNum="3"></GLTableButton>
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
}, },
{ {
label: '单价 (元)', label: '单价 (元)',
width: 100,
prop: 'salePrice' prop: 'salePrice'
}, },
{ {
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
width: 300, minWidth: 300,
addHtml: 'goodsNameSlot' addHtml: 'goodsNameSlot'
}, },
{ {
...@@ -218,7 +218,6 @@ export default { ...@@ -218,7 +218,6 @@ export default {
methods: { methods: {
sortChange(e){ sortChange(e){
console.log(e)
const {order, prop} = e const {order, prop} = e
if(prop=='saleAmount'){ if(prop=='saleAmount'){
this.goodsFormObj.orderBySaleAmount = order=='ascending' ? 1 : order=='descending' ? 2 : '' this.goodsFormObj.orderBySaleAmount = order=='ascending' ? 1 : order=='descending' ? 2 : ''
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<el-button :size="size" @click="batchRemove({}, 1)">批量移出</el-button> <el-button :size="size" @click="batchRemove({}, 1)">批量移出</el-button>
</div> </div>
</div> </div>
<GLTable ref="tableRef" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn"> <GLTable ref="tableRef" @sortChange="sortChange" :pageConf="pageConf" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
<img :src="scope.scope.goodsImgUrl" alt=""> <img :src="scope.scope.goodsImgUrl" alt="">
<el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top"> <el-tooltip class="item" effect="dark" :content="(scope.scope.brandName || '') + (scope.scope.goodsSkuName || '')" placement="top">
...@@ -64,7 +64,8 @@ export default { ...@@ -64,7 +64,8 @@ export default {
startSellPrice: '', startSellPrice: '',
endSellPrice: '', endSellPrice: '',
startDiffPrice: '', startDiffPrice: '',
endDiffPrice: '' endDiffPrice: '',
orderByGoodsStock: ''
}, },
searchForm: {}, searchForm: {},
goodsFormData: [ goodsFormData: [
...@@ -145,7 +146,7 @@ export default { ...@@ -145,7 +146,7 @@ export default {
{ {
label: '库存', label: '库存',
prop: 'goodsStock', prop: 'goodsStock',
// sortable: true, sortable: 'custom',
}, },
{ {
label: '商品状态', label: '商品状态',
...@@ -202,6 +203,13 @@ export default { ...@@ -202,6 +203,13 @@ export default {
}, },
methods: { methods: {
sortChange(e){
const {order, prop} = e
if(prop=='goodsStock'){
this.goodsFormObj.orderByGoodsStock = order=='ascending' ? 1 : order=='descending' ? 2 : ''
}
this.handleSearch()
},
//获取复选table数据 //获取复选table数据
getAllData(){ getAllData(){
return this.$refs?.tableRef?.mutiSelectArr[this.tableParams.mutiSelectName] || [] return this.$refs?.tableRef?.mutiSelectArr[this.tableParams.mutiSelectName] || []
......
...@@ -141,19 +141,22 @@ export default { ...@@ -141,19 +141,22 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
width: 300, minWidth: 300,
addHtml: 'goodsNameSlot' addHtml: 'goodsNameSlot'
}, },
{ {
label: '申请数量', label: '申请数量',
width: 130,
prop: 'applyQty' prop: 'applyQty'
}, },
{ {
label: '申请金额 (元)', label: '申请金额 (元)',
width: 130,
prop: 'refundPrice' prop: 'refundPrice'
}, },
{ {
label: '售后类型', label: '售后类型',
width: 130,
prop: 'returnType', prop: 'returnType',
formatter: cell => { formatter: cell => {
let obj = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'} let obj = {1001: '退货退款', 1002: '仅退款', 1003:'退货换货'}
......
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
}, },
{ {
label: '差价', label: '差价',
// tips: '市场价和供货价的价格差', tips: '市场价和供货价的价格差',
addHtml: 'spreadPriceSlot' addHtml: 'spreadPriceSlot'
}, },
], ],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!