11.6
This commit is contained in:
parent
a0f9d68658
commit
c44c43d9bb
@ -15,6 +15,13 @@ export function getListtj(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function oilDepotConfiguration(query) {
|
||||
return request({
|
||||
url: 'business/oilDepotConfiguration',
|
||||
method: 'put',
|
||||
data: query
|
||||
})
|
||||
}
|
||||
// 新增列表
|
||||
export function addList(data) {
|
||||
return request({
|
||||
|
@ -44,8 +44,8 @@
|
||||
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
|
||||
<div class="tj-siez">剩余额度</div>
|
||||
</el-card>
|
||||
<el-card class="kar" >
|
||||
<div class="tj-num"> <el-tag>启用</el-tag> </div>
|
||||
<el-card class="kar" style="cursor: pointer" >
|
||||
<div class="tj-num"> <el-tag v-if="tjdata.exchangeStatus == 0" @click="putStatus(1)">启用</el-tag> <el-tag type="info" v-if="tjdata.exchangeStatus == 1 " @click="putStatus(0)">禁用</el-tag> </div>
|
||||
<div class="tj-siez">兑换功能状态</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -153,9 +153,6 @@
|
||||
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addBlock()">创建</el-button>
|
||||
@ -166,7 +163,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList,getListtj,addList,eitList,deleteList } from "@/api/EventMarketing/giftBlock";
|
||||
import { getList,getListtj,addList,eitList,deleteList,oilDepotConfiguration } from "@/api/EventMarketing/giftBlock";
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
@ -256,7 +253,19 @@
|
||||
|
||||
},
|
||||
methods:{
|
||||
putStatus(id){
|
||||
let data = {
|
||||
id:1,
|
||||
exchangeStatus:id,
|
||||
}
|
||||
oilDepotConfiguration(data).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.$message.success("操作成功")
|
||||
this.gettj()
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
getlist(){
|
||||
this.queryParams.pageNo=this.pageNo
|
||||
this.queryParams.pageSize=this.pageSize
|
||||
@ -265,6 +274,7 @@
|
||||
this.total = res.data.total;
|
||||
})
|
||||
},
|
||||
|
||||
posteid(data){
|
||||
eitList(data).then(res=>{
|
||||
if(res.code == 200){
|
||||
@ -289,11 +299,16 @@
|
||||
}
|
||||
},
|
||||
addBlock(){
|
||||
if(this.ruleForm.quantity == '' ||this.ruleForm.cardAmount == '' ||this.ruleForm.status == '' ){
|
||||
this.$message.error('必填项不能有空')
|
||||
return
|
||||
}
|
||||
let data = this.ruleForm
|
||||
addList(data).then(res=>{
|
||||
if(res.code == 200){
|
||||
this.$message.success('添加成功');
|
||||
this.gettj()
|
||||
this.getlist()
|
||||
}else {
|
||||
this.$message.error('操作失败请稍后再试');
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
:value="dict.oilName">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="queryParams.status" placeholder="请选择" style="margin:0px 20px">
|
||||
<el-select v-model="queryParams.activeStatus" placeholder="请选择" style="margin:0px 20px">
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
@ -184,12 +184,12 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="锁价单价" prop="lockupPrice">
|
||||
<el-input v-model="ruleForm.lockupPrice">
|
||||
<el-input v-model="ruleForm.lockupPrice" min="1">
|
||||
<template slot="append">元/升</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="充值金额" prop="rechargeBalance">
|
||||
<el-input v-model="ruleForm.rechargeBalance">
|
||||
<el-input v-model="ruleForm.rechargeBalance" min="1">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -274,10 +274,10 @@
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
value: 'true',
|
||||
value: '1',
|
||||
label: '正常'
|
||||
}, {
|
||||
value: 'false',
|
||||
value: '2',
|
||||
label: '禁用'
|
||||
},],
|
||||
tableData: [],
|
||||
@ -285,8 +285,8 @@
|
||||
ruleForm:{
|
||||
oilType:2,
|
||||
lockupPrice: 0 ,
|
||||
rechargeBalance:'',
|
||||
incomeLitres:'',
|
||||
rechargeBalance:0,
|
||||
incomeLitres:0,
|
||||
points:'',
|
||||
status:'0',
|
||||
activeTime:'1',
|
||||
@ -295,7 +295,7 @@
|
||||
queryParams:{
|
||||
type:'柴油',
|
||||
oilType:'',
|
||||
status:'',
|
||||
activeStatus:'',
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
},
|
||||
@ -323,8 +323,28 @@
|
||||
this.getlist()
|
||||
},
|
||||
watch:{
|
||||
|
||||
'ruleForm.rechargeBalance':{
|
||||
handler: function() {
|
||||
this.ruleForm.incomeLitres = this.ruleForm.rechargeBalance / this.ruleForm.lockupPrice
|
||||
},
|
||||
},
|
||||
'ruleForm.lockupPrice':{
|
||||
handler: function() {
|
||||
this.ruleForm.incomeLitres = this.ruleForm.rechargeBalance / this.ruleForm.lockupPrice
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 计算属性很重要的特性: 带缓存, 性能极强
|
||||
// 在第一次使用该属性时进行计算, 计算后将结果缓存起来, 后面如果还有其他地方用到, 会直接从缓存中取值, 不会再次计算
|
||||
// 如果依赖的数据更新, 也会重新计算, 然后重复上述操作
|
||||
totalCount () {
|
||||
console.log('我是 computed 里的求和属性')
|
||||
this.ruleForm.incomeLitres = this.ruleForm.rechargeBalance / this.ruleForm.lockupPrice
|
||||
return this.ruleForm.incomeLitres
|
||||
}
|
||||
},
|
||||
|
||||
methods:{
|
||||
radiovalue(){
|
||||
|
||||
@ -348,9 +368,9 @@
|
||||
addoilBlock(){
|
||||
this.ruleForm = {
|
||||
type:this.queryParams.type,
|
||||
lockupPrice: '' ,
|
||||
rechargeBalance:'',
|
||||
incomeLitres:'',
|
||||
lockupPrice: 0 ,
|
||||
rechargeBalance:0,
|
||||
incomeLitres:0,
|
||||
points:'',
|
||||
activeTime:'1',
|
||||
activeStatus:'1',
|
||||
|
Loading…
Reference in New Issue
Block a user