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
aea4e738
Commit
aea4e738
authored
Jan 30, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
7f0815d0
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
422 行增加
和
224 行删除
+422
-224
BzhxDto.ets
common/src/main/ets/bean/dto/BzhxDto.ets
+9
-0
BzhxDao.ets
common/src/main/ets/db/dao/BzhxDao.ets
+72
-6
NativeSql.ets
common/src/main/ets/db/sql/NativeSql.ets
+0
-0
BzhxModel.ets
entry/src/main/ets/model/BzhxModel.ets
+22
-13
WzInfo.ets
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
+4
-2
WzConversionPage.ets
entry/src/main/ets/pages/metailmange/WzConversionPage/WzConversionPage.ets
+0
-1
LeftDialog.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/LeftDialog.ets
+44
-43
WzStatus.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzStatus.ets
+270
-0
WzStatus.ets
entry/src/main/ets/pages/metailmange/WzStatus.ets
+0
-158
main_pages.json
entry/src/main/resources/base/profile/main_pages.json
+1
-1
没有找到文件。
common/src/main/ets/bean/dto/BzhxDto.ets
0 → 100644
View file @
aea4e738
export interface PmActive {
pmdm:string
wzpm:string
pzsl:number
crksl:number
wczt:string
hxmc?:string
}
\ No newline at end of file
common/src/main/ets/db/dao/BzhxDao.ets
View file @
aea4e738
import relationalStore from '@ohos.data.relationalStore';
import { PmActive } from '../../bean/dto/BzhxDto';
import { Bzhx } from '../../entity/Bzhx';
import { Logger } from '../../utils/Logger';
import BaseTable, { ValueType } from '../BaseTable';
import { Table } from '../decorator/Decorators';
import { NativeSql } from '../sql/NativeSql';
...
...
@@ -72,14 +74,15 @@ export class BzhxDao extends BaseTable<Bzhx> {
wp.orderByAsc('LSM');
return this.query(wp, this.getTableColumns())
}
async selectHXList(hx_map?: any): Promise<Bzhx[]> {
try {
let val_sql = "select * from TAB_XTWH_JCSJ_BZHX where "+
let val_sql = "select * from TAB_XTWH_JCSJ_BZHX where "
+
" lsm = '" + hx_map["wzdm"] + "' " +
" or lsm in (" + hx_map["pmdm_hxmc"] + ")"+
" or lsm in (" + hx_map["pmdm_hxmc"] + ")"
+
" or pmdmten = '" + hx_map["wzdm"] + "' " +
" or ( wzpm = '" + hx_map["wzdm"] + "' and ( substr(pmdmten,7)='0000' or pmdmten in (" + hx_map["pmdm_hxmc"]
+ ") ) )"
+
" or ( wzpm = '" + hx_map["wzdm"] + "' and ( hxmc='无号配号' or hxmc in (" + hx_map["pmdm_hxmc"]
+ ") ) )"
;
" or ( wzpm = '" + hx_map["wzdm"] + "' and ( substr(pmdmten,7)='0000' or pmdmten in (" + hx_map["pmdm_hxmc"]
+ ") ) )"
+
" or ( wzpm = '" + hx_map["wzdm"] + "' and ( hxmc='无号配号' or hxmc in (" + hx_map["pmdm_hxmc"]
+ ") ) )"
;
console.log('查询SQL语句=' + val_sql)
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
...
...
@@ -92,9 +95,71 @@ export class BzhxDao extends BaseTable<Bzhx> {
}
console.log('查询SQL结果=' + JSON.stringify(items))
return items;
}
catch (err)
{
console.log("查询报错==》"
+
JSON.stringify(err))
}
catch (err)
{
console.log("查询报错==》"
+
JSON.stringify(err))
}
}
// 显示某凭证那些品种完成了那些品种未完成
async getPmhxActive(params, pageType) {
try {
let val_sql = NativeSql.getPmhxActiveSql(params, pageType);
Logger.info(this, val_sql)
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toDjcx(rs))
} while (rs.goToNextRow())
}
Logger.info(this, '显示某凭证那些品种完成了那些品种未完成>>' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
// 根据品名查号型
async getPmhxDetailActive(params, pageType) {
try {
let val_sql = NativeSql.getPmhxDetailActiveSql(params, pageType);
Logger.info(this, val_sql)
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toDetail(rs))
} while (rs.goToNextRow())
}
Logger.info(this, '显示某凭证那些品种完成了那些品种未完成>>' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
toDjcx(cursor: relationalStore.ResultSet): PmActive {
let info: PmActive = {
pmdm: cursor.getString(cursor.getColumnIndex('pmdm')),
wzpm: cursor.getString(cursor.getColumnIndex('wzpm')),
pzsl: cursor.getLong(cursor.getColumnIndex('pzsl')),
crksl: cursor.getLong(cursor.getColumnIndex('crksl')),
wczt: cursor.getString(cursor.getColumnIndex('WCZT')),
};
return info;
}
toDetail(cursor: relationalStore.ResultSet): PmActive {
let info: PmActive = {
pmdm: cursor.getString(cursor.getColumnIndex('pmdm')),
wzpm: cursor.getString(cursor.getColumnIndex('wzpm')),
hxmc: cursor.getString(cursor.getColumnIndex('hxmc')),
pzsl: cursor.getLong(cursor.getColumnIndex('pzsl')),
crksl: cursor.getLong(cursor.getColumnIndex('crksl')),
wczt: cursor.getString(cursor.getColumnIndex('WCZT')),
};
return info;
}
}
\ No newline at end of file
common/src/main/ets/db/sql/NativeSql.ets
View file @
aea4e738
差异被折叠。
点击展开。
entry/src/main/ets/model/BzhxModel.ets
View file @
aea4e738
import { uuid } from '@ohos/common/src/main/ets/utils/util'
import {
Wzdm, Wzhxdm,Bzhx,SQLiteContext, WzdmDao,WzhxdmDao, BzhxDao,Logger
} from '@ohos/common'
import {
Bzhx, BzhxDao, Logger, SQLiteContext, Wzdm, WzdmDao, Wzhxdm, WzhxdmDao
} from '@ohos/common'
// 被装号型
class BzhxModel {
...
...
@@ -9,12 +9,12 @@ class BzhxModel {
const copyData = data.map(v => {
return {
...v,
pmdmSix: v.pmdmTen.slice(0,6),
lsm:v.pmdmSix,
guid:uuid(),
pmguid:"",
hxguid:"",
pmguid_old:""
pmdmSix: v.pmdmTen.slice(0,
6),
lsm:
v.pmdmSix,
guid:
uuid(),
pmguid:
"",
hxguid:
"",
pmguid_old:
""
}
})
...
...
@@ -22,24 +22,24 @@ class BzhxModel {
}
// 查询被装号型
async query(offset: number, pmdmsix?
: string): Promise<Bzhx[]> {
async query(offset: number, pmdmsix?: string): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix)
return res;
}
// 根据品名代码查询
async queryByCode(pmdmcode:string): Promise<Bzhx> {
async queryByCode(pmdmcode:
string): Promise<Bzhx> {
let res = await SQLiteContext.with(BzhxDao).getBzhxByCode(pmdmcode)
return res[0];
}
async queryLsm(lsm?: string):Promise<Bzhx[]> {
async queryLsm(lsm?: string): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).selectWZInfo(lsm);
Logger.info("查询LSM结果"
+
JSON.stringify(res))
Logger.info("查询LSM结果"
+
JSON.stringify(res))
return res;
}
async queryHXlist(hx_map?: any):Promise<Bzhx[]> {
async queryHXlist(hx_map?: any): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).selectHXList(hx_map);
return res;
}
...
...
@@ -48,6 +48,15 @@ class BzhxModel {
await SQLiteContext.with(WzhxdmDao).clearTable()
}
// 显示某凭证那些品种完成了那些品种未完成
async getPmhxActive(params, pageType) {
return await SQLiteContext.with(BzhxDao).getPmhxActive(params, pageType);
}
// 根据品名查号型
async getPmhxDetailActive(params, pageType) {
return await SQLiteContext.with(BzhxDao).getPmhxDetailActive(params, pageType);
}
}
const bzhxModel = new BzhxModel()
...
...
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
View file @
aea4e738
...
...
@@ -1168,8 +1168,10 @@ export struct WzInfo {
.margin({ left: 10 })
.borderRadius(5)
Button("查看状态").CommonButtonStyle().width("25%").margin({ left: 5, right: 5 }).onClick(() => {
router.pushUrl({ url: 'pages/metailmange/WzStatus', params: {
wzmx: this.historicalInformation
router.pushUrl({ url: 'pages/metailmange/WzInPage/WzinDetail/WzStatus', params: {
// wzmx: this.historicalInformation
pageType: this.pageType,
wzcrkguid: this.pzxqGuild
} })
})
}.width("100%")
...
...
entry/src/main/ets/pages/metailmange/WzConversionPage/WzConversionPage.ets
View file @
aea4e738
...
...
@@ -20,7 +20,6 @@ import { ExportOrderDialog } from '../../../view/ExportOrderDialog/ExportOrderDi
.borderRadius(7)
.type(ButtonType.Normal)
.stateEffect(true)
}
interface SearchData {
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/LeftDialog.ets
View file @
aea4e738
import { WzmxClass } from '../../Common/Wzcrk.data'
@CustomDialog
@Component
export struct LeftDialog {
controller: CustomDialogController
cancel: () => void
confirm: () => void
private item: WzmxClass
build() {
Column() {
List({ space: 2 }) {
ListItem() {
Row() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text('号型:' + this.item.xh).fontSize(12).fontColor('#3b4144')
Text('凭证数量:' + this.item.pzsl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
}
.width('70%')
Blank()
.layoutWeight(1)
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Start }) {
if(this.item.wczt == '未完成' && this.item.crksl < this.item.pzsl) {
Text('未完成').fontSize(14).fontColor('red')
} else {
Text('完成').fontSize(14).fontColor( 'green')
}
Text('入库数量: ' + this.item.crksl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
}
.width('40%')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}.height(90)
}.margin({ top: 100 })
}.width('100%')
.width('60%')
.height('100%')
.backgroundColor('#fff')
}
}
\ No newline at end of file
// import { PmActive } from '@ohos/common/src/main/ets/bean/dto/BzhxDto'
// import { WzmxClass } from '../../Common/Wzcrk.data'
// @CustomDialog
// @Component
// export struct LeftDialog {
// controller: CustomDialogController
// cancel: () => void
// confirm: () => void
// datasourcepm: PmActive[]
//
// build() {
// Column() {
// List({ space: 2 }) {
// ListItem() {
// Row() {
// Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
// Text('号型:' + this.item.xh).fontSize(12).fontColor('#3b4144')
// Text('凭证数量:' + this.item.pzsl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
// }
// .width('70%')
// Blank()
// .layoutWeight(1)
// Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Start }) {
// if(this.item.wczt == '未完成' && this.item.crksl < this.item.pzsl) {
// Text('未完成').fontSize(14).fontColor('red')
// } else {
// Text('完成').fontSize(14).fontColor( 'green')
// }
// Text('入库数量: ' + this.item.crksl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
// }
// .width('40%')
// }
// .width('100%')
// .justifyContent(FlexAlign.SpaceBetween)
// .padding({ left: 12, right: 18 })
// }.height(90)
// }.margin({ top: 100 })
// }.width('100%')
// .width('60%')
// .height('100%')
// .backgroundColor('#fff')
// }
// }
\ No newline at end of file
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzStatus.ets
0 → 100644
View file @
aea4e738
// import { LeftDialog } from './LeftDialog'
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router'
import { WzmxClass } from '../../Common/Wzcrk.data'
import { dateUtils } from '@ohos/common'
import bzhxModel from '../../../../model/BzhxModel'
import { PmActive } from '@ohos/common/src/main/ets/bean/dto/BzhxDto'
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(3)
.type(ButtonType.Normal)
.height(30)
.stateEffect(true)
}
interface params {
wzcrkguid: string,
pageType: string
}
@Entry
@Component
export struct WzStatus {
@State pageType: string = ''
@State wzcrkguid: string = ''
@State wcsl: number = 0
@State wwcsl: number = 0
@State pzslhj: number = 0
@State crkhj: number = 0
@State pmwcsl: number = 0
@State pmwwcsl: number = 0
@State pmpzslhj: number = 0
@State pmcrkhj: number = 0
@State private dataSource: PmActive[] = []
@State private datasourcepm: PmActive[] = []
// dialogController: CustomDialogController = new CustomDialogController({
// builder: LeftDialog({
// cancel: this.onCancel,
// confirm: this.onSubmit,
// datasourcepm: this.datasourcepm
// }),
// alignment: DialogAlignment.CenterEnd,
// customStyle: true,
// })
aboutToAppear() {
const params = router.getParams() as params
this.pageType = params.pageType
this.wzcrkguid = params.wzcrkguid
this.init(this.wzcrkguid)
}
convertionCrkName() {
// return this.pageType+'数量'
switch (this.pageType) {
case "入库":
return "入库数量";
case "出库":
return "出库数量";
case "盘库":
return "盘库数量";
case "调号":
return "实调数量";
case "倒库":
return "实倒数量";
case "换位":
return "换入数量";
default:
return "出入库数量";
}
}
convertionPzslName() {
switch (this.pageType) {
case "入库":
return "凭证数量";
case "出库":
return "凭证数量";
case "盘库":
return "入库数量";
case "调号":
return "应调数量";
case "倒库":
return "应倒数量";
case "换位":
return "换出数量";
default:
return "凭证数量";
}
}
async init(wzcrkguid) {
try {
console.log("查询状态开始", dateUtils.formatDate(new Date()));
const params = {
wzcrkguid,
};
const res = await bzhxModel.getPmhxActive(params, this.pageType) as PmActive[]
console.log("查询状态结束", dateUtils.formatDate(new Date()));
// console.log("查询数据", res);
this.dataSource = res;
const wcData = res.filter((item) => item.wczt == "已完成");
console.log("wcDatawcData", wcData);
this.wcsl = wcData.length;
const wwcData = res.filter((item) => item.wczt == "未完成");
this.wwcsl = wwcData.length;
const pzslList = res.map((item) => item.pzsl);
const crkslList = res.map((item) => item.crksl);
var pzslHj = 0;
var crkslHj = 0;
if (pzslList && pzslList.length > 0) {
pzslHj = pzslList.reduce(function (prev, cur, index, array) {
return Number(prev) + Number(cur);
});
} else {
pzslHj = 0;
}
if (crkslList && crkslList.length > 0) {
crkslHj = crkslList.reduce(function (prev, cur, index, array) {
return Number(prev) + Number(cur);
});
} else {
crkslHj = 0;
}
// return pzslHj + '/' + crkslHj
this.pzslhj = pzslHj;
this.crkhj = crkslHj;
} catch (e) {
//TODO handle the exception
}
}
async handleviewpm(row) {
this.datasourcepm = [];
// this.current = row;
const params = {
wzcrkguid: this.wzcrkguid,
pmdmcode: row.pmdm,
};
// const res = await selectInformationType(
// "GY_M_PMV3",
// getPmhxDetailActive(params, this.pageType)
// );
const res = await bzhxModel.getPmhxDetailActive(params, this.pageType) as PmActive[]
console.log("查询sql", res);
this.datasourcepm = res;
const wcData = res.filter((item) => item.wczt == "");
console.log("wcDatawcData", wcData);
this.pmwcsl = wcData.length;
const wwcData = res.filter((item) => item.wczt == "未完成");
this.pmwwcsl = wwcData.length;
const pzslList = res.map((item) => item.pzsl);
const crkslList = res.map((item) => item.crksl);
var pzslHj = 0;
var crkslHj = 0;
if (pzslList && pzslList.length > 0) {
pzslHj = pzslList.reduce(function (prev, cur, index, array) {
return Number(prev) + Number(cur);
});
} else {
pzslHj = 0;
}
if (crkslList && crkslList.length > 0) {
crkslHj = crkslList.reduce(function (prev, cur, index, array) {
return Number(prev) + Number(cur);
});
} else {
crkslHj = 0;
}
// return pzslHj + '/' + crkslHj
this.pmpzslhj = pzslHj;
this.pmcrkhj = crkslHj;
// this.dialogController.open()
}
onCancel() {
console.info('------取消------')
}
onSubmit() {
console.info('------确认------')
}
existApp() {
console.info('Click the callback in the blank area')
}
build() {
Column() {
TitleBar({ title: "物资状态" })
Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Column() {
Text('完成:' + this.wcsl + '个' + ' 未完成:' + this.wwcsl + '个').fontSize(13)
}
Column() {
Text('数量:' + this.crkhj + '/' + this.pzslhj + '个').fontSize(13)
}
}
.width('100%')
.backgroundColor('#fff')
.height(52)
.borderRadius(5)
.margin({ bottom: 10 })
.padding({ left: 10, right: 10 })
Row() {
List({ space: 2 }) {
ForEach(this.dataSource, (item: PmActive) => {
ListItem() {
Row() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text('名称: ' + item.wzpm).fontSize(14).fontColor('#3b4144')
Text('代码: ' + item.pmdm).fontSize(14).fontColor('#3b4144')
Button('号型信息').CommonButtonStyle()
}
.width('70%')
Blank()
.layoutWeight(1)
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text(this.convertionPzslName() + item.pzsl).fontSize(14).fontColor('#3b4144')
Text(this.convertionCrkName() + item.crksl).fontSize(14).fontColor('#3b4144')
// Text(item.status).fontSize(14).fontColor( item.status == '未完成' ? 'red': 'green')
if (item.wczt == '未完成') {
Text('未完成').fontSize(14).fontColor('red')
} else {
Text('完成').fontSize(14).fontColor('green')
}
}
.width('40%')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height(90)
.onClick(() => {
this.handleviewpm(item)
})
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ bottom: 50 })
}.padding({ bottom: 20, left: 20, right: 20 })
}
.height('100%')
.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]
})
}
}
\ No newline at end of file
entry/src/main/ets/pages/metailmange/WzStatus.ets
deleted
100644 → 0
View file @
7f0815d0
import { LeftDialog } from '../metailmange/WzInPage/WzinDetail/LeftDialog'
import { TitleBar } from '../../view/title/TitleBar'
import router from '@ohos.router'
import { WzmxClass } from './Common/Wzcrk.data'
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(3)
.type(ButtonType.Normal)
.height(30)
.stateEffect(true)
}
interface params {
wzmx: WzmxClass[]
}
@Entry
@Component
export struct WzStatus {
@State private finishNum: number = 0
@State private unFinishNum: number = 5
@State private numberPercentage: string = "0/500个"
@State show: boolean = false
@State currentItem: WzmxClass = null
@State private dataSource: WzmxClass[] = []
// @State private dataSourceGroup: WzmxClass[] = [] // 物资代码相同的合并
aboutToAppear() {
const params = router.getParams() as params
this.dataSource = params.wzmx
const pzsl = this.dataSource.map(v => Number(v.pzsl)).reduce((a, b) => a + b, 0)
const crksl = this.dataSource.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
this.numberPercentage = crksl + '/' + pzsl
// for (let i = 0; i < this.dataSource.length; i++) {
// const element = this.dataSource[i];
// const index = this.dataSourceGroup.findIndex(v => v.pmdmSix === element.pmdmSix)
// if(index == -1) {
// this.dataSourceGroup.push(element)
// } else{
// this.dataSourceGroup[index].crksl += this.dataSourceGroup[index].crksl
// this.dataSourceGroup[index].pzsl += this.dataSourceGroup[index].pzsl
// }
// }
// this.dataSourceGroup = dataSource
}
dialogController: CustomDialogController = new CustomDialogController({
builder: LeftDialog({
cancel: this.onCancel,
confirm: this.onSubmit,
item:this.currentItem
}),
alignment: DialogAlignment.CenterEnd,
customStyle: true,
})
onCancel() {
console.info('------取消------')
}
onSubmit() {
console.info('------确认------')
}
existApp() {
console.info('Click the callback in the blank area')
}
build() {
Column() {
TitleBar({ title: "物资状态" })
Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Column() {
Text('完成:' + this.finishNum + '个' + ' 未完成:' + this.unFinishNum + '个').fontSize(13)
}
Column() {
Text('数量:' + this.numberPercentage).fontSize(13)
}
}
.width('100%')
.backgroundColor('#fff')
.height(52)
.borderRadius(5)
.margin({ bottom: 10 })
.padding({ left: 10, right: 10 })
Row() {
List({ space: 2 }) {
ForEach(this.dataSource, (item: WzmxClass) => {
ListItem() {
Row() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text('名称: ' + item.wzpm).fontSize(14).fontColor('#3b4144')
Text('代码: ' + item.pmdmSix).fontSize(14).fontColor('#3b4144')
Button('号型信息').CommonButtonStyle()
}
.width('70%')
Blank()
.layoutWeight(1)
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('凭证数量: ' + item.pzsl).fontSize(14).fontColor('#3b4144')
Text('入库数量: ' + item.crksl).fontSize(14).fontColor('#3b4144')
// Text(item.status).fontSize(14).fontColor( item.status == '未完成' ? 'red': 'green')
if(item.wczt == '未完成' && item.crksl < item.pzsl) {
Text('未完成').fontSize(14).fontColor('red')
} else {
Text('完成').fontSize(14).fontColor( 'green')
}
}
.width('40%')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height(90)
.onClick(() => {
this.currentItem = item
if (this.dialogController != undefined) {
this.dialogController.open()
}
})
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ bottom: 50 })
}.padding({ bottom: 20, left: 20, right: 20 })
}
.height('100%')
.linearGradient({
direction: GradientDirection.RightBottom,
repeating: true,
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]
})
}
}
\ No newline at end of file
entry/src/main/resources/base/profile/main_pages.json
View file @
aea4e738
...
...
@@ -49,7 +49,7 @@
"pages/order_detail/PzPourStoragePage"
,
"pages/sub_systemMaintenance/Version"
,
"pages/sub_systemMaintenance/Feedback"
,
"pages/metailmange/WzStatus"
,
"pages/metailmange/Wz
InPage/WzinDetail/Wz
Status"
,
"pages/metailmange/UHFScanPage"
,
"identify/demo_page/UHFDemo"
,
"identify/demo_page/ScanDemo"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论