hh 1 vecka sedan
förälder
incheckning
f22f6c66c8

+ 3 - 1
entry/src/main/ets/common/constants/CommonConstants.ets

@@ -50,7 +50,9 @@ export default class CommonConstants {
     ['jingu', '7'],
     // ['tiaoshipipei', '8'],
     ['mingpaibangding', '9'],
-    ['waiguanjianche', '10'],
+    ['gongxubiaodan', '10'],
+    ['zidongceshi', '11'],
+    ['shebeiqueren', '12'],
   ]);
 
   static DICT_DATA: HashMap<string, DictValue[]> = new HashMap<string, DictValue[]>()

+ 0 - 1
entry/src/main/ets/pages/DeviceControllerPage.ets

@@ -185,7 +185,6 @@ struct DeviceControllerPage {
                       unitString: '℃'
                     }
                     let id: number | undefined = await ElectricSolderingIronPresetModel.addPreset(preset)
-                    console.log('hhtest', '-----------id-----' + id);
                     this.ironPresets = await ElectricSolderingIronPresetModel.getPresetList()
                     return
                   }

+ 35 - 30
entry/src/main/ets/pages/ProcessIndex.ets

@@ -24,7 +24,7 @@ import { ReportWorkNumDialog } from '../view/ReportWorkNumDialog';
 import { ProcessReportingDialog } from '../view/ProcessReportingDialog';
 import { JoinPersonNameDialog } from '../view/JoinPersonNameDialog';
 import ReportInfo from '../viewmodel/ReportInfo';
-import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO';
 import { MqttClientOptions, MqttConnectOptions } from '@ohos/mqtt';
 import MqttManager from '../common/util/mqtt';
 import { DefectNumReportDialog } from '../view/DefectNumReportDialog';
@@ -68,6 +68,8 @@ struct ProcessIndex {
   @State isAuxiliaryViewOpen:boolean = false
   // 选中工序id
   @State selectOperationId: string = ''
+  // 绩效模式(0:计时 1:计件)
+  @State operationPerformance: string = ''
   // 选中工序名称
   selectOperationName: string = ''
   //选择的按钮索引(默认加载全部)
@@ -90,12 +92,14 @@ struct ProcessIndex {
     ['6', $r('app.media.process_component_device_record')],
     ['7', $r('app.media.process_component_fastening')],
     ['9', $r('app.media.process_component_label_bind')],
-    ['10', $r('app.media.process_component_self_inspect')],
+    ['10', $r('app.media.process_component_form')],
+    ['11', $r('app.media.process_component_auto_test')],
+    ['12', $r('app.media.process_component_device_record')],
   ])
   // 扫码开工后的生产过程信息
   @State process: ProcessInfo = {}
   // 扫码开工状态(0:未开工 1:已开工)
-  @State scanState: number = 0
+  @State @Watch('queryByScanState') scanState: number = 0
   // 工单下流转卡号列表
   @State seqList: WorkOrderSeq[] = []
   // 设备每日点检
@@ -112,11 +116,12 @@ struct ProcessIndex {
   @Provide('currentStationId') @Watch('refreshWorkOrder') currentStationId: string = ''
   @Provide('currentUserName') currentUserName: string =''
   @Provide('currentUserId') currentUserId: number = 0
+  // 报工人、报工流水号和不良流水号
   @Provide('bindTaskSeq') bindTaskSeq: BindTaskSeqVO[] = []
   @State reportList: ReportInfo[] = []
   @State currentReporterIndex:number =0
   @State currentReportNumIndex:number =0
-  @State currentUnqualifiedIndex:number =0
+  @State currentDefectIndex:number =0
   // mqtt是否连接
   @State isConnected: boolean = false
   // 工位发生改变则可能需要重新选择工单
@@ -152,6 +157,14 @@ struct ProcessIndex {
       console.log('hhtest', '选择工单被清空-----------------')
     }
   }
+
+  async queryByScanState() {
+    if (this.scanState === 1) {
+      await this.scanCodeToStartWork()
+    } else {
+      await this.getComponentsForNotStartWork()
+    }
+  }
   // 扫码开工
   async scanCodeToStartWork() {
     this.process = await ProcessRequest.post('/api/v1/process/info/scan', {
@@ -182,7 +195,6 @@ struct ProcessIndex {
         sortNum:0
       })
     }
-    this.scanState = 1
     // 保存此流转卡号到数据库中
     let seqNos: string[] = []
     seqNos = await preferencesUtil.get(CommonConstants.PREFERENCE_INSTANCE_NAME, this.selectWorkOder.workOrderCode!, seqNos)
@@ -287,6 +299,7 @@ struct ProcessIndex {
   }
 
   onPageShow() {
+    console.log('hhtest', '------------------------------')
     const params = router.getParams() as Params; // 获取传递过来的参数对象
     if (params && params.auxiliaryOperationFlag) {
       this.isAuxiliaryViewOpen = true
@@ -344,7 +357,7 @@ struct ProcessIndex {
     this.currentStationId = '66'
     this.currentStation = '装配工位'
     let res:UserInfo = await ProcessRequest.get('/api/auth') ;
-    this.currentUserId = res.id!
+    this.currentUserId = res.id! as number
     // ---------------删除以上内容------------------
   }
 
@@ -545,6 +558,7 @@ struct ProcessIndex {
                         }
                         this.selectOperationId = item.operationId!
                         this.selectOperationName = item.operationName!
+                        this.operationPerformance = item.performance!
                         if (!item.exists) {
                           promptAction.showToast({
                             message: `${item.operationName}需要在${item.stationName}工位上生产`,
@@ -975,7 +989,8 @@ struct ProcessIndex {
                 return
               }
               if (this.scanState === 0) {
-                this.scanCodeToStartWork()
+                this.scanState = 1
+                // this.scanCodeToStartWork()
               } else if (this.scanState === 1) {
                 this.processReportingController.open()
               }
@@ -1085,6 +1100,8 @@ struct ProcessIndex {
   loginInfoController: CustomDialogController = new CustomDialogController({
     builder: LoginInfoDialog({
       scanState: this.scanState,
+      opComponents: this.opComponents,
+      selectComponentType: this.selectComponentType,
       searchDept:()=>{this.SwitchingDeptController.open()},
       searchStation:()=>{this.SwitchingStationController.open()},
       searchProductLine:()=>{this.SwitchingProductLineController.open()},
@@ -1124,9 +1141,9 @@ struct ProcessIndex {
   // 工序报工-不良品报工弹窗
   defectNumReportController: CustomDialogController = new CustomDialogController({
     builder: DefectNumReportDialog({
-      userName: this.reportList[this.currentUnqualifiedIndex].userName,
+      userName: this.reportList[this.currentDefectIndex].userName,
       onConfirm:(num:number)=>{
-        const index = this.currentUnqualifiedIndex;
+        const index = this.currentDefectIndex;
         if (this.reportList[index]) {
           this.reportList[index].defectNum = String(num);
           this.reportList = [...this.reportList];
@@ -1142,24 +1159,7 @@ struct ProcessIndex {
   JoinPersonNameController: CustomDialogController = new CustomDialogController({
     builder: JoinPersonNameDialog({
       reportList:this.reportList,
-      onConfirm:(name:string)=>{
-        const nameExists = this.reportList.some(item =>
-        item.userName && name &&
-          item.userName.toString().toLowerCase() === name.toString().toLowerCase().trim()
-        );
-        if (nameExists) {
-          promptAction.showToast({
-            message: '该用户已添加,请添加其他用户!',
-            duration: 2000
-          });
-          return;
-        }
-        const index = this.currentReporterIndex;
-        if (this.reportList[index]) {
-          this.reportList[index].userName = name;
-          this.reportList = [...this.reportList];
-        }
-      }
+      currentReporterIndex:this.currentReporterIndex,
     }),
     autoCancel: true,
     customStyle: true,
@@ -1184,7 +1184,7 @@ struct ProcessIndex {
         this.currentReportNumIndex = index
         this.ReportWorkNumController.open()
       },
-      onSelectUnqualified:(index:number)=>{
+      onSelectDefectNum:(index:number)=>{
         if (!this.reportList[index]?.userName?.trim()) {
           promptAction.showToast({
             message: '请先添加用户',
@@ -1192,13 +1192,18 @@ struct ProcessIndex {
           });
           return;
         }
-        this.currentUnqualifiedIndex = index
+        this.currentDefectIndex = index
         this.defectNumReportController.open()
       },
+      clearSelectData:()=>{
+        this.clearSelectData()
+      },
       reportList:this.reportList,
       selectWorkOder: this.selectWorkOder,
       selectOperationName: this.selectOperationName,
-      selectOperationId: this.selectOperationId
+      selectOperationId: this.selectOperationId,
+      process: this.process,
+      operationPerformance: this.operationPerformance,
     }),
     autoCancel: true,
     customStyle: true,

+ 18 - 12
entry/src/main/ets/view/DefectNumReportDialog.ets

@@ -1,7 +1,8 @@
 import ProcessRequest from '../common/util/request/ProcessRequest';
-import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO';
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo';
 import RequestParamModel from '../viewmodel/RequestParamModel';
+import promptAction from '@ohos.promptAction';
 
 //报工-不良品数量
 @CustomDialog
@@ -39,20 +40,13 @@ export struct DefectNumReportDialog {
     // 检查所有其他用户的选择记录
     return this.bindTaskSeq.some(userSelection =>
     userSelection.userName !== this.userName &&
-    userSelection.unqualifiedSeq?.some(seq =>
-    seq.seqNo === item.seqNo &&
-      seq.operationId === item.operationId
-    )
-    );
+    userSelection.defectSeqNos?.some(seqNo => seqNo === item.seqNo));
   }
 
   // 获取选择当前项的用户名
   private getSelectingUserName(item: TaskSeqVO): string | undefined {
     const userSelection = this.bindTaskSeq.find(userSelection =>
-    userSelection.unqualifiedSeq?.some(seq =>
-    seq.seqNo === item.seqNo &&
-      seq.operationId === item.operationId)
-    );
+    userSelection.defectSeqNos?.some(seqNo => seqNo === item.seqNo));
     return userSelection?.userName;
   }
 
@@ -262,15 +256,27 @@ export struct DefectNumReportDialog {
           .justifyContent(FlexAlign.Center)
           .width('50%')
           .onClick(() => {
+            let selectTasks = this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index));
+            if (!selectTasks || selectTasks.length <= 0) {
+              promptAction.showToast({
+                message: '请先不良品的流水号',
+                duration: 2000
+              });
+              return;
+            }
+            let seqNos: string[] = []
+            for (const element of selectTasks) {
+              seqNos.push(element.seqNo)
+            }
             const currentUserSelection: BindTaskSeqVO = {
               userName: this.userName,
-              unqualifiedSeq: this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index))
+              defectSeqNos: seqNos
             };
             const existingUserIndex = this.bindTaskSeq.findIndex(
               item => item.userName === this.userName
             );
             if (existingUserIndex >= 0) {
-              this.bindTaskSeq[existingUserIndex].unqualifiedSeq = currentUserSelection.unqualifiedSeq;
+              this.bindTaskSeq[existingUserIndex].defectSeqNos = currentUserSelection.defectSeqNos;
             } else {
               this.bindTaskSeq.push(currentUserSelection);
             }

+ 26 - 4
entry/src/main/ets/view/JoinPersonNameDialog.ets

@@ -1,22 +1,25 @@
 //参与人员
 import { pinyin } from "pinyin-pro";
 import ProcessRequest from '../common/util/request/ProcessRequest';
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO';
 import PageInfo from '../viewmodel/PageInfo';
 import ReportInfo from '../viewmodel/ReportInfo';
 import RequestParamModel from '../viewmodel/RequestParamModel';
 import { UserInfo } from '../viewmodel/UserInfo';
+import promptAction from '@ohos.promptAction';
 
 @CustomDialog
 export struct JoinPersonNameDialog{
   controller: CustomDialogController
 
   scroller: Scroller = new Scroller()
+  @Link currentReporterIndex: number
   @State nameList:UserInfo[]=[]
   @State selectNameIndex:number=-1
   @State selectName:string = ''
   @State queryName:string = ''
   @Link reportList: ReportInfo[]
-  onConfirm: (name: string) => void = () => {}
+  @Consume ('bindTaskSeq') bindTaskSeq: BindTaskSeqVO[]
 
   private value: string[] = ['A', 'B', 'C', 'D', 'E', 'F', 'G',
     'H', 'I', 'J', 'K', 'L', 'M', 'N',
@@ -34,9 +37,27 @@ export struct JoinPersonNameDialog{
   }
   private onSelectName(index: number) {
     this.selectNameIndex = index
-    this.selectName = this.nameList[index].userName??""
-    this.controller.close();
-    this.onConfirm(this.selectName);
+    this.selectName = this.nameList[index].userName ?? ""
+    const nameExists = this.reportList.some(item =>
+    item.userName && this.selectName &&
+      item.userName.toString().toLowerCase() === this.selectName.toString().toLowerCase().trim()
+    );
+    if (nameExists) {
+      promptAction.showToast({
+        message: '该用户已添加,请添加其他用户!',
+        duration: 2000
+      });
+      return;
+    }
+    if (this.reportList[this.currentReporterIndex]) {
+      this.reportList[this.currentReporterIndex].userName = this.selectName;
+      this.reportList = [...this.reportList];
+    }
+    if (this.bindTaskSeq[this.currentReporterIndex]) {
+      this.bindTaskSeq[this.currentReporterIndex].userName = this.selectName;
+      this.bindTaskSeq[this.currentReporterIndex].userId = this.nameList[index].id! as string;
+    }
+
   }
 
   loadPersonNameList = async ()=>{
@@ -152,6 +173,7 @@ export struct JoinPersonNameDialog{
                 .backgroundColor(this.selectNameIndex===index?$r('app.color.200A84FF'):'')
                 .onClick(()=>{
                   this.onSelectName(index)
+                  this.controller.close();
                 })
               }
               .alignItems(HorizontalAlign.Start)

+ 8 - 1
entry/src/main/ets/view/LoginInfoDialog.ets

@@ -3,12 +3,17 @@ import { MessageInfo, MessagePage } from '../viewmodel/MessageInfo'
 import { UserInfo, WorkstationInfo } from '../viewmodel/UserInfo'
 import RequestParamModel from '../viewmodel/RequestParamModel'
 import CommonConstants from '../common/constants/CommonConstants'
+import OperationComponent from '../viewmodel/process/OperationComponent'
 
 @CustomDialog
 export struct LoginInfoDialog {
   private scrollerList: Scroller = new Scroller()
   // 扫码开工状态(0:未开工 1:已开工)
   @Link scanState: number
+  // 工序组件(工步)
+  @Link opComponents: OperationComponent[]
+  // 选中的工序组件类型
+  @Link selectComponentType: string
   //当前工位
   @Consume('currentStation') currentStation: string
   //当前工位id
@@ -55,7 +60,7 @@ export struct LoginInfoDialog {
     CommonConstants.AUTH_TOKEN = token
     this.currentUserName = this.userName
     let res:UserInfo = await ProcessRequest.get('/api/auth') ;
-    this.currentUserId = res.id!
+    this.currentUserId = res.id! as number
     this.loginUser = await ProcessRequest.post('/api/v1/sys/user/get', {id: this.currentUserId} as RequestParamModel) as UserInfo
     if (this.loginUser.depts) {
       this.loginUser.deptNames = this.loginUser?.depts[0]?.deptName!
@@ -190,6 +195,8 @@ export struct LoginInfoDialog {
                   this.loginUser = {}
                   this.loginFlag = 2
                   this.scanState = 0
+                  this.opComponents = []
+                  this.selectComponentType = ''
                 })
             }
             .width('69%')

+ 33 - 8
entry/src/main/ets/view/ProcessReportingDialog.ets

@@ -1,18 +1,23 @@
-//工序报工
 import ProcessRequest from '../common/util/request/ProcessRequest'
-import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO'
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO'
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo'
 import ReportInfo from '../viewmodel/ReportInfo'
 import RequestParamModel from '../viewmodel/RequestParamModel'
 import WorkOrderInfo from '../viewmodel/WorkOrderInfo'
+import promptAction from '@ohos.promptAction'
+import ProcessInfo from '../viewmodel/process/ProcessInfo'
 
+//工序报工
 @CustomDialog
-export struct ProcessReportingDialog{
+export struct ProcessReportingDialog {
   private scrollerList: Scroller = new Scroller()
   //查询报工
   @Link reportList: ReportInfo[]
   //选中的工序id
-  @Link selectOperationId:string
+  @Link selectOperationId: string
+  // 绩效模式(0:计时 1:计件)
+  @Link operationPerformance: string
+  @Link process: ProcessInfo
   //当前工位
   @Consume('currentStationId') currentStationId: string
   //选择的按钮索引(默认加载全部)
@@ -38,7 +43,9 @@ export struct ProcessReportingDialog{
   //选择报工数量
   onSelectReportNum: (index:number) => void = () => {}
   //选择不良品数量
-  onSelectUnqualified: (index:number) => void = () => {}
+  onSelectDefectNum: (index:number) => void = () => {}
+  // 报工后清除相关数据
+  clearSelectData: () => void = () => {}
 
   updateReporterName(index: number, name: string) {
     if (this.reportList[index]) {
@@ -82,7 +89,6 @@ export struct ProcessReportingDialog{
     this.handleReportedClick()
   }
 
-
   build() {
     Column() {
       Column() {
@@ -278,7 +284,7 @@ export struct ProcessReportingDialog{
                       .backgroundColor($r('app.color.20FFFFFF'))
                       .height('70%')
                       .onClick(()=>{
-                        this.onSelectUnqualified(index)
+                        this.onSelectDefectNum(index)
                       })
                     }
                     .width('29%')
@@ -343,7 +349,26 @@ export struct ProcessReportingDialog{
           }
           .justifyContent(FlexAlign.Center)
           .width('50%')
-          .onClick(() => {
+          .onClick(async () => {
+            if (!this.process || !this.process.id) {
+              promptAction.showToast({
+                message: '请先工序开工',
+                duration: 2000
+              });
+              return;
+            }
+            if (!this.bindTaskSeq || this.bindTaskSeq.length <= 0) {
+              promptAction.showToast({
+                message: '请先选择用户和报工的流水号',
+                duration: 2000
+              });
+              return;
+            }
+            // if (this.operationPerformance === '1') {
+              this.bindTaskSeq[0].processId = this.process.id!
+              await ProcessRequest.post('/api/v1/process/info/reportByPiecework', this.bindTaskSeq)
+            // }
+            this.clearSelectData()
             this.controller.close();
           })
         }

+ 19 - 14
entry/src/main/ets/view/ReportWorkNumDialog.ets

@@ -1,11 +1,12 @@
-//报工数量
 import ProcessRequest from '../common/util/request/ProcessRequest';
-import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO';
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo';
 import RequestParamModel from '../viewmodel/RequestParamModel';
 import preferencesUtil from '../common/util/PerferencesUtil';
 import CommonConstants from '../common/constants/CommonConstants';
+import promptAction from '@ohos.promptAction';
 
+//报工数量
 @CustomDialog
 export struct ReportWorkNumDialog{
   controller: CustomDialogController
@@ -56,20 +57,13 @@ export struct ReportWorkNumDialog{
     // 检查所有其他用户的选择记录
     return this.bindTaskSeq.some(userSelection =>
     userSelection.userName !== this.userName &&
-    userSelection.reportSeq?.some(seq =>
-    seq.seqNo === item.seqNo &&
-      seq.operationId === item.operationId
-    )
-    );
+    userSelection.reportSeqNos?.some(seqNo => seqNo === item.seqNo));
   }
 
   // 获取选择当前项的用户名
   private getSelectingUserName(item: TaskSeqVO): string | undefined {
     const userSelection = this.bindTaskSeq.find(userSelection =>
-    userSelection.reportSeq?.some(seq =>
-    seq.seqNo === item.seqNo &&
-      seq.operationId === item.operationId)
-    );
+    userSelection.reportSeqNos?.some(seqNo => seqNo === item.seqNo));
     return userSelection?.userName;
   }
 
@@ -279,20 +273,31 @@ export struct ReportWorkNumDialog{
           .justifyContent(FlexAlign.Center)
           .width('50%')
           .onClick(() => {
+            let selectTasks = this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index));
+            if (!selectTasks || selectTasks.length <= 0) {
+              promptAction.showToast({
+                message: '请先报工的流水号',
+                duration: 2000
+              });
+              return;
+            }
+            let seqNos: string[] = []
+            for (const element of selectTasks) {
+              seqNos.push(element.seqNo)
+            }
             const currentUserSelection: BindTaskSeqVO = {
               userName: this.userName,
-              reportSeq: this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index))
+              reportSeqNos: seqNos
             };
             const existingUserIndex = this.bindTaskSeq.findIndex(
               item => item.userName === this.userName
             );
             if (existingUserIndex >= 0) {
-              this.bindTaskSeq[existingUserIndex].reportSeq = currentUserSelection.reportSeq;
+              this.bindTaskSeq[existingUserIndex].reportSeqNos = currentUserSelection.reportSeqNos;
             } else {
               this.bindTaskSeq.push(currentUserSelection);
             }
             this.onConfirm(this.selectedIndexes.length);
-            console.info("sssssss"+this.bindTaskSeq.length)
             this.controller.close()
           })
         }

+ 1 - 1
entry/src/main/ets/view/SpecialInspectionDialog.ets

@@ -1,6 +1,6 @@
 //专检
 import ProcessRequest from '../common/util/request/ProcessRequest';
-import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import { BindTaskSeqVO } from '../viewmodel/process/BindTaskSeqVO';
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo';
 import RequestParamModel from '../viewmodel/RequestParamModel';
 import { Font } from '@ohos.arkui.UIContext';

+ 0 - 1
entry/src/main/ets/view/SwitchingProductDialog.ets

@@ -73,7 +73,6 @@ export struct SwitchingProductDialog{
       remark: '',
       sortNum: 0
     })
-    console.log('hhtest', '工步----' + JSON.stringify(this.opComponents))
   }
 
   handleAllClick():void {

+ 1 - 1
entry/src/main/ets/view/SwitchingUserDialog.ets

@@ -32,7 +32,7 @@ export struct SwitchingUserDialog {
     CommonConstants.AUTH_TOKEN = token
     this.currentUserName = this.userName
     let res:UserInfo = await ProcessRequest.get('/api/auth') ;
-    this.currentUserId = res.id!
+    this.currentUserId = res.id! as number
     this.controller.close()
 }
 

+ 0 - 8
entry/src/main/ets/viewmodel/BindTaskSeqVO.ets

@@ -1,8 +0,0 @@
-import TaskSeqVO from './process/TaskSeqInfo'
-
-export interface BindTaskSeqVO
-{
-  userName?:string,
-  reportSeq?:TaskSeqVO[]
-  unqualifiedSeq?:TaskSeqVO[]
-}

+ 2 - 2
entry/src/main/ets/viewmodel/UserInfo.ets

@@ -1,8 +1,8 @@
 // 用户信息
 export class UserInfo {
   // id
-  id?: number;
-  // 仓储id
+  id?: number | string;
+  // 用户id
   userId?: number;
   // 用户名
   userName?: string;

+ 11 - 0
entry/src/main/ets/viewmodel/process/BindTaskSeqVO.ets

@@ -0,0 +1,11 @@
+import TaskSeqVO from './TaskSeqInfo'
+
+export interface BindTaskSeqVO
+{
+  userName?:string,
+  userId?:string,
+  // workOrderCode?:string,
+  processId?: string,
+  reportSeqNos?: string[]
+  defectSeqNos?: string[]
+}

+ 1 - 1
entry/src/main/ets/viewmodel/process/OperationComponent.ets

@@ -12,7 +12,7 @@ export default class OperationComponent {
   remark?: string
   // 组件名称
   compentName?: string
-  // 组件类型 1:物料采集 2:记录项 3:多媒体采集 4:ESOP 5:点检 6:设备记录 7:紧固 8:调试配对 9:铭牌绑定)
+  // 组件类型 1:物料采集 2:记录项 3:多媒体采集 4:ESOP 5:点检 6:设备记录 7:紧固 8:调试配对 9:铭牌绑定 10:工序表单 11:自动测试 12:设备确认
   compentType?: string
   // 排序标识
   sortNum?: number

+ 2 - 0
entry/src/main/ets/viewmodel/process/OperationInfo.ets

@@ -14,6 +14,8 @@ export default class OperationInfo {
   operationSort?: number
   // 工序是否完成
   opComplete?: boolean
+  // 绩效模式(0:计时 1:计件)
+  performance?: string
   // 当前工位是否有该工序任务
   exists?: boolean
   // 序列号

+ 5 - 0
entry/src/main/resources/base/media/process_component_auto_test.svg

@@ -0,0 +1,5 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path d="M19.25 7V3.75H2.75v13.5h16.5V13.5a.75.75 0 0 1 1.5 0V18a.75.75 0 0 1-.75.75H2a.75.75 0 0 1-.75-.75V3A.75.75 0 0 1 2 2.25h18a.75.75 0 0 1 .75.75v4a.75.75 0 0 1-1.5 0Z"/>
+  <path d="M10.25 21v-3a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-1.5 0Z"/>
+  <path d="m16 21.25.077.004a.75.75 0 0 1 0 1.492L16 22.75H6a.75.75 0 0 1 0-1.5h10ZM9.737 5.257a.75.75 0 0 1 .642.615l1.164 6.717 1.583-3.236.047-.082a.75.75 0 0 1 1.2-.074l1.54 1.818.985-1.033.055-.052a.751.751 0 0 1 .487-.18H22a.75.75 0 0 1 0 1.5h-4.24l-1.337 1.404a.75.75 0 0 1-1.115-.033l-1.34-1.579-2.094 4.287a.75.75 0 0 1-1.413-.201L9.31 8.496l-1.07 2.319a.751.751 0 0 1-.681.435H6a.75.75 0 0 1 0-1.5h1.08l1.88-4.064a.75.75 0 0 1 .778-.43Z"/>
+</svg>

+ 4 - 0
entry/src/main/resources/base/media/process_component_form.svg

@@ -0,0 +1,4 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
+  <path d="M21.25 4.5a.75.75 0 0 0-.75-.75h-17a.75.75 0 0 0-.75.75v15c0 .414.336.75.75.75h17a.75.75 0 0 0 .75-.75v-15Zm1.5 15a2.25 2.25 0 0 1-2.25 2.25h-17a2.25 2.25 0 0 1-2.25-2.25v-15A2.25 2.25 0 0 1 3.5 2.25h17a2.25 2.25 0 0 1 2.25 2.25v15Z"/>
+  <path d="M22 6.25a.75.75 0 0 1 0 1.5H2a.75.75 0 0 1 0-1.5h20Zm-4 5a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5h8Zm0 4a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5h8Zm-11-4a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1 0-1.5h1Zm0 4a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1 0-1.5h1Z"/>
+</svg>