Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
| | |
| | | HStockOrgID: { |
| | | type: [String, Number], |
| | | }, |
| | | Type: { |
| | | type: [String], |
| | | require: true |
| | | } |
| | | }, |
| | | mounted() {}, |
| | | methods: { |
| | |
| | | this.getBillList() |
| | | }, |
| | | clickCard(bill, index) { |
| | | console.log('this.HBillList: ',this.HBillList); |
| | | console.log('this.HBillList: ',this.HBillList, 'index: ', index); |
| | | let retVal = {} |
| | | retVal[this.refTargetKey] = this.HBillList[0].filter(item => item.hmainid == bill.hmainid) |
| | | retVal[this.refTargetKey] = bill |
| | | this.$emit("update", { |
| | | retVal: retVal, |
| | | index: this.refTargetKey |
| | |
| | | } |
| | | |
| | | if(this.refTargetKey) { |
| | | sWhere += ` and 设备ID = ${this.refTargetKey}` |
| | | // sWhere += ` and HInterID = ${this.refTargetKey}` |
| | | } |
| | | return sWhere |
| | | }, |
| | | getBillList() { |
| | | let sWhere = this.getsWhere() |
| | | console.log('sWhere: ',sWhere); |
| | | this.HBillList = [] |
| | | this.length = 0 |
| | | this.page = 0 |
| | | this.curPage = 1 |
| | | let url = "" |
| | | if(this.Type == 'BY'){ |
| | | url = "/Sb_EquipMaintainRuleBill/GetEquipMaintainRuleListPDA" |
| | | } |
| | | else if (this.Type == 'DJ'){ |
| | | url = "/Sb_EquipDotCheckRuleBill/GetEquipDotCheckRuleListPDA" |
| | | } |
| | | else { |
| | | |
| | | } |
| | | CommonUtils.doRequest( |
| | | "/Web/GetEquipmentBillsList", { |
| | | url, { |
| | | sWhere: sWhere, |
| | | user: getUserInfo()['Czymc'], |
| | | Type: "BY" |
| | | }, |
| | | (res) => { |
| | | let { |
| | |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | |
| | | <text>点检项目分类:</text>{{item.HDotCheckItemClassName}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检方法:</text>{{item.HDotCheckItemMethodName}} |
| | | <text>点检项目:</text>{{item.HDotCheckItem}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>点检部位:</text>{{item.HDotCheckPart}} |
| | |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </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 { |
| | | 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, |
| | |
| | | |
| | | }, |
| | | 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' |
| | |
| | | }) |
| | | } |
| | | }, |
| | | // 获取保养规程 |
| | | 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 |
| | | } |
| | | }) |
| | | |
| | | this.enableEdit = false |
| | | this.$refs["billSelector"].exit() |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async GetItemByEquipFile() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | |
| | | <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list" v-for="(item,index) in HCheckFileList" :key="index"> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="HCheckFileList.length == 0">暂无数据</view> |
| | | </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"></BillSelectorPopupVue> |
| | | <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector" :Type="'BY'"></BillSelectorPopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | methods: { |
| | | billSelectHandler(billData) { |
| | | console.log('billData: ', billData); |
| | | let data = billData.retVal[0] |
| | | let data = billData.retVal[this.hform.HEquipID] |
| | | this.get_DocCheckItem2(data.hmainid) |
| | | }, |
| | | // 获取保养规程 |
| | |
| | | }, |
| | | }) |
| | | |
| | | let {data, count, Message} = res.data |
| | | 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, |
| | |
| | | message: '不能选择保养规程,请先扫描设备条码!!!' |
| | | }) |
| | | } |
| | | console.log('this.$refs: ', this.$refs); |
| | | this.$refs['billSelector'].showPopup(0) |
| | | this.$refs['billSelector'].showPopup(this.hform.HEquipID) |
| | | }, |
| | | ValidCheck() { |
| | | if (this.hform.HEquipID == 0) { |
| | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取点检规程错误: ${Message}` |
| | | message: `获取保养规程错误: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: '/pages/xiaoshoutuihuo/PPickingBill?OperationType=1' |
| | | url: './PPickingCheckBill?OperationType=1' |
| | | }) |
| | | }, |
| | | async submit() { |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/xiaoshoutuihuo/PPickingBill?OperationType=1' |
| | | url: './PPickingCheckBill?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: '/pages/shengchanruku/ProductCheckInBill?OperationType=1' |
| | | url: '/pages/shengchanruku/ProductInCheckBill?OperationType=1' |
| | | }) |
| | | }, |
| | | async submit() { |
| | |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: '/pages/shengchanruku/ProductCheckInBill?OperationType=1' |
| | | url: '/pages/shengchanruku/ProductInCheckBill?OperationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |