| | |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>日停机时长(mi):</label> |
| | | <input class="inp" type="text" v-model="todayOnlineTime-todayRunTime" disabled="true" /> |
| | | <!-- 这里用计算属性,不能用v-model表达式 --> |
| | | <input class="inp" type="text" :value="downtimeDuration" disabled="true" /> |
| | | </view> |
| | | <view class="form-item"> |
| | | <label>设备稼动率:</label> |
| | |
| | | DAA003List: [], |
| | | lineList: [], |
| | | }; |
| | | }, |
| | | computed: { |
| | | // 日停机时长 = todayOnlineTime - todayRunTime |
| | | downtimeDuration() { |
| | | // 取order对象中的todayOnlineTime和todayRunTime,都为分钟 |
| | | const online = Number(this.order.todayOnlineTime) || 0; |
| | | const run = Number(this.order.todayRunTime) || 0; |
| | | return online - run; |
| | | } |
| | | }, |
| | | created() { |
| | | this.fetchData(true); |
| | |
| | | title: title |
| | | }); |
| | | }, |
| | | getSJByOrder() { |
| | | this.$post({ |
| | | url: "/MesQaItemsDetect02/FindSJByOrderNo", |
| | | data: { |
| | | orderNo: this.orderNo |
| | | } |
| | | }).then(res => { |
| | | let sjList = res.data.tbBillList; |
| | | if (Array.isArray(sjList) && sjList.length > 0) { |
| | | let latest = sjList[0]; |
| | | this.lastInitialCheck = latest.fcheckDate; |
| | | this.initialConclusion = latest.fcheckResu; |
| | | this.initialInspector = latest.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = latest.xjCount ?? sjList.length; // 优先用xjCount字段 |
| | | } else if (sjList) { |
| | | this.lastInitialCheck = sjList.fcheckDate; |
| | | this.initialConclusion = sjList.fcheckResu; |
| | | this.initialInspector = sjList.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = sjList.xjCount ?? 1; |
| | | } else { |
| | | this.lastInitialCheck = ''; |
| | | this.initialConclusion = ''; |
| | | this.initialInspector = ''; |
| | | this.initialCount = 0; |
| | | } |
| | | }) |
| | | }, |
| | | getSJByOrder() { |
| | | this.$post({ |
| | | url: "/MesQaItemsDetect02/FindSJByOrderNo", |
| | | data: { |
| | | orderNo: this.orderNo |
| | | } |
| | | }).then(res => { |
| | | let sjList = res.data.tbBillList; |
| | | if (Array.isArray(sjList) && sjList.length > 0) { |
| | | let latest = sjList[0]; |
| | | this.lastInitialCheck = latest.fcheckDate; |
| | | this.initialConclusion = latest.fcheckResu; |
| | | this.initialInspector = latest.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = latest.xjCount ?? sjList.length; // 优先用xjCount字段 |
| | | } else if (sjList) { |
| | | this.lastInitialCheck = sjList.fcheckDate; |
| | | this.initialConclusion = sjList.fcheckResu; |
| | | this.initialInspector = sjList.fcheckBy; // 首检人员(工号-姓名) |
| | | this.initialCount = sjList.xjCount ?? 1; |
| | | } else { |
| | | this.lastInitialCheck = ''; |
| | | this.initialConclusion = ''; |
| | | this.initialInspector = ''; |
| | | this.initialCount = 0; |
| | | } |
| | | }) |
| | | }, |
| | | getXJByOrder() { |
| | | this.$post({ |
| | | url: "/MesQaItemsDetect02/FindXJByOrderNo", |