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