first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="福利发放明细" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<welfare ref="welfare" :is_icon="false" @find="findOne"></welfare>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
components: {
|
||||
'welfare': httpVueLoader('/components/welfare/common.vue'),
|
||||
},
|
||||
methods: {
|
||||
findOne(id) {
|
||||
window.location.href = '/mobile/welfare/info?lp_id=' + id
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
const welfareMixins = {
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: '',
|
||||
addressList: [],
|
||||
isReceive: false,
|
||||
isChoice: false,
|
||||
isAutoSelect: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async selectAddressList() {
|
||||
const resp = await $.get('/mobile/welfare/mine/selectUserAddress')
|
||||
this.addressList = resp.data
|
||||
},
|
||||
async getReceive() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: this.projectId})
|
||||
// this.isReceive = resp.data
|
||||
},
|
||||
async getChoice() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isChoice', {projectId: this.projectId})
|
||||
this.isChoice = resp.data
|
||||
},
|
||||
async getAutoSelect() {
|
||||
const resp = await $.get('/mobile/welfare/mine/isAutoSelect', {projectId: this.projectId})
|
||||
this.isAutoSelect = resp.data
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<van-tabbar v-model="tarBarActive">
|
||||
<van-tabbar-item icon="home-o" url="/mobile/welfare/list/index">首页</van-tabbar-item>
|
||||
<van-tabbar-item icon="manager-o" url="/mobile/welfare/mine/index">我的</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
@@ -0,0 +1,23 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-cell-group inset>
|
||||
<van-cell title="单元格" value="内容"></van-cell>
|
||||
<van-cell title="单元格" value="内容" label="描述信息"></van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,243 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.welfare_card {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.welfare_card .receive_img {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
.van-card__header {
|
||||
height: 102px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-sticky>
|
||||
<van-nav-bar title="福利列表" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<van-sticky>
|
||||
<van-tabs v-model="pageForm.tabName" @change="tabChange">
|
||||
<van-tab title="进行中" name="ing"></van-tab>
|
||||
<van-tab title="已结束" name="end"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<template v-if="vLoading && !vLoading.value">
|
||||
<van-list :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
v-if="tableData && tableData.length>0"
|
||||
v-model="loading"
|
||||
@load="pageData">
|
||||
<template v-for="o in tableData">
|
||||
<div class="welfare_card">
|
||||
<van-card @click="welfareClick(o)">
|
||||
<template #thumb>
|
||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+o.cover" alt=""
|
||||
class="van-image__img"
|
||||
v-if="o.cover">
|
||||
<image v-else src="/assets/mobile/svg/welfare/welfareHome.svg"></image>
|
||||
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;line-height: 30px;">
|
||||
{{o.name}}
|
||||
</div>
|
||||
</template>
|
||||
<template #desc>
|
||||
<div>
|
||||
<template v-if="new Date().getTime()>moment(o.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(o.choiceTimeEnd).valueOf()">
|
||||
<div style="flex: 1.5">
|
||||
选择开始时间:
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div style="flex: 1.5">
|
||||
选择结束时间:
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="flex: 1.5">
|
||||
选择开始时间:
|
||||
{{moment(o.choiceTimeStart).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
<div style="flex: 1.5">
|
||||
选择结束时间:
|
||||
{{moment(o.choiceTimeEnd).format('YYYY/MM/DD HH:mm')}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- <div class="van-ellipsis" style="flex: 1">福 利 名 称:{{o.gift}}</div>-->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</van-card>
|
||||
<div class="receive_img">
|
||||
<template v-if="new Date().getTime()>moment(o.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(o.choiceTimeEnd).valueOf()">
|
||||
<image v-if="o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/yxz.png"></image>
|
||||
<image v-else-if="!o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/wxz.png"></image>
|
||||
<image v-else-if="o.isSelect&&o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/yxz.png"></image>
|
||||
<image v-else-if="o.isSelect&&!o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/wxz.png"></image>
|
||||
</template>
|
||||
<template v-else>
|
||||
<!-- <div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179)"
|
||||
v-if="o.isReceive">已发放
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179)"
|
||||
v-else>未发放
|
||||
</div>-->
|
||||
<div style="size: 10px">
|
||||
<image v-if="o.isReceive"
|
||||
src="/assets/mobile/svg/welfare/ylq.png"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.png"></image>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</van-list>
|
||||
<van-empty v-else description="暂无数据"></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
tabName: 'ing',
|
||||
tarBarActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async welfareClick(o) {
|
||||
const {
|
||||
id,
|
||||
provideMode,
|
||||
flexible,
|
||||
provideTimeEnd,
|
||||
provideTimeStart,
|
||||
choiceTimeEnd,
|
||||
choiceTimeStart
|
||||
} = o
|
||||
const resp = await $.get('/mobile/welfare/mine/isReceive', {projectId: id})
|
||||
const isReceive = resp.data
|
||||
if (this.tabName === 'ing') {
|
||||
if (flexible) {
|
||||
if (moment().valueOf() < moment(provideTimeEnd).valueOf() &&
|
||||
moment().valueOf() > moment(provideTimeStart).valueOf()) {
|
||||
|
||||
if (moment().valueOf() > moment(choiceTimeEnd).valueOf()) {
|
||||
if (!o.isSelect) {
|
||||
vant.Dialog.alert({
|
||||
title: '提醒',
|
||||
message: '您在规定时间内没有选择,无法领取!',
|
||||
}).then(() => {
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
location.href = '/mobile/welfare/list/receive?projectId=' + id
|
||||
|
||||
} else {
|
||||
location.href = '/mobile/welfare/list/receive_success?projectId=' + id + '&provideMode=' + provideMode
|
||||
}
|
||||
} else if (this.tabName === 'end') {
|
||||
if (isReceive) {
|
||||
location.href = '/mobile/welfare/list/receive_success?projectId=' + id + '&provideMode=' + provideMode
|
||||
} else {
|
||||
this.$toast('福利发放已结束')
|
||||
}
|
||||
}
|
||||
},
|
||||
async pageData() {
|
||||
this.mLoading = true
|
||||
const resp = await $.post('/mobile/welfare/list/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
if (resp.data.list.length === 0) {
|
||||
this.tableData = []
|
||||
this.loading = false
|
||||
this.finished = true
|
||||
} else {
|
||||
this.tableData = this.tableData.concat(resp.data.list)
|
||||
}
|
||||
if (this.tableData.length === resp.data.totalCount) {
|
||||
this.finished = true
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
this.loading = false;
|
||||
this.mLoading = false
|
||||
},
|
||||
tabChange(val) {
|
||||
this.tabName = val
|
||||
this.startLoading()
|
||||
this.tableData = []
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
this.closeLoading()
|
||||
},
|
||||
init() {
|
||||
this.startLoading()
|
||||
this.tarBarActive = Number(GetQueryString("tarBarActive"))
|
||||
this.pageForm.tabName = 'ing'
|
||||
this.onRefresh()
|
||||
this.closeLoading()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
},
|
||||
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.onRefresh()
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,57 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.desc {
|
||||
padding: 10px;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 750px) {
|
||||
img {
|
||||
background-size: contain;
|
||||
width: 90%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="history.back()" left-arrow
|
||||
title="详情"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div class="desc" v-html="desc"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
desc: null
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
created() {
|
||||
const id = GetQueryString("optionId")
|
||||
if (id) {
|
||||
this.desc = window.localStorage.getItem('welfare_option_desc_' + id)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,72 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
#app {
|
||||
background: #ffffff;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar :title="title" left-arrow
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div style="text-align: center;margin-top: 200px;">
|
||||
<svg t="1642388297798" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="3082" width="80" height="80">
|
||||
<path d="M37.36963 583.753525a440.246475 430.879529 90 1 0 861.759058 0 440.246475 430.879529 90 1 0-861.759058 0Z"
|
||||
fill="#07C160" p-id="3083"></path>
|
||||
<path d="M247.376566 529.799914L391.065522 674.425565l299.742281-299.742281 59.948456 59.948456-359.690737 358.754043L187.240771 589.748371z"
|
||||
fill="#FFFFFF" p-id="3084"></path>
|
||||
<path d="M955.330366 240.548613h-83.927839a30.723584 30.723584 0 0 0-31.472939 30.161567v1.124034a30.910923 30.910923 0 0 0 30.348906 31.472939H955.330366a30.723584 30.723584 0 0 0 31.2856-30.348906v-1.124033A30.536245 30.536245 0 0 0 955.330366 240.548613z m-72.125487-168.605033a32.222295 32.222295 0 0 0-43.837308 4.121457L786.725333 141.071644a31.285601 31.285601 0 0 0 48.146104 39.903191l52.080221-64.819268a30.536245 30.536245 0 0 0-2.810084-42.900614zM683.126907 0.005433a30.910923 30.910923 0 0 0-31.47294 30.161567v84.864533a30.723584 30.723584 0 0 0 30.348906 31.285601h1.124034a30.536245 30.536245 0 0 0 31.2856-30.161567V31.291033A30.723584 30.723584 0 0 0 684.25094 0.005433z"
|
||||
fill="#07C160" p-id="3085"></path>
|
||||
</svg>
|
||||
<div style="margin-top: 20px;">{{code=='2' ? '您已领取' : '您已选择'}}</div>
|
||||
<div style="margin: 20px auto 0px auto;width: 300px;word-break: break-all">
|
||||
福利品: {{selectOptionNames}}
|
||||
</div>
|
||||
<van-button style="margin-top: 20px;width: 100px" size="small" hairline type="primary"
|
||||
@click="back">返回
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
selectOptionNames: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getUserSelection() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getUserSelect', {projectId: this.projectId})
|
||||
this.selectOptionNames = resp.data
|
||||
},
|
||||
back() {
|
||||
window.history.go(-1)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = GetQueryString("projectId")
|
||||
if (id) {
|
||||
this.projectId = id
|
||||
this.getUserSelection()
|
||||
}
|
||||
this.provideMode = GetQueryString("provideMode")
|
||||
this.code = GetQueryString("code")
|
||||
this.title = this.code === '1' ? "选择结果" : '领取结果'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,79 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
width: 160px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.van-button {
|
||||
position: initial !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-list
|
||||
v-if="addressList && addressList.length>0 "
|
||||
v-model="chosenAddressId"
|
||||
:list="addressList"
|
||||
default-tag-text="默认"
|
||||
@add="onAdd"
|
||||
@edit="onEdit"
|
||||
></van-address-list>
|
||||
|
||||
<van-empty v-else description="暂无地址">
|
||||
<van-button round type="danger" class="bottom-button" @click="onAdd">新增地址</van-button>
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
chosenAddressId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAdd() {
|
||||
location.replace('/mobile/welfare/mine/addressEdit')
|
||||
},
|
||||
onEdit(item, index) {
|
||||
location.replace('/mobile/welfare/mine/addressEdit?id=' + item.id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
await this.selectAddressList()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.selectAddressList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-edit
|
||||
ref="address"
|
||||
:area-list="areaList"
|
||||
:show-delete="addressId"
|
||||
:address-info="addressInfo"
|
||||
show-set-default
|
||||
show-search-result
|
||||
tel-maxlength="11"
|
||||
:area-columns-placeholder="['请选择', '请选择', '请选择']"
|
||||
@save="onSave"
|
||||
@delete="onDelete"
|
||||
></van-address-edit>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/areaList.js"){};include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
areaList: areaList,
|
||||
addressInfo: {},
|
||||
addressId: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async onSave(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
content.userName = content.name
|
||||
const resp = await $.post('/mobile/welfare/mine/doSaveUserAddress', content)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
let welfareProjectId = window.sessionStorage.getItem("welfareProjectId");
|
||||
if (welfareProjectId) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + welfareProjectId)
|
||||
window.sessionStorage.removeItem("welfareProjectId");
|
||||
} else {
|
||||
location.replace('/mobile/welfare/mine/address')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
async onDelete(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '删除中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/welfare/mine/deleteAddress', {id: content.id})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.location.replace('/mobile/welfare/mine/address')
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
this.addressId = GetQueryString("id") === '' ? null : GetQueryString("id")
|
||||
if (this.addressId) {
|
||||
const resp = await $.get('/mobile/welfare/mine/findOneUserAddress', {id: this.addressId})
|
||||
if (resp.code === 0) {
|
||||
this.addressInfo = resp.data
|
||||
}
|
||||
this.closeLoading()
|
||||
} else {
|
||||
this.addressInfo.name = "${@shiro.getPrincipalProperty('username')}";
|
||||
this.closeLoading()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,63 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="个人信息" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div class="mt10" v-if="vLoading && !vLoading.value">
|
||||
<van-cell-group class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">个人信息</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的福利" url="/mobile/welfare/mine/myWelfare">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="star"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的地址" url="/mobile/welfare/mine/address">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="location"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的签名" url="/mobile/welfare/mine/sign">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="coupon"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
padding: 10px 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
background: radial-gradient(circle at left bottom, transparent 10px, #fff 0) top left / 40% 50% no-repeat,
|
||||
radial-gradient(circle at left top, transparent 10px, #fff 0) bottom left /40% 50% no-repeat,
|
||||
radial-gradient(circle at right bottom, transparent 10px, #fff 0) top right /60% 50% no-repeat,
|
||||
radial-gradient(circle at right top, transparent 10px, #fff 0) bottom right /60% 50% no-repeat;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle .left_img {
|
||||
min-width: 100px;
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.base-one-circle .right_content {
|
||||
flex: 1;
|
||||
max-width: calc(100% - 120px);
|
||||
width: calc(100% - 120px);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.welfare_name {
|
||||
width: calc(100% - 50px);;
|
||||
max-width: 100%;
|
||||
word-break: break-word;
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.welfare_time {
|
||||
height: 25px;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
color: gray
|
||||
}
|
||||
|
||||
.welfare_gift {
|
||||
font-size: 12px;
|
||||
color: gray;
|
||||
margin-top: 10px;
|
||||
line-height: 15px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.receive_img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
border-radius: 10px;
|
||||
object-fit: revert;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的福利" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!-- <van-tabs v-model="tabActive" @change="tabChange">
|
||||
<van-tab title="全部"></van-tab>
|
||||
<van-tab title="已领取"></van-tab>
|
||||
<van-tab title="未领取"></van-tab>
|
||||
</van-tabs>-->
|
||||
|
||||
<div class="content">
|
||||
<template v-for="item in welfareList">
|
||||
<div class="base-one-circle">
|
||||
<div class="left_img">
|
||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover" alt=""
|
||||
class="van-image__img"
|
||||
v-if="item.cover">
|
||||
<image v-else src="/assets/mobile/svg/welfare/welfareHome.svg"></image>
|
||||
</div>
|
||||
<div class="right_content" @click="openView(item)">
|
||||
<div class="welfare_name van-ellipsis">【{{item.name}}】</div>
|
||||
<div class="welfare_time">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div style="flex: 1">选择开始时间:{{item.choiceTimeStart}}</div>
|
||||
<div style="flex: 1">选择结束时间:{{item.choiceTimeEnd}}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="flex: 1">发放开始时间:{{item.provideTimeStart}}</div>
|
||||
<div style="flex: 1">发放结束时间:{{item.provideTimeEnd}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="welfare_gift">
|
||||
<div style="width: 60px;" v-if="item.isReceive">已领礼品:</div>
|
||||
<div style="width: 60px;" v-if="!item.isReceive">已选礼品:</div>
|
||||
<div style="width: calc(100% - 60px);word-break: break-word">
|
||||
{{item.flexible?item.welfareOptionName:item.gift}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="welfare_gift" v-if="item.provideMode===3">
|
||||
<div style="width: 60px;">快递单号:</div>
|
||||
<div>
|
||||
{{item.courierNumber}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="receive_img">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-if="item.isSelect&&!item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="!item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
</template>
|
||||
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
fullWelfareList: [],
|
||||
welfareList: [],
|
||||
tabActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + item.id + '&type=view')
|
||||
},
|
||||
async getData() {
|
||||
const resp = await $.post('/mobile/welfare/mine/getMyWelfare', {tabActive: this.tabActive})
|
||||
this.fullWelfareList = resp.data
|
||||
this.welfareList = resp.data
|
||||
},
|
||||
tabChange(val) {
|
||||
if (val === 0) {
|
||||
this.welfareList = this.fullWelfareList
|
||||
}
|
||||
switch (val) {
|
||||
case 0: {
|
||||
this.welfareList = this.fullWelfareList
|
||||
break
|
||||
}
|
||||
case 1: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => v.isReceive || [1].includes(v.provideMode))
|
||||
break
|
||||
}
|
||||
case 2: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => !v.isReceive)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.getData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
#signature {
|
||||
/*height: calc(100vh - 136px);*/
|
||||
height: 300px;
|
||||
background: #fff;
|
||||
border: 1px dashed grey;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.button-operation {
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
/*bottom: 0;*/
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.button-operation > div {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.button-operation > div > button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的签名" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div id="signature"></div>
|
||||
<div class="button-operation">
|
||||
<div>
|
||||
<van-button type="danger" @click="reset">重写</van-button>
|
||||
</div>
|
||||
<div>
|
||||
<van-button type="info" @click="save">保存</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
userSign: {
|
||||
data: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
const val = $('#signature').jSignature("getData", "default")
|
||||
$('#signature').jSignature('clear')
|
||||
this.userSign.data = null
|
||||
},
|
||||
async save() {
|
||||
const slength = $("#signature").jSignature('getData', 'native').length
|
||||
if (slength === 0 && !this.userSign.data) {
|
||||
this.$toast('请先签字!')
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.userSign.data = $('#signature').jSignature("getData", "default")
|
||||
const resp = await $.post('/mobile/welfare/mine/saveMySignature', this.userSign)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
this.$toast.success('保存成功!')
|
||||
}
|
||||
},
|
||||
async getSignature() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getMySignature')
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
if (this.userSign.data) {
|
||||
$('#signature').jSignature("setData", resp.data.data)
|
||||
// $('#signature').jSignature("importData", resp.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
$('#signature').jSignature({
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
lineWidth: 1
|
||||
})
|
||||
document.body.addEventListener('touchmove', function (e) {
|
||||
e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
|
||||
}, {passive: false}); //passive 参数不能省略,用来兼容ios和android
|
||||
},
|
||||
created() {
|
||||
this.getSignature()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,84 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.van-dialog__confirm {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.van-dialog {
|
||||
width: 95%;
|
||||
height: 85%;
|
||||
margin-top: 5%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="福利签收" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<welfare ref="welfare" @sign="openDialog"></welfare>
|
||||
|
||||
<van-dialog id="dialog" v-model="showSign" title="请签字确认" show-cancel-button @confirm="signFor"
|
||||
@close="$refs.signature.reset()">
|
||||
<mobile-sign ref="signature" :my_sign.sync="sign"></mobile-sign>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
showSign: false,
|
||||
data: {},
|
||||
sign: ""
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'welfare': httpVueLoader('/components/welfare/common.vue'),
|
||||
'mobile-sign': httpVueLoader('/components/sign/mobileSign.vue'),
|
||||
},
|
||||
methods: {
|
||||
signFor() {
|
||||
this.$refs.signature.submitSign()
|
||||
|
||||
if (!this.sign) {
|
||||
this.$toast('请签名再提交')
|
||||
return
|
||||
}
|
||||
const {lp_id, txfl} = this.data
|
||||
|
||||
this.$toast.loading({message: '提交中...', forbidClick: true,});
|
||||
|
||||
$.post("/mobile/welfare/signing/signFor", {
|
||||
lp_id: lp_id,
|
||||
elasticity_name: txfl,
|
||||
sign: this.sign
|
||||
}, (res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('签收成功');
|
||||
this.$refs.welfare.onRefresh()
|
||||
} else {
|
||||
this.$toast.fail('签收失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
openDialog(row) {
|
||||
this.data = row
|
||||
if (!row.txfl && row.hxlp.length > 0) {
|
||||
this.$toast('未选择弹性福利');
|
||||
return
|
||||
}
|
||||
this.showSign = true
|
||||
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.signature.getMySign()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,72 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar :title="lp_ms" left-arrow placeholder fixed @click-left="history.back()"></van-nav-bar>
|
||||
|
||||
<van-search v-model="pageForm.username" placeholder="请输入姓名" @search="onSearch"></van-search>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
||||
<van-list v-model="loading" :finished="finished" :finished-text="tableData.length>0?'没有更多了':''"
|
||||
@load="pageData">
|
||||
<van-tabs color="#409EFF" title-active-color="#409EFF" animated v-model="activeName" @click="switchTab">
|
||||
<van-tab title="全部" name="all"></van-tab>
|
||||
<van-tab title="已签收" name="already"></van-tab>
|
||||
<van-tab title="未签收" name="not"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-cell-group style="padding: 10px">
|
||||
|
||||
<van-empty v-if="tableData.length==0" class="custom-image" image="/none.svg"
|
||||
description="暂无数据">
|
||||
</van-empty>
|
||||
|
||||
<van-cell class="cell-card" v-for="item in tableData" :title="item.username">
|
||||
<template>
|
||||
<span>{{item.sign_time}}</span>
|
||||
</template>
|
||||
|
||||
<template #right-icon>
|
||||
<van-tag style="margin-left: 20px;" v-if="item.isqs" type="success" round>已签收</van-tag>
|
||||
<van-tag style="margin-left: 20px;" v-else type="warning" round>未签收</van-tag>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
</van-list>
|
||||
</van-pull-refresh>
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [refreshSearchMixins],
|
||||
data() {
|
||||
return {
|
||||
activeName: "all",
|
||||
lp_ms: "",
|
||||
pageForm: {
|
||||
pageSize: 50,
|
||||
username: "",
|
||||
lp_id: "",
|
||||
is_sign: "",
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async switchTab() {
|
||||
this.pageForm.is_sign = this.activeName
|
||||
await this.onRefresh()
|
||||
},
|
||||
async onSearch(val) {
|
||||
this.pageForm.username = val
|
||||
await this.onRefresh()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageForm.lp_id = GetQueryString('lp_id')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user