检查登记 新增手动添加明细
检查登记适配
This commit is contained in:
parent
bf7ea826f4
commit
276f293789
@ -794,6 +794,12 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "检查内容设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "safeCheckSignDIY",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增检查登记"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -82,8 +82,8 @@
|
||||
</u-form-item>
|
||||
|
||||
<view class="label-title">检查问题描述</view>
|
||||
<u-form-item prop="CHECKRESULT_DESCRIPTION" borderBottom>
|
||||
<u--textarea disabled autoHeight v-model="item.CHECKRESULT_DESCRIPTION"
|
||||
<u-form-item prop="DESCREPTION" borderBottom>
|
||||
<u--textarea disabled autoHeight v-model="item.DESCREPTION"
|
||||
placeholder="请输入检查问题描述" border="surround"></u--textarea>
|
||||
</u-form-item>
|
||||
|
||||
@ -92,9 +92,9 @@
|
||||
v-model="item.QUESTION_LEVEL_DESCRIPTION" border="none"
|
||||
inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="整改建议与措施" prop="DEMAND" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="item.DEMAND" border="none"
|
||||
inputAlign="right"></u--input>
|
||||
<u-form-item label="整改建议与措施" prop="CHECKRESULT_DESCRIPTION" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="item.CHECKRESULT_DESCRIPTION"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="检查人员" prop="checkerNames" borderBottom>
|
||||
<u--input disabled disabledColor="#fff" v-model="item.checkerNames"
|
||||
@ -203,6 +203,7 @@
|
||||
checkerNames: '',
|
||||
CHECKCONTENT: '',
|
||||
CHECKRESULT_DESCRIPTION: '',
|
||||
DESCREPTION: '',
|
||||
QUESTION_LEVEL_DESCRIPTION: '',
|
||||
DEMAND: '',
|
||||
ADDRESS: '',
|
||||
@ -305,11 +306,12 @@
|
||||
let checkerNames = ''
|
||||
let ProjectNAME = ''
|
||||
let AreaNAME = ''
|
||||
let DESCREPTION = ''
|
||||
for (let i = 0; i < res.Nav_ListSafeCheckDetail.length; i++) {
|
||||
checkerNames = ''
|
||||
ProjectNAME = ''
|
||||
AreaNAME = ''
|
||||
|
||||
DESCREPTION = ''
|
||||
res.Nav_ListSafeCheckDetail[i].ISCHECK = false
|
||||
|
||||
for (let j = 0; j < res.Nav_ListSafeCheckDetail[i].Nav_ListCheckDetailUser
|
||||
@ -343,6 +345,13 @@
|
||||
res.Nav_ListSafeCheckDetail[i].ISCHECK = false
|
||||
}
|
||||
|
||||
if (res.Nav_ListSafeCheckDetail[i].Nav_ListCheckDetailQuestion != null && res
|
||||
.Nav_ListSafeCheckDetail[i].Nav_ListCheckDetailQuestion.length > 0) {
|
||||
res.Nav_ListSafeCheckDetail[i].Nav_ListCheckDetailQuestion.forEach(e => {
|
||||
DESCREPTION += ' ' + e.Nav_Question.DESCREPTION
|
||||
})
|
||||
}
|
||||
res.Nav_ListSafeCheckDetail[i].DESCREPTION = DESCREPTION
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -70,12 +70,15 @@
|
||||
<u-sticky offset-top="20">
|
||||
<view class="sub-form">
|
||||
<view class="sub-form-wrap">
|
||||
<!-- wyw <view class="sub-form-btns">
|
||||
<!-- wyw -->
|
||||
|
||||
<view class="sub-form-btns" v-if='isLoadOK'>
|
||||
<view class="sub-form-btn" @click="handleAdd">
|
||||
<u-icon class="icon" name="plus" color="#2979ff" size="14"></u-icon>
|
||||
<u--text type="primary" text="新增"></u--text>
|
||||
<u--text type="primary" text="检查登记"></u--text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="subDataModel"
|
||||
errorType="border-bottom" ref="sForm">
|
||||
<uni-collapse :border="false" accordion>
|
||||
@ -96,7 +99,7 @@
|
||||
<u--input disabled disabledColor="#fff" v-model="item['Nav_CheckProject'].NAME"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="检查问题描述" class="subRequired" required
|
||||
<u-form-item v-if="item.ISAUTOLOAD" label="检查问题描述" class="subRequired" required
|
||||
prop="listCheckDetailQuestion" borderBottom
|
||||
@click="handleShowSheet({title: '检查问题描述', name: 'listCheckDetailQuestion', formIndex: index ,subData: item,data:model})">
|
||||
<!-- 下拉图标 -->
|
||||
@ -104,6 +107,12 @@
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item v-else label="检查问题描述" class="subRequired" required
|
||||
prop="listCheckDetailQuestion" borderBottom>
|
||||
<!-- 下拉图标 -->
|
||||
<u--input disabledColor="#fff" v-model="item.listCheckDetailQuestion"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="问题等级" prop="QUESTION_LEVEL_DESCRIPTION" borderBottom>
|
||||
<u--input disabled disabledColor="#fff"
|
||||
v-model="item.QUESTION_LEVEL_DESCRIPTION" border="none"
|
||||
@ -118,28 +127,32 @@
|
||||
<u--input disabled disabledColor="#fff" v-model="item.checkerNames"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="隐患地点" prop="ADDRESS" borderBottom>
|
||||
<u-form-item v-if="item.ISAUTOLOAD" label="隐患地点" prop="ADDRESS" borderBottom>
|
||||
<u--input disabledColor="#fff" placeholder='隐患地点' v-model="item.ADDRESS"
|
||||
inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item v-else label="隐患地点" prop="ADDRESS" borderBottom>
|
||||
<u--input disabledColor="#fff" border="none" disabled placeholder='隐患地点'
|
||||
v-model="item.ADDRESS" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="隐患原因" prop="listCheckDetailReason" borderBottom
|
||||
@click="handleShowSheet({title: '隐患原因', name: 'listCheckDetailReason', formIndex: index})">
|
||||
<u--input disabledColor="#fff" v-model="item.listCheckDetailReason"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item> -->
|
||||
<u-form-item label="隐患原因" prop="listCheckDetailReason" borderBottom
|
||||
@click="handleChange(item)">
|
||||
<u-form-item v-if="item.ISAUTOLOAD" label="隐患原因" prop="listCheckDetailReason"
|
||||
borderBottom @click="handleChange(item)">
|
||||
<u--input disabledColor="#fff" v-model="item.listCheckDetailReason"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="备注" prop="REMARK" borderBottom>
|
||||
<u--input disabledColor="#fff" placeholder='备注' v-model="item.REMARK"
|
||||
inputAlign="right"></u--input>
|
||||
<u-form-item v-else label="隐患原因" prop="listCheckDetailReason" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item.listCheckDetailReason"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<view class="upload-title">附件</view>
|
||||
<full-upload v-model="item.Nav_Files" :isShowBtn='true'
|
||||
<full-upload v-model="item.Nav_Files" :isShowBtn=item.ISAUTOLOAD
|
||||
:listProp='listPropSubUpload'
|
||||
:listPropVal='item.listPropValSubUpload'></full-upload>
|
||||
</uni-collapse-item>
|
||||
@ -304,7 +317,22 @@
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
handleAdd() {
|
||||
this.model.Nav_ListSafeCheckDetail.unshift(this.subDataModel)
|
||||
//页面跳转
|
||||
var linkToUrl = 'safeCheckSignDIY?tableKey=' + this.tableKey + '&ID=' + this.model.ID + '&taskID=' + this
|
||||
.TaskID //Url 传参
|
||||
|
||||
// this.model.DEPARTMENT_ID = option.DEPARTMENT_ID
|
||||
// this.model.CHECK_TYPE_LEVEL_ID = option.CHECK_TYPE_LEVEL_ID
|
||||
//BS077 需要的传参
|
||||
linkToUrl += '&ROW_NO=' + this.model.Nav_ListSafeCheckDetail.length + '&SAFE_CHECK_ID=' + this.model.ID +
|
||||
'&CHECKOBJECT=' + this.model.CHECKOBJECT + '&CHECK_TYPE_ID=' + this.model.CHECK_TYPE_ID +
|
||||
'&DEPARTMENT_ID=' + this.model.DEPARTMENTID + '&CHECK_TYPE_LEVEL_ID=' + this.model
|
||||
.CHECK_TYPE_LEVEL_ID + '&Nav_ListUserCheck=' + encodeURIComponent(JSON.stringify(this.model
|
||||
.Nav_ListSafeCheckDetail[0]
|
||||
.Nav_ListCheckDetailUser))
|
||||
uni.navigateTo({
|
||||
url: linkToUrl
|
||||
})
|
||||
},
|
||||
handleTab(t) {
|
||||
this.currentTab = t
|
||||
@ -315,7 +343,6 @@
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
this.model.Nav_ListSafeCheckDetail[0].Nav_ListCheckDetailUser[0].SAFECHECKSTATE = 80;
|
||||
this.model.TaskID = this.TaskID
|
||||
|
||||
if (this.model.Nav_ListSafeCheckDetail != null && this.model.Nav_ListSafeCheckDetail.length >
|
||||
0) {
|
||||
this.model.Nav_ListSafeCheckDetail.forEach(e => {
|
||||
@ -328,7 +355,6 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
FullCheckUpdateBS057(this.model).then(res => {
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
if (this.tableKey == null || this.tableKey == 0) {
|
||||
@ -336,7 +362,15 @@
|
||||
url: 'safeCheckIndex'
|
||||
})
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
// uni.navigateBack()// 如果有手动操作 跳转页面不对
|
||||
|
||||
// uni.switchTab({
|
||||
// url: '../../../index/index2',
|
||||
// })
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index2'
|
||||
})
|
||||
|
||||
}
|
||||
}, 'success', 1000)
|
||||
})
|
||||
@ -437,6 +471,16 @@
|
||||
res.Nav_ListSafeCheckDetail[i].DEMAND = DEMAND.substring(1)
|
||||
}
|
||||
}
|
||||
|
||||
if (!res.Nav_ListSafeCheckDetail[i].ISAUTOLOAD && res.Nav_ListSafeCheckDetail[i]
|
||||
.Nav_ListCheckDetailReason != null && res.Nav_ListSafeCheckDetail[i]
|
||||
.Nav_ListCheckDetailReason.length > 0) {
|
||||
var listCheckDetailReason = ''
|
||||
res.Nav_ListSafeCheckDetail[i].Nav_ListCheckDetailReason.forEach(e => {
|
||||
listCheckDetailReason += ' ' + e.Nav_RiskReason?.NAME
|
||||
})
|
||||
res.Nav_ListSafeCheckDetail[i].listCheckDetailReason = listCheckDetailReason
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
511
pages/apply/subPages/BS/safeCheckSignDIY.vue
Normal file
511
pages/apply/subPages/BS/safeCheckSignDIY.vue
Normal file
@ -0,0 +1,511 @@
|
||||
<!-- 手动检查登记 -->
|
||||
<template>
|
||||
<view class="page-wrap">
|
||||
<view class="card">
|
||||
<uni-card margin="0" :is-shadow="true">
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" :model="model" :rules="rules"
|
||||
ref="wForm" errorType="border-bottom">
|
||||
<u-form-item required label="检查区域" prop="RiskAreaNAME"
|
||||
@click="handleShowSheet({title: '检查区域', name: 'RiskAreaNAME'})" borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="model.RiskAreaNAME" border="none"
|
||||
inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item required label="检查内容" prop="CHECKCONTENT" borderBottom>
|
||||
<u--textarea autoHeight v-model="model.CHECKCONTENT" placeholder="检查内容"
|
||||
border="surround"></u--textarea>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
</uni-card>
|
||||
</view>
|
||||
<u-sticky offset-top="20">
|
||||
<view class="sub-form">
|
||||
<view class="sub-form-wrap">
|
||||
<view class="sub-form-btns">
|
||||
<view class="sub-form-btn" @click="handleAdd">
|
||||
<u-icon class="icon" name="plus" color="#2979ff" size="14"></u-icon>
|
||||
<u--text type="primary" text="检查信息"></u--text>
|
||||
</view>
|
||||
</view>
|
||||
<u--form labelPosition="left" labelWidth="auto" labelAlign="center" errorType="border-bottom"
|
||||
ref="sForm"><!-- :model="subDataModel" -->
|
||||
<uni-collapse :border="false" accordion>
|
||||
<uni-card style="margin-bottom: 16px;" margin="0" spacing="0" :is-shadow="false"
|
||||
v-for=" item in model.Nav_ListCheckDetail">
|
||||
<uni-collapse-item :title="item.ROW_NO+ '. ' + item.Nav_CheckProject.NAME">
|
||||
<u-form-item class="subRequired" required label="检查项目" prop="Nav_CheckProject.NAME"
|
||||
@click="handleShowSheet({title: '检查项目', name: 'CheckProjectNAME',itemData:item})"
|
||||
borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item['Nav_CheckProject'].NAME"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item class="subRequired" required label="检查项目分类"
|
||||
prop="Nav_CheckProjectCategory.NAME"
|
||||
@click="handleShowSheet({title: '检查项目分类', name: 'CheckProjectCategoryNAME',itemData:item})"
|
||||
borderBottom>
|
||||
<u--input disabledColor="#fff" v-model="item['Nav_CheckProjectCategory'].NAME"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item class="subRequired" required label="检查问题描述" prop="DESCREPTION"
|
||||
borderBottom>
|
||||
<u--textarea autoHeight v-model="item.DESCREPTION" placeholder="检查问题描述"
|
||||
border="surround"></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item class="subRequired" required label="整改建议与措施" prop="DEMAND"
|
||||
borderBottom>
|
||||
<u--textarea autoHeight v-model="item.DEMAND" placeholder="整改建议与措施"
|
||||
border="surround"></u--textarea>
|
||||
</u-form-item>
|
||||
<u-form-item class="subRequired" required label="问题等级" prop="QUESTION_LEVEL_SHOW"
|
||||
borderBottom
|
||||
@click="handleShowSheet({title: '问题等级', name: 'QUESTION_LEVEL',itemData:item})">
|
||||
<u--input disabledColor="#ffffff" v-model="item.QUESTION_LEVEL_SHOW"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item class="subRequired" required label="隐患地点" prop="ADDRESS" borderBottom>
|
||||
<u--input disabledColor="#fff" placeholder='隐患地点' v-model="item.ADDRESS"
|
||||
inputAlign="right"></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item label="隐患原因" prop="listCheckDetailReason" borderBottom
|
||||
@click="handleShowSheet({title: '问题等级', name: 'listCheckDetailReason',itemData:item})">
|
||||
<!-- @click="handleChange(item)" -->
|
||||
<u--input disabledColor="#fff" v-model="item.listCheckDetailReason"
|
||||
border="none" inputAlign="right"></u--input>
|
||||
<u-icon style="margin-left: 4px;" slot="right" name="arrow-down"></u-icon>
|
||||
</u-form-item>
|
||||
<view class="upload-title">附件</view>
|
||||
<full-upload v-model="item.Nav_Files" :isShowBtn='true'
|
||||
:listProp='listPropSubUpload'
|
||||
:listPropVal='item.listPropValSubUpload'></full-upload>
|
||||
</uni-collapse-item>
|
||||
</uni-card>
|
||||
</uni-collapse>
|
||||
</u--form>
|
||||
</view>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-modal :show="showDelModalIndex >= 0" @confirm="confirmDel" title="确认删除?"></u-modal>
|
||||
|
||||
<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup"
|
||||
:defaultChecked="selectorInfo.defaultChecked" :title="selectorInfo.title" :lists="selectorInfo.dataLists"
|
||||
@search="handleShowSheet" @select="handleSelected" @close="selectorInfo.showPopup=false" />
|
||||
|
||||
<view class="bottom-button">
|
||||
<button type="primary" @click="FullCheckUpdate">提交</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
guid,
|
||||
initFilter,
|
||||
extendRule,
|
||||
extendInclude,
|
||||
extendGroupRule,
|
||||
initFilterGroup,
|
||||
extendFilterGroup,
|
||||
extendFilterGroupGroupRules
|
||||
} from '../../../../utils/common'
|
||||
|
||||
import {
|
||||
AddCheckRecord,
|
||||
CheckTypeOrderPaged,
|
||||
CheckTypeLevelOrderPaged,
|
||||
OrderPagedAreaMineType,
|
||||
CheckProjectOrderPaged,
|
||||
OrderPagedProjectCategory,
|
||||
OrderPagedSafeCheckDetail,
|
||||
OrderPagedSuitAll,
|
||||
orderPagedRiskReason
|
||||
} from '../../../../services/apply/subPages/BS/safeCheck'
|
||||
|
||||
import {
|
||||
auditOptionShow,
|
||||
getEnum
|
||||
} from '../../../../services/common'
|
||||
|
||||
import {
|
||||
listBSQuestionLevelEnum,
|
||||
listBSQuestionLevelEnumVal
|
||||
} from '../../../../utils/enums'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableKey: '0',
|
||||
TaskID: '',
|
||||
listPropSubUpload: ['SAFE_CHECK_ID', 'SAFE_CHECK_DETAIL_ID'],
|
||||
listPropValUpload: [],
|
||||
AUDIT_OPINION: '',
|
||||
|
||||
model: {
|
||||
ID: '',
|
||||
ORG_ID: '',
|
||||
SAFE_CHECK_ID: '',
|
||||
DEPARTMENT_ID: '',
|
||||
CHECKOBJECT: '',
|
||||
CHECKOBJECT_DESCRIPTION: '',
|
||||
RISK_AREA_ID: '',
|
||||
RiskAreaNAME: '',
|
||||
CHECK_TYPE_ID: '',
|
||||
CHECK_TYPE_LEVEL_ID: '',
|
||||
ROW_NO: '',
|
||||
CHECKCONTENT: '',
|
||||
Nav_ListUserCheck: [],
|
||||
Nav_ListCheckDetail: [{
|
||||
DESCREPTION: '',
|
||||
DEMAND: '',
|
||||
|
||||
ID: '',
|
||||
ORG_ID: '',
|
||||
SAFE_CHECK_ID: '',
|
||||
QUESTION_LEVEL: '',
|
||||
ROW_NO: '1',
|
||||
CHECK_PROJECT_ID: '',
|
||||
Nav_CheckProject: {
|
||||
NAME: ''
|
||||
},
|
||||
CHECK_PROJECT_CATEGORY_ID: '',
|
||||
Nav_CheckProjectCategory: {
|
||||
NAME: ''
|
||||
},
|
||||
ADDRESS: '',
|
||||
Nav_ListCheckDetailReason: [],
|
||||
Nav_Files: [],
|
||||
listPropValSubUpload: []
|
||||
}],
|
||||
},
|
||||
isAudit: true,
|
||||
lists: [],
|
||||
comPickerInfo: {
|
||||
showSheet: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
dataIndex: undefined,
|
||||
formIndex: undefined,
|
||||
name: ''
|
||||
},
|
||||
|
||||
selectorInfo: {
|
||||
showPopup: false,
|
||||
isMultiple: false,
|
||||
title: '隐患原因',
|
||||
itemData: {},
|
||||
index: 0,
|
||||
dataLists: [],
|
||||
defaultText: '',
|
||||
defaultValue: '',
|
||||
name: '',
|
||||
defaultChecked: []
|
||||
},
|
||||
|
||||
showCheckDate: false,
|
||||
showPopup: false,
|
||||
showDelModalIndex: undefined,
|
||||
rules: {
|
||||
'CHECKOBJECT_DESCRIPTION': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
trigger: ['blur', 'change']
|
||||
},
|
||||
'CHECKCONTENT': {
|
||||
type: 'string',
|
||||
required: true,
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.model.ID = option.ID
|
||||
this.model.ORG_ID = uni.getStorageSync('orgId')
|
||||
this.model.TaskID = option.taskID
|
||||
this.TaskID = option.taskID
|
||||
this.tableKey = option.tableKey
|
||||
|
||||
this.model.ROW_NO = option.ROW_NO
|
||||
this.model.SAFE_CHECK_ID = option.SAFE_CHECK_ID
|
||||
this.model.CHECKOBJECT = option.CHECKOBJECT
|
||||
this.model.CHECK_TYPE_ID = option.CHECK_TYPE_ID
|
||||
this.model.DEPARTMENT_ID = option.DEPARTMENT_ID
|
||||
this.model.CHECK_TYPE_LEVEL_ID = option.CHECK_TYPE_LEVEL_ID
|
||||
this.model.Nav_ListUserCheck = JSON.parse(decodeURIComponent(option.Nav_ListUserCheck))
|
||||
|
||||
this.model.Nav_ListCheckDetail[0].ROW_NO = parseInt(option.ROW_NO) + 1
|
||||
this.model.Nav_ListCheckDetail[0].SAFE_CHECK_ID = this.model.SAFE_CHECK_ID
|
||||
this.model.Nav_ListCheckDetail[0].ID = guid()
|
||||
this.model.Nav_ListCheckDetail[0].ORG_ID = this.model.ORG_ID
|
||||
|
||||
this.model.Nav_ListCheckDetail[0].listPropValSubUpload.push(this.model.ID)
|
||||
this.model.Nav_ListCheckDetail[0].listPropValSubUpload.push(this.model.Nav_ListCheckDetail[0].ID)
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleOkRow() {
|
||||
console.log('ok row')
|
||||
},
|
||||
handleDelRowBefore(index) {
|
||||
this.showDelModalIndex = index
|
||||
},
|
||||
confirmDel() {
|
||||
this.model.Nav_ListSafeCheckDetail.splice(this.showDelModalIndex, 1)
|
||||
this.showDelModalIndex = undefined
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.model.Nav_ListCheckDetail == null) {
|
||||
this.model.Nav_ListCheckDetail = []
|
||||
}
|
||||
var NUM = parseInt(this.model.ROW_NO) + this.model.Nav_ListCheckDetail.length + 1
|
||||
|
||||
var detailIDAdd = guid()
|
||||
var detailTemp = {
|
||||
ID: detailIDAdd,
|
||||
ORG_ID: this.model.ORG_ID,
|
||||
SAFE_CHECK_ID: this.model.SAFE_CHECK_ID,
|
||||
QUESTION_LEVEL: '',
|
||||
ROW_NO: NUM,
|
||||
CHECK_PROJECT_ID: '',
|
||||
Nav_CheckProject: {
|
||||
NAME: ''
|
||||
},
|
||||
CHECK_PROJECT_CATEGORY_ID: '',
|
||||
Nav_CheckProjectCategory: {
|
||||
NAME: ''
|
||||
},
|
||||
ADDRESS: '',
|
||||
Nav_ListCheckDetailReason: [],
|
||||
Nav_Files: [],
|
||||
listPropValSubUpload: [],
|
||||
}
|
||||
detailTemp.listPropValSubUpload.push(this.model.ID)
|
||||
detailTemp.listPropValSubUpload.push(detailIDAdd)
|
||||
|
||||
this.model.Nav_ListCheckDetail.unshift(detailTemp)
|
||||
},
|
||||
handleTab(t) {
|
||||
this.currentTab = t
|
||||
},
|
||||
FullCheckUpdate() {
|
||||
const ele = this.$refs
|
||||
if (this.model.Nav_ListCheckDetail == null || this.model.Nav_ListCheckDetail.length < 1) {
|
||||
uni.$showErrorInfo('请新增检查信息后再提交');
|
||||
} else if (this.model.Nav_ListCheckDetail[0].DESCREPTION == '' || this.model.Nav_ListCheckDetail[0]
|
||||
.DEMAND == '') {
|
||||
uni.$showErrorInfo('请完善检查信息');
|
||||
} else {
|
||||
ele['wForm'].validate().then(res => {
|
||||
this.model.Nav_ListCheckDetail.forEach(e => {
|
||||
e.Nav_CheckProject = null;
|
||||
e.Nav_CheckProjectCategory = null
|
||||
if (e.Nav_ListCheckDetailReason != null && e.Nav_ListCheckDetailReason.length >
|
||||
0) {
|
||||
e.Nav_ListCheckDetailReason.forEach(ec => {
|
||||
ec.Nav_RiskReason = null
|
||||
})
|
||||
}
|
||||
})
|
||||
AddCheckRecord(this.model).then(res => {
|
||||
|
||||
uni.$showMsgFunc('操作成功!', () => {
|
||||
var linkToUrl = 'safeCheckSign?tableKey=' + this.tableKey +
|
||||
'&ID=' + this.model.ID + '&taskID=' + this.TaskID //Url 传参
|
||||
uni.navigateTo({
|
||||
url: linkToUrl
|
||||
})
|
||||
}, 'success', 1000)
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log('校验失败', err)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 下拉数据加载
|
||||
async handleShowSheet(p) {
|
||||
if (p.name == undefined) {
|
||||
// 搜索
|
||||
var val = p
|
||||
p = this.selectorInfo
|
||||
p.val = val
|
||||
}
|
||||
|
||||
const orgId = uni.getStorageSync('orgId')
|
||||
const json = initFilter(orgId, "", "", 0)
|
||||
let dataSelect = []
|
||||
var defaultChecked = []
|
||||
|
||||
if (p.name == 'RiskAreaNAME') {
|
||||
this.selectorInfo.isMultiple = false
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
// this.selectorInfo.isMultiple = true
|
||||
json.FilterGroup.Groups.push({
|
||||
'IsAnd': false,
|
||||
'Rules': [{
|
||||
'Field': "CHECKOBJECT",
|
||||
'Operate': 1,
|
||||
'Value': this.model.CHECKOBJECT
|
||||
}]
|
||||
})
|
||||
json.Sort = 'NAME'
|
||||
// extendRule(json, 'CHECKOBJECT', 1, this.model.CHECKOBJECT);
|
||||
dataSelect = await OrderPagedAreaMineType(json).then(res => {
|
||||
if (res != undefined && res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res[i].NAME
|
||||
// res[i].code = res[i].CODE
|
||||
}
|
||||
}
|
||||
return res
|
||||
})
|
||||
} else if (p.name == 'CheckProjectNAME') {
|
||||
this.selectorInfo.isMultiple = false
|
||||
extendRule(json, 'ENABLE_STATUS', 1, 0);
|
||||
extendRule(json, 'IS_DELETED', 1, 'false');
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
dataSelect = await CheckProjectOrderPaged(json).then(res => {
|
||||
if (res != undefined && res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res[i].NAME,
|
||||
res[i].code = res[i].CODE
|
||||
}
|
||||
}
|
||||
return res
|
||||
})
|
||||
} else if (p.name == 'CheckProjectCategoryNAME') {
|
||||
if (this.model.CHECKOBJECT == null || this.model.CHECKOBJECT.length < 1) {
|
||||
uni.$showErrorInfo('请先选择检查范围!')
|
||||
return false
|
||||
} else if (this.model.CHECK_TYPE_ID == null || this.model.CHECK_TYPE_ID.length < 1) {
|
||||
uni.$showErrorInfo('请先选择检查类型!')
|
||||
return false
|
||||
} else {
|
||||
this.selectorInfo.isMultiple = false
|
||||
extendRule(json, 'Nav_ListCategoryType.CHECK_TYPE_ID', 1, this.model.CHECK_TYPE_ID);
|
||||
extendRule(json, 'CHECKOBJECT', 1, this.model.CHECKOBJECT);
|
||||
if (p.val) {
|
||||
extendRule(json, 'NAME', 9, p.val);
|
||||
}
|
||||
dataSelect = await OrderPagedProjectCategory(json).then(res => {
|
||||
if (res != undefined && res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res[i].NAME,
|
||||
res[i].code = res[i].CODE
|
||||
}
|
||||
}
|
||||
return res
|
||||
})
|
||||
}
|
||||
} else if (p.name == 'QUESTION_LEVEL') {
|
||||
this.selectorInfo.isMultiple = false
|
||||
dataSelect = []
|
||||
for (let i = 0; i < listBSQuestionLevelEnum.length; i++) {
|
||||
dataSelect.push({
|
||||
name: listBSQuestionLevelEnum[i],
|
||||
ID: listBSQuestionLevelEnumVal[i]
|
||||
})
|
||||
}
|
||||
} else if (p.name == 'listCheckDetailReason') {
|
||||
this.selectorInfo.isMultiple = true
|
||||
dataSelect = await orderPagedRiskReason(json).then(res => {
|
||||
if (res != undefined && res.length > 0) {
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
res[i].name = res[i].NAME,
|
||||
res[i].code = '' // res[i].CODE
|
||||
}
|
||||
}
|
||||
return res
|
||||
})
|
||||
}
|
||||
|
||||
if (defaultChecked == null)
|
||||
defaultChecked = []
|
||||
if (dataSelect.length) {
|
||||
this.selectorInfo = {
|
||||
itemData: p.itemData,
|
||||
isMultiple: this.selectorInfo.isMultiple,
|
||||
showPopup: true,
|
||||
title: p.title,
|
||||
name: p.name,
|
||||
dataLists: dataSelect,
|
||||
defaultChecked: defaultChecked
|
||||
}
|
||||
} else {
|
||||
// 暂无数据
|
||||
}
|
||||
},
|
||||
|
||||
closePicker() {
|
||||
this.comPickerInfo = {
|
||||
showSheet: false,
|
||||
columns: [],
|
||||
title: '',
|
||||
name: '',
|
||||
formIndex: undefined
|
||||
}
|
||||
},
|
||||
|
||||
//选择信息
|
||||
handleSelected(e) {
|
||||
this.selectorInfo.showPopup = false
|
||||
|
||||
switch (this.selectorInfo.name) {
|
||||
case 'QUESTION_LEVEL':
|
||||
this.selectorInfo.itemData.QUESTION_LEVEL = e.ID
|
||||
this.selectorInfo.itemData.QUESTION_LEVEL_SHOW = e.name
|
||||
break;
|
||||
case 'RiskAreaNAME':
|
||||
this.model.RISK_AREA_ID = e.ID
|
||||
this.model.RiskAreaNAME = e.name
|
||||
break;
|
||||
case 'CheckProjectNAME':
|
||||
this.selectorInfo.itemData.CHECK_PROJECT_ID = e.ID
|
||||
this.selectorInfo.itemData.Nav_CheckProject = e
|
||||
break;
|
||||
case 'CheckProjectCategoryNAME':
|
||||
this.selectorInfo.itemData.CHECK_PROJECT_CATEGORY_ID = e.ID
|
||||
this.selectorInfo.itemData.Nav_CheckProjectCategory = e
|
||||
break;
|
||||
case "listCheckDetailReason":
|
||||
let listReason = []
|
||||
let reasonShow = ''
|
||||
if (e.length > 0) {
|
||||
e.forEach((item, i) => {
|
||||
if (i > 0) {
|
||||
reasonShow += ' '
|
||||
}
|
||||
listReason.push({
|
||||
ID: guid(),
|
||||
CHECK_DETAIL_ID: this.selectorInfo.itemData.ID,
|
||||
RISK_REASON_ID: item.ID,
|
||||
ORG_ID: item.ORG_ID,
|
||||
Nav_RiskReason: e[i]
|
||||
})
|
||||
reasonShow += item.NAME
|
||||
})
|
||||
}
|
||||
this.selectorInfo.itemData.Nav_ListCheckDetailReason = listReason
|
||||
this.selectorInfo.itemData.listCheckDetailReason = reasonShow
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped>
|
||||
@import url("../../../../style/css/editTemplate.css");
|
||||
</style>
|
||||
@ -301,3 +301,16 @@ export function FullUpdateContents(params) {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//手动新增检查登记
|
||||
export function AddCheckRecord(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
request.post("/BS/BSSafeCheck/AddCheckRecord", params).then((result) => {
|
||||
if (result.IsSuccessful) {
|
||||
resolve(result.Data);
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user