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> { ...@@ -67,6 +67,16 @@ export class BzhxDao extends BaseTable<Bzhx> {
wp.orderByAsc('GUID').offsetAs(offset).limitAs(20); wp.orderByAsc('GUID').offsetAs(offset).limitAs(20);
return this.query(wp, this.getTableColumns()) 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[]>{ async selectWZInfo(lsm?:string):Promise<Bzhx[]>{
let wp = this.getPredicates(); let wp = this.getPredicates();
if (lsm) { if (lsm) {
......
...@@ -22,10 +22,18 @@ class BzhxModel { ...@@ -22,10 +22,18 @@ class BzhxModel {
} }
// 查询被装号型 // 查询被装号型
async query(offset: number, pmdmsix? : string,pmdmten? : string): Promise<Bzhx[]> { async query(offset: number, pmdmsix? : string): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix, pmdmten) let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix)
return res; 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[]> { async queryLsm(lsm?: string):Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).selectWZInfo(lsm); let res = await SQLiteContext.with(BzhxDao).selectWZInfo(lsm);
Logger.info("查询LSM结果"+JSON.stringify(res)) Logger.info("查询LSM结果"+JSON.stringify(res))
......
import { HwInfo, SQLiteContext,HwInfoDao } from '@ohos/common' import { HwInfo, SQLiteContext, HwInfoDao } from '@ohos/common'
// 货位管理 // 货位管理
class HwModel { class HwModel {
// 添加货位 // 添加货位
async set(data: HwInfo[]) { 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) let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
return res; return res;
} }
// 查询库房下货位 // 查询库房下货位
async queryHw(kfguid? : string): Promise<HwInfo[]> { async queryHw(kfguid?: string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getselectHwList(kfguid) let res = await SQLiteContext.with(HwInfoDao).getselectHwList(kfguid)
return res; return res;
} }
...@@ -21,7 +27,6 @@ class HwModel { ...@@ -21,7 +27,6 @@ class HwModel {
async clear() { async clear() {
await SQLiteContext.with(HwInfoDao).clearTable() await SQLiteContext.with(HwInfoDao).clearTable()
} }
} }
const hwModel = new HwModel() const hwModel = new HwModel()
......
...@@ -17,10 +17,8 @@ export struct LeftDialog { ...@@ -17,10 +17,8 @@ export struct LeftDialog {
Text('凭证数量:' + this.item.pzsl).fontSize(12).fontColor('#3b4144').margin({ top: 30 }) Text('凭证数量:' + this.item.pzsl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
} }
.width('70%') .width('70%')
Blank() Blank()
.layoutWeight(1) .layoutWeight(1)
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Start }) { Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center, alignItems: ItemAlign.Start }) {
if(this.item.wczt == '未完成' && this.item.crksl < this.item.pzsl) { if(this.item.wczt == '未完成' && this.item.crksl < this.item.pzsl) {
Text('未完成').fontSize(14).fontColor('red') Text('未完成').fontSize(14).fontColor('red')
...@@ -29,9 +27,7 @@ export struct LeftDialog { ...@@ -29,9 +27,7 @@ export struct LeftDialog {
} }
Text('入库数量: ' + this.item.crksl).fontSize(12).fontColor('#3b4144').margin({ top: 30 }) Text('入库数量: ' + this.item.crksl).fontSize(12).fontColor('#3b4144').margin({ top: 30 })
} }
.width('40%') .width('40%')
} }
.width('100%') .width('100%')
.justifyContent(FlexAlign.SpaceBetween) .justifyContent(FlexAlign.SpaceBetween)
......
...@@ -26,9 +26,6 @@ export struct PzInfo { ...@@ -26,9 +26,6 @@ export struct PzInfo {
case 'zmlx': case 'zmlx':
return renderZmlx(this.wzcrk.zmlx) return renderZmlx(this.wzcrk.zmlx)
case '':
return ''
default: default:
return String(this.wzcrk[key]) return String(this.wzcrk[key])
} }
...@@ -50,6 +47,8 @@ export struct PzInfo { ...@@ -50,6 +47,8 @@ export struct PzInfo {
.width("70%") .width("70%")
.height(40) .height(40)
.padding(10) .padding(10)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor") .backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled) .enabled(item.enabled)
}.padding("10vp") }.padding("10vp")
......
...@@ -5,7 +5,6 @@ import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk'; ...@@ -5,7 +5,6 @@ import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import {WzInfo} from './WzInfo' import {WzInfo} from './WzInfo'
import {PzInfo} from './PzInfo' import {PzInfo} from './PzInfo'
import wzcrkmxModel from '../../../../model/WzcrkmxModel'; import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { Wzcrkmx } from '@ohos/common/src/main/ets/entity/Wzcrkmx';
import { WzmxClass } from '../Wzin.data'; import { WzmxClass } from '../Wzin.data';
import bzhxModel from '../../../../model/BzhxModel'; import bzhxModel from '../../../../model/BzhxModel';
...@@ -43,28 +42,26 @@ struct WzinDetail{ ...@@ -43,28 +42,26 @@ struct WzinDetail{
// 获取凭证信息 // 获取凭证信息
async getDetail() { async getDetail() {
const res = await wzcrkmxModel.query(this.wzcrk.guid) const res = await wzcrkmxModel.query(this.wzcrk.guid)
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
for (let index = 0; index < res.length; index++) { for (let index = 0; index < res.length; index++) {
const element = res[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)) Logger.info('查询到对应品名代码》》',JSON.stringify(res1))
// @ts-ignore // @ts-ignore
element.xh = res1[0].xh element.xh = res1.xh
// @ts-ignore // @ts-ignore
element.hxmc = res1[0].hxmc element.hxmc = res1.hxmc
// @ts-ignore // @ts-ignore
element.pmdmSix = res1[0].pmdmSix element.pmdmSix = res1.pmdmSix
// @ts-ignore // @ts-ignore
element.wzpm = res1[0].wzpm element.wzpm = res1.wzpm
// @ts-ignore // @ts-ignore
element.wczt = this.wzcrk.wczt element.wczt = this.wzcrk.wczt
// @ts-ignore // @ts-ignore
this.wzmx.push(new WzmxClass(element)) this.wzmx.push(new WzmxClass(element))
} }
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(this.wzmx))
} }
@Builder TabBuilder(index: number, name: string) { @Builder TabBuilder(index: number, name: string) {
Column() { Column() {
Text(name) Text(name)
...@@ -77,9 +74,6 @@ struct WzinDetail{ ...@@ -77,9 +74,6 @@ struct WzinDetail{
.borderRadius(3) .borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000') .backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
} }
@Builder VoucherRow() {
}
build(){ build(){
Column() { Column() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论