Commit 8b6bacb6 by 陈桂东

commit

parent 0208e8a4
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { TitleBar } from '../../view/title/TitleBar'
import router from '@ohos.router'
interface Type {
type: "wait" | "unclaimed" | "received"
}
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2).borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(10)
.type(ButtonType.Normal)
.stateEffect(true)
}
@Entry
@Component
export struct Pack {
@State type: string = ''
aboutToAppear(){
let params = router.getParams() as Type;
this.type = params.type
}
build(){
Column(){
Flex({direction:FlexDirection.Column}){
TitleBar({ title:"包裹信息查询" })
Row(){
Flex({justifyContent:FlexAlign.SpaceAround}) {
if(this.type == 'wait') {
TextInput({placeholder:"请输入包裹信息"}).width('50%')
Button("接收").CommonButtonStyle()
Button("上架").CommonButtonStyle()
}
if(this.type == 'unclaimed') {
TextInput({placeholder:"请输入包裹信息"}).width('50%')
Button("导出").CommonButtonStyle()
Button("打印面单").CommonButtonStyle()
}
if(this.type == 'received') {
TextInput({placeholder:"请输入包裹信息"}).width('70%')
Button("导出").CommonButtonStyle()
}
}
}.padding({top:20})
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
}
}.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1.0], [0xc7d799, 2.0]]
})
}
}
\ No newline at end of file
import { BasicTable } from '../../view/BasicTable/BasicTable' import { BasicTable } from '../../view/BasicTable/BasicTable'
import { TitleBar } from '../../view/title/TitleBar' import { TitleBar } from '../../view/title/TitleBar'
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(10)
.type(ButtonType.Normal)
.stateEffect(true)
}
@Entry @Entry
@Component @Component
export struct Pick { export struct Pick {
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "取件" })
Row() {
Flex({justifyContent:FlexAlign.Center}){
TextInput({ placeholder: "请输入取件码或者手机后四位查询" }).width('80%').height(45).backgroundColor('#fff')
}
}.margin({ top: 20 })
build(){ Column() {
Column(){ BasicTable({ dataSource: [] })
Flex({direction:FlexDirection.Column}){
TitleBar({ title:"取件" })
TextInput({placeholder:"请输入取件码或者手机后四位查询"}).width('80%').padding({top:10,bottom:10})
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1) }.flexGrow(1)
Row(){
Flex({justifyContent:FlexAlign.SpaceAround}){ Row() {
Button("打印面单").width("15%") Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button("扫码取件").width("15%") Button("打印面单").CommonButtonStyle()
Button("手动取件").width("15%") Button("扫码取件").CommonButtonStyle()
Button("手动取件").CommonButtonStyle()
} }
}.height(80) }.height(80).backgroundColor('#97c6a6')
} }
} }.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1.0], [0xc7d799, 2.0]]
})
} }
} }
\ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"src": [ "src": [
"pages/SplashPage", "pages/SplashPage",
"pages/MainPage", "pages/MainPage",
"pages/package/Pick" "pages/package/Pick",
"pages/package/Pack"
] ]
} }
import router from '@ohos.router' import router from '@ohos.router'
@Entry
@Component @Component
export struct PageManagement { export struct PageManagement {
@State fontColor: string = '#182431'
@State selectedFontColor: string = '#007DFF'
@State currentIndex: number = 0 @State currentIndex: number = 0
private controller: TabsController = new TabsController() private controller: TabsController = new TabsController()
@Builder TabBuilder(index: number, name: string) { @Builder TabBuilder(index: number, name: string) {
Column() { Column() {
Text(name) Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(16) .fontSize(16)
.fontWeight(this.currentIndex === index ? 500 : 400) .fontWeight(this.currentIndex === index ? 500 : 400)
.lineHeight(22) .lineHeight(22)
...@@ -24,67 +22,108 @@ export struct PageManagement { ...@@ -24,67 +22,108 @@ export struct PageManagement {
build() { build() {
Column() { Column() {
Column(){ Flex({ direction: FlexDirection.Column }) {
TextInput({ placeholder: '请输入订单号查询' }) Column() {
.backgroundColor("#fff").width('80%') TextInput({ placeholder: '请输入订单号查询' })
}.backgroundColor("#0fa983").width('100%').height(70) .backgroundColor("#fff").width('80%').margin({top:16})
Image($r("app.media.banner")).width('100%') }.backgroundColor("#0fa983").width('100%').height(70)
Image($r("app.media.banner")).width('100%')
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly }) {
Row() {
Column() {
Image($r("app.media.qj")).width(30).margin({ top: 15 })
Text("取件").margin({ top: 10 }).fontWeight(600).fontSize(18)
Text("仓库取件").margin({ bottom: 10, top: 10 }).fontSize(12)
}
}.width("45%").backgroundColor('#f8fdfc').justifyContent(FlexAlign.Center).onClick(() => {
router.pushUrl({ url: "pages/package/Pick" })
})
Row() {
Column() {
Image($r("app.media.cx")).width(42).margin({ top: 15 })
Text("包裹查询").margin({ top: 10 }).fontWeight(600).fontSize(18)
Text("单号一键查询").margin({ bottom: 10, top: 10 }).fontSize(12)
}
}.width("45%").backgroundColor('#f8fdfc').justifyContent(FlexAlign.Center).onClick(() => {
router.pushUrl({ url: "pages/package/Pack", params: {
type: "received"
} })
})
}
}.margin({ top: 20 })
Row(){ Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
Flex({justifyContent:FlexAlign.SpaceEvenly}){ TabContent() {
Row(){ Column() {
Column(){ Image($r('app.media.express')).width(60)
Image($r("app.media.qj")).width(30).margin({top:15}) Text("暂无最新上架订单信息").margin({ top: 15 })
Text("取件").margin({top:15}).fontWeight(600).fontSize(18)
Text("仓库取件").margin({bottom:15,top:15}).fontSize(13)
} }
}.width("45%").backgroundColor('#f8fdfc').justifyContent(FlexAlign.Center).onClick(() => {
router.pushUrl({url:"pages/package/Pick"})
})
Row(){ }.tabBar(this.TabBuilder(0, '最新上架'))
Column(){
Image($r("app.media.cx")).width(42).margin({top:15}) TabContent() {
Text("取件").margin({top:15}).fontWeight(600).fontSize(18) Column() {
Text("仓库取件").margin({bottom:15,top:15}).fontSize(13) Image($r('app.media.express')).width(60)
Text("暂无最新上架订单信息").margin({ top: 15 })
} }
}.width("45%").backgroundColor('#f8fdfc').justifyContent(FlexAlign.Center) }.tabBar(this.TabBuilder(1, '取件记录'))
} }
}.margin({top: 20}) .height(250)
.flexGrow(1)
.onChange((index: number) => {
this.currentIndex = index
})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { Row() {
TabContent() { Row() {
Column().width('100%').height('100%').backgroundColor('#00CB87') Column() {
}.tabBar(this.TabBuilder(0, '最新上架')) Row() {
Text("0条")
}
Text("订单数量").padding({ top: 8, bottom: 8 })
}
}.width('50%').justifyContent(FlexAlign.Center).onClick(() => {
router.pushUrl({ url: "pages/package/Pack", params: {
type: "unclaimed"
} })
}).border({
width: { left: '0lpx', right: '2lpx', top: '0lpx', bottom: '0lpx' },
}).height('100%')
TabContent() { Row() {
Column().width('100%').height('100%').backgroundColor('#007DFF') Column() {
}.tabBar(this.TabBuilder(1, '取件记录')) Text("待上架0条").onClick(() => {
} router.pushUrl({ url: "pages/package/Pack", params: {
.height(250) type: "wait"
.onChange((index: number) => { } })
this.currentIndex = index }).padding({ top: 10, bottom: 10 }).border({
}) width: { left: '0lpx', right: '0lpx', top: '0lpx', bottom: '2lpx' },
}).textAlign(TextAlign.Center).width('100%')
Row() { Text("未领取0条").onClick(() => {
Row() { router.pushUrl({ url: "pages/package/Pack", params: {
Column(){ type: "unclaimed"
Row(){ } })
Text("0") }).padding({ top: 10, bottom: 10 }).textAlign(TextAlign.Center).width('100%').border({
Text("条") width: { left: 'lpx', right: '0lpx', top: '0lpx', bottom: '2lpx' },
})
Text("已领取0条").onClick(() => {
router.pushUrl({ url: "pages/package/Pack", params: {
type: "received"
} })
}).padding({ top: 10, bottom: 10 }).textAlign(TextAlign.Center).width('100%')
} }
Text("订单数量") }.width('50%').justifyContent(FlexAlign.Center)
} }.border({
}.width('50%').justifyContent(FlexAlign.Center) width: { left: '0lpx', right: '0lpx', top: '2lpx', bottom: '0lpx' },
Row() { }).height(120)
Column(){
Text("待上架0条")
Text("未领取0条")
Text("已领取0条")
}
}.width('50%').justifyContent(FlexAlign.Center)
} }
} }
.width('100%') .width('100%').backgroundColor('#fff')
} }
} }
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论