Commit 3b1f1606 authored by 黄奎's avatar 黄奎

页面修改

parent ae274ab1
......@@ -36,11 +36,12 @@
<tbody>
<tr v-for="(selfItem,selfIndex) in SelfpayingAllList">
<td>
<span v-if="selfItem.IsShow==0">{{getSelfCityName(selfItem.CityId)}}</span>
<span v-if="selfItem.IsShow==0">{{selfItem.CityName}}</span>
<el-select class='w120' :placeholder="$t('pub.pleaseSel')" filterable v-model="selfItem.CityId"
v-else-if="selfItem.IsShow==1">
v-else-if="selfItem.IsShow==1" remote :remote-method="(query) => getCityList(query, selfItem)"
@change="changeCity(selfItem)">
<el-option :label="$t('pub.unlimitedSel')" :value='DefaultSelectValue'></el-option>
<el-option v-for="item in AllCityList" :label='item.Name' :value='item.ID' :key='item.ID'>
<el-option v-for="item in selfItem.CityList" :label='item.Name' :value='item.ID' :key='item.ID'>
</el-option>
</el-select>
</td>
......@@ -59,7 +60,7 @@
<td>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"
v-if="(selfItem.IsShow==0)">
<el-button type="primary" icon="el-icon-edit" circle @click="SelfpayingShow(selfItem)"></el-button>
<el-button type="primary" icon="el-icon-edit" circle @click="getCityList('',selfItem),SelfpayingShow(selfItem)"></el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" placement="top-start"
v-if="selfItem.IsShow==1">
......@@ -143,7 +144,8 @@
<td>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"
v-if="(shopItem.IsShow==0)">
<el-button type="primary" icon="el-icon-edit" circle @click="ShopShow(shopItem),getShopItemList()"></el-button>
<el-button type="primary" icon="el-icon-edit" circle @click="ShopShow(shopItem),getShopItemList()">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('pub.saveBtn')" placement="top-start"
v-if="shopItem.IsShow==1">
......@@ -208,7 +210,7 @@
"subArray",
"NoticeData",
"PostConfig",
"AllCityList",
"CountryID" //国家编号
],
data() {
......@@ -246,7 +248,7 @@
narrative: true //叙述,
},
//折叠展开
isFold: ""
isFold: "",
};
},
components: {
......@@ -387,7 +389,6 @@
this.SelfpayingAllList.splice(selfIndex, 1);
}
},
//新增购物店
AddShop() {
var obj = {
......@@ -433,6 +434,8 @@
Id: 0,
ConfigId: this.subArray.ConfigId,
CityId: 0,
CityName: '', //城市名称
CityList: [],
ItemName: "",
EstimatedCost: "",
Explain: "",
......@@ -449,14 +452,34 @@
this.SelfpayingAllList.splice(shopIndex, 1);
},
//获取自费城市名
getSelfCityName(cityId) {
let cityName = "";
this.AllCityList.forEach(x => {
if (x.ID === cityId) {
cityName = x.Name;
changeCity(selfItem) {
if (selfItem.CityList && selfItem.CityList.length > 0) {
selfItem.CityList.forEach(x => {
if (x.ID === selfItem.CityId) {
selfItem.CityName = x.Name;
}
});
return cityName;
}
},
//获取城市列表
getCityList(query, selfItem) {
var postMsg = {
CodeLevel: 3,
Name: '',
};
if(selfItem.CityName!='')
{
postMsg.Name = selfItem.CityName;
}
if (query != '') {
postMsg.Name = query;
}
this.apipost("dict_get_Destination_GetCityExtList", postMsg, res => {
if (res.data.resultCode == 1) {
selfItem.CityList = res.data.data;
}
})
}
},
mounted() {
......
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