|
|
@@ -22,7 +22,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="$t('user.stockistCode')">
|
|
|
- <el-input v-model="form.decUserName" :disabled="isDec == 1"/>
|
|
|
+ <el-input v-model="form.decUserName" :disabled="isDec == 1" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="$t('atlas.periodNumber')">
|
|
|
+ <el-select v-model="period" :placeholder="$t('atlas.periodNumber')" style="width: 100%;">
|
|
|
+ <el-option v-for="item in periodList" :key="item" :label="item" :value="item" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
@@ -105,7 +110,6 @@
|
|
|
<el-form-item :label="$t('shop.memberName')">
|
|
|
<el-input v-model="form.realName" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
|
<el-form-item :label="$t('shop.phoneNumber')">
|
|
|
<el-input v-model="form.mobile" />
|
|
|
@@ -247,6 +251,7 @@ import { getScreenWidth } from '@/utils'
|
|
|
import tool from '@/utils/tool'
|
|
|
import usersInfo from '@/utils/usersInfo'
|
|
|
import paystack from 'vue-paystack'
|
|
|
+import { fetchPeriod } from '@/api/bonus'
|
|
|
|
|
|
export default {
|
|
|
name: 'WelcomePack',
|
|
|
@@ -315,7 +320,8 @@ export default {
|
|
|
userBalance: {
|
|
|
cash: 0
|
|
|
},
|
|
|
-
|
|
|
+ periodList: [],
|
|
|
+ period: '',
|
|
|
payType: 'cash',
|
|
|
payStackLoading: false,
|
|
|
channels: ['card', 'bank', 'ussd', 'qr'],
|
|
|
@@ -409,7 +415,7 @@ export default {
|
|
|
allOpenBank: [],
|
|
|
|
|
|
activeName: 'product',
|
|
|
- isDec:null
|
|
|
+ isDec: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -423,19 +429,20 @@ export default {
|
|
|
return text
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- isDec: {
|
|
|
+ watch: {
|
|
|
+ isDec: {
|
|
|
handler(newValue, old) {
|
|
|
- if (newValue == '1') {
|
|
|
- this.form.decUserName = usersInfo.userName();
|
|
|
- }
|
|
|
- },
|
|
|
- }
|
|
|
- },
|
|
|
+ if (newValue == '1') {
|
|
|
+ this.form.decUserName = usersInfo.userName()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
const regionInfo = this.$store.getters.regionInfo
|
|
|
// console.log(this.$store.state.region)
|
|
|
this.fetchWelcomePack()
|
|
|
+ this.getPeriod()
|
|
|
},
|
|
|
methods: {
|
|
|
// 会员报单/BA升级
|
|
|
@@ -448,8 +455,8 @@ export default {
|
|
|
this.allGoods = response.data.allGoods
|
|
|
this.userBalance = response.data.userBalance
|
|
|
this.categoryType = 1
|
|
|
- //是否是报单中心
|
|
|
- this.isDec = response.data.isDec
|
|
|
+ // 是否是报单中心
|
|
|
+ this.isDec = response.data.isDec
|
|
|
const settingObj = this.allGoods
|
|
|
for (const i in this.allGoods) {
|
|
|
this.storeNums[i] = 1
|
|
|
@@ -486,6 +493,11 @@ export default {
|
|
|
this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
|
|
|
this.visibleProduct = true
|
|
|
},
|
|
|
+ getPeriod() {
|
|
|
+ fetchPeriod(this.listQuery).then(response => {
|
|
|
+ this.periodList = response.data
|
|
|
+ })
|
|
|
+ },
|
|
|
// 选择商品计数
|
|
|
handleInputNumber(current, row) {
|
|
|
const pageList = this.multipleSelection
|
|
|
@@ -682,7 +694,8 @@ export default {
|
|
|
goodsNum: this.form.goodsNum,
|
|
|
location: this.form.location,
|
|
|
decWay: this.decWay,
|
|
|
- payType: this.form.payType
|
|
|
+ payType: this.form.payType,
|
|
|
+ period: this.period
|
|
|
}
|
|
|
createWelcomePack(params).then(response => {
|
|
|
if (this.form.payType !== 'pay_stack') {
|