|
@@ -1,8 +1,72 @@
|
|
|
import ProcessData from '../../model/ProcessData';
|
|
|
import StorageRequest from '../util/request/StorageRequest';
|
|
|
-import {Tasklistoutbound,Tasklist,SelectMaterialslist} from '../util/request/StorageRequestInstance'
|
|
|
+import {SelectMaterialslist} from '../util/request/StorageRequestInstance'
|
|
|
+import detailsList from '../../model/DetailsList';
|
|
|
/////物料位置
|
|
|
+////出库取料箱出库
|
|
|
+export interface Tasklist {
|
|
|
+
|
|
|
+ //批次号
|
|
|
+ batchCode?: string;
|
|
|
+ ///完成数量
|
|
|
+ completedNum?:number
|
|
|
+
|
|
|
+ //已经占用箱数
|
|
|
+ useNum?:number
|
|
|
+ //空箱数
|
|
|
+ emptyBoxNum?:string
|
|
|
+ //可用箱数
|
|
|
+ canUsedNum?:string
|
|
|
+ //总容量箱数
|
|
|
+ allNum?:number
|
|
|
+ //仓储类型
|
|
|
+ type?:string
|
|
|
+ //批次号
|
|
|
+
|
|
|
+ coordinate?: string
|
|
|
+ //创建时间
|
|
|
+ created?: string
|
|
|
+ //
|
|
|
+ creator?: string
|
|
|
+ //仓库编码
|
|
|
+ houseNo?:string
|
|
|
+ deptId?: string
|
|
|
+ houseType?:string
|
|
|
+ //主键
|
|
|
+ id?:string
|
|
|
+ locationNo?: string
|
|
|
+ // 物料名称
|
|
|
+ materialName?:string
|
|
|
+ //物料编码
|
|
|
+ materialNo?: string
|
|
|
+ //出入库数量
|
|
|
+ num?: number
|
|
|
+ orgId?: string
|
|
|
+ relPlanNo?:string
|
|
|
+ relOrderNo?:string
|
|
|
+ relOutOrderNo?:string
|
|
|
+ progress?:string
|
|
|
+ planNo?: string
|
|
|
+ position?: string
|
|
|
+ // 序列号
|
|
|
+ seqNo?: string
|
|
|
+ // 状态;1-待处理;2-处理中;3-处理异常;4-已完成
|
|
|
+ state?:number
|
|
|
+ // 库存数量
|
|
|
+ stockNum?:string
|
|
|
+ //出入库任务单号
|
|
|
+ taskNo?: string
|
|
|
+ unit?:string
|
|
|
+ updated?: string
|
|
|
+ //任务名称
|
|
|
+ taskName?:string
|
|
|
+ updator?: string
|
|
|
+ vehicleNo?: string
|
|
|
+
|
|
|
+}
|
|
|
export interface Materialpositionclass {
|
|
|
+ //产品规格
|
|
|
+ spec?:string
|
|
|
//批次号
|
|
|
batchCode?: string;
|
|
|
///完成数量
|
|
@@ -58,9 +122,98 @@ export interface Materialpositionclass {
|
|
|
pageNo?:number
|
|
|
pageSize?:number
|
|
|
}
|
|
|
+export interface outboundDataclass {
|
|
|
+ detailsList?:detailsList[]
|
|
|
+ taskId?:number
|
|
|
+ index?:number
|
|
|
+ //产品规格
|
|
|
+ spec?:string
|
|
|
+ // 物料名称
|
|
|
+ materialName?:string
|
|
|
+ //物料编码
|
|
|
+ materialNo?: string
|
|
|
+ // 序列号
|
|
|
+ seqNo?: string
|
|
|
+ //储位坐标
|
|
|
+ coordinate?:string
|
|
|
+ //仓库编号
|
|
|
+ houseNo?:string
|
|
|
+ //储位编号
|
|
|
+ locationNo?:string
|
|
|
+ //单位
|
|
|
+ unit?:string
|
|
|
+ //数量
|
|
|
+ num?:number
|
|
|
+ //批次号
|
|
|
+ batchCode?:string
|
|
|
|
|
|
+
|
|
|
+}
|
|
|
+export interface outboundRequestData {
|
|
|
+ index?:number
|
|
|
+ //产品规格
|
|
|
+ spec?:string
|
|
|
+ // 物料名称
|
|
|
+ materialName?:string
|
|
|
+ //物料编码
|
|
|
+ materialNo?: string
|
|
|
+ // 序列号
|
|
|
+ seqNo?: string
|
|
|
+ //储位坐标
|
|
|
+ coordinate?:string
|
|
|
+ //仓库编号
|
|
|
+ houseNo?:string
|
|
|
+ //储位编号
|
|
|
+ locationNo?:string
|
|
|
+ //单位
|
|
|
+ unit?:string
|
|
|
+ //数量
|
|
|
+ num?:number
|
|
|
+ //批次号
|
|
|
+ batchCode?:string
|
|
|
+ //载具编号
|
|
|
+ vehicleCode?:string
|
|
|
+ position?:string
|
|
|
+ housetype?:string
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
@CustomDialog
|
|
|
struct positionok {
|
|
|
+ // outboundData = async() : Promise<outboundDataclass[]> => {
|
|
|
+ // let obj:outboundDataclass[] = []
|
|
|
+ // let res = await StorageRequest.post("/api/v3/wmsOrder/outBox", {
|
|
|
+ // detailsList:this.outboundRequest,
|
|
|
+ // taskId:'1'
|
|
|
+ // })
|
|
|
+ // console.log('testTag', '********' + JSON.stringify(res))
|
|
|
+ // obj = JSON.parse(JSON.stringify(res))
|
|
|
+ // return obj
|
|
|
+ // }
|
|
|
+ //传进来
|
|
|
+ // aboutToAppear(){
|
|
|
+ // for (let index = 0; index < this.Mposition.length; index++) {
|
|
|
+ // let details: outboundRequestData = {}
|
|
|
+ // details.materialName = this.Mposition[index].materialName
|
|
|
+ // details.num=this.Mposition[index].num
|
|
|
+ // details.materialNo=this.Mposition[index].materialNo
|
|
|
+ // details.spec=this.Mposition[index].spec
|
|
|
+ // details.batchCode=this.Mposition[index].batchCode
|
|
|
+ // details.housetype='1'
|
|
|
+ // details.locationNo='1-3-2'
|
|
|
+ // details.houseNo='1'
|
|
|
+ // details.coordinate= '3-2'
|
|
|
+ // details.unit='个'
|
|
|
+ // details.vehicleCode='XL'+new Date().getTime()
|
|
|
+ // details.position='1'
|
|
|
+ // this.Mposition.push(details)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ @State private outboundRequest:Array<outboundRequestData>=[]
|
|
|
+ @Link private Mposition:Array< Materialpositionclass>
|
|
|
@Link code:string
|
|
|
@Link textValue: string
|
|
|
@Link inputValue: string
|
|
@@ -68,75 +221,86 @@ struct positionok {
|
|
|
// 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
|
|
|
cancel: () => void
|
|
|
confirm: () => void
|
|
|
- build(){
|
|
|
- Column(){
|
|
|
- Column({space:10}){
|
|
|
- Text('取出确认')
|
|
|
- .width('100%')
|
|
|
- .fontSize('51px')
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
- Row(){
|
|
|
- Text('是否取出'+this.code+'?')
|
|
|
- .width('100%')
|
|
|
- .fontSize('32px')
|
|
|
- }.width('80%')
|
|
|
- .height('60%')
|
|
|
- Row({space:5}){
|
|
|
- Text('取消')
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- .fontSize('32px')
|
|
|
- .width('48%')
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
- .height('100%')
|
|
|
- .fontColor('#0A59F7')
|
|
|
- .backgroundColor('#F1F3F5')
|
|
|
- .borderRadius(21)
|
|
|
- .onClick(()=>{
|
|
|
- this.controller.close()
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
- Text('确认')
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
- .fontSize('32px')
|
|
|
- .borderRadius(21)
|
|
|
- .textAlign(TextAlign.Center)
|
|
|
- .height('100%')
|
|
|
- .width('48%')
|
|
|
- .fontColor('#0A59F7')
|
|
|
- .backgroundColor('#F1F3F5')
|
|
|
- .onClick(()=>{
|
|
|
- this.controller.close()
|
|
|
- })
|
|
|
- }
|
|
|
- .justifyContent(FlexAlign.Center)
|
|
|
- .borderRadius(15)
|
|
|
- .width('80%')
|
|
|
+ build(){
|
|
|
+ Column(){
|
|
|
+ Column({space:10}){
|
|
|
+ Text('取出确认')
|
|
|
+ .width('100%')
|
|
|
+ .fontSize('51px')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ Row(){
|
|
|
+ Text('是否取出'+this.code+'?')
|
|
|
+ .width('100%')
|
|
|
+ .fontSize('32px')
|
|
|
+ }.width('80%')
|
|
|
+ .height('60%')
|
|
|
+ Row({space:5}){
|
|
|
+ Text('取消')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize('32px')
|
|
|
+ .width('48%')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .height('100%')
|
|
|
+ .fontColor('#0A59F7')
|
|
|
+ .backgroundColor('#F1F3F5')
|
|
|
+ .borderRadius(21)
|
|
|
+ .onClick(()=>{
|
|
|
+ this.controller.close()
|
|
|
+ })
|
|
|
+ Text('确认')
|
|
|
+ .fontWeight(FontWeight.Medium)
|
|
|
+ .fontSize('32px')
|
|
|
+ .borderRadius(21)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .height('100%')
|
|
|
+ .width('48%')
|
|
|
+ .fontColor('#0A59F7')
|
|
|
+ .backgroundColor('#F1F3F5')
|
|
|
+ .onClick(()=>{
|
|
|
+ // this. outboundData ().then((res : outboundRequestData[]) => {
|
|
|
+ // console.log('testTag', '入库数据成功'+JSON.stringify(res))
|
|
|
+ // if (res && res.length > 0) {
|
|
|
+ // //
|
|
|
+ // for (let index = 0; index < res.length; index++) {
|
|
|
+ // console.log('testTag', '-----------index' + index +'-----vehicleNo'+JSON.stringify(res))
|
|
|
+ // console.log('testTag', '-----------index' + index +'-----list'+JSON.stringify(res))
|
|
|
+ // }
|
|
|
+ // this. outboundRequest = res
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // console.log("4632957"+JSON.stringify(this.outboundRequest))
|
|
|
+ // this.controller.close()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .borderRadius(15)
|
|
|
+ .width('80%')
|
|
|
|
|
|
- .height('20%')
|
|
|
+ .height('20%')
|
|
|
|
|
|
|
|
|
- }.width('100%')
|
|
|
- .padding(10)
|
|
|
- .height('100%')
|
|
|
- .borderRadius(15)
|
|
|
- .backgroundColor('#FFFF')
|
|
|
- }.width("50%")
|
|
|
- .height("40%")
|
|
|
- .backgroundColor('#4d000000')
|
|
|
- }
|
|
|
+ }.width('100%')
|
|
|
+ .padding(10)
|
|
|
+ .height('100%')
|
|
|
+ .borderRadius(15)
|
|
|
+ .backgroundColor('#FFFF')
|
|
|
+ }.width("50%")
|
|
|
+ .height("40%")
|
|
|
+ .backgroundColor('#4d000000')
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
@CustomDialog
|
|
|
struct ChuKUA {
|
|
|
@State private Mposition:Array<Materialpositionclass>=[]
|
|
|
@State private SelectMaterial:Array<SelectMaterialslist>=[]
|
|
|
- @State material:string='物料名称001'
|
|
|
- @State taskno:string=''
|
|
|
-////确认弹窗
|
|
|
+ @State material:string=''
|
|
|
+ @State taskNo:string=''
|
|
|
+ ////确认弹窗
|
|
|
@State code:string=''
|
|
|
dialogController: CustomDialogController = new CustomDialogController({
|
|
|
builder: positionok({
|
|
|
+ Mposition:this.Mposition,
|
|
|
code:this.code,
|
|
|
textValue: $textValue,
|
|
|
inputValue: $inputValue
|
|
@@ -145,10 +309,20 @@ struct ChuKUA {
|
|
|
alignment: DialogAlignment.Center,
|
|
|
customStyle: true
|
|
|
})
|
|
|
+ Tasklistoutbound = async() : Promise<Tasklist[]> => {
|
|
|
+ let obj: Tasklist[] = []
|
|
|
+ let res = await StorageRequest.post("/api/v3/task/list", {
|
|
|
+ type: 2
|
|
|
+ })
|
|
|
+ console.log('testTag', 'Tasklist成功' + JSON.stringify(res))
|
|
|
+ obj = JSON.parse(JSON.stringify(res))
|
|
|
+ console.log('testTag', 'aaaaaaaa' +JSON.stringify(obj));
|
|
|
+ return obj
|
|
|
+ }
|
|
|
SelectMaterials = async() : Promise<SelectMaterialslist[]> => {
|
|
|
let res = await StorageRequest.post("/api/v3/task/page", {
|
|
|
pageNo: 1,
|
|
|
- taskNo:'CKD240307143155'
|
|
|
+ taskNo:this.taskNo
|
|
|
})
|
|
|
console.log('testTag', '********' + JSON.stringify(res))
|
|
|
let obj = JSON.parse(JSON.stringify(res))
|
|
@@ -158,41 +332,45 @@ struct ChuKUA {
|
|
|
}
|
|
|
///位置请求
|
|
|
Materialposition = async() : Promise< Materialpositionclass[]> => {
|
|
|
- let obj: Materialpositionclass[] = []
|
|
|
- let res = await StorageRequest.post("/api/v3/stock/list", {
|
|
|
- "materialName":this.material
|
|
|
- // "materialName":"物料名称001"
|
|
|
- })
|
|
|
- console.log('testTag', '111111成功' + JSON.stringify(res))
|
|
|
- obj = JSON.parse(JSON.stringify(res))
|
|
|
- console.log('testTag', 'aaaaaaaa' +JSON.stringify(obj));
|
|
|
- this.Mposition=obj
|
|
|
- return obj
|
|
|
-}
|
|
|
+ let obj: Materialpositionclass[] = []
|
|
|
+ let res = await StorageRequest.post("/api/v3/stock/list", {
|
|
|
+ "materialName":this.material
|
|
|
+ // "materialName":"物料名称001"
|
|
|
+ })
|
|
|
+ console.log('testTag', '111111成功' + JSON.stringify(res))
|
|
|
+ obj = JSON.parse(JSON.stringify(res))
|
|
|
+ console.log('testTag', 'aaaaaaaa' +JSON.stringify(obj));
|
|
|
+ this.Mposition=obj
|
|
|
+ return obj
|
|
|
+ }
|
|
|
aboutToAppear(){
|
|
|
|
|
|
- this.Materialposition().then((res :Materialpositionclass[]) => {
|
|
|
- console.log('testTag', 'result cccccc'+JSON.stringify(res))
|
|
|
- if (res && res.length > 0) {
|
|
|
- this.Mposition = res
|
|
|
- }
|
|
|
- })
|
|
|
- Tasklistoutbound().then((res : Tasklist[]) => {
|
|
|
- console.log('testTag', 'result cccccc'+JSON.stringify(res))
|
|
|
- if (res && res.length > 0) {
|
|
|
- this.Tasklistoutbound = res
|
|
|
- }
|
|
|
- })
|
|
|
- this.SelectMaterials().then((res : SelectMaterialslist[]) => {
|
|
|
+ this.Tasklistoutbound().then((res : Tasklist[]) => {
|
|
|
console.log('testTag', 'result cccccc'+JSON.stringify(res))
|
|
|
if (res && res.length > 0) {
|
|
|
- this.SelectMaterial = res
|
|
|
+ this.TasklistoutboundData = res
|
|
|
+ this.taskNo=this.TasklistoutboundData[0].taskNo
|
|
|
+ this.SelectMaterials().then((res : SelectMaterialslist[]) => {
|
|
|
+ console.log('testTag', 'result cccccc'+JSON.stringify(res))
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ this.SelectMaterial = res
|
|
|
+ this.material= this.SelectMaterial[0].materialName
|
|
|
+ this.Materialposition().then((res :Materialpositionclass[]) => {
|
|
|
+ console.log('testTag', 'result cccccc'+JSON.stringify(res))
|
|
|
+ if (res && res.length > 0) {
|
|
|
+ this.Mposition = res
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
- @State private Tasklistoutbound:Array<Tasklist>=[]
|
|
|
+ @State private TasklistoutboundData:Array<Tasklist>=[]
|
|
|
@Link CunQuHuo:number
|
|
|
|
|
|
scroller: Scroller = new Scroller()
|
|
@@ -241,7 +419,7 @@ struct ChuKUA {
|
|
|
Row({space:20}){
|
|
|
Column(){
|
|
|
Grid(this.scroller) {
|
|
|
- ForEach(this.Tasklistoutbound, (item:Tasklist ,index:number) => {
|
|
|
+ ForEach(this.TasklistoutboundData, (item:Tasklist ,index:number) => {
|
|
|
// ForEach(this.Number, (day: string) => {
|
|
|
GridItem() {
|
|
|
Row(){
|
|
@@ -296,7 +474,7 @@ struct ChuKUA {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.height('100%')
|
|
|
.onClick(()=>{
|
|
|
- this.taskno=item.taskNo
|
|
|
+ this.taskNo=item.taskNo
|
|
|
})
|
|
|
|
|
|
}
|
|
@@ -366,16 +544,12 @@ struct ChuKUA {
|
|
|
.height('30%')
|
|
|
.backgroundColor(this.SelectableMarkerOne===index?
|
|
|
$r('app.color.robot_set_card_blue'):$r('app.color.robot_set_card_white'))
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
.onClick(()=>{
|
|
|
- this.material= item.materialName
|
|
|
+ this.material= item.materialName
|
|
|
console.log('好了111111'+item.materialName)
|
|
|
- this.Materialposition()
|
|
|
+ // this.Materialposition()
|
|
|
this.SelectableMarkerOne=index
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -422,8 +596,6 @@ struct ChuKUA {
|
|
|
.fontWeight(FontWeight.Medium)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}.width('100%')
|
|
|
.padding(10)
|
|
|
.borderRadius(10)
|
|
@@ -431,8 +603,6 @@ struct ChuKUA {
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.height('100%')
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
.padding(10)
|
|
|
.borderRadius(10)
|
|
@@ -440,9 +610,11 @@ struct ChuKUA {
|
|
|
.backgroundColor(this.SelectableMarkertwo===index?
|
|
|
$r('app.color.robot_set_card_blue'):$r('app.color.robot_set_card_white'))
|
|
|
.onClick(()=>{
|
|
|
+
|
|
|
this.dialogController.open()
|
|
|
+
|
|
|
this.SelectableMarkertwo=index
|
|
|
- this.code= item.batchCode
|
|
|
+ this.code= item.batchCode
|
|
|
})
|
|
|
|
|
|
}
|
|
@@ -461,21 +633,12 @@ struct ChuKUA {
|
|
|
console.info(first.toString())
|
|
|
})
|
|
|
.width('100%')
|
|
|
-
|
|
|
.height('100%')
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}.width('37%')
|
|
|
.height('100%')
|
|
|
-
|
|
|
-
|
|
|
}.width('100%')
|
|
|
.height('75%')
|
|
|
.padding(10)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
Row(){
|
|
|
Image($r('app.media.close'))
|
|
|
|
|
@@ -483,9 +646,7 @@ struct ChuKUA {
|
|
|
.height('115px')
|
|
|
.onClick(()=>{
|
|
|
this.controller.close()
|
|
|
-
|
|
|
})
|
|
|
-
|
|
|
}.width('100%')
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.height('10%')
|