Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	common/tool.js
#	pages/login/register/baseInfo.vue
#	pages/login/register/certificate.vue
dev
zhangyanli 2024-05-13 16:06:05 +08:00
commit 145ceb69da
23 changed files with 1524 additions and 428 deletions

View File

@ -1,6 +1,7 @@
// export var basePath = "http://192.168.0.42:8099/";
export var basePath = "http://192.168.0.55:8093/";
// export var basePath = "https://gateway.qhdsafety.com/";
// export var basePath = "http://192.168.0.69:7082/";
// export var basePath = "http://192.168.0.31:7082/integrated_traffic/";
export var basePath = "http://39.101.166.211:8073/integrated_traffic/";
export const baseImgPath = "https://file.zcloudchina.com/YTHFile";
export const adminPath = "http://192.168.0.18:8085";
export const projectManagerUrl = 'https://pm.qhdsafety.com/zy-projectManage/';

View File

@ -44,15 +44,15 @@
refuseNum:'',//
authList: {
'CAMERA': {
title: "秦安安全对相机/照片权限申请说明",
title: "交运安全对相机/照片权限申请说明",
content: "便于您使用该功能上传您的照片/图片/视频,用于上传隐患、人脸识别与扫描二维码等场景中读取和写入相册和文件内容。"
},
'ACCESS_FINE_LOCATION': {
title: "秦安安全对地理位置权限申请说明",
content: "秦安安全应用程序可以提供基于位置的服务、定位等功能。",
title: "交运安全对地理位置权限申请说明",
content: "交运安全应用程序可以提供基于位置的服务、定位等功能。",
},
'RECORD_AUDIO': {
title: "秦安安全对麦克风权限申请说明",
title: "交运安全对麦克风权限申请说明",
content: "便于您使用该功能进行人脸识别。",
},
}

View File

@ -1,15 +1,20 @@
{
"name" : "秦安双控",
"appid" : "__UNI__F48179F",
"description" : "秦安双控",
"versionName" : "3.0.0",
"versionCode" : 3,
"name" : "交运安全",
"appid" : "__UNI__CEE68CC",
"description" : "交运安全",
"versionName" : "1.0.0",
"versionCode" : 1,
"transformPx" : false,
"app-plus" : {
/* 5+App */
"modules" : {
"Geolocation" : {},
"LivePusher" : {}
"LivePusher" : {},
"Camera" : {},
"Maps" : {},
"VideoPlayer" : {},
"Barcode" : {},
"Contacts" : {}
},
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
@ -40,15 +45,19 @@
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : [ "armeabi-v7a" ]
},
"ios" : {
"privacyDescription" : {
@ -58,7 +67,8 @@
"NSMicrophoneUsageDescription" : "调取手机麦克风用于用户快捷输入",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "使用用户地理位置用于提供客户的位置信息",
"NSLocationWhenInUseUsageDescription" : "使用用户地理位置用于提供客户的位置信息"
}
},
"dSYMs" : false
},
/* ios */
"sdkConfigs" : {
@ -69,17 +79,47 @@
"appkey_android" : "43G1sKuHV6oRTrdR9VTIGPF9soej7V5a"
}
},
"ad" : {}
"ad" : {},
"maps" : {
"baidu" : {
"appkey_ios" : "g3lZyqt0KkFnZGUsjIVO7U6lTCfpjSCt",
"appkey_android" : "43G1sKuHV6oRTrdR9VTIGPF9soej7V5a"
}
}
},
"splashscreen" : {
"androidStyle" : "common"
},
"icons" : {
"android" : {
"hdpi" : "C:/Users/Administrator/Desktop/icons/72x72.png",
"xhdpi" : "C:/Users/Administrator/Desktop/icons/96x96.png",
"xxhdpi" : "C:/Users/Administrator/Desktop/icons/144x144.png",
"xxxhdpi" : "C:/Users/Administrator/Desktop/icons/192x192.png"
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}

View File

@ -316,6 +316,10 @@
"path": "pages/news/news-list-detail",
"style": {}
},
{
"path": "pages/news/notice-list-detail",
"style": {}
},
{
"path": "pages/application/other-apps/videos/videos",
"style": {}

View File

@ -44,7 +44,8 @@
<text>运单状态:
<div class="cu-tag bg-yellow radius" v-if="item.WAYBILLSTATUS == 0"></div>
<div class="cu-tag bg-green radius" v-else-if="item.WAYBILLSTATUS == 1" >行车中</div>
<div class="cu-tag bg-blue radius" v-else></div>
<div class="cu-tag bg-blue radius" v-else-if="item.WAYBILLSTATUS == 2">收车后</div>
<div class="cu-tag bg-blue radius" v-else-if="item.WAYBILLSTATUS == 3">待承诺</div>
</text>
</view>

View File

@ -5,7 +5,7 @@
<block slot="content">{{CHECKTYPE_NAME}}排查项</block>
</cu-custom>
<scroll-view scroll-y>
<view class="check-items" v-for="(item,index) in list" :key="item.CUSTOM_ITEM_ID">
<view class="check-items" v-if="CHECKTYPE_NAME !== '待承诺'" v-for="(item,index) in list" :key="item.CUSTOM_ITEM_ID">
<view class="title">检查项名称:{{item.CHECKITEMNAME}}</view>
<view class="title">检查项说明:{{item.REMARKS}}</view>
<view class="check-items-select">
@ -29,10 +29,39 @@
<textarea :disabled="item.OPERATION_TYPE === 1 ? true : false" maxlength="-1" v-model="item.REMARK" placeholder="检查详细描述" :class="item.OPERATION_TYPE === 1 ? 'bgh' : ''" style="border: 1px solid #eeeeee; z-index: 999; height: 50px; padding: 10px;font-size: 12px; width: 100%"></textarea>
</view>
</radio-group>
</view>
</view>
<view class="check-items">
<view class="check-items" v-if="CHECKTYPE_NAME === '待承诺'" v-for="(item,index) in promiseList" :key="item.DRIVINGCOMMITMENT_ID">
<view class="title">承诺项:{{item.INQUIRYCONTENT}}</view>
<view class="check-items-select">
<radio-group class="block">
<view class="flex justify-between padding-sm">
<view class="select">
<view @click="checkTrue1({index:index},0)" class="flex align-center">
<radio class='mr10' :class="item.ISNORMAL==0?'checked':''" :checked="item.ISNORMAL==0" disabled></radio>
<text></text>
</view>
</view>
<view class="select">
<view @click="checkTrue1({index:index},1)" class="flex align-center">
<radio class='yellow mr10' :class="item.ISNORMAL==1?'checked':''" :checked="item.ISNORMAL==1" disabled ></radio>
<text>不是</text>
</view>
</view>
<view class="select">
<view @click="checkTrue1({index:index},2)" class="flex align-center">
<radio class='red mr10' :class="item.ISNORMAL==2?'checked':''" :checked="item.ISNORMAL==2" disabled ></radio>
<text>不涉及</text>
</view>
</view>
</view>
<view v-if="item.ISNORMAL==0 || item.ISNORMAL==1" class="input" >
<textarea :disabled="item.OPERATION_TYPE === 1 ? true : false" maxlength="-1" v-model="item.REMARK" placeholder="检查详细描述" :class="item.OPERATION_TYPE === 1 ? 'bgh' : ''" style="border: 1px solid #eeeeee; z-index: 999; height: 50px; padding: 10px;font-size: 12px; width: 100%"></textarea>
</view>
</radio-group>
</view>
</view>
<view class="check-items" v-if="CHECKTYPE_NAME !== '待承诺'">
<!-- <view class="cu-bar bg-white margin-top">-->
<!-- <view class="action">-->
<!-- 检查照片-->
@ -55,13 +84,19 @@
<!-- </view>-->
<!-- </view>-->
<view class="de-drawer">
<view class="cu-bar bg-white">
<view class="bg-white">
<view class="action">实时照片</view>
<view style="color: red;font-size: 10px">*照片说明车辆正前方左右两侧45°角及车尾部拍照</view>
</view>
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in liveImgs" :key="index">
<image :src="baseImgPath + item.filePath" mode="aspectFill"></image>
<image
:src="baseImgPath + item.filePath"
mode="aspectFill"
@click="clickImg(baseImgPath + item.filePath)"
>
</image>
<!-- 删除图片按钮 -->
<view class="cu-tag bg-red" @tap.stop="DelImg(index)" data-type="0">
<text class='cuIcon-close'></text>
@ -75,6 +110,7 @@
</view>
</view>
</view>
</view>
<view class="check-items">
<view class="wui-sign" >
@ -127,7 +163,8 @@
modalName:null,
imgList:[],
liveImgs: [],
}
promiseList: [],
}
},
onLoad(e){
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
@ -136,6 +173,7 @@
this.WAYBILLREGISTRATION_ID = e.WAYBILLREGISTRATION_ID;
console.log(this.WAYBILLREGISTRATION_ID)
this.getData();
this.getData2();
loginSession();
},
onShow() {
@ -206,7 +244,15 @@
}
});
},
clickImg(url) {
uni.previewImage({
urls: [url],
current: '',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
DelImg(index) {
var _this = this;
uni.showModal({
@ -382,6 +428,40 @@
});
},
getData2() {
var _this = this;
console.log(_this)
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/drivingtype/safetycommitment',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
CHECKTYPE_ID: _this.CHECKTYPE_ID,
USER_NAME : loginUser.NAME,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.pd=res.data.pd;
_this.promiseList = res.data.varList;
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
});
},
openAuth(permissionID){
this.permissionID = permissionID;
setTimeout(()=>{
@ -501,71 +581,131 @@
});
},
goSubmit(){
var _this = this;
let required = true
uni.showLoading({
title: '请稍候'
})
if (_this.liveImgs.length <= 0) {
uni.showToast({
icon: 'none',
title: '请上传车辆检查照片',
duration: 1500
});
return;
}
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
});
return;
}
var files = [];
var signtime = [];
const formData={}
this.uploadImgFaults(files,signtime)
formData.SIGNTIME = signtime
formData.CORPINFO_ID = loginUser.CORPINFO_ID
formData.USER_ID = loginUser.USER_ID
formData.USER_NAME = loginUser.USERNAME
formData.CHECKTYPE_ID = this.CHECKTYPE_ID
formData.IMG_PATH = this.liveImgs.map(item => {
return item.filePath
}).join(",")
formData.checklist = JSON.stringify(this.list)
if(this.CHECKTYPE_NAME == "出车前" || this.CHECKTYPE_NAME == "行车中"){
formData.WAYBILLSTATUS = 1
}else if (this.CHECKTYPE_NAME == "收车后"){
formData.WAYBILLSTATUS = 2
}
formData.WAYBILLREGISTRATION_ID = this.WAYBILLREGISTRATION_ID
console.log(JSON.stringify(this.list))
uni.uploadFile({
url: basePath+'app/drivingitem/add',
files: files,
formData:formData,
success: (res) => {
uni.showToast({
icon:'none',
title: '保存成功',
duration: 2000
});
_this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
},
goSubmit() {
if(this.CHECKTYPE_NAME !== "待承诺") {
var _this = this;
let required = true
uni.showLoading({
title: '请稍候'
})
if (_this.liveImgs.length <= 0) {
uni.showToast({
icon: 'none',
title: '请上传车辆检查照片',
duration: 1500
});
return;
}
if (_this.liveImgs.length < 4) {
uni.showToast({
icon: 'none',
title: '车辆检查需要4张照片',
duration: 1500
});
return;
}
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
});
return;
}
var files = [];
var signtime = [];
const formData = {}
this.uploadImgFaults(files, signtime)
formData.SIGNTIME = signtime
formData.CORPINFO_ID = loginUser.CORPINFO_ID
formData.USER_ID = loginUser.USER_ID
formData.USER_NAME = loginUser.USERNAME
formData.CHECKTYPE_ID = this.CHECKTYPE_ID
formData.IMG_PATH = this.liveImgs.map(item => {
return item.filePath
}).join(",")
formData.checklist = JSON.stringify(this.list)
if (this.CHECKTYPE_NAME == "出车前" || this.CHECKTYPE_NAME == "行车中") {
formData.WAYBILLSTATUS = 1
} else if (this.CHECKTYPE_NAME == "收车后") {
formData.WAYBILLSTATUS = 2
}
formData.WAYBILLREGISTRATION_ID = this.WAYBILLREGISTRATION_ID
console.log(JSON.stringify(this.list))
uni.uploadFile({
url: basePath + 'app/drivingitem/add',
files: files,
formData: formData,
success: (res) => {
uni.showToast({
icon: 'none',
title: '保存成功',
duration: 2000
});
_this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
}else{
var _this = this;
let required = true
uni.showLoading({
title: '请稍候'
})
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
});
return;
}
var files = [];
var signtime = [];
const formData = {}
this.uploadImgFaults(files, signtime)
formData.SIGNTIME = signtime
formData.CORPINFO_ID = loginUser.CORPINFO_ID
formData.USER_ID = loginUser.USER_ID
formData.USER_NAME = loginUser.USERNAME
formData.CHECKTYPE_ID = this.CHECKTYPE_ID
formData.IMG_PATH = this.liveImgs.map(item => {
return item.filePath
}).join(",")
formData.checklist = JSON.stringify(this.promiseList)
if (this.CHECKTYPE_NAME == "待承诺"){
formData.WAYBILLSTATUS = 0
}
formData.WAYBILLREGISTRATION_ID = this.WAYBILLREGISTRATION_ID
console.log(JSON.stringify(this.list))
uni.uploadFile({
url: basePath + 'app/commitentitem/add',
files: files,
formData: formData,
success: (res) => {
uni.showToast({
icon: 'none',
title: '保存成功',
duration: 2000
});
_this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
}
},
goback(){
var pages = getCurrentPages(); //
var prePage = pages[pages.length - 2]; //
@ -575,7 +715,6 @@
},
//
checkTrue(e,STATUS) {
let _this=this;
_this.list[e.index].ISNORMAL=STATUS;
console.log(_this.list[e.index].ISNORMAL)
@ -583,6 +722,14 @@
_this.$set(_this.list[e.index], 'REMARK', _this.list[e.index].REMARK)
},
//
checkTrue1(e,STATUS) {
let _this=this;
_this.promiseList[e.index].ISNORMAL=STATUS;
console.log(_this.promiseList[e.index].ISNORMAL)
_this.$forceUpdate();//
_this.$set(_this.promiseList[e.index], 'REMARK', _this.promiseList[e.index].REMARK)
},
}
}
</script>

View File

@ -97,7 +97,7 @@
</view>
</view>
</view>
<view class="wui-form-list">
<!-- <view class="wui-form-list">
<view class="wui-sub-title">
<text>行车安全问询</text>
</view>
@ -106,14 +106,52 @@
<view class="cu-form-group">{{item.INQUIRYCONTENT}}</view>
</view>
</view>
</view>
</view>-->
<view class="wui-form-list">
<view class="wui-sub-title">
<text>排查项</text>
</view>
</view>
<view class="check-items" v-for="(item,index) in list" :key="item.CHECKTYPE_ID">
<view class="check-items" v-for="(item,index) in list2" :key="item.CHECKTYPE_ID">
<view class="wui-sub-title">行车安全问询:</view>
<view class="title" v-for="(item1,index1) in item.pd1Children" :key="index1">
<view class="title" v-for="(item2,index2) in commitmentList" :key="index2">
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<text>承诺项:</text>
</view>
<view>
<view>{{ item2.INQUIRYCONTENT }}</view>
</view>
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<text>承诺说明:</text>
</view>
<view>
<view>{{ item2.REMARK?item2.REMARK:'无' }}</view>
</view>
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<text>是否合格:</text>
</view>
<view>{{item2.STATUS === '0'? "合格":item2.STATUS === '1'?"不合格": "不涉及"}}</view>
</view>
<view>
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<view class="cu-form-group" >
<view class="title">检查人签字</view>
</view>
<view class="cu-item" style="border-bottom: 1px solid #e3e3e3">
<view class="imgs" style="display: flex;justify-content: space-between;align-items: flex-end;padding: 20upx 50upx;">
<image :src="baseImgPath + item1.SIGN_PATH" :data-index="index" @click="ViewShowImage(baseImgPath + item1.SIGN_PATH)"
mode="" style="width: 200upx;height: 200upx;"></image>
<text> {{item1.SIGN_TIME}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="check-items" v-for="(item,index) in list" :key="item.CHECKTYPE_ID" v-if="item.CHECKTYPE_NAME !== '待承诺'">
<view class="wui-sub-title">{{item.CHECKTYPE_NAME}}检查</view>
<view class="title" v-for="(item1,index1) in item.pd1Children" :key="index1">
<view class="title" v-for="(item2,index2) in item1.pd2Children" :key="index2">
@ -129,11 +167,15 @@
<text>出车说明:</text>
</view>
<view>{{item2.REMARK?item2.REMARK:'无'}}</view>
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<text>是否合格:</text>
</view>
<view>{{item2.STATUS === '0'? "合格":"不合格"}}</view>
</view>
<view>
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
<view class="cu-form-group" >
<view style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee" v-if="item.CHECKTYPE_NAME !== '待承诺'">
<view class="cu-form-group">
<view class="title">检查图片</view>
</view>
<view class="cu-item" style="border-bottom: 1px solid #e3e3e3">
@ -160,11 +202,8 @@
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</template>
@ -187,6 +226,7 @@
hs: [],
files: [],
list:[],
list2:[],
commitmentList:[],
videoList: [],
checkList: [],
@ -238,7 +278,7 @@
_this.pd = res.data.pd; //map
_this.commitmentList = res.data.commitmentList; //map
_this.list = res.data.pd.varList
_this.list2 = res.data.pd.varList2
} else if ("exception" == data.result) {
uni.showToast({
title: '错误',
@ -305,8 +345,6 @@
});
return;
}
var i = 0;
_this.uploadImg(_this.imgList, i);
},
@ -337,7 +375,6 @@
},
fail: (err) => {
uni.hideLoading();
console.log('uploadImage fail', err);
uni.showModal({
content: err.errMsg,
showCancel: false

View File

@ -7,12 +7,13 @@
<scroll-view scroll-y>
<view class="spot-list">
<view v-for="(item, index) in list" :key="item.CHECKTYPE_ID"
:class="['spot-item', { 'active': (pd.WAYBILLSTATUS == '0' && item.CHECKTYPE_NAME == '出车前') || (pd.WAYBILLSTATUS == '1' && item.CHECKTYPE_NAME == '行车中') || (pd.WAYBILLSTATUS == '2' && item.CHECKTYPE_NAME == '收车后') }]"
:class="['spot-item', { 'active': (pd.WAYBILLSTATUS == '3' && item.CHECKTYPE_NAME == '待承诺') || (pd.WAYBILLSTATUS == '0' && item.CHECKTYPE_NAME == '出车前') || (pd.WAYBILLSTATUS == '1' && item.CHECKTYPE_NAME == '行车中') || (pd.WAYBILLSTATUS == '2' && item.CHECKTYPE_NAME == '收车后') }]"
@click="$noMultipleClicks(goToList,{
'CHECKTYPE_ID':item.CHECKTYPE_ID,
'CHECKTYPE_NAME':item.CHECKTYPE_NAME,
'WAYBILLREGISTRATION_ID':WAYBILLREGISTRATION_ID,index})">
<view class="spot-img">
<image v-if="item.CHECKTYPE_NAME == '待承诺'" src="../../../static/driving.png" mode=""></image>
<image v-if="item.CHECKTYPE_NAME == '出车前'" src="../../../static/driving_before.png" mode=""></image>
<image v-if="item.CHECKTYPE_NAME == '行车中'" src="../../../static/driving.png" mode=""></image>
<image v-if="item.CHECKTYPE_NAME == '收车后'" src="../../../static/driving_affter.png" mode=""></image>
@ -103,43 +104,100 @@
},
//
goToList(e) {
const index = e.index
if((this.pd.WAYBILLSTATUS === '1' || this.pd.WAYBILLSTATUS === '2' || this.pd.IsExist != '0') && index === 0){
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content:'您已经完成出车前检查,无需再次检查',
});
return;
}else if((this.pd.WAYBILLSTATUS === '2' || this.pd.IsExist == '1' || this.pd.IsExist == '0') && index === 1){
if(this.pd.WAYBILLSTATUS === '0') {
const index = e.index
console.log(this.pd)
if ((this.pd.WAYBILLSTATUS === '3' || this.pd.IsExist == '0') && index === 1) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '未进行出车前安全承诺,无法进行此操作',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '0' || this.pd.IsExist == '0') && index === 2) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '未进行出车前检查,无法进行此操作',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '0' || this.pd.WAYBILLSTATUS === '1' || this.pd.WAYBILLSTATUS === '2') && index === 0) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您已经完成出车前安全承诺,无需再次承诺',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '1' || this.pd.WAYBILLSTATUS === '2' || this.pd.WAYBILLSTATUS === '2') && index === 1) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您已经完成出车前检查,无需再次检查',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '2') && index === 2) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您已经完成行车中检查,无需再次检查',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '0') && index === 3) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您未进行行车中检查,请按顺序检查',
});
return;
}else if ((this.pd.WAYBILLSTATUS === '3') && index === 3) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您未进行行车中检查,请按顺序检查',
});
return;
}
/* if ((this.pd.WAYBILLSTATUS === '2' || this.pd.WAYBILLSTATUS === '3' || this.pd.IsExist != '0') && index === 1) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您已经完成出车前检查,无需再次检查',
});
return;
} else if ((this.pd.WAYBILLSTATUS === '2' || this.pd.IsExist == '1' || this.pd.IsExist == '0') && index === 2) {
if (this.pd.WAYBILLSTATUS === '0') {
uni.showModal({
title: '提示',
content:'未进行出车前检查,无法进行此操作',
content: '未进行出车前检查,无法进行此操作',
showCancel: false,
confirmText: '确认'
});
}
return
}else if((this.pd.WAYBILLSTATUS === '2' || this.pd.IsExist == '2' || this.pd.IsExist == '0') && index === 2){
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content:'您未进行行车中检查,请按顺序检查',
});
return;
}
uni.navigateTo({
url: '/pages/application/driving-inspections/driving-item-check-list?CHECKTYPE_ID=' +
e.CHECKTYPE_ID + '&CHECKTYPE_NAME=' + e.CHECKTYPE_NAME + '&WAYBILLREGISTRATION_ID=' + e.WAYBILLREGISTRATION_ID
});
},
}
}
return
} else if ((this.pd.WAYBILLSTATUS === '2' || this.pd.IsExist == '2' || this.pd.IsExist == '0') && index === 3) {
uni.showModal({
title: '提示',
cancelText: '确认',
confirmText: '取消',
content: '您未进行行车中检查,请按顺序检查',
});
return;
}*/
uni.navigateTo({
url: '/pages/application/driving-inspections/driving-item-check-list?CHECKTYPE_ID=' +
e.CHECKTYPE_ID + '&CHECKTYPE_NAME=' + e.CHECKTYPE_NAME + '&WAYBILLREGISTRATION_ID=' + e.WAYBILLREGISTRATION_ID
});
}
}
}
</script>
<style>

View File

@ -0,0 +1,622 @@
<template><!-- 源自pages/application/hidden-trouble-investigation/hidden-trouble-app/check-items-custom-list.vue -->
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">{{CHECKTYPE_NAME}}排查项111</block>
</cu-custom>
<scroll-view scroll-y>
<view class="check-items" v-for="(item,index) in list" :key="item.CUSTOM_ITEM_ID">
<view class="title">检查项名称:{{item.CHECKITEMNAME}}</view>
<view class="title">检查项说明:{{item.REMARKS}}</view>
<view class="check-items-select">
<radio-group class="block">
<view class="flex justify-between padding-sm">
<view class="select">
<view @click="checkTrue({index:index},0)" class="flex align-center">
<radio class='mr10' :class="item.ISNORMAL==0?'checked':''" :checked="item.ISNORMAL==0" disabled></radio>
<text>合格</text>
</view>
</view>
<view class="select">
<view @click="checkTrue({index:index},1)" class="flex align-center">
<radio class='red mr10' :class="item.ISNORMAL==1?'checked':''" :checked="item.ISNORMAL==1" disabled ></radio>
<text>不合格</text>
</view>
</view>
</view>
<view v-if="item.ISNORMAL==0 || item.ISNORMAL==1" class="input" >
<textarea :disabled="item.OPERATION_TYPE === 1 ? true : false" maxlength="-1" v-model="item.REMARK" placeholder="检查详细描述" :class="item.OPERATION_TYPE === 1 ? 'bgh' : ''" style="border: 1px solid #eeeeee; z-index: 999; height: 50px; padding: 10px;font-size: 12px; width: 100%"></textarea>
</view>
</radio-group>
</view>
</view>
<view class="check-items">
<!-- <view class="cu-bar bg-white margin-top">-->
<!-- <view class="action">-->
<!-- 检查照片-->
<!-- </view>-->
<!-- <view class="action">-->
<!-- {{ checkimgList.length }}/4-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="cu-form-group">-->
<!-- <view class="grid col-4 grid-square flex-sub">-->
<!-- <view class="bg-img" v-for="(item,index) in checkimgList" :key="index" @tap="viewImage(index,'checkimgList')">-->
<!-- <image :src="baseImgPath + item.filePath" mode="aspectFill"></image>-->
<!-- <view class="cu-tag bg-red" @tap.stop="delImg" data-type="2" :data-index="index">-->
<!-- <text class='cuIcon-close'></text>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="solids" @tap="chooseImage()" v-if="checkimgList.length<4">-->
<!-- <text class='cuIcon-cameraadd'></text>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="de-drawer">
<view class="bg-white">
<view class="action">实时照片</view>
<view style="color: red;font-size: 10px">*照片说明车辆正前方左右两侧45°角及车尾部拍照</view>
</view>
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in liveImgs" :key="index">
<image
:src="baseImgPath + item.filePath"
mode="aspectFill"
@click="clickImg(baseImgPath + item.filePath)"
>
</image>
<!-- 删除图片按钮 -->
<view class="cu-tag bg-red" @tap.stop="DelImg(index)" data-type="0">
<text class='cuIcon-close'></text>
</view>
</view>
<!-- 上传图片按钮仅当没有图片时显示 -->
<view class="solids" @tap="ChooseImage"
v-if="liveImgs.length < 4">
<text class='cuIcon-cameraadd'></text>
</view>
</view>
</view>
</view>
</view>
<view class="check-items">
<view class="wui-sign" >
<view class="title">负责人签字</view>
<button class="cu-btn bg-green shadow" @tap="showModal" data-target="Modal">手写签字</button>
</view>
<view class="wui-sign-box" v-show="imgList && imgList.length > 0">
<view class="sign-title">
签字照片
</view>
<view class="wui-sign-cotent">
<view class="sign-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" data-type="0" :data-url="imgList[index].filePath">
<image :src="imgList[index].filePath" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='Modal'?'show':''">
<writing-board @confirm="subCanvas" @cancel="hideModal"></writing-board>
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
<canvas style="width: 300px; height: 150px; position: absolute; top: -9999px;" canvas-id="watermarkCanvas"></canvas>
<view class="bottom-fixed" @tap.stop="openAuth('ACCESS_FINE_LOCATION')">
<button :loading="buttonloading" class="cu-btn bg-green" @click="$noMultipleClicks(goSubmit)"></button>
</view>
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(save)" :permissionID="permissionID"></yk-authpup>
</view>
</template>
<script>
import {
basePath,corpinfoId,loginUser,loginSession,formatDate,baseImgPath
} from '@/common/tool.js';
import gcoord from '@/common/gcoord.js'
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
export default {
data() {
return {
baseImgPath:baseImgPath,
permissionID:'',
noClick:true,
buttonloading: false,
list: [],
pd:[],
CHECKTYPE_ID:'',
checkimgList:[],
modalName:null,
imgList:[],
liveImgs: [],
}
},
onLoad(e){
this.todayDate = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
this.CHECKTYPE_ID=e.CHECKTYPE_ID;
this.CHECKTYPE_NAME = e.CHECKTYPE_NAME;
this.WAYBILLREGISTRATION_ID = e.WAYBILLREGISTRATION_ID;
console.log(this.WAYBILLREGISTRATION_ID)
this.getData();
loginSession();
},
onShow() {
var _this = this;
if(_this.initflag){
_this.initflag = false;
_this.$forceUpdate();//
}
},
methods: {
ChooseImage() {
var _this = this;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['camera'],
success: (res) => {
const tempFilePath = res.tempFilePaths[0];
uni.getLocation({
type: 'gcj02',
geocode: true,
success: function (locationRes) {
const locationAddress = `${locationRes.address.province}${locationRes.address.city}${locationRes.address.district}${locationRes.address.street}${locationRes.address.streetNum}${locationRes.address.poiName}`;
//
const ctx = uni.createCanvasContext('watermarkCanvas', _this);
ctx.drawImage(tempFilePath, 0, 0, 300, 150); //
ctx.setFontSize(20); //
ctx.setFillStyle('red'); //
ctx.setFontSize(10); //
//
ctx.fillText(`当前时间: ${_this.todayDate}`, 10, 120); //
ctx.fillText(`当前位置: ${locationAddress}`, 10, 130); //
ctx.draw(false, () => {
//
uni.canvasToTempFilePath({
canvasId: 'watermarkCanvas',
success: function(res) {
let img = {
IMGFILES_ID: '',
FILEPATH: res.tempFilePath // 使
};
_this.uploadFilePromise(img.FILEPATH, 'file')
// _this.liveImgs.push(img)
console.log(_this.liveImgs)
// .then(() => {
// uni.showToast({
// title: '',
// icon: 'success'
// });
// }).catch(error => {
// uni.showToast({
// title: ': ' + error,
// icon: 'none'
// });
// });
}
}, _this);
});
},
fail: function () {
uni.showToast({
title: '获取位置信息失败',
icon: 'none'
});
}
});
}
});
},
clickImg(url) {
uni.previewImage({
urls: [url],
current: '',
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
DelImg(index) {
var _this = this;
uni.showModal({
content: '确定要删除这张图片吗?',
cancelColor: "#000000",
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
_this.liveImgs.splice(index,1)
}
}
})
},
uploadFilePromise(filePath, name) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: basePath + '/app/drivingtype/saveFile',
filePath: filePath,
name: name,
formData: {
CORPINFO_ID:loginUser.CORPINFO_ID,
},
success: ({data}) => {
let img = {};
img.filePath = JSON.parse(data).FILE_PATH;
this.liveImgs.push(img)
console.log(this.liveImgs)
},
fail: (err) => {
uni.showModal({
content: "图片上传失败",
showCancel: false
});
}
});
});
},
// delImg(e) {
// var _this = this;
// uni.showModal({
// title: '',
// content: '',
// cancelColor: "#000000",
// cancelText: '',
// confirmText: '',
// success: res => {
// if (res.confirm) {
// uni.request({
// url: basePath+'/app/eightwork/deleteFile',
// method: 'POST',
// dataType: 'json',
// header: {
// 'Content-type':'application/x-www-form-urlencoded'
// },
// data: {
// FILE_PATH:_this.checkimgList[e.currentTarget.dataset.index].filePath
// },
// success: (res) => {
// uni.showToast({
// icon: 'none',
// title: '',
// duration: 1500
// });
// this.checkimgList.splice(e.currentTarget.dataset.index, 1)
// },
// fail: (err) => {
// uni.showModal({
// content: "",
// showCancel: false
// });
// }
// })
// }
// }
// })
// },
// chooseImage() {
// uni.chooseImage({
// count: 1, //9
// sizeType: ['original', 'compressed'], //
// sourceType: ['camera', 'album'], //
// success: (res) => {
// uni.uploadFile({
// url: basePath+'/app/eightwork/saveFile',
// filePath: res.tempFilePaths[0],
// name: 'file',
// formData: {
// CORPINFO_ID:loginUser.CORPINFO_ID,
// },
// success: ({data}) => {
// let img = {};
// img.filePath = JSON.parse(data).FILE_PATH;
// this.checkimgList.push(img)
// console.log(this.checkimgList)
// },
// fail: (err) => {
// uni.showModal({
// content: "",
// showCancel: false
// });
// }
// })
// }
// });
// },
/*
*手写板
*/
showModal(e) {
this.modalName = e.currentTarget.dataset.target
},
hideModal(e) {
this.modalName = null
},
uploadImgFaults(files,signtime) {
this.imgList.map((item,index) => {
var img = {}
img.name = 'file'+index
img.uri = item.filePath
files.push(img)
signtime.push(item.SIGNER_TIME)
})
},
//
subCanvas(e) {
this.imgList.splice(0,this.imgList.length);
this.imgList.push(e);
e.SIGNER_TIME = formatDate(new Date(), 'yyyy-MM-dd hh:mm');
this.hideModal()
},
ViewImage(e) {
let files =[];
files.push(e.currentTarget.dataset.url)
uni.previewImage({
urls: files,
current: e.currentTarget.dataset.url
});
},
getData() {
var _this = this;
console.log(_this)
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/drivingtype/listForSafetyDrivingType', // /app/listmanager/goCheck
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
CHECKTYPE_ID: _this.CHECKTYPE_ID,
USER_NAME : loginUser.NAME,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.pd=res.data.pd;
_this.list = res.data.varList;
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
});
},
openAuth(permissionID){
this.permissionID = permissionID;
setTimeout(()=>{
this.$refs['authpup'].open();
},200)
},
//
save: function (){
var _this = this;
for(var i=0;i<_this.list.length;i++){
if(this.list[i].ISNORMAL && this.list[i].OPERATION_TYPE === 2) {
var REMARK = ''
if (this.list[i].ISNORMAL === 0 || this.list[i].ISNORMAL === 1) {
REMARK = _this.list[i].REMARK
}
if (!REMARK) {
uni.showToast({
icon: 'none',
title: '第'+(i+1)+'项检查为填写检查,检查结果不能为空',
duration: 1500
});
return;
}
}
}
uni.showLoading({
title: '请稍候'
})
var items=[];
var ids=[];
for(var i=0;i<_this.list.length;i++){
var item = {};
if(_this.list[i].ISNORMAL>-1 ) {
item.CUSTOM_ITEM_ID = _this.list[i].CUSTOM_ITEM_ID
item.ISNORMAL = _this.list[i].ISNORMAL
if (_this.list[i].ISNORMAL === 0 || _this.list[i].ISNORMAL === 1) {
item.REMARK = _this.list[i].REMARK
}
item.DRIVINGTYPE_ID = _this.list[i].DRIVINGTYPE_ID
items.push(item)
}
}
let longitude;
let latitude;
uni.getLocation({
type: 'GCJ02',
success: function (res1) {
longitude = res1.longitude;
latitude = res1.latitude;
var result = gcoord.transform(
[longitude, latitude], //
gcoord.GCJ02, //
gcoord.BD09 //
);
longitude = result[0];
latitude = result[1];
// post
this.buttonloading = true
uni.request({
url: basePath+'/app/customCheckRecord/add', // /app/checkrecord/add'
xhrFields: {
withCredentials: true
},
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
CUSTOM_ID:_this.listId,
LIST_NAME:_this.listName,
CREATOR:loginUser.NAME,
LATITUDE:latitude,
LONGITUDE:longitude,
ITEMS:JSON.stringify(items),
IDS:ids.join(","),
CHECKRECORD_ID:_this.CHECKRECORD_ID,
tm:new Date().getTime(),
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: function(res){
this.buttonloading = false
if("success" == res.data.result){
uni.showToast({
icon: 'none',
title: '提交成功',
duration: 1500
});
setTimeout(function(){
var pages = getCurrentPages(); //
var prePage = pages[pages.length - 2]; //
prePage.$vm.initflag = true; // A init true
uni.navigateBack({});
uni.hideLoading();
},1500);
}else {
uni.showToast({
title: "系统错误",
duration: 2000
});
}
}
})
},
fail: function(res){
uni.hideLoading();
uni.showToast({
title: "获取位置失败",
duration: 2000
});
}
});
},
goSubmit(){
var _this = this;
let required = true
uni.showLoading({
title: '请稍候'
})
if (_this.liveImgs.length <= 0) {
uni.showToast({
icon: 'none',
title: '请上传车辆检查照片',
duration: 1500
});
return;
}
if (_this.liveImgs.length < 4) {
uni.showToast({
icon: 'none',
title: '车辆检查需要4张照片',
duration: 1500
});
return;
}
if (_this.imgList.length <= 0) {
uni.showToast({
icon: 'none',
title: '请签字',
duration: 1500
});
return;
}
var files = [];
var signtime = [];
const formData={}
this.uploadImgFaults(files,signtime)
formData.SIGNTIME = signtime
formData.CORPINFO_ID = loginUser.CORPINFO_ID
formData.USER_ID = loginUser.USER_ID
formData.USER_NAME = loginUser.USERNAME
formData.CHECKTYPE_ID = this.CHECKTYPE_ID
formData.IMG_PATH = this.liveImgs.map(item => {
return item.filePath
}).join(",")
formData.checklist = JSON.stringify(this.list)
if(this.CHECKTYPE_NAME == "出车前" || this.CHECKTYPE_NAME == "行车中"){
formData.WAYBILLSTATUS = 1
}else if (this.CHECKTYPE_NAME == "收车后"){
formData.WAYBILLSTATUS = 2
}
formData.WAYBILLREGISTRATION_ID = this.WAYBILLREGISTRATION_ID
console.log(JSON.stringify(this.list))
uni.uploadFile({
url: basePath+'app/drivingitem/add',
files: files,
formData:formData,
success: (res) => {
uni.showToast({
icon:'none',
title: '保存成功',
duration: 2000
});
_this.goback()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
},
goback(){
var pages = getCurrentPages(); //
var prePage = pages[pages.length - 2]; //
prePage.$vm.initflag = true; // A init true
uni.navigateBack({delta: 2});
uni.hideLoading();
},
//
checkTrue(e,STATUS) {
let _this=this;
_this.list[e.index].ISNORMAL=STATUS;
console.log(_this.list[e.index].ISNORMAL)
_this.$forceUpdate();//
_this.$set(_this.list[e.index], 'REMARK', _this.list[e.index].REMARK)
},
}
}
</script>
<style>
.select radio {
transform: scale(0.9);
}
.bgh{
background: #f8f6f6;
color: #d9d7d7;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="app-banner">
<image src="../../static/apps-banner.png" mode=""></image>
<image src="../../static/banner.png" mode=""></image>
</view>
<view class="apps-box">
<view class="apps-row">

View File

@ -3,7 +3,7 @@
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID"></yk-authpup>
<cu-custom bgColor="bg-gradual-blueness" :isRingt="true">
<block slot="content">秦安安全首页</block>
<block slot="content">交运安全首页</block>
<block slot="right">
<!-- <view class="icon-ui" @click="$noMultipleClicks(scan)">-->
<!-- <text class="cuIcon-scan"></text>-->
@ -54,7 +54,7 @@
</view> -->
</view>
<view class="banner_img">
<image src="../../static/banner.jpg" mode=""></image>
<image src="../../static/apps-banner.png" mode=""></image>
</view>
</view>
<view class="container">

View File

@ -46,7 +46,7 @@
</navigator>
</view>
</view>
<view
<!-- <view
style="width: 100%;color: #fff;position: absolute;left: 50%;transform: translateX(-50%);bottom: 50upx;display: flex;justify-content: center;align-items: center">
<radio-group>
<radio :checked="radio === '1'" @click="radioChange"></radio>
@ -61,7 +61,7 @@
隐私政策
</navigator>
</view>
</view>
</view>-->
</view>
</template>
@ -87,8 +87,8 @@
data() {
return {
noClick: true,
userName: '130324198402060201',
userPwd: 'Aa@123456',
userName: '',
userPwd: '',
radio: ''
}
},
@ -199,13 +199,13 @@
this.userPwd = e.detail.value
},
login() {
if (this.radio !== '1') {
/*if (this.radio !== '1') {
uni.showToast({
title: '请先阅读并同意《服务协议》和《隐私政策》',
icon: 'none'
})
return;
}
}*/
var _this = this;
var userName = _this.userName;
var userPwd = _this.userPwd;

View File

@ -22,7 +22,7 @@
<view class="title is-required">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" disabled :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker" style="color: #cccccc">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
{{formData.PERSONNEL_TYPE.join()}}
</view>
</picker>
</view>

View File

@ -7,27 +7,42 @@
<scroll-view scroll-y="false" >
<view class="form">
<view class="cu-form-group">
<view class="title is-required">姓名</view>
<view class="title">姓名</view>
<input v-model="formData.NAME" disabled placeholder="请输入姓名" maxlength="50" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">身份证号</view>
<view class="title">身份证号</view>
<input v-model="formData.USER_ID_CARD" disabled placeholder="请输入身份证号" maxlength="18" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">手机</view>
<input v-model="formData.PHONE" disabled placeholder="请输入手机" maxlength="11" name="input" style="color: #cccccc" />
<view class="title">手机</view>
<input v-model="formData.PHONE" disabled placeholder="请输入手机号" maxlength="11" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">人员类型</view>
<view class="title">人员类型</view>
<zqs-select
:multiple="true"
:list="dictData.PERSONNEL_TYPE.list"
:show-search="false"
v-model="formData.PERSONNEL_TYPE"
label-key="NAME"
value-key="NAME"
placeholder="请选择人员类型"
title="选择人员类型"
clearable
@change="changeSelect($event, 'PERSONNEL_TYPE')"
></zqs-select>
</view>
<!-- <view class="cu-form-group margin-top-xs">
<view class="title">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
</view>
</picker>
</view>
</view>-->
<view class="cu-form-group margin-top">
<view class="title is-required">文化程度</view>
<view class="title">文化程度</view>
<picker @change="pickerChangeData($event,'DEGREE_OF_EDUCATION')" :value="dictData.DEGREE_OF_EDUCATION.index" :range="dictData.DEGREE_OF_EDUCATION.list" range-key="NAME">
<view class="picker">
{{formData.DEGREE_OF_EDUCATIONNAME?formData.DEGREE_OF_EDUCATIONNAME:'请选择'}}
@ -35,7 +50,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">政治面貌</view>
<view class="title">政治面貌</view>
<picker @change="pickerChangeData($event,'POLITICAL_OUTLOOK')" :value="dictData.POLITICAL_OUTLOOK.index" :range="dictData.POLITICAL_OUTLOOK.list" range-key="NAME">
<view class="picker">
{{formData.POLITICAL_OUTLOOKNAME?formData.POLITICAL_OUTLOOKNAME:'请选择'}}
@ -43,7 +58,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">参加工作日期</view>
<view class="title">参加工作日期</view>
<picker mode="date" @change="changeDate($event,'WORKING_DATE')" :value="formData.WORKING_DATE" :end="limitData.WORKING_DATE.end">
<view class="picker">
{{formData.WORKING_DATE?formData.WORKING_DATE:'请选择'}}
@ -51,35 +66,19 @@
</picker>
</view>
<view class="cu-form-group">
<view class="title is-required">健康状况</view>
<view class="title">健康状况</view>
<input v-model="formData.HEALTH" placeholder="请输入健康状况" maxlength="50" name="input" />
</view>
<view class="cu-form-group">
<view class="title is-required">毕业院校及专业</view>
<input v-model="formData.UNIVERSITY" placeholder="请输入毕业院校及专业" maxlength="50" name="input" />
</view>
<view class="cu-form-group">
<view class="title is-required">户籍所在地</view>
<input v-model="formData.RESIDENCE" placeholder="请输入户籍所在地" maxlength="50" name="input" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">之前从事本岗位时间</view>
<picker mode="date" @change="changeDate($event,'PREVIOUS_POST_DATE')" :value="formData.PREVIOUS_POST_DATE" :end="limitData2.PREVIOUS_POST_DATE.end">
<view class="picker">
{{formData.PREVIOUS_POST_DATE?formData.PREVIOUS_POST_DATE:'请选择'}}
</view>
</picker>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">主要工作经历</view>
<view class="cu-form-title">主要工作经历</view>
<textarea v-model="formData.WORK_EXPERIENCE" maxlength="200" placeholder="请输入主要工作经历"></textarea>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">入职前接受安全培训和考核以及取得安全培训有关的岗位证书等情况</view>
<view class="cu-form-title">入职前接受安全培训和考核以及取得安全培训有关的岗位证书等情况</view>
<textarea v-model="formData.CERTIFICATES" maxlength="200" placeholder="请输入入职前接受安全培训和考核以及取得安全培训有关的岗位证书等情况"></textarea>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">入职前受过何种有关安全生产的处罚以及是否受到刑事处罚</view>
<view class="cu-form-title">入职前受过何种有关安全生产的处罚以及是否受到刑事处罚</view>
<textarea v-model="formData.PUNISH" maxlength="200" placeholder="请输入入职前受过何种有关安全生产的处罚以及是否受到刑事处罚"></textarea>
</view>
@ -96,8 +95,10 @@
import {
formatDate,validateIdCard,validateMobile,getLevel
} from '../../../common/tool.js';
import ZqsSelect from "../../../components/zqs-select/zqs-select.vue";
export default {
name: "register_baseInfo",
components: {ZqsSelect},
props: {
formData: {
type: Object,
@ -115,11 +116,6 @@ import {
//
WORKING_DATE:{ start: '', end: '' },
},
//
limitData2: {
//
PREVIOUS_POST_DATE:{ start: '', end: '' },
},
dictData:{
//
PERSONNEL_TYPE:{
@ -142,7 +138,6 @@ import {
mounted() {
this.getDictList()
this.limitData.WORKING_DATE.end = formatDate(new Date(), 'yyyy-MM-dd'); //
this.limitData2.PREVIOUS_POST_DATE.end = formatDate(new Date(), 'yyyy-MM-dd'); //
},
methods: {
async getDictList(){
@ -164,6 +159,9 @@ import {
this.formData[name] = e.detail.value
this.$forceUpdate();//
},
changeSelect(e, name) {
this.$forceUpdate();//
},
pickerChangeData(e,name) {
//
if (name === 'PERSONNEL_TYPE') {
@ -194,7 +192,7 @@ import {
},
validateData() {
//
if (!this.formData.PERSONNEL_TYPE) {
if (this.formData.PERSONNEL_TYPE.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择人员类型',
@ -202,86 +200,6 @@ import {
});
return false;
}
if (!this.formData.DEGREE_OF_EDUCATIONNAME) {
uni.showToast({
icon: 'none',
title: '请选择文化程度',
duration: 2000
});
return false;
}
if (!this.formData.POLITICAL_OUTLOOKNAME) {
uni.showToast({
icon: 'none',
title: '请选择政治面貌',
duration: 2000
});
return false;
}
if (!this.formData.WORKING_DATE) {
uni.showToast({
icon: 'none',
title: '请选择参加工作日期',
duration: 2000
});
return false;
}
if (!this.formData.HEALTH) {
uni.showToast({
icon: 'none',
title: '健康状况不能为空',
duration: 2000
});
return false;
}
if (!this.formData.UNIVERSITY) {
uni.showToast({
icon: 'none',
title: '毕业院校及专业不能为空',
duration: 2000
});
return false;
}
if (!this.formData.RESIDENCE) {
uni.showToast({
icon: 'none',
title: '户籍所在地不能为空',
duration: 2000
});
return false;
}
if (!this.formData.PREVIOUS_POST_DATE) {
uni.showToast({
icon: 'none',
title: '请选择之前从事本岗位时间',
duration: 2000
});
return false;
}
if (!this.formData.WORK_EXPERIENCE) {
uni.showToast({
icon: 'none',
title: '主要工作经历不能为空',
duration: 2000
});
return false;
}
if (!this.formData.CERTIFICATES) {
uni.showToast({
icon: 'none',
title: '入职前接受安全培训和考核以及取得安全培训有关的岗位证书等情况不能为空',
duration: 2000
});
return false;
}
if (!this.formData.PUNISH) {
uni.showToast({
icon: 'none',
title: '入职前受过何种有关安全生产的处罚以及是否受到刑事处罚不能为空',
duration: 2000
});
return false;
}
return true;
},

View File

@ -7,22 +7,22 @@
<scroll-view scroll-y="false" >
<view class="form">
<view class="cu-form-group">
<view class="title is-required">姓名</view>
<view class="title">姓名</view>
<input v-model="formData.NAME" disabled placeholder="请输入姓名" maxlength="50" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">身份证号</view>
<view class="title">身份证号</view>
<input v-model="formData.USER_ID_CARD" disabled placeholder="请输入身份证号" maxlength="18" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">手机</view>
<input v-model="formData.PHONE" disabled placeholder="请输入手机" maxlength="11" name="input" style="color: #cccccc" />
<view class="title">手机</view>
<input v-model="formData.PHONE" disabled placeholder="请输入手机号" maxlength="11" name="input" style="color: #cccccc" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">人员类型</view>
<view class="title">人员类型</view>
<picker @change="pickerChangeData($event,'PERSONNEL_TYPE')" disabled :value="dictData.PERSONNEL_TYPE.index" :range="dictData.PERSONNEL_TYPE.list" range-key="NAME">
<view class="picker" style="color: #cccccc">
{{formData.PERSONNEL_TYPENAME?formData.PERSONNEL_TYPENAME:'请选择'}}
{{formData.PERSONNEL_TYPE.join()}}
</view>
</picker>
</view>
@ -30,7 +30,7 @@
<!-- 身份证 -->
<uni-section title="身份证" type="line" class="margin-top" padding>
<view class="cu-bar bg-white margin-top">
<view class="action is-required" style="font-size: 28upx; font-weight: bold; color: #000;">
<view class="action" style="font-size: 28upx; font-weight: bold; color: #000;">
身份证正面
</view>
<view class="action">
@ -51,7 +51,7 @@
</view>
</view>
<view class="cu-bar bg-white margin-top-xs">
<view class="action is-required" style="font-size: 28upx; font-weight: bold; color: #000;">
<view class="action" style="font-size: 28upx; font-weight: bold; color: #000;">
身份证背面
</view>
<view class="action">
@ -72,7 +72,7 @@
</view>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">生日</view>
<view class="title">生日</view>
<picker mode="date" @change="changeDate($event,'DATE_OF_BIRTH')" :value="formData.DATE_OF_BIRTH" :end="limitData.DATE_OF_BIRTH.end">
<view class="picker">
{{formData.DATE_OF_BIRTH?formData.DATE_OF_BIRTH:'请选择'}}
@ -80,7 +80,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">民族</view>
<view class="title">民族</view>
<picker @change="pickerChangeData($event,'NATION')" :value="dictData.NATION.index" :range="dictData.NATION.list" range-key="NAME">
<view class="picker">
{{formData.NATIONNAME?formData.NATIONNAME:'请选择'}}
@ -88,7 +88,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">性别</view>
<view class="title">性别</view>
<picker @change="pickerChangeData($event,'SEX')" :value="dictData.SEX.index" :range="dictData.SEX.list" range-key="NAME">
<view class="picker">
{{formData.SEXNAME?formData.SEXNAME:'请选择'}}
@ -96,7 +96,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期起始</view>
<view class="title">有效期起始</view>
<picker mode="date" @change="changeDate($event,'ID_CARD_VALIDITY_START')" :value="formData.ID_CARD_VALIDITY_START" >
<view class="picker">
{{formData.ID_CARD_VALIDITY_START?formData.ID_CARD_VALIDITY_START:'请选择'}}
@ -104,7 +104,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期截止</view>
<view class="title">有效期截止</view>
<picker mode="date" @change="changeDate($event,'ID_CARD_VALIDITY_END')" :value="formData.ID_CARD_VALIDITY_END" >
<view class="picker">
{{formData.ID_CARD_VALIDITY_END?formData.ID_CARD_VALIDITY_END:'请选择'}}
@ -112,11 +112,11 @@
</picker>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">住址</view>
<view class="cu-form-title">住址</view>
<textarea maxlength="150" v-model="formData.ID_CARD_ADDRESS" placeholder="请输入身份证住址"></textarea>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">签发机关</view>
<view class="cu-form-title">签发机关</view>
<textarea maxlength="150" v-model="formData.ID_CARD_ORGAN" placeholder="请输入身份证签发机关"></textarea>
</view>
</uni-section>
@ -124,7 +124,7 @@
<!-- 驾驶证 -->
<uni-section title="驾驶证" type="line" class="margin-top" padding>
<view class="cu-bar bg-white margin-top">
<view class="action is-required" style="font-size: 28upx; font-weight: bold; color: #000;">
<view class="action" style="font-size: 28upx; font-weight: bold; color: #000;">
驾驶证
</view>
<view class="action">
@ -145,11 +145,11 @@
</view>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">驾驶证号</view>
<view class="title">驾驶证号</view>
<input v-model="formData.DRIVER_LICENSE_NO" placeholder="请输入驾驶证号" maxlength="18" name="input" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">准驾车型</view>
<view class="title">准驾车型</view>
<zqs-select
:multiple="true"
:list="dictData.DRIVING_MODEL.list"
@ -164,7 +164,7 @@
></zqs-select>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">国籍</view>
<view class="title">国籍</view>
<zqs-select
:multiple="false"
:list="dictData.NATIONALITY.list"
@ -175,11 +175,10 @@
placeholder="请选择国籍"
title="选择国籍"
clearable
@search="searchSelectNationality($event, 'NATIONALITY')"
></zqs-select>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">初次领证日期</view>
<view class="title">初次领证日期</view>
<picker mode="date" @change="changeDate($event,'DRIVER_LICENSE_ISSUE_DATE')" :value="formData.DRIVER_LICENSE_ISSUE_DATE" >
<view class="picker">
{{formData.DRIVER_LICENSE_ISSUE_DATE?formData.DRIVER_LICENSE_ISSUE_DATE:'请选择'}}
@ -187,7 +186,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期起始</view>
<view class="title">有效期起始</view>
<picker mode="date" @change="changeDate($event,'DRIVER_LICENSE_VALIDITY_START')" :value="formData.DRIVER_LICENSE_VALIDITY_START" >
<view class="picker">
{{formData.DRIVER_LICENSE_VALIDITY_START?formData.DRIVER_LICENSE_VALIDITY_START:'请选择'}}
@ -195,7 +194,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期截止</view>
<view class="title">有效期截止</view>
<picker mode="date" @change="changeDate($event,'DRIVER_LICENSE_VALIDITY_END')" :value="formData.DRIVER_LICENSE_VALIDITY_END" >
<view class="picker">
{{formData.DRIVER_LICENSE_VALIDITY_END?formData.DRIVER_LICENSE_VALIDITY_END:'请选择'}}
@ -203,7 +202,7 @@
</picker>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">签发机关</view>
<view class="cu-form-title">签发机关</view>
<textarea maxlength="150" v-model="formData.DRIVER_LICENSE_ORGAN" placeholder="请输入驾驶证签发机关"></textarea>
</view>
</uni-section>
@ -211,7 +210,7 @@
<!-- 道路运输从业人员从业资格证 -->
<uni-section title="道路运输从业人员从业资格证" type="line" class="margin-top" padding>
<view class="cu-bar bg-white margin-top">
<view class="action is-required" style="font-size: 28upx; font-weight: bold; color: #000;">
<view class="action" style="font-size: 28upx; font-weight: bold; color: #000;">
从业资格证
</view>
<view class="action">
@ -232,11 +231,11 @@
</view>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">从业资格证号</view>
<view class="title">从业资格证号</view>
<input v-model="formData.QUALIFICATION_CERTIFICATE_NO" placeholder="请输入从业资格证号" maxlength="18" name="input" />
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">从业资格类别</view>
<view class="title">从业资格类别</view>
<zqs-select
:multiple="true"
:list="dictData.QUALIFICATION_CERTIFICATE_CATEGORY.list"
@ -251,10 +250,10 @@
></zqs-select>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">国籍</view>
<view class="title">国籍</view>
<zqs-select
:multiple="false"
:list="dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.list"
:list="dictData.NATIONALITY.list"
:show-search="true"
v-model="formData.QUALIFICATION_CERTIFICATE_NATIONALITY"
label-key="NAME"
@ -262,11 +261,10 @@
placeholder="请选择国籍"
title="选择国籍"
clearable
@search="searchSelectQualificationCertificateNationality($event, 'QUALIFICATION_CERTIFICATE_NATIONALITY')"
></zqs-select>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">初次领证日期</view>
<view class="title">初次领证日期</view>
<picker mode="date" @change="changeDate($event,'QUALIFICATION_CERTIFICATE_ISSUE_DATE')" :value="formData.QUALIFICATION_CERTIFICATE_ISSUE_DATE" >
<view class="picker">
{{formData.QUALIFICATION_CERTIFICATE_ISSUE_DATE?formData.QUALIFICATION_CERTIFICATE_ISSUE_DATE:'请选择'}}
@ -274,7 +272,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期起始</view>
<view class="title">有效期起始</view>
<picker mode="date" @change="changeDate($event,'QUALIFICATION_CERTIFICATE_VALIDITY_START')" :value="formData.QUALIFICATION_CERTIFICATE_VALIDITY_START" >
<view class="picker">
{{formData.QUALIFICATION_CERTIFICATE_VALIDITY_START?formData.QUALIFICATION_CERTIFICATE_VALIDITY_START:'请选择'}}
@ -282,7 +280,7 @@
</picker>
</view>
<view class="cu-form-group margin-top-xs">
<view class="title is-required">有效期截止</view>
<view class="title">有效期截止</view>
<picker mode="date" @change="changeDate($event,'QUALIFICATION_CERTIFICATE_VALIDITY_END')" :value="formData.QUALIFICATION_CERTIFICATE_VALIDITY_END" >
<view class="picker">
{{formData.QUALIFICATION_CERTIFICATE_VALIDITY_END?formData.QUALIFICATION_CERTIFICATE_VALIDITY_END:'请选择'}}
@ -290,7 +288,7 @@
</picker>
</view>
<view class="cu-form-textarea margin-top-xs">
<view class="cu-form-title is-required-cu">签发机关</view>
<view class="cu-form-title">签发机关</view>
<textarea maxlength="150" v-model="formData.QUALIFICATION_CERTIFICATE_ORGAN" placeholder="请输入从业资格证签发机关"></textarea>
</view>
</uni-section>
@ -385,7 +383,6 @@ export default {
NATIONALITY: {
index: -1,
list:[],
tempList: [],
},
//
QUALIFICATION_CERTIFICATE_CATEGORY: {
@ -396,15 +393,12 @@ export default {
QUALIFICATION_CERTIFICATE_NATIONALITY: {
index: -1,
list:[],
tempList: [],
},
}
}
},
mounted() {
this.getDictList()
this.getNationality()
this.getQualificationCertificateNationality()
var _this = this
let now = new Date();
var birthEnd=now.setFullYear(now.getFullYear()-17);
@ -426,32 +420,14 @@ export default {
this.dictData.NATION.list = await getLevel({DICTIONARIES_ID: '0a0e406f27f74ee698fe9979d25f62dd'});
//
this.dictData.DRIVING_MODEL.list = await getLevel({DICTIONARIES_ID: 'b41e247057334789b60bdf3fe6d8d6ba'});
//
this.dictData.NATIONALITY.list = await getLevel({DICTIONARIES_ID: '3b614b43e8814f51a3492f2fdbc9a415'});
//
this.dictData.QUALIFICATION_CERTIFICATE_CATEGORY.list = await getLevelCustom({DICTIONARIES_ID: 'ed38fa5f78c64e6d906d2bad0d72bd63', LEVEL: 3});
this.dictData.QUALIFICATION_CERTIFICATE_CATEGORY.list.forEach((item) => {
item.NAME = ''+ item.BIANMA + ' ' + item.NAME
})
},
async getNationality(){
//
this.dictData.NATIONALITY.list = await getLevel({DICTIONARIES_ID: '3b614b43e8814f51a3492f2fdbc9a415'});
this.dictData.NATIONALITY.tempList = JSON.parse(JSON.stringify(this.dictData.NATIONALITY.list));
},
async getQualificationCertificateNationality(){
this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.list = await getLevel({DICTIONARIES_ID: '3b614b43e8814f51a3492f2fdbc9a415'});
this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.tempList = JSON.parse(JSON.stringify(this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.list));
},
searchSelectNationality(e, name) {
this.dictData.NATIONALITY.list = JSON.parse(JSON.stringify(this.dictData.NATIONALITY.tempList));
if (e) {
this.dictData.NATIONALITY.list = this.dictData[name].list.filter(item => item.NAME.indexOf(e) > -1);
}
},
searchSelectQualificationCertificateNationality(e, name) {
this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.list = JSON.parse(JSON.stringify(this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.tempList));
if (e) {
this.dictData.QUALIFICATION_CERTIFICATE_NATIONALITY.list = this.dictData[name].list.filter(item => item.NAME.indexOf(e) > -1);
}
},
//
confirmCertificate() {
@ -594,18 +570,19 @@ export default {
uni.hideLoading();
},
validateData() {
if (!this.formData.ID_CARD_FRONT) {
//
if (this.fileData.idCardFront.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传身份证(正面)',
title: '请上传身份证照片(正面)',
duration: 2000
});
return false;
}
if (!this.formData.ID_CARD_BACK) {
if (this.fileData.idCardBack.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传身份证(反面)',
title: '请上传身份证照片(背面)',
duration: 2000
});
return false;
@ -642,14 +619,6 @@ export default {
});
return false;
}
if (new Date(this.formData.ID_CARD_VALIDITY_START).getTime() > new Date(this.formData.ID_CARD_VALIDITY_END).getTime()) {
uni.showToast({
icon: 'none',
title: '身份证有效起始时间不能超过截止时间',
duration: 2000
});
return false;
}
if (!this.formData.ID_CARD_ADDRESS) {
uni.showToast({
icon: 'none',
@ -666,73 +635,58 @@ export default {
});
return false;
}
if (this.formData.PERSONNEL_TYPE.find((item) => item === '驾驶员')) {
//
if (this.fileData.driverLicense.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传驾驶证照片',
duration: 2000
});
return false;
}
//
if (this.fileData.driverLicense.length < 1) {
uni.showToast({
icon: 'none',
title: '请上传驾驶证照片',
duration: 2000
});
return false;
if (!this.formData.DRIVER_LICENSE_NO) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证号',
duration: 2000
});
return false;
}
if (this.formData.DRIVING_MODEL.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择准驾车型',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ISSUE_DATE) {
uni.showToast({
icon: 'none',
title: '请选择初次领证日期',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_VALIDITY_START || !this.formData.DRIVER_LICENSE_VALIDITY_END) {
uni.showToast({
icon: 'none',
title: '请选择驾驶证有效期时间',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ORGAN) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证的签发机关',
duration: 2000
});
return false;
}
}
if (!this.formData.DRIVER_LICENSE_NO) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证号',
duration: 2000
});
return false;
}
if (this.formData.DRIVING_MODEL.length < 1) {
uni.showToast({
icon: 'none',
title: '请选择准驾车型',
duration: 2000
});
return false;
}
if (!this.formData.DRIVING_NATIONALITY) {
uni.showToast({
icon: 'none',
title: '请选择国籍',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ISSUE_DATE) {
uni.showToast({
icon: 'none',
title: '请选择初次领证日期',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_VALIDITY_START || !this.formData.DRIVER_LICENSE_VALIDITY_END) {
uni.showToast({
icon: 'none',
title: '请选择驾驶证有效期时间',
duration: 2000
});
return false;
}
if (new Date(this.formData.DRIVER_LICENSE_VALIDITY_START).getTime() > new Date(this.formData.DRIVER_LICENSE_VALIDITY_END).getTime()) {
uni.showToast({
icon: 'none',
title: '驾驶证有效起始时间不能超过结束时间',
duration: 2000
});
return false;
}
if (!this.formData.DRIVER_LICENSE_ORGAN) {
uni.showToast({
icon: 'none',
title: '请输入驾驶证的签发机关',
duration: 2000
});
return false;
}
//
if (this.fileData.qualificationCertificate.length < 1) {
uni.showToast({
@ -766,14 +720,6 @@ export default {
});
return false;
}
if (!this.formData.QUALIFICATION_CERTIFICATE_NATIONALITY) {
uni.showToast({
icon: 'none',
title: '请选择国籍',
duration: 2000
});
return false;
}
if (!this.formData.QUALIFICATION_CERTIFICATE_VALIDITY_START || !this.formData.QUALIFICATION_CERTIFICATE_VALIDITY_END) {
uni.showToast({
icon: 'none',
@ -782,14 +728,6 @@ export default {
});
return false;
}
if (new Date(this.formData.QUALIFICATION_CERTIFICATE_VALIDITY_START).getTime() > new Date(this.formData.QUALIFICATION_CERTIFICATE_VALIDITY_END).getTime()) {
uni.showToast({
icon: 'none',
title: '从业资格证有效起始时间不能超过结束时间',
duration: 2000
});
return false;
}
if (!this.formData.QUALIFICATION_CERTIFICATE_ORGAN) {
uni.showToast({
icon: 'none',

View File

@ -89,7 +89,7 @@
SEXNAME: '',
//
PERSONNEL_TYPE: '',
PERSONNEL_TYPE: [],
PERSONNEL_TYPENAME: '',
//
POLITICAL_OUTLOOK: '',

View File

@ -37,7 +37,7 @@
<!-- <text class="text-semi">安全承诺</text>-->
<!-- </navigator>-->
<!-- </view>-->
<view class="cu-item arrow">
<!-- <view class="cu-item arrow">
<navigator class="content" hover-class="none" url="/pages/my/agreement/agreement">
<text class="text-semi">用户服务协议</text>
</navigator>
@ -51,7 +51,7 @@
<navigator class="content" hover-class="none" url="/pages/my/help/help">
<text class="text-semi">帮助中心</text>
</navigator>
</view>
</view>-->
<view class="cu-item arrow">
<navigator class="content" hover-class="none" url="/pages/my/about/about">
<text class="text-semi">关于</text>
@ -78,7 +78,6 @@
mounted() {
this.loginUser = loginUser;
this.loginCorpId = loginUser.CORPINFO_ID
console.log('loginCorpId =>' + this.loginCorpId)
this.isRest = isRest;
if(this.loginCorpId && this.loginUser.USERNAME){
this.getData();

View File

@ -73,6 +73,35 @@
<view class="cu-tabbar-height"></view>
</scroll-view>
</block>
<block v-if="TabCur==2">
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view v-if="txlist.length>0" >
<view class="news-list">
<view class="news-item" v-for="item in txlist" :key="item.NOTICECORP_ID" @click="$noMultipleClicks(goToPcDetail,item.NOTICECORP_ID)">
<view class="news-media-list">
<view class="news-media-body">
<view class="news-media-title">
{{item.SYNOPSIS}}
</view>
<view class="news-media-text">
<text>{{item.CREATTIME}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-else-if="dataFlag=='noData'" class="dy-null">
<view class="dy-null-img">
<image src="../../static/null.png" mode=""></image>
</view>
<view class="dy-null-title">
暂无数据
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
</block>
</view>
</template>
@ -89,10 +118,11 @@
totalHeight:0,
TabCur: 0,
scrollLeft: 0,
tabNav: ['平台公告', '企业公告'],
tabNav: ['平台公告', '企业公告', '业务提醒'],
noClick:true,
list: [],
pclist: [],
txlist: [],
page:1,//--
rows:10,//--
totalCount:0,//--
@ -134,6 +164,11 @@
_this.getPcData();//
}
}
if ("2"==_this.TabCur){
if(_this.totalPage >= _this.currentPage){
_this.getTxData();//
}
}
},
onReady() {
@ -143,6 +178,9 @@
tabSelect(e) {
this.TabCur = e.currentTarget.dataset.id;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
if("2" ==this.TabCur){
this.getTxData();
}
if("1" ==this.TabCur){
this.getPcData();
}
@ -215,6 +253,39 @@
}
});
},
getTxData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/notice/listForCp',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
showCount : _this.showCount,
currentPage : _this.currentPage,
loginUserId :loginUserId,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.pclist = res.data.varList;
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
});
},
//
goToDetail(e) {
uni.navigateTo({

View File

@ -41,7 +41,7 @@
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view v-if="list.length>0" >
<view class="news-list">
<view class="news-item" v-for="item in pclist" :key="item.NOTIFICATION_ID" @click="$noMultipleClicks(goToPcDetail, item.NOTIFICATION_ID)">
<view class="news-item" v-for="item in list" :key="item.NOTIFICATION_ID" @click="$noMultipleClicks(goToPcDetail, item.NOTIFICATION_ID)">
<view class="news-media-list">
<view class="news-media-body">
<view class="news-media-title">
@ -109,6 +109,42 @@
<view class="cu-tabbar-height"></view>
</scroll-view>
</block>
<block v-if="TabCur==2">
<scroll-view class="dy-scroll-nobg" scroll-y :style="'top:'+sTop+'px;height:calc(100vh - '+totalHeight+'px)'">
<view v-if="txlist.length>0" >
<view class="news-list">
<view class="news-item" v-for="item in txlist" :key="item.NOTICECORP_ID" >
<view class="news-media-list">
<view class="news-media-body">
<view class="news-media-title" @click="$noMultipleClicks(goToTxDetail,item.NOTICECORPUSERID_ID)">
{{item.SYNOPSIS}}
<text style="float:right;">
<template v-if="item.TYPE=='0'"></template>
<template v-else-if="item.TYPE=='1'">已读</template>
</text>
</view>
<view class="news-media-text">
<text>{{item.CREATTIME}}</text>
<view v-if="item.TYPE=='1'" style="float:right;">
<button class="cu-btn round bg-red" style="height:40upx;" @click="deleteNoticeTx(item.NOTICECORPUSERID_ID)"></button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-else-if="dataFlag=='noData'" class="dy-null">
<view class="dy-null-img">
<image src="../../static/null.png" mode=""></image>
</view>
<view class="dy-null-title">
暂无数据
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
</block>
</view>
</template>
@ -125,11 +161,12 @@
totalHeight:0,
TabCur: 0,
scrollLeft: 0,
tabNav: ['平台公告', '企业公告'],
tabNav: ['平台公告', '企业公告', '业务提醒'],
noClick:true,
KEYWORDS:'',
list: [],
pclist: [],
txlist: [],
page:1,//--
rows:10,//--
totalCount:0,//--
@ -171,6 +208,11 @@
_this.getPcData();//
}
}
if ("2"==_this.TabCur){
if(_this.totalPage >= _this.currentPage){
_this.getTxData();//
}
}
},
onReady() {
},
@ -178,6 +220,9 @@
tabSelect(e) {
this.TabCur = e.currentTarget.dataset.id;
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
if("2" ==this.TabCur){
this.getTxData();
}
if("1" ==this.TabCur){
this.getPcData();
}
@ -217,7 +262,6 @@
if("success" == res.data.result){
uni.hideLoading();
_this.list = res.data.varList;
console.log(res.data.varList)
} else {
uni.showToast({
title: res.data.message,
@ -252,7 +296,6 @@
if("success" == res.data.result){
uni.hideLoading();
_this.pclist = res.data.varList;
console.log(res.data.varList)
} else {
uni.showToast({
title: res.data.message,
@ -262,17 +305,99 @@
}
});
},
getTxData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
uni.request({
url: basePath + '/app/notice/listForCp',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
showCount : _this.showCount,
currentPage : _this.currentPage,
loginUserId :loginUserId,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.txlist = res.data.varList;
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
});
},
//
goToDetail(e) {
uni.navigateTo({
url: '/pages/news/news-list-detail?id='+e+'&type=0',
url: '/pages/news/notice-list-detail?id='+e+'&type=0',
});
},
goToTxDetail(e){
uni.navigateTo({
url: '/pages/news/notice-list-detail?id='+e+'&type=1',
});
},
goToPcDetail(e){
uni.navigateTo({
url: '/pages/news/news-list-detail?id='+e+'&type=1',
});
},
deleteNoticeTx(ID){
var _this = this;
uni.showModal({
title: '',
content: '确定要删除这条记录?',
cancelColor:"#000000",
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
uni.showLoading({
title: '处理中'
})
uni.request({
url: basePath+'/app/notice/delete',
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
NOTICECORPUSERID_ID: ID
},
success: (res) => {
uni.hideLoading();
uni.showToast({
icon: 'none',
title: '删除成功',
duration: 1500
});
_this.getQuery()
},
fail: (err) => {
uni.hideLoading();
uni.showModal({
content: err.errMsg,
showCancel: false
});
}
})
}
}
})
},
deleteNotice(ID){
var _this = this;
uni.showModal({
@ -294,7 +419,9 @@
'Content-type':'application/x-www-form-urlencoded'
},
data: {
NOTIFICATION_ID: ID
NOTIFICATION_ID: ID,
USER_ID: loginUser.USER_ID,
USERNAME: loginUser.NAME
},
success: (res) => {
uni.hideLoading();

View File

@ -0,0 +1,133 @@
<template>
<view>
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">通知详情</block>
</cu-custom>
<scroll-view scroll-y>
<view class="message-warp">
<view class="title">
{{pd.SYNOPSIS}}
</view>
<view class="info">
<!-- <text>双控平台</text>-->
<text>{{pd.CREATTIME}}</text>
</view>
<view class="content">
<rich-text :nodes="content"></rich-text>
</view>
<view class="message-warp" v-if="pd.FILEPATH">
<view class="cu-item" @click="$noMultipleClicks(goStuToOpen,pd.FILEPATH)">
<view class="content">
<text class="cuIcon-read text-blue"></text>
<text class="text-grey">附件</text>
</view>
</view>
</view>
</view>
<view class="cu-tabbar-height"></view>
</scroll-view>
</view>
</template>
<script>
import {
basePath,loginUserId,corpinfoId,loginUser,baseImgPath
} from '@/common/tool.js';
import HTMLParser from "@/components/html-parser.js"
export default {
data() {
return {
id:'',
content:'',
pd:[],
type:'',
noClick:true,
}
},
onLoad(e){
this.type =e.type;
this.id=e.id;
this.getData();
console.log(e)
},
methods: {
getData() {
var _this = this;
uni.showLoading({
title: '请稍候'
})
var url = basePath + '/app/notice/goEdit'
if("1"==_this.type){
url = basePath + '/app/notice/goEditForPc'
}
console.log(_this.id)
uni.request({
url:url,
method: 'POST',
dataType: 'json',
header: {
'Content-type':'application/x-www-form-urlencoded'
},
data: {
NOTICECORPUSERID_ID:_this.id,
loginUserId:loginUserId,
corpinfoId:corpinfoId,
ISMAIN:loginUser.ISMAIN,
CORPINFO_ID:loginUser.CORPINFO_ID,
USER_ID:loginUser.USER_ID,
},
success: (res) => {
if("success" == res.data.result){
uni.hideLoading();
_this.pd = res.data.pd;
_this.content= new HTMLParser(res.data.pd.CONTENT.trim());
var pages = getCurrentPages(); //
var prePage = pages[pages.length - 2]; //
prePage.$vm.initflag = true; // A init true
} else {
uni.showToast({
title: res.data.message,
duration: 2000
});
}
}
});
},
goStuToOpen(e) {
var url=baseImgPath + e ;
var url2 = encodeURI(url);
plus.runtime.openURL(url2, function(res) {
});
},
}
}
</script>
<style>
.message-warp{
background-color: #fff;
padding: 30upx;
}
.message-warp .title {
font-size: 34upx;
margin-bottom: 20upx;
}
.info {
display: flex;
justify-content: space-between;
color: #888;
font-size: 24upx;
margin-bottom: 20upx;
}
.content {
padding: 0upx;
line-height: 1.6;
}
.content img{
width: 100%;
height: auto;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 295 KiB