|
@@ -1,16 +1,21 @@
|
|
|
+import { AddAndSubtractComp } from '../common/component/AddAndSubtractComp';
|
|
|
import StorageRequest from '../common/util/request/StorageRequest';
|
|
|
import {ScanStorageclass}from './IntelligentWarehousingOutbound'
|
|
|
|
|
|
@CustomDialog
|
|
|
///无批次号物料详情弹窗
|
|
|
-struct Outbound {
|
|
|
- @Link value:number
|
|
|
- @State private items:Array<ScanStorageclass>=[]
|
|
|
- @Link CunQuHuo:number
|
|
|
+struct materialDetails {
|
|
|
+ @Link index:number
|
|
|
+ @Link batchCode:string
|
|
|
+ @Link materialName:string
|
|
|
+ // @State materialNo:string=''
|
|
|
+ @Link num:number
|
|
|
+ @Link seqNo:string
|
|
|
+ @Link spec:string
|
|
|
+ @Link materialNo:string
|
|
|
+ @Link private scanStorageList:Array<ScanStorageclass>
|
|
|
scroller: Scroller = new Scroller()
|
|
|
@State navigation:number=0
|
|
|
- @Link textValue: string
|
|
|
- @Link inputValue: string
|
|
|
controller: CustomDialogController
|
|
|
// 若尝试在CustomDialog中传入多个其他的Controller,以实现在CustomDialog中打开另一个或另一些CustomDialog,那么此处需要将指向自己的controller放在最后
|
|
|
cancel: () => void
|
|
@@ -39,20 +44,20 @@ 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')
|
|
|
.width('100%')
|
|
|
- Text('计划编号:'+'1231231231233')
|
|
|
+ Text('序列号:'+this.seqNo)
|
|
|
.fontSize($r('app.float.robot_state_font_size'))
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
@@ -79,18 +84,76 @@ struct Outbound {
|
|
|
.textAlign(TextAlign.Start)
|
|
|
.fontColor('#99000000')
|
|
|
.width('40%')
|
|
|
- Counter() {
|
|
|
- Text(this.value.toString())
|
|
|
-
|
|
|
- }
|
|
|
- .width('417px')
|
|
|
- .height('107px')
|
|
|
- .onInc(() => {
|
|
|
- this.value++
|
|
|
- })
|
|
|
- .onDec(() => {
|
|
|
- this.value--
|
|
|
+ // Counter() {
|
|
|
+ // Text(this.num.toString())
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ // .width('417px')
|
|
|
+ // .height('107px')
|
|
|
+ // .onInc(() => {
|
|
|
+ // 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.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,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ AddAndSubtractComp({
|
|
|
+ inputNum: this.num,
|
|
|
+ obj:this.scanStorageList[this.index],
|
|
|
+ editPropertyName: 'num',
|
|
|
+ upperLimit: 9999,
|
|
|
+ lowerLimit: 0,
|
|
|
+ addFunction: ()=>{
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ subFunction: ()=>{
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editFunction:()=>{
|
|
|
+ console.log("444--"+JSON.stringify(this.scanStorageList[this.index]))
|
|
|
+ this.scanStorageList[this.index]= {
|
|
|
+ materialName: this. scanStorageList[this.index].materialName,
|
|
|
+ num:this.scanStorageList[this.index].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,
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
+ .width('40%')
|
|
|
+ .height('20%')
|
|
|
}
|
|
|
|
|
|
}.width('50%')
|
|
@@ -128,7 +191,7 @@ struct Outbound {
|
|
|
struct buffer {
|
|
|
@State num:number=0
|
|
|
@State materialName:string=''
|
|
|
- @State itemCode:string='132451234'
|
|
|
+ @Link itemCode:string
|
|
|
ScanStorageCode= async(itemCode:string) : Promise<ScanStorageclass> => {
|
|
|
let obj: ScanStorageclass
|
|
|
let res = await StorageRequest.get("/api/v3/common/scanItem/"+itemCode)
|
|
@@ -352,16 +415,24 @@ struct buffer {
|
|
|
}
|
|
|
@Component
|
|
|
export struct ScanTheOutboundQRCode{
|
|
|
+ @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
|
|
|
+ @Link materialNo:string
|
|
|
@Link private scanStorageList:Array<ScanStorageclass>
|
|
|
-
|
|
|
scroller: Scroller = new Scroller()
|
|
|
MaterialRetrievalController: CustomDialogController = new CustomDialogController({
|
|
|
builder: buffer({
|
|
|
+ itemCode:this.materialNo,
|
|
|
scanStorageList:this.scanStorageList,
|
|
|
CunQuHuo:this.CunQuHuo,
|
|
|
textValue: $textValue,
|
|
@@ -371,6 +442,22 @@ export struct ScanTheOutboundQRCode{
|
|
|
gridCount: 4,
|
|
|
customStyle: true,
|
|
|
})
|
|
|
+ materialDetailsController: CustomDialogController = new CustomDialogController({
|
|
|
+ builder:materialDetails({
|
|
|
+ scanStorageList:this.scanStorageList,
|
|
|
+ index:this.index,
|
|
|
+ batchCode:this.batchCode,
|
|
|
+ materialName:this.materialName,
|
|
|
+ num:this.num,
|
|
|
+ seqNo:this.seqNo,
|
|
|
+ spec:this.spec,
|
|
|
+ materialNo:this.materialNo
|
|
|
+
|
|
|
+ }),
|
|
|
+ alignment: DialogAlignment.Bottom,
|
|
|
+ gridCount: 4,
|
|
|
+ customStyle: true,
|
|
|
+ })
|
|
|
build(){
|
|
|
Column(){
|
|
|
Row(){
|
|
@@ -398,7 +485,7 @@ export struct ScanTheOutboundQRCode{
|
|
|
///出库列表
|
|
|
Column({ space: 5 }) {
|
|
|
Grid(this.scroller) {
|
|
|
- ForEach(this.scanStorageList, (item:ScanStorageclass) => {
|
|
|
+ ForEach(this.scanStorageList, (item:ScanStorageclass,index:number) => {
|
|
|
// ForEach(this.Number, (day: string) => {
|
|
|
GridItem() {
|
|
|
Row(){
|
|
@@ -437,6 +524,14 @@ export struct ScanTheOutboundQRCode{
|
|
|
.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
|
|
|
+ this.materialDetailsController.open()
|
|
|
})
|
|
|
}
|
|
|
})
|