mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
分润配置
This commit is contained in:
@@ -221,7 +221,7 @@
|
|||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="分润配置" name="Config">
|
<el-tab-pane label="分润配置" name="Config">
|
||||||
<Config :stationId="stationId" :merchantId="merchantId"></Config>
|
<Config ref="Config" :stationId="stationId" :merchantId="merchantId"></Config>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ export default {
|
|||||||
parkingDisableFlag: true,
|
parkingDisableFlag: true,
|
||||||
exchange: [],
|
exchange: [],
|
||||||
firstList: [], //第一次复选框的默认值
|
firstList: [], //第一次复选框的默认值
|
||||||
merchantId: this.$route.params.merchantId, //运营商id
|
merchantId: "", //运营商id
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -350,16 +350,19 @@ export default {
|
|||||||
this.$refs.order.dataLoading();
|
this.$refs.order.dataLoading();
|
||||||
} else if (name === "orderReport") {
|
} else if (name === "orderReport") {
|
||||||
this.$refs.orderReport.getList();
|
this.$refs.orderReport.getList();
|
||||||
|
} else if (name === "Config") {
|
||||||
|
this.queryStationInfo();
|
||||||
|
this.$refs.Config.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryStationInfo() {
|
async queryStationInfo() {
|
||||||
console.log("stationId", this.stationId);
|
console.log("stationId", this.stationId);
|
||||||
getStationInfo(this.stationId).then((res) => {
|
await getStationInfo(this.stationId).then((res) => {
|
||||||
// console.log(res);
|
|
||||||
this.stationDetail = res.data;
|
this.stationDetail = res.data;
|
||||||
this.stationLat = res.data.stationLat;
|
this.stationLat = res.data.stationLat;
|
||||||
this.stationLng = res.data.stationLng;
|
this.stationLng = res.data.stationLng;
|
||||||
console.log(this.stationLat, this.stationLng, "父组件里面的经纬度");
|
this.merchantId = res.data.merchantId;
|
||||||
|
console.log(this.merchantId, "父组件里面的运营商id");
|
||||||
console.log("res.data", res.data);
|
console.log("res.data", res.data);
|
||||||
if (res.data.parkingId != null) {
|
if (res.data.parkingId != null) {
|
||||||
this.getParkingInfo(parseInt(res.data.parkingId));
|
this.getParkingInfo(parseInt(res.data.parkingId));
|
||||||
|
|||||||
@@ -395,7 +395,6 @@ export default {
|
|||||||
params: {
|
params: {
|
||||||
id: scope.row.id,
|
id: scope.row.id,
|
||||||
stationName: scope.row.stationName,
|
stationName: scope.row.stationName,
|
||||||
merchantId: scope.row.merchantId,
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,7 +13,12 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="carList" stripe style="width: 100%; margin-top: 20px">
|
<el-table
|
||||||
|
:data="carList"
|
||||||
|
stripe
|
||||||
|
style="width: 100%; margin-top: 20px"
|
||||||
|
v-loading="loading"
|
||||||
|
>
|
||||||
<el-table-column label="分润人" align="center" prop="splitName" />
|
<el-table-column label="分润人" align="center" prop="splitName" />
|
||||||
<el-table-column label="电费比例(%)" align="center" prop="electricitySplitRatio">
|
<el-table-column label="电费比例(%)" align="center" prop="electricitySplitRatio">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -36,7 +41,11 @@
|
|||||||
<el-table-column label="汇付会员id" align="center" prop="adapayMemberId" />
|
<el-table-column label="汇付会员id" align="center" prop="adapayMemberId" />
|
||||||
<el-table-column label="是否承担手续费" align="center" width="200">
|
<el-table-column label="是否承担手续费" align="center" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.feeFlag"></el-switch>
|
<el-switch
|
||||||
|
v-model="scope.row.feeFlag"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="0"
|
||||||
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
@@ -45,7 +54,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="deleteUpdate(scope.row.id)"
|
@click="deleteUpdate(scope.row.adapayMemberId)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
@@ -113,15 +122,13 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
createMerchantVip: {},
|
createMerchantVip: {},
|
||||||
carList: [],
|
carList: [],
|
||||||
|
loading: true,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.getMerchantList();
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.getMerchantList();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -150,10 +157,11 @@ export default {
|
|||||||
adapayMemberId: selectedMerchant.adapayMemberId,
|
adapayMemberId: selectedMerchant.adapayMemberId,
|
||||||
electricitySplitRatio: 0,
|
electricitySplitRatio: 0,
|
||||||
serviceSplitRatio: 0,
|
serviceSplitRatio: 0,
|
||||||
feeFlag: false,
|
feeFlag: 0,
|
||||||
};
|
};
|
||||||
this.carList.push(newDetail);
|
this.carList.push(newDetail);
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
console.log(this.carList);
|
console.log(this.carList);
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
@@ -172,7 +180,7 @@ export default {
|
|||||||
if (totalBbbB != 100) return this.$modal.msgError("服务费分成比例相加必须等于100%");
|
if (totalBbbB != 100) return this.$modal.msgError("服务费分成比例相加必须等于100%");
|
||||||
let trueCount = 0;
|
let trueCount = 0;
|
||||||
this.carList.forEach((car) => {
|
this.carList.forEach((car) => {
|
||||||
if (car.feeFlag) trueCount++;
|
if (car.feeFlag == 1) trueCount++;
|
||||||
});
|
});
|
||||||
// 检查是否只有一个人承担手续费
|
// 检查是否只有一个人承担手续费
|
||||||
if (trueCount != 1) return this.$modal.msgError("手续费有且只能有1位承担方");
|
if (trueCount != 1) return this.$modal.msgError("手续费有且只能有1位承担方");
|
||||||
@@ -189,20 +197,26 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("保存失败", error);
|
this.$modal.msgError("保存失败", error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//删除
|
//根据汇付id本地删除
|
||||||
deleteUpdate() {},
|
deleteUpdate(id) {
|
||||||
|
this.carList = this.carList.filter((item) => item.adapayMemberId !== id);
|
||||||
|
console.log(this.carList);
|
||||||
|
},
|
||||||
// 根据站点id 查询站点分成配置
|
// 根据站点id 查询站点分成配置
|
||||||
getList() {
|
getList() {
|
||||||
|
console.log(this.stationId, this.merchantId);
|
||||||
getSplitConfigList(this.stationId)
|
getSplitConfigList(this.stationId)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("根据站点id 查询站点分成配置", response);
|
console.log("根据站点id 查询站点分成配置", response);
|
||||||
this.carList = response.rows;
|
this.carList = response.rows;
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error("查询站点分成配置时出错", error);
|
this.$modal.msgError("查询站点分成配置时出错", error);
|
||||||
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user