分润配置页面

This commit is contained in:
BOOL\25024
2024-09-28 17:00:25 +08:00
parent a7b69567ce
commit 1aff2edea8
2 changed files with 282 additions and 286 deletions

View File

@@ -34,13 +34,21 @@
<el-row>
<el-col :span="12">
<el-form-item label="当前配置二维码规则:">
<el-input v-model="stationDetail.qrcodePrefix" maxlength="100px" :disabled="true" />
<el-input
v-model="stationDetail.qrcodePrefix"
maxlength="100px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<el-button icon="el-icon-setting" size="big" @click="handleCreate"
v-has-permi="['pile:station:edit']">配置参数
<el-button
icon="el-icon-setting"
size="big"
@click="handleCreate"
v-has-permi="['pile:station:edit']"
>配置参数
</el-button>
</el-form-item>
</el-col>
@@ -50,17 +58,27 @@
<el-card style="margin-bottom: 10px">
<h2>互联互通配置</h2>
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数-->
<!-- </el-button>-->
<el-form ref="stationSettingForm" :model="stationSettingInfo" label-position="right" label-width="200px"
style="margin-top: 10px">
<!-- <el-button icon="el-icon-edit" size="big" @click="openEdit" v-has-permi="['pile:station:edit']">编辑参数-->
<!-- </el-button>-->
<el-form
ref="stationSettingForm"
:model="stationSettingInfo"
label-position="right"
label-width="200px"
style="margin-top: 10px"
>
<el-row>
<el-col :span="12">
<el-form-item label="对接平台名称:" prop="type">
<el-checkbox-group v-model="checkList">
<el-checkbox v-for="dict in dict.type.third_party_type" :label="dict.label" :key="dict.value"
:value="dict.value" :disabled="firstList.includes(dict.label)"
@change="getPlatform(dict.raw.dictValue)" />
<el-checkbox
v-for="dict in dict.type.third_party_type"
:label="dict.label"
:key="dict.value"
:value="dict.value"
:disabled="firstList.includes(dict.label)"
@change="getPlatform(dict.raw.dictValue)"
/>
</el-checkbox-group>
</el-form-item>
</el-col>
@@ -69,9 +87,13 @@
<!--<el-button size="big" @click="pushStation" v-has-permi="['pile:station:edit']">-->
<!-- 推送站点信息-->
<!--</el-button>-->
<el-button size="big" @click="saveStationThirdParty" v-has-permi="['pile:station:edit']">
保存对接平台关系
</el-button>
<el-button
size="big"
@click="saveStationThirdParty"
v-has-permi="['pile:station:edit']"
>
保存对接平台关系
</el-button>
</el-form-item>
</el-col>
</el-row>
@@ -80,48 +102,89 @@
<el-card style="margin-bottom: 10px">
<h2>绑定停车平台(配置完成后订单完成将自动下发优惠券)</h2>
<el-button icon="el-icon-edit" size="big" @click="parkingOpenEdit" v-has-permi="['pile:station:edit']">编辑参数
<el-button
icon="el-icon-edit"
size="big"
@click="parkingOpenEdit"
v-has-permi="['pile:station:edit']"
>编辑参数
</el-button>
<el-form ref="parkingForm" :model="parkingInfo" label-position="right" label-width="200px"
style="margin-top: 10px">
<el-form
ref="parkingForm"
:model="parkingInfo"
label-position="right"
label-width="200px"
style="margin-top: 10px"
>
<el-row>
<el-col :span="5">
<el-form-item label="停车平台名称:" prop="type">
<el-select v-model="parkingInfo.parkingName" placeholder="请选择停车平台名称" clearable filterable
style="width: 220px" :disabled="parkingDisableFlag" @change="getParkingInfo($event)">
<el-option v-for="item in parkingInfoList" :key="item.id" :label="item.parkingName"
:value="item.id" />
<el-select
v-model="parkingInfo.parkingName"
placeholder="请选择停车平台名称"
clearable
filterable
style="width: 220px"
:disabled="parkingDisableFlag"
@change="getParkingInfo($event)"
>
<el-option
v-for="item in parkingInfoList"
:key="item.id"
:label="item.parkingName"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<el-button size="big" @click="saveParkingSetting(parkingInfo.id)" v-has-permi="['pile:station:edit']">
<el-button
size="big"
@click="saveParkingSetting(parkingInfo.id)"
v-has-permi="['pile:station:edit']"
>
保存
</el-button>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="停车场库secretKey:" prop="secretKey">
<el-input placeholder="请输入" v-model="parkingInfo.secretKey" :disabled="true" />
<el-input
placeholder="请输入"
v-model="parkingInfo.secretKey"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="停车场库appId:" prop="appId">
<el-input placeholder="请输入" v-model="parkingInfo.appId" :disabled="true" />
<el-input
placeholder="请输入"
v-model="parkingInfo.appId"
:disabled="true"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="票券id:" prop="couponId">
<el-input placeholder="请输入" v-model="parkingInfo.couponId" :disabled="false" />
<el-input
placeholder="请输入"
v-model="parkingInfo.couponId"
:disabled="false"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="停车场库商户id:" prop="parkingMerchantId">
<el-input placeholder="请输入" v-model="parkingInfo.parkingMerchantId" :disabled="false" />
<el-input
placeholder="请输入"
v-model="parkingInfo.parkingMerchantId"
:disabled="false"
/>
</el-form-item>
</el-col>
</el-row>
@@ -135,8 +198,13 @@
<el-col :span="12">
<el-form-item label="查询地锁列表二维码:" />
<div>
<vue-qr ref="Qrcode" :text="queryGroundLockQrCode" qid="lockListQrCode" :width="150"
style="margin-left: 190px; margin-top: -10px" />
<vue-qr
ref="Qrcode"
:text="queryGroundLockQrCode"
qid="lockListQrCode"
:width="150"
style="margin-left: 190px; margin-top: -10px"
/>
</div>
</el-col>
</el-row>
@@ -152,15 +220,19 @@
<order-report ref="orderReport"></order-report>
</el-tab-pane>
<el-tab-pane label="分成配置" name="orderReport">
<order-report ref="orderReport"></order-report>
<el-tab-pane label="分成配置" name="Config">
<Config ref="orderReport"></Config>
</el-tab-pane>
</el-tabs>
<el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible">
<el-form ref="form" :model="form" @submit.native.prevent>
<el-form-item label="二维码前缀:" prop="prefix" label-width="100px">
<el-input v-model="form.prefix" placeholder="请输入二维码前缀" style="width: 300px" />
<el-input
v-model="form.prefix"
placeholder="请输入二维码前缀"
style="width: 300px"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" align="center">
@@ -181,17 +253,20 @@ import MapContainer from "../../../components/MapContainer/MapContainer.vue";
import stationOrderList from "@/views/pile/station/stationOrderList";
import stationWhiteList from "@/views/pile/station/stationWhiteList";
import {
getStationInfo,
updateStationQRCodePrefix,
getSettingByStationId,
updateSettingByStationId,
pushStationInfo,
getSettingInfo,
getParkingInfoList,
bindParkingPlatform, getRelationByStationId, updateThirdPartyStationRelation,
getStationInfo,
updateStationQRCodePrefix,
getSettingByStationId,
updateSettingByStationId,
pushStationInfo,
getSettingInfo,
getParkingInfoList,
bindParkingPlatform,
getRelationByStationId,
updateThirdPartyStationRelation,
} from "@/api/pile/station";
import Whitelist from "@/views/pile/station/stationWhiteList";
import OrderReport from "./orderReport.vue";
import Config from "@/views/pile/station/splitConfig.vue";
export default {
dicts: ["third_party_type"],
@@ -206,6 +281,7 @@ export default {
stationOrderList,
stationWhiteList,
OrderReport,
Config
},
data() {
return {
@@ -236,9 +312,8 @@ export default {
// console.log(this.stationId, "充电桩详情 create");
// const stationId = this.stationId;
this.queryGroundLockQrCode =
"https://api.jsowellcloud.com/app-xcx-h5/getGroundLockInfo/" +
this.stationId;
this.updateTitle();
"https://api.jsowellcloud.com/app-xcx-h5/getGroundLockInfo/" + this.stationId;
this.updateTitle();
this.getRelationByStationId();
this.getParkingList();
this.queryStationInfo();
@@ -247,13 +322,13 @@ export default {
this.initializeData(this.activeName);
},
methods: {
// 更新页面title显示
updateTitle() {
const stationName = this.stationName;
const title = "【" + stationName + "】站点详情";
const route = Object.assign({}, this.$route, { title: `${title}` });
this.$store.dispatch("tagsView/updateVisitedView", route);
},
// 更新页面title显示
updateTitle() {
const stationName = this.stationName;
const title = "【" + stationName + "】站点详情";
const route = Object.assign({}, this.$route, { title: `${title}` });
this.$store.dispatch("tagsView/updateVisitedView", route);
},
handleClick(tab, event) {
// console.log(tab, event);
this.initializeData(tab.name);
@@ -300,7 +375,7 @@ export default {
res.rows.forEach((item, index) => {
this.checkList.push(item.thirdPartyType);
this.firstList.push(item.thirdPartyType);
})
});
console.log("this.checkList", this.checkList, this.firstList);
// if (res.data === undefined) {
// this.stationSettingInfo.thirdPartyType = "0";
@@ -379,12 +454,12 @@ export default {
},
// 推送站点
pushStation() {
let exchange = ''
let exchange = "";
const param = {
stationId: this.stationId,
thirdPartyTypes: this.exchange,
};
console.log('param', param);
console.log("param", param);
pushStationInfo(param).then((response) => {
console.log("response", response);
this.$modal.msg(response.obj);
@@ -392,17 +467,17 @@ export default {
});
},
// 保存站点与第三方平台关系
saveStationThirdParty() {
const param = {
stationId: this.stationId,
thirdPartyTypes: this.exchange,
};
console.log('param', param);
updateThirdPartyStationRelation(param).then((response) => {
this.$message.success(response.msg);
});
},
// 保存站点与第三方平台关系
saveStationThirdParty() {
const param = {
stationId: this.stationId,
thirdPartyTypes: this.exchange,
};
console.log("param", param);
updateThirdPartyStationRelation(param).then((response) => {
this.$message.success(response.msg);
});
},
// 绑定站点与停车平台配置
saveParkingSetting(parkingId) {
@@ -449,13 +524,17 @@ export default {
// 复选框状态
getPlatform(id) {
this.exchange.push(id);
}
},
},
//监听复选框状态
watch: {
checkList: {
handler(newVal) {
this.exchange = newVal.map(item => this.dict.type.third_party_type.find(dict => dict.label === item)?.raw?.dictValue);
this.exchange = newVal.map(
(item) =>
this.dict.type.third_party_type.find((dict) => dict.label === item)?.raw
?.dictValue
);
},
deep: true,
},