行车三检
parent
081d0dab1d
commit
32efb53c27
16
pages.json
16
pages.json
|
@ -52,6 +52,22 @@
|
|||
"path": "pages/application/safetymeeting/home",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/driving-inspections/dirving-inspections-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/driving-inspections/driving-item-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/driving-inspections/driving-item-detail",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/driving-inspections/driving-item-check-list",
|
||||
"style": {}
|
||||
},
|
||||
{
|
||||
"path": "pages/application/safetymeeting/safetymeeting-detail",
|
||||
"style": {}
|
||||
|
|
|
@ -0,0 +1,367 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">行车三检</block>
|
||||
</cu-custom>
|
||||
<view class="top-fixed">
|
||||
<view>
|
||||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form radius" style="margin-left: 0;">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input v-model="KEYWORDS" placeholder="请输入"></input>
|
||||
|
||||
</view>
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="search()">搜索</button>
|
||||
<button class="cu-btn bg-blue shadow-blur radius" @click="reset()" style="margin-left: 10px">重置</button>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<block >
|
||||
<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="dy-card" v-for="item in list" :key="item.LISTMANAGER_ID" @click="$noMultipleClicks(goToList,{listId:item.WAYBILLREGISTRATION_ID,WAYBILLSTATUS:item.WAYBILLSTATUS})">
|
||||
<view class="dy-card-title">
|
||||
<text><text style="margin-right: 10upx;color: #07BB07;">★</text>{{item.WAYBILLNUMBER}}</text>
|
||||
<text class="cuIcon-right f30 text-gray"></text>
|
||||
</view>
|
||||
<view class="dy-card-content">
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">运输车辆:{{item.TRANSPORTVEHICLE}}</text>
|
||||
<text class="text-grey">承运日期:{{item.SHIPPINGDATE}}</text>
|
||||
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">委托方:{{item.CLIENT_NAME}}</text>
|
||||
<text class="text-grey">确认方:{{item.CONFIRMER_NAME}}</text>
|
||||
</view>
|
||||
<view class="dy-sub-stitle">
|
||||
<text class="text-grey">起运地:{{item.ORIGIN_NAME}}</text>
|
||||
<text class="text-grey">目的地:{{item.DESTINATION_NAME}}</text>
|
||||
</view>
|
||||
<view class="text-grey">
|
||||
<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>
|
||||
</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else-if="dataFlag=='noData'" class="dy-null">
|
||||
<view class="dy-null-img">
|
||||
<image :src="background[dataFlag].url" mode=""></image>
|
||||
</view>
|
||||
<view class="dy-null-title">
|
||||
{{background[dataFlag].msg}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="cu-tabbar-height"></view> -->
|
||||
</scroll-view>
|
||||
</block>
|
||||
|
||||
|
||||
<yk-authpup ref="authpup" type="top" @changeAuth="$noMultipleClicks(scan)" :permissionID="permissionID"></yk-authpup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,loginUser,loginSession
|
||||
} from '@/common/tool.js';
|
||||
import tkiTree from "@/components/select-tree/select-tree.vue"
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
||||
export default {
|
||||
components: {
|
||||
tkiTree,ykAuthpup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID:'',
|
||||
treeShow:false,
|
||||
noClick:true,
|
||||
initflag:false,
|
||||
sTop:0,
|
||||
totalHeight:0,
|
||||
KEYWORDS : '',
|
||||
loading: false,
|
||||
list: [],
|
||||
list1: [],
|
||||
totalList:[],
|
||||
treeNode: [], //部门下拉数据
|
||||
DEPT: '',
|
||||
DEPTNAME: '',
|
||||
page: 1,
|
||||
rows: 1000,
|
||||
totalCount:0,
|
||||
isEnd: false,
|
||||
total:0,
|
||||
dataFlag:'noData',
|
||||
isIndex:0,
|
||||
loginUserId:'',
|
||||
noExamine:false,// 是否禁止检查非本人清单
|
||||
FKEY:'examine'
|
||||
}
|
||||
},
|
||||
onLoad:async function() {
|
||||
let that = this;
|
||||
this.loginUserId = loginUser.USER_ID;
|
||||
this.background = require('@/common/background.json');
|
||||
await this.getFunc();
|
||||
this.getData();
|
||||
// setTimeout(function() {
|
||||
// that.loading = true
|
||||
// }, 500)
|
||||
loginSession();
|
||||
},
|
||||
|
||||
onReady() {
|
||||
let that=this;
|
||||
let CustomBar = this.CustomBar;
|
||||
uni.getSystemInfo({ //调用uni-app接口获取屏幕高度
|
||||
success(res) { //成功回调函数
|
||||
let titleH=uni.createSelectorQuery().select(".top-fixed"); //想要获取高度的元素名(class/id)
|
||||
titleH.boundingClientRect(data=>{
|
||||
that._data.sTop=data.height //计算高度:元素高度=窗口高度-元素距离顶部的距离(data.top)
|
||||
that.totalHeight = data.height+CustomBar
|
||||
}).exec()
|
||||
}
|
||||
})
|
||||
},
|
||||
async onShow() {
|
||||
var _this = this;
|
||||
if(_this.initflag){
|
||||
_this.initflag = false;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
await this.getFunc();
|
||||
}
|
||||
this.getData()
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
search (){
|
||||
var _this = this;
|
||||
_this.list = [];
|
||||
_this.list1 = [];
|
||||
this.getData()
|
||||
},
|
||||
reset (){
|
||||
this.DEPT = '';
|
||||
this.DEPTNAME = '';
|
||||
this.list = [];
|
||||
this.list1 = [];
|
||||
this.getData()
|
||||
},
|
||||
getData(){
|
||||
var _this=this;
|
||||
console.info(_this.isEnd);
|
||||
if (_this.isEnd){
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
uni.request({
|
||||
|
||||
url: basePath + '/app/waybillregistration/listForSecurityWaybillre',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type':'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
USER_NAME: loginUser.NAME,
|
||||
CHECK_DEPARTMENT_ID: loginUser.DEPARTMENT_ID,
|
||||
IS_MAIN:loginUser.ISMAIN,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
ISSUPERVISE:loginUser.ISSUPERVISE,
|
||||
KEYWORDS : _this.KEYWORDS, //关键字模糊查询
|
||||
},
|
||||
success: (res) => {
|
||||
if("success" == res.data.result){
|
||||
this.list = res.data.varList
|
||||
uni.hideLoading();
|
||||
this.getDept()
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openAuth(permissionID){
|
||||
this.permissionID = permissionID;
|
||||
setTimeout(()=>{
|
||||
this.$refs['authpup'].open();
|
||||
},200)
|
||||
},
|
||||
|
||||
scan(){
|
||||
let _this=this;
|
||||
uni.scanCode({
|
||||
success: function (res) {
|
||||
let flag=false;
|
||||
let listId = res.result;
|
||||
for(var i=0;i<_this.totalList.length;i++){
|
||||
if(_this.totalList[i].WAYBILLREGISTRATION_ID==listId){
|
||||
flag=true;
|
||||
_this.goToList({listId:_this.totalList[i].WAYBILLREGISTRATION_ID,listName:_this.totalList[i].NAME,userid:_this.totalList[i].USER_ID});
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!flag){
|
||||
uni.showToast({
|
||||
title: "无法检查该清单",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
getDept() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + '/app/sys/listTree', //部门下拉接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
DEPARTMENT_ID:loginUser.DEPARTMENT_ID,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
_this.treeNode = eval(res.data.zTreeNodes);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确定回调事件
|
||||
depttreeConfirm(e) {
|
||||
this.DEPT = e[0].id;
|
||||
this.DEPTNAME = e[0].name;
|
||||
this.uindex = -1;
|
||||
this.treeShow = false
|
||||
this.$forceUpdate(); //强制刷新
|
||||
this.list = [];
|
||||
this.list1 = [];
|
||||
this.getData();
|
||||
},
|
||||
showDeptTree() {
|
||||
this.treeShow = true
|
||||
this.$refs.tkiTree._show();
|
||||
},
|
||||
// 取消回调事件
|
||||
depttreeCancel(e) {
|
||||
this.treeShow = false
|
||||
},
|
||||
// 滑动到底方法
|
||||
scrolltolower(){
|
||||
var _this = this;
|
||||
_this.getData();
|
||||
},
|
||||
getFunc(){
|
||||
return new Promise((resolve, reject) => {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/corpfunc/findByKey',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
FKEY: _this.FKEY,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
if (res.data.pd != null && res.data.pd.CORPFUNC_ID) {
|
||||
_this.noExamine = true;
|
||||
}
|
||||
resolve()
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
reject()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//跳转事件
|
||||
goToList(e) {
|
||||
var _this = this;
|
||||
if(e.WAYBILLSTATUS != '2'){
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/driving-inspections/driving-item-list?listId='+e.listId
|
||||
});
|
||||
}else{
|
||||
uni.navigateTo({
|
||||
url: '/pages/application/driving-inspections/driving-item-detail?listId='+e.listId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dy-list {
|
||||
background: #fff;
|
||||
margin-top: 2upx;
|
||||
}
|
||||
.dy-card{
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin:30upx
|
||||
}
|
||||
.dy-stitle{
|
||||
margin: 16upx 0;
|
||||
}
|
||||
.dy-sub-stitle{
|
||||
margin: 16upx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.dy-card-title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #eee;
|
||||
min-height: 80upx;
|
||||
line-height: 80upx;
|
||||
padding: 0 30upx;
|
||||
}
|
||||
.dy-card-content{
|
||||
padding: 0upx 30upx 30upx;
|
||||
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,477 @@
|
|||
<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}}排查项</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>
|
||||
<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>
|
||||
<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:[],
|
||||
}
|
||||
},
|
||||
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: {
|
||||
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.checkimgList.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.checkimgList.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>
|
|
@ -0,0 +1,436 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">{{pd.TRANSPORTVEHICLE}}车辆行车三检日志</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y>
|
||||
<view class="wui-form-list">
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>运单编号</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.WAYBILLNUMBER}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">运单状态</view>
|
||||
<view>
|
||||
<text>已完成</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wui-form-list">
|
||||
<view class="wui-sub-title">
|
||||
<text>运输任务</text>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>运输车辆</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.TRANSPORTVEHICLE}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="pd.PLATE_NUMBER">
|
||||
<view class="title">
|
||||
<text>挂车车牌号</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.PLATE_NUMBER}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group" v-if="pd.VIN">
|
||||
<view class="title">
|
||||
<text>车架号</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.VIN}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>从业人员</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.NAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>联系电话</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.PHONE}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>发车时间</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.STARTTIME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>发车地点</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.ORIGIN_NAME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>收车时间</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.STOPTIME}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-form-group">
|
||||
<view class="title">
|
||||
<text>收车地点</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>{{pd.DESTINATION_NAME}}</text>
|
||||
</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 commitmentList" :key="item.DRIVINGCOMMITMENT_ID">
|
||||
<view class="cu-form-group">{{item.INQUIRYCONTENT}}</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="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">
|
||||
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<text>检查项名称:</text>
|
||||
</view>
|
||||
<view>{{item2.CHECKITEMNAME}}</view>
|
||||
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<text>检查项说明:</text>
|
||||
</view>
|
||||
<view>{{item2.REMARKS}}</view>
|
||||
<view class="title" style="border-bottom: 1px solid #eeeeee; border-top: 1px solid #eeeeee">
|
||||
<text>出车说明:</text>
|
||||
</view>
|
||||
<view>{{item2.REMARK?item2.REMARK:'无'}}</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 v-for="(item3,index3) in item1.IMG_PATH.split(',')" :key="index3" :src="baseImgPath + item3" :data-index="index" @click="ViewShowImage(baseImgPath + item3)"
|
||||
mode="" style="width: 200upx;height: 200upx;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</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>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
baseImgPath,
|
||||
corpinfoId,
|
||||
loginUser
|
||||
} from '@/common/tool.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
noClick: true,
|
||||
date: '',
|
||||
RECTIFICATIONTIME: '',
|
||||
imgList: [],
|
||||
id: '',
|
||||
pd: [],
|
||||
hs: [],
|
||||
files: [],
|
||||
list:[],
|
||||
commitmentList:[],
|
||||
videoList: [],
|
||||
checkList: [],
|
||||
CHECKDESCR: '',
|
||||
basePath: basePath,
|
||||
baseImgPath: baseImgPath,
|
||||
ISQUALIFIED: '1',
|
||||
modalShow: false,
|
||||
videoSrc: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.id = e.listId;
|
||||
// let now = new Date();
|
||||
// this.date = formatDate(now, 'yyyy-MM-dd');
|
||||
this.getData();
|
||||
},
|
||||
// filters: {
|
||||
// formatDate(time) {
|
||||
// time = time * 1
|
||||
// let date = new Date(time)
|
||||
// return formatDate(date, 'yyyy-MM-dd hh:mm')
|
||||
// }
|
||||
// },
|
||||
methods: {
|
||||
fullScreenHandler(e) {
|
||||
if (uni.getSystemInfoSync().platform == "ios") { return }
|
||||
},
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/waybillregistration/getDetail',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
WAYBILLREGISTRATION_ID: _this.id,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.pd = res.data.pd; //参数map
|
||||
_this.commitmentList = res.data.commitmentList; //参数map
|
||||
_this.list = res.data.pd.varList
|
||||
|
||||
} else if ("exception" == data.result) {
|
||||
uni.showToast({
|
||||
title: '错误',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//图片上传
|
||||
ChooseImage() {
|
||||
var _this = this;
|
||||
uni.chooseImage({
|
||||
count: 4, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera', 'album'], //从相册选择
|
||||
success: (res) => {
|
||||
if (this.imgList.length != 0) {
|
||||
this.imgList = this.imgList.concat(res.tempFilePaths)
|
||||
} else {
|
||||
this.imgList = res.tempFilePaths
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
ViewImage(e) {
|
||||
uni.previewImage({
|
||||
urls: this.imgList,
|
||||
current: e.currentTarget.dataset.url
|
||||
});
|
||||
},
|
||||
DelImg(e) {
|
||||
uni.showModal({
|
||||
title: '双控平台',
|
||||
content: '确定要删除这张图片吗?',
|
||||
cancelColor: "#000000",
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.imgList.splice(e.currentTarget.dataset.index, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
textareaAInput(e) {
|
||||
this.CHECKDESCR = e.detail.value
|
||||
},
|
||||
goSubmit() {
|
||||
var _this = this;
|
||||
if (!_this.CHECKDESCR) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请填验收描述',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (_this.imgList.length <= 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请上传验收照片',
|
||||
duration: 1500
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var i = 0;
|
||||
_this.uploadImg(_this.imgList, i);
|
||||
},
|
||||
|
||||
uploadImg(tempFilePaths, i) {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '上传中'
|
||||
})
|
||||
uni.uploadFile({
|
||||
url: basePath + '/app/imgfiles/add',
|
||||
filePath: tempFilePaths[i],
|
||||
name: 'FFILE',
|
||||
|
||||
formData: {
|
||||
'FOREIGN_KEY': _this.id,
|
||||
'TYPE': '5',
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
i++;
|
||||
if (tempFilePaths.length > i) {
|
||||
_this.uploadImg(tempFilePaths, i);
|
||||
} else {
|
||||
_this.submit();
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.hideLoading();
|
||||
console.log('uploadImage fail', err);
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
var _this = this;
|
||||
uni.request({
|
||||
url: basePath + "/app/hidden/check", //提交接口
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
ISQUALIFIED: _this.ISQUALIFIED,
|
||||
CHECKDESCR: _this.CHECKDESCR,
|
||||
HIDDEN_ID: _this.id,
|
||||
CORPINFO_ID:loginUser.CORPINFO_ID,
|
||||
USER_ID:loginUser.USER_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
|
||||
uni.hideLoading();
|
||||
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
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
changeDate(e) {
|
||||
this.RECTIFICATIONTIME = e.detail.value
|
||||
},
|
||||
radio(e) {
|
||||
this.ISQUALIFIED = e
|
||||
},
|
||||
|
||||
ViewShowImage(url) {
|
||||
let files = [];
|
||||
files.push(url)
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: 0
|
||||
});
|
||||
},
|
||||
ViewShowImages(imgs, index) {
|
||||
let files = [];
|
||||
for (var i = 0; i < imgs.length; i++) {
|
||||
files.push(baseImgPath + imgs[i].FILEPATH)
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: files,
|
||||
current: index
|
||||
});
|
||||
},
|
||||
goToOpen(e) {
|
||||
var url = e;
|
||||
plus.runtime.openURL(url, function(res) {
|
||||
console.log(res);
|
||||
});
|
||||
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: '/pages/application/safety-production-account/organization-personnel/web-view?link=' + url
|
||||
// });
|
||||
},
|
||||
playVideo(e) {
|
||||
this.videoSrc = e.currentTarget.dataset.src
|
||||
this.modalShow = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,168 @@
|
|||
<template>
|
||||
<view>
|
||||
<cu-custom bgColor="bg-gradual-blueness" :isBack="true" :isRingt="true">
|
||||
<block slot="backText">返回</block>
|
||||
<block slot="content">排查项列表</block>
|
||||
</cu-custom>
|
||||
<scroll-view scroll-y>
|
||||
<view class="spot-list">
|
||||
<view class="spot-item" v-for="(item,index) in list" :key="item.CHECKTYPE_ID" @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_before.png" class="cu-tag " mode=""></image>
|
||||
<image v-else-if="item.CHECKTYPE_NAME == '行车中'" src="../../../static/driving.png" mode=""></image>
|
||||
<image v-else src="../../../static/driving_affter.png" mode=""></image>
|
||||
</view>
|
||||
<view class="spot-cont">
|
||||
<view class="text f30">
|
||||
{{item.CHECKTYPE_NAME}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="cu-tabbar-height"></view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
basePath,
|
||||
loginUser,
|
||||
} from '@/common/tool.js';
|
||||
import ykAuthpup from "@/components/yk-authpup/yk-authpup"
|
||||
export default {
|
||||
components: {
|
||||
ykAuthpup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permissionID: '',
|
||||
noClick: true,
|
||||
initflag: false,
|
||||
listId: '',
|
||||
status: '',
|
||||
pd:[],
|
||||
list: [],
|
||||
dataFlag: 'noData',
|
||||
CHECKRECORD_ID: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.WAYBILLREGISTRATION_ID = e.listId;
|
||||
this.status = e.status;
|
||||
this.getData();
|
||||
},
|
||||
onShow(e) {
|
||||
var _this = this;
|
||||
if (_this.initflag) {
|
||||
_this.initflag = false;
|
||||
_this.list = [];
|
||||
}
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var _this = this;
|
||||
uni.showLoading({
|
||||
title: '请稍候'
|
||||
})
|
||||
uni.request({
|
||||
url: basePath + '/app/drivingitem/getDrivingItem',
|
||||
method: 'POST',
|
||||
dataType: 'json',
|
||||
header: {
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
data: {
|
||||
USER_NAME: loginUser.NAME,
|
||||
CORPINFO_ID: loginUser.CORPINFO_ID,
|
||||
USER_ID: loginUser.USER_ID,
|
||||
WAYBILLREGISTRATION_ID: _this.WAYBILLREGISTRATION_ID,
|
||||
},
|
||||
success: (res) => {
|
||||
if ("success" == res.data.result) {
|
||||
uni.hideLoading();
|
||||
_this.list = res.data.varList;
|
||||
_this.pd = res.data.pd;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '系统异常',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//跳转事件
|
||||
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){
|
||||
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
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.spot-list {}
|
||||
|
||||
.spot-cont {
|
||||
margin-left: 20upx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.spot-cont .text {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.spot-img {
|
||||
width: 100upx;
|
||||
height: 100upx;
|
||||
}
|
||||
|
||||
.spot-img image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.spot-list .spot-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
border-radius: 10upx;
|
||||
margin: 20upx;
|
||||
padding: 20upx;
|
||||
}
|
||||
</style>
|
|
@ -866,8 +866,8 @@
|
|||
prePage.$vm.initflag = true; // A 页面 init方法 为true
|
||||
prePage.$vm.list[_this.index].ISNORMAL = 1;
|
||||
prePage.$vm.list[_this.index].HIDDEN_ID = _this.pd.HIDDEN_ID;
|
||||
prePage.$vm.list[_this.index].CHECK_RESULT = _this.pd.HIDDENDESCR;
|
||||
prePage.$vm.list[_this.index].CHECK_UNQUALIFIED = _this.pd.HIDDENDESCR;
|
||||
prePage.$vm.list[_this.index].CHECK_RESULT = _this.pd.HIDDENDESCR;
|
||||
prePage.$vm.list[_this.index].CHECK_UNQUALIFIED = _this.pd.HIDDENDESCR;
|
||||
}
|
||||
uni.navigateBack({});
|
||||
uni.hideLoading();
|
||||
|
|
|
@ -22,20 +22,20 @@
|
|||
<view class="select">
|
||||
<view class="flex align-center" @click="$noMultipleClicks(goToAdd,
|
||||
{
|
||||
CHECK_CONTENT:item.CHECK_CONTENT,
|
||||
CUSTOM_ITEM_ID:item.CUSTOM_ITEM_ID,
|
||||
RECORDITEM_ID:item.RECORDITEM_ID,
|
||||
index:index,
|
||||
CUSTOM_ID:item.CUSTOM_ID,
|
||||
HASHIDDEN:item.HASHIDDEN,
|
||||
CHECK_CATEGORY:item.CHECK_CATEGORY,
|
||||
CHECK_CATEGORY_NAME:item.CHECK_CATEGORY_NAME,
|
||||
CHECK_ITEM:item.CHECK_ITEM,
|
||||
CHECK_ITEM_NAME:item.CHECK_ITEM_NAME,
|
||||
CHECK_STANDARD: item.CHECK_STANDARD,
|
||||
REFERENCE_BASIS: item.REFERENCE_BASIS,
|
||||
CHECK_RESULT: item.CHECK_UNQUALIFIED
|
||||
})">
|
||||
CHECK_CONTENT:item.CHECK_CONTENT,
|
||||
CUSTOM_ITEM_ID:item.CUSTOM_ITEM_ID,
|
||||
RECORDITEM_ID:item.RECORDITEM_ID,
|
||||
index:index,
|
||||
CUSTOM_ID:item.CUSTOM_ID,
|
||||
HASHIDDEN:item.HASHIDDEN,
|
||||
CHECK_CATEGORY:item.CHECK_CATEGORY,
|
||||
CHECK_CATEGORY_NAME:item.CHECK_CATEGORY_NAME,
|
||||
CHECK_ITEM:item.CHECK_ITEM,
|
||||
CHECK_ITEM_NAME:item.CHECK_ITEM_NAME,
|
||||
CHECK_STANDARD: item.CHECK_STANDARD,
|
||||
REFERENCE_BASIS: item.REFERENCE_BASIS,
|
||||
CHECK_RESULT: item.CHECK_UNQUALIFIED
|
||||
})">
|
||||
<radio class='red mr10' :class="item.ISNORMAL==1?'checked':''" :checked="item.ISNORMAL==1" disabled ></radio>
|
||||
<text>不合格</text>
|
||||
</view>
|
||||
|
|
|
@ -6,10 +6,8 @@
|
|||
</cu-custom>
|
||||
<view class="top-fixed">
|
||||
<view class="cu-bar search bg-white">
|
||||
<view class="search-form radius">
|
||||
<text class="cuIcon-search"></text>
|
||||
<input @input="InputBlur" placeholder="请输入隐患描述关键字"></input>
|
||||
</view>
|
||||
<text class="cuIcon-search"></text>
|
||||
<input @input="InputBlur" placeholder="请输入隐患描述关键字"></input>
|
||||
<view class="action">
|
||||
<button class="cu-btn bg-green shadow-blur radius" @click="getQuery()">搜索</button>
|
||||
</view>
|
||||
|
|
|
@ -167,6 +167,15 @@
|
|||
<text>安全例会</text>
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="home-apps-item" hover-class="none"
|
||||
url="/pages/application/driving-inspections/dirving-inspections-list">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/home-speEquip.jpg" mode=""></image>
|
||||
</view>
|
||||
<view class="text">
|
||||
<text>行车三检</text>
|
||||
</view>
|
||||
</navigator>
|
||||
<!-- <navigator class="home-apps-item" hover-class="none" url="/pages/application/onlinexxks/face/index">
|
||||
<view class="home-apps-item-img">
|
||||
<image src="../../static/icon-apps/home-study.png" mode=""></image>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue