This commit is contained in:
cun-nan 2024-02-02 15:31:02 +08:00
parent 974fd2be7c
commit 63f4fcfbf4
3 changed files with 61 additions and 3 deletions

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 测试支付接口
export function giftCardExchange(query) {
return request({
url: '/business/marketingActivity/cardGift/exchange',
method: 'get',
data:query
})
}

View File

@ -277,7 +277,7 @@
</div>
</div>
</el-tab-pane>
<el-tab-pane label="存油卡" name="literCard">
<el-tab-pane label="存油卡" name="literCard" v-if="oilTypeList && oilTypeList.length>0">
<el-row>
<el-col :span="24">
<div style="display: flex">
@ -365,6 +365,28 @@
<el-button @click="cancel"> </el-button>
</div>
</el-tab-pane>
<el-tab-pane label="礼品卡充值" name="literCard">
<el-form ref="form" :model="form2" :rules="rules1" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="卡号" prop="number" style="width: 500px">
<el-input v-model="form2.number" placeholder="请输入卡号" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="卡密" prop="cardPassword" style="width: 500px">
<el-input v-model="form2.cardPassword" placeholder="请输入卡密" maxlength="30" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="margin: 20px 0;text-align: center">
<el-button type="primary" @click="confirm1()">确认充值</el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-tab-pane>
</el-tabs>
</template>
</el-dialog>
@ -834,6 +856,7 @@ import {
listCardValueChild, listCardValueChildOrder
} from "@/api/staff/user/cardvaluechild";
import {getOilOrderAllAmount} from "@/api/order/oilorder";
import {giftCardExchange} from "@/api/giftCard/giftcard";
export default {
components: {
@ -964,6 +987,7 @@ export default {
id: '',
//
form: {},
form2: {},
refuelMoney:[],
form1: {},
cardChildPhones: "",
@ -1002,6 +1026,11 @@ export default {
fixingLevel: [{required: true, message: "请选择认证信息", trigger: "blur"}],
userId:[{ required: true, message: '请选择主卡信息', trigger: 'change' }],
cardChildPhones:[{required: true, message: "请输入子卡手机号", trigger: "blur"}],
},
//
rules1: {
number: [{required: true, message: "请输入卡号", trigger: "blur"}],
cardPassword: [{required: true, message: "请输入卡密", trigger: "blur"}],
}
}
},
@ -1381,6 +1410,20 @@ export default {
this.title = this.payment
},
confirm1(){
this.$refs["form"].validate(valid => {
if (valid) {
giftCardExchange(this.form2).then(res => {
if (res.data.id == '' || res.data.id == null) {
this.$message.error('兑换失败!');
} else {
this.$message.success('兑换成功!');
this.openRecharge = false
}
})
}
})
},
//
payMethod(payType, flag) {
// this.map.payType = payType;
@ -1756,6 +1799,8 @@ export default {
reset() {
this.resetForm("form");
this.form = {}
this.form1 = {}
this.form2 = {}
},
//
cancel() {

View File

@ -242,9 +242,12 @@
<el-row>
<el-col :span="24">
<el-form-item label="提成类型" prop="type">
<el-radio-group v-model="form.type">
<el-radio-group v-model="form.type" v-if="form.commissionSource == '车主加油'">
<el-radio v-for="dict in dict.type.comissionType" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.type" v-else>
<el-radio v-for="dict in dict.type.comissionType" v-if="dict.value!='payAmount'" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
@ -602,7 +605,7 @@ export default {
this.form = {
type:'orderAmount',
status:'qy',
commissionSource:'油品'
commissionSource:'储值卡充值'
};
}else {
this.form = {