|
@@ -52,7 +52,7 @@ export struct CompleteSet {
|
|
|
//选中取出的物料位置
|
|
|
@State materialPosition: Materialpositionclass = {}
|
|
|
//暂时固定的料箱编码
|
|
|
- //todo
|
|
|
+
|
|
|
@State binCode: string = 'ZJ-JG031'
|
|
|
//点击任务单
|
|
|
@State selectOrder: number = -2
|
|
@@ -142,7 +142,8 @@ export struct CompleteSet {
|
|
|
@State private MaterialInformation: Array<MaterialInformationModel> = []
|
|
|
ScanStorageCode = async (itemCode: string) => {
|
|
|
|
|
|
- this.scanCodeValue = "BM51264341413217;SL9;PHthi5558;"
|
|
|
+ // BM51264341413217;SL9;PHthi5558;
|
|
|
+ this.scanCodeValue = ""
|
|
|
let res: MaterialInformationModel = await StorageRequest.post("/api/v1/process/circulation/material", {
|
|
|
label: itemCode //"#gys022#sc022#100#20220929#31"
|
|
|
} as MaterialInformationModel)
|
|
@@ -175,15 +176,15 @@ export struct CompleteSet {
|
|
|
|
|
|
let has = false
|
|
|
for (let i = 0; i < toPushArray.length; i++) {
|
|
|
- let box = toPushArray[i]
|
|
|
- if (obj.materialCode == box.materialCode) {
|
|
|
+ let box: MaterialInformationModel = toPushArray[i]
|
|
|
+ if (obj.materialCode == box.materialCode && obj.batchCode == box.batchCode && obj.batchNo == box.batchNo) {
|
|
|
let number = obj.num! + box.num!
|
|
|
box.num = number
|
|
|
has = true
|
|
|
}
|
|
|
}
|
|
|
if (!has) {
|
|
|
- toPushArray.push(JSON.parse(JSON.stringify(obj)))
|
|
|
+ toPushArray.unshift(JSON.parse(JSON.stringify(obj)))
|
|
|
}
|
|
|
|
|
|
this.MaterialInformation = [...toPushArray]
|
|
@@ -239,19 +240,7 @@ export struct CompleteSet {
|
|
|
} as RequestParamModel2) as PageModel<MaterialInfo>
|
|
|
}
|
|
|
|
|
|
- //查询库存信息
|
|
|
- async queryStockList(params: RequestParamModel) {
|
|
|
- // todo 删除
|
|
|
- if (params.materialNo != undefined && params?.materialNo.length > 0) {
|
|
|
- params.materialNo = 'BL00000111188'
|
|
|
- }
|
|
|
- // todo 删除
|
|
|
- if (params.vehicleCode != undefined && params?.vehicleCode.length > 0) {
|
|
|
- params.vehicleCode = 'ZJ-JG016'
|
|
|
- }
|
|
|
- console.log('testTag', JSON.stringify(params))
|
|
|
- return await StorageRequest.post('/api/v1/stock/list', params) as Materialpositionclass[]
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
//工序弹窗
|
|
|
selectProcessController: CustomDialogController = new CustomDialogController({
|
|
@@ -260,6 +249,7 @@ export struct CompleteSet {
|
|
|
processes: this.processes,
|
|
|
orderMaterialSwitch: this.orderMaterialSwitch,
|
|
|
confirm: async () => {
|
|
|
+ this.materialArray = []
|
|
|
// 查询工序关联的物料信息
|
|
|
let res = await this.queryMaterialPage()
|
|
|
// if (res.totalCount === undefined || res.totalCount <= 0 || res.totalPages === undefined || res.totalPages <= 0) {
|
|
@@ -502,6 +492,7 @@ export struct CompleteSet {
|
|
|
// this.selectProcess = {}
|
|
|
// this.processes = []
|
|
|
// }
|
|
|
+ this.processes = []
|
|
|
this.currentWorkOrderCode = item.workOrderCode ?? ""
|
|
|
this.orderId = item.taskId!
|
|
|
if (item?.workOrderCode && item.workOrderCode.length > 0) {
|
|
@@ -833,6 +824,7 @@ export struct CompleteSet {
|
|
|
.fontSize($r('app.float.fontSize_20'))
|
|
|
.fontColor($r('app.color.process_nameplate_grey_color'))
|
|
|
|
|
|
+
|
|
|
Text(this.recentlyRecordObject.weight)
|
|
|
.textAlign(TextAlign.End)
|
|
|
.width('48%')
|
|
@@ -948,7 +940,7 @@ export struct CompleteSet {
|
|
|
.onChange((value) => {
|
|
|
item.num = Number(value)
|
|
|
})
|
|
|
- Text(item.unitDictLabel ?? "个")
|
|
|
+ Text(item.unitDictLabel ?? item.unit ?? "个")
|
|
|
.fontSize($r('app.float.fontSize_20'))
|
|
|
.fontColor($r('app.color.process_nameplate_grey_color'))
|
|
|
.fontWeight(FontWeight.Medium)
|
|
@@ -1309,7 +1301,6 @@ struct EmptyBoxDialog {
|
|
|
.height('100%')
|
|
|
.backgroundColor($r('app.color.blue_100'))
|
|
|
.onClick(() => {
|
|
|
- // todo 调用硬件
|
|
|
this.isTakeOutBox = 1
|
|
|
this.controller?.close()
|
|
|
})
|