diff --git a/jsowell-ui/src/views/pile/station/detail.vue b/jsowell-ui/src/views/pile/station/detail.vue index 956d72bc8..e85c945a4 100644 --- a/jsowell-ui/src/views/pile/station/detail.vue +++ b/jsowell-ui/src/views/pile/station/detail.vue @@ -221,7 +221,7 @@ - + @@ -306,7 +306,7 @@ export default { parkingDisableFlag: true, exchange: [], firstList: [], //第一次复选框的默认值 - merchantId: this.$route.params.merchantId, //运营商id + merchantId: "", //运营商id }; }, created() { @@ -350,16 +350,19 @@ export default { this.$refs.order.dataLoading(); } else if (name === "orderReport") { this.$refs.orderReport.getList(); + } else if (name === "Config") { + this.queryStationInfo(); + this.$refs.Config.getList(); } }, - queryStationInfo() { + async queryStationInfo() { console.log("stationId", this.stationId); - getStationInfo(this.stationId).then((res) => { - // console.log(res); + await getStationInfo(this.stationId).then((res) => { this.stationDetail = res.data; this.stationLat = res.data.stationLat; 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); if (res.data.parkingId != null) { this.getParkingInfo(parseInt(res.data.parkingId)); diff --git a/jsowell-ui/src/views/pile/station/index.vue b/jsowell-ui/src/views/pile/station/index.vue index 6e866c3f6..ec230c9f4 100644 --- a/jsowell-ui/src/views/pile/station/index.vue +++ b/jsowell-ui/src/views/pile/station/index.vue @@ -395,7 +395,6 @@ export default { params: { id: scope.row.id, stationName: scope.row.stationName, - merchantId: scope.row.merchantId, } }); }, diff --git a/jsowell-ui/src/views/pile/station/splitConfig.vue b/jsowell-ui/src/views/pile/station/splitConfig.vue index 4853e2955..ff12bc7b4 100644 --- a/jsowell-ui/src/views/pile/station/splitConfig.vue +++ b/jsowell-ui/src/views/pile/station/splitConfig.vue @@ -13,7 +13,12 @@ - + @@ -113,15 +122,13 @@ export default { form: {}, createMerchantVip: {}, carList: [], + loading: true, }; }, - created() { - this.getMerchantList(); - this.getList(); - }, methods: { /** 新增按钮操作 */ handleAdd() { + this.getMerchantList(); this.open = true; }, cancel() { @@ -150,10 +157,11 @@ export default { adapayMemberId: selectedMerchant.adapayMemberId, electricitySplitRatio: 0, serviceSplitRatio: 0, - feeFlag: false, + feeFlag: 0, }; this.carList.push(newDetail); this.open = false; + this.reset(); console.log(this.carList); }, // 保存 @@ -172,7 +180,7 @@ export default { if (totalBbbB != 100) return this.$modal.msgError("服务费分成比例相加必须等于100%"); let trueCount = 0; this.carList.forEach((car) => { - if (car.feeFlag) trueCount++; + if (car.feeFlag == 1) trueCount++; }); // 检查是否只有一个人承担手续费 if (trueCount != 1) return this.$modal.msgError("手续费有且只能有1位承担方"); @@ -189,20 +197,26 @@ export default { this.getList(); }) .catch((error) => { - console.error("保存失败", error); + this.$modal.msgError("保存失败", error); }); }, - //删除 - deleteUpdate() {}, + //根据汇付id本地删除 + deleteUpdate(id) { + this.carList = this.carList.filter((item) => item.adapayMemberId !== id); + console.log(this.carList); + }, // 根据站点id 查询站点分成配置 getList() { + console.log(this.stationId, this.merchantId); getSplitConfigList(this.stationId) .then((response) => { console.log("根据站点id 查询站点分成配置", response); this.carList = response.rows; + this.loading = false; }) .catch((error) => { - console.error("查询站点分成配置时出错", error); + this.$modal.msgError("查询站点分成配置时出错", error); + this.loading = false; }); }, },