Commit 43725481 by 毛勇泽

物资管理

parent 1d8d6d42
import { TitleBar } from '../../view/title/TitleBar' import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable' import { BasicTable } from '../../view/BasicTable/BasicTable'
@Entry @Entry
@Component @Component
struct AddConversionPage{ struct AddConversionPage {
@State fontColor: string = '#182431' @State fontColor: string = '#182431'
@State selectedFontColor: string = '#fff' @State selectedFontColor: string = '#fff'
@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)
...@@ -21,9 +23,10 @@ struct AddConversionPage{ ...@@ -21,9 +23,10 @@ struct AddConversionPage{
.opacity(this.currentIndex === index ? 1 : 0) .opacity(this.currentIndex === index ? 1 : 0)
}.width('100%') }.width('100%')
} }
@Builder VoucherRow(){
Flex({direction:FlexDirection.Column}){ @Builder VoucherRow() {
Row(){ Flex({ direction: FlexDirection.Column }) {
Row() {
Divider() Divider()
.vertical(true) .vertical(true)
.height(14) .height(14)
...@@ -37,109 +40,211 @@ struct AddConversionPage{ ...@@ -37,109 +40,211 @@ struct AddConversionPage{
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
}.padding("2vp") }.padding("2vp")
.width("100%") .width("100%")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("凭证类型:") Text("凭证类型:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
TextInput({placeholder:"物资换位"}) TextInput({ placeholder: "物资换位" })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderColor("#454545") .borderColor("#454545")
.borderRadius(10).width('80%').height(50).padding({top:10,bottom:10}) .borderRadius(10)
.width(230)
.height(40)
.padding({ top: 10, bottom: 10 })
.backgroundColor($r("app.color.disabledColor")) .backgroundColor($r("app.color.disabledColor"))
.enabled(false) .enabled(false)
}.padding("10vp") }.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("凭证号:") Text("凭证号:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
TextInput({placeholder:"请输入凭证号"}) TextInput({ placeholder: "请输入凭证号" })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(10).width('80%').height(50).padding({top:10,bottom:10}) .borderRadius(10)
.width(230)
.height(40)
.padding({ top: 10, bottom: 10 })
.backgroundColor($r("app.color.disabledColor")) .backgroundColor($r("app.color.disabledColor"))
}.padding("10vp") }.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("库房:") Text("库房:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }]) Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择库房') .value('请选择库房')
.width("80%") .width(230)
.borderWidth(2) .borderWidth(2)
.borderRadius(10) .borderRadius(10)
.height(50) .height(40)
.borderColor($r("app.color.rank_third_gradient_end")) .borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => { .onSelect((index: number, value?: string) => {
console.log("选择库房",value) console.log("选择库房", value)
}) })
.flexGrow(1) .flexGrow(1)
}.padding("10vp") }.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("发物管理单位:") Text("发物管理单位:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }]) Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择发物管理单位') .value('请选择发物管理单位')
.width("80%") .width(230)
.borderWidth(2) .borderWidth(2)
.borderRadius(10) .borderRadius(10)
.height(50) .height(40)
.borderColor("#454545") .borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => { .onSelect((index: number, value?: string) => {
}) })
.flexGrow(1) .flexGrow(1)
}.padding("10vp") }.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("收物管理单位:") Text("收物管理单位:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }]) Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择收物管理单位') .value('请选择收物管理单位')
.width("80%") .width(230)
.borderWidth(2) .borderWidth(2)
.borderRadius(10) .borderRadius(10)
.height(50) .height(40)
.borderColor("#454545") .borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => { .onSelect((index: number, value?: string) => {
}) })
.flexGrow(1) .flexGrow(1)
}.padding("10vp") }.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) { Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("账目类型:") Text("账目类型:")
.fontSize(14) .fontSize(14)
.width("30%") .width("30%")
.height(50) .height(40)
.fontColor($r("app.color.item_color_black")) .fontColor($r("app.color.item_color_black"))
Select([{ value: "正常供应被装帐" },{ value: "战略储备被装预计帐" }, { value: "战役储备被装预计帐" }, { value: "战术储备被装预计帐" }]) Select([{ value: "正常供应被装帐" }, { value: "战略储备被装预计帐" }, { value: "战役储备被装预计帐" }, {
value: "战术储备被装预计帐"
}])
.value('请选择账目类型') .value('请选择账目类型')
.width("80%") .width(230)
.borderWidth(2) .borderWidth(2)
.borderRadius(10) .borderRadius(10)
.height(50) .height(40)
.borderColor("#454545") .borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => { .onSelect((index: number, value?: string) => {
}) })
.padding(5)
.flexGrow(1) .flexGrow(1)
}.padding("10vp").width("100%") }.padding("10vp").width("100%")
}.padding(20) }
.padding(20)
.width("100%") .width("100%")
.height("100%") .height("100%")
.borderRadius(15) .borderRadius(15)
.backgroundColor("#fff") .backgroundColor("#fff")
} }
build(){
@Builder WzInfoRow() {
Flex({ direction: FlexDirection.Column }) {
Column() {
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("单位/库房信息")
.fontWeight(FontWeight.Medium)
.fontSize(14)
.fontColor($r("app.color.item_color_black"))
}.padding({left:2,bottom:20})
.width("100%")
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Row(){
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("切换模式")
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
}
Row(){
Text("换出").margin({left:10,right:10})
Toggle({ type: ToggleType.Switch, isOn: true })
.selectedColor('#007DFF')
.switchPointColor('#FFFFFF')
.onChange((isOn: boolean) => {
console.info('Component status:' + isOn)
})
Text("换入").margin({left:10,right:10})
}
}.padding({left:2,bottom:20})
.width("100%")
}.padding({bottom:20,top:20})
.borderRadius(15)
.width("100%")
.backgroundColor("#fff")
Flex({ direction: FlexDirection.Column}) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("物资列表")
.fontWeight(FontWeight.Medium)
.fontSize(14)
.fontColor($r("app.color.item_color_black"))
}
Row(){
Text("品种个数:").margin({left:10,right:10})
Text("0").fontColor($r("app.color.title_background")).fontSize("24vp")
Text("合计数量").margin({left:10,right:10})
Text("0").fontColor($r("app.color.title_background")).fontSize("24vp")
}
}.padding({left:2,right:10})
.width("100%")
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
}.padding({bottom:20,top:20}).borderRadius(15)
.margin({top:20})
.width("100%")
.backgroundColor("#fff")
}
.width("100%")
.height("100%")
}
build() {
Column() { Column() {
Flex({direction:FlexDirection.Column}){ Flex({ direction: FlexDirection.Column }) {
TitleBar({ title:"物资换位" }) TitleBar({ title: "物资换位" })
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() { TabContent() {
// Column().width('100%').height('100%').backgroundColor('#00CB87') // Column().width('100%').height('100%').backgroundColor('#00CB87')
...@@ -148,6 +253,7 @@ struct AddConversionPage{ ...@@ -148,6 +253,7 @@ struct AddConversionPage{
TabContent() { TabContent() {
// Column().width('100%').height('100%').backgroundColor('#007DFF') // Column().width('100%').height('100%').backgroundColor('#007DFF')
this.WzInfoRow()
}.tabBar(this.TabBuilder(1, '物资信息')) }.tabBar(this.TabBuilder(1, '物资信息'))
} }
.height(500) .height(500)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论