Commit 1d1a41f5 by 张立顺

Merge branch 'SAAS+V5.3.0-1117' of http://192.168.3.233:8090/saas_plus/dj-car-bo…

…utique-work-wechat into SAAS+V5.3.0-1117
2 parents f6277b40 2bd13cbc
Showing 22 changed files with 437 additions and 269 deletions
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 4 let index = 2
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
const envName = accountInfo.miniProgram.envVersion const envName = accountInfo.miniProgram.envVersion
......
...@@ -383,6 +383,7 @@ Component({ ...@@ -383,6 +383,7 @@ Component({
this.getData(name); this.getData(name);
}, },
checkIsPadOrNot() { checkIsPadOrNot() {
let _this = this
wx.getRendererUserAgent({ wx.getRendererUserAgent({
success(res) { success(res) {
let isPad = /iPad|Android.*Tablet|Kindle|Silk/i.test(res.userAgent); let isPad = /iPad|Android.*Tablet|Kindle|Silk/i.test(res.userAgent);
...@@ -630,35 +631,42 @@ Component({ ...@@ -630,35 +631,42 @@ Component({
icon: "mentorship-manage" icon: "mentorship-manage"
}); });
} }
if ((isStaff || userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5) && this.merchantDirectSales) { if ((isStaff || userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
let { if (this.merchantDirectSales) {
uuid, let {
merchantId, uuid,
shopMerchantId merchantId,
} = userInfo shopMerchantId
const missingresponse = await checkMissingReception({ } = userInfo
merchantId: shopMerchantId, const missingresponse = await checkMissingReception({
yqMerchantId: merchantId, merchantId: shopMerchantId,
staffUuid: uuid, yqMerchantId: merchantId,
sceneType: 0, staffUuid: uuid,
reportStartDate: dayjs().subtract(6, 'day').format('YYYY-MM-DD'), sceneType: 0,
reportEndDate: dayjs().format('YYYY-MM-DD'), reportStartDate: dayjs().subtract(6, 'day').format('YYYY-MM-DD'),
}) reportEndDate: dayjs().format('YYYY-MM-DD'),
if (missingresponse.code == 0) {
let missingRecordTodoList = []
missingresponse.data.reverse().map(e => {
if (e.missingReceptionRecord && !e.hasReceptionReport && !missingRecordTodoList.length) missingRecordTodoList.push(e)
}) })
let missingRecordTodoList = []
if (missingresponse.code == 0) {
missingresponse.data.reverse().map(e => {
if (e.missingReceptionRecord && !e.hasReceptionReport && !missingRecordTodoList.length) missingRecordTodoList.push(e)
})
}
this.setData({ this.setData({
missingRecordTodoList, missingRecordTodoList,
}) })
if (menuList.every((item) => item.menuText != "接待缺失报备")) menuList.push({
menuText: "接待缺失报备",
path: "packageEquity.missingReception",
icon: "missing-reception",
});
} else {
let delIndex = menuList.findIndex(item => item.menuText == "接待缺失报备")
if (delIndex != -1) menuList = menuList.splice(delIndex, 1)
this.setData({
missingRecordTodoList: [],
})
} }
if (menuList.every((item) => item.menuText != "接待缺失报备")) menuList.push({
menuText: "接待缺失报备",
path: "packageEquity.missingReception",
icon: "missing-reception",
});
} }
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
......
...@@ -27,19 +27,19 @@ Page({ ...@@ -27,19 +27,19 @@ Page({
track_event_code: 'mini_pad_missing_reception', //埋点动作类型 track_event_code: 'mini_pad_missing_reception', //埋点动作类型
scene: 0 scene: 0
}, },
jump() { jump () {
wx.$router.back() wx.$router.back()
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad (options) {
console.log(options) console.log(options)
this.initData(options.reportDate) this.initData(options.reportDate)
this.getMissingOptions() this.getMissingOptions()
}, },
async getMissingOptions() { async getMissingOptions () {
try { try {
const { const {
code, code,
...@@ -59,7 +59,7 @@ Page({ ...@@ -59,7 +59,7 @@ Page({
wx.$util.showToast(error) wx.$util.showToast(error)
} }
}, },
navbarReady(e) { navbarReady (e) {
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
this.setData({ this.setData({
navBarHeight navBarHeight
...@@ -82,7 +82,7 @@ Page({ ...@@ -82,7 +82,7 @@ Page({
}) })
this.setReportDate() this.setReportDate()
}, },
initData(reportDate = '') { initData (reportDate = '') {
if (reportDate) { if (reportDate) {
let dateisSunday = dayjs(reportDate).toDate(), let dateisSunday = dayjs(reportDate).toDate(),
countSundays = this.countSundays( countSundays = this.countSundays(
...@@ -105,7 +105,7 @@ Page({ ...@@ -105,7 +105,7 @@ Page({
} }
this.setReportDate() this.setReportDate()
}, },
countSundays(startDate, endDate) { countSundays (startDate, endDate) {
let start = new Date(startDate) let start = new Date(startDate)
let end = new Date(endDate) let end = new Date(endDate)
let sundays = 0 let sundays = 0
...@@ -153,7 +153,7 @@ Page({ ...@@ -153,7 +153,7 @@ Page({
this.getMissingCustomerList() this.getMissingCustomerList()
}, },
// 设置报告日期 // 设置报告日期
async setReportDate() { async setReportDate () {
try { try {
wx.$util.showLoading() wx.$util.showLoading()
const { const {
...@@ -181,7 +181,7 @@ Page({ ...@@ -181,7 +181,7 @@ Page({
weekDayList, weekDayList,
selectDay selectDay
} = timeBean, } = timeBean,
detailObj = {}, detailObj = {},
currentDate = weekDayList[selectDay].date currentDate = weekDayList[selectDay].date
weekDayList.map(e => { weekDayList.map(e => {
data.map(i => { data.map(i => {
...@@ -201,12 +201,14 @@ Page({ ...@@ -201,12 +201,14 @@ Page({
wx.$util.showToast(error) wx.$util.showToast(error)
} }
}, },
async getMissingCustomerList() { async getMissingCustomerList () {
try { try {
wx.$util.showLoading() wx.$util.showLoading()
this.setData({ this.setData({
list: [] list: [],
scrollTop: 0
}) })
let { let {
currentDate, currentDate,
detailObj, detailObj,
...@@ -226,9 +228,10 @@ Page({ ...@@ -226,9 +228,10 @@ Page({
reportDate: currentDate reportDate: currentDate
}) })
wx.hideLoading() wx.hideLoading()
let total = 0
if (code == 0) { if (code == 0) {
let responseList = data.list let responseList = data.list
total = data.total
if (responseList.length) { if (responseList.length) {
list = responseList.map(e => { list = responseList.map(e => {
return { return {
...@@ -247,7 +250,7 @@ Page({ ...@@ -247,7 +250,7 @@ Page({
if (len) { if (len) {
for (let index = 0; index < len; index++) { for (let index = 0; index < len; index++) {
list.push({ list.push({
customerName: `客户${index + 1}` customerName: `客户${index + 1}`,
}) })
} }
} }
...@@ -255,6 +258,7 @@ Page({ ...@@ -255,6 +258,7 @@ Page({
} else wx.$util.showToast(message) } else wx.$util.showToast(message)
this.setData({ this.setData({
list, list,
total,
isDateWithin7Days: dayjs().diff(dayjs(currentDate), 'day') < dayLimit isDateWithin7Days: dayjs().diff(dayjs(currentDate), 'day') < dayLimit
}) })
} catch (error) { } catch (error) {
...@@ -263,7 +267,7 @@ Page({ ...@@ -263,7 +267,7 @@ Page({
if (error) wx.$util.showToast(error) if (error) wx.$util.showToast(error)
} }
}, },
inputBlur(e) { inputBlur (e) {
let { let {
index index
} = e.target.dataset, { } = e.target.dataset, {
...@@ -274,14 +278,14 @@ Page({ ...@@ -274,14 +278,14 @@ Page({
[`list[${index}].inputErrorText`]: value ? '' : '必填不能为空' [`list[${index}].inputErrorText`]: value ? '' : '必填不能为空'
}) })
}, },
changeReason(e) { changeReason (e) {
const { const {
missingOptions missingOptions
} = this.data, { } = this.data, {
index index
} = e.target.dataset, { } = e.target.dataset, {
value value
} = e.detail, } = e.detail,
item = missingOptions[value] item = missingOptions[value]
this.setData({ this.setData({
[`list[${index}].errorText`]: '', [`list[${index}].errorText`]: '',
...@@ -289,7 +293,7 @@ Page({ ...@@ -289,7 +293,7 @@ Page({
[`list[${index}].reasonCode`]: item.reasonCode, [`list[${index}].reasonCode`]: item.reasonCode,
}) })
}, },
cancel() { cancel () {
wx.showModal({ wx.showModal({
title: '温馨提示', title: '温馨提示',
content: '接待录音缺失将影响工资绩效,是否确认放弃报备?', content: '接待录音缺失将影响工资绩效,是否确认放弃报备?',
...@@ -301,7 +305,7 @@ Page({ ...@@ -301,7 +305,7 @@ Page({
} }
}) })
}, },
async submit() { async submit () {
try { try {
const { const {
list, list,
...@@ -316,7 +320,7 @@ Page({ ...@@ -316,7 +320,7 @@ Page({
} = userInfo } = userInfo
list.map((e, index) => { list.map((e, index) => {
if (!e.reasonCode) this.setData({ if (!e.reasonCode) this.setData({
[`list[${index}].errorText`]: '请选择缺失原因' [`list[${index}].errorText`]: '必填不能为空'
}) })
if (!e.customerName) this.setData({ if (!e.customerName) this.setData({
[`list[${index}].inputErrorText`]: '必填不能为空' [`list[${index}].inputErrorText`]: '必填不能为空'
...@@ -332,39 +336,41 @@ Page({ ...@@ -332,39 +336,41 @@ Page({
reasonCode: e.reasonCode, reasonCode: e.reasonCode,
}) })
}) })
wx.$util.showLoading('提交中...')
wx.$track.setTrackData(0, 'mini_add_pad_missing_reception') wx.$track.setTrackData(0, 'mini_add_pad_missing_reception')
const { wx.$util.showLoading('提交中...')
code, // 分批提交,每批最多50条
data, const batchSize = 50
message for (let i = 0; i < missingReceptionReportAddRequests.length; i += batchSize) {
} = await addMissingReception({ const batch = missingReceptionReportAddRequests.slice(i, i + batchSize)
missingReceptionReportAddRequests, const {
reportDate: currentDate, code,
merchantId: shopMerchantId, message
merchantName: shopMerchantName, } = await addMissingReception({
staffUuid: uuid, missingReceptionReportAddRequests: batch,
staffName: name, reportDate: currentDate,
staffPhone: phone, merchantId: shopMerchantId,
sceneType: 0 merchantName: shopMerchantName,
}) staffUuid: uuid,
if (code == 0) { staffName: name,
wx.hideLoading() staffPhone: phone,
let _this = this sceneType: 0
wx.showModal({
title: '提示',
content: '提交成功',
showCancel: false,
confirmColor: '#347BFF',
success: (res) => {
if (res.confirm) {
_this.setReportDate()
// wx.$router.back()
}
}
}) })
console.log(data) if (code != 0) throw message
} else throw message }
wx.hideLoading()
let _this = this
wx.showModal({
title: '提示',
content: '提交成功',
showCancel: false,
confirmColor: '#347BFF',
success: (res) => {
if (res.confirm) {
_this.setReportDate()
// wx.$router.back()
}
}
})
} catch (error) { } catch (error) {
wx.hideLoading() wx.hideLoading()
if (error) wx.$util.showToast(error) if (error) wx.$util.showToast(error)
...@@ -373,49 +379,49 @@ Page({ ...@@ -373,49 +379,49 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady () {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow () {
this.onPageShow() this.onPageShow()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() { onHide () {
}, },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload () {
this.onPageHide() this.onPageHide()
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh () {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom () {
}, },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage () {
} }
}) })
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ page { ...@@ -41,7 +41,7 @@ page {
flex-shrink: 0; flex-shrink: 0;
color: #292d33; color: #292d33;
font-size: 26rpx; font-size: 26rpx;
width: 104rpx;
.num { .num {
margin-top: 8rpx; margin-top: 8rpx;
color: #2c66f7; color: #2c66f7;
...@@ -148,6 +148,11 @@ page { ...@@ -148,6 +148,11 @@ page {
width: 100%; width: 100%;
height: 20rpx; height: 20rpx;
} }
.has-reception-report{
.required{
display: none;
}
}
} }
} }
.bespread{ .bespread{
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="box {{isDateWithin7Days && !detailObj[currentDate].hasReceptionReport && detailObj[currentDate].missingReceptionRecord ? '' : 'bespread'}}" style="padding-top:{{ navBarHeight }}px"> <view class="box {{isDateWithin7Days && !detailObj[currentDate].hasReceptionReport && detailObj[currentDate].missingReceptionRecord ? '' : 'bespread'}}" style="padding-top:{{ navBarHeight }}px">
<weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar> <weekCalendar timeBean="{{ timeBean }}" bind:lastWeek="lastWeek" bind:nextWeek="nextWeek" bind:dayClick="dayClick"></weekCalendar>
<scroll-view scroll-y class="content"> <scroll-view scroll-y class="content" scroll-top="{{scrollTop}}">
<view class="info flex"> <view class="info flex">
<view class="info-item"> <view class="info-item">
售前 售前
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<view class="num">{{detailObj[currentDate].recordingCount || '0'}}</view> <view class="num">{{detailObj[currentDate].recordingCount || '0'}}</view>
</view> </view>
</view> </view>
<!-- 超过7天&没日报记录 -->
<block wx:if="{{!isDateWithin7Days && !detailObj[currentDate].hasReceptionReport}}"> <block wx:if="{{!isDateWithin7Days && !detailObj[currentDate].hasReceptionReport}}">
<view class="nothing flex"> <view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" /> <image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
...@@ -32,12 +33,12 @@ ...@@ -32,12 +33,12 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<block wx:if="{{detailObj[currentDate].missingReceptionRecord}}"> <block wx:if="{{detailObj[currentDate].hasDailyReport}}">
<block wx:if="{{detailObj[currentDate].hasDailyReport}}"> <block wx:if="{{detailObj[currentDate].missingReceptionRecord || list.length}}">
<view class="title flex"> <view class="title flex">
{{detailObj[currentDate].hasReceptionReport?'已':'需'}}报备客户·{{list.length}} {{detailObj[currentDate].hasReceptionReport?'已':'需'}}报备客户·{{detailObj[currentDate].hasReceptionReport ? total : list.length}}
</view> </view>
<view class="list"> <view class="list {{detailObj[currentDate].hasReceptionReport?'has-reception-report':''}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<view class="item"> <view class="item">
<view class="num flex">{{index + 1}}</view> <view class="num flex">{{index + 1}}</view>
...@@ -45,15 +46,12 @@ ...@@ -45,15 +46,12 @@
<view class="label flex">客户姓名<view class="required">*</view> <view class="label flex">客户姓名<view class="required">*</view>
</view> </view>
<view class="value {{item.disabled?'disabled':''}}"> <view class="value {{item.disabled?'disabled':''}}">
<input class="input" type="text" maxlength="20" value="{{item.customerName}}" placeholder="{{item.inputErrorText||'请输入'}}" placeholder-class="placeholder {{item.inputErrorText?'error':''}}" <input class="input" type="text" maxlength="20" value="{{item.customerName}}" placeholder="{{item.inputErrorText||'请输入'}}" placeholder-class="placeholder {{item.inputErrorText?'error':''}}" disabled="{{item.disabled}}" bindblur="inputBlur" data-index="{{index}}" />
disabled="{{item.disabled}}"
bindblur="inputBlur" data-index="{{index}}" />
</view> </view>
<view class="label flex">缺失原因<view class="required">*</view> <view class="label flex">缺失原因<view class="required">*</view>
</view> </view>
<view class="value {{item.disabled?'disabled':''}}"> <view class="value {{item.disabled?'disabled':''}}">
<picker class="picker" mode="selector" range="{{missingOptions}}" <picker class="picker" mode="selector" range="{{missingOptions}}" disabled="{{item.disabled}}" range-key="reason" bindchange="changeReason" data-index="{{index}}">
disabled="{{item.disabled}}" range-key="reason" bindchange="changeReason" data-index="{{index}}">
<view class="reason flex {{item.reasonText?'':'placeholder'}} {{item.errorText?'error':''}}">{{item.reasonText || item.errorText || '请选择'}}</view> <view class="reason flex {{item.reasonText?'':'placeholder'}} {{item.errorText?'error':''}}">{{item.reasonText || item.errorText || '请选择'}}</view>
<view class="arrow"> <view class="arrow">
<image src="/images/arrow-right.png"></image> <image src="/images/arrow-right.png"></image>
...@@ -69,14 +67,14 @@ ...@@ -69,14 +67,14 @@
<block wx:else> <block wx:else>
<view class="nothing flex"> <view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" /> <image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
请先填写驻店日报 该日期暂无缺失接待记录
</view> </view>
</block> </block>
</block> </block>
<block wx:else> <block wx:else>
<view class="nothing flex"> <view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" /> <image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
该日期暂无缺失接待记录 请先填写驻店日报
</view> </view>
</block> </block>
</block> </block>
......
...@@ -25,6 +25,7 @@ const RECRUITMENT_INFO_CONFIG = [ ...@@ -25,6 +25,7 @@ const RECRUITMENT_INFO_CONFIG = [
{ label: '招聘类型', field: 'recruitmentTypeName' }, { label: '招聘类型', field: 'recruitmentTypeName' },
{ label: '招聘负责人', field: 'recruiterName' }, { label: '招聘负责人', field: 'recruiterName' },
{ label: '申请时间', field: 'createdDate' }, { label: '申请时间', field: 'createdDate' },
{ label: '需求描述', field: 'requirementDescription' },
{ label: '拒绝理由', field: 'recallReason' } { label: '拒绝理由', field: 'recallReason' }
] ]
...@@ -69,9 +70,11 @@ Page({ ...@@ -69,9 +70,11 @@ Page({
handleShowMessagePop: false, // 控制弹窗显示 handleShowMessagePop: false, // 控制弹窗显示
timeShow: false, // 控制时间选择器显示 timeShow: false, // 控制时间选择器显示
currentDate: new Date().getTime(), currentDate: new Date().getTime(),
today: new Date().getTime(), // 当前日期,用于限制日期选择器的最大值
formData: {}, // 弹窗表单数据 formData: {}, // 弹窗表单数据
detailLoaded: false, // 标识是否已加载详情 detailLoaded: false, // 标识是否已加载详情
curDataId:'', curDataId:'',
isProcessing: false, // 是否正在处理中,防止重复提交
// 时间选择器列表子项展示-格式化处理 // 时间选择器列表子项展示-格式化处理
formatter(type, value) { formatter(type, value) {
if (type === 'year') { if (type === 'year') {
...@@ -91,7 +94,6 @@ Page({ ...@@ -91,7 +94,6 @@ Page({
* 显示时间选择器 * 显示时间选择器
*/ */
showTimePicker(e) { showTimePicker(e) {
console.log('打开时间选择器')
if (e) { if (e) {
e.stopPropagation && e.stopPropagation() e.stopPropagation && e.stopPropagation()
} }
...@@ -153,7 +155,6 @@ Page({ ...@@ -153,7 +155,6 @@ Page({
// 示例 url,并非真实存在 // 示例 url,并非真实存在
url: url, url: url,
success: function (res) { success: function (res) {
console.log(res)
const filePath = res.tempFilePath const filePath = res.tempFilePath
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
...@@ -198,12 +199,20 @@ Page({ ...@@ -198,12 +199,20 @@ Page({
recruitment.createdDate = this.formatDate(recruitment.createdDate) recruitment.createdDate = this.formatDate(recruitment.createdDate)
} }
// 根据 businessType 动态过滤招聘信息配置 // 根据字段值是否存在和业务类型动态过滤招聘信息配置
// 当 businessType == 1 时,显示拒绝理由;否则过滤掉拒绝理由项
const filteredRecruitmentInfoConfig = RECRUITMENT_INFO_CONFIG.filter(item => { const filteredRecruitmentInfoConfig = RECRUITMENT_INFO_CONFIG.filter(item => {
// 特殊处理:拒绝理由字段仅在businessType为1时显示
if (item.field === 'recallReason') { if (item.field === 'recallReason') {
return recruitment.businessType == 1 return recruitment.businessType == 1 && recruitment.recallReason
} }
// 如果字段值不存在或为空字符串,则不显示该字段
if (recruitment[item.field] === undefined ||
recruitment[item.field] === null ||
recruitment[item.field] === '') {
return false
}
return true return true
}) })
...@@ -278,8 +287,8 @@ Page({ ...@@ -278,8 +287,8 @@ Page({
let value = e.detail.value let value = e.detail.value
const { formData } = this.data const { formData } = this.data
// 过滤掉空格和换行符 // 过滤掉空格
value = value.replace(/[\s\r\n]/g, '') value = value.replace(/ /g, '');
formData[field] = value formData[field] = value
formData[field + 'Length'] = value.length // 统计字数 formData[field + 'Length'] = value.length // 统计字数
...@@ -294,7 +303,8 @@ Page({ ...@@ -294,7 +303,8 @@ Page({
hidePopup() { hidePopup() {
this.setData({ this.setData({
showPopup: false, showPopup: false,
timeShow: false timeShow: false,
isProcessing: false // 重置处理状态
}) })
}, },
...@@ -316,7 +326,11 @@ Page({ ...@@ -316,7 +326,11 @@ Page({
* 确认处理 * 确认处理
*/ */
confirmProcess() { confirmProcess() {
const { formData } = this.data const { formData, isProcessing } = this.data
// 防止重复提交
if (isProcessing) return;
// 验证必填项 // 验证必填项
if (!formData.processResult) { if (!formData.processResult) {
wx.showToast({ wx.showToast({
...@@ -341,6 +355,12 @@ Page({ ...@@ -341,6 +355,12 @@ Page({
}) })
return return
} }
// 设置处理状态为true,防止重复提交
this.setData({
isProcessing: true
})
let requestParams = { let requestParams = {
id:formData.id, id:formData.id,
processResult:formData?.processResult, processResult:formData?.processResult,
...@@ -348,8 +368,9 @@ Page({ ...@@ -348,8 +368,9 @@ Page({
interviewResult:formData?.interviewResult, interviewResult:formData?.interviewResult,
description:formData?.description, description:formData?.description,
} }
processResumeAPI(requestParams).then((result) => { processResumeAPI(requestParams).then((result) => {
let { code, data} = result; let { code,message, data} = result;
if(code == 0) { if(code == 0) {
// 处理成功刷新页面数据 // 处理成功刷新页面数据
this.getDetail(this.curDataId) this.getDetail(this.curDataId)
...@@ -357,14 +378,28 @@ Page({ ...@@ -357,14 +378,28 @@ Page({
title: '处理成功', title: '处理成功',
icon: 'success' icon: 'success'
}) })
// 处理完成后关闭弹窗
this.hidePopup()
} else {
// 处理失败,重置处理状态
this.setData({
isProcessing: false
})
wx.showToast({
title: message || '处理失败',
icon: 'error'
})
} }
}).catch( error => { }).catch( error => {
// 处理失败,重置处理状态
this.setData({
isProcessing: false
})
wx.showToast({ wx.showToast({
title: '处理失败', title: '处理失败',
icon: 'error' icon: 'error'
}) })
}) })
this.hidePopup()
}, },
// 更新数据(弹窗确认回调) // 更新数据(弹窗确认回调)
......
...@@ -112,6 +112,10 @@ page { ...@@ -112,6 +112,10 @@ page {
font-size: var(--fontSize30); font-size: var(--fontSize30);
flex: 1; flex: 1;
font-weight: 600; font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: var(--fontSize460);
} }
.tag { .tag {
display: inline-block; display: inline-block;
...@@ -154,8 +158,8 @@ page { ...@@ -154,8 +158,8 @@ page {
margin-top: auto; // 推到底部 margin-top: auto; // 推到底部
.phone { .phone {
color: #333333; color: #333333;
font-size: var(--fontSize28); font-size: var(--fontSize26);
flex: 1; margin-top: auto;
font-weight: 550; font-weight: 550;
.phone_text { .phone_text {
line-height: var(--fontSize50); line-height: var(--fontSize50);
...@@ -165,7 +169,6 @@ page { ...@@ -165,7 +169,6 @@ page {
height: var(--fontSize48); height: var(--fontSize48);
} }
} }
.date { .date {
color: #5A5E66; color: #5A5E66;
font-size: var(--fontSize25); font-size: var(--fontSize25);
...@@ -181,54 +184,9 @@ page { ...@@ -181,54 +184,9 @@ page {
height: var(--fontSize96); height: var(--fontSize96);
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
} }
.user_contact {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1;
min-height: var(--fontSize96); // 与头像高度保持一致
color: #292d33;
font-size: var(--fontSize28);
padding-left: var(--fontSize20);
.name {
color: #292d33;
font-size: var(--fontSize30);
line-height: 1.2;
font-weight: 600;
}
.phone {
color: #333333;
font-size: var(--fontSize26);
margin-top: auto;
font-weight: 550;
.phone_text {
line-height: var(--fontSize50);
}
}
.phone_icon {
width: var(--fontSize48);
height: var(--fontSize48);
}
}
// 独立的日期元素(与 .user_contact 平级)
> .date {
color: #5A5E66;
font-size: var(--fontSize24);
text-align: right;
flex-shrink: 0;
line-height: 1.2;
width: var(--fontSize250);
white-space: nowrap;
padding-bottom: var(--fontSize10);
}
} }
// 入职计划模块 // 入职计划模块
.entry_plan { .entry_plan {
.card {
min-height: var(--fontSize308);
}
.card_content { .card_content {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -289,9 +247,6 @@ page { ...@@ -289,9 +247,6 @@ page {
} }
// 招聘信息模块 // 招聘信息模块
.recruit_info { .recruit_info {
.card {
min-height: var(--fontSize428);
}
.info_item { .info_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -365,6 +320,11 @@ page { ...@@ -365,6 +320,11 @@ page {
align-items: center; align-items: center;
gap: var(--fontSize16); gap: var(--fontSize16);
margin-left: var(--fontSize20); margin-left: var(--fontSize20);
.arrow_right {
width: var(--fontSize14);
height: var(--fontSize28);
padding-top: var(--fontSize2);
}
.tag { .tag {
padding: var(--fontSize8) var(--fontSize20); padding: var(--fontSize8) var(--fontSize20);
background: #f7f8fa; background: #f7f8fa;
...@@ -374,6 +334,7 @@ page { ...@@ -374,6 +334,7 @@ page {
border: 1px solid transparent; border: 1px solid transparent;
transition: all 0.3s; transition: all 0.3s;
cursor: pointer; cursor: pointer;
-webkit-tap-highlight-color: transparent;
&.active { &.active {
background: #e8f4ff; background: #e8f4ff;
color: #347bff; color: #347bff;
...@@ -461,6 +422,13 @@ page { ...@@ -461,6 +422,13 @@ page {
.btn_confirm { .btn_confirm {
background: #347bff; background: #347bff;
color: #ffffff; color: #ffffff;
&.btn_disabled {
background: #cccccc;
color: #ffffff;
opacity: 0.8;
pointer-events: none;
}
} }
} }
} }
......
...@@ -21,11 +21,16 @@ ...@@ -21,11 +21,16 @@
<view class="card"> <view class="card">
<view class="card_top"> <view class="card_top">
<image class="user_icon" src="/packageEquity/pages/image/staff-icon.png" mode="aspectFill"/> <image class="user_icon" src="/packageEquity/pages/image/staff-icon.png" mode="aspectFill"/>
<view class="user_contact"> <view class="user_info">
<view class="name">{{item.personName}}</view> <view class="user_top">
<view class="phone" data-phone="{{item.phoneNumber}}" bind:tap="phoneCall"><text class="phone_text">{{item.phoneNumber}}</text><image class="phone_icon" src="/packageEquity/pages/image/call-icon.png" mode="widthFix"/></view> <view class="name">{{item.personName}}</view>
</view> </view>
<view class="date">入职时间:{{item.onboardingDate}}</view> <view class="user_bottom">
<view class="phone" data-phone="{{item.phoneNumber}}" bind:tap="phoneCall"><text class="phone_text">{{item.phoneNumber}}</text><image class="phone_icon" src="/packageEquity/pages/image/call-icon.png" mode="widthFix"/></view>
<view class="date">入职时间:{{item.onboardingDate}}</view>
</view>
</view>
</view> </view>
<view class="card_content"> <view class="card_content">
<view class="item" wx:for="{{onboardingFieldsConfig}}" wx:key="field" wx:for-item="fieldItem"> <view class="item" wx:for="{{onboardingFieldsConfig}}" wx:key="field" wx:for-item="fieldItem">
...@@ -122,6 +127,7 @@ ...@@ -122,6 +127,7 @@
<view class="{{formData.dipalyTime ? 'time_text' : 'placeholder_text'}}"> <view class="{{formData.dipalyTime ? 'time_text' : 'placeholder_text'}}">
{{formData.dipalyTime || '请选择面试时间'}} {{formData.dipalyTime || '请选择面试时间'}}
</view> </view>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill"/>
</view> </view>
</view> </view>
<view class="form_item" wx:if="{{formData.processResult == 2}}"> <view class="form_item" wx:if="{{formData.processResult == 2}}">
...@@ -150,7 +156,7 @@ ...@@ -150,7 +156,7 @@
</scroll-view> </scroll-view>
<view class="popup_footer"> <view class="popup_footer">
<view class="btn btn_cancel" bindtap="hidePopup">取消</view> <view class="btn btn_cancel" bindtap="hidePopup">取消</view>
<view class="btn btn_confirm" bindtap="confirmProcess">确认</view> <view class="btn btn_confirm {{isProcessing ? 'btn_disabled' : ''}}" bindtap="confirmProcess">{{isProcessing ? '处理中...' : '确认'}}</view>
</view> </view>
</view> </view>
</van-popup> </van-popup>
...@@ -170,6 +176,7 @@ ...@@ -170,6 +176,7 @@
bind:cancel="calcelDate" bind:cancel="calcelDate"
value="{{ currentDate }}" value="{{ currentDate }}"
formatter="{{ formatter }}" formatter="{{ formatter }}"
max-date="{{ today }}"
bind:confirm="bindDateChange" bind:confirm="bindDateChange"
/> />
</van-popup> </van-popup>
......
...@@ -19,7 +19,7 @@ const VALIDATION_CONFIG = { ...@@ -19,7 +19,7 @@ const VALIDATION_CONFIG = {
Page({ Page({
data: { data: {
formList:[ formList:[
{id:0, label:"选择门店名称", placeholder:"请选择招聘门店", options:[]}, {id:0, label:"门店名称", placeholder:"请选择招聘门店", options:[]},
{id:1, label:"业务类型", placeholder:"请选择业务类型", options:[]}, {id:1, label:"业务类型", placeholder:"请选择业务类型", options:[]},
{id:2, label:"招聘数量", placeholder:"请输入招聘数量"}, {id:2, label:"招聘数量", placeholder:"请输入招聘数量"},
{id:3, label:"招聘类型", placeholder:"请选择招聘类型", options:[]}, {id:3, label:"招聘类型", placeholder:"请选择招聘类型", options:[]},
...@@ -34,6 +34,7 @@ Page({ ...@@ -34,6 +34,7 @@ Page({
inputValue: '', inputValue: '',
keyWord: '', // 搜索关键词 keyWord: '', // 搜索关键词
searchTimer: null, // 防抖定时器 searchTimer: null, // 防抖定时器
isSubmitting: false, // 是否正在提交中,防止重复提交
}, },
// 显示popup // 显示popup
async showPopup(e) { async showPopup(e) {
...@@ -220,11 +221,37 @@ Page({ ...@@ -220,11 +221,37 @@ Page({
inputValue: e.detail.value inputValue: e.detail.value
}); });
}, },
// 数字输入变化 // 数字输入变化 - 仅允许输入整数并自动限制在1-100范围内
onNumberInput(e) { onNumberInput(e) {
const index = e.currentTarget.dataset.index; const index = e.currentTarget.dataset.index;
const value = e.detail.value; let value = e.detail.value;
const formList = this.data?.formList; const formList = this.data?.formList;
// 过滤非整数输入(去除小数点和非数字字符)
value = value.replace(/\D/g, '');
// 移除前导零
if (value.length > 1 && value.startsWith('0')) {
value = value.replace(/^0+/, '');
}
// 将空值处理为有效值
if (value === '') {
// 允许空值输入,不做处理
} else {
// 将数值转换为整数
let numValue = parseInt(value, 10);
// 自动将值限制在1-100范围内
if (numValue > 100) {
numValue = 100;
value = '100';
} else if (numValue < 1) {
numValue = 1;
value = '1';
}
}
// 更新对应项的值 // 更新对应项的值
formList[index].value = value; formList[index].value = value;
formList[index].displayValue = value; formList[index].displayValue = value;
...@@ -232,14 +259,26 @@ Page({ ...@@ -232,14 +259,26 @@ Page({
formList formList
}); });
}, },
// textarea输入变化,禁止空格和换行 input(e) {
let {value} = e.detail
this.setData({
keyWord: value
})
},
handleReset() {
this.setData({
keyWord: ''
})
this.performSearch('');
},
// textarea输入变化,允许换行但禁止空格
onTextareaInput(e) { onTextareaInput(e) {
const index = e.currentTarget.dataset.index; const index = e.currentTarget.dataset.index;
let value = e.detail.value; let value = e.detail.value;
const formList = this.data.formList; const formList = this.data.formList;
// 过滤掉空格和换行符 // 只过滤掉空格,保留换行符
value = value.replace(/[\s\r\n]/g, ''); value = value.replace(/ /g, '');
// 更新对应项的值 // 更新对应项的值
formList[index].value = value; formList[index].value = value;
...@@ -312,6 +351,20 @@ Page({ ...@@ -312,6 +351,20 @@ Page({
submit() { submit() {
// 验证表单 // 验证表单
if (!this.validateForm()) return if (!this.validateForm()) return
// 防止重复提交
if (this.data.isSubmitting) {
wx.showToast({
title: '请勿重复提交',
icon: 'none'
})
return
}
// 设置提交状态为true
this.setData({
isSubmitting: true
})
// 显示确认对话框 // 显示确认对话框
Dialog.confirm({ Dialog.confirm({
...@@ -325,11 +378,32 @@ Page({ ...@@ -325,11 +378,32 @@ Page({
.then(res => { .then(res => {
if (res.code == 0) { if (res.code == 0) {
this.navigateToResult() this.navigateToResult()
} else {
// API返回错误,重置提交状态
this.setData({
isSubmitting: false
})
} }
}) })
.catch(err => console.error('提交失败:', err)) .catch(err => {
console.error('提交失败:', err)
// 提交异常,重置提交状态
this.setData({
isSubmitting: false
})
wx.showToast({
title: '提交失败,请重试',
icon: 'none'
})
})
})
.catch(err => {
console.log('用户取消提交')
// 用户取消,重置提交状态
this.setData({
isSubmitting: false
})
}) })
.catch(err => console.log('用户取消提交'))
}, },
// 跳转到结果页面 // 跳转到结果页面
navigateToResult() { navigateToResult() {
...@@ -392,7 +466,6 @@ Page({ ...@@ -392,7 +466,6 @@ Page({
this.setData({ this.setData({
[`formList[${index}].options`]: options [`formList[${index}].options`]: options
}); });
console.log(`返回字典数据 index=${index}`, options);
resolve(options); resolve(options);
} }
}).catch(err => {}) }).catch(err => {})
......
{ {
"disableScroll": true, "disableScroll": true,
"navigationBarTitleText": "添加招聘需求",
"usingComponents": { "usingComponents": {
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -32,7 +32,6 @@ page { ...@@ -32,7 +32,6 @@ page {
justify-content: space-between; justify-content: space-between;
height: var(--fontSize104); height: var(--fontSize104);
align-items: center; align-items: center;
border-bottom: var(--fontSize2) solid #eff0f2;
font-size: var(--fontSize28); font-size: var(--fontSize28);
.required { .required {
color: #f24724; color: #f24724;
...@@ -157,7 +156,6 @@ page { ...@@ -157,7 +156,6 @@ page {
} }
.popup-fixed-top { .popup-fixed-top {
flex: 0 0 auto; flex: 0 0 auto;
padding: var(--fontSize40) var(--fontSize40) 0;
} }
.popup-fixed-bottom { .popup-fixed-bottom {
flex: 0 0 auto; flex: 0 0 auto;
...@@ -172,32 +170,69 @@ page { ...@@ -172,32 +170,69 @@ page {
} }
.popup-title { .popup-title {
height: var(--fontSize110);
line-height: var(--fontSize110);
font-size: var(--fontSize32); font-size: var(--fontSize32);
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin-bottom: 15px; border-bottom: var(--fontSize2) solid #E8E8EA;
} }
.search-box { .search-box {
width: var(--fontSize686); width: var(--fontSize686);
padding: var(--fontSize20) 0; padding: var(--fontSize16) 0;
margin-bottom: var(--fontSize20); border-bottom: var(--fontSize2) solid #eff0f2;
border-top: var(--fontSize2) solid #eee; margin: 0 var(--fontSize40);
border-bottom: var(--fontSize2) solid #eee;
.search-input { .search-input {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
height: var(--fontSize72); height: var(--fontSize72);
background-color: #f5f5f5; background-color: #f5f5f5;
border-radius: var(--fontSize36); border-radius: var(--fontSize36);
padding: 0 var(--fontSize30); padding: 0 var(--fontSize30);
font-size: var(--fontSize28); font-size: var(--fontSize28);
text-align: center; box-sizing: border-box;
position: relative;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
position: absolute;
left: 45%;
top: 50%;
transform: translate(-100%, -50%);
z-index: 1;
margin-left: calc(var(--fontSize-14) - var(--fontSize28));
}
.input {
flex: 1;
height: 100%;
text-align: center;
background-color: transparent;
color: #333;
font-size: var(--fontSize28);
}
.input-placeholder {
color: #999;
text-align: center;
}
.search-clear {
width: var(--fontSize36);
height: var(--fontSize36);
position: absolute;
right: var(--fontSize30);
top: 50%;
z-index: 999;
transform: translateY(-50%);
}
} }
} }
.popup-options { .popup-options {
padding: var(--fontSize20) 0; padding: var(--fontSize10) 0;
} }
.option-item { .option-item {
display: flex; display: flex;
...@@ -206,6 +241,7 @@ page { ...@@ -206,6 +241,7 @@ page {
padding: var(--fontSize24); padding: var(--fontSize24);
border-bottom: var(--fontSize2) solid #eee; border-bottom: var(--fontSize2) solid #eee;
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
.option-item:active { .option-item:active {
background-color: #f2f3f5; background-color: #f2f3f5;
...@@ -249,6 +285,7 @@ page { ...@@ -249,6 +285,7 @@ page {
border-radius: var(--fontSize8); border-radius: var(--fontSize8);
padding: 0 var(--fontSize20); padding: 0 var(--fontSize20);
box-sizing: border-box; box-sizing: border-box;
background-color: chartreuse;
} }
.popup-buttons { .popup-buttons {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</block> </block>
</view> </view>
<view class="footer"> <view class="footer">
<view class="btn" bind:tap="submit">提交</view> <view class="btn {{isSubmitting ? 'btn-disabled' : ''}}" bind:tap="submit">{{isSubmitting ? '提交中...' : '提交'}}</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -53,12 +53,18 @@ ...@@ -53,12 +53,18 @@
<view class="popup-content"> <view class="popup-content">
<!-- 固定顶部区域 --> <!-- 固定顶部区域 -->
<view class="popup-fixed-top"> <view class="popup-fixed-top">
<view class="popup-title">{{currentItem.label}}</view> <view class="popup-title">选择{{currentItem.label}}</view>
<!-- 搜索框 --> <!-- 搜索框 -->
<view class="search-box" wx:if="{{currentIndex === 0}}"> <view class="search-box" wx:if="{{currentIndex === 0}}">
<view class="search-input"> <view class="search-input">
<search-input styleValue="border-bottom:none" value="{{keyWord}}" bindsearch="search" placeholder="搜索" /> <block wx:if="{{!keyWord}}">
<image src="/images/search.png" class="search-icon" />
</block>
<input type="text" placeholder="搜索" class="input" confirm-type="search" value="{{keyWord}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{keyWord}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
</block>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -26,6 +26,8 @@ Page({ ...@@ -26,6 +26,8 @@ Page({
onLoad(options) { onLoad(options) {
let { mentorshipFormData } = this.data let { mentorshipFormData } = this.data
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
this.getWaitstaffstate()
this.search()
// 非区域运营登录,打回到首页 // 非区域运营登录,打回到首页
//ll if (userInfo?.loginRole != 3) wx.reLaunch({ url: "/pages/loading/loading" }) //ll if (userInfo?.loginRole != 3) wx.reLaunch({ url: "/pages/loading/loading" })
if (userInfo?.isSuper) { if (userInfo?.isSuper) {
...@@ -47,8 +49,8 @@ Page({ ...@@ -47,8 +49,8 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getWaitstaffstate() // this.getWaitstaffstate()
this.search() // this.search()
}, },
onBottomRefresh() { onBottomRefresh() {
this.getList() this.getList()
...@@ -112,7 +114,6 @@ Page({ ...@@ -112,7 +114,6 @@ Page({
tipText: tipText || '' // 提示文本 tipText: tipText || '' // 提示文本
} }
}) })
console.log(list);
this.setData({ this.setData({
[`list[${currentPage - 1}]`]: list, [`list[${currentPage - 1}]`]: list,
currentPage: currentPage + 1, currentPage: currentPage + 1,
...@@ -132,14 +133,17 @@ Page({ ...@@ -132,14 +133,17 @@ Page({
// 跳转详情 // 跳转详情
handleDetail(e) { handleDetail(e) {
const { item } = e.currentTarget.dataset; const { item } = e.currentTarget.dataset;
console.log("跳转详情",item);
wx.$router.go("/packageEquity/pages/recruitManage/recruitDetail/recruitDetail", { wx.$router.go("/packageEquity/pages/recruitManage/recruitDetail/recruitDetail", {
id: item.id id: item.id
}); });
//仅已完成/以驳回可以调用flag接口 //仅已完成/以驳回可以调用flag接口
if(item.status == 0 || item.status == 1) return; if(item.status == 0 || item.status == 1) return;
confiremStaffFlagAPI({id: item.id}).then(res => { confiremStaffFlagAPI({id: item.id}).then(res => {
console.log(res); let { code } = res;
if( code == 0) {
this.getWaitstaffstate()
this.search()
}
}) })
}, },
...@@ -150,7 +154,7 @@ Page({ ...@@ -150,7 +154,7 @@ Page({
/** /**
* 处理滚动事件 * 处理滚动事件
* 向上滚动超过阈值时隐藏按钮,向下滚动时显示按钮 * 监听向上滚动超过阈值时隐藏按钮,向下滚动时显示按钮
*/ */
handleScroll(e) { handleScroll(e) {
const { scrollTop } = e.detail; const { scrollTop } = e.detail;
...@@ -158,7 +162,6 @@ Page({ ...@@ -158,7 +162,6 @@ Page({
// 计算滚动方向和距离 // 计算滚动方向和距离
const scrollDistance = Math.abs(scrollTop - lastScrollTop); const scrollDistance = Math.abs(scrollTop - lastScrollTop);
// 只有滚动距离超过阈值才触发显隐逻辑,避免频繁切换 // 只有滚动距离超过阈值才触发显隐逻辑,避免频繁切换
if (scrollDistance > scrollThreshold) { if (scrollDistance > scrollThreshold) {
// 向上滚动(scrollTop 增大)- 隐藏按钮 // 向上滚动(scrollTop 增大)- 隐藏按钮
......
...@@ -7,6 +7,7 @@ page { ...@@ -7,6 +7,7 @@ page {
.container_page { .container_page {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
// 顶部Tab模块
.top_content{ .top_content{
background: #FFFFFF; background: #FFFFFF;
padding-top: var(--fontSize24); padding-top: var(--fontSize24);
...@@ -63,6 +64,7 @@ page { ...@@ -63,6 +64,7 @@ page {
position: relative; position: relative;
} }
} }
// 列表模块
.content { .content {
padding-top: var(--fontSize24); padding-top: var(--fontSize24);
height: calc(100vh - var(--fontSize120)); height: calc(100vh - var(--fontSize120));
...@@ -164,10 +166,12 @@ page { ...@@ -164,10 +166,12 @@ page {
padding-bottom: var(--fontSize32); padding-bottom: var(--fontSize32);
} }
} }
// 空数据占位
.no_data { .no_data {
height: 100%; height: 100%;
} }
} }
// 新增需求按钮
.insert_btn { .insert_btn {
display: grid; display: grid;
place-items: center; place-items: center;
...@@ -206,6 +210,7 @@ page { ...@@ -206,6 +210,7 @@ page {
opacity: 0; opacity: 0;
} }
} }
// 触底提示
.list-nothing { .list-nothing {
color: #999ea8; color: #999ea8;
font-size: var(--fontSize20); font-size: var(--fontSize20);
......
<!-- 招聘管理 --> <!-- 招聘管理 -->
<glsx-privacy appletName="招聘管理" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="招聘管理" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="container_page"> <view class="container_page">
<!-- 顶部Tab --> <!-- 顶部Tab模块 -->
<view class="top_content" wx:if="{{tabList.length}}"> <view class="top_content" wx:if="{{tabList.length}}">
<view class="tab_box"> <view class="tab_box">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{tabIndex}}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{tabIndex}}" />
</view> </view>
</view> </view>
<!-- 列表模块 -->
<view class="content"> <view class="content">
<scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" bindscroll="handleScroll" class="list" scroll-top="{{ scrollTop }}" lower-threshold="400" refresher-threshold="104" refresher-triggered="{{ triggered }}"> <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="onBottomRefresh" bindscroll="handleScroll" class="list" scroll-top="{{ scrollTop }}" lower-threshold="400" refresher-threshold="104" refresher-triggered="{{ triggered }}">
<!-- 需求列表 --> <!-- 需求列表 -->
<block wx:if="{{ list.length && list[0].length }}"> <block wx:if="{{ list.length && list[0].length }}">
<block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind"> <block wx:for="{{ list }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view wx:for="{{ i }}" wx:key="index" class="item {{userInfo.isSuper ? 'super_item' : ''}}" bind:tap="handleDetail" data-item="{{item}}"> <view wx:for="{{ i }}" wx:key="index" class="item {{userInfo.isSuper ? 'super_item' : ''}}" bind:tap="handleDetail" data-item="{{item}}">
...@@ -23,7 +24,8 @@ ...@@ -23,7 +24,8 @@
<view class="value">{{item[it.labelName] || '-'}} <text wx:if="{{it.label == '招聘数量'}}">人</text> </view> <view class="value">{{item[it.labelName] || '-'}} <text wx:if="{{it.label == '招聘数量'}}">人</text> </view>
</block> </block>
</view> </view>
<view class="item_footer" wx:if="{{item.showTip && item.confirmFlag == 'N' && item.status !== 0}}"> <!-- 提示消息 -->
<view class="item_footer" wx:if="{{tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0}}">
<view class="msg_tips"> <view class="msg_tips">
<text>{{item.tipText}}</text> <text>{{item.tipText}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill"/> <image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill"/>
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
<view class="list-nothing">没有更多了</view> <view class="list-nothing">没有更多了</view>
</block> </block>
</block> </block>
<!-- 空数据占位 -->
<view class="no_data" wx:else> <view class="no_data" wx:else>
<empty-data /> <empty-data />
</view> </view>
......
...@@ -38,7 +38,6 @@ Page({ ...@@ -38,7 +38,6 @@ Page({
// 场景类型:0-会员权益/升级,1-精品升级,2-次新车转化,3-售后众筹 // 场景类型:0-会员权益/升级,1-精品升级,2-次新车转化,3-售后众筹
const scenePageMap = constantData.pageUrl const scenePageMap = constantData.pageUrl
const targetPage = scenePageMap[sceneType] || 'tabIndex.index' const targetPage = scenePageMap[sceneType] || 'tabIndex.index'
console.log('当前场景类型:', sceneType, '跳转页面:', targetPage)
wx.$router.reLaunch(targetPage, {}); wx.$router.reLaunch(targetPage, {});
}, },
......
...@@ -58,7 +58,7 @@ module.exports = { ...@@ -58,7 +58,7 @@ module.exports = {
data = { data = {
sceneType: 0, sceneType: 0,
currentPage: 1, currentPage: 1,
pageSize: 100, pageSize: 999999,
...data ...data
} }
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.list', data) return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.list', data)
......
...@@ -251,7 +251,8 @@ export const checkScene = options => { ...@@ -251,7 +251,8 @@ export const checkScene = options => {
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', 'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone', 'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone',
'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage', 'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage',
'refundApply': 'tabWorkOrder/pages/refundApply/refundApply' 'refundApply': 'tabWorkOrder/pages/refundApply/refundApply',
'recruitDetail': 'packageEquity/pages/recruitManage/recruitDetail/recruitDetail'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
......
...@@ -1278,6 +1278,7 @@ Page({ ...@@ -1278,6 +1278,7 @@ Page({
}, },
checkIsPadOrNot() { checkIsPadOrNot() {
let _this = this
wx.getRendererUserAgent({ wx.getRendererUserAgent({
success(res) { success(res) {
let isPad = /iPad|Android.*Tablet|Kindle|Silk/i.test(res.userAgent) let isPad = /iPad|Android.*Tablet|Kindle|Silk/i.test(res.userAgent)
......
...@@ -22,78 +22,90 @@ class Request { ...@@ -22,78 +22,90 @@ class Request {
let _this = this let _this = this
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
if (!data) data = {} wx.getNetworkType({
let header = success(res) {
RequestMethods === 'POST' ? { if (res.networkType == "none") {
'content-type': 'application/x-www-form-urlencoded' wx.hideLoading();
} : {};
let url = `${domain[domainName]}${requestPath || path}`;
// console.log(requestPath)
if (method) {
data = _this.getData(data, method, noSignAttr, domainName == 'merchants')
url = `${domain[domainName]}${requestPath || path}?method=${method}`;
} else {
header = {
'content-type': 'application/json'
}
}
// console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
wx.request({
url,
data,
method: RequestMethods,
header,
dataType: 'json',
responseType: 'text',
success(response) {
/**业务代码 */
let {
data: {
code,
message,
subErrors
},
data
} = response
if (code == 20 || code == 21) {
let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
wx.hideLoading()
if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true, '', url)
}
} else if (code == -1) {
wx.showToast({ wx.showToast({
title: message || '网络请求失败', title: '网络异常',
icon: 'none' icon: "none",
}) })
resolve(data) return;
} else {
// util.debounce( getApp().test(true),500)
// getApp().test()
// console.log(data,'data');
resolve(data)
} }
}, if (!data) data = {}
fail(error) { let header =
wx.hideLoading() RequestMethods === 'POST' ? {
console.error(`接口异常:${domain[domainName]}${requestPath || path}?method=${method}`, error) 'content-type': 'application/x-www-form-urlencoded'
if (failTips) { } : {};
wx.showToast({ let url = `${domain[domainName]}${requestPath || path}`;
title: '系统异常', // console.log(requestPath)
icon: 'error' if (method) {
}) data = _this.getData(data, method, noSignAttr, domainName == 'merchants')
url = `${domain[domainName]}${requestPath || path}?method=${method}`;
} else {
header = {
'content-type': 'application/json'
}
} }
reject(error) // console.log('reqData',data?.sessionId);
}, // delete
complete() { // if (data?.sessionId) {
wx.stopPullDownRefresh() // delete data?.sessionId
wx.hideNavigationBarLoading() // }
wx.request({
url,
data,
method: RequestMethods,
header,
dataType: 'json',
responseType: 'text',
success(response) {
/**业务代码 */
let {
data: {
code,
message,
subErrors
},
data
} = response
if (code == 20 || code == 21) {
let thisPage = wx.$router.getPageInstance()
// console.log(thisPage);
wx.hideLoading()
if (thisPage.route != 'pages/wxLogin/wxLogin') {
getApp().login(true, '', url)
}
} else if (code == -1) {
wx.showToast({
title: message || '网络请求失败',
icon: 'none'
})
resolve(data)
} else {
// util.debounce( getApp().test(true),500)
// getApp().test()
// console.log(data,'data');
resolve(data)
}
},
fail(error) {
wx.hideLoading()
console.error(`接口异常:${domain[domainName]}${requestPath || path}?method=${method}`, error)
if (failTips) {
wx.showToast({
title: '系统异常',
icon: 'error'
})
}
reject(error)
},
complete() {
wx.stopPullDownRefresh()
wx.hideNavigationBarLoading()
}
})
} }
}) })
}) })
...@@ -114,7 +126,7 @@ class Request { ...@@ -114,7 +126,7 @@ class Request {
if (!apiName) { if (!apiName) {
throw new Error('apiName is null') throw new Error('apiName is null')
} }
if(apiName.split('.').length > 1) apiName = apiName.split('.')[0] if (apiName.split('.').length > 1) apiName = apiName.split('.')[0]
if (merchant) apiName = 'merchants' if (merchant) apiName = 'merchants'
const appKey = secretKey[apiName].appKey const appKey = secretKey[apiName].appKey
const secret = secretKey[apiName].secret const secret = secretKey[apiName].secret
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!