mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-18 05:06:44 +08:00
修改完善增员日志功能
This commit is contained in:
@@ -13,7 +13,7 @@ export function getAgentPersonnelList(data) {
|
|||||||
// 活动量统计周报
|
// 活动量统计周报
|
||||||
export function queryWeekly(data) {
|
export function queryWeekly(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/agent/activityRecord/queryWeekly', 0),
|
url: getUrl('/agent/activityRecord/queryWeekly', 1),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
@@ -22,7 +22,34 @@ export function queryWeekly(data) {
|
|||||||
// 查询日志页面人才库列表
|
// 查询日志页面人才库列表
|
||||||
export function queryListFirst(data) {
|
export function queryListFirst(data) {
|
||||||
return request({
|
return request({
|
||||||
url: getUrl('/agent/personnel/queryListFirst', 0),
|
url: getUrl('/agent/personnel/queryListFirst', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询日志页面增员列表
|
||||||
|
export function queryRecordList(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/activityRecord/queryList', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日志详情查询
|
||||||
|
export function queryRecordDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/activityRecord/queryDetail', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增日志
|
||||||
|
export function saveRecord(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/agent/activityRecord/saveOrUpdate', 1),
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<van-cell :title="ActivityLogInfo.name" :is-link="isEdit" :icon="ActivityLogInfo.avatarUrl" value-class="text-left">
|
<van-cell-group>
|
||||||
|
<van-cell :title="ActivityLogInfo.name" title-class="ml10" :is-link="isEdit" value-class="text-left">
|
||||||
|
<van-icon slot="icon" :name="ActivityLogInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="22" />
|
||||||
<span class="mr20">{{ ActivityLogInfo.age }}</span>
|
<span class="mr20">{{ ActivityLogInfo.age }}</span>
|
||||||
<span>{{ ActivityLogInfo.flag }}</span>
|
<span>{{ ActivityLogInfo.type == 0 ? '同业' : '白板' }}</span>
|
||||||
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" @click="toEdit" />
|
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" :color="isEdit ? '#1989fa' : 'transparent'" size="24" @click="toEdit" />
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -23,18 +26,19 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
|
recordCode: '',
|
||||||
name: '王辉',
|
name: '王辉',
|
||||||
avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
age: '35岁',
|
age: '35岁',
|
||||||
flag: '同业',
|
type: '同业',
|
||||||
currentTime: ''
|
recordDate: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isEdit: true
|
defaultAcatarUrl: 'https://b.yzcdn.cn/vant/icon-demo-1126.png'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -45,23 +49,20 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/manpower/ActivityLog/Edit`
|
url: location.origin + `/#/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}`,
|
||||||
|
forbidSwipeBack: '1'
|
||||||
},
|
},
|
||||||
routerInfo: { path: '/manpower/ActivityLog/Edit' }
|
routerInfo: { path: `/manpower/ActivityLog/Edit?code=${this.ActivityLogInfo.recordCode}` }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currentTime() {
|
isEdit() {
|
||||||
return this.ActivityLogInfo.currentTime
|
console.log(this.ActivityLogInfo.recordDate)
|
||||||
}
|
if (this.ActivityLogInfo.recordDate === formatDate.formatDate().split(' ')[0]) {
|
||||||
},
|
return true
|
||||||
watch: {
|
|
||||||
currentTime(newVal) {
|
|
||||||
if (newVal === formatDate.formatDate().split(' ')[0]) {
|
|
||||||
this.isEdit = true
|
|
||||||
} else {
|
} else {
|
||||||
this.isEdit = false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<van-cell-group>
|
||||||
<van-cell :title="talentPoolInfo.name" title-class="ml10" is-link value-class="text-left">
|
<van-cell :title="talentPoolInfo.name" title-class="ml10" is-link value-class="text-left">
|
||||||
<van-icon slot="icon" :name="talentPoolInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="24" />
|
<van-icon slot="icon" :name="talentPoolInfo.avatarUrl || defaultAcatarUrl" style="line-height: inherit;" size="24" />
|
||||||
<span>{{ talentPoolInfo.sameCompany }}</span>
|
<span>{{ talentPoolInfo.sameCompany }}</span>
|
||||||
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" color="#1989fa" size="24" />
|
<van-icon slot="right-icon" name="edit" style="line-height: inherit;" color="#1989fa" size="24" />
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -8,4 +8,10 @@ export default {
|
|||||||
'/agent/activityRecord/queryWeekly': mockBaseUrl + '/agent/activityRecord/queryWeekly',
|
'/agent/activityRecord/queryWeekly': mockBaseUrl + '/agent/activityRecord/queryWeekly',
|
||||||
// 查询日志页面人才库列表
|
// 查询日志页面人才库列表
|
||||||
'/agent/personnel/queryListFirst': mockBaseUrl + '/agent/personnel/queryListFirst',
|
'/agent/personnel/queryListFirst': mockBaseUrl + '/agent/personnel/queryListFirst',
|
||||||
|
// 查询日志页面增员列表
|
||||||
|
'/agent/activityRecord/queryList': mockBaseUrl + '/agent/activityRecord/queryList',
|
||||||
|
// 日志详情查询
|
||||||
|
'/agent/activityRecord/queryDetail': mockBaseUrl + '/agent/activityRecord/queryDetail',
|
||||||
|
// 新增日志
|
||||||
|
'/agent/activityRecord/saveOrUpdate': mockBaseUrl + '/agent/activityRecord/saveOrUpdate'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,27 +27,27 @@
|
|||||||
<van-collapse v-model="personnelNames" v-else>
|
<van-collapse v-model="personnelNames" v-else>
|
||||||
<van-collapse-item name="1" title-class="fs16 fwb">
|
<van-collapse-item name="1" title-class="fs16 fwb">
|
||||||
<div slot="title" class="flex justify-content-s align-items-c">人才库 <van-icon name="plus" /></div>
|
<div slot="title" class="flex justify-content-s align-items-c">人才库 <van-icon name="plus" /></div>
|
||||||
<TalentPoolItem :talentPoolInfo="talentPoolInfo"> </TalentPoolItem>
|
<TalentPoolItem :talentPoolInfo="info" v-for="(info, index) in personnelsList" :key="index"> </TalentPoolItem>
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
|
<p class="p15 text-right blue" v-if="personnelsList.length != 0">查看全部>>></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 当日增员活动日志 -->
|
<!-- 当日增员活动日志 -->
|
||||||
<div class="bg-white">
|
<div class="bg-white">
|
||||||
<div class="p15">
|
<div class="p15" v-if="recordList.length == 0">
|
||||||
<p class="fs16 fwb">当日增员活动日志</p>
|
<p class="fs16 fwb">当日增员活动日志</p>
|
||||||
<div class="text-center van-hairline--top">
|
<div class="text-center van-hairline--top">
|
||||||
<van-icon name="add-square" size="50" color="#1989fa" @click="toEdit" />
|
<van-icon name="add-square" size="50" color="#1989fa" @click="toEdit" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<van-collapse v-model="personnelNames">
|
<van-collapse v-model="recordNames" v-else>
|
||||||
<van-collapse-item name="1" title-class="fs16 fwb">
|
<van-collapse-item name="1" title-class="fs16 fwb">
|
||||||
<div slot="title" class="flex justify-content-s align-items-c">当日增员活动日志 <van-icon name="plus" /></div>
|
<div slot="title" class="flex justify-content-s align-items-c">当日增员活动日志 <van-icon name="plus" @click="toEdit" /></div>
|
||||||
<ActivityLogItem :ActivityLogInfo="ActivityLogInfo"></ActivityLogItem>
|
<ActivityLogItem :ActivityLogInfo="info" v-for="(info, index) in recordList" :key="index"></ActivityLogItem>
|
||||||
<ActivityLogItem :ActivityLogInfo="ActivityLogInfo"></ActivityLogItem>
|
|
||||||
</van-collapse-item>
|
</van-collapse-item>
|
||||||
</van-collapse>
|
</van-collapse>
|
||||||
<p class="p15 text-right blue" @click="toList">查看全部>>></p>
|
<p class="p15 text-right blue" v-if="recordList.length != 0" @click="toList">查看全部>>></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -56,7 +56,7 @@ import formatDate from '@/assets/js/utils/date-utils'
|
|||||||
import { Collapse, CollapseItem, Grid, GridItem } from 'vant'
|
import { Collapse, CollapseItem, Grid, GridItem } from 'vant'
|
||||||
import TalentPoolItem from '@/components/ebiz/manpower/TalentPoolItem'
|
import TalentPoolItem from '@/components/ebiz/manpower/TalentPoolItem'
|
||||||
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
|
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
|
||||||
import { queryWeekly, queryListFirst } from '@/api/ebiz/manpower/manpower'
|
import { queryWeekly, queryListFirst, queryRecordList } from '@/api/ebiz/manpower/manpower'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -71,16 +71,18 @@ export default {
|
|||||||
return {
|
return {
|
||||||
weeklyNames: ['1'],
|
weeklyNames: ['1'],
|
||||||
personnelNames: ['1'],
|
personnelNames: ['1'],
|
||||||
|
recordNames: ['1'],
|
||||||
talentPoolInfo: {
|
talentPoolInfo: {
|
||||||
name: '王辉',
|
name: '王辉',
|
||||||
sameCompany: '中国人寿'
|
sameCompany: '中国人寿'
|
||||||
},
|
},
|
||||||
ActivityLogInfo: {
|
ActivityLogInfo: {
|
||||||
|
recordCode: '',
|
||||||
name: '王辉',
|
name: '王辉',
|
||||||
avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
age: '35岁',
|
age: '35岁',
|
||||||
flag: '同业',
|
type: '同业',
|
||||||
currentTime: formatDate.formatDate().split(' ')[0]
|
recordDate: formatDate.formatDate().split(' ')[0]
|
||||||
},
|
},
|
||||||
// 日志统计周报信息
|
// 日志统计周报信息
|
||||||
weeklyInfo: {
|
weeklyInfo: {
|
||||||
@@ -88,12 +90,15 @@ export default {
|
|||||||
sameTrade: '' // 同业
|
sameTrade: '' // 同业
|
||||||
},
|
},
|
||||||
// 人才库列表
|
// 人才库列表
|
||||||
personnelsList: []
|
personnelsList: [],
|
||||||
|
// 增员日志列表
|
||||||
|
recordList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.queryWeekly()
|
this.queryWeekly()
|
||||||
this.queryListFirst()
|
this.queryListFirst()
|
||||||
|
this.queryRecordList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取日志统计周报
|
// 获取日志统计周报
|
||||||
@@ -118,6 +123,26 @@ export default {
|
|||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.result == 0) {
|
if (res.result == 0) {
|
||||||
this.personnelsList = res.content.personnels
|
this.personnelsList = res.content.personnels
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询增员日志列表
|
||||||
|
queryRecordList() {
|
||||||
|
let data = {
|
||||||
|
recordDate: ''
|
||||||
|
}
|
||||||
|
queryRecordList(data)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.recordList = res.content.records
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@@ -128,7 +153,8 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/manpower/ActivityLog/List`
|
url: location.origin + `/#/manpower/ActivityLog/List`,
|
||||||
|
forbidSwipeBack: '1'
|
||||||
},
|
},
|
||||||
routerInfo: { path: '/manpower/ActivityLog/List' }
|
routerInfo: { path: '/manpower/ActivityLog/List' }
|
||||||
})
|
})
|
||||||
@@ -137,7 +163,8 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/manpower/ActivityLog/Edit`
|
url: location.origin + `/#/manpower/ActivityLog/Edit`,
|
||||||
|
forbidSwipeBack: '1'
|
||||||
},
|
},
|
||||||
routerInfo: { path: '/manpower/ActivityLog/Edit' }
|
routerInfo: { path: '/manpower/ActivityLog/Edit' }
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,23 +2,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<van-cell-group>
|
<van-cell-group>
|
||||||
<van-field readonly v-model="dateTime" label="日期" />
|
<van-field readonly v-model="recordInfo.recordDate" label="日期" />
|
||||||
<van-field required v-model="logName" label="姓名" placeholder="请输入姓名" v-validate="'required|name'" data-vv-name="姓名" />
|
<van-field required v-model="recordInfo.name" label="姓名" placeholder="请输入姓名" v-validate="'required|name'" data-vv-name="姓名" />
|
||||||
<van-field required v-model="logAge" type="digit" label="年龄" placeholder="请输入年龄" v-validate="'required|onlyNumber|maxAge'" data-vv-name="年龄" />
|
<van-field
|
||||||
|
required
|
||||||
|
v-model="recordInfo.age"
|
||||||
|
type="digit"
|
||||||
|
label="年龄"
|
||||||
|
placeholder="请输入年龄"
|
||||||
|
v-validate="'required|onlyNumber|maxAge'"
|
||||||
|
data-vv-name="年龄"
|
||||||
|
/>
|
||||||
<van-cell title="类型" required value-class="text-left">
|
<van-cell title="类型" required value-class="text-left">
|
||||||
<span
|
<span
|
||||||
v-for="(type, index) in typeArr"
|
v-for="(item, index) in typeArr"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="type-tag inline-flex justify-content-c align-items-c mr20"
|
class="type-tag inline-flex justify-content-c align-items-c mr20"
|
||||||
@click="slectType(type)"
|
@click="slectType(item)"
|
||||||
:class="logType == index ? 'select-tag' : ''"
|
:class="recordInfo.type == index ? 'select-tag' : ''"
|
||||||
>
|
>
|
||||||
{{ type.text }}
|
{{ item.text }}
|
||||||
</span>
|
</span>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
<van-field
|
<van-field
|
||||||
required
|
required
|
||||||
v-model="logTimes"
|
v-model="recordInfo.interviewNum"
|
||||||
type="digit"
|
type="digit"
|
||||||
label="面谈次数"
|
label="面谈次数"
|
||||||
placeholder="请输入面谈次数"
|
placeholder="请输入面谈次数"
|
||||||
@@ -58,6 +66,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import formatDate from '@/assets/js/utils/date-utils'
|
import formatDate from '@/assets/js/utils/date-utils'
|
||||||
import { Field, CellGroup, Popup, Picker, Cell, Button } from 'vant'
|
import { Field, CellGroup, Popup, Picker, Cell, Button } from 'vant'
|
||||||
|
import { queryRecordDetail, saveRecord } from '@/api/ebiz/manpower/manpower'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -70,45 +79,117 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dateTime: formatDate.formatDate().split(' ')[0],
|
recordInfo: {
|
||||||
logName: '',
|
recordDate: formatDate.formatDate().split(' ')[0],
|
||||||
logAge: '',
|
name: '',
|
||||||
logType: 0,
|
age: '',
|
||||||
logTimes: '',
|
type: 0,
|
||||||
logResult: '',
|
interviewNum: '', // 面试次数
|
||||||
logOccupation: '',
|
interviewResult: '', // 面谈结果
|
||||||
isAlike: false,
|
pastOccu: '' // 过往职业
|
||||||
|
},
|
||||||
|
recordCode: '',
|
||||||
|
// 面试结果
|
||||||
showResultArr: false,
|
showResultArr: false,
|
||||||
|
// 职业选择
|
||||||
showOccupationArr: false,
|
showOccupationArr: false,
|
||||||
typeArr: [{ id: 0, text: '同业' }, { id: 1, text: '白板' }],
|
typeArr: [{ id: 0, text: '同业' }, { id: 1, text: '白板' }],
|
||||||
resultArr: [{ id: '01', text: '同意加盟' }, { id: '02', text: '进班了解' }, { id: '03', text: '考虑中' }, { id: '04', text: '不加盟' }],
|
resultArr: [{ id: '0', text: '不加盟' }, { id: '1', text: '考虑中' }, { id: '2', text: '进班了解' }, { id: '3', text: '统一加盟' }],
|
||||||
occupationArr: [
|
occupationArr: [
|
||||||
{ id: '01', text: '一般内勤职员' },
|
{ id: '001', text: '一般内勤职员' },
|
||||||
{ id: '02', text: '其他金融行业' },
|
{ id: '002', text: '其他金融行业' },
|
||||||
{ id: '03', text: '家庭主妇' },
|
{ id: '003', text: '家庭主妇' },
|
||||||
{ id: '04', text: '自由职业' },
|
{ id: '004', text: '自由职业' },
|
||||||
{ id: '05', text: '离退休人员' },
|
{ id: '005', text: '离退休人员' },
|
||||||
{ id: '06', text: '个体经营者' },
|
{ id: '006', text: '个体经营者' },
|
||||||
{ id: '07', text: '销售' },
|
{ id: '007', text: '销售' },
|
||||||
{ id: '08', text: '公务员' },
|
{ id: '008', text: '公务员' },
|
||||||
{ id: '09', text: '保险外勤' },
|
{ id: '009', text: '保险外勤' },
|
||||||
{ id: '10', text: '保险内勤' },
|
{ id: '010', text: '保险内勤' },
|
||||||
{ id: '11', text: '其他' }
|
{ id: '011', text: '其他' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.recordCode = this.$route.query.code || ''
|
||||||
|
this.queryRecordDetail()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
logResult() {
|
||||||
|
if (this.recordInfo.interviewResult) {
|
||||||
|
return this.resultArr.find(ele => ele.id === this.recordInfo.interviewResult).text
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
logOccupation() {
|
||||||
|
if (this.recordInfo.pastOccu) {
|
||||||
|
return this.occupationArr.find(ele => ele.id === this.recordInfo.pastOccu).text
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
queryRecordDetail() {
|
||||||
|
let data = {
|
||||||
|
recordCode: this.recordCode
|
||||||
|
}
|
||||||
|
queryRecordDetail(data)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.recordInfo = res.content.record
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
subInfo() {
|
subInfo() {
|
||||||
this.$validator.validateAll().then(result => {
|
this.$validator.validateAll().then(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
console.log(result)
|
let data = {
|
||||||
|
recordCode: this.recordCode,
|
||||||
|
name: this.recordInfo.name,
|
||||||
|
age: this.recordInfo.age,
|
||||||
|
type: this.recordInfo.type || '0',
|
||||||
|
interviewNum: this.recordInfo.interviewNum,
|
||||||
|
interviewResult: this.recordInfo.interviewResult,
|
||||||
|
pastOccu: this.recordInfo.pastOccu
|
||||||
|
}
|
||||||
|
console.log(data)
|
||||||
|
saveRecord(data)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'goBack',
|
||||||
|
extra: {
|
||||||
|
refresh: '1',
|
||||||
|
index: '-1',
|
||||||
|
forbidSwipeBack: '1'
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
type: 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$toast(this.errors.all()[0])
|
this.$toast(this.errors.all()[0])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
slectType(type) {
|
slectType(type) {
|
||||||
this.logType = type.id
|
this.recordInfo.type = type.id
|
||||||
},
|
},
|
||||||
handleRsult() {
|
handleRsult() {
|
||||||
this.showResultArr = true
|
this.showResultArr = true
|
||||||
@@ -117,13 +198,11 @@ export default {
|
|||||||
this.showOccupationArr = true
|
this.showOccupationArr = true
|
||||||
},
|
},
|
||||||
selectResult(val) {
|
selectResult(val) {
|
||||||
console.log(val)
|
this.recordInfo.interviewResult = val.id
|
||||||
this.logResult = val.text
|
|
||||||
this.showResultArr = false
|
this.showResultArr = false
|
||||||
},
|
},
|
||||||
selectOccupation(val) {
|
selectOccupation(val) {
|
||||||
console.log(val)
|
this.recordInfo.pastOccu = val.id
|
||||||
this.logOccupation = val.text
|
|
||||||
this.showOccupationArr = false
|
this.showOccupationArr = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p @click="openCalendar">{{ showTime }}</p>
|
<p @click="openCalendar">{{ showTime }}</p>
|
||||||
</div>
|
</div>
|
||||||
<ActivityLogItem :ActivityLogInfo="ActivityLogInfo" v-for="(item, index) in 20" :key="index"></ActivityLogItem>
|
<ActivityLogItem :ActivityLogInfo="item" v-for="(item, index) in recordList" :key="index"></ActivityLogItem>
|
||||||
<div class="bottom-btn text-center">
|
<div class="bottom-btn text-center">
|
||||||
<van-icon name="add-square" size="50" color="#1989fa" />
|
<van-icon name="add-square" size="50" color="#1989fa" @click="toEdit" />
|
||||||
</div>
|
</div>
|
||||||
<van-popup v-model="showDateTime" position="bottom" :style="{ height: '30%' }">
|
<van-popup v-model="showDateTime" position="bottom" :style="{ height: '30%' }">
|
||||||
<van-datetime-picker v-model="selectTime" type="date" :max-date="maxDate" @confirm="confirm" @cancel="cancel" />
|
<van-datetime-picker v-model="selectTime" type="date" :max-date="maxDate" @confirm="confirm" @cancel="cancel" />
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
import formatDate from '@/assets/js/utils/date-utils'
|
import formatDate from '@/assets/js/utils/date-utils'
|
||||||
import { DatetimePicker, Popup } from 'vant'
|
import { DatetimePicker, Popup } from 'vant'
|
||||||
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
|
import ActivityLogItem from '@/components/ebiz/manpower/ActivityLogItem'
|
||||||
|
import { queryRecordList } from '@/api/ebiz/manpower/manpower'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -38,24 +39,55 @@ export default {
|
|||||||
showDateTime: false,
|
showDateTime: false,
|
||||||
ActivityLogInfo: {
|
ActivityLogInfo: {
|
||||||
name: '王辉',
|
name: '王辉',
|
||||||
avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
// avatarUrl: 'https://img.yzcdn.cn/vant/cat.jpeg',
|
||||||
age: '35岁',
|
age: '35岁',
|
||||||
flag: '同业',
|
flag: '同业',
|
||||||
currentTime: ''
|
recordDate: ''
|
||||||
}
|
},
|
||||||
|
recordList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
this.queryRecordList(formatDate.formatDate().split(' ')[0])
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
queryRecordList(date) {
|
||||||
|
let data = {
|
||||||
|
recordDate: date
|
||||||
|
}
|
||||||
|
queryRecordList(data)
|
||||||
|
.then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.result == 0) {
|
||||||
|
this.recordList = res.content.records
|
||||||
|
} else {
|
||||||
|
this.$toast(res.resultMessage)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toEdit() {
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
url: location.origin + `/#/manpower/ActivityLog/Edit`,
|
||||||
|
forbidSwipeBack: '1'
|
||||||
|
},
|
||||||
|
routerInfo: { path: '/manpower/ActivityLog/Edit' }
|
||||||
|
})
|
||||||
|
},
|
||||||
openCalendar() {
|
openCalendar() {
|
||||||
this.showDateTime = true
|
this.showDateTime = true
|
||||||
},
|
},
|
||||||
confirm(val) {
|
confirm(val) {
|
||||||
this.showTime = `< ${formatDate.formatDate(val).split(' ')[0]} >`
|
this.showTime = `< ${formatDate.formatDate(val).split(' ')[0]} >`
|
||||||
this.ActivityLogInfo.currentTime = formatDate.formatDate(val).split(' ')[0]
|
this.ActivityLogInfo.recordDate = formatDate.formatDate(val).split(' ')[0]
|
||||||
if (this.showTime !== this.todayTime) {
|
if (this.showTime !== this.todayTime) {
|
||||||
this.isToday = false
|
this.isToday = false
|
||||||
}
|
}
|
||||||
|
this.queryRecordList(formatDate.formatDate(val).split(' ')[0])
|
||||||
this.showDateTime = false
|
this.showDateTime = false
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
@@ -63,8 +95,9 @@ export default {
|
|||||||
},
|
},
|
||||||
backToday() {
|
backToday() {
|
||||||
this.showTime = this.todayTime
|
this.showTime = this.todayTime
|
||||||
this.ActivityLogInfo.currentTime = formatDate.formatDate().split(' ')[0]
|
this.ActivityLogInfo.recordDate = formatDate.formatDate().split(' ')[0]
|
||||||
this.isToday = true
|
this.isToday = true
|
||||||
|
this.queryRecordList(formatDate.formatDate().split(' ')[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user