|
@@ -32,7 +32,7 @@
|
|
<el-dialog
|
|
<el-dialog
|
|
:title="title"
|
|
:title="title"
|
|
:visible.sync="openDialog"
|
|
:visible.sync="openDialog"
|
|
- width="550px"
|
|
|
|
|
|
+ width="600px"
|
|
append-to-body
|
|
append-to-body
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
@@ -76,7 +76,7 @@
|
|
:min="0"
|
|
:min="0"
|
|
/>
|
|
/>
|
|
<span>{{ updateForm.discountTerm == 0 ? "元" : "L" }}</span>
|
|
<span>{{ updateForm.discountTerm == 0 ? "元" : "L" }}</span>
|
|
- 每升优惠
|
|
|
|
|
|
+ ,每升优惠
|
|
<el-input-number
|
|
<el-input-number
|
|
v-model="updateForm.gasoilDiscountAmt"
|
|
v-model="updateForm.gasoilDiscountAmt"
|
|
size="mini"
|
|
size="mini"
|
|
@@ -102,18 +102,6 @@
|
|
注:"否" 客户只享受 {{ discountName }} 优惠
|
|
注:"否" 客户只享受 {{ discountName }} 优惠
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item
|
|
|
|
- v-show="false"
|
|
|
|
- label="优惠方案类型"
|
|
|
|
- prop="discountPlanType"
|
|
|
|
- >
|
|
|
|
- <el-select
|
|
|
|
- v-model="updateForm.discountPlanType"
|
|
|
|
- placeholder="请选择优惠方案类型"
|
|
|
|
- >
|
|
|
|
- <el-option label="请选择字典生成" value="" />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
|
<el-button type="primary" @click="handleSubmit">确 定</el-button>
|
|
@@ -126,7 +114,7 @@
|
|
ref="queryForm"
|
|
ref="queryForm"
|
|
:inline="true"
|
|
:inline="true"
|
|
label-width="68px"
|
|
label-width="68px"
|
|
- v-show="discountSetting!=0"
|
|
|
|
|
|
+ v-show="discountSetting != 0"
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
<span style="color: #ff9955; font-size: 25px">|</span
|
|
<span style="color: #ff9955; font-size: 25px">|</span
|
|
@@ -160,34 +148,24 @@
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table :data="discountList" v-show="discountSetting!=0">
|
|
|
|
|
|
+ <el-table :data="discountList" v-show="discountSetting != 0">
|
|
<af-table-column label="id" align="center" prop="id" v-if="false" />
|
|
<af-table-column label="id" align="center" prop="id" v-if="false" />
|
|
<af-table-column label="方案名称" align="center" prop="grade" />
|
|
<af-table-column label="方案名称" align="center" prop="grade" />
|
|
<af-table-column label="油品名称" align="center" prop="oilName" />
|
|
<af-table-column label="油品名称" align="center" prop="oilName" />
|
|
<af-table-column
|
|
<af-table-column
|
|
label="优惠条件"
|
|
label="优惠条件"
|
|
align="center"
|
|
align="center"
|
|
- v-show="discountSetting == 3"
|
|
|
|
- >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- 满 {{ scope.row.discountAmt }}元,每升优惠
|
|
|
|
- {{ scope.row.gasoilDiscountAmt }} 元
|
|
|
|
- </template>
|
|
|
|
- </af-table-column>
|
|
|
|
- <af-table-column
|
|
|
|
- label="优惠条件"
|
|
|
|
- align="center"
|
|
|
|
- v-show="discountSetting == 3"
|
|
|
|
|
|
+ v-if="discountSetting==3"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- 满 {{ scope.row.discountAmt }}升,每升优惠
|
|
|
|
|
|
+ 满 {{ scope.row.discountAmt }} {{scope.row.discountTerm == 0 ? "元": "L"}},每升优惠
|
|
{{ scope.row.gasoilDiscountAmt }} 元
|
|
{{ scope.row.gasoilDiscountAmt }} 元
|
|
</template>
|
|
</template>
|
|
</af-table-column>
|
|
</af-table-column>
|
|
<af-table-column
|
|
<af-table-column
|
|
label="优惠条件"
|
|
label="优惠条件"
|
|
align="center"
|
|
align="center"
|
|
- v-show="discountSetting == 1"
|
|
|
|
|
|
+ v-if="discountSetting==1"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
每满 {{ scope.row.discountAmt }} 元,减
|
|
每满 {{ scope.row.discountAmt }} 元,减
|
|
@@ -197,7 +175,7 @@
|
|
<af-table-column
|
|
<af-table-column
|
|
label="优惠条件"
|
|
label="优惠条件"
|
|
align="center"
|
|
align="center"
|
|
- v-show="discountSetting == 2"
|
|
|
|
|
|
+ v-if="discountSetting == 2"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
满 {{ scope.row.discountAmt }} 元,减
|
|
满 {{ scope.row.discountAmt }} 元,减
|
|
@@ -240,13 +218,13 @@
|
|
class-name="small-padding fixed-width"
|
|
class-name="small-padding fixed-width"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button
|
|
|
|
|
|
+ <!-- <el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
>修改</el-button
|
|
>修改</el-button
|
|
- >
|
|
|
|
|
|
+ > -->
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@@ -295,24 +273,10 @@ export default {
|
|
|
|
|
|
return {
|
|
return {
|
|
discountList: [],
|
|
discountList: [],
|
|
- // 总条数
|
|
|
|
total: 0,
|
|
total: 0,
|
|
- couponPlusOptions: [],
|
|
|
|
- vipDiscountyPlusOptions: [],
|
|
|
|
- discountSettingOptions: [],
|
|
|
|
- stationOptions: [],
|
|
|
|
oilNameOptions: [],
|
|
oilNameOptions: [],
|
|
- oilNameOptionsDT: [],
|
|
|
|
- oilNameOptionsZJ: [],
|
|
|
|
- discountTermOptions: [],
|
|
|
|
- // 弹出层标题
|
|
|
|
title: "",
|
|
title: "",
|
|
- fangan: "",
|
|
|
|
- // 是否显示弹出层
|
|
|
|
- open: false,
|
|
|
|
openDialog: false,
|
|
openDialog: false,
|
|
- yuan: true,
|
|
|
|
- laters: false,
|
|
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -330,10 +294,8 @@ export default {
|
|
date: null,
|
|
date: null,
|
|
deductionGrowthValue: null,
|
|
deductionGrowthValue: null,
|
|
},
|
|
},
|
|
- // 表单参数
|
|
|
|
- form: {},
|
|
|
|
|
|
+
|
|
ruleForm: {
|
|
ruleForm: {
|
|
- imgFileList: [],
|
|
|
|
},
|
|
},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
@@ -364,7 +326,7 @@ export default {
|
|
dtrules: {},
|
|
dtrules: {},
|
|
discountSetting: 0,
|
|
discountSetting: 0,
|
|
updateForm: {},
|
|
updateForm: {},
|
|
- currentDiscountName:'',
|
|
|
|
|
|
+ currentDiscountName: "",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -379,33 +341,22 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getDicts("coupon_plus").then((response) => {
|
|
|
|
- this.couponPlusOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("discount_term").then((response) => {
|
|
|
|
- this.discountTermOptions = response.data;
|
|
|
|
- });
|
|
|
|
- this.getDicts("vip_discounty_plus").then((response) => {
|
|
|
|
- this.vipDiscountyPlusOptions = response.data;
|
|
|
|
- });
|
|
|
|
- //查看当前优惠设置
|
|
|
|
- listPrice().then((response) => {
|
|
|
|
- this.oilNameOptions = response.rows;
|
|
|
|
- });
|
|
|
|
- this.getPay().then(()=>{
|
|
|
|
- this.getList()
|
|
|
|
- })
|
|
|
|
- getStationPay().then((response) => {
|
|
|
|
- this.ruleForm = response.data;
|
|
|
|
- this.discountSetting = response.data.discountSetting;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- this.getDicts("discount_setting").then((response) => {
|
|
|
|
- this.discountSettingOptions = response.data;
|
|
|
|
- });
|
|
|
|
|
|
+ this.init();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ init() {
|
|
|
|
+ listPrice().then((response) => {
|
|
|
|
+ this.oilNameOptions = response.rows;
|
|
|
|
+ });
|
|
|
|
+ this.getPay().then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ getStationPay().then((response) => {
|
|
|
|
+ this.ruleForm = response.data;
|
|
|
|
+ this.discountSetting = response.data.discountSetting;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
getPay() {
|
|
getPay() {
|
|
return getStationPay().then((response) => {
|
|
return getStationPay().then((response) => {
|
|
this.ruleForm = response.data;
|
|
this.ruleForm = response.data;
|
|
@@ -420,13 +371,11 @@ export default {
|
|
let e = this.ruleForm.discountSetting;
|
|
let e = this.ruleForm.discountSetting;
|
|
if (e == "0") {
|
|
if (e == "0") {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
- this.fangan = "不执行优惠";
|
|
|
|
this.msgSuccess("优惠方案设置成功");
|
|
this.msgSuccess("优惠方案设置成功");
|
|
});
|
|
});
|
|
} else if (e == "1") {
|
|
} else if (e == "1") {
|
|
if (this.discountList.length > 0) {
|
|
if (this.discountList.length > 0) {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
- this.fangan = "满减";
|
|
|
|
this.msgSuccess("优惠方案设置成功");
|
|
this.msgSuccess("优惠方案设置成功");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -435,7 +384,6 @@ export default {
|
|
} else if (e == "2") {
|
|
} else if (e == "2") {
|
|
if (this.discountList.length > 0) {
|
|
if (this.discountList.length > 0) {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
- this.fangan = "立减";
|
|
|
|
this.msgSuccess("优惠方案设置成功");
|
|
this.msgSuccess("优惠方案设置成功");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -444,7 +392,6 @@ export default {
|
|
} else if (e == "3") {
|
|
} else if (e == "3") {
|
|
if (this.discountList.length > 0) {
|
|
if (this.discountList.length > 0) {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
updatePay(this.ruleForm).then((response) => {
|
|
- this.fangan = "直降";
|
|
|
|
this.msgSuccess("优惠方案设置成功");
|
|
this.msgSuccess("优惠方案设置成功");
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -452,7 +399,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.getPay()
|
|
|
|
|
|
+ this.getPay();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|