实名制移动端
|
|
@ -37,6 +37,12 @@ module.exports = {
|
|||
bmwUrl: 'http://192.168.0.14:19999/exam-bmw',
|
||||
// 体检-基础路径
|
||||
tjBaseUrl: 'http://192.168.0.14:20000/AppPeaManager',
|
||||
//实名制移动端-登录接口
|
||||
realLoginUrl:'http://192.168.0.14:9200/',
|
||||
//实名制移动端-移动
|
||||
realAppUrl:'http://192.168.0.14:1913/app',
|
||||
|
||||
|
||||
// 应用信息
|
||||
appInfo: {
|
||||
// 应用名称
|
||||
|
|
|
|||
|
|
@ -1,43 +1,19 @@
|
|||
{
|
||||
"name": "hello-uniapp",
|
||||
"version": "3.4.5",
|
||||
"lockfileVersion": 2,
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "hello-uniapp",
|
||||
"version": "3.4.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"image-tools": "^1.4.0",
|
||||
"luch-request": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@dcloudio/types": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/@dcloudio/types/-/types-2.6.12.tgz",
|
||||
"integrity": "sha512-mrCMwcINy1IFjU9VUqLeWBkj404yWs5paLDttBcA+eqUjanuUQbBcTVPqlrGgkyzLXDcV2oDDZRSNxNpXi4kMQ=="
|
||||
},
|
||||
"node_modules/image-tools": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/image-tools/-/image-tools-1.4.0.tgz",
|
||||
"integrity": "sha512-TKtvJ6iUwM0mfaD4keMnk1ENHFC470QEjBfA3IlvKdEOufzvWbjbaoNcoyYq6HlViF8+d5tOS1ooE6j7CHf1lQ=="
|
||||
},
|
||||
"node_modules/luch-request": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/luch-request/-/luch-request-3.1.1.tgz",
|
||||
"integrity": "sha512-p7+mlcEtgRcd0OfXC4XZbyiwSr1XgCeqNT7LlVUjnk7InYl/8d5Rk7BUqAYNA2WRafI1wRIUQWRWZRpeUwWR0w==",
|
||||
"dependencies": {
|
||||
"@dcloudio/types": "^2.0.16"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/types": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/@dcloudio/types/-/types-2.6.12.tgz",
|
||||
"integrity": "sha512-mrCMwcINy1IFjU9VUqLeWBkj404yWs5paLDttBcA+eqUjanuUQbBcTVPqlrGgkyzLXDcV2oDDZRSNxNpXi4kMQ=="
|
||||
},
|
||||
"crypto-js": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
|
||||
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
||||
},
|
||||
"image-tools": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/image-tools/-/image-tools-1.4.0.tgz",
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
},
|
||||
"homepage": "https://github.com/dcloudio/hello-uniapp#readme",
|
||||
"dependencies": {
|
||||
"crypto-js": "^4.2.0",
|
||||
"image-tools": "^1.4.0",
|
||||
"luch-request": "^3.1.1"
|
||||
},
|
||||
|
|
|
|||
131
pages.json
|
|
@ -5,7 +5,7 @@
|
|||
"pages": [
|
||||
// pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
// {
|
||||
// "path": "pages/YNEduApp/index/index",
|
||||
// "path": "pages/YNEduApp/index/index",
|
||||
// "style": {
|
||||
// "navigationStyle" : "custom"
|
||||
// }
|
||||
|
|
@ -189,7 +189,7 @@
|
|||
{
|
||||
"path": "pages/YNEduApp/user/myMsg",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "消息通知"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -199,42 +199,103 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/HealthExaminationApp/index/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/HealthExaminationApp/appointment/appointment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "体检预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/HealthExaminationApp/report/report",
|
||||
"style": {
|
||||
"navigationBarTitleText": "提交报告"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/HealthExaminationApp/myAppointment/myAppointment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/HealthExaminationApp/jobAppointment/jobAppointment",
|
||||
"style": {
|
||||
"navigationBarTitleText": "职业预约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/YNEduApp/index/notices",
|
||||
"path" : "pages/HealthExaminationApp/index/index",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "公告通知"
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
},
|
||||
////实名制二期-移动端
|
||||
{//首页
|
||||
"path": "pages/realName/index/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//工作台
|
||||
"path": "pages/realName/workbench/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
//人员录入
|
||||
{//人员录入
|
||||
"path": "pages/realName/workbench/personEnter/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//新增人员
|
||||
"path": "pages/realName/workbench/personEnter/addPeople",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//查询人员列表
|
||||
"path": "pages/realName/workbench/personEnter/searchPeople",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//查询人员列表
|
||||
"path": "pages/realName/workbench/personEnter/editPeople",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{//人员库
|
||||
"path": "pages/realName/workbench/peopleLibrary/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
//合同见证
|
||||
{//合同见证-首页
|
||||
"path": "pages/realName/workbench/contractWitness/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
//工资卡见证
|
||||
{//工资卡见证-首页
|
||||
"path": "pages/realName/workbench/wageWitness/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
//电子合同
|
||||
{//电子合同-pdf
|
||||
"path": "pages/realName/workbench/electronicContract/contractVideo",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//电子合同-pdf
|
||||
"path": "pages/realName/workbench/electronicContract/contractPdf",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},{//电子合同-填写
|
||||
"path": "pages/realName/workbench/electronicContract/contractFill",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{//考勤
|
||||
"path": "pages/realName/workAttendance/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{//我的
|
||||
"path": "pages/realName/my/my",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"fontFamily": "Helvetica, Arial, sans-serif",
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@
|
|||
|
||||
<script>
|
||||
import TabbarConfig from '@/totalTabbar.js'
|
||||
import AES from "@/utils/realNameAes.js";
|
||||
import config from '@/config'
|
||||
|
||||
import {
|
||||
|
|
@ -200,7 +201,12 @@
|
|||
username: '13908860263',
|
||||
password: 'YNsbd@123456'
|
||||
}
|
||||
console.log('🚀 ~ gotoYy ~ tjparams:', tjparams)
|
||||
const realParams = {
|
||||
username: AES.encrypt(uni.getStorageSync('userPhone')),
|
||||
password: AES.encrypt('YNsbd@123456'),
|
||||
jwtToken: uni.getStorageSync('App-Token')
|
||||
}
|
||||
console.log('🚀 ~ gotoYy ~ tjparams:', realParams)
|
||||
if (name == '考试培训移动端') {
|
||||
uni.request({
|
||||
url: config.login + '/login',
|
||||
|
|
@ -239,6 +245,42 @@
|
|||
})
|
||||
}
|
||||
})
|
||||
}else if( name == '实名制移动端') {
|
||||
uni.request({
|
||||
url: config.realLoginUrl + 'login',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(realParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
success: res => {
|
||||
console.log('🚀 ~ gotoYy ~ res:', res)
|
||||
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
||||
if (res.data.code == 200) {
|
||||
// uni.setStorageSync('tjToken', res.data.token)
|
||||
uni.setStorageSync('realNameToken', res.data.data.access_token)
|
||||
uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/realName/index/index'
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log('🚀 ~ gotoYy ~ err:', err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
} else if( name == '健康体检移动端') {
|
||||
uni.request({
|
||||
url: config.tjBaseUrl + '/login',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,113 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<web-view :src="url" @message="handlePostMessage" :webview-styles="webviewStyles1"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/* uni页面通信文档
|
||||
* https://ask.dcloud.net.cn/article/35083
|
||||
* 组件使用pdf.js源码修改了部分内容
|
||||
* 只需要完成web-view监听页数并与uni通信即可
|
||||
* @kklxx 2022/12/09修复组件通信
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
export default {
|
||||
props: {
|
||||
path: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewerUrl: '/hybrid/html/web/viewer.html', // 注意:静态的html文件需要放在根路径下的 hybrid/html 文件夹中
|
||||
fileUrl: '', // 要访问的本地pdf的路径
|
||||
url: '', // 最终显示在web-view中的路径
|
||||
currentPage: 1, //初始页
|
||||
totalPage: 0, //总页码
|
||||
currentReadPage: 0, //当前页码
|
||||
webviewStyles1: {
|
||||
progress: false,
|
||||
width:'96%',
|
||||
height:'75%',
|
||||
zIndex:'999',
|
||||
top:'100',
|
||||
left:'10',
|
||||
right:'10',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
// console.log('页面信息:', options)
|
||||
// this.fileUrl = options.url
|
||||
// /* 设置标题 */
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: 'PDF预览'
|
||||
// })
|
||||
// /* 初始页面 */
|
||||
// this.pageInt() //获取pdfs数据
|
||||
},
|
||||
|
||||
mounted() {
|
||||
console.log('mounted-pdfView', this.path)
|
||||
/* H5页面通信方式 */
|
||||
// #ifdef H5
|
||||
window.addEventListener('message', this.ReceiveMessage)
|
||||
// #endif
|
||||
this.fileUrl = this.path
|
||||
/* 设置标题 */
|
||||
uni.setNavigationBarTitle({
|
||||
title: 'PDF预览'
|
||||
})
|
||||
/* 初始页面 */
|
||||
this.pageInt() //获取pdfs数据
|
||||
},
|
||||
|
||||
//页面销毁前
|
||||
beforeDestroy() {
|
||||
uni.removeStorage({
|
||||
//清除pdf留下的缓存,不干扰新的pdf载入
|
||||
key: 'pdfjs.history',
|
||||
success() {
|
||||
// console.log("removeStorage", res)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
//页面初始化
|
||||
pageInt() {
|
||||
this.url = `${this.viewerUrl}?file=${encodeURIComponent(this.fileUrl)}&page=` + this.currentPage
|
||||
},
|
||||
/*
|
||||
* 做成监听滚动条判断更好
|
||||
*
|
||||
*/
|
||||
//uni 组件通信 监听
|
||||
handlePostMessage(data) {
|
||||
let arr = data.detail.data.pop()
|
||||
this.totalPage = arr[0].totalPage //总页数
|
||||
this.currentReadPage = arr[1].page + 1 //当前页数
|
||||
console.log('app:', this.totalPage, this.currentReadPage)
|
||||
},
|
||||
//h5 监听
|
||||
ReceiveMessage(event) {
|
||||
if (event.data && event.data.data && event.data.data.arg) {
|
||||
this.totalPage = event.data.data.arg[0].totalPage
|
||||
this.currentReadPage = event.data.data.arg[1].page + 1
|
||||
}
|
||||
console.log('app:', this.totalPage, this.currentReadPage)
|
||||
},
|
||||
|
||||
//页面销毁前动作
|
||||
addBrowseRecord() {
|
||||
// console.log("总页数:",this.totalPage);
|
||||
// console.log("当前页数:",this.currentReadPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
@ -26,6 +26,7 @@ import TabbarConfig from '../util/tabbar.js'
|
|||
// import face from '../../../uni_modules/mcc-face/index'
|
||||
import { getStudentStudyWorkList } from '@/api/eduApp'
|
||||
import config from '@/config'
|
||||
import AES from "@/utils/realNameAes.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -51,9 +52,47 @@ export default {
|
|||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
this.getLogin()
|
||||
// this.getMsgList()
|
||||
},
|
||||
methods: {
|
||||
getLogin(){
|
||||
const realParams = {
|
||||
username: AES.encrypt(uni.getStorageSync('userPhone')),
|
||||
password: AES.encrypt('YNsbd@123456'),
|
||||
jwtToken: uni.getStorageSync('App-Token')
|
||||
}
|
||||
uni.request({
|
||||
url: config.realLoginUrl + 'login',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(realParams),
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
success: res => {
|
||||
console.log('🚀 ~ gotoYy ~ res:', res)
|
||||
// console.log('🚀 ~ gotoYy ~ res:', res.data.token)
|
||||
if (res.data.code == 200) {
|
||||
// uni.setStorageSync('tjToken', res.data.token)
|
||||
uni.setStorageSync('realNameToken', res.data.data.access_token)
|
||||
uni.setStorageSync('realNameUser', res.data.data.loginUser.sysUser)
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log('🚀 ~ gotoYy ~ err:', err)
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取消息列表
|
||||
async getMsgList() {
|
||||
uni.request({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
export function chooseFile(callback, acceptType) {
|
||||
|
||||
var CODE_REQUEST = 1000;
|
||||
var main = plus.android.runtimeMainActivity();
|
||||
if (plus.os.name == 'Android') {
|
||||
console.log("666");
|
||||
var Intent = plus.android.importClass('android.content.Intent');
|
||||
var intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
if (acceptType) {
|
||||
intent.setType(acceptType);
|
||||
} else {
|
||||
intent.setType("*/*");
|
||||
}
|
||||
main.onActivityResult = (requestCode, resultCode, data) => {
|
||||
if (requestCode == CODE_REQUEST) {
|
||||
const uri = data.getData();
|
||||
plus.android.importClass(uri);
|
||||
const Build = plus.android.importClass('android.os.Build');
|
||||
const isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
|
||||
const DocumentsContract = plus.android.importClass('android.provider.DocumentsContract');
|
||||
if (isKitKat && DocumentsContract.isDocumentUri(main, uri)) {
|
||||
if ("com.android.externalstorage.documents" == uri.getAuthority()) {
|
||||
console.log("6666");
|
||||
var docId = DocumentsContract.getDocumentId(uri);
|
||||
var split = docId.split(":");
|
||||
var type = split[0];
|
||||
|
||||
if ("primary" == type) {
|
||||
var Environment = plus.android.importClass('android.os.Environment');
|
||||
callback(Environment.getExternalStorageDirectory() + "/" + split[1]);
|
||||
} else {
|
||||
var System = plus.android.importClass('java.lang.System');
|
||||
var sdPath = System.getenv("SECONDARY_STORAGE");
|
||||
if (sdPath) {
|
||||
callback(sdPath + "/" + split[1]);
|
||||
}
|
||||
}
|
||||
} else if ("com.android.providers.downloads.documents" == uri.getAuthority()) {
|
||||
var id = DocumentsContract.getDocumentId(uri);
|
||||
var ContentUris = plus.android.importClass('android.content.ContentUris');
|
||||
var contentUri = ContentUris.withAppendedId(
|
||||
// Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
|
||||
Uri.parse("content://downloads/public_downloads"), id);
|
||||
callback(getDataColumn(main, contentUri, null, null));
|
||||
} else if ("com.android.providers.media.documents" == uri.getAuthority()) {
|
||||
var docId = DocumentsContract.getDocumentId(uri);
|
||||
var split = docId.split(":");
|
||||
console.log(split);
|
||||
var type = split[0];
|
||||
console.log(type);
|
||||
var MediaStore = plus.android.importClass('android.provider.MediaStore');
|
||||
if ("image" == type) {
|
||||
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
|
||||
} else if ("video" == type) {
|
||||
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
|
||||
} else if ("audio" == type) {
|
||||
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
|
||||
} else {
|
||||
contentUri = MediaStore.Files.getContentUri("external");
|
||||
}
|
||||
|
||||
console.log(contentUri);
|
||||
var selection = "_id=?";
|
||||
var selectionArgs = new Array();
|
||||
selectionArgs[0] = split[1];
|
||||
|
||||
callback(getDataColumn(main, contentUri, selection, selectionArgs));
|
||||
}
|
||||
} else if ("content" == uri.getScheme()) {
|
||||
callback(getDataColumn(main, uri, null, null));
|
||||
} else if ("file" == uri.getScheme()) {
|
||||
callback(uri.getPath());
|
||||
}
|
||||
}
|
||||
}
|
||||
main.startActivityForResult(intent, CODE_REQUEST);
|
||||
}
|
||||
}
|
||||
|
||||
function getDataColumn(main, uri, selection, selectionArgs) {
|
||||
plus.android.importClass(main.getContentResolver());
|
||||
let cursor = main.getContentResolver().query(uri, ['_data'], selection, selectionArgs,
|
||||
null);
|
||||
plus.android.importClass(cursor);
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
var column_index = cursor.getColumnIndexOrThrow('_data');
|
||||
var result = cursor.getString(column_index)
|
||||
cursor.close();
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
export default chooseFile
|
||||
|
|
@ -0,0 +1,529 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="合同见证" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<scroll-view class="content" scroll-y="true">
|
||||
<view class="img-view">
|
||||
<view class="view-item">
|
||||
<view>工程名称</view>
|
||||
<view style="margin-left: 40rpx;">xxx工程</view>
|
||||
</view>
|
||||
<view class="view-item" style="display: block;">
|
||||
<view>合同见证</view>
|
||||
<view class="img-box">
|
||||
<view class="img-item upload-btn" @click="open()">
|
||||
<image class="img" src="@/static/realName/tianjia-img.png" mode=""></image>
|
||||
</view>
|
||||
<view class="img-item" v-if="imgUrl!=''">
|
||||
<image class="img" :src="imgUrl" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-item">
|
||||
<view>人脸识别</view>
|
||||
<view style="margin-left: 40rpx;" class="btn">点击人脸识别</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="img-view" style="margin-bottom: 40rpx;">
|
||||
<u--form class="addForm" :model="entryContractBean" ref="cForm">
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同编号</text>
|
||||
</view>
|
||||
<u-form-item prop='contractCode' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryContractBean.contractCode" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;height: auto;">
|
||||
<view style="width:25%;height: 100%;margin: 20rpx;">
|
||||
<text>合同期限类型</text>
|
||||
</view>
|
||||
<u-form-item prop='laborContractType' style="width:96%;height: 100%;margin: 0 auto;" >
|
||||
<u-radio-group v-model="entryContractBean.laborContractType" placement="row" style="border: 1rpx solid #ccc;padding:20rpx 10rpx;border-radius: 10rpx;">
|
||||
<u-radio label="以完成一定工作为期限的合同" name="以完成一定工作为期限的合同" style="margin-right: 20rpx;transform:scale(0.8);"></u-radio>
|
||||
<u-radio label="固定期限合同" name="固定期限合同" style="transform:scale(0.8);"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>人员角色</text>
|
||||
</view>
|
||||
<u-form-item prop='role' style="width:70%;height: 100%;" >
|
||||
<uni-data-select v-model="entryContractBean.role" :localdata="roleList"></uni-data-select>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同签订日期</text>
|
||||
</view>
|
||||
<u-form-item prop='contractValidDate' style="width:70%;height: 100%;" >
|
||||
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="entryContractBean.contractValidDate"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同终止日期</text>
|
||||
</view>
|
||||
<u-form-item prop='contractInvalidDate' style="width:70%;height: 100%;" >
|
||||
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="entryContractBean.contractInvalidDate"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同类型</text>
|
||||
</view>
|
||||
<u-form-item prop='contractType' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryContractBean.contractType" type="text" readonly border="surround"></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工资核定方式</text>
|
||||
</view>
|
||||
<u-form-item prop='wageApprovedWay' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryContractBean.wageApprovedWay" type="text" readonly border="surround"></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工资核定标准</text>
|
||||
</view>
|
||||
<u-form-item prop='wageCriterion' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryContractBean.wageCriterion" type="number" placeholder="请输入" maxlength="3" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>是否参加城乡居民医疗保险</text>
|
||||
</view>
|
||||
<u-form-item prop='isYiLiao' style="width:70%;height: 100%;" >
|
||||
<u-radio-group v-model="entryContractBean.isYiLiao" placement="row" style="border: 1rpx solid #ccc;padding: 16rpx;border-radius: 10rpx;">
|
||||
<u-radio label="否" name="否" style="margin-right: 40rpx;"></u-radio>
|
||||
<u-radio label="是" name="是"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>是否参加城乡居民养老保险</text>
|
||||
</view>
|
||||
<u-form-item prop='isYangLao' style="width:70%;height: 100%;" >
|
||||
<u-radio-group v-model="entryContractBean.isYangLao" placement="row" style="border: 1rpx solid #ccc;padding: 16rpx;border-radius: 10rpx;">
|
||||
<u-radio label="否" name="否" style="margin-right: 40rpx;"></u-radio>
|
||||
<u-radio label="是" name="是"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>是否在职</text>
|
||||
</view>
|
||||
<u-form-item prop='whetherOnJob' style="width:70%;height: 100%;" >
|
||||
<u-radio-group v-model="entryContractBean.whetherOnJob" placement="row" style="border: 1rpx solid #ccc;padding: 16rpx;border-radius: 10rpx;">
|
||||
<u-radio label="否" name="否" style="margin-right: 40rpx;"></u-radio>
|
||||
<u-radio label="是" name="是"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="sumbit-btn" @click="sumbit">确 定</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
<!-- 新增人员表单 -->
|
||||
<u-popup :show="showPopup" mode="center" @close="close" >
|
||||
<view style="width:600rpx;height: 100%;position: relative;background-color: #fff;">
|
||||
<view class="popup-header">
|
||||
<view style="width: 10%;height: 80rpx;"></view>
|
||||
<view style="width: 80%;height: 80rpx;line-height: 80rpx;text-align: center;font-weight: bold;">请选择类型</view>
|
||||
<u-icon style="width: 10%;" name="close" color="#000" size="24" @click="close"></u-icon>
|
||||
</view>
|
||||
<view class="popup-content">
|
||||
<view class="btn2" @click="openPhotograph">拍照</view>
|
||||
<view class="btn2" @click="chooseFile">PDF</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pathToBase64, base64ToPath } from 'image-tools';
|
||||
import chooseFile from '../../util/chooseFile.js';
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showPopup:false,
|
||||
imgUrl:'',
|
||||
entryContractBean:{
|
||||
"id":'',
|
||||
"idNumber":uni.getStorageSync('realNameUser').idNumber,
|
||||
"proId":uni.getStorageSync('realNameUser').proId,//工程id
|
||||
"uploadDate": "",//日期
|
||||
"uploadTime": "",//时间
|
||||
"uploadId": uni.getStorageSync('realNameUser').userId,//上传人id
|
||||
"witnessType": "1",
|
||||
"isActive": "1",
|
||||
"witnessPath": "",//图片地址
|
||||
"contractCode": "",//合同编号
|
||||
// "contractPath": "",//合同见证照片
|
||||
"role": "",//人员角色
|
||||
"laborContractType": "固定期限合同",//合同期限类型
|
||||
"contractValidDate": "",//合同签订日期
|
||||
"contractInvalidDate": "",//合同终止日期
|
||||
"contractType": "纸质合同",//合同类型
|
||||
"wageApprovedWay": "天",//工资核定方式
|
||||
"wageCriterion": "",//工资核定标准
|
||||
"isYiLiao": "是",//是否参加城乡居民医疗保险
|
||||
"isYangLao": "是",//是否参加城乡居民养老保险
|
||||
"whetherOnJob": "是"//是否在职
|
||||
},
|
||||
roleList:[
|
||||
{value:'管理人员',text:'管理人员'},
|
||||
{value:'务工人员',text:'务工人员'},
|
||||
{value:'劳资专管员',text:'劳资专管员'}
|
||||
],
|
||||
// imgs: [],
|
||||
// imgsId: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
open(){this.showPopup=true;},
|
||||
close(){this.showPopup=false;},
|
||||
// 拍照录入
|
||||
openPhotograph() {
|
||||
this.showPopup = false
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera'],
|
||||
success: res => {
|
||||
console.log('🚀 ~ res-拍照:', res)
|
||||
|
||||
uni.uploadFile({
|
||||
url: `http://192.168.0.14:1909/file/file/upload`, //服务器地址
|
||||
fileType:"image",//ZFB必填,不然报错
|
||||
filePath: res.tempFilePaths[0],//这个就是我们上面拍照返回或者先中照片返回的数组
|
||||
name: "imgFile",
|
||||
formData: {
|
||||
photoType:'Contract',
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
console.log(uploadFileRes)
|
||||
if(uploadFileRes.statusCode==200){
|
||||
this.entryContractBean.witnessPath=JSON.parse(uploadFileRes.data).data.url;
|
||||
}else{
|
||||
uni.$u.toast('上传失败');
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.$u.toast('上传失败');
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
|
||||
this.imgUrl=base64
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('🚀 ~ err:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
imgToBase64(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
pathToBase64(data)
|
||||
.then(base64 => {
|
||||
resolve(base64)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseFile(){
|
||||
this.showPopup = false
|
||||
chooseFile((path)=>{
|
||||
console.log('111111111',path);
|
||||
uni.uploadFile({
|
||||
url: `http://192.168.0.14:1909/file/file/upload`, //服务器地址
|
||||
// fileType:"pdf",//ZFB必填,不然报错
|
||||
filePath: path,//这个就是我们上面拍照返回或者先中照片返回的数组
|
||||
name: "file",
|
||||
formData: {
|
||||
photoType:'Contract',
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
if(uploadFileRes.statusCode==200){
|
||||
this.entryContractBean.witnessPath=JSON.parse(uploadFileRes.data).data.url;
|
||||
}else{
|
||||
uni.$u.toast('上传失败');
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
sumbit(){
|
||||
this.entryContractBean.id=this.uuid()
|
||||
console.log(this.entryContractBean.id)
|
||||
if(this.entryContractBean.witnessPath==''){
|
||||
uni.$u.toast('合同见证未上传!');
|
||||
}else if(this.entryContractBean.contractCode==''){
|
||||
uni.$u.toast('请填写合同编号');
|
||||
}else if(this.entryContractBean.role==''){
|
||||
uni.$u.toast('请选择人员角色');
|
||||
}else if(this.entryContractBean.contractValidDate==''){
|
||||
uni.$u.toast('请选择合同签订日期');
|
||||
}else if(this.entryContractBean.contractInvalidDate==''){
|
||||
uni.$u.toast('请选择合同终止日期');
|
||||
}else if(this.entryContractBean.wageCriterion==''){
|
||||
uni.$u.toast('请填写工资核定标准');
|
||||
}else if(Number(this.entryContractBean.wageCriterion)>600){
|
||||
uni.$u.toast('工资核定标准为60~600');
|
||||
}else if(Number(this.entryContractBean.wageCriterion)<60){
|
||||
uni.$u.toast('工资核定标准为60~600');
|
||||
}else{
|
||||
this.entryContractBean.uploadDate = this.timeFormat(null,'yyyy-mm-dd');
|
||||
this.entryContractBean.uploadTime = this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
|
||||
console.log(this.entryContractBean)
|
||||
uni.request({
|
||||
url: config.realAppUrl+'/contractWitness/uploadContract',
|
||||
method: 'post',
|
||||
data: this.entryContractBean,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回到已存在的页面
|
||||
});
|
||||
},1000)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
},
|
||||
timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
|
||||
let date
|
||||
// 若传入时间为假值,则取当前时间
|
||||
if (!dateTime) {
|
||||
date = new Date()
|
||||
}
|
||||
// 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
|
||||
else if (/^\d{10}$/.test(dateTime?.toString().trim())) {
|
||||
date = new Date(dateTime * 1000)
|
||||
}
|
||||
// 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
|
||||
else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime))
|
||||
}
|
||||
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
|
||||
// 处理 '2022-07-10 01:02:03',跳过 '2022-07-10T01:02:03'
|
||||
else if (typeof dateTime === 'string' && dateTime.includes('-') && !dateTime.includes('T')) {
|
||||
date = new Date(dateTime.replace(/-/g, '/'))
|
||||
}
|
||||
// 其他都认为符合 RFC 2822 规范
|
||||
else {
|
||||
date = new Date(dateTime)
|
||||
}
|
||||
|
||||
const timeSource = {
|
||||
'y': date.getFullYear().toString(), // 年
|
||||
'm': (date.getMonth() + 1).toString().padStart(2, '0'), // 月
|
||||
'd': date.getDate().toString().padStart(2, '0'), // 日
|
||||
'h': date.getHours().toString().padStart(2, '0'), // 时
|
||||
'M': date.getMinutes().toString().padStart(2, '0'), // 分
|
||||
's': date.getSeconds().toString().padStart(2, '0') // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
}
|
||||
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || []
|
||||
if (ret) {
|
||||
// 年可能只需展示两位
|
||||
const beginIndex = key === 'y' && ret.length === 2 ? 2 : 0
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex))
|
||||
}
|
||||
}
|
||||
return formatStr
|
||||
},
|
||||
uuid() {
|
||||
var s = [];
|
||||
var hexDigits = "0123456789abcdef";
|
||||
for (var i = 0; i < 32; i++) {
|
||||
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
|
||||
}
|
||||
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
|
||||
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
|
||||
s[8] = s[13] = s[18] = s[23];
|
||||
var uuid = s.join("");
|
||||
return uuid;
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
font: 24rpx;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: 90vh;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 80rpx;
|
||||
}
|
||||
.img-view{
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn{
|
||||
background-color:#00337A;
|
||||
color: #FFF;
|
||||
padding:10rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.view-item{
|
||||
width: 94%;
|
||||
margin: 0rpx auto;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.img-box{
|
||||
width: 94%;
|
||||
height: auto;
|
||||
margin: 0rpx auto;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
.img-item {
|
||||
float: left;
|
||||
width: 200upx;
|
||||
height: 200upx;
|
||||
border: 1px solid #ddd;
|
||||
margin: 0 22rpx 20upx 0upx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #eee;
|
||||
.img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.remove-btn {
|
||||
position: absolute;
|
||||
top: -18upx;
|
||||
right: -18upx;
|
||||
width: 44upx;
|
||||
height: 44upx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.upload-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img {
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
margin: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn2{
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.popup-header{
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
.popup-content{
|
||||
width: 100%;
|
||||
height: 15vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
.addForm{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 26rpx;
|
||||
.form-input-box{
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
.sumbit-btn{
|
||||
width: 94%;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 100rpx;
|
||||
display: flex;align-items: center;justify-content: center;
|
||||
background: #00337A;
|
||||
color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,388 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="电子合同" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<scroll-view class="content" scroll-y="true">
|
||||
<view class="face-btn">点击人脸识别</view>
|
||||
<view class="form-box">
|
||||
<u--form class="addForm" :model="contractForm" ref="cForm">
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>甲方</text>
|
||||
</view>
|
||||
<u-form-item prop='partA' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partA" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>法人代表</text>
|
||||
</view>
|
||||
<u-form-item prop='legalPerson' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.legalPerson" type="text" placeholder="请输入" maxlength="20" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>联系电话</text>
|
||||
</view>
|
||||
<u-form-item prop='partAPhone' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partAPhone" type="number" placeholder="请输入" maxlength="11" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>地址</text>
|
||||
</view>
|
||||
<u-form-item prop='partAAdress' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partAAdress" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>乙方</text>
|
||||
</view>
|
||||
<u-form-item prop='partB' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partB" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>性别</text>
|
||||
</view>
|
||||
<u-form-item prop='sex' style="width:70%;height: 100%;" >
|
||||
<u-radio-group v-model="contractForm.sex" placement="row" style="border: 1rpx solid #ccc;padding:20rpx;border-radius: 10rpx;">
|
||||
<u-radio label="男" name="男" style="margin-right: 40rpx;"></u-radio>
|
||||
<u-radio label="女" name="女" ></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>联系方式</text>
|
||||
</view>
|
||||
<u-form-item prop='partBPhone' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partBPhone" type="number" placeholder="请输入" maxlength="11" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>家庭地址</text>
|
||||
</view>
|
||||
<u-form-item prop='partBAdress' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.partBAdress" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工种</text>
|
||||
</view>
|
||||
<u-form-item prop='workTypeId' style="width:70%;height: 100%;" >
|
||||
<uni-data-select v-model="contractForm.workTypeId" :localdata="postList" @change="changePost"></uni-data-select>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工作任务</text>
|
||||
</view>
|
||||
<u-form-item prop='workTask' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.workTask" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工作地点</text>
|
||||
</view>
|
||||
<u-form-item prop='workAdress' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.workAdress" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工资核定方式</text>
|
||||
</view>
|
||||
<u-form-item prop='verMethod' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.verMethod" type="text" readonly border="surround"></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>工资核定标准</text>
|
||||
</view>
|
||||
<u-form-item prop='verStand' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.verStand" type="number" placeholder="请输入" maxlength="3" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>生效日期</text>
|
||||
</view>
|
||||
<u-form-item prop='effectDate' style="width:70%;height: 100%;" >
|
||||
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="contractForm.effectDate"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>其他补充事项</text>
|
||||
</view>
|
||||
<u-form-item prop='otherSupply' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.otherSupply" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>人员角色</text>
|
||||
</view>
|
||||
<u-form-item prop='role' style="width:70%;height: 100%;" >
|
||||
<uni-data-select v-model="contractForm.role" :localdata="roleList"></uni-data-select>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>乙方签名</text>
|
||||
</view>
|
||||
<u-form-item prop='' style="width:70%;height: 100%;" >
|
||||
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>班组长签名</text>
|
||||
</view>
|
||||
<u-form-item prop='' style="width:70%;height: 100%;" >
|
||||
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>验证码</text>
|
||||
</view>
|
||||
<u-form-item prop='' style="width:70%;height: 100%;" >
|
||||
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- <view style="width: 100%;height: auto;">
|
||||
<view style="width:25%;height: 100%;margin: 20rpx;">
|
||||
<text>合同期限类型</text>
|
||||
</view>
|
||||
<u-form-item prop='laborContractType' style="width:96%;height: 100%;margin: 0 auto;" >
|
||||
<u-radio-group v-model="contractForm.laborContractType" placement="row" style="border: 1rpx solid #ccc;padding:20rpx 10rpx;border-radius: 10rpx;">
|
||||
<u-radio label="以完成一定工作为期限的合同" name="以完成一定工作为期限的合同" style="margin-right: 20rpx;transform:scale(0.8);"></u-radio>
|
||||
<u-radio label="固定期限合同" name="固定期限合同" style="transform:scale(0.8);"></u-radio>
|
||||
</u-radio-group>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同终止日期</text>
|
||||
</view>
|
||||
<u-form-item prop='contractInvalidDate' style="width:70%;height: 100%;" >
|
||||
<uni-datetime-picker type="date" :clear-icon="false" format="yyyy-MM-dd" v-model="contractForm.contractInvalidDate"/>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>合同类型</text>
|
||||
</view>
|
||||
<u-form-item prop='contractType' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="contractForm.contractType" type="text" readonly border="surround"></u--input>
|
||||
</u-form-item>
|
||||
</view> -->
|
||||
|
||||
|
||||
</u--form>
|
||||
</view>
|
||||
<view class="bottom-box">
|
||||
<view class="btn1">返回</view>
|
||||
<view class="btn2">预览合同</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PdfView from '../../components/PdfView.vue';
|
||||
import config from '@/config';
|
||||
export default {
|
||||
components: { PdfView },
|
||||
data() {
|
||||
return {
|
||||
postList:[],
|
||||
roleList:[
|
||||
{value:'管理人员',text:'管理人员'},
|
||||
{value:'务工人员',text:'务工人员'},
|
||||
{value:'劳资专管员',text:'劳资专管员'}
|
||||
],
|
||||
contractForm:{
|
||||
"partA": "",//甲方
|
||||
"legalPerson": "",//法人代表
|
||||
"partAPhone": "",//甲方电话
|
||||
"partAAdress": "",//甲方地址
|
||||
"partB": "",//乙方
|
||||
"sex":"男",//性别
|
||||
"partBPhone": "",//乙方电话
|
||||
"partBAdress": "",//乙方地址
|
||||
"workTypeId":"",//工种id
|
||||
"workType":"",//工种
|
||||
"workTask":"",//工作任务
|
||||
"workAdress":"",//工作地点
|
||||
"verMethod": "天",//工资核定方式
|
||||
"verStand": "",//工资核定标准
|
||||
"effectDate": "",//生效日期
|
||||
"otherSupply": "",//其他补充事项
|
||||
"role": "",//人员角色
|
||||
"partBSign": "",//乙方签名
|
||||
"teamSign": "",//班组长签名
|
||||
|
||||
|
||||
"id":'',
|
||||
"idNumber":uni.getStorageSync('realNameUser').idNumber,
|
||||
"proId":uni.getStorageSync('realNameUser').proId,//工程id
|
||||
"uploadDate": "",//日期
|
||||
"uploadTime": "",//时间
|
||||
"uploadId": uni.getStorageSync('realNameUser').userId,//上传人id
|
||||
"witnessType": "1",
|
||||
"isActive": "1",
|
||||
"witnessPath": "",//图片地址
|
||||
// "contractPath": "",//合同见证照片
|
||||
|
||||
"laborContractType": "固定期限合同",//合同期限类型
|
||||
|
||||
"contractInvalidDate": "",//合同终止日期
|
||||
"contractType": "纸质合同",//合同类型
|
||||
"isYiLiao": "是",//是否参加城乡居民医疗保险
|
||||
"isYangLao": "是",//是否参加城乡居民养老保险
|
||||
"whetherOnJob": "是"//是否在职
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
this.getpostList()
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
//获取工种
|
||||
getpostList(){
|
||||
uni.request({
|
||||
url: config.realAppUrl + '/offLine/getWorkType',
|
||||
method: 'post',
|
||||
data: {},
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
res.data.forEach(item=>{
|
||||
if(item.code=='postType'){
|
||||
let obj={value:item.id,text:item.type}
|
||||
this.postList.push(obj)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
changePost(e){
|
||||
this.postList.forEach(item=>{
|
||||
console.log(item)
|
||||
if(item.value==e){
|
||||
this.contractForm.workType=item.text;
|
||||
}
|
||||
})
|
||||
console.log(this.contractForm.workType)
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #FFF;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: 92vh;
|
||||
// margin-top: 20rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
.face-btn{
|
||||
width: 92%;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.form-box{
|
||||
width: 94%;
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
margin-top: 20rpx;
|
||||
.addForm{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 26rpx;
|
||||
.form-input-box{
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom-box{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.btn1{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn2{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="电子合同" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view class="file-box">
|
||||
<PdfView :path="webUrl1" style="width: 100%;height: 80%;"/>
|
||||
</view>
|
||||
|
||||
<view class="bottom-box">
|
||||
<view class="btn1" @click="leftClick">返回</view>
|
||||
<view class="btn2" @click="fillContract">填写合同</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PdfView from '../../components/PdfView.vue'
|
||||
export default {
|
||||
components: { PdfView },
|
||||
data() {
|
||||
return {
|
||||
webUrl1:`http://192.168.0.14:1909/file/ynRealName/contract/pdf/contract.pdf`,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
fillContract(){
|
||||
console.log(1111111)
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/electronicContract/contractFill`
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.file-box{
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
// overflow-y: auto;
|
||||
|
||||
}
|
||||
.bottom-box{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
z-index: 999999;
|
||||
.btn1{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn2{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="电子合同" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view class="file-box">
|
||||
|
||||
</view>
|
||||
|
||||
<view class="bottom-box">
|
||||
<view class="btn1" @click="chooseVideo()">重新录制</view>
|
||||
<view class="btn2" @click="contractPdf">下一步</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
chooseVideo(){
|
||||
uni.chooseVideo({
|
||||
count: 1,
|
||||
sourceType: ['camera'],
|
||||
maxDuration: 60, // 最大视频录制时长(秒)
|
||||
success: function (res) {
|
||||
console.log('选择视频成功,返回的参数:', res);
|
||||
// 可以使用 res.tempFilePath 获取视频的本地路径
|
||||
},
|
||||
fail: function (err) {
|
||||
console.error('选择视频失败:', err);
|
||||
}
|
||||
});
|
||||
},
|
||||
contractPdf(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/electronicContract/contractPdf`
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.file-box{
|
||||
width: 100%;
|
||||
height: 60vh;
|
||||
// overflow-y: auto;
|
||||
}
|
||||
.bottom-box{
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.btn1{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn2{
|
||||
width: 40%;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;justify-content: center;
|
||||
color: #FFF;
|
||||
background: #00337A;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -4,10 +4,33 @@
|
|||
<view style="width: 100%;height: 84vh;">
|
||||
<scroll-view scroll-y="true">
|
||||
<view class="view-box">
|
||||
<view class="view-item" @click="goContractWitness">
|
||||
<view><image class="img1" src="@/static/realName/contract_witness.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">合同见证</view>
|
||||
</view>
|
||||
<view class="view-item" @click="goPersonEnter">
|
||||
<view><image class="img1" src="@/static/realName/base_person.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">人员信息录入</view>
|
||||
</view>
|
||||
<view class="view-item" @click="goPeopleLibrary">
|
||||
<view><image class="img1" src="@/static/realName/base_person.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">人员库</view>
|
||||
</view>
|
||||
<view class="view-item" @click="goeleContract">
|
||||
<view><image class="img1" src="@/static/realName/contract_sign.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">电子合同</view>
|
||||
</view>
|
||||
<view class="view-item" @click="goWageWitness">
|
||||
<view><image class="img1" src="@/static/realName/wage_witness.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">工资卡见证</view>
|
||||
</view>
|
||||
<view class="view-item" @click="goWageWitness">
|
||||
<view><image class="img1" src="@/static/realName/wage_witness.png" style="width: 60rpx;height: 60rpx;" alt=""></view>
|
||||
<view style="font-size: 24rpx;">工资卡见证</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
|
@ -43,10 +66,30 @@
|
|||
},
|
||||
methods: {
|
||||
goPersonEnter(){
|
||||
uni.navigateTo({
|
||||
uni.navigateTo({//人员录入
|
||||
url: `/pages/realName/workbench/personEnter/index`
|
||||
})
|
||||
}
|
||||
},
|
||||
goPeopleLibrary(){//人员库
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/peopleLibrary/index`
|
||||
})
|
||||
},
|
||||
goeleContract(){//电子合同
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/electronicContract/contractVideo`
|
||||
})
|
||||
},
|
||||
goContractWitness(){//合同见证
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/contractWitness/index`
|
||||
})
|
||||
},
|
||||
goWageWitness(){//工资卡见证
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/wageWitness/index`
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
@ -55,11 +98,12 @@
|
|||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: linear-gradient(#eaf0f7, #f8f8f8);
|
||||
|
||||
// box-sizing: border-box;
|
||||
// padding: 15vh 8vw;
|
||||
.view-box{
|
||||
width: 100%;height: 84vh;display: flex;flex-wrap: wrap;
|
||||
width: 100%;height: auto;display: flex;flex-wrap: wrap;flex-direction: row;
|
||||
margin-bottom: 100rpx;
|
||||
}
|
||||
.view-item{
|
||||
width: 33%;height: 200rpx;display: flex;flex-direction:column;align-items: center;justify-content: center;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="人员库" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view style="width: 94%;height: 80rpx;margin: 20rpx auto;">
|
||||
<u-search shape="square" placeholder="搜索" v-model="keyword" :showAction="true" actionText="搜索" :animation="false" @custom="searchList"></u-search>
|
||||
</view>
|
||||
<!-- <view style="padding-left: 40rpx;">
|
||||
<text style="font-size: 24rpx;color: #5193FE;">已查询{{number}}条数据</text>
|
||||
</view> -->
|
||||
<!-- 列表 -->
|
||||
<view class="list-box">
|
||||
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
|
||||
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
|
||||
</view>
|
||||
<u-list height="76vh" v-if="!isLoading">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item" @click="goEdit(item)">
|
||||
<view class="content-box">
|
||||
<view class="item-text" >
|
||||
<text class="label" style="font-weight: bold;">姓名:</text>
|
||||
<text class="info">{{item.name}}</text>
|
||||
<text class="info-right" style="color: green;" v-if="item.lightStatus==2">绿灯</text>
|
||||
<text class="info-right" style="color: yellow;" v-if="item.lightStatus==1">黄灯</text>
|
||||
<text class="info-right" style="color: red;" v-if="item.lightStatus==0">红灯</text>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text class="label" style="font-weight: bold;">身份证:</text>
|
||||
<text class="info">{{item.idNumber}}</text>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text class="label"style="font-weight: bold;">用工类型:</text>
|
||||
<text class="info" v-if="item.workerType==0">临时用工</text>
|
||||
<text class="info" v-if="item.workerType==1">固定用工</text>
|
||||
<text class="info" v-if="item.workerType==2">分包管理</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
listData:[],
|
||||
number:0,
|
||||
isLoading:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
//搜索
|
||||
searchList(value){
|
||||
this.loadList()
|
||||
},
|
||||
loadList(){
|
||||
let param={
|
||||
name:this.keyword
|
||||
}
|
||||
this.isLoading=true
|
||||
uni.request({
|
||||
url: config.realAppUrl+'/BasePerson/downloadWorkPersonQualifications',
|
||||
method: 'post',
|
||||
data: param,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
this.listData=res.data;
|
||||
this.number=res.data.length
|
||||
this.$forceUpdate()
|
||||
this.isLoading=false
|
||||
// console.log(this.listData)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.isLoading=false
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
this.isLoading=false
|
||||
}
|
||||
})
|
||||
},
|
||||
goEdit(item){
|
||||
console.log(item)
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/editPeople?idNumber=${item.idNumber}&workerType=${item.workerType}`
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
// padding: 0 20px;
|
||||
.list-box{
|
||||
width: 90%;
|
||||
height: auto;
|
||||
// border: 1px solid #000;
|
||||
margin: 0rpx auto;
|
||||
|
||||
.list-item{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.content-box{
|
||||
width: 94%;
|
||||
height: auto;
|
||||
margin: 20rpx;
|
||||
// background-color: #F8F9FC;
|
||||
padding: 10rpx 0;
|
||||
|
||||
.item-text{
|
||||
width: 95%;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 15rpx;
|
||||
// display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.label{
|
||||
color: #3A3A3A;
|
||||
font-weight: 500;
|
||||
}
|
||||
.info-right{
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 40rpx;
|
||||
}
|
||||
.info{
|
||||
color: #6F6F6F;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="人员信息录入" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view class="btn" @click="addPerson">新增人员信息</view>
|
||||
<view class="btn">修改人员信息</view>
|
||||
<view class="btn" @click="searchPerson">修改人员信息</view>
|
||||
<view class="btn">人员识别查找</view>
|
||||
|
||||
<!-- 新增人员表单 -->
|
||||
|
|
@ -15,8 +15,8 @@
|
|||
</view>
|
||||
<view class="add-form">
|
||||
<view class="btn2" @click="tempPeople">临时人员</view>
|
||||
<view class="btn2">固定人员</view>
|
||||
<view class="btn2">分包管理人员</view>
|
||||
<view class="btn2" @click="fixedPeople">固定人员</view>
|
||||
<view class="btn2" @click="subPeople">分包管理人员</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
|
@ -48,14 +48,32 @@ export default {
|
|||
closeAdd() {
|
||||
this.addPopup = false
|
||||
},
|
||||
//临时
|
||||
tempPeople(){
|
||||
this.addPopup = false;
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/tempPeople`
|
||||
url: `/pages/realName/workbench/personEnter/addPeople?workerType=0`
|
||||
})
|
||||
},
|
||||
//固定
|
||||
fixedPeople(){
|
||||
this.addPopup = false;
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/addPeople?workerType=1`
|
||||
})
|
||||
},
|
||||
//分包管理
|
||||
subPeople(){
|
||||
this.addPopup = false;
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/addPeople?workerType=2`
|
||||
})
|
||||
},
|
||||
searchPerson(){
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/searchPeople`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
// 返回
|
||||
|
|
|
|||
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="修改人员信息" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view style="width: 94%;height: 80rpx;margin: 20rpx auto;">
|
||||
<u-search shape="square" placeholder="搜索" v-model="keyword" :showAction="true" actionText="搜索" :animation="false" @custom="searchList"></u-search>
|
||||
</view>
|
||||
<view style="padding-left: 40rpx;">
|
||||
<text style="font-size: 24rpx;color: #5193FE;">已查询{{number}}条数据</text>
|
||||
</view>
|
||||
<!-- 列表 -->
|
||||
<view class="list-box">
|
||||
<view style="width: 100%;height: 70vh;display: flex;align-items: center;justify-content: center;" v-if="isLoading">
|
||||
<u-loading-icon :show="true" mode="circle" text="加载中" :vertical="true"></u-loading-icon>
|
||||
</view>
|
||||
<u-list height="76vh" v-if="!isLoading">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item" @click="goEdit(item)">
|
||||
<view class="content-box">
|
||||
<view class="item-text" >
|
||||
<text class="label" style="font-weight: bold;">姓名:</text>
|
||||
<text class="info">{{item.name}}</text>
|
||||
<text class="info-right" style="color: green;" v-if="item.lightStatus==2">绿灯</text>
|
||||
<text class="info-right" style="color: yellow;" v-if="item.lightStatus==1">黄灯</text>
|
||||
<text class="info-right" style="color: red;" v-if="item.lightStatus==0">红灯</text>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text class="label" style="font-weight: bold;">身份证:</text>
|
||||
<text class="info">{{item.idNumber}}</text>
|
||||
</view>
|
||||
<view class="item-text">
|
||||
<text class="label"style="font-weight: bold;">用工类型:</text>
|
||||
<text class="info" v-if="item.workerType==0">临时用工</text>
|
||||
<text class="info" v-if="item.workerType==1">固定用工</text>
|
||||
<text class="info" v-if="item.workerType==2">分包管理</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-list-item>
|
||||
</u-list>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
keyword:'',
|
||||
listData:[],
|
||||
number:0,
|
||||
isLoading:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
//搜索
|
||||
searchList(value){
|
||||
this.loadList()
|
||||
},
|
||||
loadList(){
|
||||
let param={
|
||||
name:this.keyword
|
||||
}
|
||||
this.isLoading=true
|
||||
uni.request({
|
||||
url: config.realAppUrl+'/BasePerson/downloadWorkPersonQualifications',
|
||||
method: 'post',
|
||||
data: param,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
this.listData=res.data;
|
||||
this.number=res.data.length
|
||||
this.$forceUpdate()
|
||||
this.isLoading=false
|
||||
// console.log(this.listData)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.isLoading=false
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
this.isLoading=false
|
||||
}
|
||||
})
|
||||
},
|
||||
goEdit(item){
|
||||
console.log(item)
|
||||
uni.navigateTo({
|
||||
url: `/pages/realName/workbench/personEnter/editPeople?idNumber=${item.idNumber}&workerType=${item.workerType}`
|
||||
})
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
// padding: 0 20px;
|
||||
.list-box{
|
||||
width: 90%;
|
||||
height: auto;
|
||||
// border: 1px solid #000;
|
||||
margin: 0rpx auto;
|
||||
|
||||
.list-item{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.content-box{
|
||||
width: 94%;
|
||||
height: auto;
|
||||
margin: 20rpx;
|
||||
// background-color: #F8F9FC;
|
||||
padding: 10rpx 0;
|
||||
|
||||
.item-text{
|
||||
width: 95%;
|
||||
margin-left: 20rpx;
|
||||
margin-top: 15rpx;
|
||||
// display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
.label{
|
||||
color: #3A3A3A;
|
||||
font-weight: 500;
|
||||
}
|
||||
.info-right{
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 40rpx;
|
||||
}
|
||||
.info{
|
||||
color: #6F6F6F;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="新增临时人员" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<view class="header">
|
||||
<view class="header-item" :class="hIndex == 1 ? 'active' : ''" @click="hIndex = 1">
|
||||
身份证
|
||||
<view class="activeLine" v-if="hIndex == 1"></view>
|
||||
</view>
|
||||
<view class="header-item" :class="hIndex == 2 ? 'active' : ''" @click="hIndex = 2">
|
||||
关键信息
|
||||
<view class="activeLine" v-if="hIndex == 2"></view>
|
||||
</view>
|
||||
<view class="header-item" :class="hIndex == 3 ? 'active' : ''" @click="hIndex = 3">
|
||||
安全培训
|
||||
<view class="activeLine" v-if="hIndex == 3"></view>
|
||||
</view>
|
||||
<view class="header-item" :class="hIndex == 4 ? 'active' : ''" @click="hIndex = 4">
|
||||
其他
|
||||
<view class="activeLine" v-if="hIndex == 4"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view v-show="hIndex == 1">
|
||||
<u--form class="idForm" :model="idForm" :rules="rules" ref="vForm" :errorType="errorType">
|
||||
<view class="visitor-input-box mb-40">
|
||||
<text>身份证号</text><text style="color: red;">*</text>
|
||||
<u-form-item prop='idCard' style="width:100%;height: 100%;" >
|
||||
<u--input
|
||||
v-model="visitorInfo.idCard"
|
||||
type="text" placeholder="请输入"
|
||||
maxlength="18" border="surround"
|
||||
clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="visitor-input-box mb-40">
|
||||
<text>姓名</text><text style="color: red;">*</text>
|
||||
<u-form-item prop='userName' style="width:100%;height: 100%;" >
|
||||
<u--input
|
||||
v-model="visitorInfo.userName"
|
||||
type="text" placeholder="请输入"
|
||||
maxlength="15" border="surround"
|
||||
clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="visitor-input-box mb-40">
|
||||
<text>手机号</text><text style="color: red;">*</text>
|
||||
<u-form-item prop='phone' style="width:100%;height: 100%;" >
|
||||
<u--input
|
||||
v-model="visitorInfo.phone"
|
||||
type="number" placeholder="请输入"
|
||||
maxlength="11" border="surround"
|
||||
clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="submit-box">
|
||||
<u-button type="primary" shape="circle" class="submit-btn" @click="formSubmit"
|
||||
style="background: linear-gradient( 90deg, #5193FE 0%, #00EEF0 100%);"
|
||||
>确 定</u-button>
|
||||
<u-button shape="circle" class="submit-btn" @click="back">取 消</u-button>
|
||||
</view> -->
|
||||
</u--form>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hIndex:1,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:')
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
.header{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
|
||||
.header-item{
|
||||
padding: 0 20rpx;
|
||||
height: 100rpx;
|
||||
color: #666;
|
||||
line-height: 100rpx;
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
|
||||
.activeLine{
|
||||
background: #00337A;
|
||||
border-radius: 10upx;
|
||||
width: 100%;
|
||||
height: 6upx;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
// background: #fff;
|
||||
color: #333;
|
||||
font-weight: bolder;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,374 @@
|
|||
<template>
|
||||
<view class="page">
|
||||
<u-navbar class="u-navbar" title="工资卡见证" placeholder @leftClick="leftClick" leftIconColor="#fff" bgColor="#00337A" :titleStyle="{ color: '#FFF', fontSize: '32rpx' }"/>
|
||||
<scroll-view class="content" scroll-y="true">
|
||||
<view class="img-view">
|
||||
<view class="view-item">
|
||||
<view>工程名称</view>
|
||||
<view style="margin-left: 40rpx;">xxx工程</view>
|
||||
</view>
|
||||
<view class="view-item" style="display: block;">
|
||||
<view>工资卡见证</view>
|
||||
<view class="img-box">
|
||||
<view class="img-item upload-btn" @click="openPhotograph()">
|
||||
<image class="img" src="@/static/realName/tianjia-img.png" mode=""></image>
|
||||
</view>
|
||||
<view class="img-item" v-if="imgUrl!=''">
|
||||
<image class="img" :src="imgUrl" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="view-item">
|
||||
<view>人脸识别</view>
|
||||
<view style="margin-left: 40rpx;" class="btn">点击人脸识别</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="img-view" style="margin-bottom: 60rpx;">
|
||||
<u--form class="addForm" :model="entryBankBean" ref="cForm">
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>银行卡号</text>
|
||||
</view>
|
||||
<u-form-item prop='bankCard' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryBankBean.bankCard" type="number" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>银行名称</text>
|
||||
</view>
|
||||
<u-form-item prop='bankName' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryBankBean.bankName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<view class="form-input-box">
|
||||
<view style="width:25%;height: 100%;">
|
||||
<text>银行支行名称</text>
|
||||
</view>
|
||||
<u-form-item prop='bankRollName' style="width:70%;height: 100%;" >
|
||||
<u--input v-model="entryBankBean.bankRollName" type="text" placeholder="请输入" maxlength="40" border="surround" clearable></u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u--form>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="sumbit-btn" @click="sumbit">确 定</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { pathToBase64, base64ToPath } from 'image-tools';
|
||||
import chooseFile from '../../util/chooseFile.js';
|
||||
import config from '@/config'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
idNumber:uni.getStorageSync('realNameUser').idNumber,
|
||||
imgUrl:'',
|
||||
entryBankBean:{
|
||||
"idNumber":uni.getStorageSync('realNameUser').idNumber,
|
||||
"bankName": "",//银行名称
|
||||
"bankCard": "",//银行卡号
|
||||
"bankRollName": "",//银行支行名称
|
||||
"path": "",//见证照片
|
||||
"proId":uni.getStorageSync('realNameUser').proId,//工程id
|
||||
"uploadDate": "",//日期
|
||||
"uploadTime": "",//时间
|
||||
"uploadId": uni.getStorageSync('realNameUser').userId,//上传人id
|
||||
"isActive": "1",
|
||||
"type": "2",
|
||||
},
|
||||
// imgs: [],
|
||||
// imgsId: [],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
console.log('🚀 ~ mounted ~ mounted-index:');
|
||||
},
|
||||
onShow() {
|
||||
|
||||
console.log(this.timeFormat(null,'yyyy-mm-dd'))
|
||||
},
|
||||
methods: {
|
||||
// 拍照录入
|
||||
openPhotograph() {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['camera'],
|
||||
success: res => {
|
||||
console.log('🚀 ~ res-拍照:', res)
|
||||
uni.uploadFile({
|
||||
url: `http://192.168.0.14:1909/file/file/upload`, //服务器地址
|
||||
fileType:"image",//ZFB必填,不然报错
|
||||
filePath: res.tempFilePaths[0],//这个就是我们上面拍照返回或者先中照片返回的数组
|
||||
name: "imgFile",
|
||||
formData: {
|
||||
photoType:'salary',
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
if(uploadFileRes.statusCode==200){
|
||||
this.entryBankBean.path=JSON.parse(uploadFileRes.data).data.url;
|
||||
}else{
|
||||
uni.$u.toast('上传失败');
|
||||
}
|
||||
|
||||
},
|
||||
fail: err => {
|
||||
uni.$u.toast('上传失败');
|
||||
console.log(err)
|
||||
}
|
||||
});
|
||||
this.imgToBase64(res.tempFilePaths[0]).then(base64 => {
|
||||
this.imgUrl=base64
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
console.log('🚀 ~ err:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
imgToBase64(data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
pathToBase64(data)
|
||||
.then(base64 => {
|
||||
resolve(base64)
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
chooseFile(){
|
||||
chooseFile((path)=>{
|
||||
console.log('111111111',path);
|
||||
})
|
||||
},
|
||||
sumbit(){
|
||||
if(this.entryBankBean.path==''){
|
||||
uni.$u.toast('工资卡见证照片未上传');
|
||||
}else if(this.entryBankBean.bankCard==''){
|
||||
uni.$u.toast('请填写银行卡号');
|
||||
}else if(this.entryBankBean.bankName==''){
|
||||
uni.$u.toast('请填写银行名称');
|
||||
}else if(this.entryBankBean.bankRollName==''){
|
||||
uni.$u.toast('请填写银行支行名称');
|
||||
}else{
|
||||
this.entryBankBean.uploadDate = this.timeFormat(null,'yyyy-mm-dd');
|
||||
this.entryBankBean.uploadTime = this.timeFormat(null,'yyyy-mm-dd hh:MM:ss');
|
||||
console.log(this.entryBankBean)
|
||||
uni.request({
|
||||
url: config.realAppUrl+'/payCard/insertPayCard',
|
||||
method: 'post',
|
||||
data: this.entryBankBean,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
Authorization: uni.getStorageSync('realNameToken')
|
||||
},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
res = res.data;
|
||||
if(res.code==200){
|
||||
uni.showToast({
|
||||
title: res.data,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回到已存在的页面
|
||||
});
|
||||
},1000)
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
// 返回
|
||||
leftClick() {
|
||||
console.log('返回')
|
||||
uni.navigateBack({
|
||||
delta: 1 // 返回
|
||||
});
|
||||
},
|
||||
timeFormat(dateTime = null, formatStr = 'yyyy-mm-dd') {
|
||||
let date
|
||||
// 若传入时间为假值,则取当前时间
|
||||
if (!dateTime) {
|
||||
date = new Date()
|
||||
}
|
||||
// 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
|
||||
else if (/^\d{10}$/.test(dateTime?.toString().trim())) {
|
||||
date = new Date(dateTime * 1000)
|
||||
}
|
||||
// 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
|
||||
else if (typeof dateTime === 'string' && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime))
|
||||
}
|
||||
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
|
||||
// 处理 '2022-07-10 01:02:03',跳过 '2022-07-10T01:02:03'
|
||||
else if (typeof dateTime === 'string' && dateTime.includes('-') && !dateTime.includes('T')) {
|
||||
date = new Date(dateTime.replace(/-/g, '/'))
|
||||
}
|
||||
// 其他都认为符合 RFC 2822 规范
|
||||
else {
|
||||
date = new Date(dateTime)
|
||||
}
|
||||
|
||||
const timeSource = {
|
||||
'y': date.getFullYear().toString(), // 年
|
||||
'm': (date.getMonth() + 1).toString().padStart(2, '0'), // 月
|
||||
'd': date.getDate().toString().padStart(2, '0'), // 日
|
||||
'h': date.getHours().toString().padStart(2, '0'), // 时
|
||||
'M': date.getMinutes().toString().padStart(2, '0'), // 分
|
||||
's': date.getSeconds().toString().padStart(2, '0') // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
}
|
||||
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || []
|
||||
if (ret) {
|
||||
// 年可能只需展示两位
|
||||
const beginIndex = key === 'y' && ret.length === 2 ? 2 : 0
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex))
|
||||
}
|
||||
}
|
||||
return formatStr
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #f8f8f8;
|
||||
box-sizing: border-box;
|
||||
font: 24rpx;
|
||||
.content{
|
||||
width: 100%;
|
||||
height: 92vh;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.img-view{
|
||||
width: 94%;
|
||||
margin: 20rpx auto;
|
||||
background-color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.btn{
|
||||
background-color:#00337A;
|
||||
color: #FFF;
|
||||
padding:10rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.view-item{
|
||||
width: 94%;
|
||||
margin: 0rpx auto;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.img-box{
|
||||
width: 94%;
|
||||
height: auto;
|
||||
margin: 0rpx auto;
|
||||
padding:20rpx;
|
||||
display: flex;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
.img-item {
|
||||
float: left;
|
||||
width: 200upx;
|
||||
height: 200upx;
|
||||
border: 1px solid #ddd;
|
||||
margin: 0 22rpx 20upx 0upx;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background: #eee;
|
||||
.img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.remove-btn {
|
||||
position: absolute;
|
||||
top: -18upx;
|
||||
right: -18upx;
|
||||
width: 44upx;
|
||||
height: 44upx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.upload-btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img {
|
||||
width: 60upx;
|
||||
height: 60upx;
|
||||
margin: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn2{
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.popup-header{
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
.popup-content{
|
||||
width: 100%;
|
||||
height: 15vh;
|
||||
background-color: #fff;
|
||||
}
|
||||
.addForm{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
font-size: 26rpx;
|
||||
.form-input-box{
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
.sumbit-btn{
|
||||
width: 94%;
|
||||
height: 80rpx;
|
||||
margin: 0 auto;
|
||||
margin-bottom: 100rpx;
|
||||
display: flex;align-items: center;justify-content: center;
|
||||
background: #00337A;
|
||||
color: #FFF;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1005 B |
|
After Width: | Height: | Size: 671 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 234 B |
|
After Width: | Height: | Size: 850 B |
|
After Width: | Height: | Size: 659 B |
|
|
@ -0,0 +1,80 @@
|
|||
import CryptoJS from 'crypto-js';
|
||||
// import { TextEncoder } from 'text-decoding'
|
||||
// const TextEncoder = new TextEncoder();
|
||||
var aqEnnable = true;//是否开启安全验证
|
||||
const key = 'zhst@bonus@zhst@bonus@1234567890';//AES加密cbc 256
|
||||
// const key = '1234567812345678';//AES加密cbc
|
||||
const iv = '1234567812345678';
|
||||
function getKey() {
|
||||
// 真正的key
|
||||
return CryptoJS.enc.Utf8.parse(key);
|
||||
}
|
||||
|
||||
function getIv() {
|
||||
// 真正的iv
|
||||
return CryptoJS.enc.Utf8.parse(iv);
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
encrypt(word) {
|
||||
if(!aqEnnable){
|
||||
return word;
|
||||
}
|
||||
if(word==null){
|
||||
var ciphertext = CryptoJS.AES.encrypt(word, getKey(), {
|
||||
iv: getIv(),
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return ciphertext.toString();
|
||||
}else{
|
||||
var ciphertext = CryptoJS.AES.encrypt(word.toString(), getKey(), {
|
||||
iv: getIv(),
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return ciphertext.toString();
|
||||
}
|
||||
},
|
||||
decrypt(word) {
|
||||
if(!aqEnnable){
|
||||
return word;
|
||||
}
|
||||
if(word==null){
|
||||
return "";
|
||||
}
|
||||
var bytes = CryptoJS.AES.decrypt(word.toString(), getKey(), {
|
||||
iv: getIv(),
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
});
|
||||
return bytes.toString(CryptoJS.enc.Utf8);
|
||||
},
|
||||
DateFormat(date, fmt) {
|
||||
if (date && fmt) {
|
||||
let _date = new Date(date);
|
||||
var o = {
|
||||
'Y+': _date.getFullYear() , //年
|
||||
'M+': _date.getMonth() + 1, //月份
|
||||
'd+': _date.getDate(), //日
|
||||
'h+': _date.getHours(), //小时
|
||||
'm+': _date.getMinutes(), //分
|
||||
's+': _date.getSeconds(), //秒
|
||||
'q+': Math.floor((_date.getMonth() + 3) / 3), //季度
|
||||
S: _date.getMilliseconds(), //毫秒
|
||||
};
|
||||
if (/(y+)/.test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, (_date.getFullYear() + '').substr(4 - RegExp.$1.length));
|
||||
}
|
||||
for (var k in o) {
|
||||
if (new RegExp('(' + k + ')').test(fmt)) {
|
||||
fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? (o)[k] : ('00' + (o)[k]).substr(('' + (o)[k]).length));
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||