| | |
| | | <radio-group @change="radioChange" class="radio_Container"> |
| | | <label> |
| | | <view> |
| | | <radio value="OK" :checked="hform.HLastResult == 'OK'" /> |
| | | <radio value="OK" :checked="calcHLastResult == 'OK'" /> |
| | | <text>OK</text> |
| | | </view> |
| | | </label> |
| | | </label> |
| | | <view> |
| | | <radio value="NG" :checked="hform.HLastResult == 'NG'" /> |
| | | <radio value="NG" :checked="calcHLastResult == 'NG'" /> |
| | | <text>NG</text> |
| | | </view> |
| | | </label> |
| | |
| | | </template> |
| | | <!-- 明细信息 --> |
| | | <template v-if="tabs == 1"> |
| | | <view class="form"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="left"> |
| | | 设备点检规程 |
| | |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HDotCheckResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检项目分类:</text>{{item.HDotCheckItemClassName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检项目:</text>{{item.HDotCheckItem}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检部位:</text>{{item.HDotCheckPart}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人名称:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>备注:</text>{{item.HRemark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>序号:</text>{{index+1}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>结果:</text> |
| | | <checkbox-group style="display: inline-block;" |
| | | @change="checkBoxChangeHandler(index, $event)"> |
| | | <checkbox value="enabled" :checked="item.HDotCheckResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检项目分类:</text>{{item.HDotCheckItemClassName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检方法:</text>{{item.HDotCheckItemMethodName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检部位:</text>{{item.HDotCheckPart}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人名称:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>备注:</text>{{item.HRemark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 2"> |
| | |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> |
| | | <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'DJ'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | TrackOpTypes |
| | | } from "vue"; |
| | | import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue"; |
| | | export default { |
| | | name: 'sb_EquipDotCheckBill', |
| | | components: { |
| | | BillSelectorPopupVue |
| | | }, |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | |
| | | |
| | | hform: { |
| | | HBarCode: "", |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HBeginDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HQty: 0, |
| | | HErrNote: "", |
| | | HBigSafeNote: "", |
| | |
| | | HShiftsID: 0, |
| | | HBillNo: "", |
| | | HInterID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | HDeptName: "", |
| | | HDeptID: 0, |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HDeptName: getUserInfo().HDeptName, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HRemark: "", |
| | | HBarName: "", |
| | | HEquipID: 0, |
| | |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | calcHLastResult: { |
| | | get() { |
| | | if (this.HCheckFileList.length == 0) { |
| | | return 'OK' |
| | | } else { |
| | | let okCount = this.HCheckFileList.reduce((acc, item) => { |
| | | if (item.HDotCheckResult) { |
| | | return acc + 1 |
| | | } |
| | | return acc |
| | | }, 0) |
| | | if (okCount == this.HCheckFileList.length) { |
| | | return 'OK' |
| | | } |
| | | return 'NG' |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return CommonUtils.showTips({ |
| | | message: '不能选择点检规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipDotCheckBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | |
| | | async getShiftList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Web/GetGy_ShiftsList_Json', |
| | | url: '/Gy_ShiftsController/Get_Gy_WorkShiftList', |
| | | data: { |
| | | Shifts: "", |
| | | } |
| | | sWhere: ` and 禁用标记 = '' and ISNULL(审核人,'') != '' and 使用组织名称 = '${uni.getStorageSync("Organization")}'`, |
| | | HMaker: getUserInfo()["Czymc"], |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')} `, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | |
| | | }, |
| | | toScanCode() { |
| | | MpaasScan.scanCode(cb => { |
| | | this.hfrom.HBarCode = cb |
| | | this.hform.HBarCode = cb |
| | | this.GetMessageByBarCode(cb) |
| | | }) |
| | | }, |
| | |
| | | Message |
| | | } = res.data |
| | | |
| | | console.log('data: ', data); |
| | | this.hform.HEquipID = data[0].HInterID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | this.hform.HBarModel = data[0].设备型号 |
| | | this.hform.HQty = 1 |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipID = data[0].HInterID |
| | | this.hform.HBarName = data[0].设备名称 |
| | | this.hform.HBarSpec = data[0].设备规格 |
| | | this.hform.HBarModel = data[0].设备型号 |
| | | this.hform.HQty = 1 |
| | | |
| | | // 获取检验规程 |
| | | this.GetItemByEquipFile() |
| | | // 获取检验规程 |
| | | this.GetItemByEquipFile() |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: Message |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | // 获取保养规程 |
| | | async get_DocCheckItem2(HDotCheckRuleInterID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetDotCheckRuleItemByDotCheckRuleID", |
| | | data: { |
| | | "HDotCheckRuleInterID": HDotCheckRuleInterID |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ',data); |
| | | this.hform.HEquipDotCheckRuleInterID = data[0].HInterID |
| | | this.hform.HEquipDotCheckRuleInterNo = data[0].HBillNo |
| | | this.hform.HPlanNo = data[0].点检计划单 |
| | | this.hform.HPlanInterID = (data[0].点检计划ID == null ? 0 : data[0].点检计划ID) == "" ? 0 : data[0] |
| | | .点检计划ID |
| | | this.hform.HPlanEntryID = (data[0].点检计划子ID == null ? 0 : data[0].点检计划子ID) == "" ? 0 : data[ |
| | | 0].点检计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerCode": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HSourceInterID": item.点检计划ID == null ? 0 : item.点检计划ID, |
| | | "HSourceEntryID": item.点检计划子ID == null ? 0 : item.点检计划子ID, |
| | | "HSourceBillNo": item.点检计划单, |
| | | "HDotCheckItemClassID": 0, |
| | | "HDotCheckItemClassName": "", |
| | | "HDotCheckItemMethodID": 0, |
| | | "HDotCheckItemMethodName": "", |
| | | //"HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | |
| | | return { |
| | | "HDotCheckItemID": item.HDotCheckItemID, |
| | | "HDotCheckCode": item.点检项目代码, |
| | | "HDotCheckItem": item.点检项目, |
| | | "HDotCheckItem": item.点检项目名称, |
| | | "HDotCheckPart": item.点检部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | |
| | | "HDotCheckItemClassName": "", |
| | | "HDotCheckItemMethodID": 0, |
| | | "HDotCheckItemMethodName": "", |
| | | "HDotCheckResult": item.默认结论 == 1 ? true : false |
| | | "HDotCheckResult": item.默认点检结果 == 'OK' ? true : false |
| | | } |
| | | }) |
| | | |
| | | this.tabs = 1 |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if(!res) { |
| | | return |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let {count, Message} = res.data |
| | | if(count == 1){ |
| | | |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1' |
| | | url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | |
| | | } |
| | | } |
| | | }); |
| | | }else { |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + Message |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |