Commit 11f2b5d5 by 岑成威

Merge branch 'SAAS+V5.8.3' of http://192.168.3.233:8090/saas_plus/dj-car-boutiqu…

…e-work-wechat into SAAS+V5.8.3
2 parents 697f3c70 aede407b
......@@ -10,6 +10,9 @@ export const preReleaseAppId = "wx96c8f2a3e76907cb";
// 小程序id
export const appId = "wx570d9331f9ace0bd";
/** 招聘管理菜单开关(仅控制菜单入口,不影响 canViewRecruit 其他业务逻辑) */
export const RECRUIT_MENU_ENABLED = false
/**
* 环境指定
* 0本地
......
......@@ -3,6 +3,7 @@ const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-w
import api from '~/packageCrowdFunding/api'
import NP from 'number-precision'
import { waitstaffstateAPI} from '~/api/api'
import { RECRUIT_MENU_ENABLED } from '~/config.js'
Component({
/**
* 组件的属性列表
......@@ -107,8 +108,8 @@ Component({
icon: "sceneMarket",
navigateToUrl: "/packageEquity/pages/sceneMarket/index/index",
})
// 仅区域运营展示招聘管理模块
if (wx.$hasPermission?.canViewRecruit?.(userInfo) && menuList.every((item) => item.menuText != "招聘管理")) menuList.push({
// 仅区域运营展示招聘管理模块(受 RECRUIT_MENU_ENABLED 开关控制)
if (RECRUIT_MENU_ENABLED && wx.$hasPermission?.canViewRecruit?.(userInfo) && menuList.every((item) => item.menuText != "招聘管理")) menuList.push({
menuText: "招聘管理",
icon: "recruit-manage",
path: 'packageEquity.recruitManage',
......@@ -122,7 +123,7 @@ Component({
menuList
})
this.getData()
if (wx.$hasPermission?.canViewRecruit?.(userInfo)) {
if (RECRUIT_MENU_ENABLED && wx.$hasPermission?.canViewRecruit?.(userInfo)) {
this.getWaitStaff() // 在组件加载时调用
}
}
......
import { RECRUIT_MENU_ENABLED } from '../../config.js'
import { MENU_SECTION } from './constants.js'
import { DYNAMIC_FORM_EQUITY_MENUS } from '../../utils/dynamicFormMenus.js'
......@@ -208,7 +209,8 @@ export const EQUITY_MENU_REGISTRY = [
sortVal: 22,
tipsNum: 0,
action: { type: 'router', target: 'packageEquity.recruitManage' },
visible: ({ policies }) => policies.canViewRecruit()
visible: ({ policies }) =>
RECRUIT_MENU_ENABLED && policies.canViewRecruit()
},
{
id: 'pending_approval',
......
// import { commonApi, equityApi } from '../../api/api'
import { uploadImg } from '~/api/api'
import { getSystemInfoSync } from '~/utils/systemInfo'
import { quotationUpgrade, updateOrderStatus } from '../../../api'
import { quotationUpgrade, updateOrderStatus, updateCustomerNameUrlAPI } from '../../../api'
import { ImgUrl } from '~/config'
const IMG_URL = ImgUrl + '/'
Page({
......@@ -26,13 +26,15 @@ Page({
signImage: ''
},
onRoute(options) {
let id = options.id || 10
let id = options.id || ''
let orderId = options.orderId || ''
let equityGoodsFlag = options.equityGoodsFlag
let tabIndex = options.tabIndex
this.setData({
id,
orderId,
equityGoodsFlag
equityGoodsFlag,
tabIndex
})
},
onLoad(options) {
......@@ -184,6 +186,7 @@ Page({
// 上传图片
toUploadImage(tempFilePaths) {
let _this = this
let { tabIndex } = _this.data
const tempFiles = tempFilePaths
let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType
......@@ -195,11 +198,14 @@ Page({
uploadImg({
file: `${type}@${_res.data}`
}).then(res => {
// _this.saveToHttp(img)
let { data } = res
// _this.saveToHttp(data)
console.log(data)
_this.changeOrderStatus(data)
if (tabIndex == 2) {
_this.updateEquityCustomerMessage(data)
} else {
_this.changeOrderStatus(data)
}
}).catch(() => {
wx.$util.hideLoading()
})
},
fail() {
......@@ -207,14 +213,25 @@ Page({
}
})
},
updateEquityCustomerMessage(signUrl) {
let { orderId } = this.data
updateCustomerNameUrlAPI({ orderId, customerNameUrl: signUrl }).then(res => {
wx.$util.hideLoading()
wx.$router.go('packageEquity.equityPage', { tabIndex: 2 })
}).catch(() => {
wx.$util.hideLoading()
})
},
changeOrderStatus(signUrl) {
let { id, equityGoodsFlag } = this.data
updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl })
.then(result => {
// this.navigator()
wx.$util.hideLoading()
equityGoodsFlag ? this.navigator() : wx.$router.go('packageEquity.equityPage', { tabIndex: 1 })
})
.catch(err => { })
.catch(() => {
wx.$util.hideLoading()
})
},
navigator() {
let { orderId } = this.data
......
......@@ -214,8 +214,8 @@ Page({
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: tabIndex || 1 })
},
toFullPage() {
let { id, orderId } = this.data
wx.$router.go('fullSignture', { id, orderId })
let { id, orderId, tabIndex, equityGoodsFlag } = this.data
wx.$router.go('fullSignture', { id, orderId, tabIndex, equityGoodsFlag })
},
// 上传图片
toUploadImage(tempFilePaths) {
......
......@@ -279,7 +279,7 @@ describe('equityMenu', async () => {
)
assert.ok(ids.includes('bi_report'))
assert.ok(ids.includes('pending_approval'))
assert.ok(ids.includes('recruit_manage'))
assert.ok(!ids.includes('recruit_manage'))
})
it('IT-EQ-MENU-SNAP-002: resident staff with mode sync snapshot', () => {
......
......@@ -17,12 +17,13 @@ import {
clearDailyReportNewVersionCache,
fetchDailyReportNewVersionMenuVisible
} from '../../utils/dailyReportNewVersionGate.js'
import { buildEquityMenusSync } from '../menu/buildMenus.js'
import { createEquityMenuContext } from '../menu/context.js'
describe('equityStoreSwitch', () => {
describe('equityStoreSwitch', async () => {
setupWxMock(globalThis)
const { buildEquityMenusSync } = await import('../menu/buildMenus.js')
const { createEquityMenuContext } = await import('../menu/context.js')
beforeEach(() => {
clearMenuApiCache()
clearDailyReportNewVersionCache()
......
......@@ -164,7 +164,7 @@
<textarea class="intention-input intention-textarea mb-48" bindinput="handleInput" data-key="custodianAddress" placeholder="请输入" maxlength="52" value="{{addSignAgreementObj.custodianAddress}}" />
</view>
</GeneralPopup>
<AgreementListPopup id="AgreementListPopup" selectedObj="{{ signAgreementObj || {} }}" bindconfirm="agreementConfirm" />
<AgreementListPopup id="AgreementListPopup" selectedObj="{{signAgreementObj}}" bindconfirm="agreementConfirm" />
......@@ -2,6 +2,7 @@ import api from '~/subvehicleConversion/api'
import NP from 'number-precision'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import { waitstaffstateAPI} from '~/api/api'
import { RECRUIT_MENU_ENABLED } from '~/config.js'
Component({
properties: {
navBarHeight: Number
......@@ -107,8 +108,8 @@ Component({
exhibitionToolsList
})
}
// 仅区域运营角色展示招聘管理模块
if (wx.$hasPermission?.canViewRecruit?.(userInfo) && exhibitionToolsList.every((item) => item.title != "招聘管理")) {
// 仅区域运营角色展示招聘管理模块(受 RECRUIT_MENU_ENABLED 开关控制)
if (RECRUIT_MENU_ENABLED && wx.$hasPermission?.canViewRecruit?.(userInfo) && exhibitionToolsList.every((item) => item.title != "招聘管理")) {
console.log("添加招聘管理入口");
exhibitionToolsList.push({
title: "招聘管理",
......
import { RECRUIT_MENU_ENABLED } from '../../config.js'
import { MENU_SECTION } from './constants.js'
import {
DYNAMIC_FORM_TAB_INDEX_MENUS
......@@ -368,7 +369,9 @@ export const MENU_REGISTRY = [
tipsNum: 0,
action: { type: 'router', target: 'packageEquity.recruitManage' },
visible: ({ policies }) =>
policies.notTechnician() && policies.canViewRecruit()
RECRUIT_MENU_ENABLED &&
policies.notTechnician() &&
policies.canViewRecruit()
},
{
id: 'repair_order',
......
......@@ -298,7 +298,7 @@ describe('tabIndexMenu', async () => {
)
assert.ok(ids.includes('bi_report'))
assert.ok(ids.includes('pending_approval'))
assert.ok(ids.includes('recruit_manage'))
assert.ok(!ids.includes('recruit_manage'))
})
it('IT-MENU-SNAP-003: resident staff menu id snapshot', () => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!