commit
This commit is contained in:
@@ -92,6 +92,7 @@ layout("/layouts/platform.html"){
|
||||
<!-- <el-input v-model="row.userName" maxlength="10" size="small"></el-input>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证号" prop="idcard" width="200"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName" show-overflow-tooltip width="150">
|
||||
<!-- <template scope="{row}">-->
|
||||
<!-- <el-input v-model="row.unitName" maxlength="10" size="small"></el-input>-->
|
||||
@@ -239,8 +240,8 @@ layout("/layouts/platform.html"){
|
||||
async doImport() {
|
||||
const hasErrorData = this.tableData.some(v => !v.valid)
|
||||
if (hasErrorData) {
|
||||
// this.notifyWarning('数据校验不合格,无法导入')
|
||||
// return
|
||||
this.notifyWarning('数据校验不合格,无法导入')
|
||||
return
|
||||
}
|
||||
const resp = await $.post('/platform/sickHelp/import/doImport', {sickHelps: JSON.stringify(this.tableData)})
|
||||
if (resp.code === 0) {
|
||||
@@ -248,6 +249,8 @@ layout("/layouts/platform.html"){
|
||||
this.globalYear = null
|
||||
this.notifySuccess(resp.msg)
|
||||
this.$refs.excelUpload.clearFiles()
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
globalYearChange(val) {
|
||||
|
||||
@@ -76,41 +76,46 @@ layout("/layouts/platform.html"){
|
||||
<vi-title2 title="填写补助数据"></vi-title2>
|
||||
|
||||
<el-row>
|
||||
<el-col :lg="8" :xs="24">
|
||||
<el-col :lg="6" :xs="24">
|
||||
<el-form-item label="工号" prop="loginName">
|
||||
<el-select :disabled="formDisabled"
|
||||
:remote-method="searchUser"
|
||||
@change="userChange"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="输入工号或者姓名查询"
|
||||
placeholder="输入工号、姓名或身份证号查询"
|
||||
remote
|
||||
reserve-keyword
|
||||
style="width: 100%"
|
||||
v-model="formData.loginName">
|
||||
<el-option
|
||||
:key="item.loginName"
|
||||
:label="item.userName+'('+item.loginName+')'"
|
||||
:label="item.userName+'('+item.loginName+') '+(item.effectiveIdcard || '')"
|
||||
:value="item.loginName"
|
||||
v-for="item in userList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :xs="24">
|
||||
<el-col :lg="6" :xs="24">
|
||||
<el-form-item label="姓名" prop="userName">
|
||||
<el-input :disabled="!this.formData.id"
|
||||
placeholder="输入工号之后自动显示"
|
||||
v-model="formData.userName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :xs="24">
|
||||
<el-col :lg="6" :xs="24">
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input placeholder="选择工号之后自动显示" readonly
|
||||
v-model="formData.idcard"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="6" :xs="24">
|
||||
<el-form-item label="单位" prop="unitName">
|
||||
<el-input placeholder="输入工号之后自动显示"
|
||||
v-model="formData.unitName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
@@ -337,6 +342,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'subsidyDesc', resp_data.subsidyDesc)
|
||||
this.$set(this.formData, 'subsidyMoney', resp_data.subsidyMoney)
|
||||
this.$set(this.formData, 'unitName', resp_data.unitName)
|
||||
this.$set(this.formData, 'idcard', resp_data.idcard)
|
||||
this.notifySuccess(resp_data.validMsg.join('、'))
|
||||
} else {
|
||||
this.notifyWarning(resp_data.validMsg.join('、'))
|
||||
@@ -376,6 +382,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'userName', user.userName)
|
||||
this.$set(this.formData, 'unitName', user.unitName)
|
||||
this.$set(this.formData, 'loginName', user.loginName)
|
||||
this.$set(this.formData, 'idcard', user.effectiveIdcard)
|
||||
await this.getHistoryApplyRecords(user.loginName, this.formData.year)
|
||||
},
|
||||
async getHistoryApplyRecords(loginName, year) {
|
||||
@@ -401,6 +408,8 @@ layout("/layouts/platform.html"){
|
||||
await this.searchUser(loginName)
|
||||
resp.data.year = resp.data.year.toString()
|
||||
this.formData = resp.data
|
||||
const user = this.userList.find(v => v.loginName === loginName)
|
||||
this.$set(this.formData, 'idcard', user ? user.effectiveIdcard : null)
|
||||
await this.getHistoryApplyRecords(loginName, this.formData.year)
|
||||
}
|
||||
},
|
||||
@@ -412,4 +421,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -45,7 +45,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">补助人:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input clearable maxlength="10" placeholder="可输入补助人的工号或姓名进行查询"
|
||||
<el-input clearable maxlength="50" placeholder="可输入补助人的工号、姓名或身份证号进行查询"
|
||||
v-model.trim="pageForm.subsidyUser"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,6 +269,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'year', label: '年度', sortable: true, fixed: 'left'},
|
||||
{prop: 'userName', label: '姓名', fixed: 'left'},
|
||||
{prop: 'loginName', label: '工号', fixed: 'left', width: 120},
|
||||
{prop: 'idcard', label: '身份证号', fixed: 'left', width: 200},
|
||||
{prop: 'unionName', label: '分工会', sortable: true, width: 150},
|
||||
{prop: 'unitName', label: '单位', sortable: true, width: 150},
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ layout("/layouts/platform.html"){
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
:formatter="column.prop === 'calc' ? formatCalc : undefined"
|
||||
align="center"
|
||||
header-align="center"
|
||||
:fixed="column.fixed"
|
||||
@@ -246,6 +247,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 补助金额未写入时仅在列表显示 0,保留数据库原值供其他流程判断。
|
||||
formatCalc(row, column, value) {
|
||||
return value == null ? 0 : value
|
||||
},
|
||||
openEc() {
|
||||
$.post('/platform/sickHelp/medicalIns/checkIns').then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -283,7 +288,7 @@ layout("/layouts/platform.html"){
|
||||
$.post(loc() + '/checkEc').then(res => {
|
||||
if (res.code === 0) {
|
||||
|
||||
this.$confirm('计算补助金额将会自动过滤掉补助计算金额小于10000元的记录, 是否继续?', '提示', {
|
||||
this.$confirm('计算补助金额将会自动过滤掉补助计算金额不超过10000元的记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
||||
@@ -100,6 +100,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'sex', label: '性别'},
|
||||
{prop: 'idcard', label: '身份证号'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'userState', label: '状态'},
|
||||
{prop: 'mutualGoldStartTime', label: '入会时间'},
|
||||
@@ -163,4 +164,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -24,9 +24,9 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">工号姓名:</div>
|
||||
<div class="search-item-label">会员信息:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input clearable maxlength="10" placeholder="可输入会员的工号或姓名进行查询"
|
||||
<el-input clearable maxlength="50" placeholder="可输入会员的工号、姓名或身份证号进行查询"
|
||||
v-model.trim="pageForm.keyWord"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
@@ -147,6 +147,10 @@ layout("/layouts/platform.html"){
|
||||
<el-radio-button label="女"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input @input="$refs.form.validateField('idcard')" maxlength="18"
|
||||
v-model.trim="formData.idcard"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="单位" prop="unitId">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
@@ -194,6 +198,20 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const idcardPattern = /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
||||
|
||||
const validateIdcard = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback()
|
||||
return
|
||||
}
|
||||
if (!idcardPattern.test(value)) {
|
||||
callback(new Error('请输入正确的身份证号'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -215,6 +233,7 @@ layout("/layouts/platform.html"){
|
||||
loginName: [{required: true, message: '请输入工号', trigger: ['change', 'blur']}],
|
||||
userName: [{required: true, message: '请输入姓名', trigger: ['change', 'blur']}],
|
||||
// sex: [{required: true, message: '请选择性别', trigger: ['change', 'blur']}],
|
||||
idcard: [{validator: validateIdcard, trigger: ['change', 'blur']}],
|
||||
unitName: [{required: false, message: '请输入单位', trigger: ['change', 'blur']}],
|
||||
unitId: [{required: true, message: '请选择单位', trigger: ['change', 'blur']}],
|
||||
isMember: [{required: true, message: '请选择是否会员', trigger: ['change', 'blur']}],
|
||||
@@ -230,6 +249,7 @@ layout("/layouts/platform.html"){
|
||||
userName: null,
|
||||
loginName: null,
|
||||
sex: null,
|
||||
idcard: null,
|
||||
unitName: null,
|
||||
unitId: null,
|
||||
isMember: null,
|
||||
@@ -302,6 +322,12 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
async doHandle() {
|
||||
const idcard = (this.formData.idcard || '').trim()
|
||||
if (idcard && !idcardPattern.test(idcard)) {
|
||||
this.notifyWarning('请输入正确的身份证号')
|
||||
return
|
||||
}
|
||||
this.$set(this.formData, 'idcard', idcard || null)
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
const url = this.formData.id ? '/doEdit' : '/doAdd'
|
||||
|
||||
Reference in New Issue
Block a user