11.6
This commit is contained in:
parent
a0f9d68658
commit
c44c43d9bb
@ -15,6 +15,13 @@ export function getListtj(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function oilDepotConfiguration(query) {
|
||||||
|
return request({
|
||||||
|
url: 'business/oilDepotConfiguration',
|
||||||
|
method: 'put',
|
||||||
|
data: query
|
||||||
|
})
|
||||||
|
}
|
||||||
// 新增列表
|
// 新增列表
|
||||||
export function addList(data) {
|
export function addList(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -44,8 +44,8 @@
|
|||||||
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
|
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
|
||||||
<div class="tj-siez">剩余额度</div>
|
<div class="tj-siez">剩余额度</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="kar" >
|
<el-card class="kar" style="cursor: pointer" >
|
||||||
<div class="tj-num"> <el-tag>启用</el-tag> </div>
|
<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>
|
<div class="tj-siez">兑换功能状态</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
@ -153,9 +153,6 @@
|
|||||||
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
<el-input type="textarea" v-model="ruleForm.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="addBlock()">创建</el-button>
|
<el-button type="primary" @click="addBlock()">创建</el-button>
|
||||||
@ -166,7 +163,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getList,getListtj,addList,eitList,deleteList } from "@/api/EventMarketing/giftBlock";
|
import { getList,getListtj,addList,eitList,deleteList,oilDepotConfiguration } from "@/api/EventMarketing/giftBlock";
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
data() {
|
data() {
|
||||||
@ -256,7 +253,19 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
putStatus(id){
|
||||||
|
let data = {
|
||||||
|
id:1,
|
||||||
|
exchangeStatus:id,
|
||||||
|
}
|
||||||
|
oilDepotConfiguration(data).then(res =>{
|
||||||
|
if(res.code == 200){
|
||||||
|
this.$message.success("操作成功")
|
||||||
|
this.gettj()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
getlist(){
|
getlist(){
|
||||||
this.queryParams.pageNo=this.pageNo
|
this.queryParams.pageNo=this.pageNo
|
||||||
this.queryParams.pageSize=this.pageSize
|
this.queryParams.pageSize=this.pageSize
|
||||||
@ -265,6 +274,7 @@
|
|||||||
this.total = res.data.total;
|
this.total = res.data.total;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
posteid(data){
|
posteid(data){
|
||||||
eitList(data).then(res=>{
|
eitList(data).then(res=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
@ -289,11 +299,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addBlock(){
|
addBlock(){
|
||||||
|
if(this.ruleForm.quantity == '' ||this.ruleForm.cardAmount == '' ||this.ruleForm.status == '' ){
|
||||||
|
this.$message.error('必填项不能有空')
|
||||||
|
return
|
||||||
|
}
|
||||||
let data = this.ruleForm
|
let data = this.ruleForm
|
||||||
addList(data).then(res=>{
|
addList(data).then(res=>{
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
this.$message.success('添加成功');
|
this.$message.success('添加成功');
|
||||||
this.gettj()
|
this.gettj()
|
||||||
|
this.getlist()
|
||||||
}else {
|
}else {
|
||||||
this.$message.error('操作失败请稍后再试');
|
this.$message.error('操作失败请稍后再试');
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
:value="dict.oilName">
|
:value="dict.oilName">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</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
|
<el-option
|
||||||
v-for="item in option"
|
v-for="item in option"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@ -184,12 +184,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="锁价单价" prop="lockupPrice">
|
<el-form-item label="锁价单价" prop="lockupPrice">
|
||||||
<el-input v-model="ruleForm.lockupPrice">
|
<el-input v-model="ruleForm.lockupPrice" min="1">
|
||||||
<template slot="append">元/升</template>
|
<template slot="append">元/升</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="充值金额" prop="rechargeBalance">
|
<el-form-item label="充值金额" prop="rechargeBalance">
|
||||||
<el-input v-model="ruleForm.rechargeBalance">
|
<el-input v-model="ruleForm.rechargeBalance" min="1">
|
||||||
<template slot="append">元</template>
|
<template slot="append">元</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -274,10 +274,10 @@
|
|||||||
label: '全部'
|
label: '全部'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 'true',
|
value: '1',
|
||||||
label: '正常'
|
label: '正常'
|
||||||
}, {
|
}, {
|
||||||
value: 'false',
|
value: '2',
|
||||||
label: '禁用'
|
label: '禁用'
|
||||||
},],
|
},],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
@ -285,8 +285,8 @@
|
|||||||
ruleForm:{
|
ruleForm:{
|
||||||
oilType:2,
|
oilType:2,
|
||||||
lockupPrice: 0 ,
|
lockupPrice: 0 ,
|
||||||
rechargeBalance:'',
|
rechargeBalance:0,
|
||||||
incomeLitres:'',
|
incomeLitres:0,
|
||||||
points:'',
|
points:'',
|
||||||
status:'0',
|
status:'0',
|
||||||
activeTime:'1',
|
activeTime:'1',
|
||||||
@ -295,7 +295,7 @@
|
|||||||
queryParams:{
|
queryParams:{
|
||||||
type:'柴油',
|
type:'柴油',
|
||||||
oilType:'',
|
oilType:'',
|
||||||
status:'',
|
activeStatus:'',
|
||||||
pageNo:1,
|
pageNo:1,
|
||||||
pageSize:10,
|
pageSize:10,
|
||||||
},
|
},
|
||||||
@ -323,8 +323,28 @@
|
|||||||
this.getlist()
|
this.getlist()
|
||||||
},
|
},
|
||||||
watch:{
|
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:{
|
methods:{
|
||||||
radiovalue(){
|
radiovalue(){
|
||||||
|
|
||||||
@ -348,9 +368,9 @@
|
|||||||
addoilBlock(){
|
addoilBlock(){
|
||||||
this.ruleForm = {
|
this.ruleForm = {
|
||||||
type:this.queryParams.type,
|
type:this.queryParams.type,
|
||||||
lockupPrice: '' ,
|
lockupPrice: 0 ,
|
||||||
rechargeBalance:'',
|
rechargeBalance:0,
|
||||||
incomeLitres:'',
|
incomeLitres:0,
|
||||||
points:'',
|
points:'',
|
||||||
activeTime:'1',
|
activeTime:'1',
|
||||||
activeStatus:'1',
|
activeStatus:'1',
|
||||||
|
Loading…
Reference in New Issue
Block a user