Commit 30dd9bf8 authored by 黄奎's avatar 黄奎

页面修改

parent aa364125
<style> <style>
@import "../../assets/css/comSupplier.css"; @import "../../assets/css/comSupplier.css";
</style> </style>
<template> <template>
<div class="flexOne suppierManage"> <div class="flexOne suppierManage">
...@@ -8,465 +7,682 @@ ...@@ -8,465 +7,682 @@
<ul> <ul>
<li> <li>
<span> <span>
<em>{{$t('system.quety_area')}}</em> <em>{{ $t("system.quety_area") }}</em>
<el-select v-model="msg.CountryStr" clearable class="w150" filterable <el-select
@change="getProvinceList(msg.CountryStr,1)" :placeholder="$t('hotel.hotel_country')"> v-model="msg.CountryStr"
<el-option v-for='item in countryList' :key="item.ID" :label="item.Name" :value="item.ID"> clearable
class="w150"
filterable
@change="getProvinceList(msg.CountryStr, 1)"
:placeholder="$t('hotel.hotel_country')"
>
<el-option
v-for="item in countryList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="msg.ProvinceStr" class="w150" filterable @change="getProvinceList(msg.ProvinceStr,2)" <el-select
:placeholder="$t('hotel.hotel_province')"> v-model="msg.ProvinceStr"
<el-option v-for='item in provinceList' :key="item.ID" :label="item.Name" :value="item.ID"> class="w150"
filterable
@change="getProvinceList(msg.ProvinceStr, 2)"
:placeholder="$t('hotel.hotel_province')"
>
<el-option
v-for="item in provinceList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="msg.CityStr" class="w150" filterable @change="getProvinceList(msg.CityStr,3)" <el-select
:placeholder="$t('hotel.hotel_city')"> v-model="msg.CityStr"
<el-option v-for='item in cityList' :key="item.ID" :label="item.Name" :value="item.ID"> class="w150"
filterable
@change="getProvinceList(msg.CityStr, 3)"
:placeholder="$t('hotel.hotel_city')"
>
<el-option
v-for="item in cityList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="msg.DistrictStr" class="w150" filterable :placeholder="$t('hotel.hotel_area')"> <el-select
<el-option v-for='item in district' :key="item.ID" :label="item.Name" :value="item.ID"> v-model="msg.DistrictStr"
class="w150"
filterable
:placeholder="$t('hotel.hotel_area')"
>
<el-option
v-for="item in district"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>{{$t('hotel.suplier_name')}}</em> <em>{{ $t("hotel.suplier_name") }}</em>
<el-input maxlength="50" @keyup.native.enter="initData" v-model="msg.Name" class="permiss-input w150" <el-input
:placeholder="$t('pub.pleaseImport')"></el-input> maxlength="50"
@keyup.native.enter="initData"
v-model="msg.Name"
class="permiss-input w150"
:placeholder="$t('pub.pleaseImport')"
></el-input>
</span> </span>
</li> </li>
<li> <li>
<span> <span>
<em>{{$t('hotel.suplier_contact')}}</em> <em>{{ $t("hotel.suplier_contact") }}</em>
<el-input maxlength="50" @keyup.native.enter="initData" v-model="msg.Contact" class="permiss-input w150" <el-input
:placeholder="$t('pub.pleaseImport')"></el-input> maxlength="50"
@keyup.native.enter="initData"
v-model="msg.Contact"
class="permiss-input w150"
:placeholder="$t('pub.pleaseImport')"
></el-input>
</span> </span>
</li> </li>
<li> <li>
<button class="hollowFixedBtn" type="button" <button
@click="resetPageIndex(),initData()">{{$t('pub.searchBtn')}}</button> class="hollowFixedBtn"
<button class="normalBtn" type="button" type="button"
@click="clearinputInfo(),outerVisible = true,dialogTitle=$t('visaT.Addingsuppliers')">{{$t('pub.addBtn')}}</button> @click="resetPageIndex(), initData()"
>
{{ $t("pub.searchBtn") }}
</button>
<button
class="normalBtn"
type="button"
@click="
clearinputInfo(),
(outerVisible = true),
(dialogTitle = $t('visaT.Addingsuppliers'))
"
>
{{ $t("pub.addBtn") }}
</button>
</li> </li>
</ul> </ul>
<el-dialog custom-class='addCompany' :title="dialogTitle" :visible.sync="outerVisible" center> <el-dialog
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px"> custom-class="addCompany"
:title="dialogTitle"
:visible.sync="outerVisible"
center
>
<el-form
:model="addMsg"
:rules="rules"
ref="addMsg"
label-width="100px"
>
<el-form-item :label="$t('hotel.suplier_name')" prop="Name"> <el-form-item :label="$t('hotel.suplier_name')" prop="Name">
<el-input type="text" class="w300" maxlength="50" v-model="addMsg.Name"></el-input> <el-input
type="text"
class="w300"
maxlength="50"
v-model="addMsg.Name"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('restaurant.res_belongArea')"> <el-form-item :label="$t('restaurant.res_belongArea')">
<el-select v-model="addMsg.Country" clearable class="w150" filterable <el-select
@change="getProvinceList(addMsg.Country,1)" :placeholder="$t('hotel.hotel_country')"> v-model="addMsg.Country"
<el-option v-for='item in countryList' :key="item.ID" :label="item.Name" :value="item.ID"> clearable
class="w150"
filterable
@change="getProvinceList(addMsg.Country, 1)"
:placeholder="$t('hotel.hotel_country')"
>
<el-option
v-for="item in countryList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addMsg.Province" class="w150" filterable @change="getProvinceList(addMsg.Province,2)" <el-select
:placeholder="$t('hotel.hotel_province')"> v-model="addMsg.Province"
<el-option v-for='item in provinceList' :key="item.ID" :label="item.Name" :value="item.ID"> class="w150"
filterable
@change="getProvinceList(addMsg.Province, 2)"
:placeholder="$t('hotel.hotel_province')"
>
<el-option
v-for="item in provinceList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addMsg.City" class="w150" filterable @change="getProvinceList(addMsg.City,3)" <el-select
:placeholder="$t('hotel.hotel_city')"> v-model="addMsg.City"
<el-option v-for='item in cityList' :key="item.ID" :label="item.Name" :value="item.ID"> class="w150"
filterable
@change="getProvinceList(addMsg.City, 3)"
:placeholder="$t('hotel.hotel_city')"
>
<el-option
v-for="item in cityList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="addMsg.District" class="w150" filterable :placeholder="$t('hotel.hotel_area')"> <el-select
<el-option v-for='item in district' :key="item.ID" :label="item.Name" :value="item.ID"> v-model="addMsg.District"
class="w150"
filterable
:placeholder="$t('hotel.hotel_area')"
>
<el-option
v-for="item in district"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.table_HotelAddress')" prop="Address"> <el-form-item :label="$t('hotel.table_HotelAddress')" prop="Address">
<el-input type="text" class="w300" maxlength="50" v-model="addMsg.Address" <el-input
:placeholder="$t('hotel.table_areaDetail')"></el-input> type="text"
class="w300"
maxlength="50"
v-model="addMsg.Address"
:placeholder="$t('hotel.table_areaDetail')"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('fnc.fkfangshi')" prop="Address"> <el-form-item :label="$t('fnc.fkfangshi')" prop="Address">
<el-select v-model="addMsg.PayType" filterable :placeholder="$t('pub.pleaseSel')" class="w300"> <el-select
<el-option v-for='item in PayTypeList' :key="item.Id" :label="item.name" :value="item.Id"> v-model="addMsg.PayType"
filterable
:placeholder="$t('pub.pleaseSel')"
class="w300"
>
<el-option
v-for="item in PayTypeList"
:key="item.Id"
:label="item.name"
:value="item.Id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('ground.shifouyouspf')"> <el-form-item :label="$t('ground.shifouyouspf')">
<el-switch v-model="addMsg.IsHaveShouPeiFee" :active-value="inActive" :inactive-value="notInActive"> <el-switch
v-model="addMsg.IsHaveShouPeiFee"
:active-value="inActive"
:inactive-value="notInActive"
>
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item v-if="addMsg.IsHaveShouPeiFee==1" :label="$t('ground.shoupeije')"> <el-form-item
<el-input type="text" class="w300" maxlength="10" @keyup.native="checkPrice(addMsg,'ShouPeiMoney')" v-if="addMsg.IsHaveShouPeiFee == 1"
v-model="addMsg.ShouPeiMoney"></el-input> :label="$t('ground.shoupeije')"
>
<el-input
type="text"
class="w300"
maxlength="10"
@keyup.native="checkPrice(addMsg, 'ShouPeiMoney')"
v-model="addMsg.ShouPeiMoney"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.table_tel')" prop="Tel"> <el-form-item :label="$t('hotel.table_tel')" prop="Tel">
<el-input type="text" class="w300" maxlength="20" v-model="addMsg.Tel"></el-input> <el-input
type="text"
class="w300"
maxlength="20"
v-model="addMsg.Tel"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.suplier_contact')" prop="Contact"> <el-form-item :label="$t('hotel.suplier_contact')" prop="Contact">
<el-input type="text" class="w300" maxlength="20" v-model="addMsg.Contact"></el-input> <el-input
type="text"
class="w300"
maxlength="20"
v-model="addMsg.Contact"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_fax')" prop="Fax"> <el-form-item :label="$t('hotel.hotel_fax')" prop="Fax">
<el-input type="text" class="w300" maxlength="20" v-model="addMsg.Fax"></el-input> <el-input
type="text"
class="w300"
maxlength="20"
v-model="addMsg.Fax"
></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_remark')" prop="Remark"> <el-form-item :label="$t('hotel.hotel_remark')" prop="Remark">
<el-input type="textarea" class="w300" maxlength="200" v-model="addMsg.Remark"></el-input> <el-input
type="textarea"
class="w300"
maxlength="200"
v-model="addMsg.Remark"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" <button
@click="resetForm('addMsg'),outerVisible = false">{{$t('pub.cancelBtn')}}</button> &nbsp; class="hollowFixedBtn"
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.sureBtn')}}</button> @click="resetForm('addMsg'), (outerVisible = false)"
>
{{ $t("pub.cancelBtn") }}
</button>
&nbsp;
<button
class="normalBtn"
type="primary"
@click="submitForm('addMsg')"
>
{{ $t("pub.sureBtn") }}
</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<div class="supplierList clearfix" v-loading="loading"> <div class="supplierList clearfix" v-loading="loading">
<div class="supList" v-for="item in tabelDate" :key="item.subCode" style="height:270px;"> <div
class="supList"
v-for="item in tabelDate"
:key="item.subCode"
style="height:270px;"
>
<div class="suTop"> <div class="suTop">
<img src="../../assets/img/suplier.jpg"> <img src="../../assets/img/suplier.jpg" />
<div class="topCircle">{{item.Number}}</div> <div class="topCircle">{{ item.Number }}</div>
</div> </div>
<div class="supTitle">{{item.Name}}</div> <div class="supTitle">{{ item.Name }}</div>
<div class="telNumber">{{item.Tel}}</div> <div class="telNumber">{{ item.Tel }}</div>
<div class="Address"> <div class="Address">
<div v-show="item.Contact"> <div v-show="item.Contact">
<i class="iconfont icon-img_dz"></i> <i class="iconfont icon-img_dz"></i>
<el-tooltip class="item" effect="dark" :content="item.Contact" placement="top-start"> <el-tooltip
<div class="AddressInner">{{item.Contact}}</div> class="item"
effect="dark"
:content="item.Contact"
placement="top-start"
>
<div class="AddressInner">{{ item.Contact }}</div>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
<div class="updataBtn"> <div class="updataBtn">
<button class="normalBtn UPBtn" <button
@click="outerVisible = true,dialogTitle=$t('visaT.xiugaigysxx'),updateInfo(item.ID)">{{$t('pub.updateMsg')}}</button> class="normalBtn UPBtn"
<button class="hollowFixedBtn UPBtn" @click="isdelete(item.ID)">{{$t('system.table_delete')}}</button> @click="
<button class="hollowFixedBtn HS_financial" @click="AccountManage(item)">{{$t("visaT.Accountmanagement")}}</button> (outerVisible = true),
<button class="hollowFixedBtn HS_financial" @click="GoHotel(item)" >{{$t("ground.jiudianfkfspz")}}</button> (dialogTitle = $t('visaT.xiugaigysxx')),
updateInfo(item.ID)
"
>
{{ $t("pub.updateMsg") }}
</button>
<button class="hollowFixedBtn UPBtn" @click="isdelete(item.ID)">
{{ $t("system.table_delete") }}
</button>
<button
class="hollowFixedBtn HS_financial"
@click="AccountManage(item)"
>
{{ $t("visaT.Accountmanagement") }}
</button>
<button class="hollowFixedBtn HS_financial" @click="GoHotel(item)">
{{ $t("ground.jiudianfkfspz") }}
</button>
</div> </div>
</div> </div>
</div> </div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage" <el-pagination
layout="total,prev, pager, next, jumper" :page-size="this.msg.pageSize" :total="total"> background
@current-change="handleCurrentChange"
:current-page.sync="currentPage"
layout="total,prev, pager, next, jumper"
:page-size="this.msg.pageSize"
:total="total"
>
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
tabelDate: "", tabelDate: "",
outerVisible: false, outerVisible: false,
isRight: true, isRight: true,
loading: true, loading: true,
dialogTitle: "", dialogTitle: "",
countryList: "", countryList: "",
provinceList: "", provinceList: "",
cityList: "", cityList: "",
district: "", district: "",
deleteID: "", deleteID: "",
typeList: "", typeList: "",
TypeOne: "", TypeOne: "",
inActive: 1, //有手配费 inActive: 1, //有手配费
notInActive: 0, //无手配费 notInActive: 0, //无手配费
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 18, pageSize: 18,
Name: "", Name: "",
Contact: "", Contact: "",
Type: 1, Type: 1,
CountryStr: "", CountryStr: "",
ProvinceStr: "", ProvinceStr: "",
CityStr: "", CityStr: "",
DistrictStr: "" DistrictStr: ""
}, },
addMsg: { addMsg: {
ID: 0, ID: 0,
Name: "", Name: "",
Country: "", Country: "",
Province: "", Province: "",
City: "", City: "",
District: "", District: "",
Address: "", Address: "",
Tel: "", Tel: "",
Contact: "", Contact: "",
Fax: "", Fax: "",
Remark: "", Remark: "",
Type: "1", Type: "1",
PayType: '', PayType: "",
//是否有手配费 //是否有手配费
IsHaveShouPeiFee: 0, IsHaveShouPeiFee: 0,
//手配费金额 //手配费金额
ShouPeiMoney: 0 ShouPeiMoney: 0
}, },
//付款方式 //付款方式
PayTypeList: [{ PayTypeList: [
name: this.$t('ground.xianfu'), {
name: this.$t("ground.xianfu"),
Id: 1 Id: 1
}, { },
name: this.$t('ground.qiandan'), {
name: this.$t("ground.qiandan"),
Id: 2 Id: 2
}], },
rules: { { name: this.$t("ground.yufu"), Id: 4 }
Name: [{ ],
rules: {
Name: [
{
required: true, required: true,
message: this.$t('visaT.qsrgysname'), message: this.$t("visaT.qsrgysname"),
trigger: "blur" trigger: "blur"
}], }
Contact: [{ ],
Contact: [
{
required: true, required: true,
message: this.$t('ground.qingshurulxr'), message: this.$t("ground.qingshurulxr"),
trigger: "blur" trigger: "blur"
}] }
]
}
};
},
methods: {
//跳转到供应商酒店配置页面
GoHotel(item) {
this.$router.push({
path: "HotelSupplierHotel",
query: {
ID: item.ID,
Name: item.Name,
tab: "供应商酒店备注",
blank: "y"
} }
}; });
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.initData();
}, },
methods: { resetPageIndex() {
//跳转到供应商酒店配置页面 this.msg.pageIndex = 1;
GoHotel(item) this.currentPage = 1;
{ },
this.$router.push({ initData() {
path: "HotelSupplierHotel", this.loading = true;
query: { this.apipost(
ID: item.ID, "supplier_get_GetPageList",
Name:item.Name, this.msg,
tab: "供应商酒店备注", res => {
blank: 'y', this.loading = false;
if (res.data.resultCode == 1) {
this.tabelDate = res.data.data.pageData;
this.total = res.data.data.count;
} }
}); },
}, null
handleCurrentChange(val) { );
this.msg.pageIndex = val; },
this.initData(); isdelete(ID) {
}, this.deleteID = ID;
resetPageIndex() { this.$confirm(this.$t("tips.shifoushanchu"), "提示", {
this.msg.pageIndex = 1; confirmButtonText: this.$t("pub.sureBtn"),
this.currentPage = 1; cancelButtonText: this.$t("pub.cancelBtn"),
}, type: "warning"
initData() { })
this.loading = true; .then(() => {
this.apipost( this.$message({
"supplier_get_GetPageList", type: "success",
this.msg, message: this.$t("tips.shanchuchenggong")
res => { });
this.loading = false; this.delsuppli();
if (res.data.resultCode == 1) { })
this.tabelDate = res.data.data.pageData; .catch(() => {
this.total = res.data.data.count; this.$message({
} type: "info",
}, message: this.$t("tips.cancleDelete")
null
);
},
isdelete(ID) {
this.deleteID = ID;
this.$confirm(this.$t("tips.shifoushanchu"), "提示", {
confirmButtonText: this.$t('pub.sureBtn'),
cancelButtonText: this.$t('pub.cancelBtn'),
type: "warning"
})
.then(() => {
this.$message({
type: "success",
message: this.$t('tips.shanchuchenggong')
});
this.delsuppli();
})
.catch(() => {
this.$message({
type: "info",
message: this.$t('tips.cancleDelete')
});
}); });
},
delsuppli() {
let msg = {
supplierID: this.deleteID
};
this.apipost(
"supplier_post_Remove",
msg,
response => {
if (response.data.resultCode == 1) {
this.Success(this.$t('tips.shanchuchenggong'));
this.initData();
} else {
this.Error(response.data.message);
}
},
null
);
},
saveInfo() {
if (this.addMsg.ShouPeiMoney == '') {
this.addMsg.ShouPeiMoney = 0;
}
this.apipost(
"supplier_post_Set",
this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.initData();
this.Success(this.$t('tips.saveYes'));
this.outerVisible = false;
} else {
this.Error(res.data.message);
}
},
null
);
},
clearinputInfo() {
(this.addMsg = {
Name: "",
Country: "",
Province: "",
City: "",
District: "",
Address: "",
Tel: "",
Contact: "",
Fax: "",
Remark: "",
Type: 1,
PayType: '',
IsHaveShouPeiFee: 0,
ShouPeiMoney: 0
}),
(this.provinceList = "");
this.cityList = "";
this.district = "";
},
updateInfo(ID) {
this.addMsg.ID = ID;
let msg = {
supplierID: ID
};
this.apipost(
"supplier_post_Get",
msg,
res => {
this.addMsg.Country = res.data.data.Country;
if (res.data.data.Country !== 0) {
this.getProvinceList(res.data.data.Country, 1);
}
if (res.data.data.Province !== 0) {
this.getProvinceList(res.data.data.Province, 2);
}
if (res.data.data.City !== 0) {
this.getProvinceList(res.data.data.City, 3);
}
this.addMsg = res.data.data;
this.addMsg.Type = 1;
},
null
);
},
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.addMsg.Province = "";
this.addMsg.City = "";
this.addMsg.District = "";
this.msg.ProvinceStr = "";
this.msg.CityStr = "";
this.msg.DistrictStr = "";
} else if (type == 2) {
this.addMsg.City = "";
this.addMsg.District = "";
this.msg.CityStr = "";
this.msg.DistrictStr = "";
} else if (type == 3) {
this.addMsg.District = "";
this.msg.DistrictStr = "";
}
if (this.addMsg.Country != "" || this.msg.CountryStr != "") {
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 => {}
);
}
},
getCountryList() {
//获取国家
let msg = {};
this.apipost(
"dict_post_Destination_GetCountry",
msg,
res => {
this.countryList = res.data.data;
},
err => {}
);
},
goUrl(path, id) {
this.$router.push({
path: path,
query: {
id: id
}
}); });
}, },
submitForm(addMsg) { delsuppli() {
//提交创建、修改表单 let msg = {
let that = this; supplierID: this.deleteID
that.$refs[addMsg].validate(valid => { };
if (valid) { this.apipost(
that.saveInfo(); "supplier_post_Remove",
msg,
response => {
if (response.data.resultCode == 1) {
this.Success(this.$t("tips.shanchuchenggong"));
this.initData();
} else { } else {
return false; this.Error(response.data.message);
} }
}); },
}, null
resetForm(formName) { );
this.$refs[formName].resetFields(); },
}, saveInfo() {
trim(str) { if (this.addMsg.ShouPeiMoney == "") {
//去除空格 this.addMsg.ShouPeiMoney = 0;
return str.replace(/\s+/g, ""); }
}, this.apipost(
gettypeList() { "supplier_post_Set",
//获取类型 this.addMsg,
let msg = {}; res => {
if (res.data.resultCode == 1) {
this.initData();
this.Success(this.$t("tips.saveYes"));
this.outerVisible = false;
} else {
this.Error(res.data.message);
}
},
null
);
},
clearinputInfo() {
(this.addMsg = {
Name: "",
Country: "",
Province: "",
City: "",
District: "",
Address: "",
Tel: "",
Contact: "",
Fax: "",
Remark: "",
Type: 1,
PayType: "",
IsHaveShouPeiFee: 0,
ShouPeiMoney: 0
}),
(this.provinceList = "");
this.cityList = "";
this.district = "";
},
updateInfo(ID) {
this.addMsg.ID = ID;
let msg = {
supplierID: ID
};
this.apipost(
"supplier_post_Get",
msg,
res => {
this.addMsg.Country = res.data.data.Country;
if (res.data.data.Country !== 0) {
this.getProvinceList(res.data.data.Country, 1);
}
if (res.data.data.Province !== 0) {
this.getProvinceList(res.data.data.Province, 2);
}
if (res.data.data.City !== 0) {
this.getProvinceList(res.data.data.City, 3);
}
this.addMsg = res.data.data;
this.addMsg.Type = 1;
},
null
);
},
getProvinceList(ID, type) {
//根据省份获取城市
let msg = {
Id: ID
};
if (type == 1) {
this.addMsg.Province = "";
this.addMsg.City = "";
this.addMsg.District = "";
this.msg.ProvinceStr = "";
this.msg.CityStr = "";
this.msg.DistrictStr = "";
} else if (type == 2) {
this.addMsg.City = "";
this.addMsg.District = "";
this.msg.CityStr = "";
this.msg.DistrictStr = "";
} else if (type == 3) {
this.addMsg.District = "";
this.msg.DistrictStr = "";
}
if (this.addMsg.Country != "" || this.msg.CountryStr != "") {
this.apipost( this.apipost(
"hotel_post_GetResourceType", "dict_post_Destination_GetChildList",
msg, msg,
res => { res => {
this.typeList = res.data.data; 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 => {} err => {}
); );
},
//账户管理
AccountManage(item) {
this.$router.push({
name: "empBankAccount",
query: {
id: item.ID,
type: 1,
blank: 'y',
tab: '账户管理'
}
});
} }
}, },
getCountryList() {
mounted() { //获取国家
this.initData(); let msg = {};
this.getCountryList(); //初始化国家下拉 this.apipost(
"dict_post_Destination_GetCountry",
msg,
res => {
this.countryList = res.data.data;
},
err => {}
);
},
goUrl(path, id) {
this.$router.push({
path: path,
query: {
id: id
}
});
},
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveInfo();
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
trim(str) {
//去除空格
return str.replace(/\s+/g, "");
},
gettypeList() {
//获取类型
let msg = {};
this.apipost(
"hotel_post_GetResourceType",
msg,
res => {
this.typeList = res.data.data;
},
err => {}
);
},
//账户管理
AccountManage(item) {
this.$router.push({
name: "empBankAccount",
query: {
id: item.ID,
type: 1,
blank: "y",
tab: "账户管理"
}
});
} }
}; },
mounted() {
this.initData();
this.getCountryList(); //初始化国家下拉
}
};
</script> </script>
<style> <style>
.CM_look { .CM_look {
padding: 4px !important; padding: 4px !important;
position: relative; position: relative;
top: 1px; top: 1px;
} }
</style> </style>
<template> <template>
<div class="flexOne"> <div class="flexOne">
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" class="normalBtn" :value="$t('pub.addBtn')" @click="isShow=true,dialogTitle=$t('ground.xinzengjdgyfs')" /> <input
type="button"
class="normalBtn"
:value="$t('pub.addBtn')"
@click="(isShow = true), (dialogTitle = $t('ground.xinzengjdgyfs'))"
/>
</li> </li>
</ul> </ul>
<el-dialog :title="dialogTitle" :visible.sync="isShow" center custom-class="w460"> <el-dialog
:title="dialogTitle"
:visible.sync="isShow"
center
custom-class="w460"
>
<el-form :model="addMsg" label-width="100px"> <el-form :model="addMsg" label-width="100px">
<el-form-item :label="$t('hotel.suplier_name')" prop="Name"> <el-form-item :label="$t('hotel.suplier_name')" prop="Name">
{{SupplierName}} {{ SupplierName }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel')"> <el-form-item :label="$t('hotel.hotel')">
<el-select v-model="addMsg.HotelId" filterable :placeholder="$t('pub.pleaseSel')" class="w220"> <el-select
v-model="addMsg.HotelId"
filterable
:placeholder="$t('pub.pleaseSel')"
class="w220"
>
<el-option :label="$t('pub.pleaseSel')" :value="0"></el-option> <el-option :label="$t('pub.pleaseSel')" :value="0"></el-option>
<el-option v-for='item in HotelList' :key="item.ID" :label="item.Name" :value="item.ID"> <el-option
v-for="item in HotelList"
:key="item.ID"
:label="item.Name"
:value="item.ID"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('fnc.fkfangshi')"> <el-form-item :label="$t('fnc.fkfangshi')">
<el-select v-model="addMsg.SubPayType" filterable :placeholder="$t('pub.pleaseSel')" class="w220"> <el-select
v-model="addMsg.SubPayType"
filterable
:placeholder="$t('pub.pleaseSel')"
class="w220"
>
<el-option :label="$t('pub.pleaseSel')" :value="0"></el-option> <el-option :label="$t('pub.pleaseSel')" :value="0"></el-option>
<el-option v-for='item in PayTypeList' :key="item.Id" :label="item.name" :value="item.Id"> <el-option
v-for="item in PayTypeList"
:key="item.Id"
:label="item.name"
:value="item.Id"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_StartDate')"> <el-form-item :label="$t('hotel.hotel_StartDate')">
<el-date-picker class="w220" type="date" v-model="addMsg.StartDate" :picker-options="pickerBeginDateBefore" <el-date-picker
value-format="yyyy-MM-dd" placeholder></el-date-picker> class="w220"
type="date"
v-model="addMsg.StartDate"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
placeholder
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('hotel.hotel_EndDate')"> <el-form-item :label="$t('hotel.hotel_EndDate')">
<el-date-picker class="w220" type="date" v-model="addMsg.EndDate" :picker-options="pickerBeginDateAfter" <el-date-picker
value-format="yyyy-MM-dd" placeholder></el-date-picker> class="w220"
type="date"
v-model="addMsg.EndDate"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
placeholder
></el-date-picker>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="initData(),isShow = false">{{$t('pub.cancelBtn')}}</button> &nbsp; <button class="hollowFixedBtn" @click="initData(), (isShow = false)">
<button class="normalBtn" type="primary" @click="SaveData()">{{$t('pub.sureBtn')}}</button> {{ $t("pub.cancelBtn") }}
</button>
&nbsp;
<button class="normalBtn" type="primary" @click="SaveData()">
{{ $t("pub.sureBtn") }}
</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table
class="singeRowTable"
border="0"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr> <tr>
<th>{{$t('hotel.hotel')}}</th> <th>{{ $t("hotel.hotel") }}</th>
<th>{{$t('hotel.hotel_StartDate')}}</th> <th>{{ $t("hotel.hotel_StartDate") }}</th>
<th>{{$t('hotel.hotel_EndDate')}}</th> <th>{{ $t("hotel.hotel_EndDate") }}</th>
<th>{{$t('fnc.fkfangshi')}}</th> <th>{{ $t("fnc.fkfangshi") }}</th>
<th>{{$t('system.table_operation')}}</th> <th>{{ $t("system.table_operation") }}</th>
</tr> </tr>
<tr v-for="item in dataList"> <tr v-for="item in dataList">
<td>{{item.HotelName}}</td> <td>{{ item.HotelName }}</td>
<td>{{item.StartDateStr}}</td> <td>{{ item.StartDateStr }}</td>
<td>{{item.EndDateStr}}</td> <td>{{ item.EndDateStr }}</td>
<td>{{item.SubPayTypeStr}}</td> <td>{{ item.SubPayTypeStr }}</td>
<td> <td>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start"> <el-tooltip
<el-button type="primary" class="iconfont icon-bianji-smal" class="item"
@click="GetData(item.Id),isShow=true,dialogTitle=$t('ground.xinzengjdgyfs')"></el-button> effect="dark"
:content="$t('system.table_edit')"
placement="top-start"
>
<el-button
type="primary"
class="iconfont icon-bianji-smal"
@click="
GetData(item.Id),
(isShow = true),
(dialogTitle = $t('ground.xinzengjdgyfs'))
"
></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
...@@ -74,164 +138,169 @@ ...@@ -74,164 +138,169 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
msg: { msg: {
SupplierId: 0, SupplierId: 0
}, },
loading: false, loading: false,
isShow: false, //是否显示新增修改 isShow: false, //是否显示新增修改
//供应商名称 //供应商名称
SupplierName: "", SupplierName: "",
dialogTitle: this.$t('ground.xinzengjdgyfs'), dialogTitle: this.$t("ground.xinzengjdgyfs"),
//数据源 //数据源
dataList: [], dataList: [],
HotelList: [], //酒店列表 HotelList: [], //酒店列表
//添加修改供应商酒店信息 //添加修改供应商酒店信息
addMsg: { addMsg: {
Id: 0, //编号 Id: 0, //编号
SupplierId: 0, // SupplierId: 0, //
HotelId: 0, HotelId: 0,
StartDate: "", StartDate: "",
EndDate: "", EndDate: "",
SubPayType: 0, SubPayType: 0
}, },
//付款方式 //付款方式
PayTypeList: [{ PayTypeList: [
name: this.$t('ground.xianfu'), {
name: this.$t("ground.xianfu"),
Id: 1 Id: 1
}, { },
name: this.$t('ground.qiandan'), {
name: this.$t("ground.qiandan"),
Id: 2 Id: 2
}],
pickerBeginDateBefore: {
disabledDate: time => {
if (this.addMsg.EndDate == null) {
return false;
} else {
let endTime = new Date(this.addMsg.EndDate)
return endTime.getTime() < time.getTime()
}
}
}, },
pickerBeginDateAfter: { { name: this.$t("ground.yufu"), Id: 4 }
disabledDate: time => { ],
let startTime = new Date(this.addMsg.StartDate) pickerBeginDateBefore: {
return startTime.getTime() >= time.getTime() disabledDate: time => {
if (this.addMsg.EndDate == null) {
return false;
} else {
let endTime = new Date(this.addMsg.EndDate);
return endTime.getTime() < time.getTime();
} }
} }
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.addMsg.StartDate);
return startTime.getTime() >= time.getTime();
}
} }
}, };
mounted() { },
this.msg.SupplierId = this.$route.query.ID; mounted() {
this.msg.SupplierId = this.$route.query.ID;
this.addMsg.SupplierId = this.$route.query.ID;
this.SupplierName = this.$route.query.Name;
this.getList();
this.getHotelList();
},
methods: {
//初始化数据
initData() {
this.addMsg.Id = 0;
this.addMsg.SupplierId = this.$route.query.ID; this.addMsg.SupplierId = this.$route.query.ID;
this.SupplierName = this.$route.query.Name; this.addMsg.HotelId = 0;
this.getList(); this.addMsg.StartDate = "";
this.getHotelList(); this.addMsg.EndDate = "";
this.addMsg.SubPayType = 0;
}, },
methods: { SaveData() {
//初始化数据 if (this.addMsg.HotelId <= 0) {
initData() { this.Info(this.$t("ground.qingxuanzejiud"));
this.addMsg.Id = 0; return;
this.addMsg.SupplierId = this.$route.query.ID; }
this.addMsg.HotelId = 0; if (this.addMsg.SubPayType <= 0) {
this.addMsg.StartDate = ""; this.Info(this.$t("ground.qingxuanzefkfs"));
this.addMsg.EndDate = ""; return;
this.addMsg.SubPayType = 0; }
}, if (this.addMsg.StartDate == "") {
SaveData() { this.Info(this.$t("ground.qingxuanzekssjs"));
if (this.addMsg.HotelId <= 0) { return;
this.Info(this.$t('ground.qingxuanzejiud')); }
return; if (this.addMsg.EndDate == "") {
} this.Info(this.$t("ground.qingxuanzejssjs"));
if (this.addMsg.SubPayType <= 0) { return;
this.Info(this.$t('ground.qingxuanzefkfs')); }
return; this.apipost(
} "supplier_post_SetSupplierDetailService",
if (this.addMsg.StartDate == "") { this.addMsg,
this.Info(this.$t('ground.qingxuanzekssjs')); res => {
return; this.loading = false;
} if (res.data.resultCode == 1) {
if (this.addMsg.EndDate == "") { this.Success(res.data.message);
this.Info(this.$t('ground.qingxuanzejssjs')); this.initData();
return; this.isShow = false;
} this.getList();
this.apipost( } else {
"supplier_post_SetSupplierDetailService", this.Error(res.data.message);
this.addMsg, }
res => { },
this.loading = false; null
if (res.data.resultCode == 1) { );
this.Success(res.data.message); },
this.initData(); //根据编号获取实体
this.isShow = false; GetData(Id) {
this.getList(); this.apipost(
} else { "supplier_post_GetEntityService",
this.Error(res.data.message); {
} Id: Id
}, },
null res => {
); this.loading = false;
}, if (res.data.resultCode == 1) {
//根据编号获取实体 var nData = res.data.data;
GetData(Id) { this.addMsg.Id = nData.Id;
this.apipost( this.addMsg.HotelId = nData.HotelId;
"supplier_post_GetEntityService", { this.addMsg.SubPayType = nData.SubPayType;
Id: Id this.addMsg.StartDate = nData.StartDateStr;
}, this.addMsg.EndDate = nData.EndDateStr;
res => { } else {
this.loading = false; this.Error(res.data.message);
if (res.data.resultCode == 1) { }
var nData = res.data.data; },
this.addMsg.Id = nData.Id; null
this.addMsg.HotelId = nData.HotelId; );
this.addMsg.SubPayType = nData.SubPayType; },
this.addMsg.StartDate = nData.StartDateStr; //获取数据
this.addMsg.EndDate = nData.EndDateStr; getList() {
} else { this.loading = true;
this.Error(res.data.message); this.apipost(
} "supplier_get_GetListService",
}, this.msg,
null res => {
); this.loading = false;
}, if (res.data.resultCode == 1) {
//获取数据 this.dataList = res.data.data;
getList() { } else {
this.loading = true; this.Error(res.data.message);
this.apipost( }
"supplier_get_GetListService", },
this.msg, null
res => { );
this.loading = false; },
if (res.data.resultCode == 1) { //获取酒店列表
this.dataList = res.data.data; getHotelList() {
} else { this.loading = true;
this.Error(res.data.message); this.apipost(
} "hotel_post_GetList",
}, {
null QCountry: 651
); },
}, res => {
//获取酒店列表 this.loading = false;
getHotelList() { if (res.data.resultCode == 1) {
this.loading = true; this.HotelList = res.data.data;
this.apipost( } else {
"hotel_post_GetList", { this.Error(res.data.message);
QCountry: 651 }
}, },
res => { null
this.loading = false; );
if (res.data.resultCode == 1) {
this.HotelList = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
} }
} }
};
</script> </script>
...@@ -363,13 +363,24 @@ ...@@ -363,13 +363,24 @@
<span v-else-if="subItem.DMCPayType === 9">月结</span> <span v-else-if="subItem.DMCPayType === 9">月结</span>
<span v-else-if="subItem.DMCPayType === 11">刷卡</span> <span v-else-if="subItem.DMCPayType === 11">刷卡</span>
<span v-else-if="subItem.DMCPayType === 10">领队导游垫付</span> <span v-else-if="subItem.DMCPayType === 10">领队导游垫付</span>
</br> <br/>
<span v-show="subItem.DMCPayType==6">付款团号:{{subItem.PayTypeTCNUM}}</span> <span v-show="subItem.DMCPayType==6">付款团号:{{subItem.PayTypeTCNUM}}</span>
</td> </td>
<td v-if="childIndex==0" :rowspan="6"> <td v-if="childIndex==0" :rowspan="6">
<span>{{subItem.SupplierName}} <span v-if="subItem.SupplierPayType !== 0" <span>{{subItem.SupplierName}}
:style="{'color': subItem.SupplierPayType == 2 ? '#E95252': '#111111'}">{{subItem.SupplierPayType == 2 ? '签单' : '现付'}}</span></span> <br/>
<template v-if="subItem.SupplierPayType !== 0">
<span v-if="subItem.SupplierPayType == 1">
现付
</span>
<span v-else-if="subItem.SupplierPayType == 2">
签单
</span>
<span v-else-if="subItem.SupplierPayType == 4">
预付
</span>
</template>
</span>
<div v-if="subItem.IsHaveShouPeiFee==0" style="color:red;">无手配费</div> <div v-if="subItem.IsHaveShouPeiFee==0" style="color:red;">无手配费</div>
<div v-if="subItem.IsHaveShouPeiFee==1" style="color:red;">手配费:{{subItem.ShouPeiMoney}}</div> <div v-if="subItem.IsHaveShouPeiFee==1" style="color:red;">手配费:{{subItem.ShouPeiMoney}}</div>
......
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