Commit c0950dd1 authored by 黄奎's avatar 黄奎

供应商酒店付款方式修改

parent 3deb7021
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
@click="outerVisible = true,dialogTitle='修改供应商信息',updateInfo(item.ID)">{{$t('pub.updateMsg')}}</button> @click="outerVisible = true,dialogTitle='修改供应商信息',updateInfo(item.ID)">{{$t('pub.updateMsg')}}</button>
<button class="hollowFixedBtn UPBtn" @click="isdelete(item.ID)">删除</button> <button class="hollowFixedBtn UPBtn" @click="isdelete(item.ID)">删除</button>
<button class="hollowFixedBtn HS_financial" @click="AccountManage(item)">账户管理</button> <button class="hollowFixedBtn HS_financial" @click="AccountManage(item)">账户管理</button>
<button class="hollowFixedBtn HS_financial" @click="GoHotel(item.ID)" style="display:none;">酒店付款方式配置</button> <button class="hollowFixedBtn HS_financial" @click="GoHotel(item)" style="display:none;" >酒店付款方式配置</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -222,12 +222,13 @@ ...@@ -222,12 +222,13 @@
}, },
methods: { methods: {
//跳转到供应商酒店配置页面 //跳转到供应商酒店配置页面
GoHotel(ID) GoHotel(item)
{ {
this.$router.push({ this.$router.push({
path: "HotelSupplierHotel", path: "HotelSupplierHotel",
query: { query: {
ID: ID, ID: item.ID,
Name:item.Name,
tab: "供应商酒店备注", tab: "供应商酒店备注",
blank: 'y', blank: 'y',
} }
......
...@@ -11,9 +11,43 @@ ...@@ -11,9 +11,43 @@
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <li>
<input type="button" class="normalBtn" value="新增" /> <input type="button" class="normalBtn" value="新增" @click="isShow=true,dialogTitle='新增供应商酒店付款方式'" />
</li> </li>
</ul> </ul>
<el-dialog :title="dialogTitle" :visible.sync="isShow" center custom-class="w460">
<el-form :model="addMsg" label-width="100px">
<el-form-item :label="$t('hotel.suplier_name')" prop="Name">
{{SupplierName}}
</el-form-item>
<el-form-item label="酒店">
<el-select v-model="addMsg.HotelId" filterable placeholder="请选择" class="w220">
<el-option label="请选择" :value="0"></el-option>
<el-option v-for='item in HotelList' :key="item.ID" :label="item.Name" :value="item.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="付款方式">
<el-select v-model="addMsg.SubPayType" filterable placeholder="请选择" class="w220">
<el-option label="请选择" :value="0"></el-option>
<el-option v-for='item in PayTypeList' :key="item.Id" :label="item.name" :value="item.Id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="开始日期">
<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 label="结束日期">
<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>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="initData(),isShow = false">{{$t('pub.cancelBtn')}}</button> &nbsp;
<button class="normalBtn" type="primary" @click="SaveData()">{{$t('pub.sureBtn')}}</button>
</div>
</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>
...@@ -24,19 +58,18 @@ ...@@ -24,19 +58,18 @@
<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.Periods}}</td> <td>{{item.HotelName}}</td>
<td>{{item.SumPrice}}</td> <td>{{item.StartDateStr}}</td>
<td>{{item.CreateByName}}</td> <td>{{item.EndDateStr}}</td>
<td>{{item.CreateTimeStr}}</td> <td>{{item.SubPayTypeStr}}</td>
<td> <td>
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" class="CM_look" @click="goUrl('AirticketCommissionDetail',item.ID)" <el-button type="primary" class="iconfont icon-bianji-smal"
icon="iconfont icon-chakan" circle></el-button> @click="GetData(item.Id),isShow=true,dialogTitle='修改供应商酒店付款方式'"></el-button>
</el-tooltip> </el-tooltip>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</template> </template>
...@@ -45,19 +78,108 @@ ...@@ -45,19 +78,108 @@
data() { data() {
return { return {
msg: { msg: {
SupplierId:0, SupplierId: 0,
}, },
loading: false, loading: false,
isShow: false, //是否显示新增修改
//供应商名称
SupplierName: "",
dialogTitle: "新增酒店付款方式",
//数据源 //数据源
dataList: [], dataList: [],
HotelList: [], //酒店列表
//添加修改供应商酒店信息
addMsg: {
Id: 0, //编号
SupplierId: 0, //
HotelId: 0,
StartDate: "",
EndDate: "",
SubPayType: 0,
},
//付款方式
PayTypeList: [{
name: '现付',
Id: 1
}, {
name: '签单',
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: {
disabledDate: time => {
let startTime = new Date(this.addMsg.StartDate)
return startTime.getTime() >= time.getTime()
}
}
} }
}, },
mounted() { mounted() {
this.msg.SupplierId=this.$route.query.ID; this.msg.SupplierId = this.$route.query.ID;
this.addMsg.SupplierId = this.$route.query.ID;
this.SupplierName = this.$route.query.Name;
this.getList(); this.getList();
this.getHotelList();
}, },
methods: { methods: {
//初始化数据
initData() {
this.addMsg.Id = 0;
this.addMsg.SupplierId = this.$route.query.ID;
this.addMsg.HotelId = 0;
this.addMsg.StartDate = "";
this.addMsg.EndDate = "";
this.addMsg.SubPayType = 0;
},
SaveData() {
this.apipost(
"supplier_post_SetSupplierDetailService",
this.addMsg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.initData();
this.isShow = false;
this.getList();
} else {
this.Error(res.data.message);
}
},
null
);
},
//根据编号获取实体
GetData(Id) {
this.apipost(
"supplier_post_GetEntityService", {
Id: Id
},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
var nData=res.data.data;
this.addMsg.Id=nData.Id;
this.addMsg.HotelId=nData.HotelId;
this.addMsg.SubPayType=nData.SubPayType;
this.addMsg.StartDate=nData.StartDateStr;
this.addMsg.EndDate=nData.EndDateStr;
} else {
this.Error(res.data.message);
}
},
null
);
},
//获取数据 //获取数据
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -75,6 +197,25 @@ ...@@ -75,6 +197,25 @@
null null
); );
}, },
//获取酒店列表
getHotelList() {
this.loading = true;
this.apipost(
"hotel_post_GetList", {
QCountry: 651
},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.HotelList = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
} }
} }
</script>
\ No newline at end of file </script>
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