开发举牌验收小程序

dev_xd
lj7788@126.com 2025-08-01 18:25:02 +08:00
parent 5c51c1400d
commit e9653574d6
19 changed files with 1098 additions and 832 deletions

View File

@ -195,6 +195,7 @@ public class SysLoginService
if(Objects.nonNull(user.getActiveProjectName())){ if(Objects.nonNull(user.getActiveProjectName())){
userInfo.setProjectName(user.getActiveProjectName()); userInfo.setProjectName(user.getActiveProjectName());
} }
userInfo.getPermissions().add("wxapp:*:*");
return userInfo; return userInfo;
} }

View File

@ -2,9 +2,17 @@
<div class="project-checked main-page"> <div class="project-checked main-page">
<el-col :span="6" class="h100"> <el-col :span="6" class="h100">
<module-one-1-1 label="举牌验收数量统计" class="chart1-group"> <module-one-1-1 label="举牌验收数量统计" class="chart1-group">
<project-overview-chart :htmlShow="true" :key="'ai1' + chart1Key" :sp="''" :fn="changeChart1" <project-overview-chart
:maintitle="groupTotal" :legend-opt="groupLendOpt" :typedata="groupData" text="验收数" :htmlShow="true"
:height="chart1Height"></project-overview-chart> :key="'ai1' + chart1Key"
:sp="''"
:fn="changeChart1"
:maintitle="groupTotal"
:legend-opt="groupLendOpt"
:typedata="groupData"
text="验收数"
:height="chart1Height"
></project-overview-chart>
</module-one-1-1> </module-one-1-1>
<module-one-2-1 label="本周验收列表" class="week-group"> <module-one-2-1 label="本周验收列表" class="week-group">
<template v-if="weekData.length == 0"> <template v-if="weekData.length == 0">
@ -17,15 +25,25 @@
</template> </template>
<template v-else> <template v-else>
<div class="week-list scroll" :key="weekKey"> <div class="week-list scroll" :key="weekKey">
<div class="week-item" v-for="(it, index) in weekData" :key="index" <div
@click="handleWeekItemClick(it, $event)"> class="week-item"
v-for="(it, index) in weekData"
:key="index"
@click="handleWeekItemClick(it, $event)"
>
<div class="item-left"> <div class="item-left">
<el-image :src="it.image" :preview-src-list="it.images" fit="contain" /> <el-image
:src="it.image"
:preview-src-list="it.images"
fit="contain"
/>
</div> </div>
<div class="item-right"> <div class="item-right">
<div class="item-right-row"> <div class="item-right-row">
<span :class="'check-state check-state-' + it.checkResultColor">{{ <span
it.checkResultName }}</span> :class="'check-state check-state-' + it.checkResultColor"
>{{ it.checkResultName }}</span
>
<span class="check-date">{{ it.checkingDate }}</span> <span class="check-date">{{ it.checkingDate }}</span>
</div> </div>
<div class="item-right-row"> <div class="item-right-row">
@ -61,10 +79,16 @@
<el-col :span="18" class="h100"> <el-col :span="18" class="h100">
<module-one-2-3 label="举牌验收列表" class="h66 list-group"> <module-one-2-3 label="举牌验收列表" class="h66 list-group">
<div class="head-title-tab" :key="chart1Key"> <div class="head-title-tab" :key="chart1Key">
<div :class="nav == 1 ? 'head-nav active' : 'head-nav'" @click="doNav(1)"> <div
:class="nav == 1 ? 'head-nav active' : 'head-nav'"
@click="doNav(1)"
>
已验收({{ getCheckedCount(1) }}) 已验收({{ getCheckedCount(1) }})
</div> </div>
<div :class="nav == 0 ? 'head-nav active' : 'head-nav'" @click="doNav(0)"> <div
:class="nav == 0 ? 'head-nav active' : 'head-nav'"
@click="doNav(0)"
>
未验收({{ getCheckedCount(0) }}) 未验收({{ getCheckedCount(0) }})
</div> </div>
</div> </div>
@ -79,15 +103,25 @@
</template> </template>
<template v-else> <template v-else>
<div class="list-data scroll" :key="listKey"> <div class="list-data scroll" :key="listKey">
<div class="week-item" v-for="(it, index) in listData" :key="index" <div
@click="handleWeekItemClick(it, $event)"> class="week-item"
v-for="(it, index) in listData"
:key="index"
@click="handleWeekItemClick(it, $event)"
>
<div class="item-left"> <div class="item-left">
<el-image :src="it.image" :preview-src-list="it.images" fit="contain" /> <el-image
:src="it.image"
:preview-src-list="it.images"
fit="contain"
/>
</div> </div>
<div class="item-right"> <div class="item-right">
<div class="item-right-row"> <div class="item-right-row">
<span :class="'check-state check-state-' + it.checkResultColor">{{ <span
it.checkResultName }}</span> :class="'check-state check-state-' + it.checkResultColor"
>{{ it.checkResultName }}</span
>
<span class="check-date">{{ it.checkingDate }}</span> <span class="check-date">{{ it.checkingDate }}</span>
</div> </div>
<div class="item-right-row"> <div class="item-right-row">
@ -117,9 +151,15 @@
</div> </div>
</div> </div>
</div> </div>
<el-pagination layout="total,prev, pager, next" :hide-on-single-page="true" <el-pagination
@current-change="handleCurrentChange" :total="total" :page-size="size" layout="total,prev, pager, next"
:current-page.sync="index" class="bg-pagination"></el-pagination> :hide-on-single-page="true"
@current-change="handleCurrentChange"
:total="total"
:page-size="size"
:current-page.sync="index"
class="bg-pagination"
></el-pagination>
</template> </template>
</module-one-2-3> </module-one-2-3>
<module-one-1-3 label="举牌验收技术员统计" class="h33 group-technician"> <module-one-1-3 label="举牌验收技术员统计" class="h33 group-technician">
@ -132,8 +172,13 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<my-chart :key="chart2Key" id="project-safety-check-chart2" width="100%" height="100%" <my-chart
:render="renderChart2"></my-chart> :key="chart2Key"
id="project-safety-check-chart2"
width="100%"
height="100%"
:render="renderChart2"
></my-chart>
</template> </template>
</module-one-1-3> </module-one-1-3>
</el-col> </el-col>
@ -286,9 +331,6 @@ export default {
this.$api.checked.listProjectChecked(param).then((res) => { this.$api.checked.listProjectChecked(param).then((res) => {
this.total = res.total + 20; this.total = res.total + 20;
this.listData = this.mapData(res); this.listData = this.mapData(res);
for (let i = 0; i < 7; i++) {
this.listData.push(this.listData[0]);
}
this.listKey++; this.listKey++;
}); });
}, },
@ -301,9 +343,6 @@ export default {
}; };
this.$api.checked.listProjectChecked(param).then((res) => { this.$api.checked.listProjectChecked(param).then((res) => {
this.weekData = this.mapData(res); this.weekData = this.mapData(res);
for (let i = 0; i < 8; i++) {
this.weekData.push(this.weekData[0]);
}
this.weekKey++; this.weekKey++;
}); });
}, },
@ -499,7 +538,6 @@ export default {
} }
.chart1-group { .chart1-group {
.chart-gif, .chart-gif,
.chart-text { .chart-text {
left: 51px !important; left: 51px !important;
@ -630,8 +668,10 @@ export default {
} }
@media (min-width: 1921px) and (max-width: 2560px) { @media (min-width: 1921px) and (max-width: 2560px) {
.no-data {
font-size: 16px;
}
.chart1-group { .chart1-group {
.chart-gif, .chart-gif,
.chart-text { .chart-text {
left: 59px !important; left: 59px !important;
@ -692,8 +732,10 @@ export default {
} }
@media (min-width: 2561px) { @media (min-width: 2561px) {
.no-data {
font-size: 24px;
}
.chart1-group { .chart1-group {
.chart-gif, .chart-gif,
.chart-text { .chart-text {
left: 79px !important; left: 79px !important;

View File

@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDel != null "> and ppc.is_del = #{isDel}</if> <if test="isDel != null "> and ppc.is_del = #{isDel}</if>
<if test="approveStatus != null and approveStatus != ''"> and ppc.approve_status = #{approveStatus}</if> <if test="approveStatus != null and approveStatus != ''"> and ppc.approve_status = #{approveStatus}</if>
<if test="activeTags != null"> <if test="activeTags != null">
<if test='activeTags == "jxz"'> and (ppc.approve_status != '100' or ppc.check_result is null or ppc.check_result != '1')</if> <if test='activeTags == "jxz"'> and not (ppc.approve_status = '100' and ppc.check_result = '1')</if>
<if test='activeTags == "jwc"'> and ppc.approve_status = '100' and ppc.check_result = '1'</if> <if test='activeTags == "jwc"'> and ppc.approve_status = '100' and ppc.check_result = '1'</if>
</if> </if>
<if test="remark!=null and remark=='lastWeek'"> <if test="remark!=null and remark=='lastWeek'">

View File

@ -29,6 +29,7 @@ public class AuthLogic
/** 所有权限标识 */ /** 所有权限标识 */
private static final String ALL_PERMISSION = "*:*:*"; private static final String ALL_PERMISSION = "*:*:*";
private static final String WX_ROLES = "wxapp:*:*";
/** 管理员角色权限标识 */ /** 管理员角色权限标识 */
private static final String SUPER_ADMIN = "admin"; private static final String SUPER_ADMIN = "admin";
@ -356,7 +357,7 @@ public class AuthLogic
public boolean hasPermi(Collection<String> authorities, String permission) public boolean hasPermi(Collection<String> authorities, String permission)
{ {
return authorities.stream().filter(StringUtils::hasText) return authorities.stream().filter(StringUtils::hasText)
.anyMatch(x -> ALL_PERMISSION.contains(x) || PatternMatchUtils.simpleMatch(x, permission)); .anyMatch(x -> ALL_PERMISSION.contains(x) || WX_ROLES.contains(x) || PatternMatchUtils.simpleMatch(x, permission));
} }
/** /**

View File

@ -0,0 +1,47 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'eslint:recommended'
],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
globals: {
// 微信小程序全局变量
App: 'readonly',
Page: 'readonly',
Component: 'readonly',
Behavior: 'readonly',
wx: 'readonly',
getApp: 'readonly',
getCurrentPages: 'readonly',
// 支付宝小程序全局变量
my: 'readonly',
// 百度小程序全局变量
swan: 'readonly',
// 字节跳动小程序全局变量
tt: 'readonly',
// QQ小程序全局变量
qq: 'readonly',
// 通用小程序全局变量
uni: 'readonly'
},
rules: {
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'no-unused-vars': ['warn'],
'no-console': ['warn']
}
}

View File

@ -0,0 +1,10 @@
{
"recommendations": [
"coderfee.minapp-snippet",
"qiu8310.minapp-vscode",
"mrmlnc.vscode-json",
"formulahendry.auto-rename-tag",
"bradlc.vscode-tailwindcss",
"ms-vscode.vscode-json"
]
}

View File

@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "微信小程序调试",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/miniprogram/app.js",
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"skipFiles": ["<node_internals>/**"],
"preLaunchTask": "miniprogram-dev"
}
]
}

View File

@ -0,0 +1,26 @@
{
"files.associations": {
"*.wxml": "xml",
"*.wxss": "css",
"*.wxs": "javascript"
},
"emmet.includeLanguages": {
"wxml": "html"
},
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
"minapp-vscode.disableAutoConfig": false,
"minapp-vscode.formatMaxLineCharacters": 120,
"minapp-vscode.format.bracketSpacing": true,
"minapp-vscode.format.semicolon": false,
"minapp-vscode.format.singleQuote": true,
"minapp-vscode.format.printWidth": 100,
"minapp-vscode.format.useTabs": false,
"minapp-vscode.disableCustomComponentAutocompletion": false,
"minapp-vscode.disableAutoWxssCompelte": false
}

View File

@ -0,0 +1,34 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "miniprogram-dev",
"type": "shell",
"command": "echo",
"args": ["启动微信小程序开发模式"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
},
{
"label": "miniprogram-build",
"type": "shell",
"command": "echo",
"args": ["构建微信小程序"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
}
]
}

View File

@ -0,0 +1,77 @@
{
"Page": {
"prefix": "page",
"body": [
"Page({",
" data: {",
" $1",
" },",
" onLoad(options) {",
" $2",
" },",
" onReady() {",
" $3",
" },",
" onShow() {",
" $4",
" },",
" onHide() {",
" $5",
" },",
" onUnload() {",
" $6",
" }",
"})"
],
"description": "创建小程序Page页面"
},
"Component": {
"prefix": "component",
"body": [
"Component({",
" properties: {",
" $1",
" },",
" data: {",
" $2",
" },",
" methods: {",
" $3",
" },",
" lifetimes: {",
" attached() {",
" $4",
" },",
" detached() {",
" $5",
" }",
" }",
"})"
],
"description": "创建小程序Component组件"
},
"WXML Template": {
"prefix": "wxml",
"body": [
"<view class='container'>",
" <text>{{title}}</text>",
" $1",
"</view>"
],
"description": "创建WXML模板"
},
"WXSS Style": {
"prefix": "wxss",
"body": [
".container {",
" display: flex;",
" flex-direction: column;",
" align-items: center;",
" justify-content: center;",
" padding: 20rpx;",
" $1",
"}"
],
"description": "创建WXSS样式"
}
}

View File

@ -2027,13 +2027,14 @@ swiper-item video {
.top-5 { .top-5 {
margin-top: -5rpx; margin-top: -5rpx;
} }
.in-img-div image{
.in-img-div image {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
padding-right: 15rpx; padding-right: 15rpx;
} }
.markers{ .markers {
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx; background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
height: 20px; height: 20px;
line-height: 20px; line-height: 20px;
@ -2051,6 +2052,6 @@ swiper-item video {
padding: 0 30rpx; padding: 0 30rpx;
} }
.txtb{ .txtb {
font-weight: 600; font-weight: 600;
} }

View File

@ -2,9 +2,9 @@
module.exports = { module.exports = {
timeout: 60000, timeout: 60000,
appId: "wx46466c7828eede2b", appId: "wx46466c7828eede2b",
baseUrl: 'https://xiangguan.sxyanzhu.com/wechat', //baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
//baseUrl: 'http://127.0.0.1:8080', baseUrl: 'http://127.0.0.1:8080',
baseImgUrl: 'https://xiangguan.sxyanzhu.com', baseImgUrl: 'https://xiangguan.sxyanzhu.com',
//baseImgUrl: 'http://127.0.0.1:9300', //baseImgUrl: 'http://127.0.0.1:9300',
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin'] noSecuritys: ['/code', '/auth/wxLogin', '/auth/getMaOpenId', '/auth/getMaPhoneNumber', '/auth/maLogin']
}; };

View File

@ -27,7 +27,9 @@ Page({
jxzCount: 0, jxzCount: 0,
ywcCount: 0, ywcCount: 0,
imgBaseUrl: config.baseImgUrl, imgBaseUrl: config.baseImgUrl,
projectUserInfo: {} projectUserInfo: {},
isTechnician: false,//是否是技术员
isGroup: false,//是否是班组长
}, },
//项目切换 返回值 //项目切换 返回值
@ -48,6 +50,7 @@ Page({
url: '../../../pages/login/login', url: '../../../pages/login/login',
}) })
} }
this.data.isTechnician = app.globalData.userData.isTechnician
const proUserInfo = getUserInfo(); const proUserInfo = getUserInfo();
this.setData({ this.setData({
addFlag: proUserInfo.projectUserInfo.subDeptType == "1", addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
@ -61,8 +64,10 @@ Page({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
listData: [], listData: [],
total: 0 total: 0,
isGroup: proUserInfo.projectUserInfo.userPost == "3"
}); });
this.getListData(this.data.activeState); this.getListData(this.data.activeState);
}, },
@ -74,7 +79,6 @@ Page({
url: `../add/index`, url: `../add/index`,
}) })
}, },
getInfo(e) { getInfo(e) {
let { let {
id, id,
@ -103,7 +107,11 @@ Page({
* 查询项目举牌验收数据 * 查询项目举牌验收数据
*/ */
getListData(activeState) { getListData(activeState) {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "activeTags=" + activeState; let params = `pageNum=${this.data.pageNum}&pageSize=${this.data.pageSize}&projectId=${app.globalData.useProjectId}&activeTags=${activeState}`
if (this.isGroup) {
params += `&groupDeptUser=${this.data.projectUserInfo.userPhone}`
}
projectCheckedList(params).then(res => { projectCheckedList(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.setData({ this.setData({
@ -115,12 +123,12 @@ Page({
// 统计列表 // 统计列表
projectCheckedListCount(params).then(res => { projectCheckedListCount(params).then(res => {
if (res.code == 200) { if (res.code == 200) {
let _qb=0,_jxz=0,_ywc=0; let _qb = 0, _jxz = 0, _ywc = 0;
res.data.forEach(item =>{ res.data.forEach(item => {
if(item.approve_status=='100' && item.check_result=='1'){ if (item.approve_status == '100' && item.check_result == '1') {
_qb += item.total; _qb += item.total;
_ywc += item.total; _ywc += item.total;
}else{ } else {
_qb += item.total; _qb += item.total;
_jxz += item.total; _jxz += item.total;
} }

View File

@ -1,4 +1,4 @@
{ {
"usingComponents": {}, "usingComponents": {},
"navigationStyle":"custom" "navigationStyle": "custom"
} }

View File

@ -14,22 +14,22 @@
</view> </view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower"> <scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select> <project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view wx:if="{{projectUserInfo.subDeptType=='1'}}" class="modify_video_nav" style="margin-top: 5rpx;"> <view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='qb'?'active':''}}" bindtap="trainJump" data-index="1"><text>全部({{qbCount}}</text></view> <view class="{{activeState=='qb'?'active':''}}" bindtap="trainJump" data-index="1"><text>全部({{qbCount}}</text></view>
<view class="{{activeState=='jxz'?'active':''}}" bindtap="trainJump" data-index="2"><text>进行中({{jxzCount}}</text></view> <view class="{{activeState=='jxz'?'active':''}}" bindtap="trainJump" data-index="2"><text>进行中({{jxzCount}}</text></view>
<view class="{{activeState=='ywc'?'active':''}}" bindtap="trainJump" data-index="3"><text>已完成({{ywcCount}}</text></view> <view class="{{activeState=='ywc'?'active':''}}" bindtap="trainJump" data-index="3"><text>已完成({{ywcCount}}</text></view>
</view> </view>
<view class="inspect_max_scroll"> <view class="inspect_max_scroll">
<!--专项检查样式zxjc--> <!--专项检查样式zxjc-->
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo"> <view class="inspect_for_scroll" wx:if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="getInfo">
<view class="inspect_for_bgd"> <view class="inspect_for_bgd">
<view class="inspect_list_title"> <view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width"> <view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 10 ?'0'+(index+1):(index+1)}}</view> <view class="inspect_list_title_number">{{index < 10 ? '0' + (index+1) : index+1}}</view>
<view class="module_title module_title_flex inspect_list_title_text_2"> <view class="module_title module_title_flex inspect_list_title_text_2">
{{item.createTime}} {{item.createTime}}
</view> </view>
<text class="timeline_for_state_1">常规验收</text> <!-- <text class="timeline_for_state_1">常规验收</text> -->
</view> </view>
</view> </view>
<view class="inspect_list_info"> <view class="inspect_list_info">
@ -59,7 +59,7 @@
<view style="color: #a5abbb;">暂无数据</view> <view style="color: #a5abbb;">暂无数据</view>
</view> </view>
</view> </view>
<view wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd"> <view wx:if="{{isGroup}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;"> <view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image> <image src="/images/new_add.png"></image>
<view>新增</view> <view>新增</view>

View File

@ -78,7 +78,7 @@ Page({
getMaOpenId: function () { getMaOpenId: function () {
wx.login({ wx.login({
success: res => { success: res => {
getMaOpenId({'code':res.code}).then(response => { getMaOpenId({ 'code': res.code }).then(response => {
setOpenId(response.data.openid); setOpenId(response.data.openid);
setSessionKey(response.data.sessionKey); setSessionKey(response.data.sessionKey);
}); });
@ -135,18 +135,18 @@ Page({
}, },
getPhoneNumber(e) { getPhoneNumber(e) {
if(e.detail.code){ if (e.detail.code) {
let data = { let data = {
openId:getOpenId(), openId: getOpenId(),
sessionKey:getSessionKey(), sessionKey: getSessionKey(),
iv: e.detail.iv, iv: e.detail.iv,
encryptedData: e.detail.encryptedData encryptedData: e.detail.encryptedData
} }
maLogin(data).then(res =>{ maLogin(data).then(res => {
setToken(res.data.access_token); setToken(res.data.access_token);
this.getUserInfoByCache(); this.getUserInfoByCache();
}) })
}else{ } else {
//用户决绝授权 //用户决绝授权
app.toast("请允许微信手机号一键登录"); app.toast("请允许微信手机号一键登录");
} }
@ -158,8 +158,9 @@ Page({
* @param {*} e * @param {*} e
*/ */
getUserInfoByCache: function () { getUserInfoByCache: function () {
findUserInfoByCache().then(res=>{ findUserInfoByCache().then(res => {
if(res.code==200){ if (res.code == 200) {
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
setUserInfo(res.user); setUserInfo(res.user);
app.globalData.userData = res.user; app.globalData.userData = res.user;
this.getMyProjectList(); this.getMyProjectList();
@ -173,15 +174,15 @@ Page({
* 根据项目配置进入不同页面... * 根据项目配置进入不同页面...
*/ */
getMyProjectList: function () { getMyProjectList: function () {
findMyProjectList().then(res=>{ findMyProjectList().then(res => {
if(res.code==200){ if (res.code == 200) {
app.globalData.projectInfoList = res.rows; app.globalData.projectInfoList = res.rows;
if(res.rows.length>0){ if (res.rows.length > 0) {
if(res.rows.length==1){ if (res.rows.length == 1) {
app.globalData.useProjectId = res.rows[0].id; app.globalData.useProjectId = res.rows[0].id;
app.globalData.useProjectName = res.rows[0].projectName; app.globalData.useProjectName = res.rows[0].projectName;
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail=>{ findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail => {
if(detail.code==200){ if (detail.code == 200) {
let userInfo = getUserInfo(); let userInfo = getUserInfo();
userInfo.projectUserInfo = detail.data; userInfo.projectUserInfo = detail.data;
setUserInfo(userInfo); setUserInfo(userInfo);
@ -191,13 +192,13 @@ Page({
}) })
} }
}); });
}else{ } else {
//多项目进入项目切换页面 //多项目进入项目切换页面
wx.redirectTo({ wx.redirectTo({
url: '../../pageage/project_list/index', url: '../../pageage/project_list/index',
}) })
} }
}else{ } else {
app.toast("未查询到当前用户项目,信息审核中或人员已离场"); app.toast("未查询到当前用户项目,信息审核中或人员已离场");
return false; return false;
} }

View File

@ -1731,31 +1731,7 @@ Page({
app.toast("请选择文化程度!"); app.toast("请选择文化程度!");
return false; return false;
} }
if (false) {
if (!form.bankName) {
app.toast("请填写开户银行名称!");
return false;
}
if (!form.bankOffice) {
app.toast("请填写开户银行网点!");
return false;
}
if (!form.bankCardNo) {
app.toast("请填写工资银行卡号!");
return false;
}
}
let that = this; let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认保存单位人员信息登记?',
success: function (sm) {
if (sm.confirm) {
that.submitSubUserForm();
}
}
})
}, },
/** /**
@ -2071,7 +2047,7 @@ Page({
}; };
let _subDeptNameTemp = this.data.form.subDeptName; let _subDeptNameTemp = this.data.form.subDeptName;
this.setData({ this.setData({
form:_form, form: _form,
active: 0, active: 0,
"parForm.subDeptName": _subDeptNameTemp "parForm.subDeptName": _subDeptNameTemp
}); });
@ -2085,6 +2061,7 @@ Page({
getUserInfoByCache: function () { getUserInfoByCache: function () {
findUserInfoByCache().then(res => { findUserInfoByCache().then(res => {
if (res.code == 200) { if (res.code == 200) {
res.user.isTechnician = (res.user.roles || []).find(role => role.roleKey.indexOf("zbjsy_") >= 0) != null;
setUserInfo(res.user); setUserInfo(res.user);
app.globalData.userData = res.user; app.globalData.userData = res.user;
this.getMyProjectList(); this.getMyProjectList();
@ -2162,9 +2139,9 @@ Page({
handleOpenPrivacyContract() { handleOpenPrivacyContract() {
// 打开隐私协议页面 // 打开隐私协议页面
wx.openPrivacyContract({ wx.openPrivacyContract({
success: () => {}, // 打开成功 success: () => { }, // 打开成功
fail: () => {}, // 打开失败 fail: () => { }, // 打开失败
complete: () => {} complete: () => { }
}) })
} }
}) })

View File

@ -19,7 +19,18 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"condition": false "condition": false,
"compileWorklet": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"packNpmManually": false,
"minifyWXSS": true,
"minifyWXML": true,
"localPlugins": false,
"disableUseStrict": false,
"useCompilerPlugins": false,
"swc": false,
"disableSWC": true
}, },
"condition": {}, "condition": {},
"editorSetting": { "editorSetting": {

View File

@ -3,7 +3,21 @@
"projectname": "miniprogram", "projectname": "miniprogram",
"setting": { "setting": {
"compileHotReLoad": true, "compileHotReLoad": true,
"urlCheck": false "urlCheck": false,
"coverView": true,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false
}, },
"condition": { "condition": {
"miniprogram": { "miniprogram": {
@ -24,5 +38,6 @@
} }
] ]
} }
} },
"libVersion": "3.8.9"
} }