| | |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">设备条码:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBarCode" @confirm="GetMessageByBarCode(hform.HBarCode)" |
| | | placeholder="请输入(或扫描)设备条码" /> |
| | | <view :class="enableEdit?'right':'righton'"> |
| | | <input :disabled="!enableEdit" v-model="hform.HBarCode" |
| | | @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="请输入(或扫描)设备条码" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | |
| | | <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.HMaintainResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养项目:</text>{{item.HMaintainItem}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaintainPart"> |
| | | <text>保养部位:</text>{{item.HMaintainPart}} |
| | | </view> |
| | | <view class="detail" v-if="item.HClaim"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail" v-if="item.Remark"> |
| | | <text>备注:</text>{{item.Remark}} |
| | | </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.HMaintainResult" /> |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="detail"> |
| | | <text>保养项目:</text>{{item.HMaintainItem}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaintainPart"> |
| | | <text>保养部位:</text>{{item.HMaintainPart}} |
| | | </view> |
| | | <view class="detail" v-if="item.HClaim"> |
| | | <text>具体要求:</text>{{item.HClaim}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>负责人:</text>{{item.HManagerName}} |
| | | </view> |
| | | <view class="detail" v-if="item.Remark"> |
| | | <text>备注:</text>{{item.Remark}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | |
| | | <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="'BY'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | TrackOpTypes |
| | | } from "vue"; |
| | | import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue"; |
| | | export default { |
| | | name: 'sb_EquipMaintainBill', |
| | | components: { |
| | | BillSelectorPopupVue |
| | | }, |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | |
| | | HModName: "sb_EquipMaintainBill", |
| | | HBillType: '3901', |
| | | operationType: 1, |
| | | enableEdit: true, |
| | | uploadOptions: {}, |
| | | |
| | | HDeptList: [], |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | // 获取保养规程 |
| | | async get_DocCheckItem2(HEquipMaintainRuleInterID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMaintainItemByMaintainRuleID", |
| | | data: { |
| | | "HEquipMaintainRuleInterID": HEquipMaintainRuleInterID |
| | | }, |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | this.hform.HEquipMaintainRuleInterID = data[0].保养规程ID |
| | | this.hform.HEquipMaintainRuleInterNo = data[0].保养规程单号 |
| | | this.hform.HPlanNo = data[0].保养计划单 |
| | | this.hform.HEquipMaintainPlanInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? |
| | | 0 : data[0].保养计划ID |
| | | this.hform.HEquipMaintainPlanEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == |
| | | "" ? 0 : data[0].保养计划子ID |
| | | this.hform.HMainSourceBillNo = data[0].保养计划单 |
| | | this.hform.HMainSourceInterID = (data[0].保养计划ID == null ? 0 : data[0].保养计划ID) == "" ? 0 : |
| | | data[0].保养计划ID |
| | | this.hform.HMainSourceEntryID = (data[0].保养计划子ID == null ? 0 : data[0].保养计划子ID) == "" ? 0 : |
| | | data[0].保养计划子ID |
| | | |
| | | this.HCheckFileList = Array.from(data).map(item => { |
| | | return { |
| | | "HMaintainResult": item.默认结论 == 1 ? true : false, |
| | | "HMaintainItemID": item.HMaintainItemID, |
| | | "HMaintainNumber": item.保养项目代码, |
| | | "HMaintainItem": item.保养项目, |
| | | "HMaintainPart": item.保养部位, |
| | | "HClaim": item.具体要求, |
| | | "HManagerID": item.负责人ID, |
| | | "HManagerNumber": item.负责人代码, |
| | | "HManagerName": item.负责人名称, |
| | | "HRemark": "", |
| | | "HSourceInterID": item.保养计划ID || 0, |
| | | "HSourceEntryID": item.保养计划子ID || 0, |
| | | "HSourceBillNo": item.保养计划单 || "" |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return CommonUtils.showTips({ |
| | | message: '不能选择保养规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | ValidCheck() { |
| | | if (this.hform.HEquipID == 0) { |
| | | return { |
| | | Message: "未录入设备信息,请先录入设备信息!", |
| | | state: false |
| | | } |
| | | } |
| | | |
| | | return { |
| | | Message: "", |
| | | state: true |
| | | } |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './Sb_EquipMaintainBill?operationType=1' |
| | |
| | | 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') |
| | | } |
| | |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${Message}` |
| | | message: `获取保养规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | |
| | | } |
| | | }, |
| | | async submit() { |
| | | let valid = this.ValidCheck() |
| | | if (!valid.state) { |
| | | return CommonUtils.showTips({ |
| | | message: valid.Message |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sSubStr = JSON.stringify(this.HCheckFileList); |