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