|
@@ -12,12 +12,17 @@
|
|
|
size="small"
|
|
|
@change="discountSettingChang"
|
|
|
>
|
|
|
- <el-option
|
|
|
+ <!-- <el-option
|
|
|
v-for="item in discountSettingOptions"
|
|
|
:key="item.dictValue"
|
|
|
:label="item.dictLabel"
|
|
|
:value="item.dictValue"
|
|
|
- ></el-option>
|
|
|
+ ></el-option> -->
|
|
|
+ <el-option label="无" value="1"></el-option>
|
|
|
+ <el-option label="满减" value="2"></el-option>
|
|
|
+ <el-option label="立减" value="3"></el-option>
|
|
|
+ <el-option label="直降" value="4"></el-option>
|
|
|
+
|
|
|
</el-select>
|
|
|
<el-button size="mini" @click="save" type="primary">确定执行该优惠方案</el-button>
|
|
|
</el-form-item>
|
|
@@ -316,6 +321,43 @@
|
|
|
<el-button @click="cancelDT">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <hr>
|
|
|
+ <el-table :data="discountList">
|
|
|
+ <el-table-column label="id" align="center" prop="id" v-if="false" />
|
|
|
+ <el-table-column label="方案名称" align="center" prop="grade" />
|
|
|
+ <el-table-column label="油品名称" align="center" prop="oilName" />
|
|
|
+ <el-table-column label="开始条件" align="center" prop="discountAmt" />
|
|
|
+ <el-table-column label="结束" align="center" prop="gasoilDiscountAmt" />
|
|
|
+ <el-table-column label="优惠条件" align="center" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ 每满 {{scope.row.discountAmt}} 减 {{scope.row.gasoilDiscountAmt}}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="优惠条件金额" v-if="false" align="center" prop="discountAmt" />
|
|
|
+ <el-table-column label="优惠金额" v-if="false" align="center" prop="gasoilDiscountAmt" />
|
|
|
+ <el-table-column label="等级优惠是否叠加" align="center" prop="vipDiscountyPlus" :formatter="vipDiscountyPlusFotmat" />
|
|
|
+ <el-table-column label="可否叠加劵" align="center" prop="couponPlus" :formatter="couponPlusFotmat"
|
|
|
+ />
|
|
|
+ <el-table-column label="优惠方案类型" v-if="false" align="center" prop="discountPlanType" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['market:plan:edit']"
|
|
|
+ >修改</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['market:plan:remove']"
|
|
|
+ >删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -328,14 +370,7 @@
|
|
|
name: "Setting",
|
|
|
data() {
|
|
|
return {
|
|
|
- // 选中数组
|
|
|
- ids: [],
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
+ discountList:[],
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
// 客户优惠等级设置表格数据
|
|
@@ -422,9 +457,6 @@
|
|
|
query:{
|
|
|
deptId: null
|
|
|
},
|
|
|
- queryRule:{
|
|
|
- stationId: null
|
|
|
- },
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
},
|
|
@@ -438,8 +470,8 @@
|
|
|
queryInfo:{
|
|
|
stationId: null
|
|
|
},
|
|
|
- deptInfo:{}
|
|
|
-
|
|
|
+ deptInfo:{},
|
|
|
+ discountSetting:1
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -456,11 +488,13 @@
|
|
|
this.vipDiscountyPlusOptions = response.data;
|
|
|
});
|
|
|
//查看当前优惠设置
|
|
|
- this.queryRule.stationId= this.deptId;
|
|
|
|
|
|
- getStationPay(this.queryRule).then(response => {
|
|
|
+
|
|
|
+ getStationPay().then(response => {
|
|
|
this.ruleForm = response.data;
|
|
|
- let e= this.ruleForm.discountSetting;
|
|
|
+ let e = this.ruleForm.discountSetting;
|
|
|
+ this.discountSetting = this.ruleForm.discountSetting
|
|
|
+
|
|
|
if(e=="1"){
|
|
|
this.showZJ=false;
|
|
|
this.showMJ=false;
|
|
@@ -483,6 +517,7 @@
|
|
|
this.fangan="直降";
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
this.getDicts("discount_setting").then(response => {
|
|
|
this.discountSettingOptions = response.data;
|
|
|
});
|
|
@@ -531,6 +566,7 @@
|
|
|
});
|
|
|
},
|
|
|
discountSettingChang(e){
|
|
|
+ this.discountSetting = e
|
|
|
if(e=="1"){
|
|
|
this.showZJ=false;
|
|
|
this.showMJ=false;
|
|
@@ -562,42 +598,61 @@
|
|
|
},
|
|
|
onInstitutionChang(e){
|
|
|
let obj = {};
|
|
|
- obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
|
|
|
- return item.stationId === e;//筛选出匹配数据
|
|
|
+ obj = this.stationOptions.find((item)=>{ //这里的userList就是上面遍历的数据源
|
|
|
+ return item.stationId === e; //筛选出匹配数据
|
|
|
})
|
|
|
this.form.stationName=obj.deptName;
|
|
|
},
|
|
|
onInstitutionChang1(e){
|
|
|
let obj = {};
|
|
|
- obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
|
|
|
- return item.stationId === e;//筛选出匹配数据
|
|
|
+ obj = this.stationOptions.find((item)=>{ //这里的userList就是上面遍历的数据源
|
|
|
+ return item.stationId === e; //筛选出匹配数据
|
|
|
})
|
|
|
this.dtform.stationName=obj.deptName;
|
|
|
},
|
|
|
+ getDiscount(){
|
|
|
+ const query = {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ discountPlanType:this.discountSetting
|
|
|
+ }
|
|
|
+ listPlan(query).then(response => {
|
|
|
+ console.log('list1',response);
|
|
|
+ this.planList = response.rows;
|
|
|
+ this.discountList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 查询客户优惠等级设置列表 */
|
|
|
getList() {
|
|
|
this.queryParams.discountPlanType="1";
|
|
|
this.queryParams.stationId= this.deptId;
|
|
|
|
|
|
listPlan(this.queryParams).then(response => {
|
|
|
+ console.log('list1',response);
|
|
|
this.planList = response.rows;
|
|
|
+ this.discountList = response.rows;
|
|
|
this.total = response.total;
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
getList2() {
|
|
|
+
|
|
|
this.selectParams.discountPlanType="2";
|
|
|
this.selectParams.stationId= this.deptId;
|
|
|
|
|
|
listPlan(this.selectParams).then(response => {
|
|
|
+ console.log('list2',response);
|
|
|
this.DTplanList = response.rows;
|
|
|
this.total = response.total;
|
|
|
-
|
|
|
});
|
|
|
},
|
|
|
getList3() {
|
|
|
this.zjParams.discountPlanType="3";
|
|
|
this.zjParams.stationId= this.deptId;
|
|
|
listPlan(this.zjParams).then(response => {
|
|
|
+ console.log('list3',response);
|
|
|
if(response.hasOwnProperty('rows')){
|
|
|
this.ZJplanList = response.rows;
|
|
|
}
|
|
@@ -775,7 +830,7 @@
|
|
|
/** 修改按钮操作 */
|
|
|
handleUpdateZJ(row) {
|
|
|
this.resetZJ();
|
|
|
- const id = row.id || this.ids
|
|
|
+ const id = row.id
|
|
|
getPlan(id).then(response => {
|
|
|
this.zjform = response.data;
|
|
|
this.openzj = true;
|
|
@@ -855,7 +910,7 @@
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = row.id
|
|
|
this.$confirm('是否确认删除满减优惠方案?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -869,7 +924,7 @@
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDeleteDT(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = row.id
|
|
|
this.$confirm('是否确认删除立减优惠方案?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
@@ -883,7 +938,7 @@
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleDeleteZJ(row) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
+ const ids = row.id
|
|
|
this.$confirm('是否确认删除直降优惠方案?', "警告", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|