Commit 55b19394 by 前端

fixed

1 parent 4a4a0d60
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2022-12-28 16:26:01
* @LastEditTime: 2022-12-30 17:38:50
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
......
......@@ -4,7 +4,12 @@
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<div class="flex-space-between m-b-10 w-100-percent">
<div class="table-title">
已累计
<template v-if="browseObj.timeType">
当日新增
</template>
<template v-else>
已累计
</template>
<template v-if="browseObj.type != 2">
浏览
</template>
......@@ -246,6 +251,9 @@ export default {
}
</script>
<style scoped lang="scss">
.table-popover-img {
width: 160px;
}
.edit-container {
.table-title {
font-weight: 400;
......
......@@ -77,7 +77,7 @@
<div slot="content">{{ subItem.couponName }}</div>
</el-tooltip>
<div class="gift-sum">
<el-input-number :disabled="subItem.status == '3'" class="sum-input" v-model="subItem.couponAmount" @change="handleChange" :min="1" :max="999999" size="mini" label="描述文字"></el-input-number>
<el-input-number :disabled="subItem.status == '3'" class="sum-input" v-model="subItem.couponAmount" @change="handleChange" :min="1" :max="subItem.residueAmount" size="mini" label="描述文字"></el-input-number>
<!-- <p :class="[subItem.status == '3' ? ' txt-grey' : '']" v-else>×{{ subItem.couponAmount }}</p> -->
</div>
</div>
......@@ -366,7 +366,8 @@ export default {
couponName: item.couponName,
couponAmount: isSelected ? list.find(k => k.id == item.id).couponAmount : '1',
couponAnticipatedCost: item.couponAnticipatedCost,
status: '2'
status: '2',
residueAmount: item.residueAmount
})
}
})
......
......@@ -358,8 +358,10 @@ export default {
// },
//优惠券
totalEstimatedCost: 0,
maxStock: 9999,
orderShow,
choseItemList: [],
selectedMealList: [],
couponObj,
numToCoupon,
isSelectGiftVisible: false,
......@@ -1137,6 +1139,9 @@ export default {
},
'editForm.goodsStock'(newValue, oldValue) {
this.editForm.goodsStock = limitPrice(newValue, oldValue, 5, 0, 0)
if (this.editForm.goodsStock > this.maxStock) {
this.editForm.goodsStock = this.maxStock
}
},
'editForm.activityTime'(newValue) {
newValue && newValue.length && this.countDown()
......@@ -1220,8 +1225,12 @@ export default {
// 计算预估成本
recoveryTotalPrice() {
this.totalEstimatedCost = 0
this.maxStock = 9999
this.orderShow.forEach(item => {
this.couponObj[item].list.forEach(subItem => {
const mult = Math.floor(subItem.residueAmount / subItem.couponAmount)
console.log(mult)
this.maxStock = this.maxStock < mult ? this.maxStock : mult
// 失效券不加入预估成本
if (subItem.status != '3') {
this.totalEstimatedCost = this.totalEstimatedCost + parseInt(subItem.couponAnticipatedCost || 0) * parseInt(subItem.couponAmount)
......@@ -1229,6 +1238,7 @@ export default {
})
})
this.totalEstimatedCost = (this.totalEstimatedCost / 100).toFixed(2)
if (this.editForm.goodsStock > this.maxStock) this.editForm.goodsStock = this.maxStock
},
changeFormAttr(formName, attrName, labelList, attrValue) {
labelList.forEach(item => {
......
......@@ -430,7 +430,7 @@ export default {
fn: '退款'
},
condition: row => {
return row.orderSource == 5 && [0, 1].includes(+row.relatedUserCouponStatus)
return row.orderSource == 5 && [0, 1].includes(+row.relatedUserCouponStatus) && [2, 6, 21].includes(+row.orderStatus) && this.loginpath
},
listeners: {
click: row => {
......@@ -597,7 +597,10 @@ export default {
}
},
mounted() {
// this.getCount()
if (!this.loginpath) {
const index = this.searchFormData.findIndex(item => item.name == 'merchantName')
this.searchFormData.splice(index, 1)
}
this.getOptionsList('searchFormData')
},
methods: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!