Commit 8e3b508e by 陈桂东

提交代码

parent 7dad8b73
......@@ -32,4 +32,5 @@ export interface WzcrkDetailDto {
fwgldwdm: string,
swgldwdm: string,
zmlx: string,
hwh?:string
}
\ No newline at end of file
......@@ -21,7 +21,26 @@ export class NativeSql {
*
*/
static getSqlByCrkDetail(wzcrkguid: string): string {
let sql_val = `SELECT crk.pzlx pzlx, crk.guid, crk.pzh pzh, rk.kfdm rkkfdm, ck.kfdm kfdm, crk.pzszlx pzszlx, crk.sfdw sfdw, crk.ydh ydh, crk.dec dec, crk.fwgldwdm fwgldwdm, crk.swgldwdm swgldwdm, crk.zmlx zmlx FROM tab_bzgl_knzy_app_wzcrk crk LEFT JOIN TAB_BZGL_KNZY_APP_DWKF ck ON ck.KFDM = crk.kfdm LEFT JOIN TAB_BZGL_KNZY_APP_DWKF rk ON rk.KFDM = crk.rkkfdm WHERE crk.guid = '${ wzcrkguid }'`
// let sql_val = `SELECT crk.pzlx pzlx, crk.guid, crk.pzh pzh, rk.kfdm rkkfdm, ck.kfdm kfdm, crk.pzszlx pzszlx, crk.sfdw sfdw, crk.ydh ydh, crk.dec dec, crk.fwgldwdm fwgldwdm, crk.swgldwdm swgldwdm, crk.zmlx zmlx FROM tab_bzgl_knzy_app_wzcrk crk LEFT JOIN TAB_BZGL_KNZY_APP_DWKF ck ON ck.KFDM = crk.kfdm LEFT JOIN TAB_BZGL_KNZY_APP_DWKF rk ON rk.KFDM = crk.rkkfdm WHERE crk.guid = '${ wzcrkguid }'`
let sql_val = `SELECT
crk.pzlx pzlx,
crk.guid,
crk.pzh pzh,
rk.kfdm rkkfdm,
ck.kfdm kfdm,
crk.pzszlx pzszlx,
crk.sfdw sfdw,
crk.ydh ydh,
crk.dec dec,
crk.fwgldwdm fwgldwdm,
crk.swgldwdm swgldwdm,
crk.zmlx zmlx
FROM
tab_bzgl_knzy_app_wzcrk crk
LEFT JOIN TAB_BZGL_KNZY_APP_DWKF ck ON ck.KFDM = crk.kfdm
LEFT JOIN TAB_BZGL_KNZY_APP_DWKF rk ON rk.KFDM = crk.rkkfdm
WHERE
crk.guid = '${wzcrkguid}'`;
return sql_val;
}
......
......@@ -3,7 +3,7 @@ import { Logger } from '@ohos/common';
import gldwModel from '../../../model/GldwModel';
import kfModel from '../../../model/KfModel';
import { DividerTitle } from '../../../view/DividerTitle/DividerTitle';
import { WzClass, WzmxClass } from './Wzcrk.data';
import { PzFormClass, WzClass, WzmxClass } from './Wzcrk.data';
import { WzList } from '../WzInPage/WzinDetail/WzList';
import { WzScanInfoDialog } from './Dialog/WzScanInfoDialog';
import { analysisQrCode } from '../../../identify/analysis/analysis_QR_code'
......@@ -38,9 +38,7 @@ export struct WzInfo {
@State isHaveButton: boolean = false // 完成状态, 未完成是true, 其他false
@State isAutomation: boolean = true //控制扫描提示显示隐藏
@State defaultHwh: string = this.convertionDefaultHwh()
@State pzForm: pzForm= {
hwh: ''
}
@Link pzForm: PzFormClass
@State currentDw: string = ''
@State kfmc: string = ''
@State wzmx: WzmxClass[] = []
......
import { pzlx_dict, szlx_dict, new_zmlx_dict, Logger } from '@ohos/common'
import { Logger, new_zmlx_dict, pzlx_dict, szlx_dict } from '@ohos/common'
import wzcrkModel from '../../../model/WzcrkModel'
......@@ -242,6 +242,57 @@ export class WzmxClass {
}
}
// 物资表单详情
@Observed
export class PzFormClass {
guid: string;
pzlx: string;
pzh: number;
rkkfdm: string;
kfdm: string;
pzszlx: string;
sfdw: string;
ydh: string;
dec: string;
fwgldwdm: string;
swgldwdm: string;
zmlx: string;
hwh?: string;
constructor(
data: {
guid: string,
pzlx: string,
pzh: number,
rkkfdm: string,
kfdm: string,
pzszlx: string,
sfdw: string,
ydh: string,
dec: string,
fwgldwdm: string,
swgldwdm: string,
zmlx: string,
hwh?: string
}
) {
this.guid = data.guid || '';
this.pzlx = data.pzlx || '';
this.pzh = data.pzh || 0;
this.rkkfdm = data.rkkfdm || '';
this.kfdm = data.kfdm || '';
this.pzszlx = data.pzszlx || '';
this.sfdw = data.sfdw || '';
this.ydh = data.ydh || '';
this.dec = data.dec || '';
this.fwgldwdm = data.fwgldwdm || '';
this.swgldwdm = data.swgldwdm || '';
this.zmlx = data.zmlx || '';
this.hwh = data.hwh || '';
}
}
// 凭证类型
export function renderPzlx(pzlx) {
Logger.info('szlx>>', pzlx)
......
......@@ -5,7 +5,7 @@ import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { WzInfo } from '../../Common/WzInfo'
import { PzInfo } from './PzInfo'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { WzClass, WzmxClass } from '../../Common/Wzcrk.data';
import { PzFormClass, WzClass, WzmxClass } from '../../Common/Wzcrk.data';
import promptAction from '@ohos.promptAction';
import wzcrkModel from '../../../../model/WzcrkModel';
import { SQLiteContext, Wzcrkmx, WzcrkmxDao } from '@ohos/common';
......@@ -13,6 +13,7 @@ import { AddWzin } from './AddWzin'
import { uuid } from '@ohos/common/src/main/ets/utils/util';
import IdentifyService from '../../../../identify/IdentifySerivce'
import emitter from '@ohos.events.emitter';
import { WzcrkDetailDto } from '@ohos/common/src/main/ets/bean/dto/WzcrkMxRefWzDto';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
......@@ -38,9 +39,9 @@ struct WzinDetail {
@State isUpdate: boolean = false
@State wzcrk: WzClass = null // 物资出入库单据信息
@State wzmx: WzmxClass[] = [] // 物资出入库明细
private controller: TabsController = new TabsController()
@State pzForm: PzFormClass = null // 物资出入库表单详情
wzcrkmxDao: WzcrkmxDao = SQLiteContext.with(WzcrkmxDao)
private controller: TabsController = new TabsController()
onPageShow() {
const params = router.getParams() as params
......@@ -58,7 +59,7 @@ struct WzinDetail {
async getWzFormDetail() {
Logger.info('获取物资表单详情>>', JSON.stringify(this.wzcrk.guid))
const res = await wzcrkModel.queryByCrkDetailGuid(this.wzcrk.guid)
Logger.info('获取到物资出入库表单>>', JSON.stringify(res))
this.pzForm = new PzFormClass(res[0])
}
// 获取物资列表详情信息
......@@ -105,7 +106,7 @@ struct WzinDetail {
TabContent() {
Column() {
WzInfo({ wzmx: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getWzmxList, pageType: "入库" })
WzInfo({ wzmx: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getWzmxList, pageType: "入库", pzForm: this.pzForm })
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
......@@ -171,9 +172,9 @@ struct WzinDetail {
}.onKeyEvent((e: globalThis.KeyEvent) => {
console.error('keycode====》:' + e.keyCode)
if ((e.keyCode == 2096 || e.keyCode == 2093)) {
if(e.type==1){
if(this.currentIndex==0){
this.currentIndex=1
if (e.type == 1) {
if (this.currentIndex == 0) {
this.currentIndex = 1
}
IdentifyService.openScan()
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论