Commit 0cd4f841 by 前端

一轮bug修复+UI走查

1 parent a37032ca
...@@ -30,6 +30,7 @@ const addWarehouseApi = params => { ...@@ -30,6 +30,7 @@ const addWarehouseApi = params => {
sign: true sign: true
}) })
} }
// 分页查询仓库/销售中商品 // 分页查询仓库/销售中商品
const getListApi = params => { const getListApi = params => {
params.method = `${defaultPath}goods.stockroom.page` params.method = `${defaultPath}goods.stockroom.page`
......
...@@ -111,9 +111,11 @@ ...@@ -111,9 +111,11 @@
} }
.center { .center {
margin-top: 1px; margin-top: 1px;
color: #666;
} }
.unit{ .unit{
margin-right: 10px; margin-right: 10px;
color: #666;
} }
} }
.is-disabled { .is-disabled {
...@@ -123,4 +125,3 @@ ...@@ -123,4 +125,3 @@
cursor: not-allowed; cursor: not-allowed;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
label: '单价 (元)', label: '单价 (元)',
prop: 'salePrice', prop: 'salePrice',
formatter: cell => { formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + cell.salePrice + '元' : cell.salePrice + '元' return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + +(cell.salePrice).toFixed(2) + '元' : (cell.salePrice).toFixed(2) + '元'
} }
}, },
{ {
...@@ -127,14 +127,14 @@ export default { ...@@ -127,14 +127,14 @@ export default {
{ {
label: '小计 (元)', label: '小计 (元)',
formatter: cell => { formatter: cell => {
return (cell.salePrice * cell.sellQty).toFixed(2) return cell.redeemPoints + '积分' + '+' + (cell.salePrice * cell.sellQty).toFixed(2) + '元'
} }
}, },
{ {
label: '实收金额 (元)', label: '实收金额 (元)',
prop: 'orderAmount', prop: 'orderAmount',
formatter: cell => { formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + cell.salePrice + '元' : (cell.salePrice * cell.sellQty).toFixed(2) + '元' return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + +(cell.salePrice).toFixed(2) + '元' : (cell.salePrice * cell.sellQty).toFixed(2) + '元'
} }
} }
] ]
...@@ -221,7 +221,7 @@ export default { ...@@ -221,7 +221,7 @@ export default {
const {receiveName, receiveMobile, provinceName, cityName, townName, address} = res?.receiveAddress || {} const {receiveName, receiveMobile, provinceName, cityName, townName, address} = res?.receiveAddress || {}
res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}` res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}`
res.addInfo = res.addInfo.replaceAll('null', '') res.addInfo = res.addInfo.replaceAll('null', '')
res.payPrice = res.payPrice ? res.payPrice + '元' : '--' res.payPrice = res.redeemPoints ? res.redeemPoints + '积分' + '+' + res.payPrice + '元' : res.payPrice + '元'
res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : [] res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : []
// res.logisticsStatus = undefined // res.logisticsStatus = undefined
this.orderInfo = res this.orderInfo = res
......
...@@ -146,7 +146,9 @@ export default { ...@@ -146,7 +146,9 @@ export default {
pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'}, pageConf: {pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total'},
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: {
width:80
},
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
...@@ -155,10 +157,12 @@ export default { ...@@ -155,10 +157,12 @@ export default {
}, },
{ {
label: '单价 (元)', label: '单价 (元)',
width: 100, width: 180,
line: 1,
prop: 'salePrice', prop: 'salePrice',
align:'right',
formatter: cell => { formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : cell.salePrice return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice
} }
}, },
{ {
...@@ -167,9 +171,11 @@ export default { ...@@ -167,9 +171,11 @@ export default {
}, },
{ {
label: '实收金额 (元)', label: '实收金额 (元)',
width: 130, width: 150,
line: 1,
align:'right',
formatter: cell => { formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + cell.salePrice + '元' : (cell.salePrice * cell.sellQty).toFixed(2) return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : (cell.salePrice * cell.sellQty).toFixed(2)
} }
}, },
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<el-button :size="size" type="primary" plain @click="batchPriceChange">批量改价</el-button> <el-button :size="size" type="primary" plain @click="batchPriceChange">批量改价</el-button>
</div> </div>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" @sortChange="sortChange" <GLTable class="pointTable" @setTableFinishFun="setTableFinishFun" ref="tableRef" :pageConf="pageConf" @sortChange="sortChange"
:searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"> :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
...@@ -125,7 +125,9 @@ export default { ...@@ -125,7 +125,9 @@ export default {
listName: 'list', listName: 'list',
mutiSelectName: 'goodsIndex', mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
tableOption: true, tableOption: {
width: 120
},
tableColumns: [ tableColumns: [
{ {
label: '商品名称', label: '商品名称',
...@@ -142,7 +144,7 @@ export default { ...@@ -142,7 +144,7 @@ export default {
}, },
{ {
label: '兑换价', label: '兑换价',
width: 180, width: 220,
addHtml: 'setPriceSlot', addHtml: 'setPriceSlot',
prop: 'salePrice', prop: 'salePrice',
sortable: 'custom', sortable: 'custom',
...@@ -158,6 +160,11 @@ export default { ...@@ -158,6 +160,11 @@ export default {
prop: 'marketPrice' prop: 'marketPrice'
}, },
// { // {
// label: '已兑换',
// width: 150,
// prop: 'saleAmount'
// },
// {
// label: '真实销量', // label: '真实销量',
// width: 150, // width: 150,
// prop: 'saleAmount', // prop: 'saleAmount',
...@@ -270,8 +277,8 @@ export default { ...@@ -270,8 +277,8 @@ export default {
confirmPriceChange(e) { confirmPriceChange(e) {
this.batchPrice = e.batchPrice this.batchPrice = e.batchPrice
this.batchCount = e.batchCount this.batchCount = e.batchCount
if (!this.batchCount && this.batchCount !== 0 && this.batchCount !== '0') return this.$message({ if (!this.batchCount || this.batchCount == 0) return this.$message({
message: '请输入积分', message: '请输入大于0的积分',
type: 'error', type: 'error',
customClass: 'msgHierarchy' customClass: 'msgHierarchy'
}); });
...@@ -293,7 +300,7 @@ export default { ...@@ -293,7 +300,7 @@ export default {
}, },
handleShelf(item, isAll) { handleShelf(item, isAll) {
const api = this.$apis.platformGoods.batchOffApi const api = this.$apis.platformGoods.batchOffApi
this.batchFn(api, '下架至仓库', item, isAll) this.batchFn(api, '下架', item, isAll)
}, },
batchFn(Api, operate, item, isAll) { batchFn(Api, operate, item, isAll) {
let params = { let params = {
...@@ -423,4 +430,11 @@ export default { ...@@ -423,4 +430,11 @@ export default {
} }
} }
} }
/deep/.pointTable .el-table .ascending .sort-caret.ascending{
border-bottom-color: #5850ff;
}
/deep/.pointTable .el-table .descending .sort-caret.descending{
border-top-color:#5850ff !important;
}
</style> </style>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<el-button :size="size" @click="batchRemove({}, 1)">批量移出</el-button> <el-button :size="size" @click="batchRemove({}, 1)">批量移出</el-button>
</div> </div>
</div> </div>
<GLTable @setTableFinishFun="setTableFinishFun" ref="tableRef" @sortChange="sortChange" :pageConf="pageConf" <GLTable class="pointTable" @setTableFinishFun="setTableFinishFun" ref="tableRef" @sortChange="sortChange" :pageConf="pageConf"
:searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :tableParams="tableParams" :getListApi="getListApi"
:beforeSearchFn="beforeSearchFn"> :beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope"> <div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
mutiSelectName: 'goodsIndex', mutiSelectName: 'goodsIndex',
mutiSelectUniqueKey: 'id', mutiSelectUniqueKey: 'id',
tableOption: { tableOption: {
width: 250 width: 175
}, },
tableColumns: [ tableColumns: [
{ {
...@@ -147,26 +147,34 @@ export default { ...@@ -147,26 +147,34 @@ export default {
}, },
{ {
label: '兑换价', label: '兑换价',
width: 150, width: 220,
addHtml: 'setPriceSlot' addHtml: 'setPriceSlot'
}, },
{ {
label: '供货价(元)', label: '供货价(元)',
prop: 'sellPrice' prop: 'sellPrice',
width: 150,
line:1
}, },
{ {
label: '市场价(元)', label: '市场价(元)',
prop: 'marketPrice' prop: 'marketPrice',
width: 150,
line:1
}, },
{ {
label: '库存', label: '库存',
prop: 'goodsStock', prop: 'goodsStock',
width: 150,
line:1,
sortable: 'custom', sortable: 'custom',
}, },
{ {
label: '商品状态', label: '商品状态',
prop: 'shelvesStatus', prop: 'shelvesStatus',
addHtml: 'shelvesStatusSlot' addHtml: 'shelvesStatusSlot',
width: 150,
line:1,
} }
] ]
}, },
...@@ -176,7 +184,7 @@ export default { ...@@ -176,7 +184,7 @@ export default {
name: '详情', name: '详情',
attrs: { attrs: {
type: 'text', type: 'text',
fn: '商品详情' fn: '详情'
}, },
listeners: { listeners: {
click: row => this.goDetaillPage(row.scope) click: row => this.goDetaillPage(row.scope)
...@@ -201,7 +209,7 @@ export default { ...@@ -201,7 +209,7 @@ export default {
name: '移出', name: '移出',
attrs: { attrs: {
type: 'text', type: 'text',
fn: '移出仓库' fn: '移出'
}, },
listeners: { listeners: {
click: row => this.batchRemove(row.scope) click: row => this.batchRemove(row.scope)
...@@ -253,8 +261,8 @@ export default { ...@@ -253,8 +261,8 @@ export default {
confirmPriceChange(e) { confirmPriceChange(e) {
this.batchPrice = e.batchPrice this.batchPrice = e.batchPrice
this.batchCount = e.batchCount this.batchCount = e.batchCount
if (!this.batchCount && this.batchCount !== 0 && this.batchCount !== '0') return this.$message({ if (!this.batchCount || this.batchCount == 0) return this.$message({
message: '请输入积分', message: '请输入大于0的积分',
type: 'error', type: 'error',
customClass: 'msgHierarchy' customClass: 'msgHierarchy'
}); });
...@@ -334,7 +342,7 @@ export default { ...@@ -334,7 +342,7 @@ export default {
const list = this.getAllData() const list = this.getAllData()
if (!list?.length) return this.$message.error(`请选择要${operate}的商品`) if (!list?.length) return this.$message.error(`请选择要${operate}的商品`)
params.ids = list.map(item => item.id) params.ids = list.map(item => item.id)
conversionRateAll = list.every(item => item.redeemPoints && item.salePrice) conversionRateAll = list.every(item => item.redeemPoints)
tip = `确定把已选的${list.length}个商品全部${operate}?` tip = `确定把已选的${list.length}个商品全部${operate}?`
} }
console.log(conversionRateAll) console.log(conversionRateAll)
...@@ -342,7 +350,7 @@ export default { ...@@ -342,7 +350,7 @@ export default {
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
if (operate == '上架销售' && (!isAll && (!item.redeemPoints || !item.salePrice)) || (isAll && !conversionRateAll)) { if (operate == '上架销售' && (!isAll && (!item.redeemPoints)) || (isAll && !conversionRateAll)) {
this.$message.error('请先输入兑换价') this.$message.error('请先输入兑换价')
return return
} }
...@@ -418,4 +426,12 @@ export default { ...@@ -418,4 +426,12 @@ export default {
} }
} }
/deep/.pointTable .el-table .ascending .sort-caret.ascending{
border-bottom-color: #5850ff;
}
/deep/.pointTable .el-table .descending .sort-caret.descending{
border-top-color:#5850ff !important;
}
</style> </style>
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
label: '申请金额 (元)', label: '申请金额 (元)',
prop: 'refundPrice', prop: 'refundPrice',
formatter: cell => { formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + cell.refundPrice + '元' : cell.refundPrice + '元' return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + cell.refundPrice + '元' : cell.refundPrice + '元'
} }
}, },
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!