Commit b7c3c872 by 毛勇泽

修改搜索框

parent 86a1202a
......@@ -148,6 +148,20 @@ struct AddConversionPage {
.padding(5)
.flexGrow(1)
}.padding("10vp").width("100%")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("备注:")
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入备注" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(10)
.borderColor($r("app.color.disabledColor"))
.width(230)
.height(40)
.padding({ top: 10, bottom: 10 })
}.padding("10vp").width("100%")
}
.padding(20)
.width("100%")
......@@ -249,21 +263,35 @@ struct AddConversionPage {
TabContent() {
Column(){
this.VoucherRow()
}.margin({top:15})
}.width("100%").margin({top:15})
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column(){
this.WzInfoRow()
}.margin({top:15})
}.width("100%").margin({top:15})
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.height(500)
.margin(15)
.onChange((index: number) => {
this.currentIndex = index
})
Row(){
Flex({justifyContent:FlexAlign.Center}){
Button("保存")
.backgroundColor("#97c6a6")
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
.onClick(async () => {
})
.fontSize("16vp")
.width('90%')
.padding(10)
}
}
.margin(20)
}
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
......
......@@ -13,6 +13,7 @@ import router from '@ohos.router';
@Entry
@Component
struct WzConversionPage{
private searchcontroller: SearchController = new SearchController()
@Builder bottomButtons() {
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
......@@ -51,17 +52,24 @@ struct WzConversionPage{
TitleBar({ title:"物资换位" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"})
.enterKeyType(EnterKeyType.Search)
.borderRadius("13vp").width('100%').padding({top:10,bottom:10}
).backgroundColor("#fff")
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(60)
}.width("100%")
.padding('15vp')
Row(){
// 底部按钮
this.bottomButtons();
}.width("100%").height(80)
}.width("100%").height(40)
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
......
......@@ -16,6 +16,7 @@ struct WzExchangePage{
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
......@@ -60,14 +61,20 @@ struct WzExchangePage{
TitleBar({ title:"物资调号" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"})
.enterKeyType(EnterKeyType.Search)
.borderRadius("13vp").width('100%').padding({top:10,bottom:10}
)
.backgroundColor("#fff")
}.margin("15vp").height(60)
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(60)
}.width("100%")
.padding('15vp')
.padding({left:15,right:15,top:15})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
// Column().width('100%').height('100%').backgroundColor('#00CB87')
......
......@@ -7,6 +7,7 @@ export struct WzInPage {
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
......@@ -41,8 +42,17 @@ export struct WzInPage {
})
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"}).borderRadius("12vp").width('65%').padding({top:10,bottom:10})
.backgroundColor("#fff")
Search({ placeholder: '请输入凭证号', controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('70%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
Select([{ value: "未完成" }, { value: "已完成" }])
.value('请选择状态')
.borderWidth(1)
......@@ -59,7 +69,7 @@ export struct WzInPage {
.padding({
right:10
})
}.height(50)
}
}.width("100%")
.padding('15vp')
Column(){
......
......@@ -16,7 +16,7 @@ struct WzInvPage{
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
......@@ -56,12 +56,18 @@ struct WzInvPage{
TitleBar({ title:"物资盘库" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"})
.enterKeyType(EnterKeyType.Search)
.borderRadius("13vp").width('100%').padding({top:10,bottom:10}
)
.backgroundColor("#fff")
}.margin("15vp").height(60)
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(60)
}.width("100%")
.padding('15vp')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
......
......@@ -17,6 +17,7 @@ export struct WzOutPage {
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
......@@ -61,10 +62,18 @@ export struct WzOutPage {
TitleBar({ title:"物资出库" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"}).borderRadius("13vp").width('100%').padding({top:10,bottom:10}
)
.backgroundColor("#fff")
}.margin("15vp").height(60)
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(40)
}.width("100%")
.padding('15vp')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
......
......@@ -12,6 +12,7 @@ import { BasicTable } from '../../view/BasicTable/BasicTable'
@Entry
@Component
struct WzPositionPage{
private searchcontroller: SearchController = new SearchController()
@State fontColor: string = '#182431'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
......@@ -32,7 +33,7 @@ struct WzPositionPage{
}).fontColor("#0fa983") .fontSize("14vp")
}
}.height(80)
}.height(50)
}
build(){
Column() {
......@@ -40,12 +41,18 @@ struct WzPositionPage{
TitleBar({ title:"物资落位" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入品名名称"})
.enterKeyType(EnterKeyType.Search)
.borderRadius("13vp").width('100%').padding({top:10,bottom:10}
)
.backgroundColor("#fff")
}.height(60)
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(40)
}.width("100%")
.padding('15vp')
Row(){
......
......@@ -17,6 +17,7 @@ struct WzReversePage{
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
......@@ -28,9 +29,9 @@ struct WzReversePage{
Divider()
.strokeWidth(2)
.color('#fff')
.width(50)
.width(40)
.opacity(this.currentIndex === index ? 1 : 0)
}.width('100%')
}.width('100%').height(50)
}
@Builder bottomButtons() {
Row() {
......@@ -49,7 +50,7 @@ struct WzReversePage{
}).fontColor("#0fa983") .fontSize("14vp")
}
}.height(80)
}.height(50)
}
build(){
Column() {
......@@ -57,12 +58,18 @@ struct WzReversePage{
TitleBar({ title:"物资倒库" })
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
TextInput({placeholder:"请输入凭证号"})
.enterKeyType(EnterKeyType.Search)
.borderRadius("13vp").width('100%').padding({top:10,bottom:10}
)
.backgroundColor("#fff")
}.margin("15vp").height(60)
Search({ placeholder: '请输入凭证号',controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('100%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
}.height(40)
}.width("100%")
.padding('15vp')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
......@@ -74,7 +81,7 @@ struct WzReversePage{
// Column().width('100%').height('100%').backgroundColor('#007DFF')
}.tabBar(this.TabBuilder(1, '已完成'))
}
.height(80)
.height(60)
.onChange((index: number) => {
this.currentIndex = index
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论