Commit a86fa516 authored by 黄奎's avatar 黄奎

地接服务调整

parent 54b305cf
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
bottom: 0; bottom: 0;
} }
.selffundedManagement .isShow {
display: block !important;
}
.selffundedManagement .changeMsg { .selffundedManagement .changeMsg {
width: 80%; width: 80%;
} }
...@@ -42,67 +38,6 @@ ...@@ -42,67 +38,6 @@
margin: 5px 30px 5px 0; margin: 5px 30px 5px 0;
} }
.selffundedManagement ._addUpload_box>div:hover {
background-color: #f5f5f5;
}
.selffundedManagement .el-upload-dragger {
font-size: 28px;
color: #8c939d;
width: 126px;
height: 80px;
line-height: 41px;
text-align: center;
}
.selffundedManagement ._show_img_box {
position: fixed;
background: rgba(0, 0, 0, .6);
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9999;
text-align: center;
}
.selffundedManagement ._addUpload_box {
display: block;
}
.selffundedManagement ._addUpload_box img {
width: 100%;
height: 100%;
}
.selffundedManagement ._addUpload_box>div {
float: left;
width: 138px;
height: 92px;
border: 1px dashed rgba(210, 210, 210, 1);
border-radius: 2px;
cursor: pointer;
margin-bottom: 10px;
padding: 5px;
margin-right: 10px;
position: relative;
}
.selffundedManagement ._addUpload_box .icon-guanbi1 {
font-size: 12px;
color: white;
display: inline-block;
margin-left: 15px;
position: absolute;
right: -6px;
top: -9px;
background-color: #f56c6c;
border-radius: 50%;
height: 20px;
width: 20px;
text-align: center;
line-height: 20px;
}
.selffundedManagement .d12p { .selffundedManagement .d12p {
margin-top: 3px; margin-top: 3px;
font-size: 12px; font-size: 12px;
...@@ -121,29 +56,32 @@ ...@@ -121,29 +56,32 @@
text-decoration: underline; text-decoration: underline;
color: #333; color: #333;
} }
.selffundedManagement .isShow {
display: block !important;
}
</style> </style>
<template> <template>
<div class="flexOne selffundedManagement"> <div class="flexOne selffundedManagement">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<span>{{$t('system.table_country')}}</span> <span>{{$t('system.table_ssLine')}}</span>
<el-select v-model="msg.QCountry" clearable class="w150" filterable @change="getProvinceList(msg.QCountry,1)" <el-select class="w150" v-model="msg.LineId" filterable :placeholder="$t('pub.pleaseSel')"
:placeholder="$t('hotel.hotel_country')"> @change="resetPageIndex()" clearable @clear="resetPageIndex()">
<el-option :label="$t('pub.unlimitedSel')" value='0'></el-option> <el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID">
<el-option v-for='item in countryList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<span>{{$t('hotel.hotel_nameOf')}}</span> <span>{{$t('hotel.hotel_nameOf')}}</span>
<el-input v-model="msg.ItemName" maxlength="50" class="w150"></el-input> <el-input v-model="msg.ItemName" maxlength="20" class="w150" @keyup.native.enter="resetPageIndex()" clearable
@clear="resetPageIndex()"></el-input>
</li> </li>
<li> <li>
<button class="normalBtn" type="button" @click="addCityInfo">{{$t('pub.addBtn')}}</button> <button class="hollowFixedBtn" type="button" @click="resetPageIndex()">{{$t('pub.searchBtn')}}</button>
<button class="hollowFixedBtn" type="button" <button class="normalBtn" type="button" @click="addSelfFunded">{{$t('pub.addBtn')}}</button>
@click="resetPageIndex(),initData()">{{$t('pub.searchBtn')}}</button>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -164,89 +102,71 @@ ...@@ -164,89 +102,71 @@
<td>{{item.LineName}}</td> <td>{{item.LineName}}</td>
<td>{{item.CityName}}</td> <td>{{item.CityName}}</td>
<td>{{item.EstimatedCost}}</td> <td>{{item.EstimatedCost}}</td>
<td> <td style="text-align:left;padding-left:5px;">
<el-tooltip class="item" effect="dark" :content="item.Explain" placement="top-start" <el-tooltip class="item" effect="dark" :content="item.Explain" placement="top-start"
popper-class="max-w250"> popper-class="max-w250">
<p class="d12p" :title="item.Explain"> <p class="d12p" :title="item.Explain">
{{ item.Explain }} {{ item.Explain }}
</p> </p>
</el-tooltip> </el-tooltip>
</td> </td>
<td>{{item.CreateByName}}</td> <td>{{item.CreateByName}}</td>
<td>{{item.CreateTime}}</td> <td>{{item.CreateTime}}</td>
<td> <td>
<el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('pub.updateMsg')" placement="top-start">
<el-button type="primary" @click="isShow=true,titleInfo=$t('objFill.xiugaichengshi'),updateCity(item.ID)" icon="el-icon-edit" <el-button type="primary"
@click="isShow=true,titleInfo=$t('objFill.xiugaichengshi'),updateSelfFunded(item)" icon="el-icon-edit"
circle></el-button> circle></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start"> <el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delArea(item.ID,item.CodeLevel)" circle> <el-button type="danger" icon="el-icon-delete" @click="delSelfFunded(item)" circle>
</el-button> </el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination background @current-change="handleCurrentChange" :current-page.sync="msg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total"> layout="total,prev, pager, next, jumper" :page-size="msg.pageSize" :total="msg.total">
</el-pagination> </el-pagination>
<div class="btmAddStore" :class="{'isShow':isShow}"> <div class="btmAddStore" :class="{'isShow':isShow}">
<div class="btmTitle">{{titleInfo}}</div> <div class="btmTitle">{{titleInfo}}</div>
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px">
<ul class="changeMsg clearfix"> <ul class="changeMsg clearfix">
<li> <li>
<el-form-item :label="$t('sm.zifeixiangmu')" prop="ItemName"> <el-form-item :label="$t('sm.zifeixiangmu')" prop="ItemName">
<el-input v-model="addMsg.ItemName" class="w150" maxlength="20"></el-input> <el-input v-model="addMsg.ItemName" class="w150" maxlength="50"></el-input>
</el-form-item>
</li>
<li>
<el-form-item :label="$t('system.table_ssLine')" prop="ItemName">
<el-select class="w150" v-model="addMsg.LineId" filterable :placeholder="$t('pub.pleaseSel')" >
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID"
:key="item.LineID"></el-option>
</el-select>
</el-form-item> </el-form-item>
</li> </li>
<li><el-form-item :label="$t('system.table_ssLine')" prop="ItemName">
<el-select class='w120' :placeholder="$t('pub.pleaseSel')" filterable v-model="addMsg.CityId"
remote :remote-method="(query) => getCityList(query, selfItem)"
@change="changeCity(selfItem)">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="item in CityList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item>
</li>
<li>
<el-form-item :label="$t('sm.yujifeiyong')" >
<el-input v-model="addMsg.EstimatedCost" class="w150" maxlength="20"></el-input>
</el-form-item>
</li>
<li>
<el-form-item :label="$t('fnc.fyshuoming')" >
<el-input v-model="addMsg.Explain" class="w150" maxlength="20"></el-input>
</el-form-item>
</li>
<li> <li>
<el-form-item :label="$t('objFill.sanma')"> <el-form-item :label="$t('system.table_ssLine')">
<!--prop="ThreeCode"--> <el-select class="w150" v-model="addMsg.LineId" filterable :placeholder="$t('pub.pleaseSel')">
<el-input v-model="addMsg.ThreeCode" class="w150" maxlength="3"></el-input> <el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="item in LineList" :label="item.LineName" :value="item.LineID" :key="item.LineID">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</li> </li>
<li> <li>
<el-form-item :label="$t('objFill.jingdu')"> <el-form-item :label="$t('system.table_city')">
<el-input v-model="addMsg.Lng" class="w150"></el-input> <el-select class='w120' :placeholder="$t('pub.pleaseSel')" filterable v-model="addMsg.CityId" remote
:remote-method="(query) => getCityList(query)">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="item in CityList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</li> </li>
<li> <li>
<el-form-item :label="$t('objFill.weidu')"> <el-form-item :label="$t('sm.yujifeiyong')">
<el-input v-model="addMsg.Lat" class="w150"></el-input> <el-input v-model="addMsg.EstimatedCost" class="w150" maxlength="20"></el-input>
</el-form-item>
</li>
<li>
<el-form-item :label="$t('fnc.fyshuoming')">
<el-input v-model="addMsg.Explain" class="w220" maxlength="50"></el-input>
</el-form-item> </el-form-item>
</li> </li>
<li> <li>
<div class="cityBtnList"> <div class="cityBtnList">
<input type="button" class="hollowFixedBtn" @click="cancelPanel" :value="$t('pub.cancelBtn')" /> <input type="button" class="hollowFixedBtn" @click="cancelPanel" :value="$t('pub.cancelBtn')" />
...@@ -262,30 +182,19 @@ ...@@ -262,30 +182,19 @@
export default { export default {
data() { data() {
return { return {
total: 0,
currentPage: 1,
loading: true, loading: true,
AreaList: "",
RegionList: "",
countryList: "",
countryListOther: "",
provinceList: "",
cityList: "",
district: "",
titleInfo: "", titleInfo: "",
tabelDate: "", tabelDate: "",
isShow: false, isShow: false,
District: "", LineList: [], //线路列表
disCountry: false, CityList: [], //城市列表
disProvince: false,
disCity: false,
LineList:[],
CityList:[],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
ItemName: "", ItemName: "",
LineId: "0", LineId: "",
total: 0,
currentPage: 1,
}, },
addMsg: { addMsg: {
Id: 0, Id: 0,
...@@ -293,6 +202,7 @@ ...@@ -293,6 +202,7 @@
EstimatedCost: "", EstimatedCost: "",
LineId: 0, LineId: 0,
CityId: 0, CityId: 0,
CityName: "",
Explain: "", Explain: "",
}, },
rules: { rules: {
...@@ -301,37 +211,27 @@ ...@@ -301,37 +211,27 @@
message: this.$t('objFill.qsrzhongwenmc'), message: this.$t('objFill.qsrzhongwenmc'),
trigger: "change" trigger: "change"
}], }],
LineId: [{ }
required: true,
message: this.$t('visaT.qxzguojia'),
trigger: "change"
}]
},
currentUserInfo: {},
}; };
}, },
methods: { methods: {
//获取城市列表 //获取城市列表
getCityList(query, selfItem) { getCityList(query) {
var postMsg = { var postMsg = {
CodeLevel: 3, CodeLevel: 3,
Name: '', Name: '',
}; };
if (selfItem.CityName != '') {
postMsg.Name = selfItem.CityName;
}
if (query != '') { if (query != '') {
postMsg.Name = query; postMsg.Name = query;
} }
this.apipost("dict_get_Destination_GetCityExtList", postMsg, res => { this.apipost("dict_get_Destination_GetCityExtList", postMsg, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.CityList = res.data.data; this.CityList = res.data.data;
} }
}) })
}, },
//获取线路列表 //获取线路列表
getLineList() { getLineList() {
this.apipost( this.apipost(
"line_post_GetList", { "line_post_GetList", {
LineDirection: 2, LineDirection: 2,
...@@ -349,7 +249,8 @@ ...@@ -349,7 +249,8 @@
}, },
resetPageIndex() { resetPageIndex() {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.currentPage = 1; this.msg.currentPage = 1;
this.initData();
}, },
//初始化表格数据 //初始化表格数据
initData() { initData() {
...@@ -361,17 +262,17 @@ ...@@ -361,17 +262,17 @@
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.tabelDate = res.data.data.pageData; this.tabelDate = res.data.data.pageData;
this.total = res.data.data.count; this.msg.total = res.data.data.count;
} }
}, },
null null
); );
}, },
delArea(ID, CodeLevel) { delSelfFunded(item) {
var that = this; var that = this;
this.Confirm(that.$t('tips.shifoushanchu'), function () { this.Confirm(that.$t('tips.shifoushanchu'), function () {
let msg = { let msg = {
ID: ID, ID: item.Id,
}; };
that.apipost( that.apipost(
"selffunded_RemoveSelfFunded", "selffunded_RemoveSelfFunded",
...@@ -388,14 +289,21 @@ ...@@ -388,14 +289,21 @@
); );
}); });
}, },
addCityInfo() { addSelfFunded() {
this.isShow = true; this.isShow = true;
this.getLineList(); this.titleInfo = this.$t('sm.zifeixiangmu');
this.titleInfo = this.$t('objFill.xingzenchengshi'); this.clearMsg();
this.addMsg.ID = 0; },
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.ItemName = "";
this.addMsg.EstimatedCost = "";
this.addMsg.LineId = 0;
this.addMsg.CityId = 0;
this.addMsg.CityName = "";
this.addMsg.Explain = "";
}, },
saveInfo() { saveInfo() {
this.apipost( this.apipost(
"selffunded_SetSelfFunded", "selffunded_SetSelfFunded",
this.addMsg, this.addMsg,
...@@ -413,17 +321,32 @@ ...@@ -413,17 +321,32 @@
); );
}, },
//修改信息 //修改信息
updateCity(ID) { updateSelfFunded(item) {
let msg = { let postMsg = {
ID: ID ID: item.Id
}; };
this.addMsg.ID = ID;
this.apipost( this.apipost(
"selffunded_GetSelfFunded", "selffunded_GetSelfFunded",
msg, postMsg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.addMsg = res.data.data; var tempData = res.data.data;
if (tempData) {
this.addMsg.Id = tempData.Id;
this.addMsg.ItemName = tempData.ItemName;
this.addMsg.EstimatedCost = tempData.EstimatedCost;
this.addMsg.LineId = tempData.LineId;
this.addMsg.CityId = tempData.CityId;
this.addMsg.CityName = tempData.CityName;
if (tempData.CityId > 0) {
this.CityList = [];
this.CityList.push({
ID: tempData.CityId,
Name: tempData.CityName
})
}
this.addMsg.Explain = tempData.Explain;
}
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -431,38 +354,6 @@ ...@@ -431,38 +354,6 @@
err => {} err => {}
); );
}, },
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.msg.QProvince = "";
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 2) {
this.msg.QCity = "";
this.msg.QDistrict = "";
} else if (type == 3) {
this.msg.QDistrict = "";
}
if (this.msg.QCountry != "" || this.Country != "") {
this.apipost(
"dict_post_Destination_GetChildList",
msg,
res => {
if (type == 1) {
this.provinceList = res.data.data;
} else if (type == 2) {
this.cityList = res.data.data;
} else if (type == 3) {
this.district = res.data.data;
}
},
err => {}
);
}
},
//取消 //取消
cancelPanel() { cancelPanel() {
this.isShow = false; this.isShow = false;
...@@ -481,10 +372,11 @@ ...@@ -481,10 +372,11 @@
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.clearMsg();
} }
}, },
created() { created() {
this.currentUserInfo = this.getLocalStorage(); this.getLineList();
}, },
mounted() { mounted() {
this.initData(); this.initData();
......
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