app
wangxia 5 months ago
parent 5f08079b5e
commit f55a459b5a

@ -9,37 +9,39 @@
<view class="g_h_10"></view> <view class="g_h_10"></view>
<view class="link g_bg_f g_pt_10"> <view class="link g_bg_f g_pt_10">
<g-panel-detail-item label="状态" :value="orderDetail.status_text" valueColor="#ff4400" /> <g-panel-detail-item label="状态" :value="orderDetail.status_text" valueColor="#ff4400" />
<g-panel-detail-item label="报名备注" :value="orderDetail.desp" v-if="orderDetail.status== '10' || orderDetail.status== '20' || orderDetail.status== '21' || orderDetail.status== '26'"/>
<!-- afterIcon="icon-gengduo11" @clickItem="goBossDetail" --> <!-- afterIcon="icon-gengduo11" @clickItem="goBossDetail" -->
<!-- <g-panel-detail-item label="项目方" :value="orderDetail.upFullName || orderDetail.upAgencyName" valueColor="#333" /> --> <!-- <g-panel-detail-item label="项目方" :value="orderDetail.upFullName || orderDetail.upAgencyName" valueColor="#333" /> -->
<!-- @clickItem="handleOpenPeopleModal" --> <!-- @clickItem="handleOpenPeopleModal" -->
<view> <view>
<view class="g_pt_10 " v-if="orderDetail.reception_time && (orderDetail.status== '10' ||orderDetail.status== '20' ||orderDetail.status== '21' ||orderDetail.status== '26')"> <view class=" " v-if="orderDetail.reception_time && (orderDetail.status== '10' ||orderDetail.status== '20' ||orderDetail.status== '21' ||orderDetail.status== '26')">
<g-panel-detail-item from="times" label="接待时间" :value="orderDetail.reception_time" /> <g-panel-detail-item from="times" label="接待时间" :value="orderDetail.reception_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.interview_time && orderDetail.status!='50'"> <view class=" " v-if="orderDetail.interview_time && orderDetail.status!='50'">
<g-panel-detail-item from="times" label="面试时间" :value="orderDetail.interview_time" /> <g-panel-detail-item from="times" label="面试时间" :value="orderDetail.interview_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.willEntry_time &&(orderDetail.status== '45' ||orderDetail.status== '30')"> <view class=" " v-if="orderDetail.willEntry_time &&(orderDetail.status== '45' ||orderDetail.status== '30')">
<g-panel-detail-item from="times" label="约入职时间" :value="orderDetail.willEntry_time" /> <g-panel-detail-item from="times" label="约入职时间" :value="orderDetail.willEntry_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.entry_time &&(orderDetail.status== '40' ||orderDetail.status== '48' ||orderDetail.status== '50')"> <view class=" " v-if="orderDetail.entry_time &&(orderDetail.status== '40' ||orderDetail.status== '48' ||orderDetail.status== '50')">
<g-panel-detail-item from="times" label="入职时间" :value="orderDetail.entry_time" /> <g-panel-detail-item from="times" label="入职时间" :value="orderDetail.entry_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.willLeave_time &&orderDetail.status == 48"> <view class=" " v-if="orderDetail.willLeave_time &&orderDetail.status == 48">
<g-panel-detail-item from="times" label="约离职时间" :value="orderDetail.willLeave_time" /> <g-panel-detail-item from="times" label="约离职时间" :value="orderDetail.willLeave_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.leave_time && orderDetail.status == 50"> <view class=" " v-if="orderDetail.leave_time && orderDetail.status == 50">
<g-panel-detail-item from="times" label="离职时间" :value="orderDetail.leave_time" /> <g-panel-detail-item from="times" label="离职时间" :value="orderDetail.leave_time" />
</view> </view>
<view class="g_pt_10 " v-if="orderDetail.create_time && orderDetail.status != 50"> <view class=" " v-if="orderDetail.create_time && orderDetail.status != 50">
<g-panel-detail-item from="times" label="报名时间" :value="orderDetail.create_time" /> <g-panel-detail-item from="times" label="报名时间" :value="orderDetail.create_time" />
</view> </view>
<!-- <view class="g_pt_10 " v-if="orderDetail.status == 21 || orderDetail.status == 26 || orderDetail.status == 35 || orderDetail.status == 45"> <!-- <view class=" " v-if="orderDetail.status == 21 || orderDetail.status == 26 || orderDetail.status == 35 || orderDetail.status == 45">
<g-panel-detail-item from="times" label="更新时间" :value="orderDetail.update_time" /> <g-panel-detail-item from="times" label="更新时间" :value="orderDetail.update_time" />
</view> --> </view> -->
</view> </view>
<view class="g_pt_10 "> <view class=" ">
<g-panel-detail-item label="报名人" from="resident-info" beforeIcon="icon-phone" @clickItem="goTel(orderDetail.agencyTel)" :remarkValue="orderDetail.agencyTel" :value="orderDetail.downFullName ||orderDetail.downProviderName " /> <g-panel-detail-item label="报名人" from="resident-info" beforeIcon="icon-phone" @clickItem="goTel(orderDetail.agencyTel)" :remarkValue="orderDetail.agencyTel" :value="orderDetail.downFullName ||orderDetail.downProviderName " />
</view> </view>

@ -1,44 +1,10 @@
<template> <template>
<view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-root-detail-fellow g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view v-if="speed == 0"> <view>
<g-loading />
</view>
<view v-if="speed == 1">
<view class="g_h_10"></view>
<view class="m-photo">
<g-panel-card-info :info="{
avatar: cdnBaseImg + 'mock_photo.svg',
title: '拍照或相册上传',
num: '系统智能识别并自动填写',
titleFS: 16,
imgSize: 72,
}" radius="0" rightType="image" :rightImage="info.idCardImageUrl" @clickCard="handleClickInfo" />
</view>
<view class="g_h_10"></view>
<g-panel-form-slot :list="[
{
icon: '',
label: '联系电话',
result: '',
path: '',
tip: 'tel',
type: 'slot',
pColumn: 12,
},
]">
<slot>
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
<u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" style="width: calc(100vw - (122px);flex: none;" />
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<u-input type="number" :clearable="false" :password-icon="false" placeholder="请输入联系电话" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#cccccc;font-size:32rpx;line-height:1" v-model="info.tel" />
<!-- #endif -->
</slot>
</g-panel-form-slot>
<view class="g_h_10"></view> <view class="g_h_10"></view>
<g-panel-form-slot <g-panel-form-slot
:list="[ :list="[
{ {
icon: '', icon: '',
label: '姓名', label: '姓名',
result: '', result: '',
@ -51,6 +17,18 @@
pColumn: 8, pColumn: 8,
require: true, require: true,
}, },
{
icon: '',
label: '身份证号',
result: '',
value: info.idCard,
path: '',
tip: 'slot-code-idcard',
placeholder: '请输入身份证号',
type: 'slot',
pColumn: 8,
require: true,
},
{ {
icon: '', icon: '',
label: '性别', label: '性别',
@ -60,7 +38,7 @@
tip: 'slot-sex', tip: 'slot-sex',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 12,
require: false, require: true,
customRequire: true, customRequire: true,
}, },
{ {
@ -72,8 +50,8 @@
tip: 'slot-age', tip: 'slot-age',
placeholder: '请输入年龄', placeholder: '请输入年龄',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 8,
require: false, require: true,
}, },
{ {
icon: '', icon: '',
@ -84,29 +62,30 @@
path: '', path: '',
tip: 'slot-nation', tip: 'slot-nation',
pColumn: 12, pColumn: 12,
require: false,
type: 'slot', type: 'slot',
customRequire: true,
}, },
{ {
icon: '', icon: '',
label: '身份证号', label: '家庭住址',
result: '', result: '',
value: info.idCard, value: info.address,
placeholder: '请输入家庭住址',
path: '', path: '',
tip: 'slot-code-idcard', tip: 'slot-address',
placeholder: '请输入身份证号',
type: 'slot', type: 'slot',
pColumn: 12, pColumn: 8,
}, },
{ {
icon: '', icon: '',
label: '家庭住址', label: '上传附件',
result: '', result: '',
value: info.address,
placeholder: '请输入家庭住址',
path: '', path: '',
tip: 'slot-address',
type: 'slot', type: 'slot',
pColumn: 12, tip: 'slot-update-file',
pColumn: 16,
}, },
]" ]"
@changeName="handleClickName" @changeName="handleClickName"
@ -115,12 +94,38 @@
@changeNation="handleClickNation" @changeNation="handleClickNation"
@changeIDcard="handleClickIDcard" @changeIDcard="handleClickIDcard"
@changeAddress="handleClickAddress" @changeAddress="handleClickAddress"
></g-panel-form-slot> @updateFile="updateFile"
@updateIDInfo="handlerIDInfo"
>
<template v-slot:after>
<view class="g_flex_row_start g_p_10" v-if="imgList.length > 0">
<view v-for="(item, index) in imgList" class="g_position_rela" :class="index <= 2 ? 'g_mr_18' : ''" :key="index">
<i class="iconfont icon-guanbi img-close" @click="delImg(index, item.id)"></i>
<image :src="item.url" class="g_w_56 g_h_56 g_radius_8" />
</view>
</view>
</template>
</g-panel-form-slot>
<view class="g_h_10"></view>
<g-panel-form-slot :list="[
{
icon: '',
label: '老乡电话',
result: '',
path: '',
value: info.tel,
tip: 'slot-mobile',
placeholder: '请输入联系电话',
type: 'slot',
pColumn: 8,
require: true,
},
]" @changeMobile="handleClickMobile"></g-panel-form-slot>
<g-panel-fixed> <g-panel-fixed>
<slot> <slot>
<view class="g_flex_row_center"> <view class="g_pl_12 g_pr_12">
<g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> <!-- <g-button btnText="取消" class="g_mr_16" size="small" type="default" @clickBtn="goReturn"></g-button> -->
<g-button btnText="确定" class @clickBtn="handleSubmit" size="small" type="primary"></g-button> <g-button btnText="确定" class @clickBtn="handleSubmit" size="auto" type="primary"></g-button>
</view> </view>
</slot> </slot>
</g-panel-fixed> </g-panel-fixed>
@ -129,7 +134,9 @@
</template> </template>
<script> <script>
// import gPanelFormSlot from "@/components/formSlot.vue";
import { nationlist } from '../../utils/nation.js' import { nationlist } from '../../utils/nation.js'
export default { export default {
onReady() { onReady() {
this.G.setNavStyle() this.G.setNavStyle()
@ -137,42 +144,61 @@ export default {
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun() return this.G.shareFun()
}, },
components: {
// gPanelFormSlot,
},
data() { data() {
return { return {
cdnBaseImg: this.G.store().cdnBaseImg, cdnBaseImg: this.G.store().cdnBaseImg,
speed: 0, info: {
info: {}, nation: '汉族',
},
nation: nationlist.map((item, index) => { nation: nationlist.map((item, index) => {
return item.name return item.name
}), }),
nationIndex: 0, nationIndex: 0,
imgList: [],
newAddImg: [],
} }
}, },
props: {
// info: {
// type: Object,
// default: {},
// },
},
onLoad(options) { onLoad(options) {
let that = this let that = this
console.log('快速报名:', options)
if (options) { if (options) {
this.info = options
if (options.sex) { if (options.sex) {
options.sex = Number(options.sex) options.sex = Number(options.sex)
} else { } else {
options.sex = 1 options.sex = 1
} }
that.nation.forEach((item, index) => { if (!options.nation) {
if (item == that.info.nation) { options.nation = '汉族'
console.log(that.info.nation) }
console.log(index) this.info = options
that.nationIndex = index // if (this.info.imgs) {
} // this.imgList = this.info.imgs.split(",");
}) // }
that.speed = 0
setTimeout(() => {
that.speed = 1
}, 300)
console.log('获取老乡信息:', options)
} }
console.log('获取老乡信息:', options)
}, },
onShow() { onShow() {
let that = this let that = this
that.getImg()
// that.nation.forEach((item, index) => {
// if (item == that.info.nation) {
// console.log(that.info.nation);
// console.log(index);
// that.nationIndex = index;
// }
// });
// that.speed = 0;
// setTimeout(() => {
// }, 300);
}, },
created() { created() {
let that = this let that = this
@ -180,12 +206,19 @@ export default {
methods: { methods: {
handleClickName(e) { handleClickName(e) {
this.info.name = this.info.userName = e this.info.name = this.info.userName = e
this.changeInfo()
}, },
handleClickSex(e) { handleClickSex(e) {
this.info.sex = e this.info.sex = e
this.changeInfo()
}, },
handleClickAge(e) { handleClickAge(e) {
this.info.age = e this.info.age = e
this.changeInfo()
},
handleClickMobile(e) {
this.info.tel = e
this.changeInfo()
}, },
handleClickNation(e) { handleClickNation(e) {
let that = this let that = this
@ -198,34 +231,169 @@ export default {
that.nationIndex = index that.nationIndex = index
} }
}) })
this.changeInfo()
}, },
handleClickNation(e) { changeInfo() {
this.$emit('changeInfo', this.info)
},
/**
* 获取上传的身份信息
*/
handlerIDInfo(res) {
console.log('res', res)
let that = this let that = this
console.log(e.name) that.info.name = res.info.name
this.info.nation = e.name that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
that.info.age = res.info.age
that.info.nation = res.info.nationality + '族'
that.info.idCard = res.info.num
that.info.idCardImageUrl = res.image
that.info.userName = res.info.name
that.info.address = res.info.address
that.nation.forEach((item, index) => { that.nation.forEach((item, index) => {
if (item == e.name) { console.log('item1', item)
// console.log(that.info.nation) console.log('that.info.nation + "族"', that.info.nation + '族')
// console.log(index) if (item == that.info.nation) {
console.log('item2', item)
that.nationIndex = index that.nationIndex = index
} }
}) })
this.changeInfo()
console.log('that.info', that.info)
console.log('that.nationIndex', that.nationIndex)
},
getImg() {
let that = this
uni.request({
url: that.G.ajaxUrl + `/imgs/list/${that.info.userId}?type=20`,
method: 'GET',
header: Object.assign(
{
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs)
that.imgList = res.data.data.userImgs
console.log(that.imgList)
} else {
console.error('Failed to fetch images:', res)
}
},
fail: (error) => {
console.error('Error fetching images:', error)
},
})
},
//
delImg(ind, id) {
let that = this
uni.showModal({
title: '提示',
content: '确定要删除该图片?',
success: function (res) {
if (res.confirm) {
that.imgList.splice(
that.imgList.findIndex((item, index) => index == ind),
1
)
uni.request({
url: that.G.ajaxUrl + `/imgs/del/${id}`,
method: 'GET',
header: Object.assign(
{
Authorization: 'Bearer ' + uni.getStorageSync('apply-token'),
},
that.G.setPublicParams()
),
success: (res) => {
if (res.statusCode === 200) {
console.log(res.data.data.userImgs)
// imgList
// that.imgList = res.data.data.userImgs;
} else {
console.error('Failed to fetch images:', res)
}
},
fail: (error) => {
console.error('Error fetching images:', error)
},
})
} else if (res.cancel) {
console.log('用户点击取消')
}
},
})
},
//
updateFile(e) {
let that = this
if (that.imgList.length < 4) {
that.imgList.push({ url: e, id: -999 })
// that.info.imgs = that.imgList;
that.newAddImg.push(e)
that.changeInfo()
uni.hideLoading()
} else {
uni.showToast({
title: '最多只能上传4张',
icon: 'none',
})
}
}, },
handleClickIDcard(e) { handleClickIDcard(e) {
this.info.idCard = e this.info.idCard = e
if (this.info.idCard.length == 15 || this.info.idCard.length == 18) {
let info = this.G.getInfoByIDcard(this.info.idCard)
this.info.age = info.age
this.info.sex = info.sex ? (info.sex == '男' ? 1 : 2) : ''
}
this.changeInfo()
// console.log(this.G.getInfoByIDcard(this.info.idCard));
}, },
handleClickAddress(e) { handleClickAddress(e) {
this.info.address = e this.info.address = e
this.changeInfo()
}, },
goReturn() { goReturn() {
uni.navigateBack() uni.navigateBack()
}, },
handleSubmit() { handleSubmit() {
let that = this let that = this
if (!that.info.tel && !that.info.idCard) { console.log('that.info.imgs', that.info.imgs)
console.log('that.imgList', that.imgList)
if (!that.info.name) {
uni.showToast({
icon: 'none',
title: '请输入姓名',
})
return false
}
if (!that.info.sex) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请至少输入手机号或者身份证号', title: '请选择性别',
})
return false
}
if (!that.info.age) {
uni.showToast({
icon: 'none',
title: '请输入年龄',
})
return false
}
if (!that.info.nation) {
uni.showToast({
icon: 'none',
title: '请选择民族',
}) })
return false return false
} }
@ -236,17 +404,16 @@ export default {
}) })
return false return false
} }
if (!that.G.setReg(that.info.idCard, 'idcard')) {
if (!that.G.isValidIdCard(that.info.idCard)) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '请输入正确的身份证号', title: '请输入正确的身份证号',
}) })
return false return false
} }
console.log(that.info)
if (!that.info.nation) { if (that.imgList.length > 0) {
that.info.nation = '汉族' that.info.imgs = that.newAddImg.toString()
} }
let submitInfo = { let submitInfo = {
name: that.info.userName, name: that.info.userName,
@ -261,22 +428,24 @@ export default {
userId: that.info.userId, userId: that.info.userId,
orderId: that.info.id, orderId: that.info.id,
} }
that.G.Post(that.api.order_submitFellowNew, submitInfo, (res) => { let url = 'order_submitFellowNew'
that.G.Post(that.api[url], submitInfo, (res) => {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: '保存成功', title: '保存成功',
}) })
uni.$emit("infoUpdate"); uni.$emit('infoUpdate')
setTimeout(() => { uni.navigateBack()
that.goReturn()
}, 300)
}) })
// uni.$emit("getTownsman", { info: that.info });
// uni.navigateBack();
}, },
handleClickInfo() { handleClickInfo() {
let that = this let that = this
that.G.uploadImg((res) => { that.G.uploadImg((res) => {
console.log('res', res)
that.info.name = res.info.name that.info.name = res.info.name
that.info.sex = res.info.sex that.info.sex = res.info.sex ? (res.info.sex == '男' ? 1 : 2) : ''
that.info.age = res.info.age that.info.age = res.info.age
that.info.nation = res.info.nationality that.info.nation = res.info.nationality
that.info.idCard = res.info.num that.info.idCard = res.info.num
@ -294,4 +463,19 @@ export default {
} }
</script> </script>
<style></style> <style>
.img-close {
position: absolute;
width: 18px;
height: 18px;
right: -6px;
top: -6px;
z-index: 99;
background-color: #666;
color: #fff;
font-size: 8px;
text-align: center;
line-height: 18px;
border-radius: 50%;
}
</style>

Loading…
Cancel
Save