|
@@ -1,4 +1,6 @@
|
|
|
import StorageRequest from '../common/util/request/StorageRequest';
|
|
|
+import detailsList from '../model/DetailsList';
|
|
|
+import taskSheetInformation from '../model/TaskSheetInformation';
|
|
|
export interface Tasklist {
|
|
|
|
|
|
//批次号
|
|
@@ -61,6 +63,7 @@ export interface Tasklist {
|
|
|
}
|
|
|
export interface ScanStorageclass {
|
|
|
//批次号
|
|
|
+ spec?:string
|
|
|
//已经占用箱数
|
|
|
useNum?:number
|
|
|
//空箱数
|
|
@@ -110,7 +113,7 @@ export interface ScanStorageclass {
|
|
|
batchCode?:string
|
|
|
}
|
|
|
export interface SelectMaterialslist {
|
|
|
-
|
|
|
+ detailsList?:taskSheetInformation[]
|
|
|
//批次号
|
|
|
batchCode?: string;
|
|
|
///完成数量
|
|
@@ -224,6 +227,119 @@ 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 detailsListvlass {
|
|
|
+ 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
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+export interface ScanStorageCodeClass {
|
|
|
+ detailsList?:detailsList[]
|
|
|
+ //批次号
|
|
|
+ index?:number
|
|
|
+ //已经占用箱数
|
|
|
+ useNum?:number
|
|
|
+ //空箱数
|
|
|
+ emptyBoxNum?:string
|
|
|
+ //产品规格
|
|
|
+ spec?: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
|
|
|
+ planNo?: string
|
|
|
+ position?: string
|
|
|
+ // 序列号
|
|
|
+ seqNo?: string
|
|
|
+ // 状态;1-待处理;2-处理中;3-处理异常;4-已完成
|
|
|
+ state?:string
|
|
|
+ // 库存数量
|
|
|
+ stockNum?:string
|
|
|
+ //出入库任务单号
|
|
|
+ taskNo?: string
|
|
|
+ unit?:string
|
|
|
+ updated?: string
|
|
|
+ //任务名称
|
|
|
+ taskName?:string
|
|
|
+ updator?: string
|
|
|
+ vehicleNo?: string
|
|
|
+ batchCode?:string
|
|
|
+}
|
|
|
import {ScanTheOutboundQRCode}from './ScanTheOutboundQRCode'
|
|
|
export class selectWorkstationList{
|
|
|
workstation?:string
|
|
@@ -249,7 +365,7 @@ export class selectWorkstationList{
|
|
|
// //
|
|
|
// // }
|
|
|
// // @State private Tasklistoutbound:Array<Tasklist>=[]
|
|
|
-// @Link private ScanStoragelist:Array<ScanStorageclass>
|
|
|
+// @Link private scanStorageList:Array<ScanStorageclass>
|
|
|
// @Link CunQuHuo:number
|
|
|
// scroller: Scroller = new Scroller()
|
|
|
// @State navigation:number=0
|
|
@@ -275,7 +391,7 @@ export class selectWorkstationList{
|
|
|
// .fontColor('#99000000')
|
|
|
// Column(){
|
|
|
// Grid(this.scroller) {
|
|
|
-// ForEach(this.ScanStoragelist, (item:ScanStorageclass) => {
|
|
|
+// ForEach(this.scanStorageList, (item:ScanStorageclass) => {
|
|
|
// // ForEach(this.Number, (day: string) => {
|
|
|
// GridItem() {
|
|
|
// Row(){
|
|
@@ -537,13 +653,179 @@ struct materialLocation {
|
|
|
// dialog默认的borderRadius为24vp,如果需要使用border属性,请和borderRadius属性一起使用。
|
|
|
}
|
|
|
}
|
|
|
+@CustomDialog
|
|
|
+ ///入库确认弹框
|
|
|
+struct bufferf {
|
|
|
+
|
|
|
+ @State index:number=0
|
|
|
+ outboundData = async() : Promise<outboundDataclass[]> => {
|
|
|
+ let obj:outboundDataclass[] = []
|
|
|
+ let res = await StorageRequest.post("/api/v3/wmsOrder/confirm", {
|
|
|
+ detailsList:this.ScanStoragecode,
|
|
|
+ taskId:'2'
|
|
|
+ })
|
|
|
+ console.log('testTag', '********' + JSON.stringify(res))
|
|
|
+ obj = JSON.parse(JSON.stringify(res))
|
|
|
+ return obj
|
|
|
+ }
|
|
|
+ // @State private ScanStoragecode:Array<outboundDataclass>=[]
|
|
|
+ @State private ScanStoragecode:Array<detailsListvlass>=[]
|
|
|
+ aboutToAppear(){
|
|
|
+ for (let index = 0,vehicleCode=0; index < this.ScanStoragecodelist.length; index++) {
|
|
|
+ let details: detailsListvlass = {}
|
|
|
+ details.materialName = this.ScanStoragecodelist[index].materialName
|
|
|
+ details.num=this.ScanStoragecodelist[index].num
|
|
|
+ details.materialNo=this.ScanStoragecodelist[index].materialNo
|
|
|
+ details.spec=this.ScanStoragecodelist[index].spec
|
|
|
+ details.batchCode=this.ScanStoragecodelist[index].batchCode
|
|
|
+ details.housetype='1'
|
|
|
+ details.locationNo='1-3-1'
|
|
|
+ details.houseNo='1'
|
|
|
+ details.coordinate= '3-1'
|
|
|
+ details.unit='个'
|
|
|
+ details.vehicleCode='ZJ008'
|
|
|
+ details.position='1'
|
|
|
+ this.ScanStoragecode.push(details)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ @State private outboundDataList:Array<outboundDataclass>=[]
|
|
|
+ @Link private ScanStoragecodelist:Array<ScanStorageCodeClass>
|
|
|
+ @Link CunQuHuo:number
|
|
|
+ scroller: Scroller = new Scroller()
|
|
|
+ @State navigation:number=0
|
|
|
+ @Link textValue: string
|
|
|
+ @Link inputValue: string
|
|
|
+ controller: CustomDialogController
|
|
|
+ // 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
|
|
|
+ cancel: () => void
|
|
|
+ confirm: () => void
|
|
|
+ build() {
|
|
|
+ Column() {
|
|
|
+ Column({space:5}){
|
|
|
+ Text('本次出库')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .width('100%')
|
|
|
+ .height('10%')
|
|
|
+ .fontSize('51px')
|
|
|
+ Text('LX22112233221122')
|
|
|
+ .width('100%')
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .fontSize('27px')
|
|
|
+ .height('5%')
|
|
|
+ .fontColor('#99000000')
|
|
|
+ Column(){
|
|
|
+ Grid(this.scroller) {
|
|
|
+ ForEach(this.ScanStoragecodelist, (item:ScanStorageCodeClass,index) => {
|
|
|
+ GridItem() {
|
|
|
+ Row(){
|
|
|
+ Column(){
|
|
|
+ Text(item.materialName)
|
|
|
+ .fontSize('32px')
|
|
|
+ Text(item.seqNo)
|
|
|
+ .fontSize('27px')
|
|
|
+
|
|
|
+ }.width('90%')
|
|
|
+ .padding(10)
|
|
|
+ .borderRadius(10)
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ .height('100%')
|
|
|
+ .backgroundColor('#fff')
|
|
|
+ Row(){
|
|
|
+ Text(item.num.toString())
|
|
|
+ . fontSize('51px')
|
|
|
+ Text('个')
|
|
|
+ .fontSize('32px')
|
|
|
+ }
|
|
|
+ }.width('100%')
|
|
|
+ .height('16%')
|
|
|
+ .borderRadius(10)
|
|
|
+ .backgroundColor('#fff')
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ .padding(10)
|
|
|
+ .columnsTemplate('1fr')
|
|
|
+ .columnsGap(10)
|
|
|
+ .rowsGap(10)
|
|
|
+ .onScrollIndex((first: number) => {
|
|
|
+ console.info(first.toString())
|
|
|
+ })
|
|
|
+ .width('100%')
|
|
|
+ .height('100%')
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }.width('95%')
|
|
|
+ .padding(10)
|
|
|
+ .height('60%')
|
|
|
+ .border({width:1,color: '#33000000' })
|
|
|
+ .borderRadius(15)
|
|
|
+ Blank()
|
|
|
+ Row({space:10}){
|
|
|
+ Text('取消')
|
|
|
+ .width('35%')
|
|
|
+ .height('70%')
|
|
|
+ .borderRadius(40)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .fontColor('#0A59F7')
|
|
|
+ .backgroundColor('#0f000000')
|
|
|
+ .onClick(()=>{
|
|
|
+ this.controller.close()
|
|
|
+ })
|
|
|
+ Text('确认出库')
|
|
|
+ .width('35%')
|
|
|
+ .height('70%')
|
|
|
+ .borderRadius(40)
|
|
|
+ .textAlign(TextAlign.Center)
|
|
|
+ .fontColor('#FFFFFF')
|
|
|
+ .backgroundColor('#0A59F7')
|
|
|
+ .onClick(()=>{
|
|
|
+ this.controller.close()
|
|
|
+ this.CunQuHuo=2
|
|
|
+ this. outboundData ().then((res : outboundDataclass[]) => {
|
|
|
+ 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. outboundDataList = res
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log("4632957"+JSON.stringify(this.outboundDataList))
|
|
|
+ })
|
|
|
+ }.width('100%')
|
|
|
+ .height('15%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+ Blank()
|
|
|
+
|
|
|
+
|
|
|
+ }.width('50%')
|
|
|
+ .height('70%')
|
|
|
+ .backgroundColor('#ffff')
|
|
|
+ .borderRadius(20)
|
|
|
+
|
|
|
+ }.width('100%')
|
|
|
+ .backgroundColor('#4d000000')
|
|
|
+ .height('100%')
|
|
|
+ .justifyContent(FlexAlign.Center)
|
|
|
+
|
|
|
+ // dialog默认的borderRadius为24vp,如果需要使用border属性,请和borderRadius属性一起使用。
|
|
|
+ }
|
|
|
+}
|
|
|
@Entry
|
|
|
@Component
|
|
|
export struct IntelligentWarehousingOutbound{
|
|
|
@State private Mposition:Array<Materialpositionclass>=[]
|
|
|
@State material:string=''
|
|
|
@State SelectableMarkerOne:number=0
|
|
|
-
|
|
|
@State selectWorkstation:number=0
|
|
|
@State workstation:string=''
|
|
|
@State button:number=0
|
|
@@ -552,7 +834,7 @@ export struct IntelligentWarehousingOutbound{
|
|
|
@State rightButtonTop:number=0
|
|
|
@State rightButtonBottom:number=0
|
|
|
@State private SelectMaterial:Array<SelectMaterialslist>=[]
|
|
|
- @State private ScanStoragelist:Array<ScanStorageclass>=[]
|
|
|
+ @State private scanStorageList:Array<ScanStorageclass>=[]
|
|
|
@State textValue: string = ''
|
|
|
@State inputValue: string = ''
|
|
|
@State ZhuangTai:number=0
|
|
@@ -560,6 +842,7 @@ export struct IntelligentWarehousingOutbound{
|
|
|
@State SelectableMarker:number=0
|
|
|
scroller: Scroller = new Scroller()
|
|
|
@State taskNo:string=''
|
|
|
+ @State private ScanStoragecode:Array<detailsListvlass>=[]
|
|
|
@State private TasklistoutboundData:Array<Tasklist>=[]
|
|
|
//任务单请求
|
|
|
Tasklistoutbound = async() : Promise<Tasklist[]> => {
|
|
@@ -575,14 +858,26 @@ export struct IntelligentWarehousingOutbound{
|
|
|
}
|
|
|
//根据任务单里的物料编码请求
|
|
|
SelectMaterials = async() : Promise<SelectMaterialslist[]> => {
|
|
|
- let res = await StorageRequest.post("/api/v3/task/page", {
|
|
|
- taskNo:this.taskNo
|
|
|
+ let res = await StorageRequest.post("/api/v3/task/get", {
|
|
|
+ id:2,
|
|
|
+ type:2
|
|
|
})
|
|
|
console.log('testTag', '********' + JSON.stringify(res))
|
|
|
let obj = JSON.parse(JSON.stringify(res))
|
|
|
- console.log('testTag', 'aaaaaaaa' +JSON.stringify(obj.records));
|
|
|
+ console.log('testTag', 'aaaaaaaa' +JSON.stringify(obj.detailsList));
|
|
|
this.SelectMaterial=obj
|
|
|
- return obj.records
|
|
|
+ return obj.detailsList
|
|
|
+ }
|
|
|
+ //出库确认数据
|
|
|
+ outboundData = async() : Promise<outboundDataclass[]> => {
|
|
|
+ let obj:outboundDataclass[] = []
|
|
|
+ let res = await StorageRequest.post("/api/v3/wmsOrder/inBox", {
|
|
|
+ detailsList:this.ScanStoragecode,
|
|
|
+ taskId:'1'
|
|
|
+ })
|
|
|
+ console.log('testTag', '********' + JSON.stringify(res))
|
|
|
+ obj = JSON.parse(JSON.stringify(res))
|
|
|
+ return obj
|
|
|
}
|
|
|
//打开页面执行任务单请求
|
|
|
aboutToAppear(){
|
|
@@ -594,6 +889,22 @@ export struct IntelligentWarehousingOutbound{
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ WarehousingbufferhopperController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder:bufferf({
|
|
|
+ ScanStoragecodelist:this.scanStorageList,
|
|
|
+ CunQuHuo:this.CunQuHuo,
|
|
|
+
|
|
|
+ textValue: $textValue,
|
|
|
+ inputValue: $inputValue,
|
|
|
+ }),
|
|
|
+
|
|
|
+ // gridCount: 3,
|
|
|
+ //autoCancel: true,
|
|
|
+ alignment: DialogAlignment.Center,
|
|
|
+ //offset: { dx: 0, dy: -20 },
|
|
|
+ gridCount: 4,
|
|
|
+ customStyle: true,
|
|
|
+ })
|
|
|
OutboundController: CustomDialogController = new CustomDialogController({
|
|
|
builder: Outbound({
|
|
|
selectWorkstation:$selectWorkstation,
|
|
@@ -644,30 +955,24 @@ build(){
|
|
|
.height('20%')
|
|
|
Row(){
|
|
|
Column(){
|
|
|
- Text('产品型号:'+item.taskNo)
|
|
|
- .fontSize($r('app.float.robot_state_font_size'))
|
|
|
- .textAlign(TextAlign.Start)
|
|
|
- .fontColor('#99000000')
|
|
|
- .width('100%')
|
|
|
- .height('20%')
|
|
|
Text('计划编号:'+item.relPlanNo)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
|
.width('100%')
|
|
|
- .height('20%')
|
|
|
+ .height('25%')
|
|
|
Text('订单编号:'+item.relOrderNo)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
|
.width('100%')
|
|
|
- .height('20%')
|
|
|
- Text('出库单号:'+item.relOutOrderNo)
|
|
|
+ .height('25%')
|
|
|
+ Text('出库单号:'+item.taskNo)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
|
.width('100%')
|
|
|
- .height('20%')
|
|
|
+ .height('25%')
|
|
|
Row(){
|
|
|
Text('取料进度:'+item.progress)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
@@ -682,7 +987,7 @@ build(){
|
|
|
.width('50%')
|
|
|
.height('100%')
|
|
|
}.width('100%')
|
|
|
- .height('20%')
|
|
|
+ .height('25%')
|
|
|
}
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
.width('100%')
|
|
@@ -1050,6 +1355,14 @@ build(){
|
|
|
.textAlign(TextAlign.Center)
|
|
|
.backgroundColor(this.button===0?$r('app.color.process_nameplate_grey_color'):'#0A59F7')
|
|
|
.height('20%')
|
|
|
+ .onClick(()=>{
|
|
|
+ if (this.button===1||this.button===2||this.button===3||this.button===4) {
|
|
|
+ this.WarehousingbufferhopperController.open()
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
}.width('22%')
|
|
|
.height('90%')
|
|
|
.alignItems(HorizontalAlign.Center)
|
|
@@ -1057,37 +1370,7 @@ build(){
|
|
|
}.width('96%')
|
|
|
.height('40%')
|
|
|
Column(){
|
|
|
- ScanTheOutboundQRCode({ScanStoragelist:this.ScanStoragelist})
|
|
|
- // Row(){
|
|
|
- // Blank()
|
|
|
- // ////扫码物料采集
|
|
|
- // OutboundScanCode({ScanStoragelist:this.ScanStoragelist})
|
|
|
- // Blank()
|
|
|
- // Row(){
|
|
|
- // if (this.ZhuangTai===1){
|
|
|
- // Text('已选1号位LX8347259')
|
|
|
- // }else if (this.ZhuangTai===2){
|
|
|
- // Text('已选2号位XP834539')
|
|
|
- // }
|
|
|
- // else if (this.ZhuangTai===3){
|
|
|
- // Text('已选3号位PX834539')
|
|
|
- // }
|
|
|
- // else if (this.ZhuangTai===4){
|
|
|
- // Text('已选4号位FLQ234539')
|
|
|
- // }
|
|
|
- // }
|
|
|
- // .width('52%')
|
|
|
- // .borderRadius(15)
|
|
|
- // .height('100%')
|
|
|
- // }.width('100%')
|
|
|
- // .borderRadius(15)
|
|
|
- // .height('8%')
|
|
|
- // Column(){
|
|
|
- // ///出库列表
|
|
|
- // OutboundList()
|
|
|
- // }.width('100%')
|
|
|
- // .alignItems(HorizontalAlign.Start)
|
|
|
- // .height('46%')
|
|
|
+ ScanTheOutboundQRCode({scanStorageList:this.scanStorageList})
|
|
|
}.width('100%')
|
|
|
.height('54%')
|
|
|
}
|