Commit db05e0b8 authored by 黄奎's avatar 黄奎

页面修改

parent 4257126d
......@@ -2,6 +2,7 @@
.WebSiteCertificate .el-button.is-circle {
padding: 6px;
}
</style>
<template>
<!--护照签证资料-->
......@@ -10,51 +11,51 @@
<ul>
<li>
<label>名称</label>
<el-input v-model="msg.name" :placeholder="$t('system.ph_in')" @keyup.native.enter="getData" class="w210">
<el-input v-model="msg.Name" :placeholder="$t('system.ph_in')" @keyup.native.enter="getData" class="w210">
</el-input>
</li>
<li>
<input type="button" class="hollowFixedBtn" :value="$t('pub.searchBtn')"
@click="resetPageIndex(),getData()" />
<input type="button" class="normalBtn" @click="outerVisible=true" value="新增证件" />
<input type="button" class="normalBtn" @click="outerVisible=true,clearMsg()" value="新增证件" />
<input type="button" class="normalBtn" value="浏览前台页面" />
</li>
</ul>
</div>
<div>
<el-table :data="dataList" style="width: 100%" :default-sort="{prop: 'date', order: 'descending'}">
<el-table-column prop="certificateName" label="证件名称" sortable>
<el-table :data="dataList" style="width: 100%" v-loading="loading" :default-sort="{prop: 'date', order: 'descending'}">
<el-table-column prop="CertificateName" label="证件名称" sortable>
</el-table-column>
<el-table-column prop="country" label="国家" sortable>
<el-table-column prop="CountryName" label="国家" sortable>
</el-table-column>
<el-table-column prop="DoFei" label="办件费用" sortable>
<el-table-column prop="Fee" label="办件费用" sortable>
</el-table-column>
<el-table-column prop="guestFei" label="直客费用" sortable>
<el-table-column prop="B2CFee" label="直客费用" sortable>
</el-table-column>
<el-table-column prop="validityDate" label="证件效期" sortable>
<el-table-column prop="Validity" label="证件效期" sortable>
</el-table-column>
<el-table-column prop="stayDays" label="可停留天数" sortable>
<el-table-column prop="StayDay" label="可停留天数" sortable>
</el-table-column>
<el-table-column prop="workDays" label="工作天" sortable>
<el-table-column prop="WorkDay" label="工作天" sortable>
</el-table-column>
<el-table-column prop="isShowBefore" label="前台显示">
<el-table-column prop="IsShowBefore" label="前台显示">
<template slot-scope="scope">
<el-switch v-model="scope.row.isShowBefore" :active-value="1" :inactive-value="0" active-color="#13ce66"
inactive-color="#ff4949"></el-switch>
<el-switch v-model="scope.row.IsShowBefore" :active-value="1" :inactive-value="0" active-color="#13ce66"
inactive-color="#dcdfe6" @change="UpdateIsShowBefore(scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="详情">
<el-table-column label="操作">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="详情" placement="top-start">
<el-button type="primary" icon="el-icon-search" circle>
<el-tooltip class="item" effect="dark" :content="$t('system.table_edit')" placement="top-start">
<el-button type="primary" icon="el-icon-edit" circle @click="outerVisible = true,updateData(scope.row)">
</el-button>
</el-tooltip>
<el-tooltip class="item" effect="dark" :content="$t('system.table_delete')" placement="top-start">
<el-button type="danger" icon="el-icon-delete" circle @click="deleteData(scope.row)"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="noData" v-if="dataList.length==0">
{{$t('system.content_noData')}}
</div>
<el-pagination background @current-change="handleCurrentChange" :current-page.sync="currentPage"
layout="total,prev, pager, next, jumper" :page-size='msg.pageSize' :total=total>
</el-pagination>
......@@ -65,46 +66,47 @@
<el-row>
<el-col :span="12">
<el-form-item label="证件名称">
<el-input type="text" v-model="addMsg.certificateName">
<el-input type="text" v-model="addMsg.CertificateName" maxlength="50">
</el-input>
</el-form-item>
<el-form-item label="工作天">
<el-input type="text" v-model="addMsg.workDays">
<el-input type="text" v-model="addMsg.WorkDay" maxlength="3" @keyup.native="checkInteger(addMsg,'WorkDay')">
</el-input>
</el-form-item>
<el-form-item label="直客费用">
<el-input type="text" v-model="addMsg.guestFei">
<el-input type="text" v-model="addMsg.B2CFee" maxlength="8" @keyup.native="checkPrice(addMsg,'B2CFee')">
</el-input>
</el-form-item>
<el-form-item label="可停留天数">
<el-input type="text" v-model="addMsg.stayDays">
<el-input type="text" v-model="addMsg.StayDay" maxlength="3" @keyup.native="checkInteger(addMsg,'StayDay')">
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="国家">
<el-input type="text" v-model="addMsg.linkUrl">
</el-input>
<el-select v-model="addMsg.CountryId">
<el-option v-for="subItem in CountryList" :key="subItem.ID" :label="subItem.Name" :value="subItem.ID">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="办证费用">
<el-input type="text" v-model="addMsg.DoFei">
</el-input>
<el-input type="text" v-model="addMsg.Fee" maxlength="8" @keyup.native="checkPrice(addMsg,'Fee')">
</el-input>
</el-form-item>
<el-form-item label="证件效期">
<el-input type="text" v-model="addMsg.validityDate">
</el-input>
<el-input type="text" v-model="addMsg.Validity" maxlength="20">
</el-input>
</el-form-item>
<el-form-item label="注意事项">
<el-input type="textarea" v-model="addMsg.attention" :rows="4">
</el-input>
<el-input type="textarea" v-model="addMsg.Notice" :rows="4">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<button class="normalBtn" type="primary" @click="submitForm('addMsg')">{{$t('pub.saveBtn')}}</button> &nbsp;
<button class="hollowFixedBtn"
@click="outerVisible = false">{{$t('pub.cancelBtn')}}</button>
<button class="hollowFixedBtn" @click="outerVisible = false">{{$t('pub.cancelBtn')}}</button>
</div>
</el-dialog>
</div>
......@@ -113,8 +115,9 @@
export default {
data() {
return {
loading: false,
msg: {
name: '', //名称
Name: '', //名称
pageSize: 15,
pageIndex: 1,
},
......@@ -122,35 +125,55 @@
currentPage: 1,
//弹窗
outerVisible: false,
dataList: [{
certificateName: '台胞卡(新办)', //证件名称
country: '中国', //国家
DoFei: '1400元', //办件费用
guestFei: '1500元', //直客费用
validityDate: '10年', //证件效期
stayDays: '60天', //可停留天数
workDays:'7天', //工作天
isShowBefore:1 //前台显示
}],
addMsg:{
certificateName:'', //证件名称
country:'', //国家
workDays:'', //工作天
DoFei:'', //办证费用
guestFei:'', //直客费用
validityDate:'', // 证件效期
stayDays:'', //可停留天数
attention:'' //注意事项
dataList: [],
addMsg: {
Id: 0, //编号
CertificateName: '', //证件名称
CountryId: 0, //国家
WorkDay: 7, //工作天
Fee: 0, //办证费用
B2CFee: 0, //直客费用
Validity: '', // 证件效期
StayDay: 7, //可停留天数
Notice: '' //注意事项
},
CountryList: [], //国家列表
}
},
mounted() {
this.getCountry();
this.getData();
},
methods: {
//获取配置
//获取国家列表
getCountry() {
this.apipost(
"dict_post_Destination_GetCountry", {},
res => {
if (res.data.resultCode == 1) {
this.CountryList = res.data.data;
}
},
err => {}
);
},
//获取护照签证列表
getData() {
this.loading = true;
this.apipost(
"ws_get_GetCertificatePageList",
this.msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count
} else {
this.loading = false;
}
},
err => {}
);
},
handleCurrentChange(val) {
//翻页功能按钮
......@@ -162,17 +185,97 @@
this.msg.pageIndex = 1;
this.currentPage = 1;
},
//更新页面显示状态
UpdateIsShowBefore(item) {
this.apipost(
"ws_post_UpdateCertificateIsShowBefore", {
Id: item.Id,
IsShowBefore: item.IsShowBefore
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getData();
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//修改
updateData(index) {
updateData(item) {
this.apipost(
"ws_get_GetCertificate", {
Id: item.Id,
},
res => {
if (res.data.resultCode == 1) {
var tempData = res.data.data;
this.addMsg.Id = tempData.Id;
this.addMsg.CertificateName = tempData.CertificateName;
this.addMsg.CountryId = tempData.CountryId;
this.addMsg.WorkDay = tempData.WorkDay;
this.addMsg.Fee = tempData.Fee;
this.addMsg.B2CFee = tempData.B2CFee;
this.addMsg.Validity = tempData.Validity;
this.addMsg.StayDay = tempData.StayDay;
this.addMsg.Notice = tempData.Notice;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
//删除
deletelist(index) {
deleteData(item) {
var that = this;
that.Confirm("是否删除?", function () {
that.apipost(
"ws_post_RemoveCertificate", {
Id: item.Id
},
res => {
if (res.data.resultCode == 1) {
that.Success(res.data.message);
that.getData();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
//清空数据
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.CertificateName = "";
this.addMsg.CountryId = 0;
this.addMsg.WorkDay = 7;
this.addMsg.Fee = 0;
this.addMsg.B2CFee = 0;
this.addMsg.Validity = '';
this.addMsg.StayDay = 7;
this.addMsg.Notice = '';
},
//新增
submitForm(addMsg){
submitForm(addMsg) {
this.apipost(
"ws_post_SetCertificate", this.addMsg,
res => {
if (res.data.resultCode == 1) {
this.getData();
this.clearMsg();
this.Success(res.data.message);
this.outerVisible = false;
} else {
this.Error(res.data.message);
}
},
err => {}
);
},
}
}
......
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