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
4318430a
Commit
4318430a
authored
Jan 30, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
步进器的逻辑更改
parent
9b85400f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
18 行增加
和
9 行删除
+18
-9
WzInfo.ets
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
+4
-4
WzList.ets
entry/src/main/ets/pages/metailmange/Common/WzList.ets
+14
-5
没有找到文件。
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
View file @
4318430a
...
...
@@ -502,8 +502,7 @@ export struct WzInfo {
* @return {*}
* @author: 王弘钢
*/
async handleNumberBoxChangeValue(row) {
console.log('event,element,count', JSON.stringify(this))
async handleNumberBoxChangeValue(row, that) {
try {
const updateParams = {
mxguid: row.mxguid,
...
...
@@ -530,7 +529,8 @@ export struct WzInfo {
}
await wzcrkmxModel.updateWzmx(updateParams)
// createOrFindSQL("GY_M_PMV3", updateWzmx(updateParams))
this.pageInit(row, 'update')
console.log('event,element,count', 'asdhasudaugduay')
that.pageInit(row, 'update')
} catch (e) {
console.log("更新数字报错了!!!!!!" + e.stack)
//TODO handle the exception
...
...
@@ -1257,7 +1257,7 @@ export struct WzInfo {
List() {
ForEach(this.historicalInformation, (item) => {
ListItem() {
WzList({ wzmx: item, handleNumberBoxChangeValue: this.handleNumberBoxChangeValue })
WzList({ wzmx: item, handleNumberBoxChangeValue: this.handleNumberBoxChangeValue
, that: this
})
}
})
}
...
...
entry/src/main/ets/pages/metailmange/Common/WzList.ets
View file @
4318430a
...
...
@@ -3,7 +3,9 @@ import { historicalInformationClass, WzmxClass } from './Wzcrk.data'
@Component
export struct WzList {
@ObjectLink wzmx: historicalInformationClass
handleNumberBoxChangeValue: (wzmx: historicalInformationClass) => void
@State that: any = null
handleNumberBoxChangeValue: (wzmx: historicalInformationClass, that) => void
controller: TextInputController = new TextInputController()
build() {
Column() {
...
...
@@ -28,19 +30,26 @@ export struct WzList {
Row() {
Counter() {
Text(this.wzmx.crksl + '')
TextInput({ text: this.wzmx.crksl + '', controller: this.controller})
.onChange((value) => {
this.wzmx.crksl = Number(value)
})
.onSubmit(() => {
this.handleNumberBoxChangeValue(this.wzmx, this.that)
})
.borderRadius(0).backgroundColor('#fff').fontSize(15).textAlign(TextAlign.Center)
}
.width(1
2
0)
.width(1
3
0)
.onInc(() => {
this.wzmx.crksl = this.wzmx.crksl + 1
this.handleNumberBoxChangeValue(this.wzmx)
this.handleNumberBoxChangeValue(this.wzmx
, this.that
)
})
.onDec(() => {
if( this.wzmx.crksl == 0) {
return
}
this.wzmx.crksl = this.wzmx.crksl - 1
this.handleNumberBoxChangeValue(this.wzmx)
this.handleNumberBoxChangeValue(this.wzmx
, this.that
)
})
}.alignSelf(ItemAlign.End)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论