feat(recharge): 充值提货卡添加法宝券修改逻辑

This commit is contained in:
woody 2025-04-29 10:35:03 +08:00
parent f208f8fdb2
commit c975e87cd6
4 changed files with 133 additions and 84 deletions

View File

@ -30,8 +30,9 @@
<el-button
type="primary"
size="mini"
:disabled="addBtnDisabled"
@click="addNewGoods"
>{{ '添加' }}
>添加
</el-button>
</th>
<th
@ -62,16 +63,16 @@
class="table_b"
>
<tr style="border-top:0">
<td colspan="2">{{ '会员编号' }}</td>
<td colspan="2">{{ '会员名称' }}</td>
<td colspan="4">{{ '产品名称' }}</td>
<td colspan="4">{{ '产品规格' }}</td>
<td colspan="2">{{ '提货基数' }}</td>
<td colspan="2">会员编号</td>
<td colspan="2">会员名称</td>
<td colspan="4">产品名称</td>
<td colspan="4">产品规格</td>
<td colspan="2">提货基数</td>
<td colspan="2">可提数量</td>
<td colspan="2">增加数量</td>
<td colspan="2">{{ '截止日期' }}</td>
<td colspan="2">{{ '包邮类型' }}</td>
<td colspan="2">截止日期</td>
<td colspan="2">包邮类型</td>
<td colspan="2">提货来源</td>
</tr>
<tr
v-for="ctem,cndex in item.consumeRuleConfigList"
@ -128,8 +129,12 @@
>
</div>
</td>
<!-- 提货基数 -->
<td colspan="2" style="border-right: 1px solid #fff">
<el-input v-model="ctem.baseQuantity" :disabled="deled" />
<el-input
v-model="ctem.baseQuantity"
:disabled="deled || ctem.pickType == 8"
/>
</td>
<!-- 可提数量 -->
<td colspan="2" style="border-right: 1px solid #fff">
@ -139,22 +144,24 @@
<td colspan="2" style="border-right: 1px solid #fff">
<el-input v-model="ctem.quantity" :disabled="deled" />
</td>
<!-- 截止日期 -->
<td colspan="2" style="border-right: 1px solid #fff">
<!-- <el-input v-model="ctem.orderAchieve"></el-input>-->
<el-date-picker
v-model="ctem.receiveTime"
:disabled="deled"
:disabled="deled || (ctem.pickType == 8 && !addFlag)"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
:placeholder="'请选择时间'"
/>
</td>
<!-- 包邮类型 -->
<td colspan="2">
<el-select
v-model="ctem.isFreeMail"
clearable
:disabled="deled"
:disabled="deled || (ctem.pickType == 8 && !addFlag)"
>
<el-option
v-for="item in postList"
@ -212,6 +219,15 @@
</el-checkbox-group>
</div>
</td>
<td colspan="2">
<el-select
v-model="ctem.pickType"
:disabled="disableds"
@change="(val) => pickTypeChange(val, ctem)"
>
<el-option v-for="item in pickTypeList" :key="item.val" :label="item.text" :value="item.val" />
</el-select>
</td>
</tr>
</table>
</div>
@ -394,14 +410,10 @@ import * as api from '@/api/giftGoods.js'
import * as apis from '@/api/product.js'
import * as api_s from '@/api/financial.js'
import topBar from '@/components/topBar'
import ImageUpload from '@/components/ImageUpload'
import { getMemberName } from '@/api/financial'
import { getQueryString } from '@/utils'
import { pickDetail } from '@/api/manage'
export default {
components: {
topBar,
ImageUpload
topBar
},
data() {
return {
@ -454,9 +466,24 @@ export default {
text: '不包邮',
val: 1
}
],
pickTypeList: [
{
text: '提货产品',
val: 0
},
{
text: '法宝券',
val: 8
}
]
}
},
computed: {
addBtnDisabled() {
return this.allData.some(item => item.consumeRuleConfigList.length > 0)
}
},
mounted() {
const geturl = window.location.href
const getqyinfo = geturl.split('?')[1]
@ -495,6 +522,7 @@ export default {
usableQuantity: res.data.usableQuantity,
quantity: 0,
isFreeMail: res.data.isFreeMail,
pickType: res.data.pickType,
waresGiftConfigList: [
{
pkProduct: res.data.detailList[0].pkProduct,
@ -514,6 +542,7 @@ export default {
usableQuantity: res.data.usableQuantity,
quantity: 0,
isFreeMail: res.data.isFreeMail,
pickType: res.data.pickType,
waresGiftConfigList: [
{
pkProduct: '',
@ -555,14 +584,21 @@ export default {
},
saveDate() {
const dataList = []
this.allData[0].consumeRuleConfigList.forEach((res) => {
this.allData[0].consumeRuleConfigList.forEach((item) => {
dataList.push(
{ 'memberCode': res.memberCode, 'pkProduct': res.waresGiftConfigList[0].pkProduct, 'memberName': res.memberName,
'productName': res.waresGiftConfigList[0].productName + res.waresGiftConfigList[0].specsName,
'receiveTime': res.receiveTime,
'specsName': res.waresGiftConfigList[0].specsName, 'specsNameId': res.waresGiftConfigList[0].specsNameId,
'baseQuantity': res.baseQuantity, 'quantity': res.quantity, 'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage,
'pkId': res.pkId ? res.pkId : ''
{ 'memberCode': item.memberCode,
'pkProduct': item.waresGiftConfigList[0].pkProduct,
'memberName': item.memberName,
'productName': item.waresGiftConfigList[0].productName + item.waresGiftConfigList[0].specsName,
'receiveTime': item.receiveTime,
'specsName': item.waresGiftConfigList[0].specsName,
'specsNameId': item.waresGiftConfigList[0].specsNameId,
'baseQuantity': item.baseQuantity,
'quantity': item.quantity,
'isFreeMail': item.isFreeMail,
'pkPostage': item.pkPostage,
'pkId': item.pkId ? item.pkId : '',
'pickType': item.pickType
}
)
})
@ -813,8 +849,10 @@ export default {
specsName: '',
specsNameId: '',
quantity: ''
}
]
],
pickType: 0
})
}
})
@ -906,6 +944,11 @@ export default {
return 'success-row'
}
return ''
},
pickTypeChange(val, item) {
if (val === 8) {
this.$set(item, 'baseQuantity', '1')
}
}
}
}

View File

@ -111,22 +111,22 @@
<div class="main_a">
<div class="mainbtn">
<el-button
v-hasButtons="['cardAdd']"
size="small"
class="addBtn"
v-hasButtons="['cardAdd']"
@click="openDig"
>{{'添加'}}</el-button>
>{{ '添加' }}</el-button>
<el-button
v-hasButtons="['cardExport']"
size="small"
class="thebtn2"
v-hasButtons="['cardExport']"
@click="handleExport"
> {{ '导出' }}</el-button>
> 导出</el-button>
</div>
<div class="maintable">
<el-table
:data="tableData"
v-loading="loading"
:data="tableData"
style="width: 100%"
height="73vh"
:header-cell-style="{ background: '#EEEEEE' }"
@ -152,6 +152,7 @@
align="center"
prop=""
:label="'产品名称(规格)'"
min-width="130"
>
<template slot-scope="scope">
<div v-for="item in scope.row.detailList">
@ -184,8 +185,8 @@
/>
<el-table-column
align="center"
prop="usableQuantity"
:label="'可用兑换数量'"
prop="usableQuantity"
:label="'可用兑换数量'"
width="120"
/>
<el-table-column
@ -221,23 +222,27 @@
>
<template slot-scope="scope">
<div class="btnHeng">
<div @click="toFixed(scope.row.pkId,2)"
type="text"
v-if="scope.row.pickType!=8"
v-hasButtons="['cardUpdata']"
style="color:#F3A900"
size="small">
{{ '修改' }}
<div class="btnHeng">
<div
v-hasButtons="['cardUpdata']"
type="text"
style="color:#F3A900"
size="small"
@click="toFixed(scope.row.pkId,2)"
>
{{ '修改' }}
</div>
<div
v-hasButtons="['cardDel']"
type="text"
size="small"
style="color: #C8161D"
@click="toDel(scope.row.pkId)"
>
{{ '删除' }}
</div>
</div>
<div @click="toDel(scope.row.pkId)"
type="text"
v-hasButtons="['cardDel']"
size="small"
style="color: #C8161D">
{{ '删除' }}
</div>
</div>
</template>
</el-table-column>
</el-table>
@ -257,19 +262,19 @@
<script>
import topBar from '@/components/topBar'
import * as api from '@/api/giftGoods.js'
import {tgtype} from "@/api/giftGoods.js";
import {getPickList} from "@/api/manage";
import { tgtype } from '@/api/giftGoods.js'
import { getPickList } from '@/api/manage'
export default {
name: 'Bzpz',
components: {
topBar
},
filters: {
isAgree(val) {
isAgree(val) {
if (!val) {
return '允许';
return '允许'
} else {
return '禁止';
return '禁止'
}
}
},
@ -288,7 +293,7 @@ export default {
total: 0,
dialogVisible: false,
tableData: [],
loading:false,
loading: false,
moren: 'RechargeCardList',
topList: [
{
@ -350,7 +355,7 @@ export default {
}
})
},
toDel(id){
toDel(id) {
this.$router.push({
name: 'addRechargeCard',
query: {
@ -416,7 +421,7 @@ export default {
//
getDataList() {
this.loading = true
getPickList(Object.assign({},this.queryParams,this.select))
getPickList(Object.assign({}, this.queryParams, this.select))
.then((res) => {
this.tableData = res.rows
this.total = res.total
@ -426,7 +431,7 @@ export default {
handleSelectionChange(val) {},
/** 导出按钮操作 */
handleExport() {
this.$confirm( '是否确认导出所有数据项?', '警告', {
this.$confirm('是否确认导出所有数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

View File

@ -13,9 +13,9 @@
/>
<div class="main">
<div class="thetable">
<div class="fontTitle"> {{'在线签呈'}}</div>
<div class="fontTitle"> {{ '在线签呈' }}</div>
<div class="titleflex">
<div>{{'编号'}} :</div>
<div>{{ '编号' }} :</div>
<div>
<el-radio-group v-model="allData.signType">
<el-radio
@ -36,7 +36,7 @@
colspan="1"
width="190px"
align="center"
> {{'发起部门'}} :</td>
> {{ '发起部门' }} :</td>
<td
v-if="allData.signData"
colspan="1"
@ -46,7 +46,7 @@
colspan="1"
width="140px"
align="center"
> {{'发起人'}} :</td>
> {{ '发起人' }} :</td>
<td
v-if="allData.signData"
colspan="1"
@ -56,7 +56,7 @@
<td
colspan="1"
align="center"
> {{'主旨'}} :</td>
> {{ '主旨' }} :</td>
<td
v-if="allData.signData"
colspan="1"
@ -64,7 +64,7 @@
<td
colspan="1"
align="center"
> {{'日期'}} :</td>
> {{ '日期' }} :</td>
<td
v-if="allData.signData"
colspan="1"
@ -75,7 +75,7 @@
<td
colspan="1"
align="center"
> {{'审批流程'}}</td>
> {{ '审批流程' }}</td>
<td colspan="3">
<div class="disflex">
<span
@ -117,7 +117,7 @@
<td
colspan="1"
align="center"
>{{'抄送人'}}</td>
>{{ '抄送人' }}</td>
<td colspan="3">
<div class="disflex">
<span
@ -159,12 +159,12 @@
<td
style="height: 190px"
align="center"
>{{'情况说明'}}</td>
>{{ '情况说明' }}</td>
<td
colspan="3"
style="padding: 0"
>
<div >
<div>
<el-input
v-model="allData.remark"
type="textarea"
@ -178,12 +178,12 @@
<td
style="height: 193px"
align="center"
> {{'业务诉求'}}</td>
> {{ '业务诉求' }}</td>
<td
colspan="3"
style="padding: 0;vertical-align: top;"
>
<div >
<div>
<el-table
:data="allData.updateParentParamList"
style="width: 100%"
@ -202,7 +202,7 @@
style="color: #48B2FD;text-decoration:underline;cursor: pointer"
@click="details"
>
{{'查看详情'}}
{{ '查看详情' }}
</div>
</div>
<div v-show="ctem.value!= 'actExplain'">
@ -221,7 +221,7 @@
<td
style="height: 190px"
align="center"
>{{'附件'}}</td>
>{{ '附件' }}</td>
<td
colspan="3"
style="padding: 0"
@ -239,7 +239,7 @@
<el-button
size="small"
type="primary"
>{{'点击上传'}}</el-button>
>{{ '点击上传' }}</el-button>
</el-upload>
</div>
</td>
@ -289,7 +289,7 @@ export default {
}
],
checkList: [],
typeEd:false,
typeEd: false,
allData: {
remark: '',
signType: 1,
@ -378,7 +378,8 @@ export default {
{ 'memberCode': res.memberCode, 'pkProduct': res.pkProduct, 'specsName': res.specsName,
'specsNameId': res.specsNameId, 'baseQuantity': res.baseQuantity, 'quantity': res.quantity,
'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage ? res.pkPostage : '', 'pkId': res.pkId ? res.pkId : '',
'receiveTime': res.receiveTime ? res.receiveTime : ''
'receiveTime': res.receiveTime ? res.receiveTime : '',
'pickType': res.pickType || 0
}
)
})
@ -395,10 +396,10 @@ export default {
sendIdList: this.allData.sendIdList // []
}
let url
if(this.typeEd){
url = man.rechargeDel
}else{
url = man.rechargeConfirm
if (this.typeEd) {
url = man.rechargeDel
} else {
url = man.rechargeConfirm
}
url(obj).then((res) => {
if (res.code == 200) {

View File

@ -44,11 +44,11 @@ module.exports = {
},
proxy: {
'/prod-api': {
target: 'http://t-mana.beida413.com/',
changeOrigin: true
// pathRewrite: {
// '^/prod-api': ''
// }
target: 'http://localhost:8080/',
changeOrigin: true,
pathRewrite: {
'^/prod-api': ''
}
}
}
// before: require('./mock/mock-server.js')