This commit is contained in:
Paidax
2024-07-24 15:10:07 +08:00
parent e2f6a9f4b1
commit 020b6c48ed
79 changed files with 7733 additions and 3760 deletions
+199 -103
View File
@@ -19,6 +19,7 @@ layout("/mobile/platform.html"){
@click="sexPicker = true"
placeholder="请选择性别"
clickable
:rules="[{ required:true, message: '请选择性别' }]"
left-icon="ellipsis"></van-field>
<van-popup v-model="sexPicker" position="bottom">
<van-picker
@@ -55,89 +56,66 @@ layout("/mobile/platform.html"){
></van-picker>
</van-popup>
<van-field label="学位" v-model="formData.academicDegree" readonly clickable
left-icon="comment-o"
@click="academicDegreePicker = true" placeholder="请选择学位"
:rules="[{ required:true, message: '请选择学位' }]"></van-field>
<van-popup v-model="academicDegreePicker" position="bottom">
<van-field label="政治面貌" v-model="formData.political" readonly clickable
left-icon="label-o"
@click="politicalPicker = true" placeholder="请选择政治面貌"
:rules="[{ required:true, message: '请选择政治面貌' }]"></van-field>
<van-popup v-model="politicalPicker" position="bottom">
<van-picker
show-toolbar
:columns="academicDegreeColumns"
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
@cancel="academicDegreePicker = false"
:columns="politicalColumns"
@confirm="(v)=>{formData.political = v;politicalPicker = false}"
@cancel="politicalPicker = false"
></van-picker>
</van-popup>
<van-field label="婚否" v-model="formData.marriage" readonly clickable
left-icon="flower-o"
@click="marriagePicker = true" placeholder="请选择婚否"
:rules="[{ required:true, message: '请选择婚否' }]"></van-field>
<van-popup v-model="marriagePicker" position="bottom">
<van-picker
show-toolbar
:columns="marriageColumns"
@confirm="(v)=>{formData.marriage = v;marriagePicker = false}"
@cancel="marriagePicker = false"
></van-picker>
</van-popup>
<van-field label="政治面貌" v-model="formData.political" placeholder="请填写政治面貌"
left-icon="label-o"
:rules="[{ required:true, message: '请填写政治面貌' }]"></van-field>
<van-field label="身份证" v-model="formData.idcard" placeholder="请填写身份证号码"
left-icon="idcard"
:rules="[{ required:true, message: '请填写身份证号码' }]"></van-field>
:rules="[{ required:true, message: '请填写身份证号码' },{pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号码格式错误'}]"></van-field>
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请填写联系电话"
left-icon="phone-o"
:rules="[{ required:true, message: '请填写联系电话' }]"></van-field>
</van-cell-group>
:rules="[{ required:true, message: '请填写联系电话' },{pattern: /^1[3456789]\d{9}$/, message: '联系电话格式错误'}]"></van-field>
<van-field label="所属单位" v-model="formData.unitname" readonly clickable
left-icon="flower-o"
@click="unitPicker = true" placeholder="请选择所属单位"
:rules="[{ required:true, message: '请选择所属单位' }]"></van-field>
<van-popup v-model="unitPicker" position="bottom">
<van-picker
show-toolbar
value-key="name"
:columns="unitColumns"
@confirm="(v)=>{formData.unitname = v.name;formData.unitid = v.id;unitPicker = false}"
@cancel="unitPicker = false"
></van-picker>
</van-popup>
<van-cell-group inset class="mt10">
<van-field label="户口所在地" v-model="formData.registeredResidence" placeholder="请填写户口所在地"
left-icon="wap-home-o"
:rules="[{ required:true, message: '请填写户口所在地' }]"></van-field>
<van-field label="现居住地" v-model="formData.homeAddress" placeholder="请填写现居住地"
left-icon="home-o"
:rules="[{ required:true, message: '请填写现居住地' }]"></van-field>
<van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"
left-icon="cluster-o"
readonly></van-field>
<van-field label="职务" v-model="formData.position" placeholder="请填写职务"
<!-- <van-field label="工作单位" value="${@shiro.getPrincipalProperty('unit').getName()}"-->
<!-- left-icon="cluster-o"-->
<!-- readonly></van-field>-->
<van-field label="岗位" placeholder="请填写岗位" v-model="formData.jobTitle"
left-icon="debit-pay"
:rules="[{ required:true, message: '请填写职务' }]"></van-field>
</van-cell-group>
<van-cell-group inset class="mt10 up_down">
<div class="van-cell">
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div class="van-field__left-icon">
<i class="van-icon van-icon-friends-o"></i>
</div>
<div class="van-cell__title van-field__label" style="width: auto">
<span>家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="family && family.length>0 && family.length<3" style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="family.push({})"
native-type="button"></van-button>
</div>
<van-divider></van-divider>
<template v-if="family && family.length>0">
<div v-for="o,i in family" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="minus" type="danger" round size="mini"
@click="family.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="联系方式" v-model="o.mobile" type="tel" placeholder="请填写联系方式"
:rules="[{ required:true, message: '请填写联系方式' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="family.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
:rules="[{ required:true, message: '请填写岗位' }]"></van-field>
</van-cell-group>
<van-cell-group inset class="mt10 up_down">
@@ -147,14 +125,14 @@ layout("/mobile/platform.html"){
<i class="van-icon van-icon-notes-o"></i>
</div>
<div class="van-cell__title van-field__label">
<span>个人工作简历</span>
<span>工作经历</span>
</div>
</div>
<van-divider></van-divider>
<van-field
v-model="formData.vita"
:rules="[{ required:true, message: '请填写个人工作简历' }]"
:rules="[{ required:true, message: '请填写工作经历' }]"
style="padding: 0"
input-align="left"
autosize
@@ -162,7 +140,7 @@ layout("/mobile/platform.html"){
autosize
type="textarea"
maxlength="200"
placeholder="请输入个人工作简历"
placeholder="请输入工作经历"
show-word-limit
></van-field>
</div>
@@ -176,7 +154,7 @@ layout("/mobile/platform.html"){
<i class="van-icon van-icon-award-o"></i>
</div>
<div class="van-cell__title van-field__label">
<span>特长</span>
<span>有何特长</span>
</div>
</div>
@@ -197,9 +175,84 @@ layout("/mobile/platform.html"){
</div>
</van-cell-group>
<van-cell-group class="mt10" inset>
<van-field label="签字" required style="flex-flow: column">
<template #label>
<div class="mb10">签&emsp;&emsp;字</div>
</template>
<template #input>
<mobile-sign :my_sign.sync="formData.sign" ref="signature"></mobile-sign>
</template>
</van-field>
</van-cell-group>
<van-cell-group inset class="mt10 up_down">
<div class="van-cell">
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div class="van-field__left-icon">
<i class="van-icon van-icon-friends-o"></i>
</div>
<div class="van-cell__title van-field__label" style="width: auto">
<span>家庭成员</span>
</div>
</div>
<van-button v-if="formData.family && formData.family.length>0 && formData.family.length<3"
style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.family.push({})"
native-type="button"></van-button>
</div>
<van-divider></van-divider>
<template v-if="formData.family && formData.family.length>0">
<div v-for="o,i in formData.family" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="minus" type="danger" round size="mini"
@click="formData.family.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="与本人关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field name="isCondolence" label="是否慰问">
<template #input>
<van-radio-group v-model="o.isCondolence" direction="horizontal">
<van-radio name="是">是</van-radio>
<van-radio name="否">否</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field label="慰问时间" v-model="o.condolenceTime"
placeholder="请选择慰问时间" @click="doShowCondolenceCalendar(i)"></van-field>
<van-calendar v-model="condolenceShow" :min-date="new Date('1999-01-01')" :show-confirm="false"
@confirm="condolenceConfirm"></van-calendar>
<van-field label="备注" v-model="o.remark" type="tel" placeholder="请填写备注"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.family.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</van-cell-group>
<div style="margin: 20px 20px 10px;">
<van-button native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
提 交
<van-button
:disabled="!(unionInfo.apply||unionInfo.reApply)"
native-type="submit" style="border-radius: 10px" block type="info" :color="themeColor">
<span v-if="unionInfo.apply||unionInfo.reApply">{{unionInfo.reApply?'重新申请':'申请加入'}}</span>
<span v-else-if="unionInfo.record">{{unionInfo.record.stateName}}</span>
<span v-else>您已是会员</span>
</van-button>
</div>
</van-form>
@@ -212,16 +265,14 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins],
data() {
return {
unionInfo: {},
sexPicker: false,
applyRecords: [],
formData: {},
nationPicker: false,
educationPicker: false,
academicDegreePicker: false,
family: [],
educationColumns: [
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
],
educationColumns: [],
academicDegreeColumns: [
'学士', '硕士', '博士'
],
@@ -231,30 +282,83 @@ layout("/mobile/platform.html"){
APPLYING: 2,
NOTMEBMER: 3,
},
memberStatus: null
memberStatus: null,
politicalPicker: false,
politicalColumns: [],
marriagePicker: false,
marriageColumns: [],
unitPicker: false,
unitColumns: [],
condolenceShow: false,
familyIndex: null,
}
},
components: {
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
},
methods: {
doShowCondolenceCalendar(index){
console.log(index)
this.condolenceShow = true
this.familyIndex = index
},
condolenceConfirm(val){
if (val) {
this.formData.family[this.familyIndex].condolenceTime = moment(val).format('YYYY-MM-DD')
this.condolenceShow = false
this.familyIndex = null
}
console.log(val)
},
async doSubmit() {
this.$refs.signature.submitSign()
if (this.$refs.signature.checkNull()) {
vant.Toast('请签字')
return
}
await this.$refs.signature.updateSign()
const formData = clone(this.formData)
formData.family = JSON.stringify(this.family)
formData.family = JSON.stringify(this.formData.family)
const loading = this.$toast.loading({
message: '数据提交中...',
forbidClick: true,
overlay: true,
duration: 0
})
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
const data = await $.get("/platform/member/apply/submit/doApply", {memberStates: 1})
const data = await $.post("/platform/member/apply/submit/doApply", {
memberStates: 1,
sign: formData.sign,
})
setTimeout(() => {
this.$toast.success('提交成功');
loading.close()
setTimeout(() => {
location.replace('/mobile/index')
}, 300)
}, 500)
},
addFamily() {
this.family.push({})
}
async getUnionInfo() {
const resp = await $.get("/platform/member/apply/submit/unionInfo")
if (resp.code === 0) {
this.unionInfo = resp.data
this.formData = resp.data
this.$set(this.formData, "family", resp.data.family ? JSON.parse(resp.data.family) : [])
this.formData = resp.data
} else {
this.$toast(resp.msg)
}
},
},
async created() {
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
if ("${@shiro.getPrincipalProperty('sex')}" === '未知') {
this.$set(this.formData, "sex", '')
} else {
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
}
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
this.$set(this.formData, "marriage", "${@shiro.getPrincipalProperty('marriage')}")
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
this.$set(this.formData, "mobile", "${@shiro.getPrincipalProperty('mobile')}")
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
@@ -266,25 +370,21 @@ layout("/mobile/platform.html"){
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
// const {data} = await $.get("/mobile/member/getAllNation");
/* this.nationColumns = data.map(v => {
return v.mzmc
}) */
this.$set(this.formData, "jobTitle", "${@shiro.getPrincipalProperty('jobTitle')}")
this.$set(this.formData, "unitname", "${@shiro.getPrincipalProperty('unit').getName()}")
this.$set(this.formData, "unitid", "${@shiro.getPrincipalProperty('unit').getId()}")
this.nationColumns = nation
const resp = await $.get("/platform/member/apply/submit/unionInfo")
this.applyRecords = resp.data.records
if (resp.data.member === 1) {
this.memberStatus = this.memberStatusColumn.MEMBER
} else {
if (resp.data.record != null) {
this.memberStatus = this.memberStatusColumn.APPLYING
} else {
this.memberStatus = this.memberStatusColumn.NOTMEBMER
}
}
const education = await getDictByCode('Education')
this.educationColumns = education.map(o => o.code)
const political = await getDictByCode('political')
this.politicalColumns = political.map(o => o.code)
const marriage = await getDictByCode('maritalStatus')
this.marriageColumns = marriage.map(o => o.code)
this.unitColumns = await getUnionUnits()
await this.getUnionInfo()
}
})
</script>
@@ -298,10 +398,6 @@ layout("/mobile/platform.html"){
width: 100%;
}
.van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px;
}
.van-divider {
margin: 10px 0;
}
@@ -309,4 +405,4 @@ layout("/mobile/platform.html"){
</style>
<!--#
}
#-->
#-->
@@ -98,28 +98,94 @@ layout("/mobile/platform.html"){
</div>
</div>
<van-cell-group>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="年龄">{{ viewData.birthday }}</van-cell>
<van-cell title="民族">{{ viewData.mz }}</van-cell>
<van-cell title="文化程度">{{ viewData.xl }}</van-cell>
<van-cell title="政治面貌">{{ viewData.zzmm }}</van-cell>
<van-cell title="部门">{{ viewData.unitname }}</van-cell>
<van-cell title="职称">{{ viewData.zc }}</van-cell>
<van-cell title="职务">{{ viewData.zw }}</van-cell>
<van-field :value="viewData.loginname" label="工号" left-icon="contact"></van-field>
<van-field label="姓名" :value="viewData.username" left-icon="contact"></van-field>
<van-field label="性别" :value="viewData.sex" left-icon="ellipsis"></van-field>
<van-field label="民族" left-icon="bar-chart-o" :value="viewData.nation"></van-field>
<van-field label="学历" left-icon="coupon-o" :value="viewData.education"></van-field>
<!-- <van-field label="学位" left-icon="comment-o" :value="viewData.academicDegree"></van-field>-->
<van-field label="政治面貌" left-icon="label-o" :value="viewData.political"></van-field>
<van-field label="婚否" left-icon="label-o" :value="viewData.marriage"></van-field>
<!-- <van-field :value="viewData.personType" label="人员类型" left-icon="label-o"></van-field>-->
<van-field label="身份证号码" left-icon="idcard" :value="viewData.idcard"></van-field>
<van-field label="联系电话" left-icon="phone-o" :value="viewData.mobile"></van-field>
<van-field label="户口所在地" left-icon="wap-home-o" :value="viewData.registeredResidence"></van-field>
<van-field label="现居住地" left-icon="home-o" :value="viewData.homeAddress"></van-field>
<van-field label="工作部门(学院)及岗位" left-icon="cluster-o" :value="viewData.unitname + '、' + viewData.jobTitle"></van-field>
</van-cell-group>
<div class="van-cell-group__title">
<div class="van-sidebar-item van-sidebar-item--select">
个人简历
<van-cell-group class="mt10 up_down">
<div class="van-cell" style="flex-flow: column">
<div style="display: flex">
<div class="van-field__left-icon">
<i class="van-icon van-icon-notes-o"></i>
</div>
<div class="van-cell__title van-field__label">
<span>简历</span>
</div>
</div>
<van-divider></van-divider>
<van-field readonly>
<template #input>
<div v-html="viewData.vita"></div>
</template>
</van-field>
</div>
</van-cell-group>
<van-cell-group class="mt10 up_down">
<div class="van-cell" style="flex-flow: column">
<div style="display: flex">
<div class="van-field__left-icon">
<i class="van-icon van-icon-award-o"></i>
</div>
<div class="van-cell__title van-field__label">
<span>有何特长</span>
</div>
</div>
<van-divider></van-divider>
<van-field readonly>
<template #input>
<div v-html="viewData.specialSkill"></div>
</template>
</van-field>
</div>
</van-cell-group>
<van-cell-group class="mt10 up_down">
<div class="van-cell" style="flex-flow: column">
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div class="van-field__left-icon">
<i class="van-icon van-icon-friends-o"></i>
</div>
<div class="van-cell__title van-field__label" style="width: auto">
<span>家庭成员</span>
</div>
</div>
</div>
<van-divider></van-divider>
<div v-if="family && family.length>0">
<div v-for="(o,i) in family" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{ toChinesNum(i + 1) }}</span>
</div>
<van-form readonly input-align="right">
<van-field label="与本人关系" :value="o.relation" left-icon="exchange"></van-field>
<van-field label="姓名" :value="o.name" left-icon="user-o"></van-field>
<van-field label="是否慰问" :value="o.isCondolence" left-icon="shield-o"></van-field>
<van-field label="慰问时间" :value="o.condolenceTime" left-icon="guide-o"></van-field>
<van-field label="备注" :value="o.remark" left-icon="coupon-o"></van-field>
</van-form>
</div>
</div>
<div v-else style="height: 100px">
暂无家庭成员信息
</div>
</div>
</div>
<van-cell-group>
<van-cell>
<template>
<div v-html="viewData.grjl" v-if="viewData.grjl!=null"></div>
<div v-else>暂无</div>
</template>
</van-cell>
</van-cell-group>
</van-popup>
@@ -142,6 +208,7 @@ layout("/mobile/platform.html"){
unionList: [],
unitList: [],
viewData: {},
family: []
}
},
methods: {
@@ -170,9 +237,10 @@ layout("/mobile/platform.html"){
}, 300)
},
async viewInfo(id) {
const resp = await $.post('/mobile/member/viewInfo', {id: id})
const resp = await $.post('/platform/member/common/userInfo', {userId: id})
if (resp.code === 0) {
this.viewData = resp.data
this.family = JSON.parse(resp.data.family)
this.infoShow = true
}
},
@@ -225,4 +293,4 @@ layout("/mobile/platform.html"){
<!--#
}
#-->
#-->
@@ -34,6 +34,14 @@ layout("/mobile/platform.html"){
placeholder="请输入审核意见"
></van-field>
<van-field label="签字" style="flex-flow: column">
<template #label>
<div class="mb10">签&emsp;&emsp;字</div>
</template>
<template #input>
<mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
</template>
</van-field>
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
<van-col span="12">
@@ -69,6 +77,7 @@ layout("/mobile/platform.html"){
},
components: {
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
},
methods: {
async doAudit(pass) {
@@ -109,4 +118,4 @@ layout("/mobile/platform.html"){
<!--#
}
#-->
#-->
@@ -35,6 +35,14 @@ layout("/mobile/platform.html"){
placeholder="请输入审核意见"
></van-field>
<van-field label="签字" style="flex-flow: column">
<template #label>
<div class="mb10">签&emsp;&emsp;字</div>
</template>
<template #input>
<mobile-sign ref="signature" :my_sign.sync="formData.auditSign"></mobile-sign>
</template>
</van-field>
<van-row gutter="20" style="margin-top: 30px;padding: 0 25px">
<van-col span="12">
@@ -69,6 +77,7 @@ layout("/mobile/platform.html"){
},
components: {
'member-menber-info': httpVueLoader('/components/mobile/member/MobileMemberInfo.vue?v=' + new Date().getTime()),
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
},
methods: {
@@ -111,4 +120,4 @@ layout("/mobile/platform.html"){
<!--#
}
#-->
#-->
@@ -0,0 +1,690 @@
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-card {
background: #ffffff;
margin: 10px auto 0;
width: 96%;
border-radius: 10px;
padding: 14px 12px;
}
.van-card__thumb {
display: flex;
align-items: center;
justify-content: center;
}
.van-card__content > div {
height: 100%;
display: flex;
flex-direction: column;
}
.train-title {
flex: 0.6;
margin-top: 4px;
}
.van-doc-card {
margin: 14px;
padding: 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 12px;
}
.van-divider {
margin: 6px 0 5px 0px;
border-color: #081776;
}
.van-tabs {
z-index: 0 !important;
}
.van-empty {
height: 70%;
top: 54%;
background-color: #F6F7F9;
}
</style>
<div id="app" v-cloak>
<van-nav-bar
@click-left="history.back()"
fixed
left-arrow
placeholder
title="资产列表"
></van-nav-bar>
<div class="search-fixed">
<van-dropdown-menu :active-color="themeColor">
<van-dropdown-item :options="yearOption" @change="getPdPlan"
v-model="pageForm.year"></van-dropdown-item>
<van-dropdown-item :options="pdPlanList" v-model="pageForm.zcpdid"></van-dropdown-item>
<van-dropdown-item :options="zcLxList" @change="doSearch"
v-model="pageForm.zcghlx"></van-dropdown-item>
</van-dropdown-menu>
</div>
<van-tabs @click="doSearch" style="margin-top: 53px" v-model="pageForm.isPd">
<van-tab title="全部"></van-tab>
<van-tab title="已盘点"></van-tab>
<van-tab title="未盘点"></van-tab>
</van-tabs>
<div style="margin: 0px auto 0 auto">
<van-list
:finished="finished"
:finished-text="tableData.length>0?'没有更多了':''"
:loading="mLoading"
@load="onLoad" v-if="tableData.length>0"
v-model="mLoading">
<div class="van-doc-card" v-for="o in tableData">
<div @click="welfareClick(o)" style="position: relative">
<div>
<div class="van-ellipsis"
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
{{o.zcmc}}({{o.zcbh}})
</div>
</div>
<div>
<div class="train-title"><span
style="color: grey">资产规格:</span>{{o.zcxh?o.zcxh:'暂无'}}
</div>
<div class="train-title"><span style="color: grey">资产类型:</span>{{o.zcghlx==='1'?'院级工会':'校工会'}}
</div>
<div class="train-title"><span style="color: grey">购置日期:</span>{{o.zcgzrq}}
</div>
<div class="train-title"><span style="color: grey">存放地名称:</span>{{o.zccfdmc}}
</div>
<van-divider></van-divider>
</div>
<div class="train-title"><span style="color: grey">领用人:</span>
{{o.zclyrname?o.zclyrname:'暂无'}}
</div>
<div class="train-title"><span style="color: grey">领用工会:</span>
{{o.zclydwh}}
</div>
<van-button :color="themeColor" @click.stop="openView(o)" plain round
size="mini"
style="position: absolute; left: 55%; bottom: 0%; width: 74px; height: 28px"
type="primary">
查看
</van-button>
<van-button :color="themeColor"
:disabled="pdPlanList.length==0||!pageForm.zcpdid||!pdPlanList.find(p=>p.id===pageForm.zcpdid).isShow"
@click.stop="openPd(o)"
round size="mini"
style="position: absolute; left: 77%; bottom: 0%; width: 74px; height: 28px"
type="primary"
v-if="!o.isPd">
开始盘点
</van-button>
<van-button
:disabled="pdPlanList.length==0||!pageForm.zcpdid||!pdPlanList.find(p=>p.id===pageForm.zcpdid).isShow"
@click.stop="doDelete(o)"
round size="mini"
style="position: absolute; left: 77%; bottom: 0%; width: 74px; height: 28px"
type="danger"
v-if="o.isPd">
删除盘点
</van-button>
</div>
</div>
</van-list>
<div :style="{color:themeColor}"
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
<van-button :color="themeColor" hairline size="mini" type="primary">
总:{{pageForm.totalCount}}条
</van-button>
<van-button :color="themeColor" @click="doHzExcel" hairline size="mini" type="primary">
导出盘点汇总表
</van-button>
</div>
<van-empty
class="custom-image"
description="暂无数据"
image="/none.svg"
v-if="mLoading==false&&tableData.length==0"
></van-empty>
</div>
<van-popup :style="{ height: '100%',width:'100%' }" position="right" v-model="addPdShow">
<van-nav-bar
@click-left="addPdShow=false;doSearch()"
fixed
left-arrow
placeholder
title="新增盘点"
></van-nav-bar>
<van-form @submit="onSubmit">
<van-field :value="formData.zcbh" label="资产编号" readonly required></van-field>
<van-field :value="formData.zcmc" label="资产名称" readonly required></van-field>
<!-- <van-field :value="formData.zmjz" @touchstart.native.stop="zmjzShow = true" clickable
label="账面价值" placeholder="请输入账面价值"
readonly></van-field>
<van-number-keyboard
:show="zmjzShow"
@blur="zmjzShow = false"
close-button-text="完成"
extra-key="."
hide-on-click-outside
safe-area-inset-bottom
theme="custom"
v-model="formData.zmjz"
></van-number-keyboard>-->
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zcgzrq"
@click="zcrksjShow = true"
clickable label="购置日期" placeholder="请输入购置日期"
readonly
required></van-field>
<van-calendar :color="themeColor" :min-date="new Date('1999-01-01')"
@confirm="onConfirmZcrksj" v-model="zcrksjShow"></van-calendar>
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zcbdsj"
@click="zcbdsjShow = true"
clickable label="盘点日期" placeholder="请输入盘点日期"
readonly
required></van-field>
<van-calendar :color="themeColor" :min-date="new Date('1999-01-01')"
@confirm="onConfirmZcbdsj"
required v-model="zcbdsjShow"></van-calendar>
<van-field :rules="[{ required: true, message: '' }]"
@input="userRemoteMethod"
clickable
label="责任人" placeholder="请输入责任人"
required
v-model="formData.zcbdshr_name"></van-field>
<van-action-sheet :actions="userList"
:close-on-click-overlay="false"
@cancel="userList = []"
@select="onUserSelect"
cancel-text="重新输入姓名或工号查询"
v-model="zcbdshrShow">
</van-action-sheet>
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zcnowlydwh"
label="院级工会" placeholder="输入责任人联动"
readonly required></van-field>
<template v-if="formData.zcghlx==='2'">
<van-field @input="lyrRemoteMethod"
clickable
label="领用人" placeholder="请输入领用人"
v-model="formData.zclyrname"></van-field>
<van-action-sheet :actions="userList"
:close-on-click-overlay="false"
@cancel="userList = []"
@select="onLyrUserSelect"
cancel-text="重新输入姓名或工号查询"
v-model="zclyrnameShow">
</van-action-sheet>
</template>
<van-field :rules="[{ required: true, message: '' }]"
clickable
label="存放地点"
maxlength="20" placeholder="请输入存放地点"
required
v-model="formData.zcnowcfdmc"></van-field>
<van-field :rules="[{ required: true, message: '' }]" :value="formData.pdzt"
@click="pdztShow = true"
clickable label="盘点情况" placeholder="请选择盘点情况"
readonly
required></van-field>
<van-popup :style="{ height: '40%' }" position="bottom" v-model="pdztShow">
<van-picker
:columns="pdztColumns"
@cancel="pdztShow = false"
@confirm="(v)=>{formData.pdzt = v;pdztShow = false}"
show-toolbar
title="盘点情况"
></van-picker>
</van-popup>
<van-field :rules="[{ required: true, message: '' }]" clickable label="盘点情况"
placeholder="请输入盘点情况"
required v-if="formData.pdzt!='已盘点'&&formData.pdzt!=null"
v-model="formData.wpdzt"
></van-field>
<!-- <van-popup :style="{ height: '40%' }" position="bottom" v-model="wpdztShow">
<van-picker
:columns="wpdztColumns"
@cancel="wpdztShow = false"
@confirm="(v)=>{formData.wpdzt = v;wpdztShow = false}"
show-toolbar
title="盘点情况"
></van-picker>
</van-popup>-->
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zczt"
@click="zcztShow = true"
clickable label="使用现状" placeholder="请选择使用现状"
readonly
required></van-field>
<van-popup :style="{ height: '40%' }" position="bottom" v-model="zcztShow">
<van-picker
:columns="zcztColumns"
@cancel="zcztShow = false"
@confirm="(v)=>{formData.zczt = v;zcztShow = false}"
show-toolbar
show-toolbar
title="使用现状"
></van-picker>
</van-popup>
<van-field :rules="[{ required: true, message: '请上传资产照片' }]" input-align="left"
label="资产照片"
name="files" required
style="flex-flow: column">
<template #label>
<div class="mb10">资产照片</div>
</template>
<template #input>
<vant-file-upload :files.sync="formData.zcFile" :max="1"></vant-file-upload>
</template>
</van-field>
<div style="margin: 16px;">
<van-button :color="themeColor" block native-type="submit" round type="info">提交
</van-button>
</div>
</van-form>
</van-popup>
<van-popup :style="{ height: '100%',width:'100%' }" position="right" v-model="viewPdShow">
<van-nav-bar
@click-left="viewPdShow=false"
fixed
left-arrow
placeholder
title="查看盘点信息"
></van-nav-bar>
<van-tabs @click="openVIewTab" v-model="viewTabs">
<van-tab :name="1" title="基本信息">
<van-cell-group>
<van-field :value="viewData.zcmc" label="资产名称" readonly></van-field>
<van-field :value="viewData.zcbh" label="资产编号" readonly></van-field>
<van-field :value="viewData.zcdj" label="单价" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.sl" label="数量" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zcghlx==='1'?'院级工会':'校工会'" label="资产类型"
readonly></van-field>
<van-field :value="viewData.zcxh" label="规格型号" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.contentCode" label="类别编号" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.content" label="类别名称" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zccfdmc" label="存放地点" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zcgzrq" label="购置日期" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zclyrname" label="领用人" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zclydwh" label="领用工会" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.pdzt" label="盘点情况" placeholder="暂无"
readonly></van-field>
<van-field :value="viewData.zczt" label="使用现状" placeholder="暂无"
readonly></van-field>
</van-cell-group>
</van-tab>
<van-tab :name="2" title="盘点信息">
<van-collapse accordion v-if="viewData.bdData&&viewData.bdData.length>0"
v-model="collapseName">
<van-collapse-item :name="i" :title="o.zcbdsj" v-for="(o,i) in viewData.bdData">
<van-field :value="o.zcnowlydwh" label="院级工会" readonly></van-field>
<!-- <van-field :value="o.zmjz" label="账面价值" placeholder="暂无"
readonly></van-field>-->
<van-field :value="o.zcgzrq" label="购置日期" placeholder="暂无"
readonly></van-field>
<van-field :value="o.shrname" label="责任人" placeholder="暂无"
readonly></van-field>
<van-field :value="o.mobile" label="联系方式" placeholder="暂无"
readonly></van-field>
<van-field :value="o.pdzt" label="盘点情况" placeholder="暂无"
readonly></van-field>
<van-field :value="o.wpdzt" label="情况说明" placeholder="暂无"
readonly></van-field>
<van-field :value="o.zczt" label="使用现状" placeholder="暂无"
readonly></van-field>
<van-field abel="资产照片" name="zcfile"
required style="flex-flow: column">
<template #label>
<div class="mb10">资产照片</div>
</template>
<template #input>
<vant-file-upload :del="false" :files.sync="o.zcfile"
view></vant-file-upload>
</template>
</van-field>
</van-collapse-item>
</van-collapse>
<van-empty class="custom-image"
description="暂无数据"
image="/none.svg"
style="z-index: 1;position: fixed;height: 75%"
v-if="viewData.bdData&&viewData.bdData.length==0"
></van-empty>
</van-tab>
</van-tabs>
</van-popup>
</div>
<script>
let vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
collapseName: "",
viewTabs: 1,
viewData: {
bdData: []
},
viewPdShow: false,
zcztColumns: ["在用", "闲置", '未使用', '报废', '校外转入', '校内转入', '其它'],
zcztShow: false,
pdztColumns: ["已盘点", "盘亏", "盘盈", "报废"],
pdztShow: false,
wpdztColumns: ["盘亏", "报废已清拖", "其他"],
wpdztShow: false,
userList: [],
zcbdshrShow: false,
zcbdsjShow: false,
zcrksjShow: false,
zmjzShow: false,
addPdShow: false,
yearOption: [],
pdPlanList: [],
zcLxList: [
{value: '', text: "全部类型"},
{value: 2, text: "校工会"},
{value: 1, text: "院级工会"},
],
pageForm: {
isPd: 2,
zcghlx: ''
},
zclyrnameShow: false
}
},
components: {
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
},
methods: {
doHzExcel() {
window.open("/platform/zcgl/gdzcbg/doHzExcel?zcpdid=" + this.pageForm.zcpdid + "&zcghlx=" + this.pageForm.zcghlx)
},
doDelete(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: '确认要删除本次盘点吗?',
}).then(async () => {
const loading = this.$toast.loading({
message: '删除中...',
forbidClick: true,
overlay: true,
duration: 0
})
const resp = await $.post("/platform/zcgl/gdzcbg/doPdDelete", {zcbdid: o.zcbdid})
if (resp.code === 0) {
await this.doSearch()
this.$toast.success(resp.msg);
} else {
this.$toast.fail(resp.msg);
}
loading.close()
})
},
async openVIewTab(val) {
if (val === 2) {
await this.getPdData(this.viewData.zcid)
if (this.viewData.bdData && this.viewData.bdData.length > 0) {
this.collapseName = 0
}
} else {
this.collapseName = ""
}
},
async openView(row) {
this.viewTabs = 1
this.viewData = clone(row)
this.viewPdShow = true
},
async getPdData(zcid) {
const data = await $.post("/platform/zcgl/gdzcbg/queryChangeData", {zcid: zcid})
if (data.code === 0) {
data.data.forEach(v => {
if (v.zcfile) {
v.zcfile = JSON.parse(v.zcfile)
}
})
this.$set(this.viewData, "bdData", data.data)
} else {
this.$set(this.viewData, "bdData", [])
}
},
onUserSelect(u) {
this.$set(this.formData, 'zcbdshrid', u.id)
this.$set(this.formData, 'zcbdshr_name', u.name)
if (this.formData.zcghlx === "2") {
this.$set(this.formData, "zcnowlydwh", "工会")
} else {
this.$set(this.formData, "zcnowlydwh", u.unionname)
this.$set(this.formData, "zcnowlydwhid", u.unionid)
}
this.$set(this.formData, "mobile", u.mobile)
this.zcbdshrShow = false
},
onLyrUserSelect(u) {
console.log(u)
this.$set(this.formData, "zclyrgh", u.loginname)
this.$set(this.formData, "zclyrname", u.username)
if (this.formData.zcghlx === "2") {
this.$set(this.formData, "zclydwh", "工会")
} else {
this.$set(this.formData, "zclydwh", u.unionname)
}
this.$set(this.formData, "zclydwhid", u.unionid)
this.zclyrnameShow = false
},
onConfirmZcbdsj(date) {
this.$set(this.formData, "zcbdsj", moment(date).format('YYYY/MM/DD'))
this.zcbdsjShow = false
},
onConfirmZcrksj(date) {
this.$set(this.formData, "zcgzrq", moment(date).format('YYYY/MM/DD'))
this.zcrksjShow = false
},
async onSubmit() {
let formData = clone(this.formData)
formData.pdPlanId = this.pageForm.zcpdid
formData.zcFile = JSON.stringify(formData.zcFile)
const resp = await $.post("/platform/zcgl/gdzcbg/doSubmit", formData)
if (resp.code === 0) {
this.$toast.success('新增盘点成功');
// await this.doSearch();
this.tableData = this.tableData.filter(t => t.zcid !== formData.zcid)
this.pageForm.totalCount = this.pageForm.totalCount - 1
this.addPdShow = false
} else {
this.$toast.fail('新增盘点失败');
}
},
async openPd(row) {
this.formData = row
this.$set(this.formData, "zcgzrq", row.zcgzrq)
this.$set(this.formData, "zcbdsj", moment(new Date()).format('YYYY/MM/DD'))
this.$set(this.formData, "zcnowcfdmc", row.zccfdmc)
this.addPdShow = true
},
async userRemoteMethod(event) {
if (event) {
let arr = []
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}") {
arr = await searchUser(event, null, null, null, null)
} else {
arr = await searchUser(event, "${@shiro.getPrincipalProperty('unit').getUnionid()}", null, null, null)
}
this.userList = arr.map(v => {
return {
name: v.username + "(" + v.loginname + ")",
id: v.id,
mobile: v.mobile,
unionname: v.unionname,
loginname: v.loginname,
username: v.username,
}
})
this.zcbdshrShow = true
}
},
async lyrRemoteMethod(event) {
if (event) {
let arr = []
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}") {
arr = await searchUser(event, null, null, null, null)
} else {
arr = await searchUser(event, "${@shiro.getPrincipalProperty('unit').getUnionid()}", null, null, null)
}
this.userList = arr.map(v => {
return {
name: v.username + "(" + v.loginname + ")",
id: v.id,
mobile: v.mobile,
unionname: v.unionname,
loginname: v.loginname,
username: v.username,
unionid: v.unionid,
}
})
this.zclyrnameShow = true
}
},
async doSearch() {
this.tableKey = new Date().getTime()
this.pageForm.pageNumber = 1
this.finished = false;
this.pageForm.totalCount = 0
this.tableData = []
await this.onLoad();
},
async onLoad() {
this.mLoading = true
const res = await $.post('/platform/zcgl/gdzcbg/data', this.pageForm)
const {code, data} = res
if (this.refreshing) {
this.tableData = [];
this.refreshing = false;
}
this.mLoading = false;
if (code === 0) {
this.tableData = this.tableData.concat(data.list)
this.pageForm.totalCount = data.totalCount
if (this.tableData.length === 0) {
this.finished = true;
} else {
if (this.tableData.length >= this.pageForm.totalCount) {
this.finished = true;
this.pageForm.pageNumber++
} else {
this.pageForm.pageNumber++
}
}
}
},
async getPdPlan() {
const resp = await $.post("/platform/zcgl/gdzcbg/getPdPlan", {year: this.pageForm.year})
resp.data.forEach(v => {
const startDate = moment(v.startDate).format('YYYY-MM-DD')
const endDate = moment(v.endDate).format('YYYY-MM-DD')
v.text = startDate + "至" + endDate
v.value = v.id
v.isShow = (moment().format('YYYY-MM-DD hh:mm:ss') > v.startDate && moment().format('YYYY-MM-DD hh:mm:ss') < v.endDate)
})
this.pdPlanList = resp.data
if (this.pdPlanList && this.pdPlanList.length > 0) {
this.$set(this.pageForm, "zcpdid", this.pdPlanList[0].id)
} else {
this.$set(this.pageForm, "zcpdid", '')
}
//
}
},
async created() {
const toast = vant.Toast.loading({
duration: 0, // 持续展示 toast
forbidClick: true,
message: '数据查询中',
});
this.mLoading = true
for (let i = new Date().getFullYear() - 5; i <= new Date().getFullYear(); i++) {
this.yearOption.unshift({value: i, text: i + '年'},)
}
this.$set(this.pageForm, "year", this.yearOption[0].value)
await this.getPdPlan();
setTimeout(async () => {
toast.clear();
this.mLoading = false
await this.doSearch()
}, 500)
}
})
</script>
<!--#
}
#-->