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