|
@@ -8,12 +8,15 @@ export struct SelectOrderDialog {
|
|
|
private scrollerMaterial: Scroller = new Scroller()
|
|
|
//工单列表
|
|
|
@State workOrderList: WorkOrderInfo[] = []
|
|
|
+ //选择的工单索引
|
|
|
@State selectedOrderIndex: number = -1
|
|
|
+ //扫描的工单号
|
|
|
@State scanOrderValue:string = ''
|
|
|
controller: CustomDialogController
|
|
|
onConfirm: () => void = () => {
|
|
|
}
|
|
|
|
|
|
+ //加载查询的工单
|
|
|
loadQueryOrders = async(orderNo:string)=>{
|
|
|
let queryRes = await ProcessRequest.post('/api/v1/plan/workOrder/page', {
|
|
|
workOrderCode:orderNo
|
|
@@ -21,6 +24,7 @@ export struct SelectOrderDialog {
|
|
|
this.workOrderList = queryRes?.records??[]
|
|
|
}
|
|
|
|
|
|
+ //加载所有工单
|
|
|
loadWorkOrders = async () => {
|
|
|
// 获取未完成工单
|
|
|
let unfinishedRes = await ProcessRequest.post('/api/v1/plan/workOrder/taskPage', {
|
|
@@ -32,7 +36,6 @@ export struct SelectOrderDialog {
|
|
|
queryComplete: 1
|
|
|
} as RequestParamModel) as WorkOrderPage;
|
|
|
|
|
|
- // 创建新数组(避免使用展开运算符)
|
|
|
let combinedList: WorkOrderInfo[] = [];
|
|
|
|
|
|
// 添加未完成工单
|
|
@@ -203,10 +206,9 @@ export struct SelectOrderDialog {
|
|
|
})
|
|
|
}
|
|
|
.columnsTemplate('1fr 1fr 1fr')
|
|
|
- // .rowsTemplate('1fr 1fr')
|
|
|
- .columnsGap(10) // 移除网格内部列间距
|
|
|
- .rowsGap(10) // 移除网格内部行间距
|
|
|
- .width('100%') // 确保填满父容器
|
|
|
+ .columnsGap(10)
|
|
|
+ .rowsGap(10)
|
|
|
+ .width('100%')
|
|
|
.height('97%')
|
|
|
.padding(10)
|
|
|
}
|
|
@@ -240,6 +242,7 @@ export struct SelectOrderDialog {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.width('50%')
|
|
|
.onClick(() => {
|
|
|
+ if(this.selectedOrderIndex==-1) return
|
|
|
this.onConfirm();
|
|
|
this.controller.close();
|
|
|
})
|