Commit dc3caee0 authored by 黄奎's avatar 黄奎

新增页面

parent 1183d11e
<style> <style>
.BusAddArea{ .AreaandType .BusAddArea{
width:100%; width:100%;
text-align: right; text-align: right;
margin-bottom:25px; margin-bottom:25px;
} }
.AreaTypeTable td, .AreaTypeTable th{ .AreaandType .AreaTypeTable td, .AreaTypeTable th{
text-align: center!important; text-align: center!important;
} }
</style> </style>
......
<style>
.swtBaoJiaConfig .BusAddArea {
width: 100%;
text-align: right;
margin-bottom: 25px;
}
.swtBaoJiaConfig .AreaTypeTable td,
.AreaTypeTable th {
text-align: center !important;
}
</style>
<template>
<div class="flexOne swtBaoJiaConfig">
<div class="query-box">
<ul>
<li>
<span>
<em>类型</em>
<el-select v-model='qMsg.CType' class="w217">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="(item) in TypeList" :label="item.Name" :key="item.Id" :value="item.Id"></el-option>
</el-select>
</span>
</li>
<li>
<span>
<em>名称</em>
<el-input maxlength="50" v-model="qMsg.CName" class="permiss-input w150" @keyup.native.enter="getList"
:placeholder="$t('pub.pleaseImport')"></el-input>
</span>
</li>
<li>
<button class="hollowFixedBtn" @click="qMsg.pageIndex=1,getList()">{{$t('pub.searchBtn')}}</button>
<input type="button" class="normalBtn" @click="addAreaData()" value="新增费用">
</li>
</ul>
</div>
<table class="singeRowTable AreaTypeTable" border="0" cellspacing="0" cellpadding="0" v-loading="loadingArea">
<tr>
<th width="200">类型</th>
<th width="200">名称</th>
<th width="200">美元</th>
<th width="200">越南盾</th>
<th width="200">操作人</th>
<th width="200">操作时间</th>
<th>操作</th>
</tr>
<tr v-for="(item,index) in AreaDataList" :key="index">
<td>{{item.CTypeStr}}</td>
<td>{{item.CName}}</td>
<td><span style="color:red;font-weight:bold;">US {{item.USPrice}}</span></td>
<td><span style="color:blue;font-weight:bold;">VND {{item.VNDPrice}}</span></td>
<td>{{item.UpdateByName}}</td>
<td>{{item.UpdateDateStr}}</td>
<td>
<el-button type="primary" icon="el-icon-edit" @click="getAreaUpdate(item.Id)" circle></el-button>
<el-tooltip class="item" effect="dark" content="删除" placement="top-start">
<el-button type="danger" icon="el-icon-delete" @click="delArea(item.Id)" circle></el-button>
</el-tooltip>
</td>
</tr>
</table>
<el-pagination background @current-change="AreaCurrentChange" :current-page.sync="qMsg.currentPage"
layout="total,prev, pager, next, jumper" :page-size="qMsg.pageSize" :total="qMsg.total"></el-pagination>
<el-dialog custom-class="w400" :title="dialogTitle" :visible.sync="dialogVisible" center
:before-close="clearAddMsg">
<el-form label-width="100px">
<table class="layerTable layerNoIcon">
<tr>
<td>
<el-form-item label="名称">
<el-input v-model="addMsg.CName" class="w217" />
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="类型">
<el-select v-model='addMsg.CType' class="w217">
<el-option :label="$t('pub.unlimitedSel')" :value="0"></el-option>
<el-option v-for="(item) in TypeList" :label="item.Name" :key="item.Id" :value="item.Id"></el-option>
</el-select>
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="美元">
<el-input v-model="addMsg.USPrice" class="w217" @keyup.native="checkPrice(addMsg,'USPrice')" />
</el-form-item>
</td>
</tr>
<tr>
<td>
<el-form-item label="越南盾">
<el-input v-model="addMsg.VNDPrice" class="w217" @keyup.native="checkPrice(addMsg,'VNDPrice')" />
</el-form-item>
</td>
</tr>
</table>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="dialogVisible = false,clearAddMsg()">{{$t('pub.cancelBtn')}}</button>
&nbsp;
<button class="normalBtn" @click="saveAreaInfo()">{{$t('pub.saveBtn')}}</button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
data() {
return {
dialogVisible: false,
dialogTitle: '',
loadingArea: false,
//地区请求参数
qMsg: {
CType: 0,
pageIndex: 1,
pageSize: 5,
total: 0,
currentPage: 1,
CName: '', //项目名称
},
AreaDataList: [],
//新增费用
addMsg: {
Id: 0,
CType: 0, //费用类型
CName: '', //项目名称
USPrice: 0, //美元价
VNDPrice: 0, //越南盾
},
//费用类型字符串
TypeList: [{
Id: 1,
Name: "杂支"
},
{
Id: 2,
Name: "自费"
},
{
Id: 3,
Name: "小费"
},
], //费用类型列表
};
},
mounted() {
this.getList();
},
filters: {},
methods: {
//新增地区
addAreaData() {
this.dialogVisible = true;
this.dialogTitle = '新增费用';
},
//翻页
AreaCurrentChange(val) {
this.qMsg.pageIndex = val;
this.getList();
},
//清空新增信息
clearAddMsg() {
this.addMsg.Id = 0;
this.addMsg.CType = 0;
this.addMsg.CName = "";
this.addMsg.USPrice = 0;
this.addMsg.VNDPrice = 0;
},
//获取报价配置数据
getList() {
this.loadingArea = true;
this.apipost('travel_get_GetBaoJiaDanConfigSwtPageListService', this.qMsg,
res => {
this.loadingArea = false;
if (res.data.resultCode == 1) {
this.AreaDataList = res.data.data.pageData;
this.qMsg.total = res.data.data.count;
} else {
this.Error(res.data.message);
}
},
err => {}
)
},
//保存费用配置
saveAreaInfo() {
if (this.addMsg.CName == '') {
this.Error('请填写名称');
return;
}
if (this.addMsg.CType == 0) {
this.Error('请选择费用类型');
return;
}
this.apipost('travel_post_SetBaoJiaDanConfigSWTService', this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.getList();
this.clearAddMsg();
this.dialogVisible = false;
} else {
this.Error(res.data.message);
}
},
err => {}
)
},
//修改费用配置
getAreaUpdate(Id) {
this.dialogTitle = "修改费用"
this.dialogVisible = true;
let msg = {
Id: Id
}
this.apipost('travel_get_GetBaoJiaDanConfigSwtService', msg,
res => {
if (res.data.resultCode == 1) {
this.addMsg.Id = res.data.data.Id;
this.addMsg.CType = res.data.data.CType;
this.addMsg.CName = res.data.data.CName;
this.addMsg.USPrice = res.data.data.USPrice;
this.addMsg.VNDPrice = res.data.data.VNDPrice;
} else {
this.Error(res.data.message);
}
},
err => {}
)
},
//删除费用配置
delArea(Id) {
var that = this;
this.Confirm("是否删除?", function () {
var msg = {
Id: Id,
Status: 1
};
that.apipost(
"travel_post_UpdateBaoJiaDanConfigSwtStatusService",
msg,
res => {
if (res.data.resultCode == 1) {
that.Success('删除成功!');
that.getList();
} else {
that.Error(res.data.data);
}
},
null
);
});
},
}
};
</script>
...@@ -3916,6 +3916,11 @@ export default { ...@@ -3916,6 +3916,11 @@ export default {
name: 'tripsManager', name: 'tripsManager',
component: resolve => require(['@/components/dmc/manager/tripsManager'], resolve), component: resolve => require(['@/components/dmc/manager/tripsManager'], resolve),
}, },
{
path: '/swtBaoJiaConfig',//SWT旅行社报价单项目配置
name: 'swtBaoJiaConfig',
component: resolve => require(['@/components/dmc/manager/swtBaoJiaConfig'], resolve),
},
{ {
path: '/LeaderHander', path: '/LeaderHander',
name: 'LeaderHander', name: 'LeaderHander',
......
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