Commit b7c3c872 by 毛勇泽

修改搜索框

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