Commit f317e01f by 前端

修复一轮测试bug

1 parent 916885da
......@@ -221,7 +221,7 @@ export default {
const {receiveName, receiveMobile, provinceName, cityName, townName, address} = res?.receiveAddress || {}
res.addInfo = `${receiveName} ${receiveMobile} ${provinceName}${cityName}${townName}${address}`
res.addInfo = res.addInfo.replaceAll('null', '')
res.payPrice = res.redeemPoints ? res.redeemPoints + '积分' + '+' + res.payPrice + '元' : res.payPrice + '元'
res.payPrice = res.redeemPoints ? res.redeemPoints + '积分' + '+' + (res.payPrice|| 0) + '元' : res.payPrice + '元'
res.subOrderGoodsList = res?.subOrderGoodsList?.length ? res?.subOrderGoodsList : []
// res.logisticsStatus = undefined
this.orderInfo = res
......
......@@ -162,7 +162,7 @@ export default {
prop: 'salePrice',
align:'right',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice
return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元'
}
},
{
......@@ -175,7 +175,7 @@ export default {
line: 1,
align:'right',
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) + '元'
}
},
{
......
......@@ -68,8 +68,8 @@
<el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1"
@click="handleSale">上架销售
</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架至仓库</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出仓库</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button>
</div>
</div>
</div>
......@@ -192,7 +192,7 @@ export default {
// return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
// },
setPriceFn(e) {
if (!this.redeemPoints) {
if ((!Number(this.redeemPoints))) {
this.salePrice = this.goodsInfo.salePrice
this.redeemPoints = this.goodsInfo.redeemPoints
this.$message.error('请输入大于0的积分')
......@@ -217,10 +217,10 @@ export default {
this.operateFn('batchSaleApi', '上架销售')
},
handleOff() {
this.operateFn('batchOffApi', '下架至仓库')
this.operateFn('batchOffApi', '下架')
},
handleRemove() {
this.operateFn('batchRemoveApi', '移出仓库')
this.operateFn('batchRemoveApi', '移出')
},
operateFn(Api, operate) {
let tip = `确定把该商品${operate}吗?`
......
......@@ -159,11 +159,12 @@ export default {
width: 150,
prop: 'marketPrice'
},
// {
// label: '已兑换',
// width: 150,
// prop: 'saleAmount'
// },
{
label: '已兑换',
width: 150,
prop: 'saleAmount',
sortable: 'custom'
},
// {
// label: '真实销量',
// width: 150,
......@@ -277,12 +278,16 @@ export default {
confirmPriceChange(e) {
this.batchPrice = e.batchPrice
this.batchCount = e.batchCount
console.log(this.batchCount)
if (!this.batchCount || this.batchCount == 0) return this.$message({
if (!Number(this.batchCount) && this.isConversionRate) return this.$message({
message: '请输入大于0的积分',
type: 'error',
customClass: 'msgHierarchy'
});
if (!this.isConversionRate && this.batchCount != '0' && (!this.batchCount || this.batchCount.replace(/\s*/g,'') ==='' || !Number(this.batchCount))) return this.$message({
message: '请输入积分',
type: 'error',
customClass: 'msgHierarchy'
});
this.setPriceFn({}, {}, !this.isConversionRate)
this.handleClose()
},
......
......@@ -65,8 +65,8 @@
<el-button type="primary" :disabled="goodsInfo.shelvesStatus == 1002" v-if="goodsInfo.goodsPosition==1"
@click="handleSale">上架销售
</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架至仓库</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出仓库</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==2" plain @click="handleOff">下架</el-button>
<el-button type="primary" v-if="goodsInfo.goodsPosition==1" plain @click="handleRemove">移出</el-button>
</div>
</div>
</div>
......@@ -183,12 +183,12 @@ export default {
console.log(err)
})
},
focusPoints() {
//进入了积分输入框且没有修改值
return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
},
// focusPoints() {
// //进入了积分输入框且没有修改值
// return (this.redeemPoints == this.goodsInfo.redeemPoints) && (this.salePrice == this.goodsInfo.salePrice)
// },
setPriceFn(type,e) {
if (!this.redeemPoints) {
if (!Number(this.redeemPoints)) {
this.salePrice = this.goodsInfo.salePrice
this.redeemPoints = this.goodsInfo.redeemPoints
this.$message.error('请输入大于0的积分')
......@@ -214,10 +214,10 @@ export default {
this.operateFn('batchSaleApi', '上架销售')
},
handleOff() {
this.operateFn('batchOffApi', '下架至仓库')
this.operateFn('batchOffApi', '下架')
},
handleRemove() {
this.operateFn('batchRemoveApi', '移出仓库')
this.operateFn('batchRemoveApi', '移出')
},
operateFn(Api, operate) {
let tip = `确定把该商品${operate}吗?`
......
......@@ -21,7 +21,8 @@
<el-button :size="size" @click="batchRemove({}, 1)">批量移出</el-button>
</div>
</div>
<GLTable class="pointTable" @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"
:beforeSearchFn="beforeSearchFn">
<div slot="goodsNameSlot" class="goodsNameSlot" slot-scope="scope">
......@@ -48,7 +49,7 @@
<span>{{ scope.scope.shelvesStatus == 1001 ? '可上架' : '已下架' }}</span>
</div>
</GLTable>
<setPriceDialog v-if="isVisible" :echoParams="echoParams" :isConversionRate="isConversionRate" :visible="isVisible"
<setPriceDialog v-if="isVisible" :echoParams="echoParams" :isConversionRate="isConversionRate" :visible="isVisible"
@handleClose="handleClose" @confirm="confirmPriceChange">
</setPriceDialog>
</div>
......@@ -69,7 +70,7 @@ export default {
batchPrice: '',
batchCount: '',
editParams: {},
echoParams:{},
echoParams: {},
isConversionRate: false,
goodsFormObj: {
goodsPosition: 1,
......@@ -154,19 +155,19 @@ export default {
label: '供货价(元)',
prop: 'sellPrice',
width: 150,
line:1
line: 1
},
{
label: '市场价(元)',
prop: 'marketPrice',
width: 150,
line:1
line: 1
},
{
label: '库存',
prop: 'goodsStock',
width: 150,
line:1,
line: 1,
sortable: 'custom',
},
{
......@@ -174,7 +175,7 @@ export default {
prop: 'shelvesStatus',
addHtml: 'shelvesStatusSlot',
width: 150,
line:1,
line: 1,
}
]
},
......@@ -261,11 +262,17 @@ export default {
confirmPriceChange(e) {
this.batchPrice = e.batchPrice
this.batchCount = e.batchCount
if (!this.batchCount || this.batchCount == 0) return this.$message({
console.log(this.batchCount != '0')
if (!Number(this.batchCount) && this.isConversionRate) return this.$message({
message: '请输入大于0的积分',
type: 'error',
customClass: 'msgHierarchy'
});
if (!this.isConversionRate && this.batchCount != '0' && (!this.batchCount || this.batchCount.replace(/\s*/g,'') ==='' || !Number(this.batchCount))) return this.$message({
message: '请输入积分',
type: 'error',
customClass: 'msgHierarchy'
});
this.setPriceFn({}, {}, !this.isConversionRate)
this.handleClose()
},
......@@ -427,11 +434,11 @@ export default {
}
}
/deep/.pointTable .el-table .ascending .sort-caret.ascending{
/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;
/deep/ .pointTable .el-table .descending .sort-caret.descending {
border-top-color: #5850ff !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!