cjb 1 viikko sitten
vanhempi
commit
cce8136f35

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

@@ -9,7 +9,6 @@ export default class CommonConstants {
   static FILE_URL_PREFIX: string = 'http://192.168.1.3:9000'
   // 图片地址前缀
   static PICTURE_URL_PREFIX: string = 'http://192.168.1.3:20001'
-  static LOCAL_CACHE_DIR: string = '/data/storage/el2/base/haps/entry/files/image_cache/';
 
   // 当前登录用户相关信息
   // static USER_ID?: number

+ 34 - 5
entry/src/main/ets/pages/ProcessIndex.ets

@@ -28,6 +28,7 @@ import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
 import { AuxiliaryOperationDialog } from '../view/AuxiliaryOperationDialog';
 import { MqttClientOptions, MqttConnectOptions } from '@ohos/mqtt';
 import MqttManager from '../common/util/mqtt';
+import { UnqualifiedReportDialog } from '../view/UnqualifiedReportDialog';
 
 @Entry
 @Component
@@ -151,9 +152,9 @@ struct ProcessIndex {
   })
   ReportWorkNumController: CustomDialogController = new CustomDialogController({
     builder: ReportWorkNumDialog({
-      userName: this.reportList[this.currentReporterIndex].userName,
+      userName: this.reportList[this.currentReportNumIndex].userName,
       onConfirm:(num:number)=>{
-        const index = this.currentReporterIndex;
+        const index = this.currentReportNumIndex;
         if (this.reportList[index]) {
           this.reportList[index].reportNum = String(num);
           this.reportList = [...this.reportList];
@@ -165,6 +166,22 @@ struct ProcessIndex {
     alignment:DialogAlignment.Center,
     maskColor: 'rgba(0,0,0,0.8)',
   })
+  UnqualifiedReportController: CustomDialogController = new CustomDialogController({
+    builder: UnqualifiedReportDialog({
+      userName: this.reportList[this.currentUnqualifiedIndex].userName,
+      onConfirm:(num:number)=>{
+        const index = this.currentUnqualifiedIndex;
+        if (this.reportList[index]) {
+          this.reportList[index].unqualifiedNum = String(num);
+          this.reportList = [...this.reportList];
+        }
+      }
+    }),
+    autoCancel: true,
+    customStyle: true,
+    alignment:DialogAlignment.Center,
+    maskColor: 'rgba(0,0,0,0.8)',
+  })
   JoinPersonNameController: CustomDialogController = new CustomDialogController({
     builder: JoinPersonNameDialog({
       reportList:this.reportList,
@@ -195,7 +212,7 @@ struct ProcessIndex {
   ProcessReportingController: CustomDialogController = new CustomDialogController({
     builder: ProcessReportingDialog({
       onSelectReporter:(index:number)=>{
-        this.currentReporterIndex = index; // 只记录当前索引
+        this.currentReporterIndex = index;
         this.JoinPersonNameController.open();
       },
       onSelectReportNum:(index:number)=>{
@@ -209,12 +226,23 @@ struct ProcessIndex {
         this.currentReportNumIndex = index
         this.ReportWorkNumController.open()
       },
+      onSelectUnqualified:(index:number)=>{
+        if (!this.reportList[index]?.userName?.trim()) {
+          promptAction.showToast({
+            message: '请先添加用户',
+            duration: 2000
+          });
+          return;
+        }
+        this.currentUnqualifiedIndex = index
+        this.UnqualifiedReportController.open()
+      },
       reportList:this.reportList
     }),
-    autoCancel: true, // 点击遮罩关闭
+    autoCancel: true,
     customStyle: true,
     alignment:DialogAlignment.Center,
-    maskColor: 'rgba(0,0,0,0.8)',  // 黑色遮罩
+    maskColor: 'rgba(0,0,0,0.8)',
   })
   // 切换产线弹窗控制器
   SwitchingProductLineController: CustomDialogController = new CustomDialogController({
@@ -344,6 +372,7 @@ struct ProcessIndex {
   }
 
   async aboutToAppear() {
+    this.ProcessReportingController.open()
     // todo 删除
     let token:string = await ProcessRequest.post('api/auth/aioLogin', {
       password: '123456',

+ 199 - 0
entry/src/main/ets/view/AddUnqualifiedRecordDialog.ets

@@ -0,0 +1,199 @@
+//添加不良类型记录或者编辑不良类型
+import ProcessRequest from '../common/util/request/ProcessRequest';
+import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import TaskSeqVO from '../viewmodel/process/TaskSeqInfo';
+import RequestParamModel from '../viewmodel/RequestParamModel';
+import { Font } from '@ohos.arkui.UIContext';
+
+@CustomDialog
+export struct AddUnqualifiedRecordDialog{
+  controller: CustomDialogController
+  onConfirm: ()=> void = () => {}
+  onDelete:()=> void = () => {}
+  scroller: Scroller = new Scroller()
+
+  //是否是编辑状态(需要传入的参数)
+  @Prop isEdit:Boolean = false
+  //选择不良类型索引(需要传入的参数)
+  @Prop selectedTypeIndex:number= -1
+  //选择缺陷类型索引(需要传入的参数)
+  @Prop selectedDefectTypeIndex:number= -1
+
+  //不良类型
+  @State unqualifiedType:Array<SelectOption> = [
+    {value:"质量问题类型"},
+    {value:"操作问题类型"},
+    {value:"生产问题类型"},
+    {value:"其它问题类型"},]
+  //缺陷类型
+  @State defectType:Array<SelectOption> = [
+    {value:"PCBA缺陷"},
+    {value:"结构缺陷"},
+    {value:"外购材料缺陷"},
+    {value:"外观缺陷"},]
+
+
+  build() {
+    Column(){
+      Column() {
+        Text(this.isEdit?'不良类型记录':'添加不良类型记录')
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }
+      .height('12%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+      Column(){
+        Text('不良类型')
+          .fontSize($r('app.float.fontSize_16'))
+          .fontColor($r('app.color.FFFFFF'))
+        Select(this.unqualifiedType)
+          .height('16%')
+          .width('100%')
+          .borderRadius($r('app.float.virtualSize_16'))
+          .selected(this.selectedTypeIndex === -1 ? 0 : this.selectedTypeIndex)
+          .value(this.selectedTypeIndex === -1 ? '请选择' : String(this.unqualifiedType[this.selectedTypeIndex].value))
+          .backgroundColor($r('app.color.20FFFFFF'))
+          .selectedOptionBgColor($r('app.color.20FFFFFF'))
+          .fontColor(this.selectedTypeIndex === -1?$r('app.color.30FFFFFF'):$r('app.color.FFFFFF'))
+          .font({size:$r('app.float.fontSize_24')})
+          .selectedOptionFont({
+            size:$r('app.float.fontSize_24')
+          })
+          .onSelect((index: number) => {
+            this.selectedTypeIndex = index
+
+          })
+          .margin({top:'3%',bottom:'3%'})
+        Text('缺陷名称')
+          .fontSize($r('app.float.fontSize_16'))
+          .fontColor($r('app.color.FFFFFF'))
+        Select(this.defectType)
+          .height('16%')
+          .width('100%')
+          .borderRadius($r('app.float.virtualSize_16'))
+          .selected(this.selectedDefectTypeIndex === -1 ? 0 : this.selectedDefectTypeIndex)
+          .value(this.selectedDefectTypeIndex === -1 ? '请选择' : String(this.defectType[this.selectedDefectTypeIndex].value))
+          .backgroundColor($r('app.color.20FFFFFF'))
+          .selectedOptionBgColor($r('app.color.20FFFFFF'))
+          .fontColor(this.selectedDefectTypeIndex === -1?$r('app.color.30FFFFFF'):$r('app.color.FFFFFF'))
+          .font({size:$r('app.float.fontSize_24')})
+          .selectedOptionFont({
+            size:$r('app.float.fontSize_24')
+          })
+          .onSelect((index: number) => {
+            this.selectedDefectTypeIndex = index
+
+          })
+          .margin({top:'3%',bottom:'3%'})
+        Text('备注')
+          .fontSize($r('app.float.fontSize_16'))
+          .fontColor($r('app.color.FFFFFF'))
+        TextArea({placeholder:'请录入不良详情'})
+          .backgroundColor($r('app.color.000000'))
+          .height('40%')
+          .width('100%')
+          .fontColor($r('app.color.FFFFFF'))
+          .placeholderColor($r('app.color.30FFFFFF'))
+          .placeholderFont({size:$r('app.float.fontSize_16')})
+          .fontSize($r('app.float.fontSize_16'))
+          .textAlign(TextAlign.Start)
+          .maxLength(200)
+          .margin({top:'3%',bottom:'3%'})
+          .borderRadius($r('app.float.virtualSize_16'))
+
+      }
+      .width('70%')
+      .height('80%')
+      .margin({left:'15%',right:'15%'})
+      .alignItems(HorizontalAlign.Start)
+      if(this.isEdit){
+        Column() {
+          Divider()
+            .vertical(false)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Row() {
+              Text('删除')
+                .fontColor($r('app.color.FF453A'))
+                .fontSize($r('app.float.fontSize_30'))
+            }
+            .justifyContent(FlexAlign.Center)
+            .width('33.3%')
+            .onClick(() => {
+              this.onDelete()
+            })
+            Divider()
+              .vertical(true)
+              .strokeWidth(1)
+              .color($r('app.color.15FFFFFF'))
+            Row() {
+              Text('取消')
+                .fontColor($r('app.color.60FFFFFF'))
+                .fontSize($r('app.float.fontSize_30'))
+            }
+            .justifyContent(FlexAlign.Center)
+            .width('33.3%')
+            .onClick(() => this.controller.close())
+            Divider()
+              .vertical(true)
+              .strokeWidth(1)
+              .color($r('app.color.15FFFFFF'))
+            Row() {
+              Text('确定')
+                .fontColor($r('app.color.007AFF'))
+                .fontSize($r('app.float.fontSize_30'))
+            }
+            .justifyContent(FlexAlign.Center)
+            .width('33.3%')
+            .onClick(() => {
+            })
+          }
+        }
+        .width('100%')
+        .height('8%')
+      }else{
+        Column() {
+          Divider()
+            .vertical(false)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Row() {
+              Text('取消')
+                .fontColor($r('app.color.60FFFFFF'))
+                .fontSize($r('app.float.fontSize_30'))
+            }
+            .justifyContent(FlexAlign.Center)
+            .width('50%')
+            .onClick(() => this.controller.close())
+            Divider()
+              .vertical(true)
+              .strokeWidth(1)
+              .color($r('app.color.15FFFFFF'))
+            Row() {
+              Text('确定')
+                .fontColor($r('app.color.007AFF'))
+                .fontSize($r('app.float.fontSize_30'))
+            }
+            .justifyContent(FlexAlign.Center)
+            .width('50%')
+            .onClick(() => {
+            })
+          }
+        }
+        .width('100%')
+        .height('8%')
+      }
+    }
+    .height('71%')
+    .width('30%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

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

@@ -180,7 +180,7 @@ export struct JoinPersonNameDialog{
       .height('83%')
       .width('100%')
     }
-    .height('71%')
+    .height('100%')
     .width('30%')
     .backgroundColor($r('app.color.2A2A2A'))
     .justifyContent(FlexAlign.End)

+ 4 - 0
entry/src/main/ets/view/ProcessReportingDialog.ets

@@ -1,5 +1,6 @@
 //工序报工
 import ProcessRequest from '../common/util/request/ProcessRequest'
+import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO'
 import TaskSeqVO from '../viewmodel/process/TaskSeqInfo'
 import ReportInfo from '../viewmodel/ReportInfo'
 import RequestParamModel from '../viewmodel/RequestParamModel'
@@ -20,6 +21,7 @@ export struct ProcessReportingDialog{
   @State addReportingClick: number = 1
   //从首页传来的工单
   @Prop selectWorkOder: WorkOrderInfo = {}
+  //工序名字
   @Prop selectProcessName:string = '正面三防'
   //当前工序已报工数量
   @State reportedNum:number = 0
@@ -29,6 +31,7 @@ export struct ProcessReportingDialog{
   @State scanSeqValue: string = ''
   @State userName:string = '王德发'
   @State currentReporterIndex: number = 0; // 记录当前点击的报工人索引
+  @Consume ('bindTaskSeq') bindTaskSeq: BindTaskSeqVO[]
 
   controller: CustomDialogController
   onConfirm: () => void = () => {}
@@ -290,6 +293,7 @@ export struct ProcessReportingDialog{
                           .margin({top:'35%'})
                           .onClick(()=>{
                             this.reportList.splice(index,1)
+                            this.bindTaskSeq = this.bindTaskSeq.filter(i => i.userName !== item.userName);
                           })
                       }
                       .width('9%')

+ 15 - 5
entry/src/main/ets/view/ReportWorkNumDialog.ets

@@ -42,7 +42,7 @@ export struct ReportWorkNumDialog{
     // 检查所有其他用户的选择记录
     return this.bindTaskSeq.some(userSelection =>
     userSelection.userName !== this.userName &&
-    userSelection.TaskSeq?.some(seq =>
+    userSelection.reportSeq?.some(seq =>
     seq.seqNo === item.seqNo &&
       seq.operationId === item.operationId
     )
@@ -52,7 +52,7 @@ export struct ReportWorkNumDialog{
   // 获取选择当前项的用户名
   private getSelectingUserName(item: TaskSeqVO): string | undefined {
     const userSelection = this.bindTaskSeq.find(userSelection =>
-    userSelection.TaskSeq?.some(seq =>
+    userSelection.reportSeq?.some(seq =>
     seq.seqNo === item.seqNo &&
       seq.operationId === item.operationId)
     );
@@ -104,7 +104,16 @@ export struct ReportWorkNumDialog{
   }
 
   aboutToAppear(): void {
-    this.onQueryTask()
+    this.onQueryTask().then(() => {
+      // 查询完成后检查是否有当前用户已选的项
+      this.queryTaskSeq.forEach((item, index) => {
+        const selectingUser = this.getSelectingUserName(item);
+        if (selectingUser === this.userName) {
+          this.selectedIndexes.push(index);
+        }
+      });
+      this.updateSelectState();
+    });
   }
 
   build() {
@@ -258,17 +267,18 @@ export struct ReportWorkNumDialog{
           .onClick(() => {
             const currentUserSelection: BindTaskSeqVO = {
               userName: this.userName,
-              TaskSeq: this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index))
+              reportSeq: this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index))
             };
             const existingUserIndex = this.bindTaskSeq.findIndex(
               item => item.userName === this.userName
             );
             if (existingUserIndex >= 0) {
-              this.bindTaskSeq[existingUserIndex] = currentUserSelection;
+              this.bindTaskSeq[existingUserIndex].reportSeq = currentUserSelection.reportSeq;
             } else {
               this.bindTaskSeq.push(currentUserSelection);
             }
             this.onConfirm(this.selectedIndexes.length);
+            console.info("sssssss"+this.bindTaskSeq.length)
             this.controller.close()
           })
         }

+ 294 - 0
entry/src/main/ets/view/UnqualifiedReportDialog.ets

@@ -0,0 +1,294 @@
+//不良品数量
+import ProcessRequest from '../common/util/request/ProcessRequest';
+import { BindTaskSeqVO } from '../viewmodel/BindTaskSeqVO';
+import TaskSeqVO from '../viewmodel/process/TaskSeqInfo';
+import RequestParamModel from '../viewmodel/RequestParamModel';
+
+@CustomDialog
+export struct UnqualifiedReportDialog{
+  controller: CustomDialogController
+  onConfirm: (num:number)=> void = () => {}
+  scroller: Scroller = new Scroller()
+
+  //是否全选
+  @State isAllSelected:boolean = false
+  //选择的数量
+  @State selectNum:number= 0
+  //当前工单
+  @State currentWorkOrderCode:string = ''
+  //当前工序号
+  @State currentOperationId:string = ''
+  //当前工位
+  @State currentStationId:string = ''
+  //总数量
+  @State totalNum:number= 0
+  //查询报工
+  @State queryTaskSeq: TaskSeqVO[] = []
+  @Consume ('bindTaskSeq') bindTaskSeq: BindTaskSeqVO[]
+  @Prop userName:string= ''
+  @State selectedIndexes:number[] =[]
+
+  onQueryTask=async ()=>{
+    this.queryTaskSeq = await ProcessRequest.post('/api/v1/process/check/items/list', {
+      checkType: "self_check",
+    } as RequestParamModel) as TaskSeqVO[];
+    this.totalNum = this.queryTaskSeq.length
+  }
+
+  private isSelectedByOthers(item: TaskSeqVO): boolean {
+    // 检查所有其他用户的选择记录
+    return this.bindTaskSeq.some(userSelection =>
+    userSelection.userName !== this.userName &&
+    userSelection.unqualifiedSeq?.some(seq =>
+    seq.seqNo === item.seqNo &&
+      seq.operationId === item.operationId
+    )
+    );
+  }
+
+  // 获取选择当前项的用户名
+  private getSelectingUserName(item: TaskSeqVO): string | undefined {
+    const userSelection = this.bindTaskSeq.find(userSelection =>
+    userSelection.unqualifiedSeq?.some(seq =>
+    seq.seqNo === item.seqNo &&
+      seq.operationId === item.operationId)
+    );
+    return userSelection?.userName;
+  }
+
+  //选择单个
+  private onSelectSeqNo(index: number) {
+    const item = this.queryTaskSeq[index];
+
+    if (this.isSelectedByOthers(item)) {
+      return; // 已被其他用户选择,不允许操作
+    }
+
+    if (this.selectedIndexes.includes(index)) {
+      this.selectedIndexes = this.selectedIndexes.filter(i => i !== index);
+    } else {
+      this.selectedIndexes = [index, ...this.selectedIndexes];
+    }
+
+    this.updateSelectState();
+  }
+
+  //全选
+  private handleSelectAll() {
+    this.isAllSelected = !this.isAllSelected;
+
+    if (this.isAllSelected) {
+      // 只选择未被其他用户选中的项
+      this.selectedIndexes = [];
+      this.queryTaskSeq.forEach((item: TaskSeqVO, index: number) => {
+        if (!this.isSelectedByOthers(item)) {
+          this.selectedIndexes.push(index);
+        }
+      });
+    } else {
+      this.selectedIndexes = [];
+    }
+
+    this.updateSelectState();
+  }
+
+  //更新选择状态
+  private updateSelectState() {
+    this.selectNum = this.selectedIndexes.length;
+    const availableItems = this.queryTaskSeq.filter(item => !this.isSelectedByOthers(item));
+    this.isAllSelected = availableItems.length > 0 &&
+      this.selectedIndexes.length === availableItems.length;
+  }
+
+  aboutToAppear(): void {
+    this.onQueryTask().then(() => {
+      // 查询完成后检查是否有当前用户已选的项
+      this.queryTaskSeq.forEach((item, index) => {
+        const selectingUser = this.getSelectingUserName(item);
+        if (selectingUser === this.userName) {
+          this.selectedIndexes.push(index);
+        }
+      });
+      this.updateSelectState();
+    });
+  }
+
+  build() {
+    Column(){
+      Column() {
+        Text("不良品数量")
+          .fontColor($r('app.color.FFFFFF'))
+          .fontSize($r('app.float.fontSize_30'))
+      }
+      .height('8%')
+      .width('100%')
+      .justifyContent(FlexAlign.Center)
+      Row() {
+        Row(){
+          Row(){}.width('5%')
+          Checkbox()
+            .select(this.isAllSelected)
+            .selectedColor($r('app.color.0A84FF'))
+            .unselectedColor($r('app.color.60FFFFFF'))
+            .width($r('app.float.virtualSize_24'))
+            .mark({
+              strokeColor:$r('app.color.000000'),
+              size: $r('app.float.virtualSize_20'),
+              strokeWidth: 1
+            })
+            .height($r('app.float.virtualSize_24'))
+            .onChange(async (value: boolean) => {
+            })
+            .onClick(()=>{
+              this.handleSelectAll()
+            })
+          Text("全选")
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_16'))
+        }
+        .width('20%')
+        .justifyContent(FlexAlign.Start)
+        .backgroundColor(this.isAllSelected?$r('app.color.200A84FF'):$r('app.color.20FFFFFF'))
+        .borderRadius($r('app.float.virtualSize_16'))
+        .onClick(()=>{
+          this.handleSelectAll()
+        })
+        Row(){
+          Text(`${this.selectNum}`)
+            .fontColor($r('app.color.30D158'))
+            .fontSize($r('app.float.fontSize_16'))
+            .fontWeight(FontWeight.Lighter)
+          Text(`/${this.totalNum}`)
+            .fontColor($r('app.color.FFFFFF'))
+            .fontSize($r('app.float.fontSize_16'))
+            .fontWeight(FontWeight.Lighter)
+        }
+        .margin({left:'49%'})
+        .width('30%')
+        .justifyContent(FlexAlign.End)
+      }
+      .borderRadius($r('app.float.virtualSize_16'))
+      .height('7%')
+      .width('96%')
+      .margin({left:'2%',right:'2%',bottom:'1.5%'})
+      Row() {
+        List({space:8,scroller:this.scroller}){
+          ForEach(this.queryTaskSeq, (item:TaskSeqVO,index) => {
+            ListItem() {
+              Row(){
+                Checkbox()
+                  .select(this.selectedIndexes.includes(index)||this.isSelectedByOthers(item))
+                  .selectedColor($r('app.color.30D158'))
+                  .unselectedColor($r('app.color.60FFFFFF'))
+                  .width($r('app.float.virtualSize_24'))
+                  .mark({
+                    strokeColor:$r('app.color.000000'),
+                    size: $r('app.float.virtualSize_20'),
+                    strokeWidth: 1
+                  })
+                  .height($r('app.float.virtualSize_24'))
+                  .onClick(()=>{
+                    this.onSelectSeqNo(index)
+                    this.selectNum = this.selectedIndexes.length;
+                  })
+                Text('S/N')
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_16'))
+                  .fontWeight(FontWeight.Lighter)
+                Text(item.seqNo)
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_16'))
+                  .fontWeight(FontWeight.Bold)
+                  .margin({left:'2%'})
+                Text(this.getSelectingUserName(item))
+                  .fontColor($r('app.color.FFFFFF'))
+                  .fontSize($r('app.float.fontSize_12'))
+                  .fontWeight(FontWeight.Lighter)
+                  .width('50%')
+                  .textAlign(TextAlign.End)
+              }
+              .borderRadius($r('app.float.virtualSize_16'))
+              .backgroundColor(
+                this.selectedIndexes.includes(index) ||this.isSelectedByOthers(item)?
+                $r('app.color.2030D158') :
+                $r('app.color.20FFFFFF')
+              )
+              .border({
+                width:  1 ,
+                color: this.selectedIndexes.includes(index)||this.isSelectedByOthers(item) ?
+                $r('app.color.30D158') :
+                $r('app.color.20FFFFFF')
+              })
+              .width('100%')
+              .opacity(this.isSelectedByOthers(item) ? 0.3 : 1)
+              .onClick(()=>{
+                this.onSelectSeqNo(index)
+                this.selectNum = this.selectedIndexes.length;
+              })
+            }
+            .width('96%')
+            .margin({left:'2%',right:'2%'})
+          })
+        }
+        .height('100%')
+        .width('100%')
+      }
+      .height('73%')
+      .width('100%')
+      .margin({bottom:'1.5%'})
+      Column() {
+        Divider()
+          .vertical(false)
+          .strokeWidth(1)
+          .color($r('app.color.15FFFFFF'))
+        Row() {
+          Row() {
+            Text('取消')
+              .fontColor($r('app.color.60FFFFFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => this.controller.close())
+          Divider()
+            .vertical(true)
+            .strokeWidth(1)
+            .color($r('app.color.15FFFFFF'))
+          Row() {
+            Text('确定')
+              .fontColor($r('app.color.007AFF'))
+              .fontSize($r('app.float.fontSize_30'))
+          }
+          .justifyContent(FlexAlign.Center)
+          .width('50%')
+          .onClick(() => {
+            const currentUserSelection: BindTaskSeqVO = {
+              userName: this.userName,
+              unqualifiedSeq: this.queryTaskSeq.filter((_, index) => this.selectedIndexes.includes(index))
+            };
+            const existingUserIndex = this.bindTaskSeq.findIndex(
+              item => item.userName === this.userName
+            );
+            if (existingUserIndex >= 0) {
+              this.bindTaskSeq[existingUserIndex].unqualifiedSeq = currentUserSelection.unqualifiedSeq;
+            } else {
+              this.bindTaskSeq.push(currentUserSelection);
+            }
+            this.onConfirm(this.selectedIndexes.length);
+            this.controller.close()
+          })
+        }
+      }
+      .width('100%')
+      .height('8%')
+    }
+    .height('71%')
+    .width('30%')
+    .backgroundColor($r('app.color.2A2A2A'))
+    .justifyContent(FlexAlign.End)
+    .alignItems(HorizontalAlign.Start)
+    .borderColor($r('app.color.000000'))
+    .borderWidth(1)
+    .borderRadius($r('app.float.virtualSize_16'))
+  }
+}

+ 2 - 1
entry/src/main/ets/viewmodel/BindTaskSeqVO.ets

@@ -3,5 +3,6 @@ import TaskSeqVO from './process/TaskSeqInfo'
 export interface BindTaskSeqVO
 {
   userName?:string,
-  TaskSeq?:TaskSeqVO[]
+  reportSeq?:TaskSeqVO[]
+  unqualifiedSeq?:TaskSeqVO[]
 }

+ 2 - 0
entry/src/main/ets/viewmodel/RequestParamModel.ets

@@ -92,4 +92,6 @@ export default class RequestParamModel {
   jobNumber?:string
   //物料编码
   materialCode?:string
+  //检查方式
+  checkType?:string
 }