|
@@ -22,17 +22,17 @@
|
|
|
|
|
|
|
|
<!-- 检查报告卡片列表 -->
|
|
<!-- 检查报告卡片列表 -->
|
|
|
<view v-if="reportList.length" class="card-list">
|
|
<view v-if="reportList.length" class="card-list">
|
|
|
- <view class="card" v-for="item in reportList" :key="item.id" v-show="current == item.id as number">
|
|
|
|
|
|
|
+ <view class="card" v-for="item in reportList" :key="item.no" v-show="current == item.no as number">
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">序号</text>
|
|
<text class="label">序号</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <uni-number-box v-model="item.id" disabled></uni-number-box>
|
|
|
|
|
|
|
+ <uni-number-box v-model="item.no" disabled></uni-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">产品码</text>
|
|
<text class="label">产品码</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <input v-model="item.productcode" disabled></input>
|
|
|
|
|
|
|
+ <input v-model="item.prodno" disabled></input>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
@@ -44,19 +44,19 @@
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">性质</text>
|
|
<text class="label">性质</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <input v-model="item.model" disabled></input>
|
|
|
|
|
|
|
+ <input v-model="item.nature" disabled></input>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">上限要求</text>
|
|
<text class="label">上限要求</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <uni-number-box v-model="item.upperlimit" :step="0.1" :min="0.5" disabled></uni-number-box>
|
|
|
|
|
|
|
+ <uni-number-box v-model="item.minNum" :step="0.1" :min="0.5" disabled></uni-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">下限要求</text>
|
|
<text class="label">下限要求</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <uni-number-box v-model="item.lowerlimit" :min="0" disabled></uni-number-box>
|
|
|
|
|
|
|
+ <uni-number-box v-model="item.maxNum" :min="0" disabled></uni-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!--
|
|
<!--
|
|
@@ -67,19 +67,19 @@
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">实测值小</text>
|
|
<text class="label">实测值小</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <uni-number-box v-model="item.minactval" :min="0"></uni-number-box>
|
|
|
|
|
|
|
+ <uni-number-box v-model="item.measuredvalue" :min="0"></uni-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">实测值大</text>
|
|
<text class="label">实测值大</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <uni-number-box v-model="item.maxactval" :min="0"></uni-number-box>
|
|
|
|
|
|
|
+ <uni-number-box v-model="item.measuredvaluemax" :min="0"></uni-number-box>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="info-row">
|
|
<view class="info-row">
|
|
|
<text class="label">结论</text>
|
|
<text class="label">结论</text>
|
|
|
<view class="value">
|
|
<view class="value">
|
|
|
- <input v-model="item.conclusion" class="surround uni-input"></input>
|
|
|
|
|
|
|
+ <input v-model="item.result" class="surround uni-input"></input>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -108,57 +108,73 @@
|
|
|
import {
|
|
import {
|
|
|
ref
|
|
ref
|
|
|
} from 'vue'
|
|
} from 'vue'
|
|
|
-
|
|
|
|
|
- type Report = {
|
|
|
|
|
- id : number,
|
|
|
|
|
- productcode : string,
|
|
|
|
|
- invname : string,
|
|
|
|
|
- model : string,
|
|
|
|
|
- upperlimit : number,
|
|
|
|
|
- lowerlimit : number,
|
|
|
|
|
- minactval : number,
|
|
|
|
|
- maxactval : number,
|
|
|
|
|
- conclusion : string,
|
|
|
|
|
- applyDate : string,
|
|
|
|
|
- reportDate : string
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ import { getJoinList, QcRecord, recordStatusDict, updateData } from '@/api/work';
|
|
|
|
|
+
|
|
|
|
|
+ // 存储页面参数
|
|
|
|
|
+ let pdid = "";
|
|
|
|
|
+ let senum = "";
|
|
|
//检查项目最大数量
|
|
//检查项目最大数量
|
|
|
var maxcount = 5
|
|
var maxcount = 5
|
|
|
var current = ref(1)
|
|
var current = ref(1)
|
|
|
- var reportList = ref<Report[]>([])
|
|
|
|
|
|
|
+ var reportList = ref<QcRecord[]>([])
|
|
|
|
|
+ var initRecords = [] as QcRecord[]
|
|
|
|
|
|
|
|
- const initReportList = [{
|
|
|
|
|
- id: 1,
|
|
|
|
|
- productcode: "YH0001",
|
|
|
|
|
- invname: '装配间隙',
|
|
|
|
|
- model: '定量',
|
|
|
|
|
- upperlimit: 0.5,
|
|
|
|
|
- lowerlimit: 0,
|
|
|
|
|
- minactval: 0,
|
|
|
|
|
- maxactval: 0,
|
|
|
|
|
- conclusion: '',
|
|
|
|
|
- applyDate: '2025-08-20 09:15',
|
|
|
|
|
- reportDate: '2025-08-20 17:30'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id: 2,
|
|
|
|
|
- productcode: "YH0001",
|
|
|
|
|
- invname: '装配间隙',
|
|
|
|
|
- model: '定量',
|
|
|
|
|
- upperlimit: 0.5,
|
|
|
|
|
- lowerlimit: 0,
|
|
|
|
|
- minactval: 0,
|
|
|
|
|
- maxactval: 0,
|
|
|
|
|
- conclusion: '',
|
|
|
|
|
- applyDate: '2025-08-28 10:00',
|
|
|
|
|
- reportDate: '2025-08-28 13:40'
|
|
|
|
|
- }
|
|
|
|
|
- ] as Report[];
|
|
|
|
|
- reportList.value = initReportList.filter(item => item.id == current.value)
|
|
|
|
|
|
|
+ const initReportList = [] as QcRecord[];
|
|
|
|
|
+
|
|
|
|
|
+ reportList.value = initReportList.filter(item => item.no == current.value)
|
|
|
|
|
+
|
|
|
const tabsClick = (obj : number) => {
|
|
const tabsClick = (obj : number) => {
|
|
|
current.value = obj
|
|
current.value = obj
|
|
|
- reportList.value = initReportList.filter(item => item.id == current.value)
|
|
|
|
|
|
|
+ console.log(initRecords)
|
|
|
|
|
+ reportList.value = initReportList.filter(item => parseInt(item.no) == current.value)
|
|
|
|
|
+ console.log(reportList.value)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const refreshRecords = (index : number) => {
|
|
|
|
|
+ // 清空现有数据
|
|
|
|
|
+ initRecords = [];
|
|
|
|
|
+ // #ifdef APP-ANDROID
|
|
|
|
|
+ getJoinList('app_task_record as r', 'app_task_record_item as i', 'r.*,i.*', 'r.sxid=i.psxid', 'pdid', pdid, null).then((res : UTSJSONObject) => {
|
|
|
|
|
+ let dataList = res?.['data'] as UTSJSONObject[] ?? Array<UTSJSONObject>()
|
|
|
|
|
+ console.log(dataList)
|
|
|
|
|
+ if (dataList != null && dataList.length > 0) {
|
|
|
|
|
+ console.log(dataList);
|
|
|
|
|
+ dataList.forEach(item => {
|
|
|
|
|
+ if (item != null) {
|
|
|
|
|
+ let record = JSON.parse<QcRecord>(item.toJSONString());
|
|
|
|
|
+ if (record != null) {
|
|
|
|
|
+ initRecords.push(record)
|
|
|
|
|
+ let noValue = parseInt(record['no'])
|
|
|
|
|
+ if (noValue > maxcount) {
|
|
|
|
|
+ maxcount = noValue;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ if (initRecords.length > 0) {
|
|
|
|
|
+ if (index > 0) {
|
|
|
|
|
+ current.value = index
|
|
|
|
|
+ } else {
|
|
|
|
|
+ current.value = parseInt(initRecords[0].no)
|
|
|
|
|
+ }
|
|
|
|
|
+ reportList.value = initRecords.filter(item => parseInt(item.no) == current.value)
|
|
|
|
|
+ console.log(initRecords)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ // #endif
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ onLoad((options) => {
|
|
|
|
|
+ pdid = options?.pdid ?? "1"
|
|
|
|
|
+ senum = options?.senum ?? "1"
|
|
|
|
|
+
|
|
|
|
|
+ // 加载初始数据
|
|
|
|
|
+ refreshRecords(parseInt(senum))
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|