Commit e58d8cb3 authored by denghr's avatar denghr

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents 24086b1a 62a9703a
......@@ -274,6 +274,7 @@
getAll()
.then(response => {
this.allCompaniesArr = response.data;
this.allBranchCompany= response.data;
})
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
......@@ -299,9 +300,10 @@
'elements'
]),
getAllZoneList() {
console.log('getAllZoneList')
this.allZoneArr = getAllZone();
return getAllZone();
// console.log('getAllZoneList')
let allZone = getAllZone();
this.allZoneArr = allZone ;
return allZone;
},
},
methods: {
......@@ -325,6 +327,7 @@
* 所属分公司
* */
handleSelectSubordinate(item) {
this.form.companyId = item.id;
this.form.companyName = item.name;
},
......@@ -419,7 +422,7 @@
});
this.dialogFormVisible = true;
this.dialogStatus = 'update';
console.log(this.form);
// console.log(this.form);
// console.log(JSON.stringify(this.form))
});
});
......
......@@ -405,6 +405,7 @@
'companyStatusAndCode'
]),
getAllZoneList(){
this.allZoneArr = getAllZone();
return getAllZone();
},
......
......@@ -22,12 +22,12 @@
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="经度">
<el-form-item label="经度" prop="latitude">
<el-input :value="form.latitude" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="纬度">
<el-form-item label="纬度" prop="longitude">
<el-input :value="form.longitude" readonly></el-input>
</el-form-item>
</el-col>
......@@ -52,10 +52,9 @@
</bm-marker>
</baidu-map>
</el-form-item>
<el-form-item>
<el-form-item >
<!--:center="center"-->
<baidu-map
:zoom="zoom"
:dragging="true"
:scroll-wheel-zoom="true"
......@@ -86,7 +85,7 @@
</div>
</el-dialog>
</template>
<script src="http://api.map.baidu.com/api?v=2.0&ak=iSEprDCqtYn5aC06Y3cDyGCEOP1hydwR"></script>
<script>
import BaiduMap from 'vue-baidu-map';
import {
......@@ -104,12 +103,10 @@
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
export default {
props: ["obj"],
name: 'destinationDialog',
components: {
ElFormItem,
ElCol,
ElInput,
ElRow
......@@ -183,16 +180,12 @@
}
],
longitude:{
type: 'string',
required: true,
message: '请输入经纬度',
trigger: 'blur'
message: '请拾取经纬度'
},
latitude:{
type: 'string',
required: true,
message: '请输入经纬度',
trigger: 'blur'
message: '请拾取经纬度'
},
addrProvince:{
required: true,
......@@ -264,7 +257,7 @@
}).then(() => {
this.form.method = 'delete';
this.$emit(this.form.eventName, this.form);
})
})
},
querySearch(queryString, cb) {
let selectArry = [];
......@@ -331,8 +324,12 @@
/**
* 加载地图
* */
handler({map}){
handler ({BMap, map}) {
console.log(BMap, map)
this.postionMap = { //地图坐标
lng: 120.211486,
lat: 30.256576
};
},
//点击获取到当前经纬度
getClickInfo(e) {
......
......@@ -5,35 +5,35 @@
<el-form :model="form" :rules="rules" ref="form" label-width="90px">
<el-row>
<el-col :span="8">
<el-form-item label="营地名称">
<el-form-item label="营地名称" prop="name">
<el-input v-model="form.name" placeholder="请输入营地名称" @blur="checkName()"></el-input><span v-if="isExist" style="color:red;">标签名已存在</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="营地地址">
<el-form-item label="营地地址" prop="addressStr">
<el-input v-model="form.addressStr" readonly placeholder="请输入营地地址" :on-icon-click="selectDestination" icon="edit"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="客服电话">
<el-form-item label="客服电话" prop="servicePhone">
<el-input v-model="form.servicePhone" placeholder="请输入客服电话"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="联系人">
<el-form-item label="联系人" prop="concat">
<el-input v-model="form.concat" placeholder="请输入联系人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="联系电话">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话"></el-input>
</el-form-item>
</el-col>
......@@ -51,7 +51,7 @@
</el-col>
</el-row>
<!--BASE_API + -->
<el-form-item label="封面图" :style="{display:'block'}">
<el-form-item label="封面图" :style="{display:'block'}" prop="logo">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
......@@ -79,7 +79,7 @@
<i v-else-if="!imgPosterFlag" class="el-icon-plus avatar-uploader-icon" style="lineHeight:100px;width:300px;height: 100px;border: 1px dashed #ccc;"></i>
</el-upload>
</el-form-item>
<el-form-item label="轮播图" :style="{display:'block'}">
<el-form-item label="轮播图" :style="{display:'block'}" prop="carouse">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
......@@ -110,8 +110,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" v-if="title=='创建' && !isCreate && campsiteshop_btn_update" @click="create()">确 定</el-button>
<el-button type="primary" v-if="title=='编辑' && !isCreate && campsiteshop_btn_update" @click="update()">确 定</el-button>
<el-button type="primary" v-if="title=='创建' && !isCreate && campsiteshop_btn_update" @click="create('form')">确 定</el-button>
<el-button type="primary" v-if="title=='编辑' && !isCreate && campsiteshop_btn_update" @click="update('form')">确 定</el-button>
</div>
<!--编辑营地地址-->
<campsiteModal v-if="showCampsiteVisible && campsiteshop_btn_update" :obj="campsiteObj" v-on:campsiteEvent = "campsiteEvent"></campsiteModal>
......@@ -170,6 +170,19 @@
campsiteLabelModal
},
data() {
var checkPhone = (rule, value, callback) => {
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
const reg = /^[1](([3][0-9])|([4][5,7,9])|([5][0-9])|([6][6])|([7][1,2,3,5,6,7,8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/
console.log(reg.test(value));
if (reg.test(value)) {
callback();
} else {
return callback(new Error('请输入正确的手机号'));
}
}
};
return {
imgPosterFlag:false,
percent_poster:0,
......@@ -210,20 +223,30 @@
},
showCampsiteVisible: false,//编辑营地地址
rules: {
name: [
{
name:{
type: 'string',
required: true,
message: '请输入消息内容',
message: '请输入营地名称',
trigger: 'blur'
},
{
min: 0,
max: 100,
message: '长度小于 100 个字符',
trigger: 'blur'
}
]
servicePhone:{
type: 'string',
required: true,
message: '请输入客服电话',
trigger: 'blur'
},
phone:{validator: checkPhone, trigger: 'blur',required: true},
concat:{
type: 'string',
required: true,
message: '请输入联系人',
trigger: 'blur'
},
addressStr:{
type: 'string',
required: true,
message: '请输入营地地址',
}
},
checkList:[],//已选中的标签
allCompanies: {},
......@@ -299,45 +322,51 @@
/**
* 创建
* */
create(){
// this.isCreate = true;
let carouse = [];//营地轮播图
this.form.carouse.map(function (item) {
let c = {
id: item.id,
imgUrl: item.imgUrl
};
carouse.push(c);
});
/**
* 营地类别
* */
let campsiteTagDTOS = [];
this.form.campsiteTagListVos.map(function (item) {
campsiteTagDTOS.push(item.id);
create(formName){
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
let carouse = [];//营地轮播图
this.form.carouse.map(function (item) {
let c = {
id: item.id,
imgUrl: item.imgUrl
};
carouse.push(c);
});
/**
* 营地类别
* */
let campsiteTagDTOS = [];
this.form.campsiteTagListVos.map(function (item) {
campsiteTagDTOS.push(item.id);
});
let params = {
name: this.form.name,//营地名称
logo: this.form.logo,//封面图
content: this.form.content,//营地详情
configure: this.form.configure,//配套&收费
hot: this.form.hot,//营地热度
campsiteTagDTOS: campsiteTagDTOS,//营地类别
carouselDTOS: carouse,//轮播图
concat: this.form.concat,//联系人
servicePhone: this.form.servicePhone,//客服电话
phone: this.form.phone,//联系电话
province: this.campsiteObj.province,//省份
provinceName: this.campsiteObj.provinceName,//省份名称
city: this.campsiteObj.city,//市编号
cityName: this.campsiteObj.cityName,//市名称
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("create", params);
} else {
return;
}
});
let params = {
name: this.form.name,//营地名称
logo: this.form.logo,//封面图
content: this.form.content,//营地详情
configure: this.form.configure,//配套&收费
hot: this.form.hot,//营地热度
campsiteTagDTOS: campsiteTagDTOS,//营地类别
carouselDTOS: carouse,//轮播图
concat: this.form.concat,//联系人
servicePhone: this.form.servicePhone,//客服电话
phone: this.form.phone,//联系电话
province: this.campsiteObj.province,//省份
provinceName: this.campsiteObj.provinceName,//省份名称
city: this.campsiteObj.city,//市编号
cityName: this.campsiteObj.cityName,//市名称
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("create", params);
},
/**
* 判断营地名称是否已存在
......@@ -378,46 +407,53 @@
/**
* 编辑
* */
update(){
this.isCreate = true;
let carouse = [];//营地轮播图
this.form.carouse.map(function (item) {
let c = {
id: item.id,
imgUrl: item.imgUrl
};
carouse.push(c);
});
/**
* 营地类别
* */
let campsiteTagDTOS = [];
this.form.campsiteTagListVos.map(function (item) {
campsiteTagDTOS.push(item.id);
update(formName){
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
this.isCreate = true;
let carouse = [];//营地轮播图
this.form.carouse.map(function (item) {
let c = {
id: item.id,
imgUrl: item.imgUrl
};
carouse.push(c);
});
/**
* 营地类别
* */
let campsiteTagDTOS = [];
this.form.campsiteTagListVos.map(function (item) {
campsiteTagDTOS.push(item.id);
});
let params = {
id: this.form.id,
name: this.form.name,//营地名称
logo: this.form.logo,//封面图
content: this.form.content,//营地详情
configure: this.form.configure,//配套&收费
hot: this.form.hot,//营地热度
campsiteTagDTOS: campsiteTagDTOS,//营地类别
carouselDTOS: carouse,//轮播图
concat: this.form.concat,//联系人
servicePhone: this.form.servicePhone,//客服电话
phone: this.form.phone,//联系电话
province: this.campsiteObj.province,//省份
provinceName: this.campsiteObj.provinceName,//省份名称
city: this.campsiteObj.city,//市编号
cityName: this.campsiteObj.cityName,//市名称
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("update", params);
} else {
return;
}
});
let params = {
id: this.form.id,
name: this.form.name,//营地名称
logo: this.form.logo,//封面图
content: this.form.content,//营地详情
configure: this.form.configure,//配套&收费
hot: this.form.hot,//营地热度
campsiteTagDTOS: campsiteTagDTOS,//营地类别
carouselDTOS: carouse,//轮播图
concat: this.form.concat,//联系人
servicePhone: this.form.servicePhone,//客服电话
phone: this.form.phone,//联系电话
province: this.campsiteObj.province,//省份
provinceName: this.campsiteObj.provinceName,//省份名称
city: this.campsiteObj.city,//市编号
cityName: this.campsiteObj.cityName,//市名称
address: this.campsiteObj.address,//详细地址
latitude: this.campsiteObj.latitude,
longitude: this.campsiteObj.longitude,
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isExistCampsiteShop("update", params);
},
/**
* 更新
......
......@@ -32,12 +32,12 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="经度">
<el-form-item label="经度" prop="latitude">
<el-input :value="form.latitude" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="纬度">
<el-form-item label="纬度" prop="longitude">
<el-input :value="form.longitude" readonly></el-input>
</el-form-item>
</el-col>
......@@ -164,56 +164,26 @@
addrCity: undefined,
},
rules: {
name: [
{
name:{
type: 'string',
required: true,
message: '请输入名称',
trigger: 'blur'
},
{
min: 0,
max: 2000,
message: '长度小于 2000 个字符',
trigger: 'blur'
}
],
address: [
{
address: {
type: 'string',
required: true,
message: '请输入详细地址',
trigger: 'blur'
},
{
min: 0,
max: 2000,
message: '长度小于 2000 个字符',
trigger: 'blur'
}
],
longitude:{
type: 'string',
required: true,
message: '请输入经纬度',
trigger: 'blur'
message: '请选择经纬度'
},
latitude:{
type: 'string',
required: true,
message: '请输入经纬度',
trigger: 'blur'
},
addrProvince:{
required: true,
message: '请选择省份',
trigger: 'blur'
},
addrCity:{
required: true,
message: '请选择城市',
trigger: 'blur'
},
message: '请选择经纬度'
}
},
allCompanies: {},
allCompaniesArr: [],
......@@ -223,7 +193,6 @@
baidumapSwitch:false,
zoom: 16,
location: "深圳市",
}
},
created() {
......
......@@ -5,7 +5,7 @@
<el-form :model="form" :rules="rules" ref="form" label-width="90px">
<el-row>
<el-col :span="8">
<el-form-item label="旅行名称">
<el-form-item label="旅行名称" prop="name">
<el-input v-model="form.name" placeholder="请输入旅行名称"></el-input>
</el-form-item>
</el-col>
......@@ -19,44 +19,44 @@
</el-row>
<el-row>
<el-col :span="4">
<el-form-item label="旅行原价" prop="operator">
<el-form-item label="旅行原价" prop="price">
<el-input v-model="form.price" type="number" min="0" placeholder="请输入旅行原价"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="儿童价" prop="operator">
<el-form-item label="儿童价" prop="childPrice">
<el-input v-model="form.childPrice" type="number" min="0" placeholder="请输入儿童价"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4">
<el-form-item label="是否为推荐" prop="mileage">
<el-form-item label="是否为推荐">
<el-radio class="radio" v-model="form.recommend" label="1"></el-radio>
<el-radio class="radio" v-model="form.recommend" label="0"></el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="会员价格" prop="mileage">
<el-form-item label="会员价格">
<el-radio class="radio" v-model="form.isMember" label="1">启用会员价</el-radio>
<el-radio class="radio" v-model="form.isMember" label="0">不启用会员价</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="" prop="mileage">
<el-form-item label="">
<el-radio class="radio" v-model="form.isOutside" label="0">省内</el-radio>
<el-radio class="radio" v-model="form.isOutside" label="1">省外</el-radio>
</el-form-item>
<el-row>
<el-col :span="4">
<el-form-item label="库存" prop="amount">
<el-form-item label="库存" prop="stock">
<el-input v-model="form.stock" placeholder="请输入总人数" type="number" min="0"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!--<el-col :span="24">-->
<el-form-item label="出发地" prop="departure">
<el-form-item label="出发地">
<el-input style="display: inline-block;margin-right: 10px;width: 240px;" v-model="item.name" v-for="item in departureList"
:key="item.id" readonly placeholder="请输入内容"></el-input>
<el-button size="small" class="el-button el-button--primary" type="button" icon="edit" @click="editDeparture(departureList)">编辑</el-button>
......@@ -101,7 +101,7 @@
<!--<el-input v-model="form.operator" placeholder="请选择活动日期"></el-input>-->
</el-form-item>
</el-row>
<el-form-item label="旅行标签" prop="approvers">
<el-form-item label="旅行标签">
<span v-for="item in form.tagDTOS"
:key="item.id" style="border: 1px solid #ccc; padding: 5px 10px;border-radius: 5px;margin-right: 10px;">{{item.name}}</span>
<!--<el-checkbox-group v-model="checkList">-->
......@@ -122,12 +122,12 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位" prop="amount">
<el-form-item label="单位">
<el-input v-model="form.unit" placeholder="人"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="销量" prop="saleCount">
<el-form-item label="销量">
<el-input v-model="form.saleCount" type="number" min="0" placeholder="请输入销量"></el-input>
</el-form-item>
</el-col>
......@@ -200,8 +200,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelTour">取 消</el-button>
<el-button type="primary" v-if="title=='创建' && !isCreate" @click="create()">确 定</el-button>
<el-button type="primary" v-if="title=='编辑' && !isCreate&&good_btn_update" @click="update()">确 定</el-button>
<el-button type="primary" v-if="title=='创建' && !isCreate" @click="create('form')">确 定</el-button>
<el-button type="primary" v-if="title=='编辑' && !isCreate&&good_btn_update" @click="update('form')">确 定</el-button>
</div>
<!--编辑出发地-->
<departureModal v-if="editDepartureVisible" :list="departureList" v-on:departureEvent = "departureEvent"></departureModal>
......@@ -283,7 +283,7 @@ import ElRow from "element-ui/packages/row/src/row";
percent: 0,//上传进度
imgFlag: false,
onePathObj:{name: ""},//待编辑的途径地
destinationObj:{name: ""},//目的地
destinationObj:{},//目的地
departureList: [],//出发地列表
departureObj:{name: ""},//出发地
pathway: [],//途径地
......@@ -319,26 +319,24 @@ import ElRow from "element-ui/packages/row/src/row";
showPathWayVisible: false,//编辑途径地
showTimeVisible: false,//编辑时间
rules: {
name: [
{
type: 'string',
required: true,
message: '请输入消息内容',
trigger: 'blur'
},
{
min: 0,
max: 100,
message: '长度小于 100 个字符',
trigger: 'blur'
}
],
// departure: {
// type: 'string',
// required: true,
// message: '请输入出发地',
// trigger: 'blur'
// },
name: {
type: 'string',
required: true,
message: '请输入旅游名称',
trigger: 'blur'
},
price: {
required: true,
message: '请输入价格',
},
childPrice: {
required: true,
message: '请输入儿童价格'
},
stock: {
required: true,
message: '请输入库存'
}
},
checkList:[],//已选中的标签
allCompanies: {},
......@@ -449,241 +447,291 @@ import ElRow from "element-ui/packages/row/src/row";
/**
* 创建
* */
create(){
this.isCreate = true;
//旅游标签
let tagDTOS = [];
this.form.tagDTOS.map(function(item){
if(item.tagId){
tagDTOS.push({tagId: item.tagId});
} else {
tagDTOS.push({tagId: item.id});
}
});
let siteDTOS = [];
//出发地
this.departureList.map(function(item){
let pp = item.province?item.province:item.addrProvince;
let c = item.addrCity?item.addrCity: item.city;
let provinceObj = pp?getRegionByCodes([pp]): [{name:""}];
let cityObj = c?getRegionByCodes([c]):[{name:""}];
let p = {
name: item.name,
departTime:item.departTime?item.departTime:0,
address: item.addrDetail?item.addrDetail: item.address,
companyId: item.companyId,
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 0,
rank: item.rank
};
siteDTOS.push(p);
});
//途径地
this.pathway.map(function(item){
let provinceObj = item.province?getRegionByCodes([item.province]): [{name:""}];
let cityObj = item.city?getRegionByCodes([item.city]):[{name:""}];
create(formName){
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
//旅游标签
let tagDTOS = [];
this.form.tagDTOS.map(function(item){
if(item.tagId){
tagDTOS.push({tagId: item.tagId});
} else {
tagDTOS.push({tagId: item.id});
}
});
let siteDTOS = [];
//出发地
this.departureList.map(function(item){
let pp = item.province?item.province:item.addrProvince;
let c = item.addrCity?item.addrCity: item.city;
let provinceObj = pp?getRegionByCodes([pp]): [{name:""}];
let cityObj = c?getRegionByCodes([c]):[{name:""}];
let p = {
name: item.name,
departTime:item.departTime?item.departTime:0,
address: item.addrDetail?item.addrDetail: item.address,
companyId: item.companyId,
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 0,
rank: item.rank
};
siteDTOS.push(p);
});
if(this.departureList.length<=0){
this.$notify({
title: '警告',
message: '请选择出发地',
type: 'warning',
duration: 2000
});
return;
}
//途径地
this.pathway.map(function(item){
let provinceObj = item.province?getRegionByCodes([item.province]): [{name:""}];
let cityObj = item.city?getRegionByCodes([item.city]):[{name:""}];
// let provinceObj = getRegionByCodes([item.province]);
// let cityObj = getRegionByCodes([item.city]);
let p = {
name: item.name,
address: item.addrDetail?item.addrDetail: item.address,
let p = {
name: item.name,
address: item.addrDetail?item.addrDetail: item.address,
// companyId: item.id,
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 1,
rank: item.rank
};
siteDTOS.push(p);
});
//destinationObj目的地
let destinationObj = this.destinationObj;
let provinceObj = destinationObj.province?getRegionByCodes([destinationObj.province]):[{name:""}];
let cityObj = destinationObj.city?getRegionByCodes([destinationObj.city]):[{name:""}];
let p = {
name: destinationObj.name,
address: destinationObj.addrDetail?destinationObj.addrDetail: destinationObj.address,
province: destinationObj.addrProvince?destinationObj.addrProvince:destinationObj.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: destinationObj.addrCity?destinationObj.addrCity: destinationObj.city,
longitude: destinationObj.longitude,
latitude: destinationObj.latitude,
type: 2
};
siteDTOS.push(p);
let params = {
isOutside: this.form.isOutside,//省内、省外
name: this.form.name,//旅游路线名称
cover: this.form.cover,//封面图
price: this.form.price,//成人价
childPrice: this.form.childPrice,//儿童价
viewCount: this.form.viewCount,//商品浏览量
saleCount: this.form.saleCount,//商品销售量
describe: this.form.describe,//商品描述
content: this.form.content,//商品详情(行程亮点)
introduce: this.form.introduce,//行程介绍
explain: this.form.explain,//费用说明
rank: this.form.rank,//旅行排序
recommend: this.form.recommend,//是否推荐:0-未推荐;1-已推荐
isMember: this.form.isMember,//是否启用会员价
stock: this.form.stock,//库存
unit: this.form.unit,//单位
number: this.form.number,//活动天数
bannerDTOS: this.form.bannerDTOS,//banner轮播图
siteDTOS: siteDTOS,//出发地type=0,途径地type=1,目的地type=2
priceDTOS: this.form.tourDepartTimeVo,//活动日期
tagDTOS: tagDTOS,//旅游标签
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
goodsEdit(params).then(response => {
this.isCreate = false;
if (response.status === 200) {
this.$notify({
title: '成功',
message: '添加成功',
type: 'success',
duration: 2000
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 1,
rank: item.rank
};
siteDTOS.push(p);
});
this.$emit("oneTourDialogEvent", true);
} else {
this.$notify({
title: '添加失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
//destinationObj目的地
let destinationObj = this.destinationObj;
if(!destinationObj.name){
this.$notify({
title: '警告',
message: '请选择目的地',
type: 'warning',
duration: 2000
});
return;
}
let provinceObj = destinationObj.province?getRegionByCodes([destinationObj.province]):[{name:""}];
let cityObj = destinationObj.city?getRegionByCodes([destinationObj.city]):[{name:""}];
let p = {
name: destinationObj.name,
address: destinationObj.addrDetail?destinationObj.addrDetail: destinationObj.address,
province: destinationObj.addrProvince?destinationObj.addrProvince:destinationObj.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: destinationObj.addrCity?destinationObj.addrCity: destinationObj.city,
longitude: destinationObj.longitude,
latitude: destinationObj.latitude,
type: 2
};
siteDTOS.push(p);
this.isCreate = true;
let params = {
isOutside: this.form.isOutside,//省内、省外
name: this.form.name,//旅游路线名称
cover: this.form.cover,//封面图
price: this.form.price,//成人价
childPrice: this.form.childPrice,//儿童价
viewCount: this.form.viewCount,//商品浏览量
saleCount: this.form.saleCount,//商品销售量
describe: this.form.describe,//商品描述
content: this.form.content,//商品详情(行程亮点)
introduce: this.form.introduce,//行程介绍
explain: this.form.explain,//费用说明
rank: this.form.rank,//旅行排序
recommend: this.form.recommend,//是否推荐:0-未推荐;1-已推荐
isMember: this.form.isMember,//是否启用会员价
stock: this.form.stock,//库存
unit: this.form.unit,//单位
number: this.form.number,//活动天数
bannerDTOS: this.form.bannerDTOS,//banner轮播图
siteDTOS: siteDTOS,//出发地type=0,途径地type=1,目的地type=2
priceDTOS: this.form.tourDepartTimeVo,//活动日期
tagDTOS: tagDTOS,//旅游标签
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
goodsEdit(params).then(response => {
this.isCreate = false;
if (response.status === 200) {
this.$notify({
title: '成功',
message: '添加成功',
type: 'success',
duration: 2000
});
this.$emit("oneTourDialogEvent", true);
} else {
this.$notify({
title: '添加失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
} else {
return;
}
});
},
/**
* 编辑
* */
update(){
update(formName){
//旅游标签
this.isCreate = true;
let tagDTOS = [];
this.form.tagDTOS.map(function(item){
if(item.tagId){
tagDTOS.push({tagId: item.tagId});
} else {
tagDTOS.push({tagId: item.id});
}
});
let siteDTOS = [];
//出发地
this.departureList.map(function(item){
let pp = item.province?item.province:item.addrProvince;
let c = item.addrCity?item.addrCity: item.city;
let provinceObj = pp?getRegionByCodes([pp]): [{name:""}];
let cityObj = c?getRegionByCodes([c]):[{name:""}];
let p = {
id: item.id,
name: item.name,
departTime:item.departTime?item.departTime:0,
address: item.addrDetail?item.addrDetail: item.address,
companyId: item.companyId,
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 0,
rank: item.rank
};
siteDTOS.push(p);
});
//途径地
this.pathway.map(function(item){
let provinceObj = item.province?getRegionByCodes([item.province]): [{name:""}];
let cityObj = item.city?getRegionByCodes([item.city]):[{name:""}];
let p = {
id: item.id,
name: item.name,
address: item.addrDetail?item.addrDetail: item.address,
const set = this.$refs;
set[formName].validate(valid => {
if (valid) {
let tagDTOS = [];
this.form.tagDTOS.map(function(item){
if(item.tagId){
tagDTOS.push({tagId: item.tagId});
} else {
tagDTOS.push({tagId: item.id});
}
});
let siteDTOS = [];
//出发地
this.departureList.map(function(item){
let pp = item.province?item.province:item.addrProvince;
let c = item.addrCity?item.addrCity: item.city;
let provinceObj = pp?getRegionByCodes([pp]): [{name:""}];
let cityObj = c?getRegionByCodes([c]):[{name:""}];
let p = {
id: item.id,
name: item.name,
departTime:item.departTime?item.departTime:0,
address: item.addrDetail?item.addrDetail: item.address,
companyId: item.companyId,
province: item.addrProvince?item.addrProvince:item.province,
provinceName:provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 0,
rank: item.rank
};
siteDTOS.push(p);
});
if(this.departureList.length<=0){
this.$notify({
title: '警告',
message: '请选择出发地',
type: 'warning',
duration: 2000
});
return;
}
//途径地
this.pathway.map(function(item){
let provinceObj = item.province?getRegionByCodes([item.province]): [{name:""}];
let cityObj = item.city?getRegionByCodes([item.city]):[{name:""}];
let p = {
id: item.id,
name: item.name,
address: item.addrDetail?item.addrDetail: item.address,
// companyId: item.id,
province: item.addrProvince?item.addrProvince:item.province,
provinceName: provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 1,
rank: item.rank
};
siteDTOS.push(p);
});
//destinationObj目的地
let destinationObj = this.destinationObj;
let provinceObj = destinationObj.province?getRegionByCodes([destinationObj.province]):[{name:""}];
let cityObj = destinationObj.city?getRegionByCodes([destinationObj.city]):[{name:""}];
let p = {
id: destinationObj.id,
name: destinationObj.name,
address: destinationObj.addrDetail?destinationObj.addrDetail: destinationObj.address,
province: destinationObj.addrProvince?destinationObj.addrProvince:destinationObj.province,
provinceName: provinceObj[0].name,
cityName: cityObj[0].name,
city: destinationObj.addrCity?destinationObj.addrCity: destinationObj.city,
longitude: destinationObj.longitude,
latitude: destinationObj.latitude,
type: 2
};
siteDTOS.push(p);
let params = {
id: this.form.id,
isOutside: this.form.isOutside,//省内、省外
name: this.form.name,//旅游路线名称
cover: this.form.cover,//封面图
price: this.form.price,//成人价
childPrice: this.form.childPrice,//儿童价
viewCount: this.form.viewCount,//商品浏览量
saleCount: this.form.saleCount,//商品销售量
describe: this.form.describe,//商品描述
content: this.form.content,//商品详情(行程亮点)
introduce: this.form.introduce,//行程介绍
explain: this.form.explain,//费用说明
rank: this.form.rank,//旅行排序
recommend: this.form.recommend,//是否推荐:0-未推荐;1-已推荐
isMember: this.form.isMember,//是否启用会员价
stock: this.form.stock,//库存
unit: this.form.unit,//单位
number: this.form.number,//活动天数
bannerDTOS: this.form.bannerDTOS,//banner轮播图
siteDTOS: siteDTOS,//出发地type=0,途径地type=1,目的地type=2
priceDTOS: this.form.tourDepartTimeVo,//活动日期
tagDTOS: tagDTOS,//旅游标签
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
console.log(this.form);
goodsEdit(params).then(response => {
this.isCreate = false;
if (response.status === 200) {
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
province: item.addrProvince?item.addrProvince:item.province,
provinceName: provinceObj[0].name,
cityName: cityObj[0].name,
city: item.addrCity?item.addrCity: item.city,
longitude: item.longitude,
latitude: item.latitude,
type: 1,
rank: item.rank
};
siteDTOS.push(p);
});
this.$emit("oneTourDialogEvent", true);
} else {
this.$notify({
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
//destinationObj目的地
let destinationObj = this.destinationObj;
if(!destinationObj.name){
this.$notify({
title: '警告',
message: '请选择目的地',
type: 'warning',
duration: 2000
});
return;
}
let provinceObj = destinationObj.province?getRegionByCodes([destinationObj.province]):[{name:""}];
let cityObj = destinationObj.city?getRegionByCodes([destinationObj.city]):[{name:""}];
let p = {
id: destinationObj.id,
name: destinationObj.name,
address: destinationObj.addrDetail?destinationObj.addrDetail: destinationObj.address,
province: destinationObj.addrProvince?destinationObj.addrProvince:destinationObj.province,
provinceName: provinceObj[0].name,
cityName: cityObj[0].name,
city: destinationObj.addrCity?destinationObj.addrCity: destinationObj.city,
longitude: destinationObj.longitude,
latitude: destinationObj.latitude,
type: 2
};
siteDTOS.push(p);
let params = {
id: this.form.id,
isOutside: this.form.isOutside,//省内、省外
name: this.form.name,//旅游路线名称
cover: this.form.cover,//封面图
price: this.form.price,//成人价
childPrice: this.form.childPrice,//儿童价
viewCount: this.form.viewCount,//商品浏览量
saleCount: this.form.saleCount,//商品销售量
describe: this.form.describe,//商品描述
content: this.form.content,//商品详情(行程亮点)
introduce: this.form.introduce,//行程介绍
explain: this.form.explain,//费用说明
rank: this.form.rank,//旅行排序
recommend: this.form.recommend,//是否推荐:0-未推荐;1-已推荐
isMember: this.form.isMember,//是否启用会员价
stock: this.form.stock,//库存
unit: this.form.unit,//单位
number: this.form.number,//活动天数
bannerDTOS: this.form.bannerDTOS,//banner轮播图
siteDTOS: siteDTOS,//出发地type=0,途径地type=1,目的地type=2
priceDTOS: this.form.tourDepartTimeVo,//活动日期
tagDTOS: tagDTOS,//旅游标签
posterBackground:this.form.posterBackground,//海报背景
};
console.log(params);
this.isCreate = true;
console.log(this.form);
goodsEdit(params).then(response => {
this.isCreate = false;
if (response.status === 200) {
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
});
this.$emit("oneTourDialogEvent", true);
} else {
this.$notify({
title: '编辑失败',
message: rsCode.msg[response.code] ? rsCode.msg[response.code] : '操作失败!',
type: 'error',
duration: 2000
});
}
});
} else {
return;
}
});
},
......
......@@ -137,6 +137,7 @@
name: 'membershipGrade',
data() {
return {
BASE_API: process.env.BASE_API,
list: [],
listLoading: true,
tableKey: 0,
......
......@@ -236,7 +236,7 @@
</template>
</el-table-column>
<el-table-column width="65" align="center" v-if="showMoreMoreCol" label="保险公司">
<el-table-column width="150" align="center" v-if="showMoreMoreCol" label="保险公司">
<template scope="scope">
<span>{{getInsuranceCompany(scope.row.insuranceCompany)}}</span>
</template>
......@@ -248,31 +248,31 @@
</template>
</el-table-column>
<el-table-column width="100" align="center" v-if="showMoreMoreCol" label="保险开始时间">
<el-table-column width="150" align="center" v-if="showMoreMoreCol" label="保险开始时间">
<template scope="scope">
<span>{{scope.row.insuranceStartDate}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" v-if="showMoreMoreCol" label="保险结束时间">
<el-table-column width="180" align="center" v-if="showMoreMoreCol" label="保险结束时间">
<template scope="scope">
<span>{{scope.row.insuranceEndDate}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" v-if="showMoreMoreCol" label="年审时间">
<el-table-column width="180" align="center" v-if="showMoreMoreCol" label="年审时间">
<template scope="scope">
<span>{{scope.row.annualVerificationDate}}</span>
</template>
</el-table-column>
<el-table-column width="100" align="center" v-if="showMoreMoreCol" label="保养时间">
<el-table-column width="180" align="center" v-if="showMoreMoreCol" label="保养时间">
<template scope="scope">
<span>{{scope.row.maintenanceDate}}</span>
</template>
</el-table-column>
<el-table-column width="65" align="center" v-if="showMoreMoreCol" label="保养里程数">
<el-table-column width="100" align="center" v-if="showMoreMoreCol" label="保养里程数">
<template scope="scope">
<span>{{scope.row.maintenanceMileage}}</span>
</template>
......@@ -299,7 +299,7 @@
</template>
</el-table-column>
<el-table-column width="120" align="center" v-if="showMoreMoreCol" label="发动机号">
<el-table-column width="130" align="center" v-if="showMoreMoreCol" label="发动机号">
<template scope="scope">
<span>{{scope.row.engineNum}}</span>
</template>
......@@ -323,7 +323,7 @@
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="380" fixed="right">
<el-table-column align="center" label="操作" width="280" fixed="right">
<template scope="scope">
<el-button size="small" class="el-button el-button--text el-button--small" @click="handleUpdate(scope.row)">{{vehicleInfo_btn_edit?"编辑":"查看"}}
</el-button>
......@@ -1053,7 +1053,7 @@
message: '请输入使用人联系方式',
trigger: 'blur'
},{
pattern: /^1[3456789]\d{9}$/,
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号'
}
],
......@@ -2139,4 +2139,4 @@
}
}
}
</script>
\ No newline at end of file
</script>
......@@ -130,7 +130,7 @@
if (!value) {
return callback(new Error('手机号不能为空'));
} else {
const reg = /^1[3|4|5|7|8][0-9]\d{8}$/
const reg = /^[1](([3][0-9])|([4][5,7,9])|([5][0-9])|([6][6])|([7][1,2,3,5,6,7,8])|([8][0-9])|([9][1,8,9]))[0-9]{8}$/
console.log(reg.test(value));
if (reg.test(value)) {
callback();
......
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