Commit 43725481 by 毛勇泽

物资管理

parent 1d8d6d42
import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
@Entry
@Component
struct AddConversionPage{
struct AddConversionPage {
@State fontColor: string = '#182431'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
......@@ -21,9 +23,10 @@ struct AddConversionPage{
.opacity(this.currentIndex === index ? 1 : 0)
}.width('100%')
}
@Builder VoucherRow(){
Flex({direction:FlexDirection.Column}){
Row(){
@Builder VoucherRow() {
Flex({ direction: FlexDirection.Column }) {
Row() {
Divider()
.vertical(true)
.height(14)
......@@ -37,109 +40,211 @@ struct AddConversionPage{
.fontColor($r("app.color.item_color_black"))
}.padding("2vp")
.width("100%")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("凭证类型:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({placeholder:"物资换位"})
TextInput({ placeholder: "物资换位" })
.enterKeyType(EnterKeyType.Search)
.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"))
.enabled(false)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("凭证号:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({placeholder:"请输入凭证号"})
TextInput({ placeholder: "请输入凭证号" })
.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"))
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("库房:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择库房')
.width("80%")
.width(230)
.borderWidth(2)
.borderRadius(10)
.height(50)
.borderColor($r("app.color.rank_third_gradient_end"))
.height(40)
.borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => {
console.log("选择库房",value)
console.log("选择库房", value)
})
.flexGrow(1)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("发物管理单位:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择发物管理单位')
.width("80%")
.width(230)
.borderWidth(2)
.borderRadius(10)
.height(50)
.borderColor("#454545")
.height(40)
.borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => {
})
.flexGrow(1)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("收物管理单位:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
Select([{ value: "1号库房" }, { value: "2号库房" }])
.value('请选择收物管理单位')
.width("80%")
.width(230)
.borderWidth(2)
.borderRadius(10)
.height(50)
.borderColor("#454545")
.height(40)
.borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => {
})
.flexGrow(1)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("账目类型:")
.fontSize(14)
.width("30%")
.height(50)
.height(40)
.fontColor($r("app.color.item_color_black"))
Select([{ value: "正常供应被装帐" },{ value: "战略储备被装预计帐" }, { value: "战役储备被装预计帐" }, { value: "战术储备被装预计帐" }])
Select([{ value: "正常供应被装帐" }, { value: "战略储备被装预计帐" }, { value: "战役储备被装预计帐" }, {
value: "战术储备被装预计帐"
}])
.value('请选择账目类型')
.width("80%")
.width(230)
.borderWidth(2)
.borderRadius(10)
.height(50)
.borderColor("#454545")
.height(40)
.borderColor("#7E7E7E")
.onSelect((index: number, value?: string) => {
})
.padding(5)
.flexGrow(1)
}.padding("10vp").width("100%")
}.padding(20)
}
.padding(20)
.width("100%")
.height("100%")
.borderRadius(15)
.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() {
Flex({direction:FlexDirection.Column}){
TitleBar({ title:"物资换位" })
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "物资换位" })
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
// Column().width('100%').height('100%').backgroundColor('#00CB87')
......@@ -148,6 +253,7 @@ struct AddConversionPage{
TabContent() {
// Column().width('100%').height('100%').backgroundColor('#007DFF')
this.WzInfoRow()
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.height(500)
......@@ -159,7 +265,7 @@ struct AddConversionPage{
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论