|
@@ -1,14 +1,16 @@
|
|
|
import ProcessRequest from '../common/util/request/ProcessRequest'
|
|
|
import RequestParamModel from '../viewmodel/RequestParamModel'
|
|
|
import WorkOrderSeq from '../viewmodel/WorkOrderSeq'
|
|
|
-import { BarcodeAssociationDialog } from './BarcodeAssociationDialog'
|
|
|
import promptAction from '@ohos.promptAction'
|
|
|
+import ProcessInfo from '../viewmodel/process/ProcessInfo'
|
|
|
|
|
|
@CustomDialog
|
|
|
export struct AuxiliaryOperationDialog {
|
|
|
// 工单编号
|
|
|
workOrderCode: string = ''
|
|
|
@Link @Watch('getBarcodeStatistics') seqList: WorkOrderSeq[]
|
|
|
+ // 扫码开工后的生产过程信息
|
|
|
+ @Link process: ProcessInfo
|
|
|
controller: CustomDialogController
|
|
|
|
|
|
// 提前下线数量
|
|
@@ -17,8 +19,18 @@ export struct AuxiliaryOperationDialog {
|
|
|
@State outsourcedAuditNum: number = 120
|
|
|
// 条码关联中的统计
|
|
|
@State barcodeStatistics: string = ''
|
|
|
+
|
|
|
+ //当前用户id
|
|
|
+ @Consume('currentUserId') currentUserId: number
|
|
|
+
|
|
|
+ // 打开零星叫料弹窗
|
|
|
+ openLittleMaterialRequestDialog?: () => void = () => {}
|
|
|
+ // 打开仓储操作弹窗
|
|
|
+ openInAndOutBoundDialog?: () => void = () => {}
|
|
|
// 打开条码关联弹窗
|
|
|
openBarcodeAssociationDialog?: () => void = () => {}
|
|
|
+ // 打开图纸资料弹窗
|
|
|
+ openPictureDrawingDialog?: () => void = () => {}
|
|
|
|
|
|
// 获取条码关联中的统计
|
|
|
getBarcodeStatistics() {
|
|
@@ -71,6 +83,7 @@ export struct AuxiliaryOperationDialog {
|
|
|
Row({space: 12}) {
|
|
|
// 左侧常用功能 和 流程相关操作
|
|
|
Column() {
|
|
|
+ // 注释说明
|
|
|
Column({space: 3}) {
|
|
|
Text('常用功能')
|
|
|
.fontColor($r('app.color.FFFFFF'))
|
|
@@ -108,6 +121,19 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height('100%')
|
|
|
.width('19.3%')
|
|
|
.alignContent(Alignment.Top)
|
|
|
+ .opacity(this.process.id ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ if (!this.process.id) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: '请先选择工序开工!',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.openLittleMaterialRequestDialog) {
|
|
|
+ this.openLittleMaterialRequestDialog()
|
|
|
+ }
|
|
|
+ })
|
|
|
// 仓储操作
|
|
|
Stack() {
|
|
|
Image($r("app.media.process_storage_operation"))
|
|
@@ -130,6 +156,12 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height('100%')
|
|
|
.width('19.3%')
|
|
|
.alignContent(Alignment.Top)
|
|
|
+ .onClick(()=>{
|
|
|
+ if (this.openInAndOutBoundDialog) {
|
|
|
+ this.openInAndOutBoundDialog()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
// 条码关联
|
|
|
Stack() {
|
|
|
Image($r("app.media.process_barcode_linkage"))
|
|
@@ -167,10 +199,11 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height('100%')
|
|
|
.width('19.3%')
|
|
|
.alignContent(Alignment.Top)
|
|
|
+ .opacity(this.workOrderCode ? 1 : 0.3)
|
|
|
.onClick(()=>{
|
|
|
if (!this.workOrderCode) {
|
|
|
promptAction.showToast({
|
|
|
- message: '请选择工单!',
|
|
|
+ message: '请先选择工单!',
|
|
|
duration: 2000
|
|
|
});
|
|
|
return;
|
|
@@ -179,6 +212,7 @@ export struct AuxiliaryOperationDialog {
|
|
|
this.openBarcodeAssociationDialog()
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
// 图纸资料
|
|
|
Stack() {
|
|
|
Image($r("app.media.process_drawing"))
|
|
@@ -216,6 +250,20 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height('100%')
|
|
|
.width('19.3%')
|
|
|
.alignContent(Alignment.Top)
|
|
|
+ .opacity(this.workOrderCode ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ if (!this.workOrderCode) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: '请先选择工单!',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // if (this.openBarcodeAssociationDialog) {
|
|
|
+ // this.openBarcodeAssociationDialog()
|
|
|
+ // }
|
|
|
+ })
|
|
|
+
|
|
|
// 撤销报工
|
|
|
Stack() {
|
|
|
Image($r("app.media.process_drawing"))
|
|
@@ -238,6 +286,19 @@ export struct AuxiliaryOperationDialog {
|
|
|
.height('100%')
|
|
|
.width('19.3%')
|
|
|
.alignContent(Alignment.Top)
|
|
|
+ .opacity(this.workOrderCode ? 1 : 0.3)
|
|
|
+ .onClick(()=>{
|
|
|
+ if (!this.workOrderCode) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: '请先选择工单!',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // if (this.openBarcodeAssociationDialog) {
|
|
|
+ // this.openBarcodeAssociationDialog()
|
|
|
+ // }
|
|
|
+ })
|
|
|
}
|
|
|
.height('33.6%')
|
|
|
.width('100%')
|
|
@@ -275,8 +336,16 @@ export struct AuxiliaryOperationDialog {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
+ .opacity(this.currentUserId <= 0 ? 0.3 : 1)
|
|
|
.onClick(()=>{
|
|
|
-
|
|
|
+ if (this.currentUserId <= 0) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `请先登录!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
.height('13.4%')
|
|
@@ -298,8 +367,16 @@ export struct AuxiliaryOperationDialog {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
+ .opacity(this.currentUserId <= 0 ? 0.3 : 1)
|
|
|
.onClick(()=>{
|
|
|
-
|
|
|
+ if (this.currentUserId <= 0) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `请先登录!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
})
|
|
|
// 提前下线
|
|
|
Row() {
|
|
@@ -330,7 +407,16 @@ export struct AuxiliaryOperationDialog {
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
.margin({left: '3.8%'})
|
|
|
+ .opacity(this.currentUserId <= 0 ? 0.3 : 1)
|
|
|
.onClick(()=>{
|
|
|
+ if (this.currentUserId <= 0) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `请先登录!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
})
|
|
|
// 委外审核
|
|
|
Row() {
|
|
@@ -361,7 +447,16 @@ export struct AuxiliaryOperationDialog {
|
|
|
.backgroundColor($r('app.color.20FFFFFF'))
|
|
|
.borderRadius($r('app.float.fontSize_16'))
|
|
|
.margin({left: '3.8%'})
|
|
|
+ .opacity(this.currentUserId <= 0 ? 0.3 : 1)
|
|
|
.onClick(()=>{
|
|
|
+ if (this.currentUserId <= 0) {
|
|
|
+ promptAction.showToast({
|
|
|
+ message: `请先登录!`,
|
|
|
+ duration: 1500,
|
|
|
+ bottom: 100
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
.width('95%')
|
|
@@ -430,7 +525,6 @@ export struct AuxiliaryOperationDialog {
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('100%')
|
|
|
-
|
|
|
}
|
|
|
.width('100%')
|
|
|
.height('93.5%')
|