Commit db05e0b8 authored by 黄奎's avatar 黄奎

页面修改

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