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

页面修改

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