| | |
| | | <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"> |
| | | 设备点检规程 |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | |
| | | 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: { |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipDotCheckBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | checkBoxChangeHandler(index, e) { |
| | | let cr = e.detail.value |
| | | if (cr.length == 0) { |
| | |
| | | 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 GetItemByEquipFile() { |
| | |
| | | }, |
| | | 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> |