commit
This commit is contained in:
+158
@@ -0,0 +1,158 @@
|
||||
const CONDITION_STRUCTURE_DIALOG = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="高级查询构造器"
|
||||
width="50%"
|
||||
>
|
||||
<div class="process-title">过滤条件匹配</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20">
|
||||
<el-select v-model="formData.method" placeholder="请选择匹配方式" style="width: 100%">
|
||||
<el-option label="AND(所有条件都要求匹配)" value="AND"></el-option>
|
||||
<el-option label="OR(条件中的任意一个匹配)" value="OR"></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="formData.conditions.push({})">添加条件
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" v-for="(cnd,idx) in formData.conditions" :key="idx" style="margin-top: 20px">
|
||||
<el-col :span="2">
|
||||
<el-tag>条件{{idx+1}}</el-tag>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-select v-model="cnd.field" placeholder="请选择字段" style="width: 100%"
|
||||
@change="(v)=>fieldChange(v,cnd)">
|
||||
<el-option
|
||||
v-for="item in fields"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="cnd.operational" placeholder="请选择" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in operationalOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-date-picker
|
||||
v-if="cnd.fieldObj&&cnd.fieldObj.type=='date'"
|
||||
v-model="cnd.value"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择日期" style="width: 100%">
|
||||
</el-date-picker>
|
||||
|
||||
|
||||
<el-select v-else-if="cnd.fieldObj&&cnd.fieldObj.type=='select'" v-model="cnd.value"
|
||||
placeholder="请选择值"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in cnd.fieldObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-input v-else v-model="cnd.value" clearable placeholder="请输入值"
|
||||
style="width: 100%"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="danger" icon="el-icon-minus" @click="formData.conditions.splice(idx, 1)">
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<span slot="footer">
|
||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确 认</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
formData: {
|
||||
method: "",
|
||||
conditions: []
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
"label": "性别",
|
||||
"value": "sex",
|
||||
"type": "select",
|
||||
"options": [{"value": "男", "label": "男"}, {"value": "女", "label": "女"}]
|
||||
},
|
||||
{
|
||||
"label": "出生日期",
|
||||
"value": "birthday",
|
||||
"type": "date",
|
||||
},
|
||||
{
|
||||
"label": "婚姻状况",
|
||||
"value": "marriage",
|
||||
"type": "select",
|
||||
"options": [{"value": "未婚", "label": "未婚"}, {"value": "已婚", "label": "已婚"}]
|
||||
}
|
||||
],
|
||||
operationalOption: [
|
||||
{"label": "等于(=)", "value": "="},
|
||||
{"label": "不等于(!=)", "value": "!="},
|
||||
{"label": "小于(<)", "value": "<"},
|
||||
{"label": "小于等于(<=)", "value": "<="},
|
||||
{"label": "大于(>)", "value": ">"},
|
||||
{"label": "大于等于(>=)", "value": ">="},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(formData) {
|
||||
console.log(formData)
|
||||
if (formData) {
|
||||
this.formData = formData
|
||||
}else{
|
||||
this.formData = {
|
||||
method: "",
|
||||
conditions: []
|
||||
}
|
||||
}
|
||||
this.dialogVisible = true
|
||||
this.$forceUpdate()
|
||||
},
|
||||
fieldChange(val, cnd) {
|
||||
this.$set(cnd, "fieldObj", this.fields.find(v => v.value === val))
|
||||
this.$set(cnd, "value", null)
|
||||
this.$forceUpdate()
|
||||
|
||||
},
|
||||
doSubmit() {
|
||||
if (!this.formData.method) {
|
||||
this.$message.error("请选择匹配方式")
|
||||
return
|
||||
}
|
||||
if (this.formData.conditions.length === 0) {
|
||||
this.$message.error("请添加条件")
|
||||
return
|
||||
}
|
||||
if (this.formData.conditions.some(v => !v.field || !v.operational || !v.value)) {
|
||||
this.$message.error("请填写完整条件")
|
||||
return
|
||||
}
|
||||
this.$emit("confirm", this.formData)
|
||||
this.dialogVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
-9
@@ -146,14 +146,19 @@ layout("/layouts/platform.html"){
|
||||
:label="item.optionName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="院区"
|
||||
prop="campus"
|
||||
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
|
||||
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
|
||||
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
|
||||
:label="item.campusName"></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="备注"
|
||||
prop="bz">
|
||||
<el-input v-model="editHealthCheckupData.bz" type="textarea" rows="5"
|
||||
placeholder="请输入备注"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="院区"
|
||||
prop="campus"
|
||||
:rules="[{required:true,message:'请选择',trigger:['change','blur']}]">
|
||||
<el-select v-model="editHealthCheckupData.campus" style="width: 100%">
|
||||
<el-option v-for="item in campusOptions" :key="item.id" :value="item.id"
|
||||
:label="item.campusName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="exportHealthCheckupDialog=false" type="primary" plain>取消</el-button>
|
||||
@@ -197,10 +202,10 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'unionName', label: '所属工会', sortable: true},
|
||||
{prop: 'unitName', label: '所属单位', sortable: true},
|
||||
{prop: 'optionName', label: '所选套餐'},
|
||||
{prop: 'campusName', label: '所选院区'},
|
||||
{prop: 'selectTime', label: '选择时间', width: "160px"},
|
||||
{prop: 'isAudit', label: '是否确认'},
|
||||
{prop: 'auditTime', label: '确认时间'},
|
||||
{prop: 'bz', label: '备注',width: "200px"},
|
||||
],
|
||||
exportHealthCheckupDialog: false,
|
||||
editHealthCheckupData: {},
|
||||
@@ -225,7 +230,7 @@ layout("/layouts/platform.html"){
|
||||
this.notifyWarning("当前分工会没有名单,暂不需要提交")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm(flag?'您确定名单都已核实,准确无误?':'您确定取消确认?', '提示', {
|
||||
const confirm = await this.$confirm(flag ? '您确定名单都已核实,准确无误?' : '您确定取消确认?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
|
||||
+156
-74
@@ -131,26 +131,7 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="activityGroupId" label="可报名人员范围">
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<div style="width: 99%">
|
||||
<el-select prop="activityGroupId" placeholder="参加人员范围"
|
||||
v-model="formData.activityGroupId"
|
||||
style="width: 99%;"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in activityGroupList"
|
||||
:label="item.groupName"
|
||||
:value="item.groupId"
|
||||
:key="item.groupId"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
@click="$refs.drawerUserScope.userScopeDialog = true"
|
||||
type="primary">设置
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<permission-group :value.sync="formData.activityGroupId"></permission-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@@ -163,79 +144,98 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="体检套餐" prop="healthCheckupProjectSubjects">
|
||||
<el-card shadow="hover">
|
||||
<el-card shadow="hover" v-for="(item,index) in formData.healthCheckupProjectSubjects"
|
||||
:key="index">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
医院名称:
|
||||
<el-input v-model="item.optionName"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
排序:
|
||||
<el-input v-model="item.optionSort"></el-input>
|
||||
</el-col>
|
||||
<!--<el-col :span="4">
|
||||
封面图<file-upload :upload_number="1" :value.sync="item.imgUrl"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
class="imgUrl"
|
||||
upload_result_type="url"
|
||||
complete_result upload_mode="file"></file-upload>
|
||||
</el-col>-->
|
||||
<el-col :span="4">
|
||||
编辑说明:
|
||||
<div>
|
||||
<el-button type="primary" size="small"
|
||||
@click="openDescRichText(item.description,index)">编辑说明
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
操作:
|
||||
<div>
|
||||
<el-button type="danger" size="small"
|
||||
:disabled="formData.healthCheckupProjectSubjects.length===1"
|
||||
@click="deleteSubject(item,index)">删除
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div class="s-options-list" style="margin-top: 10px;">
|
||||
<el-table :data="formData.healthCheckupProjectSubjects" border>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="套餐名称">
|
||||
<el-table :data="item.subjectMoneys" border size="small">
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.optionName" autosize
|
||||
<el-input v-model="row.subjectMoneyName" autosize
|
||||
class="text-input"
|
||||
data-type="option"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="排序">
|
||||
<el-table-column label="金额">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.optionSort" autosize
|
||||
<el-input v-model="row.money" autosize
|
||||
class="text-input"
|
||||
data-type="option"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="图片" width="130px">
|
||||
<template slot-scope="{row,$index}">
|
||||
<file-upload :upload_number="1" :value.sync="row.imgUrl"
|
||||
accept=".jpg,.jpeg,.png"
|
||||
class="imgUrl"
|
||||
upload_result_type="url"
|
||||
complete_result upload_mode="file"></file-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
header-align="center"
|
||||
label="说明">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-link type="primary"
|
||||
@click="openDescRichText(row.description,$index)">
|
||||
编辑说明
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="操作"
|
||||
width="100px">
|
||||
<el-table-column label="操作" width="200px">
|
||||
<template slot-scope="{row,$index}" slot="header">
|
||||
<el-button size="mini" type="primary"
|
||||
@click="item.subjectMoneys.push({
|
||||
money:'',
|
||||
subjectMoneyName:'',
|
||||
marriage:'',
|
||||
})">添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot-scope="{row,$index}">
|
||||
<div class="option-delete">
|
||||
<el-button circle
|
||||
icon="el-icon-delete"
|
||||
size="mini" type="danger"
|
||||
@click="deleteRow(row,$index)"></el-button>
|
||||
<el-button size="mini" type="primary"
|
||||
@click="openCnd(row,$index,index)">设置可选条件
|
||||
</el-button>
|
||||
<el-button size="mini" type="danger"
|
||||
@click="deleteRow(row,$index,index)">删除
|
||||
</el-button>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="s-operation">
|
||||
<el-button size="small" type="primary"
|
||||
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),optionSort:formData.healthCheckupProjectSubjects.length+1,imgUrl:null})">
|
||||
添加项目
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<div class="s-operation">
|
||||
<el-button size="small" type="primary"
|
||||
@click="formData.healthCheckupProjectSubjects.push({optionNameId:'',
|
||||
optionName:'套餐'+(formData.healthCheckupProjectSubjects.length+1),
|
||||
optionSort:formData.healthCheckupProjectSubjects.length+1,
|
||||
imgUrl:null,
|
||||
subjectMoneys:[]})">
|
||||
添加医院
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="项目封面" prop="cover">
|
||||
@@ -303,7 +303,7 @@ layout("/layouts/platform.html"){
|
||||
:close-on-click-modal="false"
|
||||
width="30%">
|
||||
<div style=" display: flex;justify-content: center;">
|
||||
<qrcode :options="{ width: 400 }" :value="activityUrl" ></qrcode>
|
||||
<qrcode :options="{ width: 400 }" :value="activityUrl"></qrcode>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="codeDialogVisible = false" type="primary">关 闭</el-button>
|
||||
@@ -330,9 +330,32 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="subjectMoneyDialog"
|
||||
title="套餐"
|
||||
width="50%"
|
||||
>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<condition-structure-dialog ref="conditionStructureDialog" @confirm="addCondition"></condition-structure-dialog>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="conditionStructureDialogVisible" title="条件构造器">
|
||||
<condition-group :group="conditionGroup" :field_options="fieldOptions"
|
||||
@remove="removeRootGroup"></condition-group>
|
||||
<div slot="footer">
|
||||
<el-button @click="conditionStructureDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmCnd">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("../common/ConditionStructure.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
@@ -374,10 +397,37 @@ layout("/layouts/platform.html"){
|
||||
description: "",
|
||||
codeDialogVisible: false,
|
||||
activityUrl: '',
|
||||
|
||||
rowData: {},
|
||||
subjectRowData: {},
|
||||
subjectMoneyDialog: false,
|
||||
subjectMoneyIndex: null,
|
||||
hospitalIndex: null,
|
||||
deleteSubjectIds: {},
|
||||
|
||||
// 条件构造器相关
|
||||
conditionStructureDialogVisible: false,
|
||||
// 可选字段列表
|
||||
fieldOptions: [
|
||||
{label: "姓名", value: "username"},
|
||||
{label: "工号", value: "loginname"},
|
||||
{label: "性别", value: "sex"},
|
||||
{label: "年龄", value: "age"},
|
||||
{label: "婚姻状况", value: "marriage"},
|
||||
{label: "在职状态", value: "userState"},
|
||||
{label: "编制类别", value: "preparedBy"},
|
||||
{label: "教职工类别", value: "personType"},
|
||||
],
|
||||
conditionGroup: {
|
||||
logic: "AND",
|
||||
conditions: [],
|
||||
groups: []
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"drawer-user-scope": httpVueLoader("/components/module/activity/DrawerUserScope.vue"),
|
||||
"condition-structure-dialog": CONDITION_STRUCTURE_DIALOG
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
@@ -398,6 +448,31 @@ layout("/layouts/platform.html"){
|
||||
this.openCode(data.id)
|
||||
}
|
||||
},
|
||||
openAddSubjectMoney(row, index) {
|
||||
row.index = index
|
||||
this.subjectRowData = row
|
||||
this.subjectMoneyDialog = true
|
||||
},
|
||||
addCondition(val) {
|
||||
this.$set(this.formData.healthCheckupProjectSubjects[this.subjectMoneyIndex].subjectMoneys[this.rowData.index], 'matchCnd', val)
|
||||
},
|
||||
openCnd(row, subjectIndex, hospitalIndex) {
|
||||
this.rowData = row
|
||||
this.subjectMoneyIndex = subjectIndex
|
||||
this.hospitalIndex = hospitalIndex
|
||||
this.conditionStructureDialogVisible = true
|
||||
if(row.matchCnd){
|
||||
this.conditionGroup = row.matchCnd
|
||||
}
|
||||
// this.$refs.conditionStructureDialog.onOpen(row.matchCnd ? row.matchCnd : null)
|
||||
},
|
||||
|
||||
// 条件构造器确认
|
||||
confirmCnd(){
|
||||
this.conditionStructureDialogVisible = false
|
||||
this.$set(this.formData.healthCheckupProjectSubjects[this.hospitalIndex].subjectMoneys[this.subjectMoneyIndex], 'matchCnd', this.conditionGroup)
|
||||
},
|
||||
|
||||
async createUserList(row) {
|
||||
const msg = '您确定要生成【' + row.name + '】体检名单吗?(该名单生成是按照创建时选择的可报名人员范围来生成)'
|
||||
const confirm = await this.$confirm(msg, '提示', {
|
||||
@@ -475,8 +550,13 @@ layout("/layouts/platform.html"){
|
||||
this.codeDialogVisible = true
|
||||
},
|
||||
|
||||
deleteRow(row, index) {
|
||||
deleteSubject(row, index) {
|
||||
this.formData.healthCheckupProjectSubjects.splice(index, 1)
|
||||
if (row.id) this.deleteSubjectIds.push(row.id)
|
||||
},
|
||||
|
||||
deleteRow(row, index, subjectMoneyIndex) {
|
||||
this.formData.healthCheckupProjectSubjects[subjectMoneyIndex].subjectMoneys.splice(index, 1)
|
||||
if (row.id) this.deleteRowIds.push(row.id)
|
||||
},
|
||||
async doDelete(id) {
|
||||
@@ -523,19 +603,20 @@ layout("/layouts/platform.html"){
|
||||
formData.healthCheckupProjectSubjects = JSON.stringify(this.formData.healthCheckupProjectSubjects)
|
||||
formData.activityGroupName = this.activityGroupList.find(v => v.groupId === this.formData.activityGroupId).groupName
|
||||
formData.deleteRowIds = JSON.stringify(this.deleteRowIds)
|
||||
formData.deleteSubjectIds = JSON.stringify(this.deleteSubjectIds)
|
||||
const resp = await $.post(loc() + "/doAdd", formData)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.deleteRowIds = []
|
||||
this.deleteSubjectIds = []
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
openAdd() {
|
||||
|
||||
this.formData = {
|
||||
name: null,
|
||||
activityGroupId: null,
|
||||
@@ -545,7 +626,8 @@ layout("/layouts/platform.html"){
|
||||
optionName: '套餐1',
|
||||
optionNameId: '',
|
||||
optionSort: '1',
|
||||
imgUrl: ''
|
||||
imgUrl: '',
|
||||
subjectMoneys: []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+38
-10
@@ -19,7 +19,7 @@ layout("/layouts/platform.html"){
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="年度">
|
||||
<search-item label="体检项目">
|
||||
<el-select @change="getHealthCheckupSubject();"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.projectId">
|
||||
@@ -68,11 +68,17 @@ layout("/layouts/platform.html"){
|
||||
type="primary"
|
||||
v-if="projectInfo.healthCheckupType==='jzg'">导出教职工未选名单
|
||||
</el-button>
|
||||
<el-button @click="selectOptionByAdmin"
|
||||
<!-- <el-button @click="selectOptionByAdmin"
|
||||
icon="el-icon-printer"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
|
||||
</el-button>-->
|
||||
<el-button @click="selectOptionByLastYear"
|
||||
icon="el-icon-printer"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">管理员代选择
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN', 'SCHOOL_UNION_ADMIN'])">一键选择去年数据
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -260,7 +266,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
const {optionName} = this.projectSubjectOptions.find(v => v.id === this.noSelectOptionId)
|
||||
|
||||
const confirm = await this.$confirm('请确定是否把【' + optionName + '】福利赋给未选择的教职工?', '提示', {
|
||||
const confirm = await this.$confirm('请确定是否把【' + optionName + '】套餐赋给未选择的教职工?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -273,18 +279,40 @@ layout("/layouts/platform.html"){
|
||||
projectId: this.pageForm.projectId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(()=>{
|
||||
this.doSearch()
|
||||
this.loading = false
|
||||
this.selectByAdminDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
},2000)
|
||||
setTimeout(() => {
|
||||
this.doSearch()
|
||||
this.loading = false
|
||||
this.selectByAdminDialogVisible = false
|
||||
this.notifySuccess(resp.msg)
|
||||
}, 2000)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
async selectOptionByLastYear() {
|
||||
const confirm = await this.$confirm('请确定是否把没有选择的教职工统一选择去年的数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.loading = true
|
||||
const resp = await $.get(loc() + '/selectOptionByLastYear', {
|
||||
projectId: this.pageForm.projectId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.doSearch()
|
||||
this.loading = false
|
||||
this.notifySuccess(resp.msg)
|
||||
}, 2000)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
selectOptionByAdmin() {
|
||||
this.noSelectOptionId = null
|
||||
this.selectByAdminDialogVisible = true
|
||||
|
||||
+3
-3
@@ -91,7 +91,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-image
|
||||
height="76"
|
||||
radius="8"
|
||||
:src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+row.cover"
|
||||
:src="row.cover"
|
||||
width="100"
|
||||
fit="cover">
|
||||
<template #loading>
|
||||
@@ -162,13 +162,13 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
if(row.selectCount > 0) {
|
||||
/* if(row.selectCount > 0) {
|
||||
vant.Dialog.alert({
|
||||
title: '温馨提示',
|
||||
message: '此项活动您已选择',
|
||||
})
|
||||
return
|
||||
}
|
||||
}*/
|
||||
// 检查项目是否已结束
|
||||
const now = new Date();
|
||||
const endTime = new Date(row.choiceTimeEnd);
|
||||
|
||||
+108
-36
@@ -3,7 +3,32 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
<van-action-sheet v-model="visible" title="体检套餐选择">
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef" @submit="doSubmit">
|
||||
<van-cell-group title="体检套餐">
|
||||
<van-cell-group title="基础信息">
|
||||
<van-field
|
||||
input-align="right"
|
||||
label="身份证号"
|
||||
name="idCard"
|
||||
readonly
|
||||
required
|
||||
placeholder="请选择身份证号"
|
||||
v-model="formData.idCard"
|
||||
:rules="[{ required: true, message: '请输入身份证号' }]">
|
||||
</van-field>
|
||||
<van-cell title="人员类型">{{formData.userState}}</van-cell>
|
||||
<van-field
|
||||
input-align="right"
|
||||
readonly
|
||||
required
|
||||
label="婚姻状况"
|
||||
name="marriage"
|
||||
placeholder="请联系校工会补充婚姻状况"
|
||||
v-model="formData.marriage"
|
||||
:rules="[{ required: true, message: '请选择婚姻状况' }]"></van-field>
|
||||
|
||||
<van-cell title="出生年月">{{$moment(formData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="单位">{{formData.unitName}}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="本年度预约体检医院">
|
||||
<div class="van-card-body">
|
||||
<van-radio-group v-model="formData.subjectId" class="basic">
|
||||
<van-cell-group>
|
||||
@@ -14,43 +39,53 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
<template #label>
|
||||
<div style="display: flex; justify-content: space-between; margin-left: 8px">
|
||||
<div>{{ item.optionName }}</div>
|
||||
<div @click="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
||||
<div @click.stop="viewDesc(item)" style="color: #0e78c5">查看说明</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #right-icon>
|
||||
<van-radio :name="item.id"></van-radio>
|
||||
<van-radio :name="item.id" @click.stop="clickRadio(item)"></van-radio>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
</div>
|
||||
<van-field
|
||||
input-align="right"
|
||||
readonly
|
||||
required
|
||||
label="所选医院额度"
|
||||
name="marriage"
|
||||
placeholder="请选择医院"
|
||||
v-model="formData.money"
|
||||
:rules="[{ required: true, message: '请选择医院' }]"></van-field>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="基础信息">
|
||||
<div class="van-card-body">
|
||||
<van-field
|
||||
@click="campusVisible = true"
|
||||
readonly
|
||||
is-link
|
||||
label="院区"
|
||||
name="campus"
|
||||
placeholder="请选择体检院区"
|
||||
v-model="formData.campusName"
|
||||
:rules="[{ required: true, message: '请选择体检院区' }]">
|
||||
</van-field>
|
||||
<van-field
|
||||
:rules="[{ required: true, message: '请选择家属是否体检' }]"
|
||||
label="家属体检"
|
||||
name="isFamily">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.isFamily">
|
||||
<van-radio name="是" shape="square">是</van-radio>
|
||||
<van-radio name="否" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
<!-- <van-cell-group title="基础信息">
|
||||
<div class="van-card-body">
|
||||
<van-field
|
||||
@click="campusVisible = true"
|
||||
readonly
|
||||
is-link
|
||||
label="院区"
|
||||
name="campus"
|
||||
placeholder="请选择体检院区"
|
||||
v-model="formData.campusName"
|
||||
:rules="[{ required: true, message: '请选择体检院区' }]">
|
||||
</van-field>
|
||||
<van-field
|
||||
:rules="[{ required: true, message: '请选择家属是否体检' }]"
|
||||
label="家属体检"
|
||||
name="isFamily">
|
||||
<template #input>
|
||||
<van-radio-group direction="horizontal" v-model="formData.isFamily">
|
||||
<van-radio name="是" shape="square">是</van-radio>
|
||||
<van-radio name="否" shape="square">否</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<van-cell-group title="家属信息" v-if="formData.isFamily === '是'">
|
||||
<div style="padding: 10px;">
|
||||
@@ -158,7 +193,8 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
<div v-html="desc" class="pre_text"></div>
|
||||
</van-popup>
|
||||
</van-action-sheet>
|
||||
`, dicts: ["ASSET_USAGE_STATE"], data() {
|
||||
`
|
||||
, store, dicts: ["ASSET_USAGE_STATE"], data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
@@ -176,28 +212,57 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
campusVisible: false,
|
||||
descVisible: false,
|
||||
desc: '',
|
||||
project: {}
|
||||
project: {},
|
||||
|
||||
marriageList: ["已婚", "未婚"],
|
||||
marriageVisible: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开表单
|
||||
async onOpen(row) {
|
||||
this.formData = {}
|
||||
this.row = row;
|
||||
this.visible = true;
|
||||
await this.getCampus()
|
||||
await this.findSubject(row.projectId)
|
||||
if (row.projectId) {
|
||||
this.selectInfo(row);
|
||||
await this.selectInfo(row);
|
||||
const {idCard, userState, marriage, birthday, unit} = this.$store.state.user
|
||||
this.$set(this.formData, 'idCard', idCard)
|
||||
this.$set(this.formData, 'userState', userState)
|
||||
this.$set(this.formData, 'marriage', marriage)
|
||||
this.$set(this.formData, 'birthday', birthday)
|
||||
this.$set(this.formData, 'unitName', unit.name)
|
||||
}
|
||||
},
|
||||
|
||||
clickRadio(item) {
|
||||
const toast = this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true,
|
||||
message: '查询中....',
|
||||
});
|
||||
$.post("/platform/healthCheckup/h5/getSubjectMoney", {
|
||||
id: item.id,
|
||||
marriage: this.formData.marriage
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.$set(this.formData, 'subjectId', item.id)
|
||||
this.$set(this.formData, 'money', resp.data.money)
|
||||
this.$set(this.formData, 'subjectMoneyId', resp.data.subjectMoneyId)
|
||||
} else {
|
||||
this.$set(this.formData, 'money', 0)
|
||||
}
|
||||
toast.clear();
|
||||
})
|
||||
},
|
||||
async selectInfo(row) {
|
||||
//this.formData.projectId = row.projectId;
|
||||
const resp = await $.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId});
|
||||
if (resp.data !== null) {
|
||||
this.formData = resp.data;
|
||||
const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||
this.formData.campusName = o.campusName
|
||||
/* const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||
this.formData.campusName = o.campusName*/
|
||||
}
|
||||
},
|
||||
|
||||
@@ -221,12 +286,12 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
})
|
||||
const formData = clone(this.formData);
|
||||
formData.projectId = this.row.projectId;
|
||||
if (formData.isFamily === '否') {
|
||||
/* if (formData.isFamily === '否') {
|
||||
formData.companionList = [];
|
||||
} else {
|
||||
// 过滤空的家属信息
|
||||
formData.companionList = formData.companionList.filter(item => item.userName && item.userName.trim() !== '');
|
||||
}
|
||||
}*/
|
||||
|
||||
const resp = await $.post('/platform/healthCheckup/h5/doSubmit', {
|
||||
userSelection: JSON.stringify(formData),
|
||||
@@ -275,6 +340,13 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
this.campusVisible = false;
|
||||
},
|
||||
|
||||
// 婚姻状况确认
|
||||
onMarriageConfirm(value) {
|
||||
this.$set(this.formData, 'marriage', value)
|
||||
this.$set(this.formData, 'subjectId', null)
|
||||
this.marriageVisible = false;
|
||||
},
|
||||
|
||||
// 查询体检套餐
|
||||
async findSubject(id) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user