Commit 26fd5c1d by 陈桂东

commit

parent 2e175768
{
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"reflect-metadata@^0.1.13": "reflect-metadata@0.1.13",
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1"
},
"packages": {
"reflect-metadata@0.1.13": {
"resolved": "https://repo.harmonyos.com/ohpm/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
},
"@ohos/axios@2.1.1": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w=="
}
}
}
\ No newline at end of file
......@@ -67,6 +67,16 @@ export class BzhxDao extends BaseTable<Bzhx> {
wp.orderByAsc('GUID').offsetAs(offset).limitAs(20);
return this.query(wp, this.getTableColumns())
}
// 获取被装号型列表
async getBzhxByCode(pmdmcode: string): Promise<Bzhx[]> {
let wp = this.getPredicates();
wp.equalTo('PMDMTEN', pmdmcode);
return this.query(wp, this.getTableColumns())
}
async selectWZInfo(lsm?:string):Promise<Bzhx[]>{
let wp = this.getPredicates();
if (lsm) {
......
......@@ -22,10 +22,18 @@ class BzhxModel {
}
// 查询被装号型
async query(offset: number, pmdmsix? : string,pmdmten? : string): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix, pmdmten)
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> {
let res = await SQLiteContext.with(BzhxDao).getBzhxByCode(pmdmcode)
return res[0];
}
async queryLsm(lsm?: string):Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).selectWZInfo(lsm);
Logger.info("查询LSM结果"+JSON.stringify(res))
......
import { HwInfo, SQLiteContext,HwInfoDao } from '@ohos/common'
import { HwInfo, SQLiteContext, HwInfoDao } from '@ohos/common'
// 货位管理
class HwModel {
// 添加货位
async set(data: HwInfo[]) {
await SQLiteContext.with(HwInfoDao).batchInsert(data)
const copyData = data.map((v) => {
return {
...v,
hwzt: "11111111SF1"
}
})
await SQLiteContext.with(HwInfoDao).batchInsert(copyData)
}
// 查询货位
async query(no? : string): Promise<HwInfo[]> {
async query(no?: string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
return res;
}
// 查询库房下货位
async queryHw(kfguid? : string): Promise<HwInfo[]> {
async queryHw(kfguid?: string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getselectHwList(kfguid)
return res;
}
......@@ -21,7 +27,6 @@ class HwModel {
async clear() {
await SQLiteContext.with(HwInfoDao).clearTable()
}
}
const hwModel = new HwModel()
......
......@@ -17,10 +17,8 @@ export struct LeftDialog {
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')
......@@ -29,9 +27,7 @@ export struct LeftDialog {
}
Text('入库数量: ' + this.item.crksl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
}
.width('40%')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
......
......@@ -26,9 +26,6 @@ export struct PzInfo {
case 'zmlx':
return renderZmlx(this.wzcrk.zmlx)
case '':
return ''
default:
return String(this.wzcrk[key])
}
......@@ -50,6 +47,8 @@ export struct PzInfo {
.width("70%")
.height(40)
.padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
}.padding("10vp")
......
......@@ -5,7 +5,6 @@ import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import {WzInfo} from './WzInfo'
import {PzInfo} from './PzInfo'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { Wzcrkmx } from '@ohos/common/src/main/ets/entity/Wzcrkmx';
import { WzmxClass } from '../Wzin.data';
import bzhxModel from '../../../../model/BzhxModel';
......@@ -43,28 +42,26 @@ struct WzinDetail{
// 获取凭证信息
async getDetail() {
const res = await wzcrkmxModel.query(this.wzcrk.guid)
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
for (let index = 0; index < res.length; index++) {
const element = res[index];
const res1 = await bzhxModel.query(0, '', element.pmdmcode)
const res1 = await bzhxModel.queryByCode(element.pmdmcode)
Logger.info('查询到对应品名代码》》',JSON.stringify(res1))
// @ts-ignore
element.xh = res1[0].xh
element.xh = res1.xh
// @ts-ignore
element.hxmc = res1[0].hxmc
element.hxmc = res1.hxmc
// @ts-ignore
element.pmdmSix = res1[0].pmdmSix
element.pmdmSix = res1.pmdmSix
// @ts-ignore
element.wzpm = res1[0].wzpm
element.wzpm = res1.wzpm
// @ts-ignore
element.wczt = this.wzcrk.wczt
// @ts-ignore
this.wzmx.push(new WzmxClass(element))
}
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(this.wzmx))
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
......@@ -77,9 +74,6 @@ struct WzinDetail{
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
@Builder VoucherRow() {
}
build(){
Column() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论