feat(recharge): 充值提货卡添加法宝券修改逻辑
This commit is contained in:
parent
f208f8fdb2
commit
c975e87cd6
|
|
@ -30,8 +30,9 @@
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
:disabled="addBtnDisabled"
|
||||||
@click="addNewGoods"
|
@click="addNewGoods"
|
||||||
>{{ '添加' }}
|
>添加
|
||||||
</el-button>
|
</el-button>
|
||||||
</th>
|
</th>
|
||||||
<th
|
<th
|
||||||
|
|
@ -62,16 +63,16 @@
|
||||||
class="table_b"
|
class="table_b"
|
||||||
>
|
>
|
||||||
<tr style="border-top:0">
|
<tr style="border-top:0">
|
||||||
<td colspan="2">{{ '会员编号' }}</td>
|
<td colspan="2">会员编号</td>
|
||||||
<td colspan="2">{{ '会员名称' }}</td>
|
<td colspan="2">会员名称</td>
|
||||||
<td colspan="4">{{ '产品名称' }}</td>
|
<td colspan="4">产品名称</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>
|
||||||
<td colspan="2">{{ '包邮类型' }}</td>
|
<td colspan="2">包邮类型</td>
|
||||||
|
<td colspan="2">提货来源</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr
|
<tr
|
||||||
v-for="ctem,cndex in item.consumeRuleConfigList"
|
v-for="ctem,cndex in item.consumeRuleConfigList"
|
||||||
|
|
@ -128,8 +129,12 @@
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<!-- 提货基数 -->
|
||||||
<td colspan="2" style="border-right: 1px solid #fff">
|
<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>
|
||||||
<!-- 可提数量 -->
|
<!-- 可提数量 -->
|
||||||
<td colspan="2" style="border-right: 1px solid #fff">
|
<td colspan="2" style="border-right: 1px solid #fff">
|
||||||
|
|
@ -139,22 +144,24 @@
|
||||||
<td colspan="2" style="border-right: 1px solid #fff">
|
<td colspan="2" style="border-right: 1px solid #fff">
|
||||||
<el-input v-model="ctem.quantity" :disabled="deled" />
|
<el-input v-model="ctem.quantity" :disabled="deled" />
|
||||||
</td>
|
</td>
|
||||||
|
<!-- 截止日期 -->
|
||||||
<td colspan="2" style="border-right: 1px solid #fff">
|
<td colspan="2" style="border-right: 1px solid #fff">
|
||||||
<!-- <el-input v-model="ctem.orderAchieve"></el-input>-->
|
<!-- <el-input v-model="ctem.orderAchieve"></el-input>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="ctem.receiveTime"
|
v-model="ctem.receiveTime"
|
||||||
:disabled="deled"
|
:disabled="deled || (ctem.pickType == 8 && !addFlag)"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
:placeholder="'请选择时间'"
|
:placeholder="'请选择时间'"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
<!-- 包邮类型 -->
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="ctem.isFreeMail"
|
v-model="ctem.isFreeMail"
|
||||||
clearable
|
clearable
|
||||||
:disabled="deled"
|
:disabled="deled || (ctem.pickType == 8 && !addFlag)"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in postList"
|
v-for="item in postList"
|
||||||
|
|
@ -212,6 +219,15 @@
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -394,14 +410,10 @@ import * as api from '@/api/giftGoods.js'
|
||||||
import * as apis from '@/api/product.js'
|
import * as apis from '@/api/product.js'
|
||||||
import * as api_s from '@/api/financial.js'
|
import * as api_s from '@/api/financial.js'
|
||||||
import topBar from '@/components/topBar'
|
import topBar from '@/components/topBar'
|
||||||
import ImageUpload from '@/components/ImageUpload'
|
|
||||||
import { getMemberName } from '@/api/financial'
|
|
||||||
import { getQueryString } from '@/utils'
|
|
||||||
import { pickDetail } from '@/api/manage'
|
import { pickDetail } from '@/api/manage'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
topBar,
|
topBar
|
||||||
ImageUpload
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -454,9 +466,24 @@ export default {
|
||||||
text: '不包邮',
|
text: '不包邮',
|
||||||
val: 1
|
val: 1
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
pickTypeList: [
|
||||||
|
{
|
||||||
|
text: '提货产品',
|
||||||
|
val: 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '法宝券',
|
||||||
|
val: 8
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
addBtnDisabled() {
|
||||||
|
return this.allData.some(item => item.consumeRuleConfigList.length > 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const geturl = window.location.href
|
const geturl = window.location.href
|
||||||
const getqyinfo = geturl.split('?')[1]
|
const getqyinfo = geturl.split('?')[1]
|
||||||
|
|
@ -495,6 +522,7 @@ export default {
|
||||||
usableQuantity: res.data.usableQuantity,
|
usableQuantity: res.data.usableQuantity,
|
||||||
quantity: 0,
|
quantity: 0,
|
||||||
isFreeMail: res.data.isFreeMail,
|
isFreeMail: res.data.isFreeMail,
|
||||||
|
pickType: res.data.pickType,
|
||||||
waresGiftConfigList: [
|
waresGiftConfigList: [
|
||||||
{
|
{
|
||||||
pkProduct: res.data.detailList[0].pkProduct,
|
pkProduct: res.data.detailList[0].pkProduct,
|
||||||
|
|
@ -514,6 +542,7 @@ export default {
|
||||||
usableQuantity: res.data.usableQuantity,
|
usableQuantity: res.data.usableQuantity,
|
||||||
quantity: 0,
|
quantity: 0,
|
||||||
isFreeMail: res.data.isFreeMail,
|
isFreeMail: res.data.isFreeMail,
|
||||||
|
pickType: res.data.pickType,
|
||||||
waresGiftConfigList: [
|
waresGiftConfigList: [
|
||||||
{
|
{
|
||||||
pkProduct: '',
|
pkProduct: '',
|
||||||
|
|
@ -555,14 +584,21 @@ export default {
|
||||||
},
|
},
|
||||||
saveDate() {
|
saveDate() {
|
||||||
const dataList = []
|
const dataList = []
|
||||||
this.allData[0].consumeRuleConfigList.forEach((res) => {
|
this.allData[0].consumeRuleConfigList.forEach((item) => {
|
||||||
dataList.push(
|
dataList.push(
|
||||||
{ 'memberCode': res.memberCode, 'pkProduct': res.waresGiftConfigList[0].pkProduct, 'memberName': res.memberName,
|
{ 'memberCode': item.memberCode,
|
||||||
'productName': res.waresGiftConfigList[0].productName + res.waresGiftConfigList[0].specsName,
|
'pkProduct': item.waresGiftConfigList[0].pkProduct,
|
||||||
'receiveTime': res.receiveTime,
|
'memberName': item.memberName,
|
||||||
'specsName': res.waresGiftConfigList[0].specsName, 'specsNameId': res.waresGiftConfigList[0].specsNameId,
|
'productName': item.waresGiftConfigList[0].productName + item.waresGiftConfigList[0].specsName,
|
||||||
'baseQuantity': res.baseQuantity, 'quantity': res.quantity, 'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage,
|
'receiveTime': item.receiveTime,
|
||||||
'pkId': res.pkId ? res.pkId : ''
|
'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: '',
|
specsName: '',
|
||||||
specsNameId: '',
|
specsNameId: '',
|
||||||
quantity: ''
|
quantity: ''
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
pickType: 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -906,6 +944,11 @@ export default {
|
||||||
return 'success-row'
|
return 'success-row'
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
},
|
||||||
|
pickTypeChange(val, item) {
|
||||||
|
if (val === 8) {
|
||||||
|
this.$set(item, 'baseQuantity', '1')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,22 +111,22 @@
|
||||||
<div class="main_a">
|
<div class="main_a">
|
||||||
<div class="mainbtn">
|
<div class="mainbtn">
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['cardAdd']"
|
||||||
size="small"
|
size="small"
|
||||||
class="addBtn"
|
class="addBtn"
|
||||||
v-hasButtons="['cardAdd']"
|
|
||||||
@click="openDig"
|
@click="openDig"
|
||||||
>{{ '添加' }}</el-button>
|
>{{ '添加' }}</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasButtons="['cardExport']"
|
||||||
size="small"
|
size="small"
|
||||||
class="thebtn2"
|
class="thebtn2"
|
||||||
v-hasButtons="['cardExport']"
|
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
> {{ '导出' }}</el-button>
|
> 导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="maintable">
|
<div class="maintable">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="73vh"
|
height="73vh"
|
||||||
:header-cell-style="{ background: '#EEEEEE' }"
|
:header-cell-style="{ background: '#EEEEEE' }"
|
||||||
|
|
@ -152,6 +152,7 @@
|
||||||
align="center"
|
align="center"
|
||||||
prop=""
|
prop=""
|
||||||
:label="'产品名称(规格)'"
|
:label="'产品名称(规格)'"
|
||||||
|
min-width="130"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-for="item in scope.row.detailList">
|
<div v-for="item in scope.row.detailList">
|
||||||
|
|
@ -222,19 +223,23 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<div class="btnHeng">
|
<div class="btnHeng">
|
||||||
<div @click="toFixed(scope.row.pkId,2)"
|
<div
|
||||||
type="text"
|
|
||||||
v-if="scope.row.pickType!=8"
|
|
||||||
v-hasButtons="['cardUpdata']"
|
v-hasButtons="['cardUpdata']"
|
||||||
|
type="text"
|
||||||
style="color:#F3A900"
|
style="color:#F3A900"
|
||||||
size="small">
|
size="small"
|
||||||
|
@click="toFixed(scope.row.pkId,2)"
|
||||||
|
>
|
||||||
{{ '修改' }}
|
{{ '修改' }}
|
||||||
</div>
|
</div>
|
||||||
<div @click="toDel(scope.row.pkId)"
|
<div
|
||||||
type="text"
|
|
||||||
v-hasButtons="['cardDel']"
|
v-hasButtons="['cardDel']"
|
||||||
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
style="color: #C8161D">
|
style="color: #C8161D"
|
||||||
|
@click="toDel(scope.row.pkId)"
|
||||||
|
>
|
||||||
{{ '删除' }}
|
{{ '删除' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -257,8 +262,8 @@
|
||||||
<script>
|
<script>
|
||||||
import topBar from '@/components/topBar'
|
import topBar from '@/components/topBar'
|
||||||
import * as api from '@/api/giftGoods.js'
|
import * as api from '@/api/giftGoods.js'
|
||||||
import {tgtype} from "@/api/giftGoods.js";
|
import { tgtype } from '@/api/giftGoods.js'
|
||||||
import {getPickList} from "@/api/manage";
|
import { getPickList } from '@/api/manage'
|
||||||
export default {
|
export default {
|
||||||
name: 'Bzpz',
|
name: 'Bzpz',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -267,9 +272,9 @@ export default {
|
||||||
filters: {
|
filters: {
|
||||||
isAgree(val) {
|
isAgree(val) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
return '允许';
|
return '允许'
|
||||||
} else {
|
} else {
|
||||||
return '禁止';
|
return '禁止'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,8 @@ export default {
|
||||||
{ 'memberCode': res.memberCode, 'pkProduct': res.pkProduct, 'specsName': res.specsName,
|
{ 'memberCode': res.memberCode, 'pkProduct': res.pkProduct, 'specsName': res.specsName,
|
||||||
'specsNameId': res.specsNameId, 'baseQuantity': res.baseQuantity, 'quantity': res.quantity,
|
'specsNameId': res.specsNameId, 'baseQuantity': res.baseQuantity, 'quantity': res.quantity,
|
||||||
'isFreeMail': res.isFreeMail, 'pkPostage': res.pkPostage ? res.pkPostage : '', 'pkId': res.pkId ? res.pkId : '',
|
'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
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@ module.exports = {
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/prod-api': {
|
'/prod-api': {
|
||||||
target: 'http://t-mana.beida413.com/',
|
target: 'http://localhost:8080/',
|
||||||
changeOrigin: true
|
changeOrigin: true,
|
||||||
// pathRewrite: {
|
pathRewrite: {
|
||||||
// '^/prod-api': ''
|
'^/prod-api': ''
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// before: require('./mock/mock-server.js')
|
// before: require('./mock/mock-server.js')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue