Commit c59c23f5 by 张立顺

Merge branch 'SAAS+V5.8.5' of http://192.168.3.233:8090/saas_plus/regional-assis…

…tant into SAAS+V5.8.5
2 parents 35e54893 66902312
...@@ -522,6 +522,13 @@ module.exports = { ...@@ -522,6 +522,13 @@ module.exports = {
getStaffTemplate(data) { getStaffTemplate(data) {
return api.post('dj.api.carboutique.find.staff.good.news.template', data) return api.post('dj.api.carboutique.find.staff.good.news.template', data)
}, },
// 获取异常订单待审核数量
getOrderWaitForAudit(data) {
return api.post(
'dj.api.smartcarlife.goodsOrderApplyRecord.waitForAudit.count',
data
)
},
/** 带教申请列表 */ /** 带教申请列表 */
getMentorShipList(data) { getMentorShipList(data) {
return api.post( return api.post(
...@@ -575,4 +582,49 @@ module.exports = { ...@@ -575,4 +582,49 @@ module.exports = {
'/rop-dj-pad/router' '/rop-dj-pad/router'
) )
}, },
// 招聘管理门店列表
getDemandStoreListAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.store.list',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
// 招聘管理字典查询
getStaffDictListAPI(data) {
return api.post(
'dj.api.staff.miniprogram.dict.list',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 添加招聘需求 */
addStaffDictListAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.add',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 招聘需求分页列表 */
getRecruitmentPageAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.page',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 获取所有驻店人员数据 */
getAllStaffListAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.staff.page',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
} }
import api from "~/utils/request/request.js";
module.exports = {
// 获取人员带教表单字典数据
getMentorDictList(data) {
return api.post('dj.api.staff.miniprogram.dict.list', data, [], '/rop-dj-staff-miniprogram/router')
},
// 获取带教参与人员列表数据
getParticipantOptions(data) {
return api.post('dj.api.supervisor.mini.team.staff.baseInfo.page', data, [], '/rop-dj-supervisor-mini/router')
},
// 查询督导管理门店数据
getSupervisorMerchantList(data) {
return api.post('dj.api.supervisor.mini.list.flightSupervisionMerchant', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取任务中心督导带教任务详情
*/
getTaskCenterDetail(data) {
return api.post('dj.staff.api.taskcenter.supervisor.coach.detail',data, [], '/rop-dj-staff-miniprogram/router')
},
/**
* 执行任务中心督导带教任务
*/
executeTaskCenter(data) {
return api.post('dj.staff.api.taskcenter.supervisor.coach.submit',data, [], '/rop-dj-staff-miniprogram/router')
},
// 获取全部课程列表数据
getRecommendedCourseList(data) {
return api.post('dj.supervisor.mini.api.all.course.page', data, [], '/rop-dj-supervisor-mini/router')
},
}
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
"pages/mattersSubmitResult/mattersSubmitResult", "pages/mattersSubmitResult/mattersSubmitResult",
"pages/teachApply/teachApply", "pages/teachApply/teachApply",
"pages/teachApplyDetail/teachApplyDetail", "pages/teachApplyDetail/teachApplyDetail",
"pages/teachApplyCreate/teachApplyCreate" "pages/teachApplyCreate/teachApplyCreate",
"pages/specialMentoring/specialMentoring"
], ],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
......
// packageWorkspace/pages/performanceRating/components/selectPopup/selectPopup.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Component({
options: {
addGlobalClass: true
},
properties: {
show: {
type: Boolean,
value: false
},
title: {
type: String,
value: ''
},
// 原始选项列表,支持任意字段名,通过 labelKey/valueKey 映射
options: {
type: Array,
value: []
},
// 是否多选
multiple: {
type: Boolean,
value: false
},
// 单选初始值
value: {
type: null,
value: null
},
// 多选初始值
values: {
type: Array,
value: []
},
// 字段映射
labelKey: {
type: String,
value: 'name'
},
valueKey: {
type: String,
value: 'value'
},
// 多选最大数量(不限制则设为 0 或不传)
max: {
type: Number,
value: 0
},
// 单选时点击即确认
confirmOnSelect: {
type: Boolean,
value: false
},
height: {
type: String
},
allowSearch: {
type: Boolean
}
},
data: {
IMG_URL,
displayOptions: [], // 带 checked 的渲染选项
selectedValues: [] // 选中的值列表(单选也统一用数组)
},
observers: {
'options, multiple, value, values': function(options, multiple, value, values) {
this.initDisplay(options || [], multiple, value, values)
},
show(n) {
// 进出场时保持数据一致
if (n) {
this.setData({
searchValue: ''
})
this.initDisplay(this.properties.options || [], this.properties.multiple, this.properties.value, this.properties.values)
}
}
},
methods: {
initDisplay(options = [], multiple = false, value = null, values = []) {
const vKey = this.properties.valueKey
// 初始选中值统一转为数组
const initSelected = multiple ? (Array.isArray(values) ? values.slice() : []) : (value !== null && value !== undefined ? value : [])
const display = (options || []).map(item => {
const val = item[vKey]
const checked = initSelected?.some(v => v == val)
return { ...item, checked }
})
this.setData({
displayOptions: display,
copyDisplayOptions: wx.$util.deepClone(display),
selectedValues: initSelected
})
},
toggle(e) {
const { index, item } = e.currentTarget.dataset
const { multiple, max, valueKey } = this.properties
let { displayOptions, copyDisplayOptions } = this.data
if (!item || item.disabled) return
if (multiple) {
let nextChecked = !item.checked
// 限制最大数量
if (nextChecked && max > 0) {
const selectedCount = this.data.selectedValues.length
if (selectedCount >= max) {
// 可根据项目规范提示用户,这里不做 UI 弹窗,保持组件纯净
this.triggerEvent('maxtips')
return
}
}
const selectIndex = displayOptions?.findIndex(v => v[valueKey] == item[valueKey])
this.setData({ [`displayOptions[${selectIndex}].checked`]: nextChecked })
const copySelectIndex = copyDisplayOptions?.findIndex(v => v[valueKey] == item[valueKey])
this.setData({ [`copyDisplayOptions[${copySelectIndex}].checked`]: nextChecked })
const val = item[valueKey]
let selected = this.data.selectedValues.slice()
const pos = selected.findIndex(v => v == val)
if (nextChecked && pos == -1) selected.push(val)
if (!nextChecked && pos > -1) selected.splice(pos, 1)
this.setData({ selectedValues: selected })
this.triggerEvent('change', { values: selected, items: this.getSelectedItems() })
} else {
// 单选:取消其他,选中当前
const currentVal = item[valueKey]
const display = this.data.displayOptions.map((it, idx) => ({ ...it, checked: idx == index ? !it.checked : false }))
const selected = display[index].checked ? [currentVal] : []
this.setData({ displayOptions: display, selectedValues: selected })
const copyDisplay = this.data.copyDisplayOptions.map((it, idx) => ({ ...it, checked: idx == index ? !it.checked : false }))
this.setData({ copyDisplayOptions: copyDisplay })
this.triggerEvent('change', { values: selected, items: this.getSelectedItems() })
if (this.properties.confirmOnSelect) {
this.onConfirm()
}
}
},
search(e) {
let { labelKey, copyDisplayOptions, displayOptions, selectedValues, valueKey } = this.data
let { value } = e.detail
if (!value) {
copyDisplayOptions.map(i => {
i.checked = false
if (selectedValues.includes(i[valueKey])) i.checked = true
return i
})
this.setData({
displayOptions: copyDisplayOptions
})
} else {
let arr = []
copyDisplayOptions.map(i => {
i.checked = false
if (selectedValues.includes(i[valueKey])) i.checked = true
if (i[labelKey].indexOf(value) != -1) {
arr.push(i)
}
})
this.setData({
displayOptions: arr
})
}
},
onCancel() {
this.triggerEvent('cancel')
},
onConfirm() {
const values = this.data.selectedValues
const items = this.getSelectedItems()
this.triggerEvent('confirm', { values, items })
},
getSelectedItems() {
return (this.data.copyDisplayOptions || []).filter(it => it.checked)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* packageWorkspace/pages/performanceRating/components/selectPopup/selectPopup.wxss */
.sp-list {
box-sizing: border-box;
height: 100%;
&.hassearch {
height: calc(100% - 104rpx);
}
.sp-item {
display: flex;
align-items: center;
justify-content: space-between;
height: 96rpx;
border-bottom: 2rpx solid #F0F2F5;
color: #333;
font-size: 28rpx;
&:last-child {
border-bottom: none;
}
.label {
max-width: 580rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.check {
width: 32rpx;
height: 32rpx;
}
}
.active {
.label {
color: #3D74FF;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--packageWorkspace/pages/performanceRating/components/selectPopup/selectPopup.wxml-->
<popup show="{{show}}" title="{{title}}" height="{{height || '50%'}}" bind:confirm="onConfirm" bind:cancel="onCancel" customPopupSlotStyle="overflow:auto;">
<view wx:if="{{allowSearch}}">
<search-input bindsearch="search" placeholder="搜索" value="{{ searchValue }}" />
</view>
<scroll-view scroll-y show-scrollbar="{{false}}" enhanced class="sp-list {{allowSearch ? 'hassearch' : ''}}">
<block wx:if="{{displayOptions.length}}">
<block wx:for="{{displayOptions}}" wx:key="index">
<view class="sp-item {{item.checked ? 'active' : ''}} {{item.disabled ? 'disabled' : ''}}" catchtap="toggle" data-index="{{index}}" data-item="{{item}}">
<text class="label">{{item[labelKey] || item.label || item.text}}</text>
<image class="check" src="{{IMG_URL}}checked.png" wx:if="{{item.checked}}" />
</view>
</block>
</block>
<block wx:else>
<empty-data />
</block>
</scroll-view>
</popup>
\ No newline at end of file \ No newline at end of file
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<view class="entry_plan"> <view class="entry_plan">
<view class="block_title" style="display: flex; justify-content: space-between; align-items: center;"> <view class="block_title" style="display: flex; justify-content: space-between; align-items: center;">
<text>试岗计划</text> <text>试岗计划</text>
<view wx:if="{{recruitment.status!=2||recruitment.status!=3}}" class="btn_add_trial" bindtap="showTrialPopup" data-type="add" style="color: #347bff; font-size: 26rpx; font-weight: normal; display: flex; align-items: center;"> <view wx:if="{{recruitment.status!=2&&recruitment.status!=3}}" class="btn_add_trial" bindtap="showTrialPopup" data-type="add" style="color: #347bff; font-size: 26rpx; font-weight: normal; display: flex; align-items: center;">
<van-icon name="plus" style="margin-right: 4rpx;" /> 添加试岗 <van-icon name="plus" style="margin-right: 4rpx;" /> 添加试岗
</view> </view>
</view> </view>
......
import { getDemandStoreListAPI, getStaffDictListAPI, addStaffDictListAPI, getRecruitDetailAPI } from "~/api/api";
Component({
properties: {
show: {
type: Boolean,
value: false,
},
storeId: {
type: String,
value: "",
},
storeName: {
type: String,
value: "",
},
businessType: {
type: String,
value: "",
},
businessTypeName: {
type: String,
value: "",
},
taskCenterId: {
type: String,
value: "",
},
},
observers: {
show(newVal) {
if (newVal) {
this.initForm();
this.loadOptions();
}
},
},
data: {
form: {
merchantId: "",
merchantName: "",
businessType: "",
businessTypeName: "",
quantity: "",
recruitType: "",
recruitTypeName: "",
urgent: false,
description: "",
descriptionCount: 0,
},
storeList: [],
businessTypeOptions: [],
recruitTypeOptions: [],
currentPicker: "",
pickerTitle: "",
pickerOptions: [],
pickerValue: "",
pickerAllowSearch: false,
},
methods: {
initForm() {
const { storeId, storeName, businessType, businessTypeName } = this.properties;
this.setData({
form: {
merchantId: storeId || "",
merchantName: storeName || "",
businessType: businessType || "",
businessTypeName: businessTypeName || "",
quantity: "",
recruitType: "1",
recruitTypeName: "老店人员更换",
urgent: false,
description: "",
descriptionCount: 0,
},
});
},
async loadOptions() {
try {
const storeRes = await getDemandStoreListAPI({});
if (storeRes?.code === "0" || storeRes?.code === 0) {
this.setData({ storeList: storeRes.data || [] });
}
const businessRes = await getStaffDictListAPI({ businessCode: "recruitment", typeCode: "business_type" });
if (businessRes?.code === "0" || businessRes?.code === 0) {
this.setData({
businessTypeOptions: this.formatOptions(businessRes.data),
});
}
const typeRes = await getStaffDictListAPI({ businessCode: "recruitment", typeCode: "recruitment_type" });
if (typeRes?.code === "0" || typeRes?.code === 0) {
const recruitTypeOptions = this.formatOptions(typeRes.data);
this.setData({ recruitTypeOptions });
this.autoMatchRecruitType(recruitTypeOptions);
}
} catch (e) {
console.error("加载招聘选项失败", e);
}
},
autoMatchRecruitType(recruitTypeOptions) {
const { form } = this.data;
if (form.recruitType || !form.recruitTypeName) return;
const matched = (recruitTypeOptions || []).find((item) => (item.text || "") === form.recruitTypeName);
if (matched) {
form.recruitType = matched.value;
this.setData({ form });
}
},
formatOptions(list) {
return (list || []).map((item) => ({
text: item.itemName,
value: item.itemValue,
}));
},
formatDateTime(date) {
if (!date) return "";
const d = new Date(date);
const year = d.getFullYear();
const month = String(d.getMonth() + 1).padStart(2, "0");
const day = String(d.getDate()).padStart(2, "0");
const hour = String(d.getHours()).padStart(2, "0");
const minute = String(d.getMinutes()).padStart(2, "0");
return `${year}-${month}-${day} ${hour}:${minute}`;
},
close() {
this.triggerEvent("close");
},
onStoreTap() {
const { storeList, form } = this.data;
const options = storeList.map((item) => ({
text: item.merchantName,
value: item.merchantId,
}));
this.openPicker("store", "选择招聘门店", options, true, form.merchantId);
},
onBusinessTypeTap() {
const { businessTypeOptions, form } = this.data;
this.openPicker("businessType", "选择业务类型", businessTypeOptions, false, form.businessType);
},
onTypeTap() {
const { recruitTypeOptions, form } = this.data;
this.openPicker("recruitType", "选择招聘类型", recruitTypeOptions, false, form.recruitType);
},
openPicker(type, title, options, allowSearch = false, defaultValue = "") {
this.setData({
currentPicker: type,
pickerTitle: title,
pickerOptions: options || [],
pickerValue: [defaultValue],
pickerAllowSearch: allowSearch,
});
},
closePicker() {
this.setData({ currentPicker: "" });
},
onPickerConfirm(e) {
const { currentPicker, form } = this.data;
const selected = (e.detail.items || [])[0] || {};
if (currentPicker === "store") {
form.merchantId = selected.value || "";
form.merchantName = selected.text || "";
} else if (currentPicker === "businessType") {
form.businessType = selected.value || "";
form.businessTypeName = selected.text || "";
} else if (currentPicker === "recruitType") {
form.recruitType = selected.value || "";
form.recruitTypeName = selected.text || "";
}
this.setData({ form, currentPicker: "" });
},
onQuantityInput(e) {
let value = e.detail.value;
value = value.replace(/\D/g, "");
if (value.length > 1 && value.startsWith("0")) {
value = value.replace(/^0+/, "");
}
if (value !== "") {
const numValue = parseInt(value, 10);
if (numValue > 100) value = "100";
else if (numValue < 1) value = "1";
}
this.setData({ "form.quantity": value });
},
onUrgentChange(e) {
this.setData({ "form.urgent": e.detail.value });
},
onDescriptionInput(e) {
let value = e.detail.value;
if (value.length > 200) value = value.substring(0, 200);
this.setData({
"form.description": value,
"form.descriptionCount": value.length,
});
},
validateForm() {
const { form } = this.data;
if (!form.merchantId) {
wx.showToast({ title: "请选择招聘门店", icon: "none" });
return false;
}
if (!form.businessType) {
wx.showToast({ title: "请选择业务类型", icon: "none" });
return false;
}
if (!form.quantity) {
wx.showToast({ title: "请输入招聘数量", icon: "none" });
return false;
}
if (!form.recruitType) {
wx.showToast({ title: "请选择招聘类型", icon: "none" });
return false;
}
if (!form.description.trim()) {
wx.showToast({ title: "请输入需求描述", icon: "none" });
return false;
}
return true;
},
async submit() {
if (!this.validateForm()) return;
wx.showLoading({ title: "提交中", mask: true });
try {
const { form } = this.data;
const params = {
merchantId: form.merchantId,
merchantName: form.merchantName,
businessType: form.businessType,
businessTypeName: form.businessTypeName,
recruitmentQuantity: parseInt(form.quantity, 10),
recruitmentType: form.recruitType,
recruitmentTypeName: form.recruitTypeName,
requirementDescription: form.description,
urgent: form.urgent ? 1 : 0,
taskCenterId: this.properties.taskCenterId,
};
const res = await addStaffDictListAPI(params);
if (res?.code === "0" || res?.code === 0) {
wx.showToast({ title: "发起成功", icon: "success" });
const successData = {
...(res.data || {}),
recruitId: res.data || "",
businessTypeName: form.businessTypeName,
recruitTypeName: form.recruitTypeName,
createTime: this.formatDateTime(new Date()),
};
this.triggerEvent("success", { data: successData });
} else {
wx.showToast({ title: res?.message || "发起失败", icon: "none" });
}
} catch (e) {
wx.showToast({ title: "发起失败", icon: "none" });
} finally {
wx.hideLoading();
}
},
},
});
{
"component": true,
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"select-popup": "/components/selectPopup/selectPopup"
}
}
.recruit-popup {
height: 100%;
display: flex;
flex-direction: column;
background: #ffffff;
}
.recruit-popup-title {
height: 110rpx;
line-height: 110rpx;
font-size: 32rpx;
font-weight: 600;
color: #222222;
text-align: center;
border-bottom: 2rpx solid #f0f1f5;
}
.recruit-popup-scroll {
box-sizing: border-box;
flex: 1;
height: 0;
padding: 0 32rpx;
}
.recruit-form {
padding-top: 16rpx;
}
.recruit-form-item {
display: flex;
justify-content: space-between;
align-items: center;
min-height: 104rpx;
border-bottom: 2rpx solid #f5f5f5;
font-size: 28rpx;
}
.no-border {
border-bottom: none;
}
.tips-box {
border-bottom: 2rpx solid #f5f5f5;
color: #BBBBBB;
font-size: 24rpx;
padding-bottom: 24rpx;
}
.recruit-form-item--textarea {
flex-direction: column;
align-items: flex-start;
padding: 24rpx 0;
min-height: auto;
}
.recruit-form-item--textarea .recruit-form-label {
margin-bottom: 16rpx;
}
.recruit-form-label {
color: #222222;
font-weight: 500;
}
.recruit-form-label .required {
color: #ff4d4f;
margin-left: 4rpx;
}
.recruit-form-value {
display: flex;
align-items: center;
flex: 1;
justify-content: flex-end;
margin-left: 24rpx;
}
.recruit-form-text {
color: #222222;
font-size: 28rpx;
flex: 1;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.recruit-form-text.placeholder {
color: #bbbbbb;
}
.recruit-form-input {
flex: 1;
height: 72rpx;
font-size: 28rpx;
color: #222222;
text-align: right;
border: none;
background: transparent;
}
.recruit-form-unit {
color: #222222;
font-size: 28rpx;
margin-left: 8rpx;
}
.arrow-right {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
flex-shrink: 0;
}
.recruit-textarea-wrapper {
width: 100%;
position: relative;
}
.recruit-textarea {
width: 100%;
height: 240rpx;
padding: 24rpx;
padding-bottom: 60rpx;
background: #ffffff;
border-radius: 16rpx;
font-size: 28rpx;
color: #222222;
line-height: 40rpx;
box-sizing: border-box;
border: 2rpx solid #ececec;
}
.recruit-textarea-count {
position: absolute;
right: 16rpx;
bottom: 16rpx;
font-size: 24rpx;
color: #bbbbbb;
}
.recruit-popup-footer {
flex-shrink: 0;
padding: 16rpx 32rpx 0;
background: #ffffff;
box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.04);
}
.recruit-submit-btn {
height: 88rpx;
line-height: 88rpx;
text-align: center;
border-radius: 16rpx;
font-size: 32rpx;
font-weight: 500;
color: #ffffff;
background: #2c66f7;
}
.recruit-form-value switch {
transform: scale(0.75);
transform-origin: 100% 50%;
}
<van-popup show="{{ show }}"
position="bottom"
round
closeable
bind:close="close"
custom-style="height: 88%">
<view class="recruit-popup">
<view class="recruit-popup-title">
发起招聘
</view>
<scroll-view scroll-y class="recruit-popup-scroll">
<view class="recruit-form">
<!-- 招聘门店 -->
<view class="recruit-form-item" bindtap="onStoreTap">
<view class="recruit-form-label">
招聘门店<text class="required">*</text>
</view>
<view class="recruit-form-value">
<text class="recruit-form-text {{ form.merchantName ? '' : 'placeholder' }}">{{ form.merchantName || '请选择招聘门店' }}</text>
<image class="arrow-right"
src="/packageWorkspace/pages/image/arrow-right.png"
mode="aspectFill" />
</view>
</view>
<!-- 业务类型 -->
<view class="recruit-form-item" bindtap="onBusinessTypeTap">
<view class="recruit-form-label">
业务类型<text class="required">*</text>
</view>
<view class="recruit-form-value">
<text class="recruit-form-text {{ form.businessTypeName ? '' : 'placeholder' }}">{{ form.businessTypeName || '请选择业务类型' }}</text>
<image class="arrow-right"
src="/packageWorkspace/pages/image/arrow-right.png"
mode="aspectFill" />
</view>
</view>
<!-- 招聘数量 -->
<view class="recruit-form-item">
<view class="recruit-form-label">
招聘数量<text class="required">*</text>
</view>
<view class="recruit-form-value">
<input class="recruit-form-input"
type="number"
placeholder="请输入招聘数量"
placeholder-style="color: #BBBBBB;font-size:28rpx"
value="{{ form.quantity }}"
bindinput="onQuantityInput" />
<text class="recruit-form-unit">人</text>
</view>
</view>
<!-- 招聘类型 -->
<view class="recruit-form-item" bindtap="onTypeTap">
<view class="recruit-form-label">
招聘类型<text class="required">*</text>
</view>
<view class="recruit-form-value">
<text class="recruit-form-text {{ form.recruitTypeName ? '' : 'placeholder' }}">{{ form.recruitTypeName || '请选择招聘类型' }}</text>
<image class="arrow-right"
src="/packageWorkspace/pages/image/arrow-right.png"
mode="aspectFill" />
</view>
</view>
<!-- 是否急招 -->
<view class="recruit-form-item no-border">
<view class="recruit-form-label">
是否急招<text class="required">*</text>
</view>
<view class="recruit-form-value">
<switch checked="{{ form.urgent }}" color="#2c66f7" bindchange="onUrgentChange" />
</view>
</view>
<view class="tips-box">
提示:申请急招,在招聘负责人推送简历后,需在24小时内完成简历跟进处理,否则将自动上报总部,请知悉!
</view>
<!-- 需求描述 -->
<view class="recruit-form-item recruit-form-item--textarea">
<view class="recruit-form-label">
需求描述<text class="required">*</text>
</view>
<view class="recruit-textarea-wrapper">
<textarea class="recruit-textarea"
placeholder="请简单描述用人要求等信息"
placeholder-style="color: #BBBBBB;font-size:28rpx"
value="{{ form.description }}"
bindinput="onDescriptionInput"
maxlength="200" />
<view class="recruit-textarea-count">
{{ form.descriptionCount || 0 }}/200
</view>
</view>
</view>
</view>
</scroll-view>
<view class="recruit-popup-footer">
<view class="recruit-submit-btn" bindtap="submit">
发起并关联
</view>
</view>
</view>
</van-popup>
<!-- 选择器弹窗 -->
<select-popup show="{{ currentPicker !== '' }}"
title="{{ pickerTitle }}"
options="{{ pickerOptions }}"
value="{{ pickerValue }}"
label-key="text"
value-key="value"
allow-search="{{ pickerAllowSearch }}"
bind:confirm="onPickerConfirm"
bind:cancel="closePicker" />
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"navigation-bar": "/components/navigationBar/navigationBar", "navigation-bar": "/components/navigationBar/navigationBar",
"gl-textarea": "/components/GlTextarea/GlTextarea" "gl-textarea": "/components/GlTextarea/GlTextarea",
"van-radio": "@vant/weapp/radio/index",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-popup": "@vant/weapp/popup/index",
"van-search": "@vant/weapp/search/index",
"van-loading": "@vant/weapp/loading/index",
"van-icon": "@vant/weapp/icon/index",
"recruit-popup": "/pages/components/recruitPopup/recruitPopup",
"select-popup": "/components/selectPopup/selectPopup"
} }
} }
.text-hide {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
page { page {
background: #f2f3f7; background: #f2f3f7;
height: 100vh; height: 100vh;
...@@ -22,6 +28,7 @@ page { ...@@ -22,6 +28,7 @@ page {
flex: 1; flex: 1;
height: 0; height: 0;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 24rpx;
} }
.flex { .flex {
...@@ -31,7 +38,7 @@ page { ...@@ -31,7 +38,7 @@ page {
.card { .card {
margin: 24rpx 24rpx 0; margin: 24rpx 24rpx 0;
padding: 24rpx 32rpx; padding: 32rpx;
background: #ffffff; background: #ffffff;
border-radius: 32rpx; border-radius: 32rpx;
box-sizing: border-box; box-sizing: border-box;
...@@ -54,6 +61,13 @@ page { ...@@ -54,6 +61,13 @@ page {
color: #222222; color: #222222;
} }
.card-head-label {
font-size: 30rpx;
font-weight: 600;
color: #222222;
margin-right: 16rpx;
}
.status { .status {
height: 48rpx; height: 48rpx;
line-height: 48rpx; line-height: 48rpx;
...@@ -68,7 +82,7 @@ page { ...@@ -68,7 +82,7 @@ page {
} }
.info-row { .info-row {
margin-bottom: 12rpx; margin-bottom: 16rpx;
font-size: 26rpx; font-size: 26rpx;
} }
...@@ -77,7 +91,7 @@ page { ...@@ -77,7 +91,7 @@ page {
} }
.info-label { .info-label {
width: 184rpx; width: 186rpx;
margin-right: 32rpx; margin-right: 32rpx;
color: #999999; color: #999999;
flex-shrink: 0; flex-shrink: 0;
...@@ -110,13 +124,17 @@ page { ...@@ -110,13 +124,17 @@ page {
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.mar-t20 {
margin-top: 20rpx;
}
.required { .required {
color: #ff4d4f; color: #ff4d4f;
margin-left: 4rpx; margin-left: 4rpx;
} }
.textarea-wrap { .textarea-wrap {
height: 284px; height: 284rpx;
padding: 24rpx; padding: 24rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
...@@ -167,3 +185,269 @@ page { ...@@ -167,3 +185,269 @@ page {
.handle-page--readonly .reply-card { .handle-page--readonly .reply-card {
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
/* 任务执行结果卡片 */
.execution-result-card {
margin-top: 24rpx;
}
/* 任务执行结果 */
.radio-box {
display: flex;
flex-wrap: nowrap;
align-items: center;
}
.radio-box .radio-item {
margin-right: 32rpx;
flex-shrink: 0;
}
.radio-box .radio-item:last-child {
margin-right: 0;
}
/* vant radio 自定义样式 */
.radio-icon {
border-radius: 100% !important;
}
.van-radio--horizontal {
margin-right: 0 !important;
}
.van-radio__icon-wrap,
.van-radio__icon {
font-size: 30rpx !important;
}
.van-radio__icon--checked {
font-size: 30rpx !important;
background-color: #2c66f7 !important;
border-color: #2c66f7 !important;
}
.van-icon-success {
line-height: 32rpx !important;
}
.van-radio__label {
color: #222222 !important;
font-size: 28rpx;
padding-left: 6rpx !important;
}
/* 人员更换选项 */
.replace-options {
margin-top: 24rpx;
padding-top: 24rpx;
}
.sub-title {
font-size: 28rpx;
font-weight: 600;
color: #222222;
margin-bottom: 16rpx;
}
.replace-options-list {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
.replace-option {
padding: 16rpx 24rpx;
background: #ffffff;
border: 2rpx solid #eff0f2;
border-radius: 16rpx;
font-size: 26rpx;
color: #222222;
text-align: center;
transition: all 0.2s;
}
.replace-option--active {
color: #2c66f7;
background: #eef3ff;
border-color: #2c66f7;
}
/* 已选择结果回显 */
.replace-result {
margin-top: 16rpx;
padding: 24rpx;
background: #f8f9fa;
border-radius: 16rpx;
}
.replace-result-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
}
.replace-result-title {
font-size: 28rpx;
font-weight: 600;
color: #222222;
}
.replace-result-edit {
font-size: 26rpx;
color: #2c66f7;
}
.replace-result-text {
font-size: 28rpx;
color: #222222;
line-height: 40rpx;
word-break: break-all;
}
/* 子选项 */
.sub-select {
margin-top: 24rpx;
padding: 20rpx;
background: #f8f9fa;
border-radius: 12rpx;
}
.picker-text {
padding: 20rpx 24rpx;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 8rpx;
font-size: 28rpx;
color: #222222;
}
/* 关联弹窗已改用 select-popup 组件,不再需要自定义样式 */
/* 员工选择弹窗 */
.staff-popup {
height: 100%;
display: flex;
flex-direction: column;
}
.staff-popup-title {
padding: 32rpx;
font-size: 32rpx;
font-weight: 600;
color: #222222;
text-align: center;
}
.staff-search {
flex-shrink: 0;
}
.staff-list {
flex: 1;
height: 0;
box-sizing: border-box;
}
.staff-list-content {
padding: 0 24rpx 24rpx;
}
.staff-item {
padding: 24rpx;
background: #ffffff;
border-radius: 16rpx;
margin-bottom: 16rpx;
box-sizing: border-box;
display: flex;
align-items: center;
transition: all 0.2s;
}
.staff-item:last-child {
margin-bottom: 0;
}
.staff-item--active .staff-name {
color: #2c66f7;
}
.staff-name {
flex: 1;
font-size: 30rpx;
color: #222222;
font-weight: 500;
margin-bottom: 8rpx;
}
.staff-phone {
flex: 1;
font-size: 26rpx;
color: #999999;
}
.staff-check {
flex-shrink: 0;
margin-left: 16rpx;
}
.staff-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 32rpx;
font-size: 26rpx;
color: #999999;
}
.staff-loading text {
margin-left: 12rpx;
}
.staff-no-more {
padding: 32rpx;
font-size: 26rpx;
color: #999999;
text-align: center;
}
.staff-empty {
padding: 100rpx 32rpx;
font-size: 28rpx;
color: #999999;
text-align: center;
}
.staff-footer {
flex-shrink: 0;
padding: 20rpx 0;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
gap: 24rpx;
box-shadow: 0 -2rpx 16rpx rgba(0, 0, 0, 0.04);
}
.staff-footer-cancel,
.staff-footer-confirm {
width: 330rpx;
height: 80rpx;
box-sizing: border-box;
border-radius: 20rpx;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.staff-footer-cancel {
color: #292d33;
background: #f7f8fa;
}
.staff-footer-confirm {
background: #2c66f7;
color: #fff;
}
<navigation-bar <navigation-bar showBack="{{ true }}"
showBack="{{ true }}"
bindback="onBack" bindback="onBack"
bindnavbarReady="navbarReady" bindnavbarReady="navbarReady"
navStyle="background-color:#ffffff;box-shadow:none;" navStyle="background-color:#ffffff;box-shadow:none;">
> <view class="nav-title">
<view class="nav-title">专项任务</view> 专项任务
</view>
</navigation-bar> </navigation-bar>
<view class="handle-page {{ isReadonly ? 'handle-page--readonly' : '' }}"
<view style="padding-top: {{ navBarHeight }}px;">
class="handle-page {{ isReadonly ? 'handle-page--readonly' : '' }}"
style="padding-top: {{ navBarHeight }}px;"
>
<scroll-view scroll-y class="handle-scroll"> <scroll-view scroll-y class="handle-scroll">
<view class="card task-card" wx:if="{{ task }}"> <view class="card task-card" wx:if="{{ task }}">
<view class="card-head"> <view class="card-head">
<view class="card-head-title text-hide">{{ task.taskTypeText }}</view> <view class="card-head-title">
<view <text class="card-head-label">任务类型</text><text class="text-hide">{{ task.taskTypeText }}</text>
class="status text-center" </view>
style="color:{{ task.statusStyle.color }};background-color:{{ task.statusStyle.background }};" <view class="status text-center"
> style="color:{{ task.statusStyle.color }};background-color:{{ task.statusStyle.background }};">
{{ task.statusName }} {{ task.statusName }}
</view> </view>
</view> </view>
<view class="info-list"> <view class="info-list">
<view <view class="info-row flex"
class="info-row flex"
wx:for="{{ detailFields }}" wx:for="{{ detailFields }}"
wx:key="key" wx:key="key"
wx:for-item="field" wx:for-item="field">
> <view class="info-label">
<view class="info-label">{{ field.label }}</view> {{ field.label }}
</view>
<view class="info-value {{ field.multiline ? 'info-value--multiline' : '' }}"> <view class="info-value {{ field.multiline ? 'info-value--multiline' : '' }}">
{{ task[field.key] || '-' }} {{ task[field.key] || '-' }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="card reply-card" wx:if="{{ task }}"> <view class="card reply-card" wx:if="{{ task }}">
<block wx:if="{{ isReadonly }}"> <block wx:if="{{ isReadonly }}">
<view class="info-list reply-info-list"> <view class="info-list reply-info-list">
<view class="info-row flex"> <view class="info-row flex">
<view class="info-label">专项任务回复</view> <view class="info-label">
专项任务回复
</view>
<view class="info-value info-value--multiline reply-text"> <view class="info-value info-value--multiline reply-text">
{{ task.replyText || '-' }} {{ task.replyText || '-' }}
</view> </view>
</view> </view>
<view class="info-row flex"> <view class="info-row flex">
<view class="info-label">回复时间</view> <view class="info-label">
<view class="info-value">{{ task.replyTimeText || '-' }}</view> 回复时间
</view>
<view class="info-value">
{{ task.replyTimeText || '-' }}
</view>
</view>
<!-- 任务执行结果 -->
<view class="info-row flex" wx:if="{{ showTaskExecutionResult }}">
<view class="info-label">
任务执行结果
</view>
<view class="info-value">
{{ task.executionResultCodeText || '-' }}
</view>
</view>
<!-- 人员更换评估 - 已关联招聘需求 -->
<view class="info-row flex" wx:if="{{ task.relatedRecruitDemandText }}">
<view class="info-label">
已关联招聘需求
</view>
<view class="info-value info-value--multiline">
{{ task.relatedRecruitDemandText }}
</view>
</view>
<!-- 人员更换评估 - 招聘负责人 -->
<view class="info-row flex"
wx:if="{{ task.staffReplaceResult && task.staffReplaceResult.recruitmentOwnerName }}">
<view class="info-label">
招聘负责人
</view>
<view class="info-value">
{{ task.staffReplaceResult.recruitmentOwnerName || '-' }}
</view>
</view>
<!-- 人员更换评估 - 已关联驻店 -->
<view class="info-row flex"
wx:if="{{ task.executionResultCode === 'LINK_REPLACEMENT_STAFF' && task.staffReplaceResult && task.staffReplaceResult.replacementStaffName }}">
<view class="info-label">
已关联驻店
</view>
<view class="info-value">
{{ task.staffReplaceResult.replacementStaffName || '-' }}
</view>
</view> </view>
</view> </view>
</block> </block>
...@@ -57,22 +97,154 @@ ...@@ -57,22 +97,154 @@
专项任务回复<text class="required">*</text> 专项任务回复<text class="required">*</text>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<gl-textarea <gl-textarea bindinput="onReplyInput"
bindinput="onReplyInput"
maxlength="{{ 800 }}" maxlength="{{ 800 }}"
showWordLimit showWordLimit
value="{{ reply }}" value="{{ reply }}"
placeholder="请输入" placeholder="请输入"
placeholderColor="#bbbbbb" placeholderColor="#bbbbbb"
color="#222222" color="#222222"
textStyle="font-size:28rpx;line-height:40rpx;" textStyle="font-size:28rpx;line-height:40rpx;" />
/>
</view> </view>
</block> </block>
</view> </view>
<!-- 任务执行结果单独卡片 -->
<view class="card execution-result-card"
wx:if="{{ task && showTaskExecutionResult && !isReadonly }}">
<view class="card-title">
任务执行结果<text class="required">*</text>
</view>
<van-radio-group value="{{ executionResultCode }}"
disabled="{{ isReadonly }}"
class="radio-box"
direction="horizontal"
bindchange="handleRadio">
<van-radio wx:for="{{ executionResultCodeOptions }}"
class="radio-item"
wx:key="value"
name="{{ item.value }}"
shape="round"
checked-color="#2c66f7"
icon-class="radio-icon">
{{ item.label }}
</van-radio>
</van-radio-group>
<!-- 人员更换评估 - 更换选项 -->
<view wx:if="{{ showReplaceOptions }}" class="replace-options">
<!-- 选项按钮始终显示 -->
<view class="replace-options-list">
<view wx:for="{{ replaceOptions }}"
wx:key="value"
class="replace-option {{ replaceSelectedOption === item.value ? 'replace-option--active' : '' }}"
bindtap="onReplaceOptionTap"
data-value="{{ item.value }}">
{{ item.label }}
</view>
</view>
<!-- 已选择具体内容后显示回显和编辑 -->
<view wx:if="{{ selectedRecruitDemandText || selectedStaffText }}"
class="replace-result">
<view class="replace-result-header">
<text class="replace-result-title"> {{ replaceSelectedOption === 'LINK_REPLACEMENT_STAFF' ? '已关联驻店' : '已关联招聘需求' }} </text>
<text class="replace-result-edit" bindtap="onEditReplaceOption">{{ replaceSelectedOption == 'CREATE_RECRUITMENT_DEMAND' ? '新增' : '编辑' }}</text>
</view>
<view class="replace-result-text">
{{ selectedRecruitDemandText || selectedStaffText }}
</view>
</view>
</view>
</view>
</scroll-view> </scroll-view>
<view class="footer-bar isFullSucreen" wx:if="{{ !isReadonly }}"> <view class="footer-bar isFullSucreen" wx:if="{{ !isReadonly }}">
<view class="submit-btn" bindtap="submit">提交</view> <view class="submit-btn" bindtap="submit">
提交
</view>
</view>
<!-- 发起招聘弹窗 -->
<recruit-popup show="{{ showRecruitPopup }}"
store-id="{{ task.storeId }}"
store-name="{{ task.storeName || task.merchantName }}"
business-type="{{ task.businessType }}"
business-type-name="{{ task.businessName }}"
recruit-type-name="人员更换评估"
task-center-id="{{ task.id || task.taskCenterId }}"
bind:close="closeRecruitPopup"
bind:success="onRecruitSuccess" />
<!-- 关联已有招聘弹窗 -->
<select-popup show="{{ showLinkRecruitPopup }}"
title="关联已有招聘"
options="{{ recruitDemandOptions }}"
value="{{ selectedRecruitDemandValues }}"
label-key="displayText"
value-key="recruitId"
height="60%"
allow-search="{{ true }}"
bind:confirm="onRecruitDemandConfirm"
bind:cancel="closeLinkRecruitPopup" />
<!-- 关联另一个驻店弹窗 -->
<van-popup show="{{ showLinkStaffPopup }}"
position="bottom"
round
bind:close="closeLinkStaffPopup"
custom-style="height: 70%">
<view class="staff-popup">
<view class="staff-popup-title">
员工选择
</view>
<!-- 搜索框 -->
<view class="staff-search">
<van-search model:value="{{ staffSearchKeyword }}"
shape="round"
placeholder="搜索员工姓名"
bind:search="onStaffSearchConfirm"
bind:clear="onStaffSearchClear" />
</view>
<!-- 员工列表 -->
<scroll-view scroll-y
class="staff-list"
bindscrolltolower="onStaffScrollToLower"
lower-threshold="50">
<view class="staff-list-content">
<block wx:for="{{ staffOptions }}" wx:key="staffUuid">
<view class="staff-item {{ currentSelectedStaff.staffUuid === item.staffUuid ? 'staff-item--active' : '' }}"
data-item="{{ item }}"
bindtap="onStaffItemTap">
<view class="staff-name">
{{ item.staffName }}
</view>
<view class="staff-check"
wx:if="{{ currentSelectedStaff.staffUuid === item.staffUuid }}">
<van-icon name="success"
color="#2c66f7"
size="18px" />
</view>
</view>
</block>
<!-- 加载状态 -->
<view class="staff-loading" wx:if="{{ staffLoading }}">
<van-loading size="20px" /><text>加载中...</text>
</view>
<!-- 没有更多 -->
<view class="staff-no-more"
wx:if="{{ !staffHasMore && staffOptions.length > 0 }}">
没有更多了
</view>
<!-- 空状态 -->
<view class="staff-empty"
wx:if="{{ !staffLoading && staffOptions.length === 0 }}">
<text>暂无数据</text>
</view>
</view>
</scroll-view>
<!-- 底部按钮 -->
<view class="staff-footer">
<view class="staff-footer-cancel" bindtap="closeLinkStaffPopup">
取消
</view>
<view class="staff-footer-confirm" bindtap="onStaffConfirm">
确定
</view>
</view>
</view> </view>
</van-popup>
</view> </view>
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
}
/* pages/specialMentoring/specialMentoring.wxss */
page{
background: #F2F3F7;
}
.required {
color: #F24724;
margin-left: 8rpx;
}
.container {
height: 100vh;
box-sizing: border-box;
width: calc(100% - 48rpx);
margin: 0 24rpx;
.box {
border-radius: 32rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
&.padding-0 {
padding: 0;
}
.name {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
.staff {
display: flex;
align-items: center;
font-size: 36rpx;
width: 100%;
color: #333333;
.staff-name {
max-width: calc(100% - 40rpx);
word-break: break-all;
}
.sex-icon {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-left: 12rpx;
}
}
}
.items {
display: flex;
flex-wrap: wrap;
column-gap: 24rpx;
row-gap: 18rpx;
.item {
width: 100%;
display: flex;
align-items: center;
font-size: 26rpx;
color: #79859E;
.label {
flex-shrink: 0;
}
}
.inline {
flex: 1;
min-width: 0;
.value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.label {
color: #292D33;
}
.value {
display: flex;
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.input {
text-align: right;
font-size: 28rpx;
padding: 16rpx 0;
width: 100%;
}
image {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
}
.value_box {
display: flex;
align-items: center;
gap: 32rpx;
.radio-box {
display: flex;
align-items: center;
gap: 16rpx;
.radio-icon {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
}
.circle {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #d0d2d6;
}
.text {
color: #292D33;
font-size: 28rpx;
}
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 20rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
}
.remark_box {
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
.label {
margin: 28rpx 0;
}
.textArea_box {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
height: 100%;
width: 100%;
}
.currentWordNumber {
position: absolute;
right: 26rpx;
bottom: 8rpx;
color: #CCCCCC;
}
}
}
.column_box {
display: flex;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
min-height: 192rpx;
height: auto;
.label {
margin: 28rpx 0;
}
}
.image-box {
margin: 0 32rpx;
padding-bottom: 28rpx;
.label{
margin: 28rpx 0;
}
.upload_box{
display: flex;
flex-wrap: wrap;
gap: 28rpx;
.payVoucher_image{
flex-shrink: 0;
width: 192rpx;
height: 192rpx;
border-radius: 12rpx;
position: relative;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
.del_icon{
width: 40rpx;
height: 40rpx;
position: absolute;
top: 16rpx;
right: 16rpx;
}
}
.upload-item {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
background: #f5f5f7;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
.icon-uploadAdd {
width: 40rpx;
height: 40rpx;
&.custom-icon-uploadAdd {
width: 100%;
height: 100%;
}
}
.upload-text {
margin-top: 16rpx;
color: #999EA8;
font-size: 24rpx;
}
}
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
<!--pages/specialMentoring/specialMentoring.wxml-->
<glsx-privacy appletName="嘀加区域运营助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
showBack="{{true}}"
bindback="back"
navStyle="background-color: transparent;box-shadow:none;">
<view class="page-title">
督导带教
</view>
</navigation-bar>
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{!isCompleted ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view style="width: 100%;height: 8rpx;"></view>
<view class="box padding-0">
<block wx:for="{{formItems}}" wx:key="index">
<block wx:if="{{!item.hide}}">
<view class="multi-select" wx:if="{{item.type == 'select' && item.selectMultiple}}" data-item="{{item}}">
<view class="multi-select__header">
<view class="multi-select__label">{{item.label}}<text class='required'>*</text></view>
<view bindtap="chooseSelect" data-item="{{item}}" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{!isCompleted && !lockedFields[item.value]}}">点击选择(可多选)</text>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{orderObj[item.value] && orderObj[item.value].length}}">
<view class="multi-tags">
<block wx:for="{{orderObj[item.value]}}" wx:for-item="tag" wx:key="tagIndex" wx:for-index="tagIndex">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{(isCompleted || lockedFields[item.value]) ? '100%' : 'calc(100% - 36rpx)'}};">{{tag[item.itemName]}}</text>
<text class="multi-tag__close" wx:if="{{!isCompleted && !lockedFields[item.value]}}" catchtap="removeMultiSelected" data-field="{{item.value}}" data-index="{{tagIndex}}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" wx:else>
<view class="label">{{item.label}}<text class='required'>*</text></view>
<view wx:if="{{item.type == 'select'}}" class="value" bindtap="chooseSelect" data-item="{{item}}">
<block wx:if="{{orderObj[item.valueText]}}">
<text class="value-text">{{orderObj[item.valueText]}}</text>
</block>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
<view class="value_box" wx:elif="{{item.type == 'radio'}}">
<view class="radio-box" wx:for="{{teaching_scene_list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" bindtap="changeScene" data-value="{{subItem.itemValue}}">
<image wx:if="{{orderObj.teachingSceneCode == subItem.itemValue}}" class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/radio-checked.png" mode=""/>
<view wx:else class="circle"></view>
<view class="text">{{subItem.itemName}}</view>
</view>
</view>
<view wx:else class="value" bindtap="chooseTime">
<text wx:if="{{orderObj[item.value]}}" class="value-text">{{orderObj[item.value]}}</text>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
</block>
</block>
<view class="item-box remark_box">
<view class="label">带教内容摘要<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{isCompleted || lockedFields.assigneeDetail}}" value="{{ orderObj.assigneeDetail }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="assigneeDetailInput" />
<view class="currentWordNumber">{{assigneeDetailLength || 0}} / 1000</view>
</view>
</view>
<view class="item-box column_box">
<view class="label">带教目标</view>
<view style="word-break: break-all;margin-bottom: 20rpx;">{{orderObj.teachingTarget || '-'}}</view>
</view>
<view class="image-box">
<view class="label">带教照片佐证<text class='required'>*</text></view>
<view class="upload_box">
<block wx:if="{{orderObj.assigneeImages.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.assigneeImages}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.assigneeImages}}" src="{{item.imageUrl}}"/>
<image class="del_icon" wx:if="{{!isCompleted && !lockedFields.assigneeImages}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/zy_paf_del_icon.png" mode="" bindtap="delPhoto" data-index="{{index}}"/>
</view>
</block>
<block wx:if="{{orderObj.assigneeImages.length < 9 && !isCompleted && !lockedFields.assigneeImages}}">
<view class="upload-item" bindtap="handleImageUpload">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/{{item.uploadIcon || 'zy-upload_icon.png'}}" class="icon-uploadAdd {{item.uploadIcon ? 'custom-icon-uploadAdd' : ''}}"></image>
<view class="upload-text">
{{orderObj.assigneeImages.length + '/' + 9}}
</view>
</view>
</block>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{!isCompleted}}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{selectMultiple}}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="{{labelKey}}" valueKey="{{valueKey}}" height="{{selectPopupHeight}}" title="{{selectTitle}}" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
<popup bindcancel="cancel" bindconfirm="confirm" wx:if="{{dateShow}}" show="{{dateShow}}" title="时间选择" height="60vh">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" bind:change="onChange" bind:input="onInput" />
</popup>
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"usingComponents": { "usingComponents": {
"tab-bar": "/components/TabBar/TabBar", "tab-bar": "/components/TabBar/TabBar",
"empty-data": "/components/EmptyData/EmptyData" "empty-data": "/components/EmptyData/EmptyData",
"select-popup": "/components/selectPopup/selectPopup"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -39,7 +39,7 @@ page { ...@@ -39,7 +39,7 @@ page {
.top-box { .top-box {
flex-shrink: 0; flex-shrink: 0;
background: #ffffff; background: #ffffff;
padding: 16rpx 24rpx 0 24rpx; padding: 16rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
.search-input { .search-input {
...@@ -87,6 +87,39 @@ page { ...@@ -87,6 +87,39 @@ page {
color: #bbbbbb; color: #bbbbbb;
} }
} }
.filter-box {
justify-content: space-between;
.filter-item {
height: 56rpx;
border-radius: 56rpx;
background: #F7F8FA;
padding: 0 16rpx 0 24rpx;
font-size: 26rpx;
color: #666666;
margin-right: 16rpx;
&.active {
color: #2C66F7;
}
.hide-text {
max-width: 320rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
text {
line-height: 40rpx;
}
image {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
}
.reset-btn {
color: #222222;
font-size: 26rpx;
}
}
} }
/* 与 recruitManage tab_box 一致 */ /* 与 recruitManage tab_box 一致 */
...@@ -183,6 +216,10 @@ page { ...@@ -183,6 +216,10 @@ page {
white-space: nowrap; white-space: nowrap;
} }
.list .order-value--blue {
color: #2c66f7;
}
.list .btn-box { .list .btn-box {
margin-top: var(--fontSize24); margin-top: var(--fontSize24);
justify-content: space-between; justify-content: space-between;
......
<navigation-bar <navigation-bar bindnavbarReady="navbarReady"
bindnavbarReady="navbarReady"
class="navigation-header" class="navigation-header"
navStyle="background-color:#ffffff;box-shadow:none;" navStyle="background-color:#ffffff;box-shadow:none;">
> <view class="page-title">
<view class="page-title">事项</view> 事项
</view>
</navigation-bar> </navigation-bar>
<view class="bg" style="height: {{navBarHeight}}px;"></view> <view class="bg" style="height: {{ navBarHeight }}px;"></view>
<view class="matters-page" style="padding-top: {{ navBarHeight }}px;">
<view class="matters-page" style="padding-top: {{navBarHeight}}px;">
<view class="top-box"> <view class="top-box">
<view class="search-box"> <view class="search-box">
<view class="search-input"> <view class="search-input">
<image src="/images/search.png" class="search-icon" /> <image src="/images/search.png" class="search-icon" />
<input <input type="text"
type="text"
placeholder="关键词" placeholder="关键词"
class="input" class="input"
model:value="{{ keyword }}" model:value="{{ keyword }}"
placeholder-class="input-placeholder" placeholder-class="input-placeholder"
bindinput="onKeywordInput" bindinput="onKeywordInput"
bindconfirm="search" bindconfirm="search" />
/> <view wx:if="{{ keyword }}"
<view
wx:if="{{ keyword }}"
class="search-clear-wrap" class="search-clear-wrap"
catchtap="clearKeyword" catchtap="clearKeyword">
>
<image src="/images/clear.png" class="search-clear" /> <image src="/images/clear.png" class="search-clear" />
</view> </view>
</view> </view>
</view> </view>
<view class="tab_box" wx:if="{{ tabList.length }}"> <!-- <view class="tab_box" wx:if="{{ tabList.length }}">
<tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" /> <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ tabIndex }}" />
</view> -->
<view class="filter-box flex">
<view class="flex">
<view class="filter-item flex {{ filterObj.taskType ? 'active': '' }}"
bindtap="handletaskTypeFilter">
<text class="hide-text">{{ taskTypeText }}</text>
<image src="{{ IMG_URL }}{{ filterObj.taskType ? 'expand_icon_blue' : 'expand_icon' }}.png"
mode="" />
</view>
<view class="filter-item flex {{ filterObj.status !== '' ? 'active': '' }}"
bindtap="handleStatusFilter">
<text class="hide-text">{{ statusMap[filterObj.status] }}</text>
<image src="{{ IMG_URL }}{{ filterObj.status ? 'expand_icon_blue' : 'expand_icon' }}.png"
mode="" />
</view>
</view>
<view class="reset-btn" bindtap="handleFilterReset">
重置
</view>
</view> </view>
</view> </view>
<scroll-view scroll-y
<scroll-view
scroll-y
enable-back-to-top enable-back-to-top
refresher-enabled="{{ true }}" refresher-enabled="{{ true }}"
bindrefresherrefresh="onRefresh" bindrefresherrefresh="onRefresh"
bindscrolltolower="onReachBottom" bindscrolltolower="onReachBottom"
class="list" class="list"
refresher-threshold="104" refresher-threshold="104"
refresher-triggered="{{ triggered }}" refresher-triggered="{{ triggered }}">
>
<view class="list-content"> <view class="list-content">
<block wx:if="{{ displayList.length > 0 }}"> <block wx:if="{{ displayList.length > 0 }}">
<view class="empty-box"></view> <view class="empty-box"></view>
<block wx:for="{{ displayList }}" wx:key="id"> <block wx:for="{{ displayList }}" wx:key="id">
<view <view class="item content"
class="item content"
bindtap="openMatterDetail" bindtap="openMatterDetail"
data-item="{{ item }}" data-item="{{ item }}">
>
<view class="item-top"> <view class="item-top">
<view class="code"> <view class="code">
<text>任务类型</text> <text>任务类型</text><text class="code-text">{{ item.taskTypeText }}</text>
<text class="code-text">{{ item.taskTypeText }}</text>
</view> </view>
<view <view class="status text-center"
class="status text-center" style="color:{{ item.statusStyle.color }};background-color:{{ item.statusStyle.background }};">
style="color:{{ item.statusStyle.color }};background-color:{{ item.statusStyle.background }};"
>
{{ item.statusName }} {{ item.statusName }}
</view> </view>
</view> </view>
<view class="order-list"> <view class="order-list">
<view <view class="order"
class="order"
wx:for="{{ item.completed ? item.completedListFields : item.listFields }}" wx:for="{{ item.completed ? item.completedListFields : item.listFields }}"
wx:key="key" wx:key="key"
wx:for-item="field" wx:for-item="field">
> <view class="order-label">
<view class="order-label">{{ field.label }}</view> {{ field.label }}
<view class="order-value {{ field.ellipsis ? 'order-value--ellipsis' : '' }}">{{ item[field.key] || '-' }}</view> </view>
<view class="order-value {{ field.ellipsis ? 'order-value--ellipsis' : '' }} {{ field.isBlue ? 'order-value--blue' : '' }}">
{{ item[field.key] || '-' }}
</view>
</view> </view>
</view> </view>
<view class="btn-box flex" wx:if="{{ item.showAction || item.showView }}"> <view class="btn-box flex" wx:if="{{ item.showAction || item.showView }}">
<view></view> <view></view>
<view <view wx:if="{{ item.showAction }}"
wx:if="{{ item.showAction }}"
class="btn primary" class="btn primary"
catchtap="openMatterDetail" catchtap="openMatterDetail"
data-item="{{ item }}" data-item="{{ item }}">
>去处理</view> 去处理
<view </view>
wx:if="{{ item.showView }}" <view wx:if="{{ item.showView }}"
class="btn btn-view" class="btn btn-view"
catchtap="openMatterDetail" catchtap="openMatterDetail"
data-item="{{ item }}" data-item="{{ item }}">
>查看</view> 查看
</view>
</view> </view>
</view> </view>
</block> </block>
<view class="list-nothing" wx:if="{{ nothing }}">到底了~</view> <view class="list-nothing" wx:if="{{ nothing }}">
到底了~
</view>
</block> </block>
<empty-data wx:else emptyText="暂无待办事项" /> <empty-data wx:else emptyText="暂无待办事项" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<!-- <view class="teach-entry" bindtap="goTeachApply">
<image class="teach-entry__icon" src="/images/daijiao.png" mode="aspectFit" />
<text class="teach-entry__text">带教申请</text>
</view> -->
\ No newline at end of file \ No newline at end of file
<select-popup show="{{ showSelectPopup }}"
options="{{ selectOptions }}"
height="60%"
multiple="{{ selectMultiple }}"
values="{{ selectValues }}"
value="{{ selectValue }}"
bindconfirm="handlePopupConfirm"
title="{{ selectTitle }}"
bindcancel="hideSelectPopup"
customIsTab="{{ true }}"
labelKey="{{ labelKey }}"
valueKey="{{ valueKey }}"></select-popup>
...@@ -260,24 +260,24 @@ Page({ ...@@ -260,24 +260,24 @@ Page({
that.setData({ that.setData({
isShowingModal: true, isShowingModal: true,
}); });
// 开发调试
try { // try {
await Dialog.alert({ // await Dialog.alert({
title: dialogParams.title, // title: dialogParams.title,
message: message(noticeItem.msgTitle), // message: message(noticeItem.msgTitle),
confirmButtonText: dialogParams.confirmButtonText, // confirmButtonText: dialogParams.confirmButtonText,
showCancelButton: false, // showCancelButton: false,
closeOnClickOverlay: false, // closeOnClickOverlay: false,
customStyle: "border-radius: 20rpx;", // customStyle: "border-radius: 20rpx;",
}); // });
that.setData({ // that.setData({
isShowingModal: false, // isShowingModal: false,
}); // });
wx.$router.go("packageWorkspace.companyNoticeDetail", { id: noticeItem.id }); // wx.$router.go("packageWorkspace.companyNoticeDetail", { id: noticeItem.id });
} catch (e) { // } catch (e) {
console.log("?catch", e); // console.log("?catch", e);
console.log(e); // console.log(e);
} // }
break; break;
} }
} }
......
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { parse } from '@babel/parser'
import { describe, it } from 'node:test'
const testDir = path.dirname(fileURLToPath(import.meta.url))
const projectRoot = path.resolve(testDir, '../..')
async function readApiSource() {
return readFile(path.join(projectRoot, 'api/api.js'), 'utf8')
}
function getExportedMethodNames(source) {
const ast = parse(source, { sourceType: 'module' })
const assignment = ast.program.body.find(
node =>
node.type === 'ExpressionStatement' &&
node.expression.type === 'AssignmentExpression' &&
node.expression.left.type === 'MemberExpression' &&
node.expression.left.object.type === 'Identifier' &&
node.expression.left.object.name === 'module' &&
node.expression.left.property.type === 'Identifier' &&
node.expression.left.property.name === 'exports'
)
assert.ok(assignment, 'api/api.js should assign its API object to module.exports')
assert.equal(assignment.expression.right.type, 'ObjectExpression')
return assignment.expression.right.properties
.filter(node => node.type === 'ObjectMethod')
.map(node => node.key.name || node.key.value)
}
describe('api/api.js merge resolution', () => {
it('contains no merge markers and parses as JavaScript', async () => {
const source = await readApiSource()
assert.doesNotMatch(source, /^(?:<<<<<<<|=======|>>>>>>>)/m)
assert.doesNotThrow(() => parse(source, { sourceType: 'module' }))
})
it('exports every branch-only API once', async () => {
const methodNames = getExportedMethodNames(await readApiSource())
const duplicates = methodNames.filter(
(name, index) => methodNames.indexOf(name) !== index
)
assert.deepEqual(duplicates, [])
assert.deepEqual(
[
'getShopWithYqList',
'getOrderWaitForAudit',
'getDemandStoreListAPI',
'getStaffDictListAPI',
'addStaffDictListAPI',
'getRecruitmentPageAPI',
'getAllStaffListAPI'
].filter(name => !methodNames.includes(name)),
[]
)
})
})
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!