bug整改
This commit is contained in:
@@ -3,149 +3,208 @@ layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
<van-nav-bar title="填写慰问申请" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
<van-form ref="addForm" :show-error-message="false" input-align="right" style="margin-bottom: 60px">
|
||||
<van-cell-group inset class="mt10">
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name"
|
||||
label="经办人姓名"></van-field>
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" name="manager_name"
|
||||
label="经办人工号"></van-field>
|
||||
<van-field @input="userRemoteMethod" name="be_user_name"
|
||||
required
|
||||
v-model="formData.be_user_name" label="慰问对象" placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"></van-field>
|
||||
<van-action-sheet v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []; formData.be_user_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect">
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time"
|
||||
label="申请时间"
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('username')}" name="manager_name" label="经办人姓名"></van-field>
|
||||
<van-field readonly value="${@shiro.getPrincipalProperty('loginname')}" name="manager_name" label="经办人工号"></van-field>
|
||||
<van-field
|
||||
@input="userRemoteMethod"
|
||||
name="be_user_name"
|
||||
required
|
||||
v-model="formData.be_user_name"
|
||||
label="慰问对象"
|
||||
placeholder="请输入慰问对象"
|
||||
:rules="[{ required: true, message: '请填写慰问对象' }]"
|
||||
></van-field>
|
||||
<van-action-sheet
|
||||
v-model="sheetShow"
|
||||
:actions="userList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="userList = []; formData.be_user_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="onUserSelect"
|
||||
></van-action-sheet>
|
||||
|
||||
<van-field readonly :value="formData.apply_time" name="apply_time" label="申请时间"></van-field>
|
||||
|
||||
<van-field @input="payeeUserRemoteMethod" name="payee_name"
|
||||
required :rules="[{ required: true, message: '请选择收款人' }]"
|
||||
v-model="formData.payee_name" label="收款人" placeholder="请输入收款人"></van-field>
|
||||
<van-action-sheet v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeUserList = []; formData.payee_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="payeeOnUserSelect">
|
||||
</van-action-sheet>
|
||||
<van-field
|
||||
@input="payeeUserRemoteMethod"
|
||||
name="payee_name"
|
||||
required
|
||||
:rules="[{ required: true, message: '请选择收款人' }]"
|
||||
v-model="formData.payee_name"
|
||||
label="收款人"
|
||||
placeholder="请输入收款人"
|
||||
></van-field>
|
||||
<van-action-sheet
|
||||
v-model="payeeSheetShow"
|
||||
:actions="payeeUserList"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
@cancel="payeeUserList = []; formData.payee_name = ''"
|
||||
:close-on-click-overlay="false"
|
||||
@select="payeeOnUserSelect"
|
||||
></van-action-sheet>
|
||||
<!--<van-field v-model="formData.payee_bank_number" name="payee_bank_number" type="number"
|
||||
label="收款人银行卡" placeholder="请输入收款人银行卡"></van-field>
|
||||
<van-field v-model="formData.payee_bank_name" name="payee_bank_name"
|
||||
label="收款人开户行" placeholder="请输入收款人开户行"></van-field>-->
|
||||
|
||||
|
||||
<van-field readonly clickable name="type" :value="formData.typeName"
|
||||
required
|
||||
label="慰问类型"
|
||||
@click="showTypePicker = true" placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"></van-field>
|
||||
<van-field
|
||||
readonly
|
||||
clickable
|
||||
name="type"
|
||||
:value="formData.typeName"
|
||||
required
|
||||
label="慰问类型"
|
||||
@click="showTypePicker = true"
|
||||
placeholder="点击选择慰问类型"
|
||||
:rules="[{ required:true, message: '请选择慰问类型'}]"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showTypePicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="typeColumns" @confirm="onTypeConfirm"
|
||||
@cancel="showTypePicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field readonly clickable name="way" :value="formData.wayName"
|
||||
label="慰问方式"
|
||||
required
|
||||
placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"></van-field>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="wayColumns" @confirm="onWayConfirm"
|
||||
@cancel="showWayPicker = false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.money" name="money" type="number" label="慰问金额"
|
||||
placeholder="请填写慰问金额"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"></van-field>
|
||||
|
||||
<!-- 孩次 -->
|
||||
<van-field readonly clickable name="type" v-model="formData.birth_child_num"
|
||||
required v-if="formData.type==='2'"
|
||||
label="孩次"
|
||||
@click="showChildPicker = true" placeholder="点击选择孩次"
|
||||
:rules="[{ required:true, message: '请选择孩次'}]"></van-field>
|
||||
<van-popup v-model:show="showChildPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="childColumns" @confirm="onChildConfirm"
|
||||
@cancel="showChildPicker = false">
|
||||
</van-picker>
|
||||
<van-picker show-toolbar :columns="typeColumns" @confirm="onTypeConfirm" @cancel="showTypePicker = false"></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写慰问时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="occur_time"
|
||||
:value="formData.occur_time"
|
||||
label="慰问时间"
|
||||
placeholder="点击选择慰问时间"
|
||||
@click="showOccurTime = true"
|
||||
readonly
|
||||
clickable
|
||||
name="way"
|
||||
:value="formData.wayName"
|
||||
label="慰问方式"
|
||||
required
|
||||
placeholder="点击选择慰问方式"
|
||||
:rules="[{ required:true, message: '请选择慰问方式'}]"
|
||||
></van-field>
|
||||
<van-calendar v-model="showOccurTime"
|
||||
@confirm="onOccurTimeConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:color="themeColor"></van-calendar>
|
||||
<van-popup v-model:show="showWayPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="wayColumns" @confirm="onWayConfirm" @cancel="showWayPicker = false"></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.money"
|
||||
name="money"
|
||||
type="number"
|
||||
label="慰问金额"
|
||||
placeholder="请填写慰问金额"
|
||||
:rules="[{ required:true, message: '请填写慰问金额' }]"
|
||||
></van-field>
|
||||
|
||||
<!-- 孩次 -->
|
||||
<van-field
|
||||
readonly
|
||||
clickable
|
||||
name="type"
|
||||
v-model="formData.birth_child_num"
|
||||
required
|
||||
v-if="formData.type==='2'"
|
||||
label="孩次"
|
||||
@click="showChildPicker = true"
|
||||
placeholder="点击选择孩次"
|
||||
:rules="[{ required:true, message: '请选择孩次'}]"
|
||||
></van-field>
|
||||
<van-popup v-model:show="showChildPicker" position="bottom" round>
|
||||
<van-picker show-toolbar :columns="childColumns" @confirm="onChildConfirm" @cancel="showChildPicker = false"></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写慰问时间' }]"
|
||||
readonly
|
||||
clickable
|
||||
name="occur_time"
|
||||
:value="formData.occur_time"
|
||||
label="慰问时间"
|
||||
placeholder="点击选择慰问时间"
|
||||
@click="showOccurTime = true"
|
||||
></van-field>
|
||||
<van-calendar
|
||||
v-model="showOccurTime"
|
||||
@confirm="onOccurTimeConfirm"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
:color="themeColor"
|
||||
></van-calendar>
|
||||
|
||||
<template v-if="['3','4'].includes(formData.type)">
|
||||
<van-field v-model="formData.the_hospital" name="the_hospital" label="治疗医院"
|
||||
placeholder="请填写治疗医院" required
|
||||
:rules="[{ required:true, message: '请填写治疗医院' }]"></van-field>
|
||||
<van-field v-model="formData.the_hospital_house_num" name="the_hospital_house_num" label="病房号"
|
||||
placeholder="请填写病房号" required
|
||||
:rules="[{ required:true, message: '请填写病房号' }]"></van-field>
|
||||
<van-field v-model="formData.the_hospital_house_bed_num" name="the_hospital_house_bed_num" label="床号"
|
||||
placeholder="请填写床号" required
|
||||
:rules="[{ required:true, message: '请填写床号' }]"></van-field>
|
||||
<van-field
|
||||
v-model="formData.the_hospital"
|
||||
name="the_hospital"
|
||||
label="治疗医院"
|
||||
placeholder="请填写治疗医院"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写治疗医院' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.the_hospital_house_num"
|
||||
name="the_hospital_house_num"
|
||||
label="病房号"
|
||||
placeholder="请填写病房号"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写病房号' }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.the_hospital_house_bed_num"
|
||||
name="the_hospital_house_bed_num"
|
||||
label="床号"
|
||||
placeholder="请填写床号"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写床号' }]"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="['4'].includes(formData.type)">
|
||||
<van-field v-model="formData.hospital_by" name="hospital_by" label="患病病种"
|
||||
placeholder="请填写患病病种" required
|
||||
:rules="[{ required:true, message: '请填写患病病种' }]"></van-field>
|
||||
<van-field
|
||||
v-model="formData.hospital_by"
|
||||
name="hospital_by"
|
||||
label="患病病种"
|
||||
placeholder="请填写患病病种"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写患病病种' }]"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<template v-if="['6'].includes(formData.type)">
|
||||
<van-field v-model="formData.deadImmediateFamily" name="deadImmediateFamily" label="直系亲属"
|
||||
placeholder="配偶、父亲、母亲、子女" required
|
||||
:rules="[{ required:true, message: '必填' }]"></van-field>
|
||||
<van-field
|
||||
v-model="formData.deadImmediateFamily"
|
||||
name="deadImmediateFamily"
|
||||
label="直系亲属"
|
||||
placeholder="配偶、父亲、母亲、子女"
|
||||
required
|
||||
:rules="[{ required:true, message: '必填' }]"
|
||||
></van-field>
|
||||
</template>
|
||||
|
||||
<!-- <template-->
|
||||
<!-- v-if="['c7175af55693441e8233be4552cef9d5','0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)">-->
|
||||
<!-- <van-field :value="formData.hospital_stay"-->
|
||||
<!-- readonly clickable required-->
|
||||
<!-- @click="hospital_stay = true"-->
|
||||
<!-- name="hospital_stay" label="住院时间"-->
|
||||
<!-- placeholder="请选择住院时间"-->
|
||||
<!-- :rules="[{ required:true, message: '请选择住院时间' }]"></van-field>-->
|
||||
<!-- <van-calendar v-model="hospital_stay" type="range" @confirm="onConfirm"-->
|
||||
<!-- :min-date="new Date('1999-01-01')"-->
|
||||
<!-- :color="themeColor"></van-calendar>-->
|
||||
<!-- <template-->
|
||||
<!-- v-if="['c7175af55693441e8233be4552cef9d5','0872ea0b95aa463fb8d98c46bdf72537'].includes(formData.type)">-->
|
||||
<!-- <van-field :value="formData.hospital_stay"-->
|
||||
<!-- readonly clickable required-->
|
||||
<!-- @click="hospital_stay = true"-->
|
||||
<!-- name="hospital_stay" label="住院时间"-->
|
||||
<!-- placeholder="请选择住院时间"-->
|
||||
<!-- :rules="[{ required:true, message: '请选择住院时间' }]"></van-field>-->
|
||||
<!-- <van-calendar v-model="hospital_stay" type="range" @confirm="onConfirm"-->
|
||||
<!-- :min-date="new Date('1999-01-01')"-->
|
||||
<!-- :color="themeColor"></van-calendar>-->
|
||||
|
||||
<!-- <van-field v-model="formData.the_hospital" name="the_hospital" name="type" label="所在医院"-->
|
||||
<!-- placeholder="请填写所在医院" required-->
|
||||
<!-- :rules="[{ required:true, message: '请填写所在医院' }]"></van-field>-->
|
||||
<!-- </template>-->
|
||||
<!-- <van-field v-model="formData.the_hospital" name="the_hospital" name="type" label="所在医院"-->
|
||||
<!-- placeholder="请填写所在医院" required-->
|
||||
<!-- :rules="[{ required:true, message: '请填写所在医院' }]"></van-field>-->
|
||||
<!-- </template>-->
|
||||
|
||||
<van-field v-model="formData.remark" name="remark" label="申请事由" style="flex-flow: column"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写申请事由' }]"
|
||||
placeholder="请填写申请事由"
|
||||
input-align="left"
|
||||
rows="3" maxlength="200" type="textarea" show-word-limit autosize>
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
label="申请事由"
|
||||
style="flex-flow: column"
|
||||
required
|
||||
:rules="[{ required:true, message: '请填写申请事由' }]"
|
||||
placeholder="请填写申请事由"
|
||||
input-align="left"
|
||||
rows="3"
|
||||
maxlength="200"
|
||||
type="textarea"
|
||||
show-word-limit
|
||||
autosize
|
||||
>
|
||||
<template #label>
|
||||
<div class="mb10">申请事由</div>
|
||||
</template>
|
||||
@@ -153,8 +212,7 @@ layout("/mobile/platform.html"){
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group inset class="mt10" v-if="isUploadFile === true">
|
||||
<van-field name="files" label="附  件" required
|
||||
style="flex-flow: column" input-align="left">
|
||||
<van-field name="files" label="附  件" required style="flex-flow: column" input-align="left">
|
||||
<template #label>
|
||||
<div class="mb10">附  件</div>
|
||||
</template>
|
||||
@@ -162,8 +220,8 @@ layout("/mobile/platform.html"){
|
||||
<vant-file-upload :files.sync="formData.files"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<div style="margin: 0 0 7px 15px;" v-if="isUploadFile && uploadFileDesc">
|
||||
<span style="color:red;">上传附件说明:{{ uploadFileDesc }}</span>
|
||||
<div style="margin: 0 0 7px 15px" v-if="isUploadFile && uploadFileDesc">
|
||||
<span style="color: red">上传附件说明:{{ uploadFileDesc }}</span>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
@@ -179,26 +237,21 @@ layout("/mobile/platform.html"){
|
||||
</van-cell-group>
|
||||
|
||||
<div style="margin: 20px 20px 10px 20px">
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">
|
||||
提 交
|
||||
</van-button>
|
||||
<van-button @click="onSubmit()" style="border-radius: 10px" block type="info" :color="themeColor">提 交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive" style="z-index: 99">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/condolence/apply/for">慰问申请
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/condolence/apply">慰问记录
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/condolence/apply/for">慰问申请</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/condolence/apply">慰问记录</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
@@ -222,34 +275,38 @@ layout("/mobile/platform.html"){
|
||||
money: 0,
|
||||
isUploadFile: true,
|
||||
uploadFileDesc: null,
|
||||
showChildPicker:false,
|
||||
childColumns:[{value:'一孩',text:'一孩'},{value:'二孩',text:'二孩'},{value:'三孩',text:'三孩'}],
|
||||
showChildPicker: false,
|
||||
childColumns: [
|
||||
{ value: "一孩", text: "一孩" },
|
||||
{ value: "二孩", text: "二孩" },
|
||||
{ value: "三孩", text: "三孩" }
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"formData.money"(val) {
|
||||
if (val > this.money) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: '金额超过规定金额' + this.money + "(元)",
|
||||
type: 'warning'
|
||||
});
|
||||
title: "警告",
|
||||
message: "金额超过规定金额" + this.money + "(元)",
|
||||
type: "warning"
|
||||
})
|
||||
this.$set(this.formData, "money", this.money)
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue?v='+new Date().getTime()),
|
||||
"mobile-sign": httpVueLoader("/components/sign/mobileSign.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
onChildConfirm(data){
|
||||
onChildConfirm(data) {
|
||||
console.log(data)
|
||||
this.formData.birth_child_num = data.value
|
||||
this.showChildPicker = false
|
||||
},
|
||||
priceInput() {
|
||||
let num = 0
|
||||
this.goods.forEach(v => {
|
||||
this.goods.forEach((v) => {
|
||||
num += parseFloat(v.price)
|
||||
})
|
||||
this.$set(this.formData, "money", num)
|
||||
@@ -259,18 +316,19 @@ layout("/mobile/platform.html"){
|
||||
this.showOccurTime = false
|
||||
},
|
||||
onConfirm(date) {
|
||||
const [start, end] = date;
|
||||
this.hospital_stay = false;
|
||||
this.formData.hospital_stay = moment(start).format('YYYY-MM-DD') + "-" + moment(end).format('YYYY-MM-DD');
|
||||
this.$set(this.formData, "hospital_stay_1", moment(start).format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, "hospital_stay_2", moment(end).format('YYYY-MM-DD'))
|
||||
const [start, end] = date
|
||||
this.hospital_stay = false
|
||||
this.formData.hospital_stay = moment(start).format("YYYY-MM-DD") + "-" + moment(end).format("YYYY-MM-DD")
|
||||
this.$set(this.formData, "hospital_stay_1", moment(start).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "hospital_stay_2", moment(end).format("YYYY-MM-DD"))
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.userList = arr.map(v => {
|
||||
this.userList = arr.map((v) => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
name: v.username + "(" + v.loginname + ")",
|
||||
id: v.id
|
||||
}
|
||||
})
|
||||
this.sheetShow = true
|
||||
@@ -279,32 +337,33 @@ layout("/mobile/platform.html"){
|
||||
async payeeUserRemoteMethod(event) {
|
||||
if (event) {
|
||||
const arr = await this.queryUser(event)
|
||||
this.payeeUserList = arr.map(v => {
|
||||
this.payeeUserList = arr.map((v) => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")", id: v.id
|
||||
name: v.username + "(" + v.loginname + ")",
|
||||
id: v.id
|
||||
}
|
||||
})
|
||||
this.payeeSheetShow = true
|
||||
}
|
||||
},
|
||||
async queryUser(query) {
|
||||
const {data} = await $.get("/platform/fw/condolence/apply/queryUser", {query})
|
||||
const { data } = await $.get("/platform/fw/condolence/apply/queryUser", { query })
|
||||
return data
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'be_user', u.id)
|
||||
this.$set(this.formData, 'be_user_name', u.name)
|
||||
this.$set(this.formData, "be_user", u.id)
|
||||
this.$set(this.formData, "be_user_name", u.name)
|
||||
this.sheetShow = false
|
||||
},
|
||||
payeeOnUserSelect(u) {
|
||||
this.$set(this.formData, 'payee', u.id)
|
||||
this.$set(this.formData, 'payee_name', u.name)
|
||||
this.$set(this.formData, "payee", u.id)
|
||||
this.$set(this.formData, "payee_name", u.name)
|
||||
this.payeeSheetShow = false
|
||||
},
|
||||
async onTypeConfirm(val) {
|
||||
this.$set(this.formData, "typeName", val.text)
|
||||
this.$set(this.formData, "type", val.value)
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id: val.value})
|
||||
const { data, code, msg } = await $.get("/platform/condolence/type/findOne", { id: val.value })
|
||||
console.log(data)
|
||||
|
||||
this.isUploadFile = data.isUploadFile
|
||||
@@ -312,15 +371,15 @@ layout("/mobile/platform.html"){
|
||||
|
||||
this.$set(this, "money", data.money)
|
||||
await this.moneyChange(val.value)
|
||||
this.showTypePicker = false;
|
||||
this.showTypePicker = false
|
||||
},
|
||||
onWayConfirm(val) {
|
||||
this.$set(this.formData, "wayName", val.text)
|
||||
this.$set(this.formData, "way", val.value)
|
||||
this.showWayPicker = false;
|
||||
this.showWayPicker = false
|
||||
},
|
||||
async moneyChange(id) {
|
||||
const {data, code, msg} = await $.get("/platform/condolence/type/findOne", {id})
|
||||
const { data, code, msg } = await $.get("/platform/condolence/type/findOne", { id })
|
||||
if (data) {
|
||||
this.$set(this.formData, "money", data.money)
|
||||
this.$set(this.formData, "wayName", data.way)
|
||||
@@ -329,34 +388,34 @@ layout("/mobile/platform.html"){
|
||||
},
|
||||
async onSubmit() {
|
||||
if (!this.formData.files) {
|
||||
vant.Toast('请上传附件材料!')
|
||||
vant.Toast("请上传附件材料!")
|
||||
return
|
||||
}
|
||||
this.$refs.signature.submitSign()
|
||||
if (this.$refs.signature.checkNull()) {
|
||||
this.$toast('请签名!')
|
||||
this.$toast("请签名!")
|
||||
return
|
||||
}
|
||||
await this.$refs.signature.updateSign()
|
||||
const formData = clone(this.formData)
|
||||
formData.mobile = "${@shiro.getPrincipalProperty('mobile')}"
|
||||
formData.files = JSON.stringify(formData.files)
|
||||
this.$refs['addForm'].validate().then(async () => {
|
||||
this.$toast.loading('提交中...')
|
||||
const res = await $.post('/platform/fw/condolence/apply/doAdd', {
|
||||
this.$refs["addForm"].validate().then(async () => {
|
||||
this.$toast.loading("提交中...")
|
||||
const res = await $.post("/platform/fw/condolence/apply/doAdd", {
|
||||
data: JSON.stringify(formData),
|
||||
sign: formData.sign
|
||||
})
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('申请成功');
|
||||
this.$toast.success("申请成功")
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/condolence/apply')
|
||||
location.replace("/mobile/condolence/apply")
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$toast.fail('申请失败');
|
||||
this.$toast.fail("申请失败")
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
@@ -366,21 +425,20 @@ layout("/mobile/platform.html"){
|
||||
})
|
||||
},
|
||||
async created() {
|
||||
this.formData.apply_time = moment().format('YYYY-MM-DD')
|
||||
this.formData.apply_time = moment().format("YYYY-MM-DD")
|
||||
this.formData.be_user = "${@shiro.getPrincipalProperty('id')}"
|
||||
//this.formData.be_user_name = "${@shiro.getPrincipalProperty('username')}" + "(" + "${@shiro.getPrincipalProperty('loginname')}" + ")"
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeColumns.push({value: v.id, text: v.name + "(" + v.code + ")"})
|
||||
const { code, data } = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach((v) => {
|
||||
this.typeColumns.push({ value: v.id, text: v.name + "(" + v.code + ")" })
|
||||
})
|
||||
for (let i in condolence.way) {
|
||||
this.wayColumns.push({value: condolence.way[i], text: condolence.way[i]})
|
||||
this.wayColumns.push({ value: condolence.way[i], text: condolence.way[i] })
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
@@ -389,14 +447,15 @@ layout("/mobile/platform.html"){
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
.van-cell,
|
||||
.van-picker button,
|
||||
.submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.apply_btn {
|
||||
animation: come .5s;
|
||||
position: fixed;top: 20%;right: 0
|
||||
animation: come 0.5s;
|
||||
position: fixed;
|
||||
top: 20%;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
@keyframes come {
|
||||
@@ -15,12 +17,11 @@ layout("/mobile/platform.html"){
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<m-page-loading v-if="mLoading"></m-page-loading>
|
||||
<van-nav-bar title="慰问申请列表" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
<van-nav-bar title="慰问申请列表" left-arrow placeholder fixed @click-left="pjaxReplace('/mobile/index')"></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu active-color="#1989fa">
|
||||
@@ -29,14 +30,11 @@ layout("/mobile/platform.html"){
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div style="margin: 60px auto 0 auto">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''" @load="pageData">
|
||||
<div v-for="o in tableData" class="list-card" @click="openInfo(o.id)">
|
||||
<van-cell-group inset>
|
||||
<van-cell :border="false" title="被慰问人">
|
||||
<span class="van-ellipsis" style="font-size: 16px;" :style="{color:themeColor}">
|
||||
{{o.be_username}}
|
||||
</span>
|
||||
<span class="van-ellipsis" style="font-size: 16px" :style="{color:themeColor}">{{o.be_username}}</span>
|
||||
</van-cell>
|
||||
<van-cell :border="false" title="申请时间">{{o.apply_time}}</van-cell>
|
||||
<van-cell :border="false" title="慰问类型">{{o.type_name}}</van-cell>
|
||||
@@ -49,69 +47,61 @@ layout("/mobile/platform.html"){
|
||||
</div>
|
||||
</van-list>
|
||||
|
||||
|
||||
<!-- <van-button v-show="visible" class="apply_btn" @click.stop="openApply" plain hairline>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <svg t="1634200664904" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="3163" width="32" height="32">-->
|
||||
<!-- <path d="M837.632 160.768c64 0 117.248 53.248 117.248 117.248v470.528c0 64-53.248 117.248-117.248 117.248H187.904c-64 2.048-117.248-50.688-117.248-114.688V278.016c0-64 53.248-117.248 117.248-117.248h649.728z m66.048 590.848V274.944c0-32.768-28.16-60.416-60.416-60.416H184.832c-32.768 0-60.416 28.16-60.416 60.416v479.232c0 32.768 28.16 60.416 60.416 60.416h657.92c32.768-2.56 60.928-28.16 60.928-62.976zM387.072 317.44"-->
|
||||
<!-- fill="#2E77ED" p-id="3164"></path>-->
|
||||
<!-- <path d="M326.144 709.632c-14.848 0-26.624-12.288-26.624-27.136V455.68c0-14.848 12.288-27.136 27.136-27.136S353.28 440.832 353.28 455.68v226.816c-0.512 15.36-12.288 27.136-27.136 27.136z"-->
|
||||
<!-- fill="#FFBB12" p-id="3165"></path>-->
|
||||
<!-- <path d="M569.856 442.368c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 682.496c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 553.472c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136z"-->
|
||||
<!-- fill="#2E77ED" p-id="3166"></path>-->
|
||||
<!-- <path d="M228.352 509.44c-10.24-10.752-10.24-27.648 0-37.888l78.336-78.336c10.752-10.752 27.648-10.752 37.888 0s10.24 27.648 0 37.888L266.24 509.44c-10.24 10.752-27.136 10.752-37.888 0z"-->
|
||||
<!-- fill="#FFBB12" p-id="3167"></path>-->
|
||||
<!-- <path d="M306.688 393.216c10.752-10.24 27.648-10.24 37.888 0l78.336 78.336c10.752 10.752 10.752 27.648 0 37.888s-27.648 10.24-37.888 0L306.688 431.104c-10.24-10.752-10.24-27.648 0-37.888z"-->
|
||||
<!-- fill="#FFBB12" p-id="3168"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </template>-->
|
||||
<!-- 申请-->
|
||||
<!-- </van-button>-->
|
||||
<!-- <van-button v-show="visible" class="apply_btn" @click.stop="openApply" plain hairline>-->
|
||||
<!-- <template #icon>-->
|
||||
<!-- <svg t="1634200664904" class="icon" viewBox="0 0 1024 1024" version="1.1"-->
|
||||
<!-- xmlns="http://www.w3.org/2000/svg" p-id="3163" width="32" height="32">-->
|
||||
<!-- <path d="M837.632 160.768c64 0 117.248 53.248 117.248 117.248v470.528c0 64-53.248 117.248-117.248 117.248H187.904c-64 2.048-117.248-50.688-117.248-114.688V278.016c0-64 53.248-117.248 117.248-117.248h649.728z m66.048 590.848V274.944c0-32.768-28.16-60.416-60.416-60.416H184.832c-32.768 0-60.416 28.16-60.416 60.416v479.232c0 32.768 28.16 60.416 60.416 60.416h657.92c32.768-2.56 60.928-28.16 60.928-62.976zM387.072 317.44"-->
|
||||
<!-- fill="#2E77ED" p-id="3164"></path>-->
|
||||
<!-- <path d="M326.144 709.632c-14.848 0-26.624-12.288-26.624-27.136V455.68c0-14.848 12.288-27.136 27.136-27.136S353.28 440.832 353.28 455.68v226.816c-0.512 15.36-12.288 27.136-27.136 27.136z"-->
|
||||
<!-- fill="#FFBB12" p-id="3165"></path>-->
|
||||
<!-- <path d="M569.856 442.368c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 682.496c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136zM569.856 553.472c0-14.848 12.288-26.624 27.136-26.624H757.76c14.848 0 27.136 12.288 27.136 27.136s-12.288 26.624-27.136 26.624h-160.768c-15.36 0-27.136-12.288-27.136-27.136z"-->
|
||||
<!-- fill="#2E77ED" p-id="3166"></path>-->
|
||||
<!-- <path d="M228.352 509.44c-10.24-10.752-10.24-27.648 0-37.888l78.336-78.336c10.752-10.752 27.648-10.752 37.888 0s10.24 27.648 0 37.888L266.24 509.44c-10.24 10.752-27.136 10.752-37.888 0z"-->
|
||||
<!-- fill="#FFBB12" p-id="3167"></path>-->
|
||||
<!-- <path d="M306.688 393.216c10.752-10.24 27.648-10.24 37.888 0l78.336 78.336c10.752 10.752 10.752 27.648 0 37.888s-27.648 10.24-37.888 0L306.688 431.104c-10.24-10.752-10.24-27.648 0-37.888z"-->
|
||||
<!-- fill="#FFBB12" p-id="3168"></path>-->
|
||||
<!-- </svg>-->
|
||||
<!-- </template>-->
|
||||
<!-- 申请-->
|
||||
<!-- </van-button>-->
|
||||
</div>
|
||||
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image"
|
||||
image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
<van-empty v-if="mLoading==false&&tableData.length==0" class="custom-image" image="/none.svg" description="暂无数据"></van-empty>
|
||||
|
||||
<div>
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/condolence/apply/for">慰问申请
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/condolence/apply">慰问记录
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item icon="home-o" replace url="/mobile/condolence/apply/for">慰问申请</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" replace url="/mobile/condolence/apply">慰问记录</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
el: "#app",
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1,
|
||||
visible: true,
|
||||
typeOption: [
|
||||
{value: null, text: '全部'}
|
||||
],
|
||||
typeOption: [{ value: null, text: "全部" }],
|
||||
yearOption: [],
|
||||
pageForm: {
|
||||
year: '',
|
||||
type: ''
|
||||
year: "",
|
||||
type: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
"mobile-sign": httpVueLoader("/components/sign/mobileSign.vue")
|
||||
},
|
||||
methods: {
|
||||
openApply() {
|
||||
window.location.href = '/mobile/condolence/apply/for'
|
||||
window.location.href = "/mobile/condolence/apply/for"
|
||||
},
|
||||
openInfo(id) {
|
||||
window.location.href = '/mobile/condolence/apply/info?id=' + id
|
||||
window.location.href = "/mobile/condolence/apply/info?id=" + id
|
||||
},
|
||||
yearChange(val) {
|
||||
this.pageForm.year = val
|
||||
@@ -124,13 +114,12 @@ layout("/mobile/platform.html"){
|
||||
listenTouch() {
|
||||
this.$nextTick(() => {
|
||||
const app = document.querySelector("#app")
|
||||
app.addEventListener('touchstart', () => {
|
||||
app.addEventListener("touchstart", () => {
|
||||
this.visible = false
|
||||
})
|
||||
app.addEventListener('touchend', () => {
|
||||
app.addEventListener("touchend", () => {
|
||||
this.visible = true
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -140,11 +129,11 @@ layout("/mobile/platform.html"){
|
||||
async created() {
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
this.yearOption.unshift({ value: i, text: i + "年" })
|
||||
}
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach(v => {
|
||||
this.typeOption.push({value: v.id, text: v.name + v.code})
|
||||
const { code, data } = await $.get("/platform/condolence/type/getAll")
|
||||
data.forEach((v) => {
|
||||
this.typeOption.push({ value: v.id, text: v.name + v.code })
|
||||
})
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
this.$set(this.pageForm, "type", this.typeOption[0].value)
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
|
||||
<van-number-keyboard safe-area-inset-bottom />
|
||||
<title></title>
|
||||
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.25/index.min.css" />-->
|
||||
<!-- <link rel="stylesheet" href="https://cdn.staticfile.org/vant/2.12.25/index.min.css" />-->
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/theme.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/mobile/css/main.css" />
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/vant.css?v=1.0.0">
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/vant/vant.css?v=1.0.0" />
|
||||
|
||||
<script src="${base!}/assets/platform/plugins/vue/vue.min.js"></script>
|
||||
<!-- <script src="https://cdn.staticfile.org/vant/2.12.25/vant.min.js"></script>-->
|
||||
<!-- <script src="https://cdn.staticfile.org/vant/2.12.25/vant.min.js"></script>-->
|
||||
<script src="${base!}/assets/platform/plugins/vant/vant.js"></script>
|
||||
<script src="${base!}/assets/platform/plugins/vue-loader/httpVueLoader.js"></script>
|
||||
<script src="${base!}/assets/mobile/js/basic.js"></script>
|
||||
@@ -49,6 +49,10 @@
|
||||
|
||||
<script src="${base!}/components/plugins/sysDict/DictData.js"></script>
|
||||
|
||||
<script>
|
||||
Vue.component("mobile-sign", httpVueLoader("/components/sign/mobileSign.vue?v=" + new Date().getTime()))
|
||||
</script>
|
||||
|
||||
<script>
|
||||
window.sessionStorage.setItem("user", JSON.stringify(${json(@shiro.getPrincipal())}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user