| | |
| | | <view class="section card"> |
| | | <view class="form-row"> |
| | | <view class="form-item"> |
| | | <label style="color: red;">日停机次数(时长超5分钟):</label> |
| | | <input class="inp" style="width: 40%;" type="number" v-model="todayFaultNum" disabled="true" /> |
| | | <label style="color: red;">日停机次数(时长超3分钟):</label> |
| | | <input class="inp" style="width: 40%;" type="number" v-model="order.todayDowntimeCount" disabled="true" /> |
| | | </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); |
| | |
| | | cutterName, //刀具名称 |
| | | cutterModel, //刀具规格 |
| | | jdl: '', |
| | | startCjNum: 0, // 新增兜底字段 保留其它注释 |
| | | currentCjNum: 0 // 新增兜底字段 |
| | | startCjNum: 0, // 开工数采 |
| | | currentCjNum: 0, // 当前数采 |
| | | todayDowntimeCount //今日停机次数 |
| | | }; |
| | | return; |
| | | } |
| | |
| | | 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", |