Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jump_hm_warehouse
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
毛勇泽
jump_hm_warehouse
Commits
b41e99db
Commit
b41e99db
authored
Jan 17, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库列表
parent
6894394b
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
228 行增加
和
76 行删除
+228
-76
database.ets
entry/src/main/ets/database/database.ets
+1
-1
WzExchangePage.ets
entry/src/main/ets/pages/metailmange/WzExchangePage.ets
+2
-0
WzInPage.ets
entry/src/main/ets/pages/metailmange/WzInPage.ets
+94
-29
demo.ets
entry/src/main/ets/pages/sub_systemMaintenance/demo.ets
+0
-46
demo.ets
entry/src/main/ets/view/demo/demo.ets
+59
-0
demo1.ets
entry/src/main/ets/view/demo/demo1.ets
+72
-0
trash.png
entry/src/main/resources/base/media/trash.png
+0
-0
没有找到文件。
entry/src/main/ets/database/database.ets
View file @
b41e99db
...
...
@@ -57,7 +57,7 @@ class Database {
while (!result.isAtLastRow) {
let obj = {
} as T
let obj = {} as T
// 3.3.指针移动到下一行
result.goToNextRow()
...
...
entry/src/main/ets/pages/metailmange/WzExchangePage.ets
View file @
b41e99db
...
...
@@ -104,9 +104,11 @@ struct WzExchangePage{
.onChange((index: number) => {
this.currentIndex = index
})
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
Row(){
// 底部按钮
this.bottomButtons();
...
...
entry/src/main/ets/pages/metailmange/WzInPage.ets
View file @
b41e99db
import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import router from '@ohos.router';
import { Demo } from '../../view/demo/demo';
import { BasicDialog } from '../../view/BasicDialog/BasicDialog';
@Extend(Button) function bottomBtnSty() {
.borderWidth(1)
.padding({
top:1,bottom:1,right:7,left:7
})
.padding({
top: 1, bottom: 1, right: 7, left: 7
})
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
...
...
@@ -13,6 +15,7 @@ import router from '@ohos.router';
.stateEffect(true)
}
@Entry
@Component
export struct WzInPage {
...
...
@@ -20,7 +23,57 @@ export struct WzInPage {
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
private searchcontroller: SearchController = new SearchController()
itemClick() {
router.pushUrl({url:'pages/order_detail/PzInvDetailPage'})
}
@Builder container() {
Column() {
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text('完成').margin({ left: 20 })
Radio({ value: 'Radio1', group: 'radioGroup' })
.onChange((isChecked: boolean) => {
console.log('Radio1 status is ' + isChecked)
}).margin({ right: 20 })
}
}.padding({ top: 10, bottom: 10 })
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text('未完成').margin({ left: 20 })
Radio({ value: 'Radio1', group: 'radioGroup' })
.onChange((isChecked: boolean) => {
console.log('Radio1 status is ' + isChecked)
}).margin({ right: 20 })
}
}.padding({ top: 10, bottom: 10 })
}
}
dialogController: CustomDialogController = new CustomDialogController({
builder: BasicDialog({
cancel: this.onCancel,
confirm: this.onSubmit,
title: '设置状态',
container: this.container
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
offset: { dx: 0, dy: -20 },
gridCount: 4,
customStyle: false
})
onCancel() {
console.info('------取消------')
}
onSubmit() {
console.info('------确认------')
}
@Builder TabBuilder(index: number, name: string) {
Column() {
...
...
@@ -28,7 +81,7 @@ export struct WzInPage {
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(16)
.lineHeight(22)
.margin({bottom: 7 })
.margin({
bottom: 7 })
Divider()
.strokeWidth(2)
.color('#fff')
...
...
@@ -36,13 +89,14 @@ export struct WzInPage {
.opacity(this.currentIndex === index ? 1 : 0)
}.width('100%')
}
@Builder bottomButtons() {
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("临时收物")
.visibility(this.currentIndex === 1 ? Visibility.Visible
:
Visibility.None)
.visibility(this.currentIndex === 1 ? Visibility.Visible
:
Visibility.None)
.bottomBtnSty()
.onClick(
() => {
.onClick(() => {
router.pushUrl({
url: "pages/metailmange/AddTemporaryInPage",
})
...
...
@@ -52,27 +106,31 @@ export struct WzInPage {
Button("设置状态")
.bottomBtnSty()
.onClick(() => {
if (this.dialogController != undefined) {
this.dialogController.open()
}
})
.fontColor("#0fa983")
.fontSize("14vp")
Button("导出数据包")
.bottomBtnSty()
.onClick(() => {
}).fontColor("#0fa983")
.fontSize("14vp")
Button("全选")
.bottomBtnSty().fontColor("#0fa983") .fontSize("14vp")
}).fontColor("#0fa983").fontSize("14vp")
//
Button("全选")
//
.bottomBtnSty().fontColor("#0fa983") .fontSize("14vp")
Button("清空选择")
.bottomBtnSty()
.onClick(() =>{
.onClick(() =>
{
}).fontColor("#0fa983")
.fontSize("14vp")
}).fontColor("#0fa983").fontSize("14vp")
}
}.height(80)
}
build(){
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')
...
...
@@ -86,8 +144,9 @@ export struct WzInPage {
.onChange((index: number) => {
this.currentIndex = index
})
Row(){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Search({ placeholder: '请输入凭证号', controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
...
...
@@ -95,7 +154,7 @@ export struct WzInPage {
.textAlign(TextAlign.Center)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('
7
0%')
.width('
6
0%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
...
...
@@ -104,35 +163,40 @@ export struct WzInPage {
Select([{ value: "未完成" }, { value: "已完成" }])
.value('请选择状态')
.borderWidth(1)
.borderRadius(10)
.borderRadius(6)
.height(42)
.margin({ left: 10 })
.borderColor("#454545")
.onSelect(async (index: number, value?: string) => {
if(value == '未完成') {
console.log("未完成",'未完成')
if
(value == '未完成') {
console.log("未完成",
'未完成')
} else {
console.log("已完成",'已完成')
console.log("已完成",
'已完成')
}
})
.width(1
1
0)
.width(1
2
0)
.padding({
right:
10
right:
15
})
}
}.margin({
top:-30
})
}.margin({
top: -20
})
.width("100%")
.padding('15vp')
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
Row(){
// 底部按钮
// 列表
Column() {
Demo({itemClick: this.itemClick}).width('90%')
}.flexGrow(1).backgroundColor('#fff').alignSelf(ItemAlign.Center)
// 底部按钮
Row() {
this.bottomButtons();
}.backgroundColor("#97c6a6").width("100%").height(80)
}
}.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
entry/src/main/ets/pages/sub_systemMaintenance/demo.ets
deleted
100644 → 0
View file @
6894394b
@Entry
@Component
struct ActionSheetExample {
build() {
Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
Button('Click to Show ActionSheet')
.onClick(() => {
ActionSheet.show({
title: '',
message: '',
autoCancel: false,
confirm: {
value: '取消',
action: () => {
console.log('Get Alert Dialog handled')
}
},
alignment: DialogAlignment.Bottom,
offset: { dx: 0, dy: -10 },
sheets: [
{
title: '清除基础数据',
action: () => {
console.log('apples')
}
},
{
title: '清除单据数据',
action: () => {
console.log('bananas')
}
},
{
title: 'pears',
action: () => {
console.log('pears')
}
}
]
})
})
}.width('100%')
.height('100%')
}
}
\ No newline at end of file
entry/src/main/ets/view/demo/demo.ets
0 → 100644
View file @
b41e99db
@Entry
@Component
export struct Demo {
arr = [1, 2, 3, 4, 5, 6,7,8,9,10,11,12]
itemClick: () => void
build() {
Column() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CheckboxGroup({ group: 'checkboxGroup' })
.selectedColor('#007DFF')
.onChange((itemName: CheckboxGroupResult) => {
console.info("checkbox group content" + JSON.stringify(itemName))
})
Text("全选").margin({ left: 10 })
}.margin({ bottom: -15, left: 8 }).backgroundColor('#fff').zIndex(999)
List(){
ForEach(this.arr, (item, index) => {
ListItem(){
Row() {
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.selectedColor('#007DFF')
.onChange((value: boolean) => {
console.info('Checkbox1 change is' + value)
}).margin({ right: 10,left: 10 })
Column() {
Text('2023-01-17').alignSelf(ItemAlign.Start).width("30%")
Text("收物单").alignSelf(ItemAlign.Start).width("30%").margin({ top: 5 })
}
Column() {
Row() {
Text('凭证号: ')
Text('1')
}.alignSelf(ItemAlign.Start).padding({ top: 8, bottom: 8 })
Row() {
Text("数量: ")
Text('0').fontColor('#ff3d43')
Text('/').fontColor('#ff3d43')
Text('500').fontColor('#ff3d43')
}.alignSelf(ItemAlign.Start)
}.width("30%").padding({ top: 8, bottom: 8 })
Row() {
Text("状态: ")
Text("未完成").fontColor('#ff3d43')
}
}.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" })
}.onClick(() => this.itemClick())
})
}
}.width('100%').height('100%')
}
}
\ No newline at end of file
entry/src/main/ets/view/demo/demo1.ets
0 → 100644
View file @
b41e99db
@Observed
class Good {
index: number
constructor(index) {
this.index = index
}
}
@Entry
@Component
export struct Demo1 {
@State goodList: Good[] = [new Good(10), new Good(20) ]
build() {
Column() {
ForEach(this.goodList, (item) => {
child({ good: item })
})
}.width('100%').height('100%')
}
}
@Component
struct child {
@ObjectLink good: Good
build() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Column() {
Text("冬季防寒靴100000").padding({ top: 5, bottom: 5 })
Row() {
Text("号型: ")
Text("1003")
}.alignSelf(ItemAlign.Start).padding({ top: 5, bottom: 5 })
Row() {
Text("货位号: ")
Text("2")
}.alignSelf(ItemAlign.Start).padding({ top: 5, bottom: 5 })
}.margin({ left: 15 })
Column() {
Row() {
Text("总数: ")
Text(this.good.index.toString())
}.alignSelf(ItemAlign.End).padding({ top: 5, bottom: 5 })
Row() {
Counter() {
Text(this.good.index.toString())
}
.width(120)
.onInc(() => {
this.good.index++
console.log("item++",this.good.index)
})
.onDec(() => {
this.good.index--
})
}.alignSelf(ItemAlign.End)
Row() {
Image($r('app.media.trash')).width(35)
}.alignSelf(ItemAlign.End)
}.margin({ right: 20 })
}.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" })
}
}
}
\ No newline at end of file
entry/src/main/resources/base/media/trash.png
0 → 100644
View file @
b41e99db
853 Bytes
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论