Commit eb0cceb6 by weix

修改bug,提交运营管理模块

parent 0f94f968
......@@ -28,7 +28,7 @@ export default {
await this.$store.dispatch('user/PlatformCode')
await this.mustFun();
/** 测试环境需要解注 */
// await this.getEnvironment();
await this.getEnvironment();
},
mounted () {
console.log(process.env.VUE_APP_BASE_API5)
......
<template>
<div>
<span>{{ selectName }}</span>
<el-select
:size="sizeType"
v-model="selectList"
filterable
multiple
collapse-tags
@change="selectAll"
placeholder="请选择"
>
<el-option label="全选" value="999"></el-option>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div>
<span>{{ selectName }}</span>
<el-select
:size="sizeType"
v-model="selectList"
filterable
multiple
collapse-tags
@change="selectAll"
placeholder="请选择"
>
<el-option label="全选" value="999"></el-option>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
</template>
<script>
export default {
name: "index",
props: {
type: {
type: String, //用于区分当前类型 方便后续调用
required: true
name: "index",
props: {
type: {
type: String, //用于区分当前类型 方便后续调用
required: true
},
options: {
type: Array,
required: true
},
sizeType: {
type: String,
default: 'small'
},
selectName: {
type: String,
default: ""
}
},
options: {
type: Array,
required: true
data() {
return {
selectList: [],
oldOptionsObj: [["999"]]
};
},
sizeType: {
type: String,
default: 'small'
created() {
this.init();
},
selectName: {
type: String,
default: ""
}
},
data() {
return {
selectList: [],
oldOptionsObj: [["999"]]
};
},
created() {
let options = this.options;
let list = ["999"];
options.forEach(function(item, index) {
list.push(item.id);
});
this.selectList = list;
},
methods: {
selectAll(val) {
let allValues = [];
let dataSource = this.options;
let oldOptions = this.oldOptionsObj;
let Select = this.selectList;
//保留所有值
for (let item of dataSource) {
allValues.push(item.id);
}
// 用来储存上一次的值,可以进行对比
const oldVal = oldOptions.length === 1 ? [] : oldOptions[1];
// 若是全部选择 // 取消全部选中 上次有 当前没有 表示取消全选
if (val.includes("999")) {
if (oldVal.length > 0 && !oldVal.includes("999")) {
Select = ["999"].concat(allValues);
} else if (val.length === 1) {
Select = ["999"].concat(allValues);
} else {
const index = val.indexOf("999");
val.splice(index, 1); // 排除全选选项
Select = val;
watch: {
options() {
this.init();
}
} else if (!val.includes("999")) {
console.log("------取消全选----");
if (val.length === dataSource.length) {
if (oldVal.length === dataSource.length - 1) {
Select = ["999"].concat(allValues);
} else {
Select = [];
}
} else {
Select = val;
}
}
},
methods: {
init() {
let options = this.options;
let list = ["999"];
options.forEach(function (item, index) {
list.push(item.id);
});
this.selectList = list;
},
selectAll(val) {
let allValues = [];
let dataSource = this.options;
let oldOptions = this.oldOptionsObj;
let Select = this.selectList;
//保留所有值
for (let item of dataSource) {
allValues.push(item.id);
}
// 用来储存上一次的值,可以进行对比
const oldVal = oldOptions.length === 1 ? [] : oldOptions[1];
// 若是全部选择 // 取消全部选中 上次有 当前没有 表示取消全选
if (val.includes("999")) {
if (oldVal.length > 0 && !oldVal.includes("999")) {
Select = ["999"].concat(allValues);
} else if (val.length === 1) {
Select = ["999"].concat(allValues);
} else {
const index = val.indexOf("999");
val.splice(index, 1); // 排除全选选项
Select = val;
}
} else if (!val.includes("999")) {
console.log("------取消全选----");
if (val.length === dataSource.length) {
if (oldVal.length === dataSource.length - 1) {
Select = ["999"].concat(allValues);
} else {
Select = [];
}
} else {
Select = val;
}
}
// 点击非全部选中 需要排除全部选中 以及 当前点击的选项
// 新老数据都有全部选中
// if (oldVal.includes('999') && val.includes('999')) {
// const index = val.indexOf('999')
// val.splice(index, 1) // 排除全选选项
// Select = val
// }
// //全选未选 但是其他选项全部选上 则全选选上 上次和当前 都没有全选
// if (!oldVal.includes('999') && !val.includes('999')) {
// if (val.length === allValues.length - 1) Select = ['999'].concat(val)
// }
//储存当前最后的结果 作为下次的老数据
this.oldOptionsObj[1] = Select;
this.selectList = Select;
let obj = { type: this.type, data: this.selectList };
this.$emit("changeList", obj);
// 点击非全部选中 需要排除全部选中 以及 当前点击的选项
// 新老数据都有全部选中
// if (oldVal.includes('999') && val.includes('999')) {
// const index = val.indexOf('999')
// val.splice(index, 1) // 排除全选选项
// Select = val
// }
// //全选未选 但是其他选项全部选上 则全选选上 上次和当前 都没有全选
// if (!oldVal.includes('999') && !val.includes('999')) {
// if (val.length === allValues.length - 1) Select = ['999'].concat(val)
// }
//储存当前最后的结果 作为下次的老数据
this.oldOptionsObj[1] = Select;
this.selectList = Select;
let obj = {type: this.type, data: this.selectList};
this.$emit("changeList", obj);
}
}
}
};
</script>
<style scoped lang="scss">
div {
display: inline-block;
& > span {
display: inline-block;
margin-right: 15px;
font-size: 14px;
}
& > span {
display: inline-block;
margin-right: 15px;
font-size: 14px;
}
}
</style>
import {get, post, put} from '@/request/http'
// 获取计价规则 http://192.168.0.251:8181/brand/setting/price/new/{getproductsetting}/{vehicletype}
export function priceNewApi(data, getproductsetting, vehicletype) {
const url = process.env.VUE_APP_BASE_API5 + `/setting/price/new/${getproductsetting}/${vehicletype}`;
export function priceNewApi(data, getproductsetting, vehicletype, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + `/setting/price/new/${getproductsetting}/${vehicletype}`;
return get(url,data)
}
// 新增计价规则
export function newValuationApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/setting/price/new/valuation';
return post(url,data)
}
// operateId
export function getAreaInfoApi(data,operateId,areaCode) {
const url = process.env.VUE_APP_BASE_API5 + `/area/V2/operate?operateId=${operateId}&areaCode=${areaCode}`;
return get(url,data)
}
// http://192.168.0.251:8181/brand/setting/price/new/{getproductsetting} 特殊计价 日期
export function settingPriceNewApi(data,getproductsetting) {
const url = process.env.VUE_APP_BASE_API5 + `/setting/price/new/date/${getproductsetting}`;
return get(url,data)
}
// http://192.168.0.251:8181/brand/setting/price/new/carpooling 特殊计价
export function carpoolingPriceNewApi(data,getproductsetting) {
const url = process.env.VUE_APP_BASE_API5 + `/setting/price/new/carpooling/${getproductsetting}`;
return get(url,data)
}
// http://192.168.0.251:8181/brand/setting/price/new/{getproductsetting}/{vehicletype} 特殊计价 日期保存
export function addSettingPriceNewApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/setting/price/new/date/valuationspecial';
//newPrice/setting/QueryByMore
export function settingQueryByMoreApi(data, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + '/newPrice/setting/QueryByMore';
return post(url,data)
}
// http://192.168.0.251:8181/brand/setting/price/new/{getproductsetting}/{vehicletype} 特殊计价 日期保存
export function addCarpoolingPriceNewApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/setting/price/new/carpooling/valuationspecial';
return post(url,data)
export function carpoolingPriceNewApi(data, getproductsetting, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + `/setting/price/new/carpooling/${getproductsetting}`;
return get(url,data)
}
//newPrice/setting/QueryByMore
export function settingQueryByMoreApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/newPrice/setting/QueryByMore';
return post(url,data)
export function settingPriceNewApi(data,getproductsetting, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + `/setting/price/new/date/${getproductsetting}`;
return get(url,data)
}
// brand/newPrice/setting/update
export function settingUpdateApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/newPrice/setting/update';
return post(url,data)
}
\ No newline at end of file
import {get, post, deletes} from '@/request/http'
//
export function tripProductApi(data = {}, id) {
const url = process.env.VUE_APP_BASE_API5 + '/tripProduct/'+id;
export function tripProductApi(data = {}, id, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + '/tripProduct/'+id;
return get(url, data)
}
//
export function tripProducDetailtApi(data = {}, id) {
const url = process.env.VUE_APP_BASE_API5 + `/tripProduct/detail/${id}`;
export function tripProducDetailtApi(data = {}, id, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + `/tripProduct/detail/${id}`;
return get(url, data)
}
import {get, post, put} from '@/request/http'
// 产品操作记录
export function tripProductLogApi(data, id) {
const url = process.env.VUE_APP_BASE_API5 + '/tripProduct/log/'+id;
export function tripProductLogApi(data, id, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + '/tripProduct/log/'+id;
return get(url,data)
}
......
import {put, get, post, deletes} from '@/request/http'
// 获取列表
export function getRegionManageList(data = {}) {
const url = process.env.VUE_APP_BASE_API5 + '/area/V2/condition';
return get(url, data)
}
// 根据品牌获取列表
export function getRegionManageListByPlatform(u ,data = {}) {
const url = 'https://' + u + '/brand/area/V2/condition';
export function getRegionManageList(data = {},u ) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + '/area/V2/condition';
return get(url, data)
}
//虚拟号配置查询列表
......
import {get} from '@/request/http'
// 根据开通区域Id获取开通区域以及覆盖范围 /area/V2/operate/{operateId}
export function getOpenRegionApi(data) {
const url = process.env.VUE_APP_BASE_API5 + `/area/V2/operate/organize/${data}`;
return get(url, {})
}
// 根据开通区域查询详情 /xoadoAreaOpen/count/all
export function getDetailApi(data) {
const url = process.env.VUE_APP_BASE_API5 + '/xoadoAreaOpen/count/all';
export function getDetailApi(data, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + '/xoadoAreaOpen/count/all';
return get(url, data)
}
......@@ -273,8 +273,8 @@ export function getAllAreaProducts(data) {
}
/* 查询当前区域开通的所有产品(按条件查询)(新) */
export function getAllTripProduct(data) {
const url = targetBaseUrl + '/tripProduct/list'
export function getAllTripProduct(data, u) {
const url = (u ? u+'/brand' : targetBaseUrl) + '/tripProduct/list'
return post(url, data)
}
......@@ -621,8 +621,8 @@ export function SeachfenceInfo(data) {
}
/* 计算器计价 */
export function calculatorPrice(data, platformId) {
const url = process.env.VUE_APP_BASE_API5 + `/xoadoTripProduct/calculator/${platformId}`
export function calculatorPrice(data, platformId, u) {
const url = (u ? u+'/brand' : process.env.VUE_APP_BASE_API5) + `/xoadoTripProduct/calculator/${platformId}`
return post(url, data)
}
......
......@@ -169,7 +169,30 @@ export const routes = [
import ('@/views/platform/settingDetail.vue'),
meta: {title: '品牌详情', icon: 'el-icon-aim'},
hidden: true
}
},
{
path: 'region-manage',
name: 'regionManage',
component: () =>
import ('@/views/platform/regionManage.vue'),
meta: {title: '运营管理', icon: 'el-icon-aim'}
},
{
path: 'region-detail',
name: 'regionDetail',
component: () =>
import ('@/views/platform/regionDetail.vue'),
meta: {title: '运营管理详情', icon: 'el-icon-aim'},
hidden: true
},
{
path: 'product-setup',
name: 'productSetup',
component: () =>
import ('@/views/platform/productSetup.vue'),
meta: {title: '产品详情', icon: 'el-icon-aim'},
hidden: true
},
]
},
{
......
......@@ -120,7 +120,7 @@
<span
style="color: #2d8cf0; cursor: pointer"
@click="Click_view(scope.row)"
>{{ scope.row.userName }}</span
>{{ scope.row.hasOwnProperty('userName') ? scope.row.userName : scope.row.name}}</span
>
</template>
</el-table-column>
......@@ -247,7 +247,7 @@
<span
style="color: #2d8cf0; cursor: pointer"
@click="Click_view(scope.row)"
>{{ scope.row.userName }}</span
>{{ scope.row.hasOwnProperty('userName') ? scope.row.userName : scope.row.name }}</span
>
</template>
</el-table-column>
......
......@@ -27,7 +27,7 @@
v-model="form.orderInfo"></el-input>
</el-col>
<el-col :span="8">
<Selects :options="dataSource.localTransportId" v-if="dataSource.localTransportId.length > 0"
<Selects :options="dataSource.localTransportId"
:selectName="'承接运力:'"
:type="'transportIds'"
@changeList="handlechangeList"></Selects>
......
......@@ -85,13 +85,13 @@
<div ref="screenpart">
<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="8">
<Selects :options="dataSource.localTransportId" v-if="dataSource.localTransportId.length > 0"
<Selects :options="dataSource.localTransportId"
:selectName="'承接运力:'"
:type="'transportIdList'"
@changeList="handlechangeList"></Selects>
</el-col>
<el-col :span="8">
<Selects v-if="OperationalData.length>0" :selectName="'运营区域:'" :type="'areaCodeList'"
<Selects :selectName="'运营区域:'" :type="'areaCodeList'"
:options="OperationalData"
@changeList="handlechangeList"></Selects>
</el-col>
......@@ -712,6 +712,7 @@ export default {
})
this.selectResult.transportIdList = transportIdList;
this.dataSource.localTransportId = transportIdListArr;
// v-if="dataSource.localTransportId.length > 0"
}
})
},
......@@ -929,12 +930,8 @@ export default {
}
let url = JSON.parse(this.platformId).domain[0];
if(url.indexOf('hgcx') !== -1) {
url = url.replace('hgcx', 'hgxd');
}
/** 第一行在 测试环境下使用*/
// getRegionManageList(params).then(res => {
getRegionManageListByPlatform(url, params).then(res => {
getRegionManageList(params, this.brandUrl).then(res => {
// getRegionManageListByPlatform(url, params).then(res => {
if (res.status == 200) {
let data = res.data.content
let tmpList = []
......
......@@ -60,7 +60,7 @@
</el-table-column>
<el-table-column label="车型类别" align="center" prop="type">
<template slot-scope="{row}">
{{carTypeListText(row.type)}}
{{carTypeListText(row.carType)}}
</template>
</el-table-column>
<el-table-column label="图标" align="center" prop="imgUrl">
......@@ -79,9 +79,9 @@
<el-table-column label="可接单车型" align="center" prop="runTypes">
<template slot-scope="scope">
<span
v-for="(item, index) in JSON.parse(scope.row.runTypes)"
v-for="(item, index) in scope.row.rangeOfApplication"
:key="'runTypes'+index">
{{index === 0 ? runTypeText(item) : '、'+runTypeText(item)}}
{{index === 0 ? item : '、'+item}}
</span>
</template>
</el-table-column>
......
<template>
<div style="overflow: auto;">
<el-row type="flex" style="padding: 0 10px;" v-for="(item, index) in data" :key="index">
<el-col :span="1">
<div class="out-c">
</div>
<div class="line-d" v-if="index !== data.length - 1">
</div>
</el-col>
<el-col :span="23" style="padding: 0 10px 10px;">
<el-row>
{{ (item.changeUserName ? item.changeUserName : '暂无') + ' ' + getDateStr(item.createTime)}}
</el-row>
<el-row>
<span style="color: #999999;">
更改内容:
</span>
{{item.changeContent}}
</el-row>
<el-row>
<span style="color: #999999;">
更改明细:
</span>
{{item.changeDetails}}
</el-row>
</el-col>
</el-row>
</div>
</template>
<script>
import {
tripProductLogApi
} from '@/port/productSetupNew/productSetupNew'
export default {
name: "drawerInfo",
data() {
return {
data: [
// {name: '张三', time: '2020/05/06', nr: '产品信息', mx: '产品名称/渠道/车辆类型'},
// {name: '张三', time: '2020/05/06', nr: '产品信息', mx: '产品名称/渠道/车辆类型'},
// {name: '张三', time: '2020/05/06', nr: '产品信息', mx: '产品名称/渠道/车辆类型'},
// {name: '张三', time: '2020/05/06', nr: '产品信息', mx: '产品名称/渠道/车辆类型'}
]
}
},
mounted() {
this.getDataInfo();
},
methods: {
getDataInfo() {
tripProductLogApi({}, this.$route.query.productId, this.$store.getters.areaCodeObj.platform.brandUrl)
.then((res) => {
if(res.status === 200) {
this.data = res.data;
}
})
},
getDateStr(val) {
let d = new Date(val);
const zero = (v) => {
if(v < 10) {
return '0'+v;
}else {
return v;
}
};
return d.getFullYear()+'/'+zero((d.getMonth()+1))+'/'+zero(d.getDate())+' '+zero(d.getHours())+':'+zero(d.getMinutes());
}
}
}
</script>
<style scoped lang="scss">
.out-c {
width: 20px;
height: 20px;
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
background: -webkit-gradient(radial, 10 10, 3, 10 10, 10, from(#3399ff), to(#ffffff));
margin: auto;
}
.line-d {
border-left: 1px dashed #3399ff;
margin: auto;
height: calc(100% - 21px);
width: 1px;
}
</style>
<template>
<el-dialog
class="k-region"
:visible.sync="ruleDialogVisible"
title="运营规则"
width="50%"
:close-on-click-modal="true"
@close="closeDialog"
>
<el-row type="flex" style="align-items: center;" v-for="(item, index) in data" :key="'time'+index">
<div style="width: 120px;text-align: right;" >
<span v-if="index === 0"><span class="red-s">*</span>运营时间:</span>
</div>
<div style="width: calc(100% - 120px)">
<el-row type="flex" style="padding: 5px;">
<el-col :span="14" style="display: flex;align-items: center;">
<el-time-picker
:disabled="checked"
is-range
v-model="timePickerValue"
@change="changerPicker"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="选择时间范围">
</el-time-picker>
<el-checkbox v-model="checked" style="margin-left: 10px;" v-if="index === 0" @change="changeAllDay">全天</el-checkbox>
</el-col>
<el-col :span="10">
<el-row type="flex" class="time-j-j">
<span class="red-s">*</span>可提现下单时间:
<div>
<el-input class="min-input" :disabled="checked" v-model="item.minutes"/>
</div>
<div @click="clickDataD(index)">
-
</div>
<div @click="clickDataA(index)">
+
</div>
<span style="margin-left: 10px;">分钟</span>
<i class="el-icon-circle-plus-outline" style="color: #3399FF; font-size: 18px;margin-left: 5px;cursor: pointer;" @click="addRow()"></i>
<i v-if="index > 0" class="el-icon-delete" style="color: #3399FF; font-size: 18px;margin-left: 5px;cursor: pointer;" @click="delRow(index)"></i>
</el-row>
</el-col>
</el-row>
</div>
</el-row>
<el-row type="flex" style="align-items: center;">
<div style="width: 120px;text-align: right;">
<span class="red-s">*</span>智能派单时间:
</div>
<div style="width: calc(100% - 120px)">
<el-row type="flex" class="time-j-j" style="padding: 5px;">
<!-- <span class="red-s">*</span>智能派单时间:-->
<div>
<el-input class="min-input" :disabled="checked" v-model="minutes"/>
</div>
<div @click="clickD()">
-
</div>
<div @click="clickA()" style="border-right: 1px solid #dcdfe6 !important;">
+
</div>
</el-row>
</div>
</el-row>
<el-row type="flex" style="align-items: center;">
<div style="width: 120px;text-align: right;">
<span class="red-s">*</span>派单策略:
</div>
<div style="width: calc(100% - 120px)">
<el-row type="flex" style="padding: 5px;">
<el-col :span="4">
<el-radio v-model="radio1" disabled label="1">指定派送</el-radio>
</el-col>
<el-col :span="20">
<el-radio v-model="radio1" disabled label="2">抢单派单</el-radio>
</el-col>
</el-row>
</div>
</el-row>
<el-row type="flex" style="align-items: center;">
<div style="width: 120px;text-align: right;">
<span class="red-s">*</span>派单算法:
</div>
<div style="width: calc(100% - 120px)">
<el-row type="flex" style="padding: 5px;">
<el-col :span="4">
<el-radio v-model="radio2" disabled label="1">按就近</el-radio>
</el-col>
<el-col :span="20">
<el-radio v-model="radio2" disabled label="2">按队列</el-radio>
</el-col>
</el-row>
</div>
</el-row>
<span slot="footer" class="dialog-footer foot-span">
<el-button @click="ruleDialogVisible = false">取 消</el-button>
<el-button class="primary-button" type="primary">确 定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name: "operatorRule",
props: ['ruleId'],
data() {
return {
timePickerValue: new Date('15:13:00'),
ruleDialogVisible: false,
pickerOptions: {
selectableRange: '00:00:00 - 23:59:59'
},
checked: false,
data: [
{time: [], minutes: 30}
],
minutes: 10,
radio1: '2',
radio2: '2',
}
},
created() {
console.log(this.ruleId)
},
methods: {
showDialog() {
this.ruleDialogVisible = true;
},
closeDialog() {
},
changerPicker(value) {
console.log(value)
},
clickDataA(index) {
if(this.checked) {
return;;
}
let data = this.data;
++data[index].minutes;
this.data = data;
},
clickDataD(index) {
if(this.checked) {
return;
}
let data = this.data;
if(data[index].minutes - 1 < 0) {
return;
}else {
--data[index].minutes;
}
},
addRow() {
if(this.checked) {
this.$message.info('当前运营时间为全天,不能添加新的运营时间');
return;
}
this.data.push({time: [], minutes: 0});
},
delRow(index) {
this.data.splice(index, 1);
},
clickD() {
if(this.checked) {
return;;
}
let data = this.minutes;
if(data - 1 < 0) {
return;
}else {
--data;
this.minutes = data;
}
},
clickA() {
if(this.checked) {
return;
}
let data = this.minutes;
++data;
this.minutes = data;
},
changeAllDay() {
if(this.data.length > 1) {
this.checked = !this.checked;
this.$message.info('有多条运营时间,不能设置全天运营')
}else {
this.minutes = 10;
}
}
}
}
</script>
<style scoped lang="scss">
.time-j-j {
align-items: center;
>div {
width: 40px;
padding: 5px 0;
text-align: center;
border: 1px solid #dcdfe6;
cursor: pointer;
}
:nth-child(2) {
border-right: none !important;
}
:nth-child(3) {
border-right: none !important;
}
}
.red-s {
color: red;
}
::v-deep.k-region .el-dialog__body {
padding: 10px 20px !important;
}
::v-deep.min-input .el-input__inner{
height: auto !important;
line-height: normal !important;
border: none !important;
padding: 0 !important;
text-align: center;
}
::v-deep.foot-span .el-button{
padding: 5px 20px !important;
}
</style>
<template>
<div>
<el-row v-for="(item, index) in list" :key="'list'+index">
<div v-if="(runType == 1 && item.k === 'pc') || (item.k !== 'pc')">
<el-row style="display: flex;align-items: center;padding: 0 0 2px;margin-top: 10px;">
<div class="gu"></div>
<span class="gu-r" style="font-size: 18px;">{{ item.name }}</span>
<el-tooltip class="item" effect="dark" :content="item.content" placement="right">
<i class="el-icon-warning-outline gt"></i>
</el-tooltip>
</el-row>
<div v-for="(it, i) in data[item.k]" :key="item.k+i" style="font-size: 18px;">
{{ it }}
</div>
</div>
</el-row>
</div>
</template>
<script>
import {
settingPriceNewApi,
carpoolingPriceNewApi
} from '@/port/priceConfiguration/priceConfiguration';
export default {
name: "special",
data() {
return {
runType: '',
list: [
{name: '特殊日期计价', content: '在特殊日期段被,原价格配置的基础上上浮比例', k: 'ts'},
{name: '拼车计价设置', content: '开启拼车计价后,拼车订单价格按照司机车上人数计算价格', k: 'pc'}
],
data: {
ts: [
// '节假日:价格上调比例0.3%',
// '休息日:价格上调比例0.3%',
// '2020/05/01 - 2020/05/07:价格上调比例0.3%',
],
pc: [
// '拼车单数1单(建议100%):价格比例100%',
// '拼车单数2单(建议不高于50%):价格比例50%',
// '拼车单数3单(建议不高于33%):价格比例33%',
// '拼车单数4单(建议不高于25%):价格比例25%',
// '拼车单数5单(建议不高于20%):价格比例20%',
// '拼车单数6单(建议不高于17%):价格比例17%'
]
}
}
},
created() {
this.runType = this.$store.getters.productJJInfo.runType;
this.getList();
},
methods: {
getList() {
settingPriceNewApi({}, this.$route.query.productId, this.$store.getters.areaCodeObj.platform.brandUrl)
.then((res) => {
if(res.status === 200) {
if(res.data.length > 0) {
this.preTsInfo(res.data[0].specialDate);
} else {
this.data.tc = [];
}
}
});
carpoolingPriceNewApi({}, this.$route.query.productId, this.$store.getters.areaCodeObj.platform.brandUrl)
.then((res) => {
if(res.status === 200) {
if(res.data.length > 0) {
this.prePcInfo(res.data[0]);
} else {
this.data.pc = [];
}
}
});
},
preTsInfo(val) {
let r = ['休息日:价格上调比例' + val.restDay + '%'];
val.specialSetting.forEach((item) => {
r.push(item.Intersegment[0] + ' - ' + item.Intersegment[1] + ':价格上调比例0.3%')
});
this.data.ts = r;
},
prePcInfo(val) {
let r = [
'拼车单数1单(建议100%):价格比例 ' + val.carpooling.oneOrder + '%',
'拼车单数2单(建议不高于50%):价格比例 ' + val.carpooling.twoOrder + '%',
'拼车单数3单(建议不高于33%):价格比例 ' + val.carpooling.threeOder + '%',
'拼车单数4单(建议不高于25%):价格比例 ' + val.carpooling.fourOrder + '%',
'拼车单数5单(建议不高于20%):价格比例 ' + val.carpooling.fiveOrder + '%',
'拼车单数6单(建议不高于17%):价格比例 ' + val.carpooling.sixOrder + '%'
];
this.data.pc = r;
},
}
}
</script>
<style scoped lang="scss">
.gu {
width: 3px;
height: 16px;
background: #3399ff;
}
.gu-r {
margin-left: 5px;
font-family: PingFangSC-Semibold, "PingFang SC Semibold", "PingFang SC";
font-weight: 650;
font-style: normal;
font-size: 14px;
color: rgb(51, 153, 255);
}
</style>
<template>
<div>
<el-dialog
:visible.sync="visibleDialog"
title="授权运力"
class="yl-dialog"
>
<el-row style="background: #f1f8ff;padding: 5px 10px;">
1.授权运力后,产品相关联订单智能派单时同步多家运力<br/>
2.产品仅可开通给开通该运营区域的运力方<br/>
3.产品可开通多家运力,强制指派运力运力可运营该产品,承担智能派单失败后人工指派订单。
</el-row>
<el-row style="padding: 10px 0;">
授权运力:
<span v-for="(item, index) in tableData" :key="'yl'+index" style="padding: 5px 10px;">
{{item.name}}
<el-switch
class="switch-pro"
v-model="item.openStatus"
active-color="#13ce66"
inactive-color="#cccccc"
:active-value="'1'"
:inactive-value="'0'"
active-text="ON"
inactive-text="OFF"
@change="productStatus(item)"
>
</el-switch>
</span>
</el-row>
<el-row style="padding: 10px 0;">
强制指派运力:
<el-select v-model="selectValue" size="mini">
<el-option
v-for="(item, index) in tableData"
v-if="item.openStatus==1"
:label="item.name"
:value="item.id"
:key="'qz'+index"
>
</el-option>
</el-select>
</el-row>
<span slot="footer" class="dialog-footer foot-span">
<el-button @click="visibleDialog = false">取 消</el-button>
<el-button class="primary-button" type="primary">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "yl",
props: ['tableData'],
data() {
return {
visibleDialog: false,
yl: [
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'},
{name: '西安花之优品电子商务', status: '0'}
],
selectData: [
{label: '运力1', value: '1'},
{label: '运力2', value: '2'},
{label: '运力3', value: '3'},
{label: '运力4', value: '4'},
{label: '运力5', value: '5'},
{label: '运力6', value: '6'},
{label: '运力7', value: '7'}
],
selectValue: ''
}
},
methods: {
showDialog() {
this.visibleDialog = true;
},
productStatus(row) {
}
}
}
</script>
<style scoped lang="scss">
::v-deep.switch-pro .el-switch__label {
position: absolute!important;
color: #fff !important;
z-index: 1!important;
display: none!important;
}
::v-deep.switch-pro .is-active{
display: block!important;
}
::v-deep.switch-pro .el-switch__label--left span{
margin-left: 20px!important;
}
::v-deep.switch-pro .el-switch__core {
width: 60px!important;
padding: 5px 0;
}
::v-deep.yl-dialog .el-dialog__body{
padding: 10px 20px 30px;
}
::v-deep.foot-span .el-button{
padding: 5px 20px !important;
}
</style>
<template>
<div style="padding: 20px;">
<el-row style="display: flex;align-items: center;padding: 0 0 2px;">
<div class="gu"></div>
<span style="margin-left: 5px;font-size: 16px;font-weight: 600;">产品详情</span>
</el-row>
<el-card class="outer">
<productPublicTitle
ref="productTitle"
:productId="$route.query.productId"
:productName="$route.query.productName"
:buttonShow="true"
:data="dataInfo"
@openDrawer="openDrawer"/>
</el-card>
<el-card class="outer" style="margin-top: 10px;">
<el-row style="display: flex;align-items: center;padding: 0 0 2px;border-bottom: 1px solid #e4e4e4;">
<el-col :span="12" style="display: flex;align-items: center;">
<div class="gu"></div>
<span style="margin-left: 5px;font-size: 14px;color: #3399FF;">产品价格</span>
</el-col>
<el-col :span="12" style="display: flex;justify-content: flex-end;margin-right: 10px;">
<el-button type="text" class="text-button" @click="showCal">定价计算器</el-button>
</el-col>
</el-row>
<el-radio-group v-model="tabPosition" style="margin: 10px 0;">
<el-radio-button class="radio-font" label="cg">常规</el-radio-button>
<el-radio-button class="radio-font" label="ts">特殊计价</el-radio-button>
</el-radio-group>
<routine v-if="tabPosition === 'cg'" :runType="runType"/>
<special v-if="tabPosition === 'ts'" :runType="runType"/>
</el-card>
<el-drawer
title="变动记录"
:visible.sync="drawer"
class="product-drawer"
direction="rtl"
:before-close="handleClose"
>
<drawerInfo style="overflow: auto;"/>
</el-drawer>
<operatorRule ref="operatorRule"/>
<yl ref="yl" :tableData="tableData"/>
<calculator :drawerVisible="drawerVisible" :title="idType":dataSource="data" :productId="productId" @drawerVisibleClick="drawerVisibleClick"></calculator>
</div>
</template>
<script>
import {
tripProductApi
} from '@/port/productNum/productNum'
import routine from "./components/productSetupNew/routine";
import special from "./components/productSetupNew/special";
import operatorRule from "./components/productSetupNew/operatorRule";
import drawerInfo from "./components/productSetupNew/drawerInfo";
import yl from "./components/productSetupNew/yl";
import {mapGetters} from 'vuex'
import productPublicTitle from './components/publicProductTitle'
import calculator from '@/components/PriceList/calculator'
export default {
name: "productSetupNew",
components: {
routine,
special,
operatorRule,
drawerInfo,
yl,
productPublicTitle,
calculator
},
computed: {
...mapGetters(['areaCodeObj'])
},
data() {
return {
drawerVisible: false,
drawer: false,
runType: 1,
titleInfo: {
productInfo: this.$route.query.productName,
qyName: '',
},
come2Form: {
c: '西安',
f: '北京'
},
dataInfo: {}, // 第二行信息
tabPosition: 'cg',
detailInfo: {},
tableData: [], // 产品运力集合
productId: '',
productInfo: {},
selectProduct: {}, // 选中的ID
idType: '',
data: {}
}
},
created() {
this.titleInfo.qyName = this.areaCodeObj.areaName;
this.productId = this.$route.query.productId
// this.getThisAreaOperationFun()
this.getTitle();
},
methods: {
showCal() {
this.idType = this.$store.getters.productJJInfo.runType;
this.data = {operatingArea: this.$store.getters.productJJInfo.operateAreaCode};
this.drawerVisible = true;
},
drawerVisibleClick(val) {
this.drawerVisible = val;
},
getTitle() {
tripProductApi({}, this.$route.query.productId, this.$store.getters.areaCodeObj.platform.brandUrl)
.then((res) => {
if (res.status === 200) {
this.dataInfo = res.data;
}
})
},
// 关闭抽屉
handleClose(done) {
done();
},
openDrawer() {
this.drawer = true;
},
}
}
</script>
<style scoped lang="scss">
.gu {
width: 3px;
height: 16px;
background: #3399ff;
}
.outer {
}
.h-x {
border-bottom: 1px solid #d7d7d7;
width: calc(100% - 4px);
position: absolute;
left: 0;
top: calc(50% - 1px);
}
.data-info {
color: #3399FF;
}
.left-col {
display: flex;
justify-content: center;
align-items: center;
}
.text-left-col {
text-align: right;
padding: 5px 10px;
color: #959795;
div {
padding: 3px 0;
}
}
.text-right-col {
text-align: left;
padding: 5px 10px;
div {
padding: 3px 0;
}
}
.line-div {
height: 90%;
width: 1px;
border-right: 1px dashed #000;
}
::v-deep.radio-font .el-radio-button__inner {
font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
font-weight: 700;
font-style: normal;
font-size: 16px;
}
.text-button {
padding: 10px 0;
}
::v-deep.product-drawer .el-drawer__body {
overflow: auto;
}
::v-deep.product-drawer .el-drawer__header {
font-size: 18px;
font-weight: 700;
color: #3399ff;
}
</style>
<template>
<div>
<el-card>
<!-- 顶部区域 -->
<el-row class="reg-name" type="flex">
<el-col style="width: calc(100% - 200px)">
<el-row>
<span style="font-size: 24px;color: #000;font-weight: 650;">
{{ regName }}
</span>
<span
style="font-size: 12px;color: #3399FF;background: #e9f0f8;margin-left: 10px;">{{
company + ' 丨 ' + location
}}</span>
<span
style="font-size: 12px;color: #FF6600;background: #f8e6db;margin-left: 10px;">{{
manage
}}</span>
<!-- <i style="color: #539af3;margin-left: 10px;font-size: 12px;cursor: pointer;" @click="clickEdit" class="el-icon-edit"></i>-->
</el-row>
<el-row style="font-size: 14px;">
{{ yl }}
</el-row>
</el-col>
<el-col style="width: 200px;text-align: right;">
<el-button style="border-color: #409EFF;color: #409EFF;" plain @click="$router.go(-1)">
《 返回区域列表
</el-button>
</el-col>
</el-row>
</el-card>
<el-card style="margin-top: 10px;">
<productNum :isFinish="isFinish" :ylData="transportOpenList"
class="EnterpriseInformation"></productNum>
</el-card>
</div>
</template>
<script>
import {
getDetailApi
} from '@/port/region/regionTitle'
import productNum from "./components/productNum";
export default {
name: "publicTitle",
components: {
productNum
},
data() {
return {
type: 0,
regName: '区域名称', //区域名称
company: '',
manage: '',
location: '',
regData: [
// {regId: 1, regName: '西安1区'},
// {regId: 2, regName: '西安2区'},
// {regId: 3, regName: '西安3区'},
// {regId: 4, regName: '西安4区'}
], // 初始区域变量
newRegData: [], // 当输入框有值后区域变量,
qName: '', // 输入区域名称
// yl: '运力(3个):该区域下运力机构的名称;该区域下运力机构的名称;该区域下运力机构的名称', // 运力
yl: '', // 运力
priceData: [],
transportOpenList: [],
isFinish: false
}
},
created() {
this.getTitleInfo();
if (sessionStorage.getItem('chooseTab') === null) {
sessionStorage.setItem('chooseTab', '0');
} else {
this.type = Number(sessionStorage.getItem('chooseTab'));
}
},
methods: {
visibleChange() {
this.qName = '';
},
toOtherPage(index) {
if (this.type === index) {
return;
}
this.type = index;
sessionStorage.setItem('chooseTab', index + '');
},
getTitleInfo() {
this.getPriceInfo();
},
getPriceInfo() {
let params = {
platformId: this.$store.getters.areaCodeObj.platform.platformId,
areaCode: this.$route.query.aCode
};
const getYlInfo = (val) => {
let r = {};
let result = '运力(' + val.length + '个):';
let d = [];
val.forEach((item) => {
result += item.transportName + ';';
d.push({id: item.transportId, name: item.transportName})
});
r['str'] = result;
r['d'] = d;
return r;
};
getDetailApi(params, this.$store.getters.areaCodeObj.brandUrl)
.then((res) => {
if (res.status === 200) {
this.regName = res.data.areaInfo.operateName;
this.company = res.data.areaInfo.organizeName;
this.location = res.data.areaInfo.operateAreaName;
this.manage = res.data.areaInfo.managerName + ' ' + res.data.areaInfo.managerPhone;
this.priceData = res.data.priceScopeList;
this.yl = getYlInfo(res.data.transportOpenList).str;
this.transportOpenList = getYlInfo(res.data.transportOpenList).d;
}
this.isFinish = true;
})
}
},
watch: {
qName(nV) {
let data = this.regData;
let result = [];
data.length > 0 && data.forEach((item) => {
if (item.regName.indexOf(nV) !== -1) {
result.push(item);
}
})
this.newRegData = result;
}
}
}
</script>
<style scoped lang="scss">
.EnterpriseInformation {
margin: 0 !important;
}
div {
box-sizing: border-box;
}
.gu {
width: 3px;
height: 16px;
background: #3399ff;
}
.reg-name, .range-row {
background: #ffffff;
border-radius: 5px;
//padding: 30px 20px;
margin-bottom: 10px;
}
.sd-yy-row {
padding: 10px 0 0 10px;
border: 1px solid #e4e4e4;
border-radius: 5px;
margin: 8px 0 3px;
}
.top-left {
.div-d {
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #d7d7d7;
border-radius: 5px;
margin-left: 20px;
padding: 0 60px;
> div {
div {
color: #3399ff;
text-align: center;
}
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment