Commit aa7ca616 by 张立顺

Merge branch 'SAAS+V5.3.2' into 'develop'

上线合并

See merge request !443
2 parents 0635594a faf4d7cc
Showing 61 changed files with 1759 additions and 798 deletions
...@@ -399,6 +399,15 @@ module.exports = { ...@@ -399,6 +399,15 @@ module.exports = {
data data
) )
}, },
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 获取园区店配置技师数据 */ /** 获取园区店配置技师数据 */
getQYTechnicianList(data) { getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list', data) return api.post('dj.api.smartcarlife.roleTechnician.list', data)
......
...@@ -193,6 +193,7 @@ ...@@ -193,6 +193,7 @@
"pages/sceneMarket/clueForm/clueForm", "pages/sceneMarket/clueForm/clueForm",
"pages/sceneMarket/materialPage/materialPage", "pages/sceneMarket/materialPage/materialPage",
"pages/newReceptionRecords/newReceptionRecords", "pages/newReceptionRecords/newReceptionRecords",
"pages/missingReception/missingReception",
"pages/recruitManage/recruitDetail/recruitDetail", "pages/recruitManage/recruitDetail/recruitDetail",
"pages/recruitManage/recruitInsert/recruitInsert", "pages/recruitManage/recruitInsert/recruitInsert",
"pages/recruitManage/recruitResult/recruitResult", "pages/recruitManage/recruitResult/recruitResult",
...@@ -267,15 +268,11 @@ ...@@ -267,15 +268,11 @@
"preloadRule": { "preloadRule": {
"pages/tabWorkOrder/pages/index/index": { "pages/tabWorkOrder/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
}, },
"tabIndex/pages/index/index": { "tabIndex/pages/index/index": {
"network": "all", "network": "all",
"packages": [ "packages": ["tabWorkOrder"]
"tabWorkOrder"
]
} }
}, },
"resolveAlias": { "resolveAlias": {
...@@ -289,4 +286,4 @@ ...@@ -289,4 +286,4 @@
}, },
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"resizable": true "resizable": true
}
\ No newline at end of file \ No newline at end of file
}
...@@ -94,14 +94,18 @@ Component({ ...@@ -94,14 +94,18 @@ Component({
customerId: data.id, customerId: data.id,
standNo: data.standNo, standNo: data.standNo,
carBrand: data.carBrand, carBrand: data.carBrand,
carBrandId: data.carBrandId,
carChildsBrandName: data.carChildsBrandName, carChildsBrandName: data.carChildsBrandName,
carChildsBrandId: data.carChildsBrandId,
carSeriesName: data.carSeriesName, carSeriesName: data.carSeriesName,
carSeriesId: data.carSeriesId,
customerName: data.customerName, customerName: data.customerName,
customerPhone: data.customerPhone, customerPhone: data.customerPhone,
customerSex: customerSex:
data.customerSex || orderObj?.customer.customerSex, data.customerSex || orderObj?.customer.customerSex,
plateNumber: data.plateNumber, plateNumber: data.plateNumber,
experienceFlag: orderObj?.customer.experienceFlag || "Y", // 默认是体验 experienceFlag: orderObj?.customer.experienceFlag || "Y", // 默认是体验
salesType: data.salesType
}, },
couponName: data.couponName, couponName: data.couponName,
customerCouponCode: data.customerCouponCode, customerCouponCode: data.customerCouponCode,
......
{ {
"name": "dj-car-boutique-work-wechat",
"lockfileVersion": 3,
"requires": true, "requires": true,
"lockfileVersion": 1, "packages": {
"dependencies": { "": {
"@vant/area-data": { "dependencies": {
"@vant/area-data": "^1.5.1",
"@vant/weapp": "^1.10.24",
"dayjs": "^1.11.11",
"glsk-applet-component": "^1.0.0",
"glsx-applet-component": "^1.1.29",
"glsx-common-sdk": "^0.2.8",
"number-precision": "^1.6.0",
"rfdc": "^1.3.0"
}
},
"node_modules/@vant/area-data": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz", "resolved": "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz",
"integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==" "integrity": "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww=="
}, },
"@vant/weapp": { "node_modules/@vant/weapp": {
"version": "1.10.24", "version": "1.10.24",
"resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz", "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz",
"integrity": "sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ==" "integrity": "sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ=="
}, },
"dayjs": { "node_modules/dayjs": {
"version": "1.11.11", "version": "1.11.11",
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz",
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==" "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
}, },
"glsk-applet-component": { "node_modules/glsk-applet-component": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz", "resolved": "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz",
"integrity": "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g==" "integrity": "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g=="
}, },
"glsx-applet-component": { "node_modules/glsx-applet-component": {
"version": "1.1.29", "version": "1.1.29",
"resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz", "resolved": "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz",
"integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw==" "integrity": "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw=="
}, },
"glsx-common-sdk": { "node_modules/glsx-common-sdk": {
"version": "0.2.8", "version": "0.2.8",
"resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz", "resolved": "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz",
"integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A==" "integrity": "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A=="
}, },
"number-precision": { "node_modules/number-precision": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz", "resolved": "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz",
"integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==" "integrity": "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
}, },
"rfdc": { "node_modules/rfdc": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz", "resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz",
"integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA=="
......
...@@ -58,5 +58,14 @@ module.exports = { ...@@ -58,5 +58,14 @@ module.exports = {
/** 获取首页统计数据 */ /** 获取首页统计数据 */
getStaticData(data) { getStaticData(data) {
return api.post('dj.api.smartcarlife.shopmallActivity.getMerchantCrowdfundingStatistics', data) return api.post('dj.api.smartcarlife.shopmallActivity.getMerchantCrowdfundingStatistics', data)
} },
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
}
} }
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import api from '~/packageCrowdFunding/api' import api from '~/packageCrowdFunding/api'
import NP from 'number-precision' import NP from 'number-precision'
import { waitstaffstateAPI} from '~/api/api'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -104,12 +105,24 @@ Component({ ...@@ -104,12 +105,24 @@ Component({
icon: "sceneMarket", icon: "sceneMarket",
navigateToUrl: "/packageEquity/pages/sceneMarket/index/index", navigateToUrl: "/packageEquity/pages/sceneMarket/index/index",
}) })
// 仅区域运营展示招聘管理模块
if ((userInfo.loginRole == 3) && menuList.every((item) => item.menuText != "招聘管理")) menuList.push({
menuText: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isTab: true,
tabIndex: 1,
tipsNum: 0
})
this.setData({ this.setData({
loginRole, loginRole,
userInfo, userInfo,
menuList menuList
}) })
this.getData() this.getData()
if ((userInfo.loginRole == 3)) {
this.getWaitStaff() // 在组件加载时调用
}
} }
}, },
...@@ -138,6 +151,24 @@ Component({ ...@@ -138,6 +151,24 @@ Component({
} }
}) })
}, },
// 招聘管理首页需求分析
getWaitStaff() {
const { menuList } = this.data
const index = menuList.findIndex(e => e.menuText === '招聘管理')
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waitProcessCount || 0
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
},
navGo(e) { navGo(e) {
console.log(e) console.log(e)
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<view class="menu_item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}"> <view class="menu_item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<view class="icon"><image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix"/></view> <view class="icon"><image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix"/></view>
<view class="text">{{item.menuText}}</view> <view class="text">{{item.menuText}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum > 99?'99+': item.tipsNum}}</view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -21,7 +21,20 @@ ...@@ -21,7 +21,20 @@
.top_box .top_item{ .top_box .top_item{
width: 33%; width: 33%;
} }
.hot_icon {
position: absolute;
right: 0;
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
color: #FFFFFF;
font-size: var(--fontSize22);
display: flex;
justify-content: center;
align-items: center;
}
.top_item .label{ .top_item .label{
font-size: var(--fontSize24); font-size: var(--fontSize24);
} }
...@@ -134,6 +147,7 @@ ...@@ -134,6 +147,7 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
position: relative;
} }
.menu_box .menu_item .icon{ .menu_box .menu_item .icon{
......
<!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml --> <!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml -->
<wxs src="index.wxs" module="filter" /> <wxs src="./index.wxs" module="filter" />
<view class="testFormCon"> <view class="testFormCon">
<van-collapse value="{{ activeNames }}"> <van-collapse value="{{ activeNames }}">
<view class="collapse"> <view class="collapse">
......
...@@ -7,10 +7,17 @@ import { ...@@ -7,10 +7,17 @@ import {
} from "~/store/ModalToQueueControl"; } from "~/store/ModalToQueueControl";
import { import {
getReceptionRecordList, getReceptionRecordList,
getRecordDetailList getRecordDetailList,
checkMissingReception,
checkMerchantDirect
} from "../../receptionRecordsApi" } from "../../receptionRecordsApi"
import aiApi from '../../aiApi' import aiApi from '../../aiApi'
import { getWaitAuditCountAPI } from '~/api/api' import {
getWaitAuditCountAPI,
waitstaffstateAPI
} from '~/api/api'
import dayjs from 'dayjs'
let lastPath = null; // 用于存储上一次的路径 let lastPath = null; // 用于存储上一次的路径
function throttle(func, delay) { function throttle(func, delay) {
let timeoutId; let timeoutId;
...@@ -187,6 +194,7 @@ Component({ ...@@ -187,6 +194,7 @@ Component({
taskInfo: {}, taskInfo: {},
current: 0, current: 0,
todoList: [], todoList: [],
missingRecordTodoList: [],
stodoList: [], stodoList: [],
todos: { todos: {
1: "日报填写提醒", 1: "日报填写提醒",
...@@ -375,6 +383,7 @@ Component({ ...@@ -375,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);
...@@ -470,9 +479,16 @@ Component({ ...@@ -470,9 +479,16 @@ Component({
batchId: item.batchId batchId: item.batchId
}, '', 0) }, '', 0)
}, },
onLoad() { async onLoad() {
const isStaff = app.globalData.isStaff; const isStaff = app.globalData.isStaff;
let userInfo = wx.$util.getUserInfo() || {}; let userInfo = wx.$util.getUserInfo() || {};
/**门店是否直营 */
const merchantDirectSales = await checkMerchantDirect({
merchantId: userInfo.shopMerchantId,
scene: 0
})
this.merchantDirectSales = merchantDirectSales.data
// 飞行督导不展示接待记录暂时取消埋点 // 飞行督导不展示接待记录暂时取消埋点
if (userInfo.loginRole != 6) this.onPageShow() if (userInfo.loginRole != 6) this.onPageShow()
if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) this.setData({ if (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6) this.setData({
...@@ -576,6 +592,15 @@ Component({ ...@@ -576,6 +592,15 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标"); let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1); index > -1 && menuList.splice(index, 1);
} }
// 区域运营 - feature:招聘管理
if (userInfo?.loginRole == 3 && menuList.every((item) => item.menuText != '招聘管理')) {
menuList.push({
menuText: "招聘管理",
path: "packageEquity.recruitManage",
icon: "recruit-manage",
tipsNum: 0
})
}
// 区域运营/飞行督导 // 区域运营/飞行督导
if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && menuList.every((item) => item.menuText != '工作日报')) { if ((userInfo?.loginRole == 3 || userInfo?.loginRole == 6) && menuList.every((item) => item.menuText != '工作日报')) {
menuList.push({ menuList.push({
...@@ -606,6 +631,43 @@ Component({ ...@@ -606,6 +631,43 @@ Component({
icon: "mentorship-manage" icon: "mentorship-manage"
}); });
} }
if ((isStaff || userInfo.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5)) {
if (this.merchantDirectSales) {
let {
uuid,
merchantId,
shopMerchantId
} = userInfo
const missingresponse = await checkMissingReception({
merchantId: shopMerchantId,
yqMerchantId: merchantId,
staffUuid: uuid,
sceneType: 0,
reportStartDate: dayjs().subtract(6, 'day').format('YYYY-MM-DD'),
reportEndDate: dayjs().format('YYYY-MM-DD'),
})
let missingRecordTodoList = []
if (missingresponse.code == 0) {
missingresponse.data.reverse().map(e => {
if (e.missingReceptionRecord && !e.hasReceptionReport && !missingRecordTodoList.length) missingRecordTodoList.push(e)
})
}
this.setData({
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: [],
})
}
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -614,6 +676,7 @@ Component({ ...@@ -614,6 +676,7 @@ Component({
let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()] let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()]
if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor()) if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor())
if (userInfo.loginRole == 3) eventArr.push(this.getAwaitAuditCount(userInfo)) if (userInfo.loginRole == 3) eventArr.push(this.getAwaitAuditCount(userInfo))
if (userInfo.loginRole == 3) eventArr.push(this.getWaitStaff(userInfo))
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题 this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题
}) })
...@@ -624,7 +687,9 @@ Component({ ...@@ -624,7 +687,9 @@ Component({
}, },
getAwaitAuditCount(userInfo) { getAwaitAuditCount(userInfo) {
return new Promise(resolve => { return new Promise(resolve => {
let { menuList } = this.data let {
menuList
} = this.data
// 区域运营角色退款审批入口 // 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) { if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) {
menuList.push({ menuList.push({
...@@ -635,8 +700,13 @@ Component({ ...@@ -635,8 +700,13 @@ Component({
}) })
} }
let index = menuList.findIndex(e => e.menuText == '待审批') let index = menuList.findIndex(e => e.menuText == '待审批')
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => { getWaitAuditCountAPI({
let { code, data } = res sceneType: userInfo?.sceneType
}).then(res => {
let {
code,
data
} = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
[`menuList[${index}].tipsNum`]: data.waiteForAuditNum [`menuList[${index}].tipsNum`]: data.waiteForAuditNum
...@@ -646,6 +716,37 @@ Component({ ...@@ -646,6 +716,37 @@ Component({
}) })
}) })
}, },
// 获取招聘管理统计数量
getWaitStaff(userInfo) {
return new Promise(resolve => {
let {
menuList
} = this.data
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '招聘管理')) {
menuList.push({
menuText: '招聘管理',
path: 'packageEquity.recruitManage',
icon: 'recruit-manage',
tipsNum: 0
})
}
let index = menuList.findIndex(e => e.menuText == '招聘管理')
waitstaffstateAPI({}).then(res => {
console.log("招聘管理", res);
let {
code,
data
} = res
if (code == 0) {
this.setData({
[`menuList[${index}].tipsNum`]: data.waitProcessCount
})
}
resolve()
})
})
},
getStoreList() { getStoreList() {
return new Promise(resolve => { return new Promise(resolve => {
// if (wx.$receptionLoaded) return // if (wx.$receptionLoaded) return
...@@ -1220,7 +1321,7 @@ Component({ ...@@ -1220,7 +1321,7 @@ Component({
console.log(staffCheck, 'staffCheck'); console.log(staffCheck, 'staffCheck');
if (staffCheck) return false; if (staffCheck) return false;
/**禁止提单 */ /**禁止提单 */
if(item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return if (item.beforeClick && await wx.$globalDataFunction[item.beforeClick]()) return
if ( if (
merchantBrand?.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1 merchantBrand?.findIndex((i) => ["鸿蒙智行"].includes(i.name)) != -1
) { ) {
...@@ -1236,14 +1337,20 @@ Component({ ...@@ -1236,14 +1337,20 @@ Component({
}, 2000), }, 2000),
promptHandleConfirm(e) { promptHandleConfirm(e) {
let { payFlag, payType } = e.detail let {
let { mode } = this.data payFlag,
payType
} = e.detail
let {
mode
} = this.data
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
let paymentMethod = payFlag != 2 ? 1 : payType let paymentMethod = payFlag != 2 ? 1 : payType
if (payFlag == 1 || payType == 3 || payType == 4 || payType == 6) { if (payFlag == 1 || payType == 3 || payType == 4 || payType == 6) {
wx.$router.go( wx.$router.go(
mode ? "createOrderCarQuotationSimple" : "createOrderCarQuotation", mode ? "createOrderCarQuotationSimple" : "createOrderCarQuotation", {
{paymentMethod} paymentMethod
}
); );
} else { } else {
thisPage.tipsEvent && thisPage.tipsEvent &&
...@@ -1597,5 +1704,11 @@ Component({ ...@@ -1597,5 +1704,11 @@ Component({
this.getReceptionList() this.getReceptionList()
wx.$track.setTrackData(0, 'staff_reception_search', this.getParams()) wx.$track.setTrackData(0, 'staff_reception_search', this.getParams())
}, },
gotoMissingReception() {
const [item] = this.data.missingRecordTodoList
wx.$router._to('/packageEquity/pages/missingReception/missingReception', {
reportDate: item.reportDate
}, 'navigateTo')
}
}, },
}); });
\ No newline at end of file \ No newline at end of file
...@@ -212,17 +212,19 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680 ...@@ -212,17 +212,19 @@ box-shadow: 0 var(--fontSize24) var(--fontSize24) -var(--fontSize12) #d3d9e680
} }
.hot_icon{ .hot_icon{
position: absolute; position: absolute;
right: 0; right: var(--fontSize46);
top: 0; top: 0;
width: var(--fontSize38); min-width: var(--fontSize24);
height: var(--fontSize32); height: var(--fontSize24);
background: #F24724; background: #F24724;
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
color: #FFFFFF; color: #FFFFFF;
font-size: var(--fontSize22); font-size: var(--fontSize20);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items:center; align-items:center;
padding:var(--fontSize2);
border:var(--fontSize2) solid #ffffff;
} }
.bubble_icon{ .bubble_icon{
position: absolute; position: absolute;
......
...@@ -57,26 +57,39 @@ ...@@ -57,26 +57,39 @@
<view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view> <view wx:for="{{3}}" wx:key="index" wx:for-index="idx" class="dot {{current==idx?'active':''}}"></view>
</view> </view>
</view> </view>
<block wx:if="{{isWait&&todoList.length>0}}"> <block wx:if="{{isWait&&(todoList.length || missingRecordTodoList.length)}}">
<view class="todo-list"> <view class="todo-list">
<view class="title">今日待办·{{todoList.length}}</view> <view class="title">今日待办·{{todoList.length + missingRecordTodoList.length}}</view>
<view class="todo-items"> <view class="todo-items">
<view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx"> <block wx:if="{{todoList.length}}">
<view class="todo-item-title"> <view class="todo-item" wx:key="idx" wx:for="{{ispopUp?todoList:stodoList}}" wx:for-index="idx">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text> <view class="todo-item-title">
<image src="{{IMG_URL}}{{item.taskType=='1'?'warn':'task'}}.png" /><text>{{todos[item.taskId]}}</text>
</view>
<view class="todo-item-info">{{item.content }}</view>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view>
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view>
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view>
</view> </view>
<view class="todo-item-info">{{item.content }}</view> </block>
<view class="todo-item-btn" wx:if="{{item.taskId==2}}" bindtap="goto" data-id="{{item.taskId}}">去开单</view> <block wx:if="{{missingRecordTodoList.length}}" wx:key="idx" wx:for-index="idx">
<view class="todo-item-btn" wx:elif="{{item.taskId==4}}" data-id="{{item.taskId}}" bindtap="goto">去处理</view> <view class="todo-item">
<view class="todo-item-btn" wx:elif="{{item.taskId==1}}" data-id="{{item.taskId}}" bindtap="goto">去填写</view> <view class="todo-item-title">
<view class="todo-item-btn" wx:else bindtap="closeRemind" data-id="{{item.taskId}}">关闭提醒</view> <image src="{{IMG_URL}}warn.png" />
</view> <text>接待缺失报备</text>
</view>
<view class="todo-item-info">请报备缺失接待客户的原因</view>
<view class="todo-item-btn" bindtap="gotoMissingReception">去报备</view>
</view>
</block>
</view> </view>
<view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{todoList.length>2}}" bindtap="packupList"> <view class="pack-up {{!ispopUp?'pack-up-active':''}}" wx:if="{{(missingRecordTodoList.length + todoList.length)>2}}" bindtap="packupList">
<image src="{{IMG_URL}}pack-up.png" /> <image src="{{IMG_URL}}pack-up.png" />
</view> </view>
</view> </view>
</block> </block>
<view class="menu_box"> <view class="menu_box">
<block wx:for="{{ menuList }}" wx:key="index"> <block wx:for="{{ menuList }}" wx:key="index">
<view class="menu_item" bindtap="navGo" data-item="{{ item }}"> <view class="menu_item" bindtap="navGo" data-item="{{ item }}">
......
// compoents/weekCalendar/weekCalendar.js
Component({
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/** * 组件的属性列表 * 用于组件自定义设置 */
properties: {
timeBean: {
// 属性名 在wxml调用组件时利用该属性传递组件显示的数据
type: Object, // 类型(必填),目前接受的类型包括:String, Number, Boolean, Object, Array, null(表示任意类型)
value: '' // 属性初始值(可选),如果未指定则会根据类型选择一个
},
index: {
type: Number
}
// weeklyList: {
// type: Array,
// value: []
// }
},
/**
* 组件的方法列表
*/
methods: {
lastWeek: function (e) {
//点击了上一周
this.triggerEvent('lastWeek')
},
nextWeek: function (e) {
//点击了下一周
this.triggerEvent('nextWeek')
},
itemClick: function (e) {
//点击了某一日,传递该日的下标
// 超过当前时间不可点击
if (e.currentTarget.dataset.disabled) {
return
}
var index = e.currentTarget.dataset.index
this.triggerEvent('dayClick', index)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxss */
/* compoents/weekCalendar/weekCalendar.wxss */
.row {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
.week_box{
height: var(--fontSize60);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 var(--fontSize4) var(--fontSize8) 0 #cdcdd159;
}
.date_box{
height: var(--fontSize128);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
}
.weekselect {
height: var(--fontSize80);
flex-direction: row;
justify-content: space-between;
}
.column {
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
flex: 1;
}
.nextWeek {
font-family: PingFangSC-Regular;
font-weight: 400;
flex-direction: row;
color: #181A1F;
width: var(--fontSize180);
}
.dateType {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
color: #292D33;
border-radius: 50%;
width: var(--fontSize64);
height: var(--fontSize64);
.empty {
box-sizing: border-box;
position: absolute;
width: var(--fontSize38);
text-align: center;
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
bottom: var(--fontSize40);
left: var(--fontSize40);
font-size: var(--fontSize22);
z-index: 2;
padding: 0 var(--fontSize4);
color: #fff;
}
}
.dateType.dateType_disabled{
color: #BEC1C7;
}
.weekType {
font-size: var(--fontSize28);
color: #292D33;
}
.select-column {
.dateType{
background: #347BFF;
color: #fff;
}
}
.disabled {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: var(--fontSize5);
padding-top: var(--fontSize5);
margin-left: var(--fontSize5);
margin-right: var(--fontSize5);
margin-top: var(--fontSize10);
flex: 1;
border-top-left-radius: var(--fontSize20);
border-top-right-radius: var(--fontSize20);
background: #F6FCFE;
color: #292D33;
}
.timeType {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: var(--fontSize28);
color: #181A1F;
// font-size: var(--fontSize35);
// font-weight: bold;
// margin-right: auto;
}
.line {
height: var(--fontSize1);
width: 100%;
background-color: gainsboro;
}
.lastweek {
width: var(--fontSize180);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
flex-direction: row;
color: #181A1F;
}
.line-shadow {
height: var(--fontSize3);
width: 100%;
background-color: gainsboro;
box-shadow: 5px 0px 5px 0px gainsboro;
}
@font-face {
font-family: "iconfont";
src: url('iconfont.eot?t=1533031583450');
/* IE9*/
src: url('iconfont.eot?t=1533031583450#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAZsAAsAAAAACRQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW70iqY21hcAAAAYAAAAB4AAABwJvIBhZnbHlmAAAB+AAAAkwAAAKQdkD3EWhlYWQAAAREAAAAMQAAADYSKu8/aGhlYQAABHgAAAAgAAAAJAfdA4hobXR4AAAEmAAAABgAAAAYF+r//2xvY2EAAASwAAAADgAAAA4CUAFWbWF4cAAABMAAAAAfAAAAIAEVAF1uYW1lAAAE4AAAAUUAAAJtPlT+fXBvc3QAAAYoAAAAQgAAAFjpq2VXeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sM4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDzbztzwv4EhhrmVoREozAiSAwAyfQ0teJzFkcENhDAMBMcEIoQo5T60cG9q4cWDyqAjt8GtYz5XAWtNZK8cOXKAASjiI3qwHSO0ybXmF6bm93xVT4x0isOrL37dt7zMz5anTH0ZkQ+628UUq7wme2/0v+Z2rk8V+z8e9ESvSfi+JPEvfibaI34llB8XahpqeJxlUTtoFGEQ/uf/s8/s43b39pm7vdtdb1cTvXCbuz0f5ILGQo+gEYOoVQQbidEqpFE8CAE1IQg2KbQRwdIuAUmTWNtaCBZBC1GwujK355/a4ZsPZoaBb75BDELDQ7JHHGSgk6iBLqN5hICdgFDBZQiSZh1PgBkwpl1USBIlAReFdTINdsgWrTRrxjbLsSoo4MNUkGZJHSfQanbwBUitMoA75t3UayWdvALRSfz1vIvfgVmJSmrnTH719EwxrRr8qqTrrq5v8izD8BiPqAos25bACCKbv2dUz9yrnMIVkNzEm7sjV8f0e8+bj8o1WwDo9cAYqyofZjRPo3jiWYbucgWZdzw5OlGE1Z+jjiGV4x+IBhwT7uO/CCMkgAYS/IJe/hp/+3+G+7kDPVgexAiR4XD4bASRdSQgGwUIufRam9FqMVvjNAVUqHWgrdWB0FRBa3cAQhc+5jfckBxsg2+vwKwX0uZ38K2dHcsn84NKqSFuk/vbvKNdGvilc4X5FaFRwocl9+g35YL64ujNS/X8sawR+qMB2SAsStA0mkVdKrcZJ1ErTurAUSjAsccUKWBSZWbRovZn09CBWmanWTvO2pll+0CF2ZYdZBC1aEGXk0ABsiGLqtbyUq3w4Nbc7cLFcd1hbVHGa8u63Fe0h2uDpeAsL2OYWegusEQVSaMcyoO3Imx9nXrcXNr6LOFP8gH8ESXA3UDloXEdc9cSPG5M2iCJT/cnFxXDUBYn978EROC4u6NwJRZHCUDBTINcmKUWVsnu5uYu+gfDb3VreJxjYGRgYADi/KUVefH8Nl8ZuFkYQOB6W+h8GP3///96FgbmViCXg4EJJAoATnwMXwAAAHicY2BkYGBu+N/AEMPC+P8/AwMLAwNQBAWwAQB19gRuBAAAAAPpAAAEAAAABAAAAAQB//8EAAAAAAAAAAB2AIQAkgDSAUgAAHicY2BkYGBgYwhkYGUAASYg5gJCBob/YD4DABFIAXMAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAjZGJkZmRhZGVkY2RnYGxgrs4MS8rMzE/JzWthAfKLspMzyhhTcrPzzZkzc1MS8xjYAAAPg4OSAAA') format('woff'),
url('iconfont.ttf?t=1533031583450') format('truetype'),
/* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg?t=1533031583450#iconfont') format('svg');
/* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/**
*字体图标,左右箭头,书,米饭,可以修改界面对图标进行修改替换
*/
.icon-sanjiaoleft:before {
content: "\e6b6";
}
.icon-sanjiaoright:before {
content: "\e6b7";
}
.icon-book1:before {
content: "\e631";
}
.icon-mifan:before {
content: "\e606";
}
\ No newline at end of file \ No newline at end of file
<!--tabWorkOrder/pages/staffDaily/weekCalendar/weekCalendar.wxml-->
<!--compoents/weekCalendar/weekCalendar.wxml-->
<view class="line"></view>
<view class="row weekselect">
<view class="row lastweek" bindtap="lastWeek">
<text class="iconfont icon-sanjiaoleft" style="padding:var(--fontSize15);color: #bec1c7;"></text>
<view style="">上一周</view>
</view>
<view class="timeType">{{timeBean.yearMonth}}</view>
<view class="row nextWeek" bindtap="nextWeek">
<block wx:if="{{ !timeBean.isInCurrentWeek }}">
<view style=" ">下一周</view>
<text class="iconfont icon-sanjiaoright" style="padding:var(--fontSize15);color: #bec1c7;"></text>
</block>
</view>
</view>
<view class="row">
<view class="week_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column" bindtap="itemClick" wx:key="index">
<view class="weekType">{{timeBean.weekDayList[index].week}}</view>
</view>
</view>
<view class="date_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column {{ index==timeBean.selectDay?'select-column':'' }}" bindtap="itemClick" wx:key="index">
<view class="dateType {{timeBean.weekDayList[index].disabled ? 'dateType_disabled' : ''}}">
{{timeBean.weekDayList[index].day}}
<view class="empty" wx:if="{{ !timeBean.weekDayList[index].disabled && !timeBean.weekDayList[index].hasDailyValue }}">空</view>
</view>
</view>
</view>
</view>
<!-- <view class="line-shadow"></view> -->
<view class="suspension" bindtap="addMenuClick">
<text class="iconfont icon-tianjia" style="font-size:var(--fontSize60); color:#fff;"></text>
</view>
\ No newline at end of file \ No newline at end of file
{
"navigationStyle": "custom",
"usingComponents": {
"weekCalendar": "./components/weekCalendar/weekCalendar"
}
}
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/missingReception/missingReception.wxss */
page {
background: #f7f8fa;
}
.layout {
.flex {
display: flex;
align-items: center;
}
.box {
height: calc(100vh - 120rpx - constant(safe-area-inset-bottom));
height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
box-sizing: border-box;
.nothing {
margin-top: 192rpx;
flex-direction: column;
color: #bec1c7;
font-size: 24rpx;
.no-data-img {
width: 172rpx;
height: 172rpx;
}
}
.content {
height: calc(100% - 269rpx);
.info {
height: 196rpx;
border-radius: 24rpx;
background: #ffffff;
margin: 24rpx 24rpx 8rpx;
padding: 0 48rpx;
justify-content: space-between;
&-item {
flex-shrink: 0;
color: #292d33;
font-size: 26rpx;
width: 104rpx;
.num {
margin-top: 8rpx;
color: #2c66f7;
font-size: 48rpx;
font-weight: 700;
line-height: 56rpx;
}
}
}
.title {
height: 88rpx;
padding: 0 36rpx;
font-weight: 500;
color: #292d33;
font-size: 28rpx;
}
.item {
height: 336rpx;
position: relative;
margin-bottom: 20rpx;
&:last-of-type{
margin-bottom: 0;
}
.num-box{
width: 60rpx;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.num {
position: absolute;
top: 8rpx;
left: 50%;
transform: translateX(-50%);
min-width: 32rpx;
height: 32rpx;
box-sizing: border-box;
border-radius: 16rpx;
border: 2rpx solid #c9c9c9;
background: #5a5e66;
padding: 0 10rpx;
color: #ffffff;
font-size: 20rpx;
font-weight: 500;
}
.item-content {
height: 100%;
border-radius: 16rpx;
background: #ffffff;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
margin: 0 20rpx 0 60rpx;
padding: 0 40rpx;
.label {
color: #292d33;
font-size: 28rpx;
line-height: 40rpx;
padding: 24rpx 0 16rpx;
.required {
color: #f24724;
}
}
.value {
height: 72rpx;
border-radius: 8rpx;
border: 2rpx solid #ececec;
background: #ffffff;
padding: 0 24rpx;
.placeholder {
font-size: 28rpx;
color: #dee0e3;
}
.error{
color: #f24724;
}
.picker,
.input {
width: 100%;
height: 100%;
font-size: 28rpx;
position: relative;
.reason {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.arrow {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%) scale(.5) rotate(90deg);
width: 24rpx;
height: 48rpx;
opacity: .5;
}
}
}
.disabled{
background: #f7f8fa;
}
}
}
.block {
width: 100%;
height: 20rpx;
}
.has-reception-report{
.required{
display: none;
}
}
}
}
.bespread{
height: calc(100vh - constant(safe-area-inset-bottom));
height: calc(100vh - env(safe-area-inset-bottom));
}
.footer {
height: 120rpx;
padding: 0 32rpx constant(safe-area-inset-bottom);
padding: 0 32rpx env(safe-area-inset-bottom);
gap: 0 16rpx;
font-size: 32rpx;
position: fixed;
bottom: 0;
left: 0;
.cancel {
width: 226rpx;
height: 80rpx;
border-radius: 12rpx;
border: 2rpx solid #347bff;
color: #347bff;
box-sizing: border-box;
justify-content: center;
}
.submit {
width: 444rpx;
height: 80rpx;
border-radius: 12rpx;
background: #347bff;
color: #ffffff;
justify-content: center;
}
}
}
\ No newline at end of file \ No newline at end of file
<view class="layout">
<navigation-bar navStyle="background: linear-gradient(to bottom, #DDE8FB 0%, #EBF1FB 100%);" bindback="jump" bindnavbarReady="navbarReady" showBack>
平板接待缺失报备
</navigation-bar>
<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>
<scroll-view scroll-y class="content" scroll-top="{{scrollTop}}">
<view class="info flex">
<view class="info-item">
售前
<view class="num">{{detailObj[currentDate].preSalesCustomerCount || '0'}}</view>
</view>
<view class="info-item">
售后
<view class="num">{{detailObj[currentDate].afterSalesCustomerCount || '0'}}</view>
</view>
<view class="info-item">
总触客
<view class="num">{{detailObj[currentDate].totalSalesCustomerCount || '0'}}</view>
</view>
<view class="info-item">
录音
<view class="num">{{detailObj[currentDate].recordingCount || '0'}}</view>
</view>
</view>
<!-- 超过7天&没日报记录 -->
<block wx:if="{{!isDateWithin7Days && !detailObj[currentDate].hasReceptionReport}}">
<view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
<view>已超过 7 个自然日</view>
暂不支持补填操作
</view>
</block>
<block wx:else>
<block wx:if="{{detailObj[currentDate].hasDailyReport}}">
<block wx:if="{{detailObj[currentDate].missingReceptionRecord || list.length}}">
<view class="title flex">
{{detailObj[currentDate].hasReceptionReport?'已':'需'}}报备客户·{{detailObj[currentDate].hasReceptionReport ? total : list.length}}
</view>
<view class="list {{detailObj[currentDate].hasReceptionReport?'has-reception-report':''}}">
<block wx:for="{{list}}" wx:key="index">
<view class="item">
<view class="num-box">
<view class="num flex">{{index + 1}}</view>
</view>
<view class="item-content">
<view class="label flex">客户姓名<view class="required">*</view>
</view>
<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':''}}" disabled="{{item.disabled}}" bindblur="inputBlur" data-index="{{index}}" />
</view>
<view class="label flex">缺失原因<view class="required">*</view>
</view>
<view class="value {{item.disabled?'disabled':''}}">
<picker class="picker" mode="selector" range="{{missingOptions}}" 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="arrow">
<image src="/images/arrow-right.png"></image>
</view>
</picker>
</view>
</view>
</view>
</block>
</view>
<view class="block"></view>
</block>
<block wx:else>
<view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
该日期暂无缺失接待记录
</view>
</block>
</block>
<block wx:else>
<view class="nothing flex">
<image class="no-data-img" src="{{IMG_URL}}equity/reception/no-suggestions.png" />
请先填写驻店日报
</view>
</block>
</block>
</scroll-view>
</view>
<block wx:if="{{isDateWithin7Days && !detailObj[currentDate].hasReceptionReport && detailObj[currentDate].missingReceptionRecord}}">
<view class="footer flex">
<view class="cancel flex" bindtap="cancel">取消报备</view>
<view class="submit flex" bindtap="submit">提交报备</view>
</view>
</block>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -2,284 +2,8 @@ ...@@ -2,284 +2,8 @@
import api from '~/utils/request/request.js' import api from '~/utils/request/request.js'
// const api = wx.$request // const api = wx.$request
module.exports = { module.exports = {
/**根据商户号获取可选套餐商品列表 */
getGoodsList(data) {
return api.post('dj.api.smartcarlife.MerchantPackageGoods.list', data)
},
/**根据订单号获取订单详情(含套餐) */
getPackageGoodsDetail(data) {
return api.post('dj.api.smartcarlife.order.packageGoodsDetail', data)
},
/**搜索订单(含套餐) */
getWorkPackageGoodsList(data) {
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search.containPackageGoods', {
pageSize: 10,
...params
})
},
/** 工单列表 */
getWorkList(data) {
let params = data || {}
params.sceneType = 1
return api.post('dj.api.smartcarlife.order.search', {
pageSize: 10,
...params
})
},
/** 提交施工订单 */
confirmConstruction(data) {
return api.post('dj.api.smartcarlife.order.confirmConstruction', data)
},
/**撤销工单 */
revokeOrder(data) {
return api.post('dj.api.smartcarlife.order.revoke', data)
},
/** 根据订单号获取订单详情 */
getOrderDetail(data) {
return api.post('dj.api.smartcarlife.order.detail', data)
},
/**二维码 */
createWeappQrcode(data) {
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
return api.post('dj.api.smartcarlife.common.createWeappQrcode', data)
},
/**商品列表 */
getOrderBaseGoodsList(data) {
return api.post(
'dj.api.smartcarlife.orderUpgradeGoods.listByMerchantId',
data
)
},
/** 选择支付方式下单 */
createWithPay(data) {
return api.post('dj.api.smartcarlife.order.createWithPay', data)
},
/**根据手机号查询客户信息 */
checkCustomerPhone(data) {
return api.post('dj.api.smartcarlife.customer.queryByPhone', data)
},
/**改变支付订单状态 */
createPayOrder(data) {
return api.post('dj.api.smartcarlife.payOrder.create', data)
},
/** */
installOnly(data) {
return api.post('dj.api.smartcarlife.order.installOnly', data)
},
/**获取精品礼券 */
getCouponDeatil(data) {
return api.post('dj.api.smartCarLife.customer.coupon.detail', data)
},
/** 根据订单号获取种草信息*/
getGrassDetail(data) {
return api.post('dj.api.smartcarlife.orderShareRecord.detail', data)
},
// 获取园区店配置
getYqStoreConfig(data) {
return api.get('dj.api.smarcarlife.yqMerchantConfig.detail', data)
},
/** 修改工单时间 */
updateOrderTime(data) {
return api.post('dj.api.smartcarlife.order.updateOrderTime', data)
},
/** 修改客户信息 */
updateOrderInfo(data) {
return api.post('dj.api.smartcarlife.order.updateOrderInfo', data)
},
/** 根据订单状态统计订单数*/
statByStatus(data) {
data = data || {}
data.sceneType = 1
return api.post('dj.api.smartcarlife.order.statByStatus', data)
},
/** 获取企微活码 */
getWorkWechatLiveQRCode(data) {
return api.post('dj.api.smartcarlife.order.getWorkWechatLiveQRCode', data)
},
/** 订单补录 */
supplementOrder(data) {
return api.post('dj.api.smartcarlife.order.supplementOrder', data)
},
/** 订单修正 */
correctionOrder(data) {
return api.post('dj.api.smartcarlife.order.correctionOrder', data)
},
/** 战败订单批量补录 */
notUpgradeOrder(data) {
return api.post('dj.api.smartcarlife.order.notUpgrade.batchInsert', data)
},
/** 批量新建预录工单 */
createPrerecordedOrderBatch(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder.batch', data)
},
/** 新建预录工单 */
createPrerecordedOrder(data) {
return api.post('dj.api.smartcarlife.order.preliminaryOrder', data)
},
/** 升级商品生成条形码 */
createBarCode(data) {
return api.post('dj.api.smartcarlife.common.createBarCode', data)
},
/** 获取商户基本信息 */
getServiceBaseInfo(data) {
return api.post(
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo',
data
)
},
/** 根据id查询待补录订单 */
waitinputorderSelectById(data) {
return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data)
},
/** 客户确认签名 */
customerConfirmationSignature(data) {
return api.post('dj.api.smartcarlife.customerConfirmationSignature', data)
},
/** 查询园区店是否开启签名配置 */
getSignatureSwitch(data) {
return api.post(
'dj.api.smartcarlife.serviceMerchant.getSignatureSwitch',
data
)
},
/** 根据客户优惠券id查询订单 */
getOrderByCustomerCouponId(data) {
// return api.post('dj.api.smartcarlife.order.getOrderByCustomerCouponId ', data)
return api.get('dj.api.smartcarlife.order.getOrderByCustomerCouponId', data)
},
/** 获取园区店配置技师数据 */
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.roleTechnician.list', data)
// return api.post('dj.api.smartcarlife.technician.list', data)
},
/** 根据手机号查询客户建档待跟进订单信息 */
getQueryCouponInfoByPhone(data) {
return api.post('dj.api.smartcarlife.customer.queryCouponInfoByPhone', data)
},
/** 根据订单更新技师信息 */
updateTechnicianInfo(data) {
return api.post('dj.api.smartcarlife.order.updateTechnicianInfo', data)
},
/** 根据订单商品获取膜卷号 */
getfilmRollNoByGoods(data) {
return api.post('dj.api.smarcarlife.stock.filmroll.list', data)
},
/** 子订单设置膜卷号 */
setfilmRollNo(data) {
return api.post('dj.api.smartcarlife.order.updateFilmRoll', data)
},
/** 保存员工日报(员工、管理员操作)*/
staffDailyReportSave(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.save', data)
},
/** 员工日报详情 */
staffDailyReportDetail(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.detail', data)
},
/** 查询当周员工日报是否填写列表 */
staffDailyReportDetailWeeklyList(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.weekly.list', data)
},
/** 批复员工日报 */
staffDailyReportApprove(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.approve', data)
},
/** 4s店查询对应的园区店 */
querySceneRefByShop(data) {
return api.post('dj.api.scenemerchantref.querySceneRefByShop', data)
},
/** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post('dj.api.smartcarlife.staff.daily.report.popup.need', data)
},
/** 查询4s店填写驻店日报的品牌列表 */
staffDailyReportMerchantCarBand(data) {
return api.post('dj.api.smartcarlife.staff.daily.report.car.brand', data)
},
/** 无需补录订单 */
noNeedSupplementOrder(data) {
return api.post('dj.api.smartcarlife.order.noNeedSupplementOrder', data)
},
/** 待补录订单统计 */
waitinputorder(data) {
let params = data || {}
params.inputStatus = 0
// params.payType = 1
return api.post('dj.api.smartcarlife.weapp.waitinputorder.count', params)
},
/** 质保价格编辑接口 */
modifyWarrantyPrice(data) {
return api.post(
'dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice',
data
)
},
/** 查询用户日报模版 */
getMyTemplate(data) {
return api.post('dj.api.mindworkplate.app.daily.report.myTemplate', data)
},
/** 查询用户指定日期范围内填写日报的日期 */
getDateRecord(data) {
return api.post(
'dj.api.mindworkplate.app.daily.report.mySubmittedDateRecord',
data
)
},
/** 查询用户指定日期的日报详情 */
getRecordDetail(data) {
return api.post(
'dj.api.mindworkplate.app.daily.report.myRecordDetail',
data
)
},
/** 用户提交日报 */
saveTempReport(data) {
return api.post('dj.api.mindworkplate.app.daily.report.save', data)
},
/** 获取与会驻店人员 */
getStaffList(data) {
// return api.post("dj.api.mindworkplate.app.daily.report.staffBaseInfo.pageList", data);
return api.post(
'dj.api.mindworkplate.app.daily.report.staffBaseInfo.page',
data
)
},
// 查询店铺配置
getShopMerchantPointConfig(data) {
return api.post('dj.api.smartcarlife.shopMerchantPointConfig.get', data)
},
// 获取招聘管理列表数据 // 获取招聘管理列表数据
getRecruitList(data) { getRecruitList(data) {
// https://m1.apifoxmock.com/m1/1529752-0-ea84e357/rop-dj-staff-miniprogram/router/dj.api.staff.miniprogram.recruitment.page/1.0.0
return api.post( return api.post(
'dj.api.staff.miniprogram.recruitment.page', 'dj.api.staff.miniprogram.recruitment.page',
data, data,
......
...@@ -6,7 +6,7 @@ page { ...@@ -6,7 +6,7 @@ page {
} }
.scrollarea { .scrollarea {
flex: 1; flex: 1;
overflow-y: hidden; overflow-y: auto;
} }
.container { .container {
padding: 0 var(--fontSize20); padding: 0 var(--fontSize20);
...@@ -102,7 +102,7 @@ page { ...@@ -102,7 +102,7 @@ page {
} }
.textarea-input { .textarea-input {
width: 100%; width: 100%;
min-height: var(--fontSize440); height: var(--fontSize440);
padding: var(--fontSize18) var(--fontSize24); padding: var(--fontSize18) var(--fontSize24);
padding-bottom: var(--fontSize60); padding-bottom: var(--fontSize60);
background: #ffffff; background: #ffffff;
...@@ -112,23 +112,28 @@ page { ...@@ -112,23 +112,28 @@ page {
line-height: var(--fontSize36); line-height: var(--fontSize36);
box-sizing: border-box; box-sizing: border-box;
border: var(--fontSize2) solid #ececec; border: var(--fontSize2) solid #ececec;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
&::-webkit-scrollbar {
width: 0;
height: 0;
display: none;
}
} }
.textarea-count { .textarea-count {
position: absolute; position: absolute;
right: var(--fontSize20); right: var(--fontSize16);
bottom: var(--fontSize20); bottom: var(--fontSize16);
font-size: var(--fontSize20); font-size: var(--fontSize28);
color: #969799; color: #969799;
} }
} }
} }
.footer { .footer {
position: absolute; margin-top:var(--fontSize200);
// bottom:var(--fontSize100);
bottom: 6%;
left: 50%;
transform: translateX(-50%);
.btn { .btn {
margin:0 auto;
width: var(--fontSize622); width: var(--fontSize622);
height:var(--fontSize88); height:var(--fontSize88);
border-radius: var(--fontSize12); border-radius: var(--fontSize12);
......
<!--index.wxml--> <!--index.wxml-->
<scroll-view class="scrollarea" scroll-y type="list"> <view class="scrollarea">
<view class="container"> <view class="container">
<view class="title">请完善您的用人需求</view> <view class="title">请完善您的用人需求</view>
<view class="form"> <view class="form">
<block wx:for="{{formList}}" wx:key="{{index}}"> <block wx:for="{{ formList }}" wx:key="{{ index}}">
<view class="form-item {{item.label === '需求描述' ? 'form-item-textarea' : ''}}" bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}" data-index="{{index}}"> <view
<view class="label">{{item.label}}<text wx:if="{{item.label !== '需求描述'}}" class="required">*</text></view> class="form-item {{ item.label === '需求描述' ? 'form-item-textarea' : '' }}"
<view class="value" wx:if="{{item.label !== '需求描述' && item.label !== '招聘数量'}}"> bindtap="{{item.label === '需求描述' || item.label === '招聘数量' ? '' : 'showPopup'}}"
<text class="display_value" wx:if="{{item.displayValue}}">{{item.displayValue}}</text> data-index="{{ index }}"
<text class="placeholder" wx:else>{{item.placeholder}}</text> >
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill"/> <view class="label">
</view> {{item.label}}
<view class="value" wx:if="{{item.label === '招聘数量'}}"> <text wx:if="{{ item.label !== '需求描述' }}" class="required">*</text>
<input </view>
class="number-input" <view class="value" wx:if="{{ item.label !== '需求描述' && item.label !== '招聘数量' }}">
type="number" <text class="display_value" wx:if="{{ item.displayValue }}">{{item.displayValue}}</text>
placeholder="{{item.placeholder}}" <text class="placeholder" wx:else>{{item.placeholder}}</text>
placeholder-style="color: #DEE0E3;font-size:var(--fontSize28)" <image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
value="{{item.displayValue}}" </view>
bindinput="onNumberInput" <view class="value" wx:if="{{ item.label === '招聘数量' }}">
data-index="{{index}}" <input
/> class="number-input"
<text class="unit">人</text> type="number"
</view> placeholder="{{ item.placeholder }}"
placeholder-style="color: #DEE0E3;font-size:var(--fontSize28)"
<block wx:if="{{!showPopup}}"> value="{{ item.displayValue }}"
<view class="textarea-wrapper" wx:if="{{item.label === '需求描述'}}"> bindinput="onNumberInput"
<textarea data-index="{{ index }}"
class="textarea-input" />
placeholder="{{item.placeholder}}" <text class="unit">人</text>
placeholder-style="color: #DEE0E3;" </view>
value="{{item.displayValue}}" <block wx:if="{{ !showPopup }}">
bindinput="onTextareaInput" <view class="textarea-wrapper" wx:if="{{ item.label === '需求描述' }}">
data-index="{{index}}" <textarea
maxlength="200" class="textarea-input"
auto-height placeholder="{{ item.placeholder }}"
/> placeholder-style="color: #DEE0E3;"
<view class="textarea-count">{{item.textCount || 0}}/200</view> value="{{ item.displayValue }}"
</view> bindinput="onTextareaInput"
</block> data-index="{{ index }}"
</view> maxlength="200"
</block> disabled="{{ isDialogShowing }}"
</view> />
<view class="footer"> <view class="textarea-count">{{item.textCount || 0}}/200</view>
<view class="btn {{isSubmitting ? 'btn-disabled' : ''}}" bind:tap="submit">{{isSubmitting ? '提交中...' : '提交'}}</view> </view>
</view> </block>
</view> </view>
</scroll-view> </block>
</view>
<view class="footer">
<view class="btn" bind:tap="submit">提交</view>
</view>
</view>
</view>
<!-- Vant Popup 组件 --> <!-- Vant Popup 组件 -->
<van-popup show="{{ showPopup }}" position="bottom" custom-style="height: 70%" bind:close="onClose"> <van-popup show="{{ showPopup }}" position="bottom" custom-style="height: 70%" bind:close="onClose">
<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"> <block wx:if="{{ !keyWord }}">
<block wx:if="{{!keyWord}}"> <image src="/images/search.png" class="search-icon" />
<image src="/images/search.png" class="search-icon" /> </block>
</block> <input
<input type="text" placeholder="搜索" class="input" confirm-type="search" value="{{keyWord}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" /> type="text"
<block wx:if="{{keyWord}}"> placeholder="搜索"
<image src="/images/clear.png" class="search-clear" bindtap="handleReset" /> class="input"
</block> confirm-type="search"
</view> value="{{ keyWord }}"
</view> placeholder-class="input-placeholder"
</view> bindinput="input"
bindconfirm="search"
<!-- 可滚动的中间区域 --> />
<view class="popup-scroll-area"> <block wx:if="{{ keyWord }}">
<!-- 选项列表 --> <image src="/images/clear.png" class="search-clear" bindtap="handleReset" />
<view class="popup-options" wx:if="{{options.length > 0}}"> </block>
<view class="option-item {{item.checked ? 'checked' : ''}}" wx:for="{{filteredOptions}}" wx:key="index" bindtap="toggleOption" data-index="{{index}}" data-value="{{item.value}}"> </view>
<view class="option-name">{{item.text}}</view> </view>
<view class="option-check {{item.checked ? 'checked' : ''}}"> </view>
<text class="check-icon" wx:if="{{item.checked}}">✓</text> <!-- 可滚动的中间区域 -->
</view> <view class="popup-scroll-area">
</view> <!-- 选项列表 -->
<view class="empty-tip" wx:if="{{filteredOptions.length === 0}}"> <view class="popup-options" wx:if="{{ options.length > 0 }}">
<text>无匹配结果</text> <view
</view> class="option-item {{ item.checked ? 'checked' : '' }}"
</view> wx:for="{{ filteredOptions }}"
</view> wx:key="index"
bindtap="toggleOption"
<!-- 固定底部区域 --> data-index="{{ index }}"
<view class="popup-fixed-bottom"> data-value="{{ item.value }}"
<view class="popup-buttons"> >
<view class="cancel-btn" bindtap="onClose">取消</view> <view class="option-name">{{item.text}}</view>
<view class="confirm-btn" bindtap="confirmSelect">确定</view> <view class="option-check {{ item.checked ? 'checked' : '' }}">
</view> <text class="check-icon" wx:if="{{ item.checked }}">✓</text>
</view> </view>
</view> </view>
<view class="empty-tip" wx:if="{{ filteredOptions.length === 0 }}">
<text>无匹配结果</text>
</view>
</view>
</view>
<!-- 固定底部区域 -->
<view class="popup-fixed-bottom">
<view class="popup-buttons">
<view class="cancel-btn" bindtap="onClose">取消</view>
<view class="confirm-btn" bindtap="confirmSelect">确定</view>
</view>
</view>
</view>
</van-popup> </van-popup>
<van-dialog id="van-dialog" width="var(--fontSize622)" custom-style="height: 364px;" confirm-button-color="#347BFF"/>
\ No newline at end of file \ No newline at end of file
<van-dialog id="van-dialog" width="var(--fontSize622)" custom-style="height: 364px;" confirm-button-color="#347BFF" />
\ No newline at end of file \ No newline at end of file
export const supportTypeList = [{ export const supportTypeList = [
confId: 0, {
confName: '新店启动' confId: 0,
}, { confName: '新店启动'
confId: 1, },
confName: '老店业绩提升-渗透率过低' {
}, { confId: 1,
confId: 2, confName: '老店业绩提升-渗透率过低'
confName: '老店业绩提升-客单价过低' },
}] {
export const statusList = [{ confId: 2,
confId: 0, confName: '老店业绩提升-客单价过低'
confName: '待人事确认' }
}, { ]
confId: 1, export const statusList = [
confName: '招聘中' {
}, { confId: 0,
confId: 2, confName: '待人事确认'
confName: '已完成' },
}, { {
confId: 3, confId: 1,
confName: '已驳回' confName: '招聘中'
}] },
{
confId: 2,
confName: '已完成'
},
{
confId: 3,
confName: '已驳回'
}
]
export const mentorshipFormData = [ export const mentorshipFormData = [
{ {
label: '招聘数量', label: '招聘数量',
...@@ -78,7 +87,7 @@ export const checkRequired = function (obj, formRule) { ...@@ -78,7 +87,7 @@ export const checkRequired = function (obj, formRule) {
return false return false
} }
export const getConfName = function(dataList, confId) { export const getConfName = function (dataList, confId) {
const confIdStr = `${confId}`?.split(',') const confIdStr = `${confId}`?.split(',')
let result = confIdStr?.map(v => { let result = confIdStr?.map(v => {
const found = dataList?.find(item => item.confId == v) const found = dataList?.find(item => item.confId == v)
...@@ -87,7 +96,7 @@ export const getConfName = function(dataList, confId) { ...@@ -87,7 +96,7 @@ export const getConfName = function(dataList, confId) {
return result?.length ? result.join(',') : '-' return result?.length ? result.join(',') : '-'
} }
export const getStatusName = function(status) { export const getStatusName = function (status) {
const found = statusList?.find(item => item.confId == status) const found = statusList?.find(item => item.confId == status)
return found?.confName || '-' return found?.confName || '-'
} }
...@@ -100,8 +109,11 @@ export const statusTipConfig = { ...@@ -100,8 +109,11 @@ export const statusTipConfig = {
}, },
1: { 1: {
show: true, show: true,
text: (item) => item.waitProcessResumeCount > 0 ? `您有${item.waitProcessResumeCount}份简历待处理,请及时跟进` : '', text: item =>
showCondition: (item) => item.waitProcessResumeCount > 0 item.waitProcessResumeCount > 0
? `您有${item.waitProcessResumeCount}份简历待处理,请及时跟进`
: '',
showCondition: item => item.waitProcessResumeCount > 0
}, },
2: { 2: {
show: true, show: true,
...@@ -109,26 +121,26 @@ export const statusTipConfig = { ...@@ -109,26 +121,26 @@ export const statusTipConfig = {
}, },
3: { 3: {
show: true, show: true,
text: '您招聘需求已拒绝,请及时查看' text: '您的招聘需求已拒绝,请及时查看'
} }
} }
// 获取状态提示文本 // 获取状态提示文本
export const getStatusTipText = function(item) { export const getStatusTipText = function (item) {
const config = statusTipConfig[item.status] const config = statusTipConfig[item.status]
if (!config || !config.show) { if (!config || !config.show) {
return null return null
} }
// 如果有显示条件,先判断条件 // 如果有显示条件,先判断条件
if (config.showCondition && !config.showCondition(item)) { if (config.showCondition && !config.showCondition(item)) {
return null return null
} }
// 如果 text 是函数,执行函数获取文本 // 如果 text 是函数,执行函数获取文本
if (typeof config.text === 'function') { if (typeof config.text === 'function') {
return config.text(item) return config.text(item)
} }
return config.text return config.text
} }
import { mentorshipFormData, getStatusName, getStatusTipText } from './constantData' import {
mentorshipFormData,
getStatusName,
getStatusTipText
} from './constantData'
import { getRecruitList, waitstaffstateAPI, confiremStaffFlagAPI } from '../api' import { getRecruitList, waitstaffstateAPI, confiremStaffFlagAPI } from '../api'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -15,10 +20,11 @@ Page({ ...@@ -15,10 +20,11 @@ Page({
triggered: false, triggered: false,
nothing: false, nothing: false,
userInfo: {}, userInfo: {},
tabIndex:0, tabIndex: 0,
btnVisible: true, // 按钮是否显示 btnVisible: true, // 按钮是否显示
lastScrollTop: 0, // 上次滚动位置 lastScrollTop: 0, // 上次滚动位置
scrollThreshold: 50 // 滚动阈值(px) scrollThreshold: 50, // 滚动阈值(px)
scrollTimer: null // 滚动停止定时器
}, },
/** /**
...@@ -32,7 +38,9 @@ Page({ ...@@ -32,7 +38,9 @@ Page({
// 非区域运营登录,打回到首页 // 非区域运营登录,打回到首页
//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) {
let index = mentorshipFormData?.findIndex(v => v.name == 'flightSupervisorName') let index = mentorshipFormData?.findIndex(
v => v.name == 'flightSupervisorName'
)
this.setData({ this.setData({
mentorshipFormData mentorshipFormData
}) })
...@@ -42,16 +50,14 @@ Page({ ...@@ -42,16 +50,14 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getWaitstaffstate() this.getWaitstaffstate()
this.search() this.search()
}, },
onBottomRefresh() { onBottomRefresh() {
this.getList() this.getList()
...@@ -59,11 +65,13 @@ Page({ ...@@ -59,11 +65,13 @@ Page({
// 获取招聘任务统计数据 // 获取招聘任务统计数据
getWaitstaffstate() { getWaitstaffstate() {
waitstaffstateAPI({}).then(res => { waitstaffstateAPI({}).then(res => {
let {code, data, message} = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
tabList:[`待我处理(${data.waitProcessCount})`, `全部(${data.totalCount})`], tabList: [
tabIndex: 0 `待我处理(${data.waitProcessCount})`,
`全部(${data.totalCount})`
]
}) })
} else { } else {
// wx.$util.showToast(message) // wx.$util.showToast(message)
...@@ -73,12 +81,16 @@ Page({ ...@@ -73,12 +81,16 @@ Page({
// 标签切换 // 标签切换
tabClick(e) { tabClick(e) {
this.setData({ this.setData(
tabIndex: e.detail, {
list: [] tabIndex: e.detail,
}, () => { list: []
this.search() },
}) () => {
this.search()
this.getWaitstaffstate()
}
)
}, },
// 搜索 // 搜索
...@@ -95,7 +107,7 @@ Page({ ...@@ -95,7 +107,7 @@ Page({
let { tabIndex, pageSize, currentPage, nothing } = this.data let { tabIndex, pageSize, currentPage, nothing } = this.data
if (nothing) return if (nothing) return
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中'
}) })
getRecruitList({ getRecruitList({
pageSize, pageSize,
...@@ -103,8 +115,8 @@ Page({ ...@@ -103,8 +115,8 @@ Page({
onlyWaiting: !!!tabIndex // boolean类型转换 onlyWaiting: !!!tabIndex // boolean类型转换
}).then(res => { }).then(res => {
wx.hideLoading() wx.hideLoading()
if (res.code == "0") { if (res.code == '0') {
let { list, pages } = res.data; let { list, pages } = res.data
// 为列表数据添加状态名称和提示文本 // 为列表数据添加状态名称和提示文本
list = list.map(item => { list = list.map(item => {
const tipText = getStatusTipText(item) const tipText = getStatusTipText(item)
...@@ -125,97 +137,127 @@ Page({ ...@@ -125,97 +137,127 @@ Page({
this.setData({ this.setData({
list: [], list: [],
nothing: false nothing: false
}); })
wx.$util.showToast(res.message || "接口异常"); wx.$util.showToast(res.message || '接口异常')
} }
}) })
}, },
// 跳转详情 // 跳转详情
handleDetail(e) { handleDetail(e) {
const { item } = e.currentTarget.dataset; // 节流控制:2秒内只能触发一次
wx.$router.go("/packageEquity/pages/recruitManage/recruitDetail/recruitDetail", { const now = Date.now()
id: item.id const throttleTime = 2000 // 节流时间:2秒
});
if (this.lastDetailTime && now - this.lastDetailTime < throttleTime) {
return
}
this.lastDetailTime = now
const { item } = e.currentTarget.dataset
wx.$router.go(
'/packageEquity/pages/recruitManage/recruitDetail/recruitDetail',
{
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 => {
let { code } = res; let { code } = res
if( code == 0) { if (code == 0) {
this.getWaitstaffstate() this.getWaitstaffstate()
this.search() this.search()
} }
}) })
}, },
// 跳转添加招聘页面 // 跳转添加招聘页面
handleInsertRecruit() { handleInsertRecruit() {
wx.$router.go("/packageEquity/pages/recruitManage/recruitInsert/recruitInsert"); wx.$router.go(
'/packageEquity/pages/recruitManage/recruitInsert/recruitInsert'
)
}, },
/** /**
* 处理滚动事件 * 处理滚动事件
* 监听向上滚动超过阈值时隐藏按钮,向下滚动时显示按钮 * 监听向上滚动时隐藏按钮,滚动停止1秒后重新显示按钮
*/ */
handleScroll(e) { handleScroll(e) {
const { scrollTop } = e.detail; const { scrollTop } = e.detail
const { lastScrollTop, scrollThreshold, btnVisible } = this.data; const { lastScrollTop, scrollThreshold, btnVisible, scrollTimer } =
this.data
// 清除之前的定时器
if (scrollTimer) {
clearTimeout(scrollTimer)
}
// 计算滚动方向和距离 // 计算滚动方向和距离
const scrollDistance = Math.abs(scrollTop - lastScrollTop); const scrollDistance = Math.abs(scrollTop - lastScrollTop)
// 只有滚动距离超过阈值才触发显隐逻辑,避免频繁切换 // 只有滚动距离超过阈值才触发显隐逻辑,避免频繁切换
if (scrollDistance > scrollThreshold) { if (scrollDistance > scrollThreshold) {
// 向上滚动(scrollTop 增大)- 隐藏按钮 // 向上滑动(scrollTop 增大)- 隐藏按钮
if (scrollTop > lastScrollTop && btnVisible) { if (scrollTop > lastScrollTop && btnVisible) {
this.setData({ this.setData({
btnVisible: false btnVisible: false
}); })
} }
// 向下滚动(scrollTop 减小)- 显示按钮 // 向下滑动(scrollTop 减小)- 隐藏按钮
else if (scrollTop < lastScrollTop && !btnVisible) { else if (scrollTop < lastScrollTop && btnVisible) {
this.setData({ this.setData({
btnVisible: true btnVisible: false
}); })
} }
// 更新上次滚动位置 // 更新上次滚动位置
this.setData({ this.setData({
lastScrollTop: scrollTop lastScrollTop: scrollTop
}); })
} }
// 在顶部时始终显示按钮 // 在顶部时始终显示按钮
if (scrollTop <= 0 && !btnVisible) { if (scrollTop <= 0) {
this.setData({ if (!btnVisible) {
btnVisible: true, this.setData({
lastScrollTop: 0 btnVisible: true,
}); lastScrollTop: 0
})
}
return
} }
},
// 生命周期函数--监听页面隐藏 // 设置定时器:滚动停止2秒后显示按钮
onHide() { const timer = setTimeout(() => {
this.setData({
btnVisible: true
})
}, 1000)
this.setData({
scrollTimer: timer
})
}, },
// 生命周期函数--监听页面隐藏
onHide() {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() { onUnload() {
// 清理定时器
if (this.data.scrollTimer) {
clearTimeout(this.data.scrollTimer)
}
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() { onPullDownRefresh() {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() { onReachBottom() {},
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
onShareAppMessage() {}
})
...@@ -4,31 +4,37 @@ page { ...@@ -4,31 +4,37 @@ page {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.container_page { .container_page {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
// 顶部Tab模块 // 顶部Tab模块
.top_content{ .top_content {
background: #FFFFFF; background: #FFFFFF;
padding-top: var(--fontSize24); padding-top: var(--fontSize24);
box-sizing: border-box; box-sizing: border-box;
.user_box { .user_box {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: var(--fontSize28); margin-bottom: var(--fontSize28);
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
.user_avatar{
.user_avatar {
width: var(--fontSize48); width: var(--fontSize48);
height: var(--fontSize48); height: var(--fontSize48);
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
} }
.user_name { .user_name {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
font-weight: 600; font-weight: 600;
font-size: var(--fontSize32); font-size: var(--fontSize32);
color: #292D33; color: #292D33;
} }
.user_tips { .user_tips {
margin-left: var(--fontSize4); margin-left: var(--fontSize4);
padding: 0 var(--fontSize8); padding: 0 var(--fontSize8);
...@@ -41,6 +47,7 @@ page { ...@@ -41,6 +47,7 @@ page {
line-height: var(--fontSize36); line-height: var(--fontSize36);
} }
} }
.tips_box { .tips_box {
height: var(--fontSize56); height: var(--fontSize56);
background: #FFF5E6; background: #FFF5E6;
...@@ -49,81 +56,103 @@ page { ...@@ -49,81 +56,103 @@ page {
align-items: center; align-items: center;
padding: 0 var(--fontSize28); padding: 0 var(--fontSize28);
margin: 0 var(--fontSize32) var(--fontSize20) var(--fontSize32); margin: 0 var(--fontSize32) var(--fontSize20) var(--fontSize32);
.tipsIcon { .tipsIcon {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-right: var(--fontSize8); margin-right: var(--fontSize8);
} }
.contentText { .contentText {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #FF9D0A; color: #FF9D0A;
} }
} }
.tab_box { .tab_box {
margin: 0 var(--fontSize-32); margin: 0 var(--fontSize-32);
position: relative; position: relative;
} }
} }
// 列表模块 // 列表模块
.content { .content {
padding-top: var(--fontSize24); padding-top: var(--fontSize24);
height: calc(100vh - var(--fontSize120)); height: calc(100vh - var(--fontSize120));
box-sizing: border-box; box-sizing: border-box;
.list { .list {
height: 100%; height: 100%;
.item { .item {
margin: 0 var(--fontSize20) var(--fontSize24) var(--fontSize20); margin: 0 var(--fontSize20) var(--fontSize24) var(--fontSize20);
border-radius: var(--fontSize16); border-radius: var(--fontSize16);
background: #ffffff; background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #cdcdd180; box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #cdcdd180;
padding: var(--fontSize24); padding: var(--fontSize24);
.item_header { .item_header {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: var(--fontSize4); margin-bottom: var(--fontSize4);
justify-content: space-between; justify-content: space-between;
text:nth-child(1) {
.merchant-name {
flex: 1;
min-width: 0;
font-size: var(--fontSize30); font-size: var(--fontSize30);
color: #292D33; color: #292D33;
font-weight: 600; font-weight: 600;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: var(--fontSize16);
} }
.status-tag { .status-tag {
font-size: var(--fontSize24); font-size: var(--fontSize24);
border-radius: var(--fontSize4); border-radius: var(--fontSize4);
padding: var(--fontSize4) var(--fontSize8); padding: var(--fontSize4) var(--fontSize8);
font-weight: 400; font-weight: 400;
// 待人事确认 status = 0 // 待人事确认 status = 0
&.status-0 { &.status-0 {
color: #347bff; color: #347bff;
background: #eaf1ff; background: #eaf1ff;
} }
// 招聘中 status = 1 // 招聘中 status = 1
&.status-1 { &.status-1 {
color: #ff9d0a; color: #ff9d0a;
background: #fff5e6; background: #fff5e6;
} }
// 已完成 status = 2 // 已完成 status = 2
&.status-2 { &.status-2 {
color: #35c376; color: #35c376;
background: #eaf9f1; background: #eaf9f1;
} }
// 已驳回 status = 3 // 已驳回 status = 3
&.status-3 { &.status-3 {
color: #f24724; color: #f24724;
background: #fdece9; background: #fdece9;
} }
} }
.icon { .icon {
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
margin-right: var(--fontSize12); margin-right: var(--fontSize12);
} }
} }
.item_content { .item_content {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
color: #292D33; color: #292D33;
padding-top: var(--fontSize17); padding-top: var(--fontSize17);
.label { .label {
flex-shrink: 0; flex-shrink: 0;
width: var(--fontSize144); width: var(--fontSize144);
...@@ -131,11 +160,13 @@ page { ...@@ -131,11 +160,13 @@ page {
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #999EA8; color: #999EA8;
} }
.value { .value {
word-break: break-all; word-break: break-all;
font-size: var(--fontSize28); font-size: var(--fontSize28);
} }
} }
.item_footer { .item_footer {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
...@@ -143,6 +174,7 @@ page { ...@@ -143,6 +174,7 @@ page {
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #9B9B9E; color: #9B9B9E;
padding-top: var(--fontSize20); padding-top: var(--fontSize20);
.msg_tips { .msg_tips {
width: var(--fontSize662); width: var(--fontSize662);
height: var(--fontSize72); height: var(--fontSize72);
...@@ -155,6 +187,7 @@ page { ...@@ -155,6 +187,7 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
.arrow_right { .arrow_right {
width: var(--fontSize12); width: var(--fontSize12);
height: var(--fontSize21); height: var(--fontSize21);
...@@ -162,15 +195,18 @@ page { ...@@ -162,15 +195,18 @@ page {
} }
} }
} }
.super_item { .super_item {
padding-bottom: var(--fontSize32); padding-bottom: var(--fontSize32);
} }
} }
// 空数据占位 // 空数据占位
.no_data { .no_data {
height: 100%; height: 100%;
} }
} }
// 新增需求按钮 // 新增需求按钮
.insert_btn { .insert_btn {
display: grid; display: grid;
...@@ -188,33 +224,70 @@ page { ...@@ -188,33 +224,70 @@ page {
text-align: center; text-align: center;
box-shadow: 0 var(--fontSize4) var(--fontSize18) 0 #0000001a; box-shadow: 0 var(--fontSize4) var(--fontSize18) 0 #0000001a;
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
.label { .label {
width: var(--fontSize114); width: var(--fontSize114);
margin-top: -8px; margin-top: -8px;
line-height: var(--fontSize34); line-height: var(--fontSize34);
} }
.insert_icon { .insert_icon {
width: var(--fontSize54); width: var(--fontSize54);
height: var(--fontSize54); height: var(--fontSize54);
} }
// 显示状态 // 显示状态
&.btn-visible { &.btn-visible {
transform: translateX(0); transform: translateX(0);
opacity: 1; opacity: 1;
} }
// 隐藏状态 - 向右滑出并淡出 // 隐藏状态 - 向右滑出并淡出
&.btn-hidden { &.btn-hidden {
transform: translateX(calc(100% + var(--fontSize40))); transform: translateX(calc(100% + var(--fontSize40)));
opacity: 0; opacity: 0;
} }
} }
// 触底提示 // 触底提示
.list-nothing { .list-nothing {
color: #999ea8; color: #999ea8;
font-size: var(--fontSize20); font-size: var(--fontSize20);
text-align: center; text-align: center;
padding:0 0 var(--fontSize60) 0; padding: 0 0 var(--fontSize60) 0;
} }
} }
.arrowIcon {
position: fixed;
right: 0;
bottom: var(--fontSize468);
width: var(--fontSize36);
height: var(--fontSize136);
background: #FFFFFF;
border: var(--fontSize2) solid #EFF0F2;
box-shadow: 0 var(--fontSize4) var(--fontSize20) 0 #0000001a;
border-radius: var(--fontSize16) 0 0 var(--fontSize16);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease-in-out;
// 显示状态 - 从右侧滑入
&.arrow-visible {
transform: translateX(0);
opacity: 1;
}
// 隐藏状态 - 向右滑出
&.arrow-hidden {
transform: translateX(100%);
opacity: 0;
pointer-events: none; // 隐藏时禁止点击
}
.image {
width: var(--fontSize32);
height: var(--fontSize32);
}
}
\ No newline at end of file \ No newline at end of file
<!-- 招聘管理 --> <!-- 招聘管理 -->
<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
<view class="item_header"> wx:for="{{ i }}"
<text>{{item.merchantName}}</text> wx:key="index"
<text class="status-tag status-{{item.status}}">{{item.statusName}}</text> class="item {{ userInfo.isSuper ? 'super_item' : '' }}"
</view> bind:tap="handleDetail"
<view class="item_content" wx:for="{{mentorshipFormData}}" wx:for-item='it' wx:for-index='subInd' wx:key='subInd'> data-item="{{ item }}"
<block> >
<view class="label">{{it.label}}</view> <view class="item_header">
<view class="value">{{item[it.labelName] || '-'}} <text wx:if="{{it.label == '招聘数量'}}">人</text> </view> <text class="merchant-name">{{item.merchantName}}</text>
</block> <text class="status-tag status-{{ item.status }}">{{item.statusName}}</text>
</view> </view>
<!-- 提示消息 --> <view class="item_content" wx:for="{{ mentorshipFormData }}" wx:for-item="it" wx:for-index="subInd" wx:key="subInd">
<view class="item_footer" wx:if="{{tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0}}"> <block>
<view class="msg_tips"> <view class="label">{{it.label}}</view>
<text>{{item.tipText}}</text> <view class="value">
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill"/> {{item[it.labelName] || '-'}}
</view> <text wx:if="{{ it.label == '招聘数量' }}">人</text>
</view> </view>
</view> </block>
</block> </view>
<!-- 提示消息 -->
<view class="item_footer" wx:if="{{ tabIndex == 0 && item.showTip && item.confirmFlag == 'N' && item.status !== 0 }}">
<view class="msg_tips">
<text>{{item.tipText}}</text>
<image class="arrow_right" src="/packageEquity/pages/image/arrow-right.png" mode="aspectFill" />
</view>
</view>
</view>
</block>
<block wx:if="{{ nothing }}"> <block wx:if="{{ nothing }}">
<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>
</scroll-view> </scroll-view>
</view> </view>
<!-- 添加招聘按钮 --> <!-- 添加招聘按钮 -->
<view class="insert_btn {{btnVisible ? 'btn-visible' : 'btn-hidden'}}" bindtap="handleInsertRecruit"> <view class="insert_btn {{ btnVisible ? 'btn-visible' : 'btn-hidden' }}" bindtap="handleInsertRecruit">
<image class="insert_icon" src="/packageEquity/pages/image/recruit-insert.png" mode="widthFix"/> <image class="insert_icon" src="/packageEquity/pages/image/recruit-insert.png" mode="widthFix" />
<view class="label"><text>添加招聘</text> <view class="label">
<text>需求</text></view> <text>添加招聘</text>
</view> <text>需求</text>
</view>
</view>
<!-- 箭头图标 - 与按钮互斥显示 -->
<view class="arrowIcon {{ btnVisible ? 'arrow-hidden' : 'arrow-visible' }}">
<image class="image" src="{{ IMG_URL }}upgrade/arrow-left.png" />
</view>
</view> </view>
\ No newline at end of file \ No newline at end of file
{ {
"navigationBarTitleText": "提交成功",
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file \ No newline at end of file
...@@ -25,4 +25,41 @@ module.exports = { ...@@ -25,4 +25,41 @@ module.exports = {
return api.post('dj.api.car.boutique.inspection.findCheckResultByBatchId', data) return api.post('dj.api.car.boutique.inspection.findCheckResultByBatchId', data)
}, },
/**
*
* 门店号是否是直营门店校验
*/
checkMerchantDirect(data) {
return api.post('dj.api.car.boutique.resident.direct.sale.merchant', data)
},
/**
* 查询给定日期如果填了日报是否缺失接待记录
*/
checkMissingReception(data) {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.check', data)
},
/**
* 查询所有缺失原因
*/
getMissingOptions() {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.reason.list', {})
},
/**
* 接待缺失报备提交
*/
addMissingReception(data) {
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.add', data)
},
/**
* 接待缺失报备列表
*/
getMissingCustomerList(data = {}) {
data = {
sceneType: 0,
currentPage: 1,
pageSize: 999999,
...data
}
return api.post('dj.api.smartcarlife.staff.missing.reception.report.mini.list', data)
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -73,7 +73,15 @@ module.exports = { ...@@ -73,7 +73,15 @@ module.exports = {
updateOrderRemark(data) { updateOrderRemark(data) {
return api.post('dj.api.smartcarlife.order.updateRemark', data) return api.post('dj.api.smartcarlife.order.updateRemark', data)
}, },
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
},
/** 获取首页统计数据 */ /** 获取首页统计数据 */
getHomeStaticData(data) { getHomeStaticData(data) {
return api.post('dj.api.smartcarlife.expanded.gold.getMerchantCrowdfundingStatistics', data) return api.post('dj.api.smartcarlife.expanded.gold.getMerchantCrowdfundingStatistics', data)
......
import api from '~/subvehicleConversion/api' import api from '~/subvehicleConversion/api'
import NP from 'number-precision' import NP from 'number-precision'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { waitstaffstateAPI} from '~/api/api'
Component({ Component({
properties: { properties: {
navBarHeight: Number navBarHeight: Number
...@@ -75,6 +76,24 @@ Component({ ...@@ -75,6 +76,24 @@ Component({
if (isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: tabIndex}) if (isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: tabIndex})
wx.$router.go(path) wx.$router.go(path)
}, },
// 获取招聘管理待处理数量
getWaitStaff() {
console.log("获取招聘管理待处理数量");
waitstaffstateAPI()
.then(result => {
const { code, data } = result
if (code == 0) {
const { exhibitionToolsList } = this.data
const index = exhibitionToolsList.findIndex(e => e.title === '招聘管理')
this.setData({
[`exhibitionToolsList[${index}].tipsNum`]: data.waitProcessCount
})
}
})
.catch(err => {
console.error('获取招聘管理统计失败:', err)
})
},
onLoad() { onLoad() {
const userInfo = wx.$util.getUserInfo(), const userInfo = wx.$util.getUserInfo(),
{exhibitionToolsList} = this.data {exhibitionToolsList} = this.data
...@@ -88,6 +107,25 @@ Component({ ...@@ -88,6 +107,25 @@ Component({
exhibitionToolsList exhibitionToolsList
}) })
} }
// 仅区域运营角色展示招聘管理模块
if ((userInfo.loginRole == 3 ) && exhibitionToolsList.every((item) => item.title != "招聘管理")) {
console.log("添加招聘管理入口");
exhibitionToolsList.push({
title: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
isOpen: true,
isTab: true,
tabIndex: 1,
tipsNum: 0
});
this.setData({
exhibitionToolsList
}, () => {
// 在设置完成后再获取招聘管理统计
this.getWaitStaff()
})
}
const params = { const params = {
merchantId: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion?.merchantId || '' merchantId: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion?.merchantId || ''
} }
......
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
display: flex; display: flex;
flex-flow: column; flex-flow: column;
align-items: center; align-items: center;
position:relative;
} }
.business-img{ .business-img{
width: var(--fontSize100); width: var(--fontSize100);
...@@ -139,7 +140,20 @@ ...@@ -139,7 +140,20 @@
} }
} }
.hot_icon {
position: absolute;
right: 0;
top: 0;
width: var(--fontSize38);
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
color: #FFFFFF;
font-size: var(--fontSize22);
display: flex;
justify-content: center;
align-items: center;
}
.instrument-list{ .instrument-list{
margin-top: var(--fontSize50); margin-top: var(--fontSize50);
.title{ .title{
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<view class="business-content" bindtap="clickTap" data-item="{{item}}"> <view class="business-content" bindtap="clickTap" data-item="{{item}}">
<image class="business-img" src="{{IMG_URL}}crowdFunding/{{item.icon}}.png"></image> <image class="business-img" src="{{IMG_URL}}crowdFunding/{{item.icon}}.png"></image>
<view class="business-title">{{item.title}}</view> <view class="business-title">{{item.title}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum > 99?'99+': item.tipsNum}}</view>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -71,4 +71,13 @@ module.exports = { ...@@ -71,4 +71,13 @@ module.exports = {
data data
); );
}, },
/** 待处理招聘统计 */
waitstaffstateAPI(data) {
return api.post(
'dj.api.staff.miniprogram.recruitment.demand.stat',
data,
[],
'/rop-dj-staff-miniprogram/router'
)
}
}; };
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import mixins from './index_mixins' import mixins from './index_mixins'
import api from '../../api.js' import api from '../../api.js'
import NP from 'number-precision' import NP from 'number-precision'
import { getWaitAuditCountAPI } from '~/api/api' import { getWaitAuditCountAPI,waitstaffstateAPI } from '~/api/api'
import { import {
getYQInfo, getYQInfo,
get4SStoreList, get4SStoreList,
...@@ -443,6 +443,14 @@ Page({ ...@@ -443,6 +443,14 @@ Page({
const debouncedJump = wx.$util.debounce((event) => this.jump(event), 1000, true); const debouncedJump = wx.$util.debounce((event) => this.jump(event), 1000, true);
debouncedJump(e); // 调用防抖后的函数 debouncedJump(e); // 调用防抖后的函数
}, },
jumpThrottle(e) {
console.log('jumpThrottle');
// 创建节流函数,1500ms 内只能触发一次
if (!this.throttledJump) {
this.throttledJump = wx.$util.throttle((event) => this.jump(event), 1500);
}
this.throttledJump(e); // 调用节流后的函数
},
async jump(e) { async jump(e) {
console.log('jump'); console.log('jump');
let { let {
...@@ -496,7 +504,7 @@ Page({ ...@@ -496,7 +504,7 @@ Page({
taskId: 6 taskId: 6
} }
commonApi.shutDownTaskApi(params) commonApi.shutDownTaskApi(params)
return wx.navigateTo({ return wx.switchTab({
url: item.url url: item.url
}) })
} }
...@@ -749,6 +757,24 @@ Page({ ...@@ -749,6 +757,24 @@ Page({
// _this.getWaitOrder() // _this.getWaitOrder()
}, 10 * 1000) }, 10 * 1000)
}, },
// 招聘管理首页需求分析
getWaitStaff(userInfo, index) {
console.log("调统计招聘");
waitstaffstateAPI()
.then(result => {
let {
code,
data
} = result
if (code == 0) {
console.log("调统计招聘",data);
this.setData({
[`menu[${index}].tipsNum`]: data.waitProcessCount
})
}
})
.catch(err => { })
},
// 10s轮询一次待补录 // 10s轮询一次待补录
getWaitOrder() { getWaitOrder() {
let { let {
...@@ -1261,6 +1287,7 @@ Page({ ...@@ -1261,6 +1287,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)
...@@ -1504,6 +1531,7 @@ Page({ ...@@ -1504,6 +1531,7 @@ Page({
recordId: 15 recordId: 15
}) })
} }
if (checklist.includes(userInfo?.accountName)) { if (checklist.includes(userInfo?.accountName)) {
menu = menu.filter(e => e.name != '预约管理') menu = menu.filter(e => e.name != '预约管理')
} }
...@@ -1590,21 +1618,35 @@ Page({ ...@@ -1590,21 +1618,35 @@ Page({
noCheckdailyReport: true noCheckdailyReport: true
}) })
} }
// 区域运营 - feature:招聘管理
if (userInfo?.loginRole == 3 && menu.every((item) => item.name != '招聘管理')) {
menu.push({
name: "招聘管理",
url: "packageEquity.recruitManage",
icon: "recruit-manage",
tipsNum: 0
})
}
this.setData({ this.setData({
menu, menu,
isNoStaff, isNoStaff,
newMenu newMenu
}, () => { }, () => {
let index = menu.findIndex(e => e.name == '待审批') let index = menu.findIndex(e => e.name == '待审批')
let staffIindex = menu.findIndex(e => e.name == '招聘管理')
if (index > -1) { if (index > -1) {
// 获取待审批数量 // 获取待审批数量
this.getAwaitAuditCount(userInfo, index) this.getAwaitAuditCount(userInfo, index)
} }
if (staffIindex > -1) {
// 获取待审批数量
this.getWaitStaff(userInfo, staffIindex)
}
}) })
this.getIsBusinessSchoolEnableCurrentUser() this.getIsBusinessSchoolEnableCurrentUser()
}, },
getAwaitAuditCount(userInfo, index) { getAwaitAuditCount(userInfo, index) {
getWaitAuditCountAPI({ sceneType: userInfo?.sceneType }).then(res => { getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
this.setData({ this.setData({
......
...@@ -122,10 +122,11 @@ ...@@ -122,10 +122,11 @@
<block wx:if="{{ isNoStaff }}"> <block wx:if="{{ isNoStaff }}">
<div class="menu noStaff"> <div class="menu noStaff">
<block wx:for="{{ menu }}" wx:key="index"> <block wx:for="{{ menu }}" wx:key="index">
<view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}"> <view class="item" bindtap="jumpThrottle" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
<image src="{{ IMG_URL}}upgrade/{{item.icon }}.png" /> <image wx:if="{{item.name != '招聘管理'}}" src="{{ IMG_URL}}upgrade/{{item.icon }}.png" />
<image wx:else src="{{ IMG_URL}}crowdFunding/{{item.icon }}.png" />
<view class="label">{{item.name}}</view> <view class="label">{{item.name}}</view>
<view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view> <view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum > 99?'99+': item.tipsNum}}</view>
</view> </view>
</block> </block>
</div> </div>
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
{{invoiceName}} {{invoiceName}}
</view> </view>
<view> <view>
<apply-refund-btn updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2) }}" orderInfo="{{ orderInfo }}" showRefundBtn="{{ isStaff && showMoreBtn }}"></apply-refund-btn> <apply-refund-btn updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2|| orderInfo.status == 12) }}" orderInfo="{{ orderInfo }}" showRefundBtn="{{ isStaff && showMoreBtn }}"></apply-refund-btn>
</view> </view>
</view> </view>
</view> </view>
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
</block> </block>
<!-- <view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> --> <!-- <view class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> -->
<view wx:if="{{ confirmFlagObj.btnName == 'constructionVisible'}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> <view wx:if="{{ confirmFlagObj.btnName == 'constructionVisible'}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
<view wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') &&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2)}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> <view wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN') &&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2|| orderInfo.status == 12)}}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
</view> </view>
</block> </block>
<modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}"> <modal id="modal3" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
......
...@@ -16,6 +16,7 @@ let toastList = { ...@@ -16,6 +16,7 @@ let toastList = {
subShopMerchantId: "二级流量方不能为空", subShopMerchantId: "二级流量方不能为空",
deliveryUserId: "交付专员不能为空", deliveryUserId: "交付专员不能为空",
customerName: "车主姓名不能为空", customerName: "车主姓名不能为空",
salesType: "客户来源不能为空",
customerPhone: "手机号不能为空", customerPhone: "手机号不能为空",
sellerUserId: "转化人员不能为空", sellerUserId: "转化人员不能为空",
customerCouponCode: "精品礼券不能为空", customerCouponCode: "精品礼券不能为空",
...@@ -912,6 +913,7 @@ Page({ ...@@ -912,6 +913,7 @@ Page({
"employeeName", "employeeName",
...requiredList, ...requiredList,
"customerName", "customerName",
"salesType",
"customerPhone", "customerPhone",
"sellerUserId", "sellerUserId",
"sellerName", "sellerName",
...@@ -1341,6 +1343,7 @@ Page({ ...@@ -1341,6 +1343,7 @@ Page({
wx.$util.showToast(message); wx.$util.showToast(message);
} }
}) })
wx.hideLoading()
}, },
async getOrderBaseGoodsList(merchantId) { async getOrderBaseGoodsList(merchantId) {
let { let {
......
...@@ -113,11 +113,13 @@ ...@@ -113,11 +113,13 @@
<view class="title invoice"> <view class="title invoice">
<view class="flex"> <view class="flex">
工单信息 工单信息
<!-- {{updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')}}
{{(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2|| orderInfo.status == 12) }} -->
<view style="display: flex;gap: var(--fontSize32);"> <view style="display: flex;gap: var(--fontSize32);">
<!-- 非门店收款 已支付/已退款展示 --> <!-- 非门店收款 已支付/已退款展示 -->
<!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" --> <!-- wx:if="{{ isStaff && orderInfo.selectPayType != 2 && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}" -->
<view> <view>
<apply-refund-btn orderInfo="{{ orderInfo }}" updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2) }}" showRefundBtn="{{ isStaff && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}"></apply-refund-btn> <apply-refund-btn orderInfo="{{ orderInfo }}" updateFlag="{{ updateFlag&&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6||orderInfo.status == 2|| orderInfo.status == 12) }}" showRefundBtn="{{ isStaff && showMoreBtn && (orderInfo.status == 4 || orderInfo.status == 6 || orderInfo.status == 12) }}"></apply-refund-btn>
</view> </view>
<view wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}" class="invoice-btn" bindtap="handleBtnInvoice"> <view wx:if="{{ orderInfo.showInvoiceEntrance || orderInfo.invoiceStatus == 2 }}" class="invoice-btn" bindtap="handleBtnInvoice">
<gl-image class="icon" src="/icon-invoice.png"></gl-image> <gl-image class="icon" src="/icon-invoice.png"></gl-image>
...@@ -294,7 +296,7 @@ ...@@ -294,7 +296,7 @@
> --> > -->
<view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <view wx:if="{{ confirmFlagObj.showBtn }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> <view wx:if="{{ confirmFlagObj.btnName == 'constructionVisible' }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
<view wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2) }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view> <view wx:if="{{ confirmFlagObj.btnName == 'sublistVisible' &&filter.btnPermissions(userPermissions, 'CHUANGJIANSHIGONGDAN')&&(orderInfo.status == 4 || orderInfo.status == 6|| orderInfo.status == 2|| orderInfo.status == 12) }}" class="btn text-center" data-btnName="{{ confirmFlagObj.btnName }}" bindtap="showModal">{{confirmFlagObj.showBtn}}</view>
</view> </view>
<!-- 不需要走签名逻辑 --> <!-- 不需要走签名逻辑 -->
<!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}"> <!-- <view wx:if="{{ signatureSwitch&&orderInfo.selectPayType!=0 }}" class="btn-box {{ isFullSucreen?'isFullSucreen-btn':'' }}">
......
...@@ -27,12 +27,11 @@ Component({ ...@@ -27,12 +27,11 @@ Component({
// if (n.length == 1) { // if (n.length == 1) {
// } // }
} }
}, },
show: { show: {
type: Boolean, type: Boolean,
observer: function(n) { observer: function (n) {
this.setData({ this.setData({
searchValue: '' searchValue: ''
}) })
...@@ -41,16 +40,19 @@ Component({ ...@@ -41,16 +40,19 @@ Component({
}, },
pickerType: { pickerType: {
type: String, type: String,
observer: function(n) { observer: function (n) {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// 有搜索内容 将门店弹窗选中值置为0 // 有搜索内容 将门店弹窗选中值置为0
if (this.data.searchValue) thisPage.setData({subIndex: 0}) if (this.data.searchValue) thisPage.setData({ subIndex: 0 })
// 清空搜索框内容 // 清空搜索框内容
this.setData({ this.setData({
searchValue: '' searchValue: ''
}) })
this.triggerEvent('search', { value: '' }) this.triggerEvent('search', { value: '' })
} }
},
merchantRangeListTotal: {
type: Number
} }
}, },
/** /**
...@@ -119,7 +121,8 @@ Component({ ...@@ -119,7 +121,8 @@ Component({
console.log(value) console.log(value)
console.log(pickList) console.log(pickList)
if (!pickList[value]?.merchantName) { if (!pickList[value]?.merchantName) {
let toastMessage = pickerType == 'merchant' ? '请选择门店' : '请选择员工' let toastMessage =
pickerType == 'merchant' ? '请选择门店' : '请选择员工'
return wx.$util.showToast(toastMessage) return wx.$util.showToast(toastMessage)
} }
// console.log(value) // console.log(value)
......
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" bindcancel="cancel" height="var(--fontSize800)"> <popup
<view class="date-container"> class="date-background"
<view class="date-confirm"> popup-slot-class="popup-style"
<view class="search-box"> show="{{ show }}"
<view class="search-input"> bindconfirm="confirm"
<block wx:if="{{ !edit }}"> bindcancel="cancel"
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open"> height="var(--fontSize800)"
<block wx:if="{{ searchValue }}">{{searchValue}}</block> >
<block wx:else> <view class="date-container">
<image src="/images/search.png" class="icon"></image> <view class="date-confirm">
{{ pickerType == 'merchant'? '请输入门店' : '请输入员工姓名'}} <view class="search-box">
</block> <view class="search-input">
</view> <block wx:if="{{ !edit }}">
</block> <view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:else> <block wx:if="{{ searchValue }}">{{searchValue}}</block>
<input type="text" class="input" value="{{ searchValue }}" focus="{{ inputFocus }}" confirm-type="search" bindinput="input" bindblur="inputBlur" bindconfirm="inputConfifm" /> <block wx:else>
</block> <image src="/images/search.png" class="icon"></image>
</view> {{ pickerType == 'merchant'? '请输入门店' : '请输入员工姓名'}}
</view> </block>
</view> </view>
<view class="picker-box"> </block>
<picker-view class="picker" value="{{ selectStoreIndex }}" immediate-change="true" indicator-class="indicator" bindchange="changeStore"> <block wx:else>
<picker-view-column> <input
<block wx:for="{{ pickList }}" wx:key="merchantId"> type="text"
<view class="view pickViewColumn">{{pickerType == 'merchant'?item.merchantName:item.staffName}}</view> class="input"
</block> value="{{ searchValue }}"
</picker-view-column> focus="{{ inputFocus }}"
</picker-view> confirm-type="search"
</view> bindinput="input"
</view> bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column>
<block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{pickerType == 'merchant'?item.merchantName:item.staffName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
<view class="totalCount" wx:if="{{ pickerType == 'merchant' }}">共计{{merchantRangeListTotal}}家门店</view>
</view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
border-radius: var(--fontSize38); border-radius: var(--fontSize38);
color: #333; color: #333;
} }
.search-input .input{
.search-input .input {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -24,12 +25,14 @@ ...@@ -24,12 +25,14 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.search-input .icon{
.search-input .icon {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-right: var(--fontSize10); margin-right: var(--fontSize10);
} }
.search-input .placeholder{
.search-input .placeholder {
color: #C8C9CC; color: #C8C9CC;
} }
...@@ -37,22 +40,26 @@ ...@@ -37,22 +40,26 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding:0 var(--fontSize20); padding: 0 var(--fontSize20);
font-size:var(--fontSize34); font-size: var(--fontSize34);
line-height: var(--fontSize70); line-height: var(--fontSize70);
} }
.picker-box{
.picker-box {
height: var(--fontSize450); height: var(--fontSize450);
display: flex; display: flex;
} }
.picker-box .picker{
.picker-box .picker {
width: 100%; width: 100%;
} }
.tbn_class{
.tbn_class {
font-size: var(--fontSize26); font-size: var(--fontSize26);
color: #333; color: #333;
} }
.pickViewColumn{
.pickViewColumn {
text-align: center; text-align: center;
line-height: 34px; line-height: 34px;
white-space: nowrap; white-space: nowrap;
...@@ -60,6 +67,13 @@ ...@@ -60,6 +67,13 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.popup-style{ .popup-style {
height: calc(100% - var(--fontSize100))!important; height: calc(100% - var(--fontSize100)) !important;
}
.totalCount {
text-align: center;
margin-top: 100rpx;
color: #347BFF;
} }
\ No newline at end of file \ No newline at end of file
...@@ -560,7 +560,8 @@ Page({ ...@@ -560,7 +560,8 @@ Page({
carBandList, carBandList,
hwObjArray, hwObjArray,
hwOhterObjArray, hwOhterObjArray,
otherObjArray otherObjArray,
userInfo
} = this.data } = this.data
// 是督导和老板,提交评论 // 是督导和老板,提交评论
// console.log(approvedSource != '', approvedSource, 'approvedSource') // console.log(approvedSource != '', approvedSource, 'approvedSource')
...@@ -649,7 +650,7 @@ Page({ ...@@ -649,7 +650,7 @@ Page({
// 非调休 日报填报前参数校验 // 非调休 日报填报前参数校验
let check = await this.dailyReportCheck(orderObj) let check = await this.dailyReportCheck(orderObj)
console.log(check, 'check') console.log(check, 'check')
if (check) return false if (check && !(userInfo?.isSuper || userInfo?.loginRole == 3)) return false
// orderObj.reportType = reportType // orderObj.reportType = reportType
// console.log(orderObj, 'orderObj') // console.log(orderObj, 'orderObj')
wx.$util.showLoading() wx.$util.showLoading()
...@@ -733,7 +734,8 @@ Page({ ...@@ -733,7 +734,8 @@ Page({
this.isNotEmpty(orderObj.staffCount) && this.isNotEmpty(orderObj.staffCount) &&
orderObj.recordStaffCount != orderObj.staffCount && orderObj.recordStaffCount != orderObj.staffCount &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid &&
!(userInfo?.isSuper || userInfo?.loginRole == 3) // 超管和区域运维跳过校验提示
// true // true
) { ) {
wx.showModal({ wx.showModal({
...@@ -834,14 +836,16 @@ Page({ ...@@ -834,14 +836,16 @@ Page({
// //
if ( if (
[ [
'staffCount', // 'staffCount',
'deliveryCount', 'deliveryCount',
'notDeliveryCount', 'notDeliveryCount',
'equityToShopCount' 'equityToShopCount',
'waitInviteCount',
'customerLossCount'
].includes(name) && ].includes(name) &&
orderObj.onBreak == 'N' orderObj.onBreak == 'N'
) { ) {
let checkName = `record${name}` let checkName = `${name}Record`
let checkValue = carBandList[index][checkName] let checkValue = carBandList[index][checkName]
let context = let context =
hwObjArray[hwIndex]?.label || hwObjArray[hwIndex]?.label ||
...@@ -852,7 +856,8 @@ Page({ ...@@ -852,7 +856,8 @@ Page({
this.isNotEmpty(carBandList[index][checkName]) && this.isNotEmpty(carBandList[index][checkName]) &&
checkValue != carBandList[index][name] && checkValue != carBandList[index][name] &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid &&
!(userInfo?.isSuper || userInfo?.loginRole == 3) // 超管和区域运维跳过校验提示
) { ) {
wx.showModal({ wx.showModal({
title: '预警提示', title: '预警提示',
...@@ -1198,7 +1203,12 @@ Page({ ...@@ -1198,7 +1203,12 @@ Page({
firstBrandName, firstBrandName,
brandId, brandId,
brandName, brandName,
brandType brandType,
deliveryCountRecord: carBand.deliveryCount,
notDeliveryCountRecord: carBand.notDeliveryCount,
customerLossCountRecord: carBand.customerLossCount,
waitInviteCountRecord: carBand.recordWaitInviteCount,
issueCouponCountRecord: carBand.reocedIssueCouponCount
} }
} else { } else {
hwObjArray.forEach(e => { hwObjArray.forEach(e => {
...@@ -1307,7 +1317,11 @@ Page({ ...@@ -1307,7 +1317,11 @@ Page({
let { orderObj, staffCurrent } = this.data let { orderObj, staffCurrent } = this.data
// 先查4s店对应的园区店,再用园区店查员工 // 先查4s店对应的园区店,再用园区店查员工
api api
.querySceneRefByShop({ scene: 0, merchantId: orderObj.merchantId }) .querySceneRefByShop({
scene: 0,
merchantId: orderObj.merchantId,
pageSize: 200
})
.then(result => { .then(result => {
// console.log(result, 'result') // console.log(result, 'result')
let { code, data, message } = result let { code, data, message } = result
...@@ -1400,7 +1414,8 @@ Page({ ...@@ -1400,7 +1414,8 @@ Page({
comApi comApi
.getMerchantListPage({ .getMerchantListPage({
scene: 0, scene: 0,
merchantName: value merchantName: value,
pageSize: 200
}) })
.then(result => { .then(result => {
let { code, data, message } = result let { code, data, message } = result
...@@ -1420,7 +1435,8 @@ Page({ ...@@ -1420,7 +1435,8 @@ Page({
if (pickerType == 'merchant') { if (pickerType == 'merchant') {
this.setData({ this.setData({
merchantRangeList: data.list merchantRangeList: data.list,
merchantRangeListTotal: data.total
}) })
} }
// 初始化才执行下一步操作 // 初始化才执行下一步操作
......
...@@ -27,12 +27,11 @@ Component({ ...@@ -27,12 +27,11 @@ Component({
// if (n.length == 1) { // if (n.length == 1) {
// } // }
} }
}, },
show: { show: {
type: Boolean, type: Boolean,
observer: function(n) { observer: function (n) {
this.setData({ this.setData({
searchValue: '' searchValue: ''
}) })
...@@ -41,16 +40,19 @@ Component({ ...@@ -41,16 +40,19 @@ Component({
}, },
pickerType: { pickerType: {
type: String, type: String,
observer: function(n) { observer: function (n) {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
// 有搜索内容 将门店弹窗选中值置为0 // 有搜索内容 将门店弹窗选中值置为0
if (this.data.searchValue) thisPage.setData({subIndex: 0}) if (this.data.searchValue) thisPage.setData({ subIndex: 0 })
// 清空搜索框内容 // 清空搜索框内容
this.setData({ this.setData({
searchValue: '' searchValue: ''
}) })
this.triggerEvent('search', { value: '' }) this.triggerEvent('search', { value: '' })
} }
},
merchantRangeListTotal: {
type: Number
} }
}, },
/** /**
...@@ -119,7 +121,8 @@ Component({ ...@@ -119,7 +121,8 @@ Component({
console.log(value) console.log(value)
console.log(pickList) console.log(pickList)
if (!pickList[value]?.merchantName) { if (!pickList[value]?.merchantName) {
let toastMessage = pickerType == 'merchant' ? '请选择门店' : '请选择员工' let toastMessage =
pickerType == 'merchant' ? '请选择门店' : '请选择员工'
return wx.$util.showToast(toastMessage) return wx.$util.showToast(toastMessage)
} }
// console.log(value) // console.log(value)
......
<!--packageEquity/components/storePicker/storePicker.wxml--> <!--packageEquity/components/storePicker/storePicker.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindconfirm="confirm" bindcancel="cancel" height="var(--fontSize800)"> <popup
<view class="date-container"> class="date-background"
<view class="date-confirm"> popup-slot-class="popup-style"
<view class="search-box"> show="{{ show }}"
<view class="search-input"> bindconfirm="confirm"
<block wx:if="{{ !edit }}"> bindcancel="cancel"
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open"> height="var(--fontSize800)"
<block wx:if="{{ searchValue }}">{{searchValue}}</block> >
<block wx:else> <view class="date-container">
<image src="/images/search.png" class="icon"></image> <view class="date-confirm">
{{ pickerType == 'merchant'? '请输入门店' : '请输入员工姓名'}} <view class="search-box">
</block> <view class="search-input">
</view> <block wx:if="{{ !edit }}">
</block> <view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:else> <block wx:if="{{ searchValue }}">{{searchValue}}</block>
<input type="text" class="input" value="{{ searchValue }}" focus="{{ inputFocus }}" confirm-type="search" bindinput="input" bindblur="inputBlur" bindconfirm="inputConfifm" /> <block wx:else>
</block> <image src="/images/search.png" class="icon"></image>
</view> {{ pickerType == 'merchant'? '请输入门店' : '请输入员工姓名'}}
</view> </block>
</view> </view>
<view class="picker-box"> </block>
<picker-view class="picker" value="{{ selectStoreIndex }}" immediate-change="true" indicator-class="indicator" bindchange="changeStore"> <block wx:else>
<picker-view-column> <input
<block wx:for="{{ pickList }}" wx:key="merchantId"> type="text"
<view class="view pickViewColumn">{{pickerType == 'merchant'?item.merchantName:item.staffName}}</view> class="input"
</block> value="{{ searchValue }}"
</picker-view-column> focus="{{ inputFocus }}"
</picker-view> confirm-type="search"
</view> bindinput="input"
</view> bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
</view>
<view class="picker-box">
<picker-view
class="picker"
value="{{ selectStoreIndex }}"
immediate-change="true"
indicator-class="indicator"
bindchange="changeStore"
>
<picker-view-column>
<block wx:for="{{ pickList }}" wx:key="merchantId">
<view class="view pickViewColumn">{{pickerType == 'merchant'?item.merchantName:item.staffName}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
<view class="totalCount" wx:if="{{ pickerType == 'merchant' }}">共计{{merchantRangeListTotal}}家门店</view>
</view>
</popup> </popup>
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
border-radius: var(--fontSize38); border-radius: var(--fontSize38);
color: #333; color: #333;
} }
.search-input .input{
.search-input .input {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -24,12 +25,14 @@ ...@@ -24,12 +25,14 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.search-input .icon{
.search-input .icon {
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize28); height: var(--fontSize28);
margin-right: var(--fontSize10); margin-right: var(--fontSize10);
} }
.search-input .placeholder{
.search-input .placeholder {
color: #C8C9CC; color: #C8C9CC;
} }
...@@ -37,22 +40,26 @@ ...@@ -37,22 +40,26 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding:0 var(--fontSize20); padding: 0 var(--fontSize20);
font-size:var(--fontSize34); font-size: var(--fontSize34);
line-height: var(--fontSize70); line-height: var(--fontSize70);
} }
.picker-box{
.picker-box {
height: var(--fontSize450); height: var(--fontSize450);
display: flex; display: flex;
} }
.picker-box .picker{
.picker-box .picker {
width: 100%; width: 100%;
} }
.tbn_class{
.tbn_class {
font-size: var(--fontSize26); font-size: var(--fontSize26);
color: #333; color: #333;
} }
.pickViewColumn{
.pickViewColumn {
text-align: center; text-align: center;
line-height: 34px; line-height: 34px;
white-space: nowrap; white-space: nowrap;
...@@ -60,6 +67,13 @@ ...@@ -60,6 +67,13 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.popup-style{ .popup-style {
height: calc(100% - var(--fontSize100))!important; height: calc(100% - var(--fontSize100)) !important;
}
.totalCount {
text-align: center;
margin-top: 100rpx;
color: #347BFF;
} }
\ No newline at end of file \ No newline at end of file
...@@ -60,6 +60,7 @@ Page({ ...@@ -60,6 +60,7 @@ Page({
merchantRange: [], merchantRange: [],
staffRange: [], staffRange: [],
merchantRangeList: [], merchantRangeList: [],
merchantRangeListTotal: 0,
staffRangeList: [], staffRangeList: [],
statusBarHeight: app.globalData.statusBarHeight + 43, statusBarHeight: app.globalData.statusBarHeight + 43,
selectWeek: 0, selectWeek: 0,
...@@ -553,7 +554,8 @@ Page({ ...@@ -553,7 +554,8 @@ Page({
carBandList, carBandList,
hwObjArray, hwObjArray,
hwOhterObjArray, hwOhterObjArray,
otherObjArray otherObjArray,
userInfo
} = this.data } = this.data
// 是督导和老板,提交评论 // 是督导和老板,提交评论
// console.log(approvedSource != '', approvedSource, 'approvedSource') // console.log(approvedSource != '', approvedSource, 'approvedSource')
...@@ -645,7 +647,8 @@ Page({ ...@@ -645,7 +647,8 @@ Page({
// 非调休 日报填报前参数校验 // 非调休 日报填报前参数校验
let check = await this.dailyReportCheck(orderObj) let check = await this.dailyReportCheck(orderObj)
console.log(check, 'check') console.log(check, 'check')
if (check) return false // 超管和区域运维跳过校验提示
if (check && (!(userInfo?.isSuper || userInfo?.loginRole == 3))) return false
// return // return
wx.$util.showLoading() wx.$util.showLoading()
api api
...@@ -728,7 +731,8 @@ Page({ ...@@ -728,7 +731,8 @@ Page({
this.isNotEmpty(orderObj.staffCount) && this.isNotEmpty(orderObj.staffCount) &&
orderObj.recordStaffCount != orderObj.staffCount && orderObj.recordStaffCount != orderObj.staffCount &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid &&
!(userInfo?.isSuper || userInfo?.loginRole == 3) // 超管和区域运维跳过校验提示
// true // true
) { ) {
wx.showModal({ wx.showModal({
...@@ -828,14 +832,16 @@ Page({ ...@@ -828,14 +832,16 @@ Page({
// //
if ( if (
[ [
'staffCount',
'deliveryCount', 'deliveryCount',
'notDeliveryCount', 'notDeliveryCount',
'equityToShopCount' 'equityToShopCount',
'waitInviteCount',
'customerLossCount',
'issueCouponCount'
].includes(name) && ].includes(name) &&
orderObj.onBreak == 'N' orderObj.onBreak == 'N'
) { ) {
let checkName = `record${name}` let checkName = `${name}Record`
let checkValue = carBandList[index][checkName] let checkValue = carBandList[index][checkName]
let context = let context =
hwObjArray[hwIndex]?.label || hwObjArray[hwIndex]?.label ||
...@@ -846,7 +852,8 @@ Page({ ...@@ -846,7 +852,8 @@ Page({
this.isNotEmpty(carBandList[index][checkName]) && this.isNotEmpty(carBandList[index][checkName]) &&
checkValue != carBandList[index][name] && checkValue != carBandList[index][name] &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid &&
!(userInfo?.isSuper || userInfo?.loginRole == 3) // 超管和区域运维跳过校验提示
) { ) {
wx.showModal({ wx.showModal({
title: '预警提示', title: '预警提示',
...@@ -1170,7 +1177,13 @@ Page({ ...@@ -1170,7 +1177,13 @@ Page({
firstBrandName, firstBrandName,
brandId, brandId,
brandName, brandName,
brandType brandType,
deliveryCount,
notDeliveryCount,
customerLossCount,
waitInviteCount,
recordWaitInviteCount,
reocedIssueCouponCount
} = item } = item
item = { item = {
...carBand, ...carBand,
...@@ -1178,7 +1191,12 @@ Page({ ...@@ -1178,7 +1191,12 @@ Page({
firstBrandName, firstBrandName,
brandId, brandId,
brandName, brandName,
brandType brandType,
deliveryCountRecord: carBand.deliveryCount,
notDeliveryCountRecord: carBand.notDeliveryCount,
customerLossCountRecord: carBand.customerLossCount,
waitInviteCountRecord: carBand.recordWaitInviteCount,
issueCouponCountRecord: carBand.recordIssueCouponCount
} }
} else { } else {
hwObjArray.forEach(e => { hwObjArray.forEach(e => {
...@@ -1286,7 +1304,7 @@ Page({ ...@@ -1286,7 +1304,7 @@ Page({
let { orderObj, staffCurrent } = this.data let { orderObj, staffCurrent } = this.data
// 先查4s店对应的园区店,再用园区店查员工 // 先查4s店对应的园区店,再用园区店查员工
api api
.querySceneRefByShop({ scene: 0, merchantId: orderObj.merchantId }) .querySceneRefByShop({ scene: 1, merchantId: orderObj.merchantId, pageSize: 200 })
.then(result => { .then(result => {
// console.log(result, 'result') // console.log(result, 'result')
let { code, data, message } = result let { code, data, message } = result
...@@ -1377,8 +1395,10 @@ Page({ ...@@ -1377,8 +1395,10 @@ Page({
let { pickerType, subIndex, orderObj } = this.data let { pickerType, subIndex, orderObj } = this.data
comApi comApi
.getMerchantListPage({ .getMerchantListPage({
scene: 0, scene: 1,
merchantName: value merchantName: value,
pageSize: 200
// pageSize: 80
}) })
.then(result => { .then(result => {
let { code, data, message } = result let { code, data, message } = result
...@@ -1397,7 +1417,8 @@ Page({ ...@@ -1397,7 +1417,8 @@ Page({
} }
if (pickerType == 'merchant') { if (pickerType == 'merchant') {
this.setData({ this.setData({
merchantRangeList: data.list merchantRangeList: data.list,
merchantRangeListTotal: data.total
}) })
} }
// 初始化才执行下一步操作 // 初始化才执行下一步操作
......
...@@ -203,6 +203,7 @@ ...@@ -203,6 +203,7 @@
<store-picker <store-picker
subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}" subIndex="{{ pickerType == 'merchant' ? subIndex : staffCurrent }}"
pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}" pickList="{{ pickerType == 'merchant' ? merchantRangeList : staffRangeList }}"
merchantRangeListTotal="{{ merchantRangeListTotal }}"
show="{{ showPicker }}" show="{{ showPicker }}"
bindsearch="inputSearch" bindsearch="inputSearch"
bindconfirm="changePicker" bindconfirm="changePicker"
......
...@@ -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
......
...@@ -3,36 +3,41 @@ ...@@ -3,36 +3,41 @@
"@vant/area-data@^1.5.1": "@vant/area-data@^1.5.1":
"integrity" "sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==" version "1.5.1"
"resolved" "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz" resolved "https://registry.npmjs.org/@vant/area-data/-/area-data-1.5.1.tgz"
"version" "1.5.1" integrity sha512-gR5TPEzTbxN1cTK1aDhCoyikSCLX7DAacxyXoKyI4SAsYYTZrDl/nLgQFIm9vLsvWzlPIda8xV8/U3x7M9k6ww==
"@vant/weapp@^1.10.24": "@vant/weapp@^1.10.24":
"integrity" "sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ==" version "1.10.24"
"resolved" "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz" resolved "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.10.24.tgz"
"version" "1.10.24" integrity sha512-oovAaaJq3mlB+wto5bHVCn/rov8IgRDg+gJXy6hPX0A3c9WF1GqLqSmoXyaktgidJ9IaV1RADd3PAFlw4lUsnQ==
"glsk-applet-component@^1.0.0": dayjs@^1.11.11:
"integrity" "sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g==" version "1.11.11"
"resolved" "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz" resolved "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz"
"version" "1.0.0" integrity sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==
"glsx-applet-component@^1.1.29": glsk-applet-component@^1.0.0:
"integrity" "sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw==" version "1.0.0"
"resolved" "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz" resolved "https://registry.npmjs.org/glsk-applet-component/-/glsk-applet-component-1.0.0.tgz"
"version" "1.1.29" integrity sha512-ulz1OquWy4y4Q26Zu4FLDWzyqK+sInPWs4o8MKj2N8V/TnYQlUXoWkkgKh8fERK8A+rsusf3eiyZB0odchKk8g==
"glsx-common-sdk@^0.2.8": glsx-applet-component@^1.1.29:
"integrity" "sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A==" version "1.1.29"
"resolved" "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz" resolved "https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.29.tgz"
"version" "0.2.8" integrity sha512-HPzVayIRZvA3nvG2Lj9V9+S+BFiCer4XxjQwuZksta5Bs9JbbKaY4ztcIEe1Se3vw3rbPL0Dv2OsWvVz2b5jfw==
"number-precision@^1.6.0": glsx-common-sdk@^0.2.8:
"integrity" "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==" version "0.2.8"
"resolved" "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz" resolved "https://registry.npmjs.org/glsx-common-sdk/-/glsx-common-sdk-0.2.8.tgz"
"version" "1.6.0" integrity sha512-qCDUBRvJwE2Gs1PLwB+fHOSFPgB5W5fwYC3GSBSjMQOxs4keeOvd7o5wIb7bNakp0xF6ARPqpC/xm3hZ9TRW6A==
"rfdc@^1.3.0": number-precision@^1.6.0:
"integrity" "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" version "1.6.0"
"resolved" "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz" resolved "https://registry.npmmirror.com/number-precision/-/number-precision-1.6.0.tgz"
"version" "1.3.0" integrity sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ==
rfdc@^1.3.0:
version "1.3.0"
resolved "https://registry.npmmirror.com/rfdc/-/rfdc-1.3.0.tgz"
integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!