修正 维修任务 只有在页签切换的时候 才会查询数据的问题。修复第一次进入 设备 工序模块时,无法显示 消息条数的问题。工单详情页面 增加首件次数、巡检次数、异常反馈未验收
| | |
| | | } |
| | | }, |
| | | onSearchClickHandler() { |
| | | this.getWorkLinkList() |
| | | this.switchTab(this.tabs) |
| | | }, |
| | | onResetClickHandler() { |
| | | this.dateRangePicker = ["任意间隔", "今天", "近两天", "近三天", "近四天", "近五天", "近六天", "近七天", "近30天"], |
| | |
| | | }, |
| | | switchTab(tabIndex) { |
| | | this.tabs = tabIndex |
| | | this.sWhere = '' |
| | | switch (tabIndex) { |
| | | case 0: |
| | | this.sWhere = |
| | |
| | | this.getWorkLinkList() |
| | | }, |
| | | async getWorkLinkList() { |
| | | this.sWhere += ` and 日期 >= CONVERT(VARCHAR(10), '${this.startDate}', 23) and 日期 <= CONVERT(VARCHAR(10), '${this.endDate}', 23)` |
| | | try { |
| | | this.sWhere += ` and 日期 >= CONVERT(VARCHAR(10), '${this.startDate}', 23) and 日期 <= CONVERT(VARCHAR(10), '${this.endDate}', 23)` |
| | | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sc_MESTransFerWorkBill/GetOA_WorkLinkBillList', |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="list"> |
| | | <uni-card :title="'当期订单:'+currentOrder[0].HSourceBillNo" |
| | | style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="currentOrder[0].HSourceName" style="width: 100%;"> |
| | | <text>当前设备:</text>{{currentOrder[0].HSourceName}} |
| | | </view> |
| | | <view class="detail" v-if="currentOrder[0].首检次数?currentOrder[0].首检次数:0" style="width: 100%;"> |
| | | <text>首检次数:</text>{{currentOrder[0].首检次数}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>巡检次数:</text>{{currentOrder[0].巡检次数?currentOrder[0].巡检次数:0}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>过程检次数:</text>{{currentOrder[0].过程检次数?currentOrder[0].过程检次数:0}} |
| | | </view> |
| | | <view class="detail" v-if="currentOrder[0].当日点检完成情况"> |
| | | <text>点检完成情况:</text>{{currentOrder[0].当日点检完成情况}} |
| | | </view> |
| | | <view class="detail" v-if="currentOrder[0].安灯未验收数量"> |
| | | <text>异常反馈未验收:</text>{{currentOrder[0].安灯未验收数量}} |
| | | <view style="width: 6rpx; display: inline-block;"></view> |
| | | <template v-if="currentOrder[0].安灯未验收数量 == 0"> |
| | | <uni-icons type="smallcircle-filled" size="12" |
| | | color="#13ad4c"></uni-icons> |
| | | </template> |
| | | <template v-else-if="currentOrder[0].安灯未验收数量 != 0"> |
| | | <uni-icons type="smallcircle-filled" size="12" |
| | | color="#e74c3c"></uni-icons> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <uni-card :title="'工单号:'+item.HICMOBillNo" :extra="'日期:'+item.计划日期" style="margin: 10px;" @tap="edit(item)"> |
| | | <view class="card-detail"> |
| | |
| | | chooseIt: '', |
| | | popList: ['人员原因', '设备原因', '材料原因', '工艺原因', '模具原因', '测试原因', '环境原因'], |
| | | badReasonBackTypeList: [], |
| | | currentOrder: [], |
| | | // 定义操作映射配置 |
| | | actionConfig: { |
| | | '开工': { |
| | |
| | | if (res.data.count == 1) { |
| | | console.log(res.data.data.h_p_JIT_GetWorkBillListInfoBySource) |
| | | this.listData = res.data.data.h_p_JIT_GetWorkBillListInfoBySource |
| | | this.currentOrder = res.data.data.h_p_JIT_GetWorkBillListInfoBySource1 |
| | | for (var i = 0; i < this.listData.length; i++) { |
| | | this.listData[i].percent = (this.listData[i].HDateFinishQty / this.listData[ |
| | | i].HDatePlanQty).toFixed(4) |
| | |
| | | methods: { |
| | | async ApplyLanguagePack(lang, forceUpdate = false) { |
| | | // 读取语言包并加载 |
| | | let { |
| | | data, |
| | | getRemoteFile |
| | | } = await getLanguagePackJson(lang) |
| | | if (getRemoteFile) { |
| | | this.$i18n.setLocaleMessage(lang, data) |
| | | } |
| | | // let { |
| | | // data, |
| | | // getRemoteFile |
| | | // } = await getLanguagePackJson(lang) |
| | | // if (getRemoteFile) { |
| | | // this.$i18n.setLocaleMessage(lang, data) |
| | | // } |
| | | this.$i18n.locale = lang |
| | | }, |
| | | onLanguageChangeHandler(e) { |
| | |
| | | <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" |
| | | :key="index" @tap="toUrl(item)"> |
| | | <template v-if="item.corner"> |
| | | <uni-badge :text="item.cornerCount" type="error" :max-num="99" size="normal" |
| | | absolute="rightTop" |
| | | <uni-badge :text="item.cornerCount" type="error" :max-num="99" size="normal" absolute="rightTop" |
| | | :offset="[7, 7]"> |
| | | <image :src="item.img" mode=""></image> |
| | | </uni-badge> |
| | |
| | | this.getHiddenItem() |
| | | }, |
| | | async onShow() { |
| | | if(this.initFinished) { |
| | | if (this.initFinished) { |
| | | let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName) |
| | | if(MessageIdentifier.code == 0) { |
| | | if (MessageIdentifier.code == 0) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: MessageIdentifier.msg |
| | | }) |
| | | |
| | | |
| | | return |
| | | } |
| | | |
| | | |
| | | this.itemData.forEach((e, index) => { |
| | | if(MessageIdentifier.data[e.text] != undefined) { |
| | | if (MessageIdentifier.data[e.text] != undefined) { |
| | | this.itemData[index]["corner"] = true |
| | | this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text] |
| | | } |
| | | }) |
| | | |
| | | |
| | | this.$forceUpdate() |
| | | } |
| | | }, |
| | | async onReady() { |
| | | let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName) |
| | | if (MessageIdentifier.code == 0) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: MessageIdentifier.msg |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | this.itemData.forEach((e, index) => { |
| | | if (MessageIdentifier.data[e.text] != undefined) { |
| | | this.itemData[index]["corner"] = true |
| | | this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text] |
| | | } |
| | | }) |
| | | |
| | | this.$forceUpdate() |
| | | }, |
| | | methods: { |
| | | async getWorkLinkList() { |
| | |
| | | acc[item['moduleName']] = item.count |
| | | return acc |
| | | }, {}) |
| | | |
| | | |
| | | return { |
| | | code: 1, |
| | | msg: Message, |
| | |
| | | } |
| | | } |
| | | } catch (err) { |
| | | |
| | | |
| | | } |
| | | }, |
| | | async getHiddenItem() { |
| | | let data = await getMenuList({ |
| | | menuName: this.menuListName |
| | | }) |
| | | |
| | | |
| | | Array.from(data).forEach((e, index) => { |
| | | if (index < this.itemData.length) { |
| | | this.itemData[e["HIndex"]]["hidden"] = !CommonUtils.stringToBoolean(e[ |
| | |
| | | this.itemData[e["HIndex"]].id = e["HEntryID"]; //id为0强制隐藏 |
| | | } |
| | | }) |
| | | |
| | | |
| | | let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName) |
| | | if (MessageIdentifier.code == 0) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: MessageIdentifier.msg |
| | | }) |
| | | |
| | | |
| | | return |
| | | } |
| | | |
| | | |
| | | Array.from(data).forEach((e, index) => { |
| | | if (index < this.itemData.length) { |
| | | if (MessageIdentifier.data[this.itemData[e["HIndex"]].text]) { |
| | | this.$set(this.itemData[e["HIndex"]], "corner", true) |
| | | this.$set(this.itemData[e["HIndex"]], "cornerCount", MessageIdentifier.data[this.itemData[e["HIndex"]].text]) |
| | | this.$set(this.itemData[e["HIndex"]], "cornerCount", MessageIdentifier.data[this |
| | | .itemData[e["HIndex"]].text]) |
| | | } |
| | | } |
| | | }) |
| | |
| | | this.$forceUpdate() |
| | | } |
| | | }, |
| | | async onReady() { |
| | | let MessageIdentifier = await this.getMessageIdentifierCount(this.menuListName) |
| | | if (MessageIdentifier.code == 0) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: MessageIdentifier.msg |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | this.itemData.forEach((e, index) => { |
| | | if (MessageIdentifier.data[e.text] != undefined) { |
| | | this.itemData[index]["corner"] = true |
| | | this.itemData[index]["cornerCount"] = MessageIdentifier.data[e.text] |
| | | } |
| | | }) |
| | | |
| | | this.$forceUpdate() |
| | | }, |
| | | methods: { |
| | | judgeHidden() { |
| | | return process.env.NODE_ENV === 'development' |