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
cf795ee5
Commit
cf795ee5
authored
Jan 22, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
21712b0e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
303 行增加
和
43 行删除
+303
-43
AddWzin.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
+64
-40
PzInfo.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo.ets
+3
-3
PzInfo1.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo1.ets
+104
-0
PzInfo2.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo2.ets
+131
-0
WzinDetail.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
+1
-0
没有找到文件。
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
View file @
cf795ee5
import gldwModel from '../../../../model/GldwModel'
import kfModel from '../../../../model/KfModel'
import { renderPzlx, renderSzlx, renderZmlx, WzinClass } from '../Wzin.data'
@Entry
@Component
// 物资信息
export struct PzInfo {
@State kfmc: string = ''
@State fwgldw: string = ''
@State swgldw: string = ''
@ObjectLink wzcrk: WzinClass
// @State kfmc: string = ''
// @State fwgldw: string = ''
// @State swgldw: string = ''
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false,type:'select' },
{ title: "凭证号", key: 'pzh', enabled: false,type:'input' },
{ title: "库房", key: 'kfguid', enabled: false,type:'input' },
{ title: "收支类型", key: 'pzszlx', enabled: false,type:'input' },
{ title: "运单号", key: 'ydh', enabled: true,type:'input' },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false,type:'input' },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false,type:'input' },
{ title: "备注", key: 'dec', enabled: true,type:'input' }
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false, type: 'input' },
{ title: "凭证号", key: 'pzh', enabled: false, type: 'input' },
{ title: "收支类型", key: 'pzszlx', enabled: false, type: 'input' },
{ title: "库房", key: 'kfguid', enabled: true, type: 'select', options:[] },
{ title: "货位号", key: 'hwh', enabled: true, type: 'select' },
{ title: "运单号", key: 'ydh', enabled: true, type: 'input' },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false, type: 'select' },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false, type: 'select' },
{ title: "账目类型", key: 'zmlx', enabled: false, type: 'select'},
{ title: "备注", key: 'dec', enabled: true, type: 'input' }
]
aboutToAppear(){
aboutToAppear()
{
this.getData()
}
async getData() {
const res = await kfModel.query({guid: this.wzcrk.kfguid})
this.kfmc = res[0].kfmc ?? ''
// 获取库房列表
const kfList = await kfModel.query({ })
const res1 = await gldwModel.queryByData({dwdm:this.wzcrk.fwgldwdm})
this.fwgldw = res1[0].dwfh ?? ''
this.arr[this.arr.findIndex(v => v.key == 'kfguid')].options = kfList.map(v => {
return {
value:v.kfmc,
id:v.guid
}
})
const res2 = await gldwModel.queryByData({dwdm:this.wzcrk.swgldwdm})
this.swgldw = res2[0].dwfh ?? ''
//
// const res1 = await gldwModel.queryByData({ dwdm: this.wzcrk.fwgldwdm })
// this.fwgldw = res1[0].dwfh ?? ''
//
// const res2 = await gldwModel.queryByData({ dwdm: this.wzcrk.swgldwdm })
// this.swgldw = res2[0].dwfh ?? ''
}
build(){
Column(){
build() {
Column() {
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Divider()
.vertical(true)
...
...
@@ -50,29 +58,45 @@ export struct PzInfo {
Text("凭证信息")
.fontSize(16)
}.height('8%')
ForEach(this.arr,(item) => {
ForEach(this.arr, (item) => {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text(item.title)
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ text:"1111" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if(item.enabled) {
this.wzcrk[item.key] = value
}
})
if (item.type == 'select') {
Select([])
.value(`请选择${item.title}`)
.width(230)
.borderWidth(1)
.borderRadius(5)
.borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => {
console.log("选择库房", value)
})
}
if (item.type == 'input') {
TextInput({ text: "1111" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if (item.enabled) {
// this.wzcrk[item.key] = value
}
})
}
}.padding("10vp")
})
}.backgroundColor('#fff')
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo.ets
View file @
cf795ee5
...
...
@@ -35,10 +35,10 @@ export struct PzInfo {
}
handleText(key: string): string {
handleText(key: string): string {
switch (key) {
case 'pzlx':
return renderPzlx(this.wzcrk.pzlx)
return renderPzlx(this.wzcrk.pzlx)
case 'pzszlx':
return renderSzlx(this.wzcrk.pzszlx)
...
...
@@ -47,7 +47,7 @@ export struct PzInfo {
return renderZmlx(this.wzcrk.zmlx)
case 'kfguid':
return this.kfmc
return this.kfmc
case 'fwgldwdm':
return this.fwgldw
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo1.ets
0 → 100644
View file @
cf795ee5
import gldwModel from '../../../../model/GldwModel'
import kfModel from '../../../../model/KfModel'
import { renderPzlx, renderSzlx, renderZmlx, WzinClass } from '../Wzin.data'
@Component
// 物资信息
export struct PzInfo {
@State kfmc: string = ''
@State fwgldw: string = ''
@State swgldw: string = ''
@ObjectLink wzcrk: WzinClass
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false },
{ title: "凭证号", key: 'pzh', enabled: false },
{ title: "库房", key: 'kfguid', enabled: false },
{ title: "收支类型", key: 'pzszlx', enabled: false },
{ title: "运单号", key: 'ydh', enabled: true },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false },
{ title: "备注", key: 'dec', enabled: true }
]
aboutToAppear(){
this.getData()
}
async getData() {
const res = await kfModel.query({guid: this.wzcrk.kfguid})
this.kfmc = res[0].kfmc ?? ''
const res1 = await gldwModel.queryByData({dwdm:this.wzcrk.fwgldwdm})
this.fwgldw = res1[0].dwfh ?? ''
const res2 = await gldwModel.queryByData({dwdm:this.wzcrk.swgldwdm})
this.swgldw = res2[0].dwfh ?? ''
}
handleText(key: string): string {
switch (key) {
case 'pzlx':
return renderPzlx(this.wzcrk.pzlx)
case 'pzszlx':
return renderSzlx(this.wzcrk.pzszlx)
case 'zmlx':
return renderZmlx(this.wzcrk.zmlx)
case 'kfguid':
return this.kfmc
case 'fwgldwdm':
return this.fwgldw
case 'swgldwdm':
return this.swgldw
default:
return String(this.wzcrk[key])
}
}
build(){
Column(){
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("凭证信息")
.fontSize(16)
}.height('8%')
ForEach(this.arr,(item) => {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text(item.title)
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ text: this.handleText(item.key) })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if(item.enabled) {
this.wzcrk[item.key] = value
}
})
}.padding("10vp")
})
}.backgroundColor('#fff')
}
}
\ No newline at end of file
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo2.ets
0 → 100644
View file @
cf795ee5
import { Logger } from '@ohos/common/src/main/ets/utils/Logger'
import gldwModel from '../../../../model/GldwModel'
import kfModel from '../../../../model/KfModel'
import { renderPzlx, renderSzlx, renderZmlx, WzinClass } from '../Wzin.data'
// @Observed
class Options {
value:'string'
id: string | number
}
// @Observed
class Form {
title: string
key: string
enabled:boolean
type: 'input' | 'select'
options?: Options[]
}
@Entry
@Component
// 物资信息
export struct PzInfo {
// @State kfmc: string = ''
// @State fwgldw: string = ''
// @State swgldw: string = ''
@State Form: form[] = []
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false, type: 'input' },
{ title: "凭证号", key: 'pzh', enabled: false, type: 'input' },
{ title: "收支类型", key: 'pzszlx', enabled: false, type: 'input' },
{ title: "库房", key: 'kfguid', enabled: true, type: 'select' },
{ title: "货位号", key: 'hwh', enabled: true, type: 'select'},
{ title: "运单号", key: 'ydh', enabled: true, type: 'input' },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false, type: 'select' },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false, type: 'select' },
{ title: "账目类型", key: 'zmlx', enabled: false, type: 'select'},
{ title: "备注", key: 'dec', enabled: true, type: 'input' }
]
aboutToAppear() {
this.getData()
}
async getData() {
// 获取库房列表
const kfList = await kfModel.query({})
Logger.info('库房列表>>', JSON.stringify(kfList))
this.arr.forEach(i => {
this.form
})
// this.arr[this.arr.findIndex(v => v.key == 'kfguid')].options = kfList.map(v => {
// return {
// value:v.kfmc,
// id:v.guid
// }
// })
Logger.info('库房列表>>111', JSON.stringify( this.arr[this.arr.findIndex(v => v.key == 'kfguid')].options))
//
// const res1 = await gldwModel.queryByData({ dwdm: this.wzcrk.fwgldwdm })
// this.fwgldw = res1[0].dwfh ?? ''
//
// const res2 = await gldwModel.queryByData({ dwdm: this.wzcrk.swgldwdm })
// this.swgldw = res2[0].dwfh ?? ''
}
build() {
Column() {
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("凭证信息")
.fontSize(16)
}.height('8%')
ForEach(this.arr, (item) => {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text(item.title)
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
if (item.type == 'select') {
Select(item.options)
.value(`请选择${item.title}`)
.width(230)
.borderWidth(1)
.borderRadius(5)
.borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => {
console.log("选择库房", value)
})
}
if (item.type == 'input') {
TextInput({ text: "1111" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if (item.enabled) {
// this.wzcrk[item.key] = value
}
})
}
}.padding("10vp")
})
}.backgroundColor('#fff')
}
}
\ No newline at end of file
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
View file @
cf795ee5
...
...
@@ -75,6 +75,7 @@ struct WzinDetail {
TabContent() {
Column() {
PzInfo({ wzcrk: this.wzcrk })
// PzInfo()
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论