|
@@ -1,23 +1,29 @@
|
|
|
import StorageRequest from '../common/util/request/StorageRequest';
|
|
|
import { ScanStorageCodeClass } from './IntelligentStorageWarehousing';
|
|
|
|
|
|
-class Item{
|
|
|
- name:string
|
|
|
- id:string
|
|
|
- text:string
|
|
|
- type:string
|
|
|
- constructor( name:string,id:string,text:string,type:string) {
|
|
|
- this.name=name
|
|
|
- this.type=type
|
|
|
- this.id=id
|
|
|
- this.text=text
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
@CustomDialog
|
|
|
///无批次号物料详情弹窗
|
|
|
-struct Outbound {
|
|
|
- @Link value:number
|
|
|
- @State private items:Array<ScanStorageCodeClass>=[]
|
|
|
+struct batchNumberPopupBox {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Link private ScanStoragelist:Array<ScanStorageCodeClass>
|
|
|
+ @Link index:number
|
|
|
+ //物料批次号用于弹窗接收修改
|
|
|
+ @Link batchCode:string
|
|
|
+ //物料名称用于窗接收修改
|
|
|
+ @Link materialName:string
|
|
|
+ @Link materialNo:string
|
|
|
+ @Link num:number
|
|
|
+ //物料序列号用于窗接收修改
|
|
|
+ @Link seqNo:string
|
|
|
+ //物料规格描述用于窗接收修改
|
|
|
+ @Link spec:string
|
|
|
+ // @Link value:number=this.num
|
|
|
+ // @State private items:Array<ScanStorageCodeClass>=[]
|
|
|
@Link CunQuHuo:number
|
|
|
scroller: Scroller = new Scroller()
|
|
|
@State navigation:number=0
|
|
@@ -51,15 +57,15 @@ struct Outbound {
|
|
|
.height('20%')
|
|
|
.fontSize('51px')
|
|
|
Column({space:10}){
|
|
|
- Text('PCBA-ASSSD电路板')
|
|
|
+ Text(this.materialName)
|
|
|
.fontSize('32px')
|
|
|
.width('100%')
|
|
|
- Text('100*200')
|
|
|
+ Text(this.spec)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
|
.width('100%')
|
|
|
- Text('批次号:'+'1223341232123124121')
|
|
|
+ Text('批次号:'+this.batchCode)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
@@ -92,16 +98,32 @@ struct Outbound {
|
|
|
.fontColor('#99000000')
|
|
|
.width('40%')
|
|
|
Counter() {
|
|
|
- Text(this.value.toString())
|
|
|
+ Text(this.num.toString())
|
|
|
|
|
|
}
|
|
|
.width('417px')
|
|
|
.height('107px')
|
|
|
.onInc(() => {
|
|
|
- this.value++
|
|
|
+ this.num++
|
|
|
+ this.ScanStoragelist[this.index]= {
|
|
|
+ materialName: this.ScanStoragelist[this.index].materialName,
|
|
|
+ num:this.num,
|
|
|
+ materialNo:this.ScanStoragelist[this.index].materialNo,
|
|
|
+ batchCode:this.ScanStoragelist[this.index].batchCode,
|
|
|
+ seqNo:this.ScanStoragelist[this.index].seqNo,
|
|
|
+ spec:this.ScanStoragelist[this.index].spec,
|
|
|
+ }
|
|
|
})
|
|
|
.onDec(() => {
|
|
|
- this.value--
|
|
|
+ this.num--
|
|
|
+ this.ScanStoragelist[this.index]= {
|
|
|
+ materialName: this.ScanStoragelist[this.index].materialName,
|
|
|
+ num:this.num,
|
|
|
+ materialNo:this.ScanStoragelist[this.index].materialNo,
|
|
|
+ batchCode:this.ScanStoragelist[this.index].batchCode,
|
|
|
+ seqNo:this.ScanStoragelist[this.index].seqNo,
|
|
|
+ spec:this.ScanStoragelist[this.index].spec,
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -137,18 +159,20 @@ struct Outbound {
|
|
|
}
|
|
|
@CustomDialog
|
|
|
///物料详情弹窗
|
|
|
-struct Outboundtwo {
|
|
|
- private items:Array<Item>=[
|
|
|
- new Item('大号螺丝','100*200','50','1'),
|
|
|
- new Item('PCPA板','PCPA-ADSA-2344','5',''),
|
|
|
- new Item('大号螺丝','100*200','50','1'),
|
|
|
- new Item('大号螺丝','100*200','50','1'),
|
|
|
- new Item('PCPA板','PCPA-ADSA-2344','5',''),
|
|
|
- new Item('PCPA板','PCPA-ADSA-2344','5',''),
|
|
|
- new Item('PCPA板','PCPA-ADSA-2344','5',''),
|
|
|
- new Item('大号螺丝','100*200','50','1'),
|
|
|
- new Item('大号螺丝','100*200','50','1'),
|
|
|
- ]
|
|
|
+struct materialDetails {
|
|
|
+ @Link private ScanStoragelist:Array<ScanStorageCodeClass>
|
|
|
+
|
|
|
+ //物料批次号用于弹窗接收修改
|
|
|
+ @Link batchCode:string
|
|
|
+ //物料名称用于窗接收修改
|
|
|
+ @Link materialName:string
|
|
|
+ @Link materialNo:string
|
|
|
+ @Link num:number
|
|
|
+ //物料序列号用于窗接收修改
|
|
|
+ @Link seqNo:string
|
|
|
+ //物料规格描述用于窗接收修改
|
|
|
+ @Link spec:string
|
|
|
+
|
|
|
@Link CunQuHuo:number
|
|
|
scroller: Scroller = new Scroller()
|
|
|
@State navigation:number=0
|
|
@@ -234,7 +258,7 @@ struct Outboundtwo {
|
|
|
.height('20%')
|
|
|
Column(){
|
|
|
Grid(this.scroller) {
|
|
|
- ForEach(this.items, (item:Item) => {
|
|
|
+ ForEach(this.ScanStoragelist, (item:ScanStorageCodeClass) => {
|
|
|
// ForEach(this.Number, (day: string) => {
|
|
|
GridItem() {
|
|
|
Row(){
|
|
@@ -533,15 +557,33 @@ struct buffer {
|
|
|
|
|
|
@Component
|
|
|
export struct ScanTheStorageCode{
|
|
|
+ @State index:number=0
|
|
|
+ //物料批次号用于传给弹窗修改
|
|
|
+ @State batchCode:string=''
|
|
|
+ //物料名称用于传给弹窗修改
|
|
|
+ @State materialName:string=''
|
|
|
+ @State materialNo:string=''
|
|
|
+ @State num:number=0
|
|
|
+ //物料序列号用于传给弹窗修改
|
|
|
+ @State seqNo:string=''
|
|
|
+ //物料规格描述用于传给弹窗修改
|
|
|
+ @State spec:string=''
|
|
|
+
|
|
|
@State textValue: string = ''
|
|
|
@State inputValue: string = ''
|
|
|
@State value:number=0
|
|
|
@State ZhuangTai:number=0
|
|
|
@State CunQuHuo:number=0
|
|
|
OutboundControllertwo: CustomDialogController = new CustomDialogController({
|
|
|
- builder:Outboundtwo({
|
|
|
+ builder:materialDetails({
|
|
|
+ ScanStoragelist:this.ScanStoragelist,
|
|
|
CunQuHuo:this.CunQuHuo,
|
|
|
-
|
|
|
+ spec:this.spec,
|
|
|
+ materialNo:this.materialNo,
|
|
|
+ materialName:this.materialName,
|
|
|
+ num:this.num,
|
|
|
+ seqNo:this.seqNo,
|
|
|
+ batchCode:this.batchCode,
|
|
|
textValue: $textValue,
|
|
|
inputValue: $inputValue,
|
|
|
}),
|
|
@@ -552,8 +594,16 @@ export struct ScanTheStorageCode{
|
|
|
})
|
|
|
//////物料详情弹窗控制器
|
|
|
OutboundController: CustomDialogController = new CustomDialogController({
|
|
|
- builder:Outbound({
|
|
|
- value:this.value,
|
|
|
+ builder:batchNumberPopupBox({
|
|
|
+ index:this.index,
|
|
|
+ ScanStoragelist:this.ScanStoragelist,
|
|
|
+ spec:this.spec,
|
|
|
+ materialNo:this.materialNo,
|
|
|
+ materialName:this.materialName,
|
|
|
+ num:this.num,
|
|
|
+ seqNo:this.seqNo,
|
|
|
+ batchCode:this.batchCode,
|
|
|
+ //value:this.value,
|
|
|
CunQuHuo:this.CunQuHuo,
|
|
|
textValue: $textValue,
|
|
|
inputValue: $inputValue,
|
|
@@ -614,8 +664,7 @@ export struct ScanTheStorageCode{
|
|
|
///入库列表
|
|
|
Column({ space: 5 }) {
|
|
|
Grid(this.scroller) {
|
|
|
- ForEach(this.ScanStoragelist, (item:ScanStorageCodeClass) => {
|
|
|
- // ForEach(this.Number, (day: string) => {
|
|
|
+ ForEach(this.ScanStoragelist, (item:ScanStorageCodeClass,index) => {
|
|
|
GridItem() {
|
|
|
Row(){
|
|
|
Column(){
|
|
@@ -638,9 +687,9 @@ export struct ScanTheStorageCode{
|
|
|
.height('100%')
|
|
|
.backgroundColor('#fff')
|
|
|
Column(){
|
|
|
- Image($r('app.media.jiaobiao'))
|
|
|
- .width('27px')
|
|
|
- .height('27px')
|
|
|
+ Image($r('app.media.subscript'))
|
|
|
+ .width($r('app.float.storage_set_image_effect_height'))
|
|
|
+ .height($r('app.float.storage_set_image_effect_height'))
|
|
|
|
|
|
}.width('10%')
|
|
|
.justifyContent(FlexAlign.End)
|
|
@@ -651,6 +700,13 @@ export struct ScanTheStorageCode{
|
|
|
.borderRadius(10)
|
|
|
.backgroundColor('#fff')
|
|
|
.onClick(()=>{
|
|
|
+ this.index=index
|
|
|
+ this.batchCode=item.batchCode
|
|
|
+ this.materialName=item.materialName
|
|
|
+ this.materialNo=item.materialNo
|
|
|
+ this.num=item.num
|
|
|
+ this.seqNo=item.seqNo
|
|
|
+ this.spec=item.spec
|
|
|
item.batchCode===''?this.OutboundControllertwo.open():this.OutboundController.open()
|
|
|
})
|
|
|
}
|