diff --git a/config/common.js b/config/common.js index 9cc73a7..b4c939b 100644 --- a/config/common.js +++ b/config/common.js @@ -138,7 +138,7 @@ if (process.env.CUSTOM_PLATFORM === "dev") { uni_app_web_video_source_url: APP_ENV === 'release' ? "http://124.117.209.78:5199" : "https://sps.cxtc.com:3199", // 视频资源地址 uni_app_web_local_api_url: APP_ENV === 'release' ? "http://124.117.209.78" : - "http://localhost" //打包测试: 121.41.2.71 开发可 localhost + "http://121.41.2.71" //打包测试: 121.41.2.71 开发可 localhost } diff --git a/manifest.json b/manifest.json index 1602cb5..0a27f18 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "矿山安全生产标准化系统", "appid" : "__UNI__DE7034E", //BBB1077 "description" : "厦钨矿山安全app", - "versionName" : "1.0.002", - "versionCode" : 10002, + "versionName" : "1.0.005", + "versionCode" : 10005, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/apply/subPages/FO/jobFireList.vue b/pages/apply/subPages/FO/jobFireList.vue index da8130d..770686e 100644 --- a/pages/apply/subPages/FO/jobFireList.vue +++ b/pages/apply/subPages/FO/jobFireList.vue @@ -149,7 +149,7 @@ }, showDetail(id) { uni.navigateTo({ - url: '/pages/apply/subPages/FO/FO041Show?ID=' + id + url: '/pages/apply/subPages/FO/jobFireShow?ID=' + id }) }, handleShowPicker(p) { diff --git a/pages/apply/subPages/FO/jobFireShow.vue b/pages/apply/subPages/FO/jobFireShow.vue index b8c7e18..b1531e7 100644 --- a/pages/apply/subPages/FO/jobFireShow.vue +++ b/pages/apply/subPages/FO/jobFireShow.vue @@ -184,7 +184,7 @@ - + * diff --git a/pages/apply/subPages/SK/SK003Show.vue b/pages/apply/subPages/SK/SK003Show.vue index 67ddc18..0346229 100644 --- a/pages/apply/subPages/SK/SK003Show.vue +++ b/pages/apply/subPages/SK/SK003Show.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -259,7 +259,6 @@ this.stepLoad = false this.model = res; this.model.ID = this.ID - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.EVALUATE_LEVELName = res.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item => item.code === res.EVALUATE_LEVEL).name : ''; this.model.ENABLE_STATUSName = res.ENABLE_STATUS !== undefined ? this.enumsData['FMEnableStatusEnum'].find(item => item.code === res.ENABLE_STATUS).name : ''; if (this.model.Nav_Departs && this.model.Nav_Departs.length > 0) { diff --git a/pages/apply/subPages/SK/checkContentEdit.vue b/pages/apply/subPages/SK/checkContentEdit.vue index 90244d8..9780779 100644 --- a/pages/apply/subPages/SK/checkContentEdit.vue +++ b/pages/apply/subPages/SK/checkContentEdit.vue @@ -11,7 +11,7 @@ 基本信息填写 - + @@ -256,7 +256,6 @@ GetCheckContentsNew(json).then(res => { this.stepLoad = false this.model = res - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; if (this.model.Nav_ListCheckQuestion && this.model.Nav_ListCheckQuestion.length > 0) { this.model.Nav_ListCheckQuestion = this.model.Nav_ListCheckQuestion.sort((a, b) => a.NUM - b.NUM); this.model.Nav_ListCheckQuestion.map(item => { @@ -344,11 +343,14 @@ }, handleChange(name, item) { if (name == 'SKProductionUnit') { - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsText['SKProductionUnit']], - name: name - } + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) } else if (name == 'SKHiddenLevel') { this.comPickerInfo = { showSheet: true, @@ -361,8 +363,8 @@ }, onConfirmPicker(e) { if (this.comPickerInfo.name == 'SKProductionUnit') { - this.model.Product_Unit = e.value[0] - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID this.comPickerInfo = { showSheet: false, columns: [], diff --git a/pages/apply/subPages/SK/riskContentEdit.vue b/pages/apply/subPages/SK/riskContentEdit.vue index 492af7d..e50e262 100644 --- a/pages/apply/subPages/SK/riskContentEdit.vue +++ b/pages/apply/subPages/SK/riskContentEdit.vue @@ -11,7 +11,7 @@ 基本信息填写 - + @@ -256,7 +256,7 @@ GetCheckContentsNew(json).then(res => { this.stepLoad = false this.model = res - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; + if (this.model.Nav_ListCheckQuestion && this.model.Nav_ListCheckQuestion.length > 0) { this.model.Nav_ListCheckQuestion = this.model.Nav_ListCheckQuestion.sort((a, b) => a.NUM - b.NUM); this.model.Nav_ListCheckQuestion.map(item => { @@ -280,7 +280,7 @@ }, stepAdd() { - if (!this.model.Product_Unit) { + if (!this.model.PRODUCTION_UNIT_ID) { uni.showToast({ title: '请选择生产单元', icon: 'none' @@ -344,11 +344,14 @@ }, handleChange(name, item) { if (name == 'SKProductionUnit') { - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsText['SKProductionUnit']], - name: name - } + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) } else if (name == 'SKHiddenLevel') { this.comPickerInfo = { showSheet: true, @@ -361,8 +364,8 @@ }, onConfirmPicker(e) { if (this.comPickerInfo.name == 'SKProductionUnit') { - this.model.Product_Unit = e.value[0] - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID this.comPickerInfo = { showSheet: false, columns: [], diff --git a/pages/apply/subPages/SK/riskDouPreEdit.vue b/pages/apply/subPages/SK/riskDouPreEdit.vue index 537df8d..4e97b75 100644 --- a/pages/apply/subPages/SK/riskDouPreEdit.vue +++ b/pages/apply/subPages/SK/riskDouPreEdit.vue @@ -1166,20 +1166,20 @@ }) return } - // if (!item.RISK_NAME) { - // uni.showToast({ - // title: '顺序'+i+'风险名称不能为空', - // icon: 'none' - // }) - // return - // } - if (!item.Nav_RiskName.NAME) { + if (!item.RISK_NAME) { uni.showToast({ title: '顺序'+i+'风险名称不能为空', icon: 'none' }) return } + // if (!item.Nav_RiskName.NAME) { + // uni.showToast({ + // title: '顺序'+i+'风险名称不能为空', + // icon: 'none' + // }) + // return + // } if (!item.RISK_DESCRIPTION) { uni.showToast({ title: '顺序'+i+'风险描述不能为空', diff --git a/pages/apply/subPages/SK/riskDouPreEditNew.vue b/pages/apply/subPages/SK/riskDouPreEditNew.vue index d5b4626..734599b 100644 --- a/pages/apply/subPages/SK/riskDouPreEditNew.vue +++ b/pages/apply/subPages/SK/riskDouPreEditNew.vue @@ -71,7 +71,7 @@ - + @@ -556,7 +556,7 @@ item.Nav_SCOREC = item.Nav_SCOREC ? item.Nav_SCOREC : { SCORE: '' } - item.MineTypeName = item.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item4 => item4.code === item.MineType).name : ''; + item.EVALUATE_LEVELName = item.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item4 => item4.code === item.EVALUATE_LEVEL).name : ''; item.Nav_DetailPosts.map(item1 => { @@ -784,14 +784,28 @@ this.showPopupUnit = false }, handleChangeUnit(name, item, index) { - // this.fetchEnums(['SKHiddenLevel', 'SKProductionUnit', 'SKEvaluateLevelEnum', 'SKDepartmentTypeEnum', 'SKPLANCHECKFREQUENCYEnum']); - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsText[name]], - dataItem: item, - name: name, - index: index + if (name == 'SKProductionUnit') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + dataItem: item, + name: name, + index: index + } + }) + } else { + this.comPickerInfo = { + showSheet: true, + columns: [this.enumsText[name]], + dataItem: item, + name: name, + index: index + } } + // this.fetchEnums(['SKHiddenLevel', 'SKProductionUnit', 'SKEvaluateLevelEnum', 'SKDepartmentTypeEnum', 'SKPLANCHECKFREQUENCYEnum']); + }, onConfirmPicker(e) { if (this.comPickerInfo.name == 'SKHiddenLevel') { @@ -804,8 +818,8 @@ } } else if (this.comPickerInfo.name == 'SKProductionUnit') { - this.comPickerInfo.dataItem.MineTypeName = e.value[0] - this.comPickerInfo.dataItem.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.comPickerInfo.dataItem.Nav_ProductionUnit = e.value[0] + this.comPickerInfo.dataItem.PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.comPickerInfo.name == 'SKEvaluateLevelEnum') { this.comPickerInfo.dataItem.EVALUATE_LEVELName = e.value[0] @@ -860,7 +874,10 @@ handleNewCheckContent() { this.model.Nav_DoubleDetails.push({ showPack: false, - MineType: '', + Nav_ProductionUnit: { + NAME: '' + }, + PRODUCTION_UNIT_ID:'', Nav_Area: { NAME: '' }, @@ -1045,8 +1062,8 @@ this.nowName == 'Dep' || this.nowName == 'RecDep' || this.nowName == 'CheckThreeDep' ? GetDepartmentInfo : this.nowName == 'RiskName' ? GetRiskNameInfo : getUserLists if (this.nowName == 'CheckThreeType') { - if (this.model.Nav_DoubleDetails[this.nowIndex[0]].MineType !== undefined && this.model.Nav_DoubleDetails[this.nowIndex[0]].MineType !== null) { - extendRule(json, 'MineType', 1, String(this.model.Nav_DoubleDetails[this.nowIndex[0]].MineType)); + if (this.model.Nav_DoubleDetails[this.nowIndex[0]].PRODUCTION_UNIT_ID !== undefined && this.model.Nav_DoubleDetails[this.nowIndex[0]].PRODUCTION_UNIT_ID !== null) { + extendRule(json, 'PRODUCTION_UNIT_ID', 1, String(this.model.Nav_DoubleDetails[this.nowIndex[0]].PRODUCTION_UNIT_ID)); } } @@ -1269,7 +1286,7 @@ submit() { let i = 1 for (let item of this.model.Nav_DoubleDetails) { - if (!item.MineTypeName) { + if (!item.PRODUCTION_UNIT_ID) { uni.showToast({ title: '顺序' + i + '生产单元不能为空', icon: 'none' diff --git a/pages/apply/subPages/SK/riskDouPreShow.vue b/pages/apply/subPages/SK/riskDouPreShow.vue index db95540..774ef17 100644 --- a/pages/apply/subPages/SK/riskDouPreShow.vue +++ b/pages/apply/subPages/SK/riskDouPreShow.vue @@ -74,7 +74,7 @@ - + @@ -478,7 +478,7 @@ item['isShowControl'] = false item['isShowCheck'] = false item['curNow'] = 0 - item.MineTypeName = item.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item4 => item4.code === item.MineType).name : ''; + item.EVALUATE_LEVELName = item.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item4 => item4.code === item.EVALUATE_LEVEL).name : ''; item.Nav_RiskName = item.Nav_RiskName ? item.Nav_RiskName : { NAME: '' diff --git a/pages/apply/subPages/SK/riskHandelEditNew.vue b/pages/apply/subPages/SK/riskHandelEditNew.vue index b8d5002..000cdb4 100644 --- a/pages/apply/subPages/SK/riskHandelEditNew.vue +++ b/pages/apply/subPages/SK/riskHandelEditNew.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -93,10 +93,13 @@ model: { ORG_ID: uni.getStorageSync('orgId'), Nav_ReportFiles: [], - MineType: '', Nav_RiskArea: { NAME: '' }, + Nav_ProductionUnit:{ + NAME: '' + }, + PRODUCTION_UNIT_ID:'', HIDDEN_PLACE: '', HIDDEN_DESCRIPTION: '', }, @@ -204,9 +207,6 @@ if (this.ID == undefined || this.ID == '') { this.model.ID = guid() this.isNew = true - let mint = Number(uni.getStorageSync('appInfo').User.MineType) - this.model.Product_Unit = this.enumsData['SKProductionUnit'].find(item => item.code === mint).name; - this.model.MineType = this.enumsData['SKProductionUnit'].find(item => item.code === mint).code; this.isLoadOK = false this.$forceUpdate() } else { @@ -217,7 +217,6 @@ GetRiskHandleReport(json).then(res => { this.model = res; this.model.ID = this.ID - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.stepsPage = res.STATUS == 0 ? 0 : 1 }) @@ -240,11 +239,14 @@ } } } else { - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsData['SKProductionUnit']], - name: name - } + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) } @@ -256,8 +258,8 @@ this.model.Product_Unit = e.value[0].name this.model.MineType = mineTypeStorage[e.indexs[0]].code } else { - this.model.Product_Unit = e.value[0].name - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID } this.comPickerInfo = { @@ -301,6 +303,9 @@ this.selectorInfo.totalCount = listAreasInfo.TotalCount } } else { + if(this.model.PRODUCTION_UNIT_ID){ + extendRule(json, 'PRODUCTION_UNIT_ID', 1, this.model.PRODUCTION_UNIT_ID); + } dataSelect = await GetNewRiskAreaInfo(json).then(res => { this.selectorInfo.totalCount = res.TotalCount if (res != undefined && res.Data.length > 0) { @@ -354,7 +359,7 @@ submit() { - if (!this.model.Product_Unit) { + if (!this.model.PRODUCTION_UNIT_ID) { uni.showToast({ title: '请选择生产单元', icon: 'none' @@ -371,6 +376,7 @@ if (this.isOnline) { this.modelEdit = JSON.parse(JSON.stringify(this.model)) delete this.modelEdit.Nav_RiskArea + delete this.modelEdit.Nav_ProductionUnit if (this.model.ORG_ID == '' || !this.model.ORG_ID) { this.model.ORG_ID = this.ORG_ID } diff --git a/pages/apply/subPages/SK/riskHandelShow.vue b/pages/apply/subPages/SK/riskHandelShow.vue index a1e5433..8fa7645 100644 --- a/pages/apply/subPages/SK/riskHandelShow.vue +++ b/pages/apply/subPages/SK/riskHandelShow.vue @@ -25,7 +25,7 @@ - + @@ -118,21 +118,9 @@ this.model.ID = option.ID ? option.ID : ''; this.tableKey = option.tableKey ? option.tableKey : '0' this.isAudit = option.isAudit - this.fetchEnums(['SKProductionUnit']); + this.loadData(); }, methods: { - fetchEnums(enumNames) { - var dataParm = { - 'name': enumNames.join('|') - } - GetEnumAnyOrder(dataParm).then(res => { - let newd = transformData(res, enumNames) - this.enumsData = newd[0]; - // 生成文本列表(如需要) - this.enumsText = newd[1] - this.loadData(); - }) - }, loadData() { const orgId = uni.getStorageSync('orgId') const json = initFilter(orgId, "", "") @@ -147,7 +135,6 @@ GetHandRiskReportRecord(json).then(res => { this.isLoadOK = true this.model = res - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.stepsPage = res.STATUS == 0 ? 0 : 1 }) diff --git a/pages/apply/subPages/SK/riskRectifyDeferredEditNew.vue b/pages/apply/subPages/SK/riskRectifyDeferredEditNew.vue index 34d2246..78e90d4 100644 --- a/pages/apply/subPages/SK/riskRectifyDeferredEditNew.vue +++ b/pages/apply/subPages/SK/riskRectifyDeferredEditNew.vue @@ -19,7 +19,7 @@ - + @@ -154,8 +154,6 @@ listPropValUpload: [], ORG_ID: uni.getStorageSync('orgId'), model: { - Product_Unit: '', - MineType: '', CODE: '', Nav_RiskArea: { NAME: '' @@ -219,7 +217,6 @@ GetRectifyDelayApplyReport(json).then(res => { this.model = res; this.model.ID = this.ID - this.model.MineType = res.MineType this.model.HIDDEN_DANGER_RECTIFY_RECORD_ID = res.ID this.model.CODE = res.Nav_RectifyRecord.CODE this.model.Nav_RectifyPhotoas = res.Nav_RectifyRecord.Nav_RectifyPhotoas ? res.Nav_RectifyRecord.Nav_RectifyPhotoas : [] @@ -230,7 +227,6 @@ this.model.RECITIFY_TIME = uni.$u.timeFormat(res.Nav_RectifyRecord.RECITIFY_TIME, 'yyyy-mm-dd') this.model.DELAY_RECITIFY_TIME = uni.$u.timeFormat(res.DELAY_RECITIFY_TIME, 'yyyy-mm-dd') this.model.HIDDEN_LEVELName = res.HIDDEN_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item => item.code === res.Nav_RectifyRecord.HIDDEN_LEVEL).name : ''; - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.Nav_RectifyRecord.MineType).name : ''; this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : res.STATUS == 21 ? 2 : 3 }) @@ -286,6 +282,7 @@ json.Start = (pageIndex - 1) * 20; } // extendRule(json, 'ID', 1, this.model.ID); + extendInclude(json, 'Nav_ProductionUnit'); extendInclude(json, 'Nav_RiskArea'); extendInclude(json, 'Nav_Question'); extendInclude(json, 'Nav_RectifyPhotoas.Nav_ImgFile'); @@ -309,8 +306,8 @@ }, handleSelectedArea(val) { // this.model = val - this.model.MineType = val.MineType - this.model.Product_Unit = val.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === val.MineType).name : ''; + this.model.Nav_ProductionUnit = val.Nav_ProductionUnit + this.model.PRODUCTION_UNIT_ID = val.PRODUCTION_UNIT_ID this.model.HIDDEN_DANGER_RECTIFY_RECORD_ID = val.ID this.model.CODE = val.CODE this.model.Nav_RectifyPhotoas = val.Nav_RectifyPhotoas ? val.Nav_RectifyPhotoas : [] @@ -358,6 +355,7 @@ this.modelEdit = JSON.parse(JSON.stringify(this.model)) delete this.modelEdit.Nav_RectifyRecord delete this.modelEdit.Nav_RiskArea + delete this.modelEdit.Nav_ProductionUnit if (this.TaskID == null || this.TaskID == '') { this.modelEdit.TaskID = '00000000-0000-0000-0000-000000000000' } else { diff --git a/pages/apply/subPages/SK/riskRectifyEditNew.vue b/pages/apply/subPages/SK/riskRectifyEditNew.vue index 80e53ce..29f3601 100644 --- a/pages/apply/subPages/SK/riskRectifyEditNew.vue +++ b/pages/apply/subPages/SK/riskRectifyEditNew.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -384,7 +384,6 @@ GetDangerRectifyReport(json).then(res => { this.model = res; this.model.ID = this.ID - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_RectifyDetails && this.model.Nav_RectifyDetails.length > 0) { @@ -670,6 +669,7 @@ this.modelEdit = JSON.parse(JSON.stringify(this.model)) delete this.modelEdit.Nav_ApplyDepartment + delete this.modelEdit.Nav_ProductionUnit delete this.modelEdit.Nav_ApplyUser delete this.modelEdit.Nav_CheckType this.modelEdit.Nav_RectifyDetails.map(item => { diff --git a/pages/apply/subPages/SK/riskRectifyRecordEditNew.vue b/pages/apply/subPages/SK/riskRectifyRecordEditNew.vue index ada85c3..e4dd2ca 100644 --- a/pages/apply/subPages/SK/riskRectifyRecordEditNew.vue +++ b/pages/apply/subPages/SK/riskRectifyRecordEditNew.vue @@ -13,7 +13,7 @@ - + @@ -277,7 +277,6 @@ 'yyyy-mm-dd') this.model.ACCEPT_DATE = uni.$u.timeFormat(res.ACCEPT_DATE, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.HIDDEN_LEVELNAME = res.HIDDEN_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item => item.code === res.HIDDEN_LEVEL).name : ''; this.model.ACCEPT_RESULTENAME = res.ACCEPT_RESULTE !== undefined ? this.enumsData['SKAcceptResultEnum'].find(item => item.code === res.ACCEPT_RESULTE).name : ''; this.stepsPage = res.STATUS == 0 || res.STATUS == 40 ? 0 : res.STATUS == 10 ? 1 : res.STATUS == 20 ? 2 : 3 @@ -313,16 +312,30 @@ }, handleChange(name) { - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsData[name]], - name: name + if (name == 'SKProductionUnit') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) + + + } else { + this.comPickerInfo = { + showSheet: true, + columns: [this.enumsData[name]], + name: name + } } + }, onConfirmPicker(e) { if (this.comPickerInfo.name == 'SKProductionUnit') { - this.model.Product_Unit = e.value[0].name - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.comPickerInfo.name == 'SKHiddenLevel') { this.model.HIDDEN_LEVELNAME = e.value[0].name this.model.HIDDEN_LEVEL = this.enumsData['SKHiddenLevel'][e.indexs[0]].code @@ -471,7 +484,7 @@ submit() { - if (!this.model.Product_Unit) { + if (!this.model.PRODUCTION_UNIT_ID) { uni.showToast({ title: '请选择生产单元', icon: 'none' @@ -515,6 +528,7 @@ } this.modelEdit = JSON.parse(JSON.stringify(this.model)) + delete this.modelEdit.Nav_ProductionUnit delete this.modelEdit.Nav_AcceptUser delete this.modelEdit.Nav_ApplyDepartment delete this.modelEdit.Nav_ApplyUser diff --git a/pages/apply/subPages/SK/riskRectifyRecordShow.vue b/pages/apply/subPages/SK/riskRectifyRecordShow.vue index 8b82aa8..2fffad2 100644 --- a/pages/apply/subPages/SK/riskRectifyRecordShow.vue +++ b/pages/apply/subPages/SK/riskRectifyRecordShow.vue @@ -25,7 +25,7 @@ - + @@ -102,6 +102,9 @@ + + 审阅 + @@ -128,7 +131,8 @@ MineTypeName } from '../../../../utils/enums.js' import { - GetRiskVerifyRecodrReport, + GetRiskVerifyRecodrReport, + HiddenDangerRectifyRecordShow } from '../../../../services/apply/subPages/SK/SKServices.js' import stepTitle from '@/components/custom/step-title.vue' export default { @@ -239,7 +243,6 @@ 'yyyy-mm-dd') this.model.ACCEPT_DATE = uni.$u.timeFormat(res.ACCEPT_DATE, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.HIDDEN_LEVELNAME = res.HIDDEN_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item => item.code === res.HIDDEN_LEVEL).name : ''; this.model.ACCEPT_RESULTENAME = res.ACCEPT_RESULTE !== undefined ? this.enumsData['SKAcceptResultEnum'].find(item => item.code === res.ACCEPT_RESULTE).name : ''; this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 10 ? 1 : res.STATUS == 20 ? 2 : 3 @@ -247,7 +250,17 @@ this.isLoadOK = true }, - + submit() { + let json = {}; + json.ID = this.model.ID; + json.TaskID = this.TaskID; + HiddenDangerRectifyRecordShow(json).then(res => { + uni.$showMsgFunc('操作成功!', () => { + uni.navigateBack() + }, + 'success', 1000) + }) + } } diff --git a/pages/apply/subPages/SK/riskRectifyShow.vue b/pages/apply/subPages/SK/riskRectifyShow.vue index f933c6a..a2679d7 100644 --- a/pages/apply/subPages/SK/riskRectifyShow.vue +++ b/pages/apply/subPages/SK/riskRectifyShow.vue @@ -21,7 +21,7 @@ - + @@ -227,7 +227,6 @@ extendIgnoreDataRule(json) GetDangerRectifyShow(json).then(res => { this.model = res - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_RectifyDetails && this.model.Nav_RectifyDetails.length > 0) { diff --git a/pages/apply/subPages/SK/riskReportEditNew.vue b/pages/apply/subPages/SK/riskReportEditNew.vue index 720fa54..34d62a0 100644 --- a/pages/apply/subPages/SK/riskReportEditNew.vue +++ b/pages/apply/subPages/SK/riskReportEditNew.vue @@ -14,7 +14,7 @@ - + @@ -377,7 +377,6 @@ this.stepLoad = false this.model = res; this.model.ID = this.ID - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_ReportDetails && this.model.Nav_ReportDetails.length > 0) { diff --git a/pages/apply/subPages/SK/riskReportShow.vue b/pages/apply/subPages/SK/riskReportShow.vue index aaf8c4a..529e804 100644 --- a/pages/apply/subPages/SK/riskReportShow.vue +++ b/pages/apply/subPages/SK/riskReportShow.vue @@ -21,7 +21,7 @@ - + @@ -239,7 +239,6 @@ extendIgnoreDataRule(json) GetHiddenDangerReportNew(json).then(res => { this.model = res; - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_ReportDetails && this.model.Nav_ReportDetails.length > 0) { diff --git a/pages/apply/subPages/SK/riskSafeEvaSumShow.vue b/pages/apply/subPages/SK/riskSafeEvaSumShow.vue index 7a84b8d..22fe48e 100644 --- a/pages/apply/subPages/SK/riskSafeEvaSumShow.vue +++ b/pages/apply/subPages/SK/riskSafeEvaSumShow.vue @@ -70,7 +70,7 @@ - + @@ -328,7 +328,6 @@ item.Nav_SCOREC = item.Nav_SCOREC ? item.Nav_SCOREC : { SCORE: '' } - item.MineTypeName = item.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item1 => item1.code === item.MineType).name : ''; item.EVALUATE_LEVELName = item.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item1 => item1.code === item.EVALUATE_LEVEL).name : ''; item.Nav_DetailDeparts.map(item1 => { item1.DEPARTMENT_TYPEName = item1.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item2 => item2.code === item1.DEPARTMENT_TYPE).name : ''; diff --git a/pages/apply/subPages/SK/riskSafeEvaluateEdit.vue b/pages/apply/subPages/SK/riskSafeEvaluateEdit.vue index b5292a8..9c5d9d5 100644 --- a/pages/apply/subPages/SK/riskSafeEvaluateEdit.vue +++ b/pages/apply/subPages/SK/riskSafeEvaluateEdit.vue @@ -651,20 +651,20 @@ }) return } - // if (!item.RISK_NAME) { + if (!item.RISK_NAME) { + uni.showToast({ + title: '顺序' + i + '风险名称不能为空', + icon: 'none' + }) + return + } + // if (!item.Nav_RiskName.NAME) { // uni.showToast({ - // title: '风险名称不能为空', + // title: '顺序'+i+'风险名称不能为空', // icon: 'none' // }) // return // } - if (!item.Nav_RiskName.NAME) { - uni.showToast({ - title: '顺序'+i+'风险名称不能为空', - icon: 'none' - }) - return - } if (!item.RISK_DESCRIPTION) { uni.showToast({ title: '顺序'+i+'风险描述不能为空', diff --git a/pages/apply/subPages/SK/riskSafeEvaluateEditNew.vue b/pages/apply/subPages/SK/riskSafeEvaluateEditNew.vue index ed5ad48..d27fc4a 100644 --- a/pages/apply/subPages/SK/riskSafeEvaluateEditNew.vue +++ b/pages/apply/subPages/SK/riskSafeEvaluateEditNew.vue @@ -75,7 +75,7 @@ - + @@ -281,7 +281,10 @@ Nav_Files: [], Nav_Details: [{ showPack: false, - MineType: '', + Nav_ProductionUnit:{ + NAME: '' + }, + PRODUCTION_UNIT_ID:'', Nav_Area: { NAME: '' }, @@ -400,7 +403,6 @@ item.Nav_SCOREC = item.Nav_SCOREC ? item.Nav_SCOREC : { SCORE: '' } - item.MineTypeName = item.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item1 => item1.code === item.MineType).name : ''; item.EVALUATE_LEVELName = item.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item1 => item1.code === item.EVALUATE_LEVEL).name : ''; item.Nav_DetailDeparts.map(item1 => { item1.DEPARTMENT_TYPEName = item1.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item2 => item2.code === item1.DEPARTMENT_TYPE).name : ''; @@ -424,18 +426,33 @@ }, handleChangeUnit(name, item) { - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsText[name]], - dataItem: item, - name: name + if (name == 'SKProductionUnit') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + dataItem: item, + name: name + } + }) + + + } else { + this.comPickerInfo = { + showSheet: true, + columns: [this.enumsText[name]], + dataItem: item, + name: name + } } + }, onConfirmPicker(e) { console.log(this.comPickerInfo.dataItem) if (this.comPickerInfo.name == 'SKProductionUnit') { - this.comPickerInfo.dataItem.MineTypeName = e.value[0] - this.comPickerInfo.dataItem.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.comPickerInfo.dataItem.Nav_ProductionUnit = e.value[0] + this.comPickerInfo.dataItem.PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.comPickerInfo.name == 'SKEvaluateLevelEnum') { this.comPickerInfo.dataItem.EVALUATE_LEVELName = e.value[0] @@ -470,8 +487,10 @@ handleNewCheckContent() { this.model.Nav_Details.push({ showPack: false, - MineType: '', - MineTypeName: '', + Nav_ProductionUnit:{ + NAME: '' + }, + PRODUCTION_UNIT_ID:'', Nav_Area: { NAME: '' }, @@ -759,7 +778,7 @@ submit() { let i = 1 for (let item of this.model.Nav_Details) { - if (!item.MineTypeName) { + if (!item.PRODUCTION_UNIT_ID) { uni.showToast({ title: '顺序' + i + '生产单元不能为空', icon: 'none' diff --git a/pages/apply/subPages/SK/riskSafeEvaluateShow.vue b/pages/apply/subPages/SK/riskSafeEvaluateShow.vue index 5153ec3..c7b25eb 100644 --- a/pages/apply/subPages/SK/riskSafeEvaluateShow.vue +++ b/pages/apply/subPages/SK/riskSafeEvaluateShow.vue @@ -70,7 +70,7 @@ - + @@ -331,7 +331,6 @@ item.Nav_SCOREC = item.Nav_SCOREC ? item.Nav_SCOREC : { SCORE: '' } - item.MineTypeName = item.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item1 => item1.code === item.MineType).name : ''; item.EVALUATE_LEVELName = item.EVALUATE_LEVEL !== undefined ? this.enumsData['SKEvaluateLevelEnum'].find(item1 => item1.code === item.EVALUATE_LEVEL).name : ''; item.Nav_DetailDeparts.map(item1 => { item1.DEPARTMENT_TYPEName = item1.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item2 => item2.code === item1.DEPARTMENT_TYPE).name : ''; diff --git a/pages/apply/subPages/SK/riskSafeIdenEdit.vue b/pages/apply/subPages/SK/riskSafeIdenEdit.vue index 7576224..e52a18a 100644 --- a/pages/apply/subPages/SK/riskSafeIdenEdit.vue +++ b/pages/apply/subPages/SK/riskSafeIdenEdit.vue @@ -71,7 +71,7 @@ - + @@ -116,7 +116,7 @@ 上一步 提交 - + @@ -284,7 +284,6 @@ this.dataModel.Nav_Details.map(item => { item['showPack'] = false item.ENABLE_STATUS = item.ENABLE_STATUS == 0 ? '有效' : '无效' - item.MineType = MineTypeName[item.MineType] }) this.stepLoad = false @@ -300,16 +299,22 @@ }, handleChangeUnit(index, name) { this.nowIndex = [index, name] - if (name == 'MinType') { - this.UnitLists = [FMProductionUnit] + if (name == 'MinType') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.UnitLists = [res] + }) + } else { this.UnitLists = [SKEffective] } this.showPopupUnit = true }, - confirmUnit(e) { + confirmUnit(e) { + console.log(e,'11') if (this.nowIndex[1] == 'MinType') { - this.dataModel.Nav_Details[this.nowIndex[0]].MineType = e.value[0] + this.dataModel.Nav_Details[this.nowIndex[0]].Nav_ProductionUnit = e.value[0] + this.dataModel.Nav_Details[this.nowIndex[0]].PRODUCTION_UNIT_ID = e.value[0].ID } else { this.dataModel.Nav_Details[this.nowIndex[0]].ENABLE_STATUS = e.value[0] } @@ -324,7 +329,10 @@ handleNewCheckContent() { this.dataModel.Nav_Details.push({ showPack: false, - MineType: '', + Nav_ProductionUnit:{ + NAME: '' + }, + PRODUCTION_UNIT_ID:'', Nav_Area: { NAME: '' }, @@ -438,50 +446,52 @@ }, - submit() { + submit() { + let i = 1 for (let item of this.dataModel.Nav_Details) { - if (!item.MineType) { + if (!item.PRODUCTION_UNIT_ID) { uni.showToast({ - title: '生产单元不能为空', + title: '顺序' + i +'生产单元不能为空', icon: 'none' }) return } if (!item.Nav_Area.NAME) { uni.showToast({ - title: '辨识区域不能为空', + title: '顺序' + i +'辨识区域不能为空', icon: 'none' }) return } - // if (!item.RISK_NAME) { + if (!item.RISK_NAME) { + uni.showToast({ + title: '顺序' + i + '风险名称不能为空', + icon: 'none' + }) + return + } + // if (!item.Nav_RiskName.NAME) { // uni.showToast({ // title: '风险名称不能为空', // icon: 'none' // }) // return // } - if (!item.Nav_RiskName.NAME) { - uni.showToast({ - title: '风险名称不能为空', - icon: 'none' - }) - return - } if (!item.RISK_DESCRIPTION) { uni.showToast({ - title: '风险描述不能为空', + title: '顺序' + i +'风险描述不能为空', icon: 'none' }) return } if (!item.Nav_Type.NAME) { uni.showToast({ - title: '风险类别不能为空', + title: '顺序' + i +'风险类别不能为空', icon: 'none' }) return - } + } + i++ } // this.model = this.dataModel @@ -491,7 +501,7 @@ this.dataModel.Nav_Details.map(item => { arr.push({ - MineType: MineTypeIndex[item.MineType], + PRODUCTION_UNIT_ID: item.PRODUCTION_UNIT_ID, AREA_ID:item.AREA_ID, RISK_NAME: item.RISK_NAME, RISK_NAME_ID: item.RISK_NAME_ID, diff --git a/pages/apply/subPages/SK/riskSafeIdenResEdit.vue b/pages/apply/subPages/SK/riskSafeIdenResEdit.vue index 80b27bb..e77ebac 100644 --- a/pages/apply/subPages/SK/riskSafeIdenResEdit.vue +++ b/pages/apply/subPages/SK/riskSafeIdenResEdit.vue @@ -69,7 +69,7 @@ - + @@ -309,7 +309,6 @@ item['showPack'] = false item.ENABLE_STATUS = item.ENABLE_STATUS == 0 ? '有效' : '无效' item.MARK = item.MARK == 0 ? '自动带出' : item.MARK == 10 ? '新增' : '修改' - item.MineType = MineTypeName[item.MineType] item.Nav_RiskName = item.Nav_RiskName? item.Nav_RiskName: { NAME: ''} }) @@ -328,7 +327,10 @@ handleChangeUnit(index, name) { this.nowIndex = [index, name] if (name == 'MinType') { - this.UnitLists = [FMProductionUnit] + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.UnitLists = [res] + }) } else if (this.nowIndex[1] == 'ENABLE_STATUS') { this.UnitLists = [SKEffective] } else { @@ -338,7 +340,8 @@ }, confirmUnit(e) { if (this.nowIndex[1] == 'MinType') { - this.dataModel.Nav_Details[this.nowIndex[0]].MineType = e.value[0] + this.dataModel.Nav_Details[this.nowIndex[0]].Nav_ProductionUnit = e.value[0] + this.dataModel.Nav_Details[this.nowIndex[0]].PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.nowIndex[1] == 'ENABLE_STATUS') { this.dataModel.Nav_Details[this.nowIndex[0]].ENABLE_STATUS = e.value[0] } else { @@ -384,7 +387,10 @@ handleNewCheckContent() { this.dataModel.Nav_Details.push({ showPack: false, - MineType: '', + Nav_ProductionUnit:{ + NAME: '' + }, + PRODUCTION_UNIT_ID:'', Nav_Area: { NAME: '' }, @@ -504,7 +510,7 @@ submit() { let i=1 for (let item of this.dataModel.Nav_Details) { - if (!item.MineType) { + if (!item.PRODUCTION_UNIT_ID) { uni.showToast({ title: '顺序'+i+'生产单元不能为空', icon: 'none' @@ -518,20 +524,20 @@ }) return } - // if (!item.RISK_NAME) { - // uni.showToast({ - // title: '风险名称不能为空', - // icon: 'none' - // }) - // return - // } - if (!item.Nav_RiskName.NAME) { + if (!item.RISK_NAME) { uni.showToast({ title: '顺序'+i+'风险名称不能为空', icon: 'none' }) return } + // if (!item.Nav_RiskName.NAME) { + // uni.showToast({ + // title: '顺序'+i+'风险名称不能为空', + // icon: 'none' + // }) + // return + // } if (!item.RISK_DESCRIPTION) { uni.showToast({ title: '顺序'+i+'风险描述不能为空', @@ -556,7 +562,7 @@ this.dataModel.Nav_Details.map(item => { arr.push({ - MineType: MineTypeIndex[item.MineType], + PRODUCTION_UNIT_ID: item.PRODUCTION_UNIT_ID, AREA_ID: item.AREA_ID, RISK_NAME: item.RISK_NAME, RISK_NAME_ID: item.RISK_NAME_ID, diff --git a/pages/apply/subPages/SK/riskSafeIdenResShow.vue b/pages/apply/subPages/SK/riskSafeIdenResShow.vue index 883e527..5ae02a1 100644 --- a/pages/apply/subPages/SK/riskSafeIdenResShow.vue +++ b/pages/apply/subPages/SK/riskSafeIdenResShow.vue @@ -63,7 +63,7 @@ - + @@ -265,7 +265,6 @@ this.dataModel.Nav_Details.map(item => { item['showPack'] = false item.ENABLE_STATUS = item.ENABLE_STATUS == 0 ? '有效' : '无效' - item.MineType = MineTypeName[item.MineType] item.Nav_RiskName = item.Nav_RiskName? item.Nav_RiskName: { NAME: ''} }) diff --git a/pages/apply/subPages/SK/riskSafeIdenShow.vue b/pages/apply/subPages/SK/riskSafeIdenShow.vue index 14cd259..c4eac81 100644 --- a/pages/apply/subPages/SK/riskSafeIdenShow.vue +++ b/pages/apply/subPages/SK/riskSafeIdenShow.vue @@ -66,7 +66,7 @@ - + @@ -271,7 +271,6 @@ this.dataModel.Nav_Details.map(item => { item['showPack'] = false item.ENABLE_STATUS = item.ENABLE_STATUS == 0 ? '有效' : '无效' - item.MineType = MineTypeName[item.MineType] }) this.stepLoad = false diff --git a/pages/apply/subPages/SK/riskSafeIdenSumShow.vue b/pages/apply/subPages/SK/riskSafeIdenSumShow.vue index 41a5da4..060aeb7 100644 --- a/pages/apply/subPages/SK/riskSafeIdenSumShow.vue +++ b/pages/apply/subPages/SK/riskSafeIdenSumShow.vue @@ -63,7 +63,7 @@ - + @@ -265,7 +265,6 @@ this.dataModel.Nav_Details.map(item => { item['showPack'] = false item.ENABLE_STATUS = item.ENABLE_STATUS == 0 ? '有效' : '无效' - item.MineType = MineTypeName[item.MineType] item.Nav_RiskName = item.Nav_RiskName? item.Nav_RiskName: { NAME: ''} }) diff --git a/pages/apply/subPages/SK/riskVerifyEditNew.vue b/pages/apply/subPages/SK/riskVerifyEditNew.vue index 1cd2e3b..b4aff64 100644 --- a/pages/apply/subPages/SK/riskVerifyEditNew.vue +++ b/pages/apply/subPages/SK/riskVerifyEditNew.vue @@ -13,7 +13,7 @@ - + @@ -308,7 +308,6 @@ this.model.RECITIFY_TIME = uni.$u.timeFormat(res.RECITIFY_TIME, 'yyyy-mm-dd') this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : res.STATUS == 10 ? 2 : 3 - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; this.model.HIDDEN_LEVELName = res.HIDDEN_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item => item.code === res.HIDDEN_LEVEL).name : ''; @@ -330,17 +329,31 @@ this.showPopupRecitifyDate = false }, handleChange(name) { - this.comPickerInfo = { + if (name == 'SKProductionUnit') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) + + + }else{ + this.comPickerInfo = { showSheet: true, columns: [this.enumsText[name]], name: name } + } + }, onConfirmPicker(e) { if (this.comPickerInfo.name == 'SKProductionUnit') { - this.model.Product_Unit = e.value[0] - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.comPickerInfo.name == 'SKHiddenLevel') { this.model.HIDDEN_LEVELName = e.value[0] this.model.HIDDEN_LEVEL = this.enumsData['SKHiddenLevel'][e.indexs[0]].code @@ -424,8 +437,8 @@ }) } else if (p.name == 'Nav_CheckType') { - if (this.model.MineType !== undefined && this.model.MineType !== null) { - extendRule(json, 'MineType', 1, String(this.model.MineType)); + if (this.model.PRODUCTION_UNIT_ID) { + extendRule(json, 'PRODUCTION_UNIT_ID', 1, this.model.PRODUCTION_UNIT_ID); } dataSelect = await CheckTypeNewOrderPaged(json).then(res => { this.selectorInfo.totalCount = res.TotalCount diff --git a/pages/apply/subPages/SK/riskVerifyShow.vue b/pages/apply/subPages/SK/riskVerifyShow.vue index 6c95686..d0e4420 100644 --- a/pages/apply/subPages/SK/riskVerifyShow.vue +++ b/pages/apply/subPages/SK/riskVerifyShow.vue @@ -25,7 +25,7 @@ - + @@ -252,7 +252,6 @@ this.model.CONTEXT = res.CONTEXT ? res.CONTEXT : '' this.model.RECITIFY_TIME = uni.$u.timeFormat(res.RECITIFY_TIME, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; this.model.HIDDEN_LEVELName = res.HIDDEN_LEVEL !== undefined ? this.enumsData['SKHiddenLevel'].find(item => item.code === res.HIDDEN_LEVEL).name : ''; diff --git a/pages/apply/subPages/SK/safeCheckEditNew.vue b/pages/apply/subPages/SK/safeCheckEditNew.vue index d1f8d64..2c9658e 100644 --- a/pages/apply/subPages/SK/safeCheckEditNew.vue +++ b/pages/apply/subPages/SK/safeCheckEditNew.vue @@ -13,7 +13,7 @@ - + @@ -181,7 +181,6 @@ ORG_ID: uni.getStorageSync('orgId'), model: { Nav_CheckNoticeFiles: [], - Product_Unit: '', Check_Type: '', PLANCHECKFREQUENCYName: '', DEPARTMENT_TYPEName: '', @@ -278,7 +277,6 @@ this.model = res this.model.ID = this.ID this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : res.STATUS == 10 ? 2 : 3 - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; } @@ -288,7 +286,7 @@ } }, stepAdd() { - if (!this.model.Product_Unit) { + if (!this.model.PRODUCTION_UNIT_ID) { uni.showToast({ title: '请选择生产单元', icon: 'none' @@ -329,17 +327,31 @@ this.stepsPageList = this.stepsPageList - 1 }, handleChange(name) { - console.log(this.enumsData[name], 'mnn') - this.comPickerInfo = { - showSheet: true, - columns: [this.enumsData[name]], - name: name + if (name == 'SKProductionUnit') { + const json = initFilter(this.ORG_ID) + getRequest(json, "/FM/UserProductionUnitSet/OrderPaged").then(res => { + this.comPickerInfo = { + showSheet: true, + columns: [res], + name: name + } + }) + + + } else { + this.comPickerInfo = { + showSheet: true, + columns: [this.enumsData[name]], + name: name + } } + }, onConfirmPicker(e) { + console.log(e,'1111') if (this.comPickerInfo.name == 'SKProductionUnit') { - this.model.Product_Unit = e.value[0].name - this.model.MineType = this.enumsData['SKProductionUnit'][e.indexs[0]].code + this.model.Nav_ProductionUnit = e.value[0] + this.model.PRODUCTION_UNIT_ID = e.value[0].ID } else if (this.comPickerInfo.name == 'SKPLANCHECKFREQUENCYEnum') { this.model.PLANCHECKFREQUENCYName = e.value[0].name this.model.PLANCHECKFREQUENCY = this.enumsData['SKPLANCHECKFREQUENCYEnum'][e.indexs[0]].code @@ -533,8 +545,8 @@ if (p.val) { extendRule(json, 'NAME', 9, p.val); } - if (this.model.MineType !== undefined && this.model.MineType !== null) { - extendRule(json, 'MineType', 1, String(this.model.MineType)); + if (this.model.PRODUCTION_UNIT_ID) { + extendRule(json, 'PRODUCTION_UNIT_ID', 1, this.model.PRODUCTION_UNIT_ID); } dataSelect = await CheckTypeNewOrderPaged(json).then(res => { @@ -598,6 +610,7 @@ }, submit() { + console.log(this.model) for (let item of this.model.Nav_CheckNoticeDetails) { if (item.Nav_CheckNoticeDetailUsers.length == 0) { uni.showToast({ @@ -625,6 +638,7 @@ delete this.modelEdit.Nav_ApplyDepartment delete this.modelEdit.Nav_ApplyUser delete this.modelEdit.Nav_CheckType + delete this.modelEdit.Nav_ProductionUnit this.modelEdit.Nav_CheckNoticeDetails.map(item => { item.PUBLISH = 'SaveAndNotify' diff --git a/pages/apply/subPages/SK/safeCheckRecordEdit.vue b/pages/apply/subPages/SK/safeCheckRecordEdit.vue index 4950e95..28ce587 100644 --- a/pages/apply/subPages/SK/safeCheckRecordEdit.vue +++ b/pages/apply/subPages/SK/safeCheckRecordEdit.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -330,8 +330,6 @@ this.dataModel.Nav_Files = res.Nav_CheckRecordFiles this.dataModel.Check_Date = res.CHECK_TIME this.dataModel.UserNames = res.CHECK_PERSON - - this.dataModel.Product_Unit = MineTypeName[res.MineType] this.stepsPage = res.STATUS == 0 ? 0 : 1 this.dataModel.Nav_CheckRecordDetails = res.Nav_CheckRecordDetails ? res.Nav_CheckRecordDetails : [] if (this.dataModel.Nav_CheckRecordDetails.length > 0) { @@ -827,7 +825,6 @@ this.model.DEPARTMENT_TYPE = level //检查层级 this.model.SECURITY_INSPECTION_NOTICE_ID = this.dataModel.SECURITY_INSPECTION_NOTICE_ID this.model.CHECK_TIME = this.dataModel.Check_Date //检查时间 - this.model.MineType = MineTypeIndex[this.dataModel.Product_Unit] let arr = [] this.dataModel.Nav_CheckRecordDetails.map(item => { item.Nav_DetailContents.map(item1 => { diff --git a/pages/apply/subPages/SK/safeCheckRecordEditNew.vue b/pages/apply/subPages/SK/safeCheckRecordEditNew.vue index 4fde743..273599e 100644 --- a/pages/apply/subPages/SK/safeCheckRecordEditNew.vue +++ b/pages/apply/subPages/SK/safeCheckRecordEditNew.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -139,7 +139,7 @@ 新增检查区域 - 检查清单 + @@ -355,7 +355,6 @@ this.model = res; this.model.ID = this.ID this.stepsPage = res.STATUS == 0 ? 0 : 1 - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; this.model.Nav_CheckRecordDetails.map((item => { diff --git a/pages/apply/subPages/SK/safeCheckRecordShow.vue b/pages/apply/subPages/SK/safeCheckRecordShow.vue index 5625a33..413d891 100644 --- a/pages/apply/subPages/SK/safeCheckRecordShow.vue +++ b/pages/apply/subPages/SK/safeCheckRecordShow.vue @@ -21,7 +21,7 @@ - + @@ -253,7 +253,6 @@ this.model = res; this.model.ID = this.ID this.model.CREATE_TIME = uni.$u.timeFormat(this.model.CREATE_TIME, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_CheckRecordDetails && this.model.Nav_CheckRecordDetails.length > 0) { diff --git a/pages/apply/subPages/SK/safeCheckRecordSummaryEditNew.vue b/pages/apply/subPages/SK/safeCheckRecordSummaryEditNew.vue index 32a02b0..831f5fd 100644 --- a/pages/apply/subPages/SK/safeCheckRecordSummaryEditNew.vue +++ b/pages/apply/subPages/SK/safeCheckRecordSummaryEditNew.vue @@ -10,7 +10,7 @@ 基本信息填写 - + @@ -351,8 +351,6 @@ this.model.SECURITY_INSPECTION_RECORD_ID = res.SECURITY_INSPECTION_RECORD_ID this.model = res; this.model.ID = this.ID - - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_CheckRecordDetails && this.model.Nav_CheckRecordDetails.length > 0) { diff --git a/pages/apply/subPages/SK/safeCheckRecordSummaryShow.vue b/pages/apply/subPages/SK/safeCheckRecordSummaryShow.vue index 0e1db6f..70dbec0 100644 --- a/pages/apply/subPages/SK/safeCheckRecordSummaryShow.vue +++ b/pages/apply/subPages/SK/safeCheckRecordSummaryShow.vue @@ -21,7 +21,7 @@ - + @@ -254,7 +254,6 @@ this.model = res; this.model.ID = this.ID this.model.CREATE_TIME = uni.$u.timeFormat(this.model.CREATE_TIME, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; if (this.model.Nav_CheckRecordDetails && this.model.Nav_CheckRecordDetails.length > 0) { diff --git a/pages/apply/subPages/SK/safeCheckShow.vue b/pages/apply/subPages/SK/safeCheckShow.vue index cfb82eb..3f39080 100644 --- a/pages/apply/subPages/SK/safeCheckShow.vue +++ b/pages/apply/subPages/SK/safeCheckShow.vue @@ -22,7 +22,7 @@ - + @@ -214,7 +214,7 @@ this.model = res this.model.ID = this.ID this.model.CREATE_TIME = uni.$u.timeFormat(this.model.CREATE_TIME, 'yyyy-mm-dd') - this.model.Product_Unit = res.MineType !== undefined ? this.enumsData['SKProductionUnit'].find(item => item.code === res.MineType).name : ''; + this.model.PLANCHECKFREQUENCYName = res.PLANCHECKFREQUENCY !== undefined ? this.enumsData['SKPLANCHECKFREQUENCYEnum'].find(item => item.code === res.PLANCHECKFREQUENCY).name : ''; this.model.DEPARTMENT_TYPEName = res.DEPARTMENT_TYPE !== undefined ? this.enumsData['SKDepartmentTypeEnum'].find(item => item.code === res.DEPARTMENT_TYPE).name : ''; this.stepsPage = res.STATUS == 0 ? 0 : res.STATUS == 20 ? 1 : res.STATUS == 10 ? 2 : 3 diff --git a/services/apply/subPages/SK/SKServices.js b/services/apply/subPages/SK/SKServices.js index 606f691..bfc1c29 100644 --- a/services/apply/subPages/SK/SKServices.js +++ b/services/apply/subPages/SK/SKServices.js @@ -222,7 +222,7 @@ export function DouPreGet(params) { } export function SKEnterpriseLibrary(params) { return new Promise((resolve, reject) => { - request.post("/SK/SKEnterpriseLibrary/GetCheckList", params).then((result) => { + request.post("/SK/SKEnterpriseLibrary/GetCheckListNew", params).then((result) => { if (result.IsSuccessful) { resolve(result.Data); } @@ -451,6 +451,17 @@ export function SKRectifyNoticeShow(params) { reject(error) }) }) +} +export function HiddenDangerRectifyRecordShow(params) { + return new Promise((resolve, reject) => { + request.post("/SK/SKHiddenDangerRectifyRecord/IdentityUpdate", params).then((result) => { + if (result.IsSuccessful) { + resolve(result.Data); + } + }).catch((error) => { + reject(error) + }) + }) } export function SKRectifyDelayApplyShow(params) { return new Promise((resolve, reject) => { @@ -897,7 +908,7 @@ export function GetEvaluationInfo(params) { } export function GetRiskCodeInfo(params) { return new Promise((resolve, reject) => { - request.post("/SK/HiddenDangerRectifyRecord/OrderPaged", params).then((result) => { + request.post("/SK/SKHiddenDangerRectifyDelayApply/RecordOrderPaged", params).then((result) => { if (result.IsSuccessful) { resolve(result); }