Commit c5a5dcd0 by 前端

修复二轮bug

1 parent c4a044fd
......@@ -28,7 +28,7 @@
</div>
<div class="orderAmount" slot="orderAmount" slot-scope="scope">
{{
scope.scope.redeemPoints ? scope.scope.redeemPoints + '积分' + '+' + +(scope.scope.salePrice * scope.scope.sellQty).toFixed(2) + '元' : +(scope.scope.salePrice * scope.scope.sellQty).toFixed(2) + '元'
scope.scope.redeemPoints ? (scope.scope.redeemPoints * scope.scope.sellQty) + '积分' + '+' + +(scope.scope.salePrice * scope.scope.sellQty).toFixed(2) + '元' : +(scope.scope.salePrice * scope.scope.sellQty).toFixed(2) + '元'
}}
</div>
</GLTable>
......@@ -47,7 +47,7 @@
</el-tooltip>
</div>
<div slot="effectiveDays" slot-scope="scope">
<div slot="effectiveDays">
<span v-show="orderInfo.logisticsStatus" class="circle"
:style="{backgroundColor: '#5850FF'}"></span>
<span>{{
......@@ -148,7 +148,7 @@ export default {
{
label: '小计 (元)',
formatter: cell => {
return cell.redeemPoints ? cell.redeemPoints + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
return cell.redeemPoints ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
}
},
{
......
......@@ -134,10 +134,10 @@ export default {
{
id: '',
value: '全部'
},{
id: '0',
value: '普通订单'
},
}, {
id: '0',
value: '普通订单'
},
{
id: '1',
value: '积分订单'
......@@ -151,7 +151,7 @@ export default {
tableParams: {
listName: 'list',
tableOption: {
width:80
width: 80
},
tableColumns: [
{
......@@ -164,7 +164,7 @@ export default {
width: 180,
line: 1,
prop: 'salePrice',
align:'right',
align: 'right',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + cell.salePrice + '元' : cell.salePrice + '元'
}
......@@ -177,9 +177,9 @@ export default {
label: '实收金额 (元)',
width: 150,
line: 1,
align:'right',
align: 'right',
formatter: cell => {
return cell.businessType == 1 ? cell.redeemPoints + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
return cell.businessType == 1 ? (cell.redeemPoints * cell.sellQty) + '积分' + '+' + +(cell.salePrice * cell.sellQty).toFixed(2) + '元' : +(cell.salePrice * cell.sellQty).toFixed(2) + '元'
}
},
{
......
......@@ -173,7 +173,6 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.3)'
})
console.log({id, businessType: 1})
this.$apis.platformGoods.goodsDetailApi({id, businessType: 1}).then(res => {
this.editing = false
loading.close()
......@@ -193,7 +192,7 @@ export default {
// },
setPriceFn(e) {
if ((!Number(this.redeemPoints))) {
this.salePrice = this.goodsInfo.salePrice
this.salePrice = !Number(this.salePrice) ? 0 : this.salePrice
this.redeemPoints = this.goodsInfo.redeemPoints
this.$message.error('请输入大于0的积分')
return
......@@ -202,7 +201,7 @@ export default {
businessType: 1,
modifyPriceRequestList: [{
id: this.goodsInfo.id,
salePrice: this.salePrice || 0,
salePrice: !Number(this.salePrice) ? 0 : this.salePrice,
redeemPoints: Number(this.redeemPoints),
}],
}
......
......@@ -189,7 +189,7 @@ export default {
// },
setPriceFn(type,e) {
if (!Number(this.redeemPoints)) {
this.salePrice = this.goodsInfo.salePrice
this.salePrice = !Number(this.salePrice) ? 0 : this.salePrice
this.redeemPoints = this.goodsInfo.redeemPoints
this.$message.error('请输入大于0的积分')
return
......@@ -199,10 +199,13 @@ export default {
businessType:1,
modifyPriceRequestList: [{
id: this.goodsInfo.id,
salePrice: this.salePrice || 0,
salePrice: !Number(this.salePrice) ? 0 : this.salePrice,
redeemPoints: Number(this.redeemPoints),
}],
}
console.log(this.salePrice== '')
console.log(!Number(this.salePrice) ? 0 : this.salePrice)
this.$apis.platformGoods.modifyPriceApi(params).then(res => {
if (res) {
this.$message.success('操作成功')
......
......@@ -342,21 +342,20 @@ export default {
businessType: 1
}
let tip = `确定把 ${item.goodsSkuName} ${operate}?`
let conversionRateAll
// let conversionRateAll
if (isAll) {
const list = this.getAllData()
if (!list?.length) return this.$message.error(`请选择要${operate}的商品`)
params.ids = list.map(item => item.id)
conversionRateAll = list.every(item => item.redeemPoints)
// conversionRateAll = list.every(item => item.redeemPoints)
tip = `确定把已选的${list.length}个商品全部${operate}?`
}
console.log(conversionRateAll)
this.$confirm(tip, '提示', {
type: 'warning',
callback: action => {
if (action == 'confirm') {
if (operate == '上架销售' && (!isAll && (!item.redeemPoints)) || (isAll && !conversionRateAll)) {
if (operate == '上架销售' && (!isAll && (!item.redeemPoints))) {
this.$message.error('请先输入兑换价')
return
}
......
......@@ -5,7 +5,7 @@
<GLCombiForm ref="goodsRef" @handleOk="handleSearch" @handleRest="handleReset" :formObj="goodsFormObj" :formData="goodsFormData">
<div slot="categorySlot">
<!-- <el-cascader :props="categoryProps" v-model="goodsFormObj.categoryCode" :options="categoryList"></el-cascader> -->
<categoryCascader :categoryCode.sync="goodsFormObj"></categoryCascader>
<categoryCascader :checkStrictly="true" :categoryCode.sync="goodsFormObj"></categoryCascader>
</div>
<div slot="supplyPriceSlot">
<inputNumRange :formData="goodsFormObj" :keyObj="{from: 'startSellPrice', to:'endSellPrice'}"></inputNumRange>
......@@ -67,7 +67,7 @@
</div>
</div>
</template>
<script>
import categoryCascader from '@/components/categoryCascader.vue'
import inputNumRange from '@/components/inputNumRange'
......@@ -142,7 +142,7 @@ export default {
],
}
},
components: {
inputNumRange,
categoryCascader
......@@ -154,7 +154,7 @@ export default {
mounted() {
},
methods: {
handleSizeChange(e){
this.pageObj.pageSize = e
......@@ -178,6 +178,14 @@ export default {
pageSize,
categoryCode: categoryCode && categoryCode.length ? categoryCode[categoryCode.length-1] : ''
}
if (0 < params.categoryCode.length && params.categoryCode.length < 6) {
let name = params.categoryCode.length == 2 ? 'categoryCode1' : 'categoryCode2'
params[name] = params.categoryCode
delete params.categoryCode
}
const loading = this.$loading({
lock: true,
text: 'Loading',
......@@ -194,11 +202,11 @@ export default {
loading.close()
console.log(err)
})
},
},
getCategoryList(node, resolve){
const params = {
categoryCode: node?.value,
categoryLevel: node?.level + 1
categoryLevel: node?.level + 1
}
this.$apis.platformGoods.getCategoryListApi(params).then(res=>{
if(res){
......@@ -207,7 +215,7 @@ export default {
resolve(res)
}
})
},
},
handleReset(){
this.goodsFormObj = {
goodsSkuName: '',
......@@ -256,12 +264,12 @@ export default {
}
}
</script>
<style scoped lang="scss">
.ctnr{
background-color: #fff;
padding: 20px;
.noData{
height: calc(100vh - 310px);
min-height: 300px;
......@@ -394,7 +402,6 @@ export default {
}
}
}
}
</style>
\ No newline at end of file
......@@ -104,7 +104,7 @@ export default {
tableOption: true,
tableColumns: [
{
label: '门店名称',
label: '商户名称',
minWidth: 300,
prop: 'merchantName'
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!