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
51fe3548
Commit
51fe3548
authored
Jan 28, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时单据的凭证号
parent
21fdadeb
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
58 行增加
和
25 行删除
+58
-25
RecommendHwDto.ts.ets
common/src/main/ets/bean/dto/RecommendHwDto.ts.ets
+6
-1
WzcrkDao.ets
common/src/main/ets/db/dao/WzcrkDao.ets
+27
-1
NativeSql.ets
common/src/main/ets/db/sql/NativeSql.ets
+7
-0
WzcrkModel.ets
entry/src/main/ets/model/WzcrkModel.ets
+5
-0
WzinsertDetail.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinsertDetail.ets
+13
-23
没有找到文件。
common/src/main/ets/bean/dto/RecommendHwDto.ts.ets
View file @
51fe3548
...
...
@@ -84,5 +84,9 @@ export interface WzmxDto {
hwh: string,
mxguid: string,
pzmxguid: string
}
export interface PzhDto {
pzh: number
}
\ No newline at end of file
common/src/main/ets/db/dao/WzcrkDao.ets
View file @
51fe3548
import relationalStore from '@ohos.data.relationalStore';
import { DjcxDto, PzMxDto, WzmxDto } from '../../bean/dto/RecommendHwDto.ts';
import { DjcxDto, Pz
hDto, Pz
MxDto, WzmxDto } from '../../bean/dto/RecommendHwDto.ts';
import { WzcrkDetailDto } from '../../bean/dto/WzcrkMxRefWzDto';
import { Wzcrk } from '../../entity/Wzcrk';
import { Wzcrkmx } from '../../entity/Wzcrkmx';
...
...
@@ -319,5 +319,30 @@ export class WzcrkDao extends BaseTable<Wzcrk> {
return info;
}
//获取临时单据的凭证号
async getPzh(params) : Promise<PzhDto[]> {
try {
let val_sql = NativeSql.getPzhSql(params);
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toPzh(rs))
} while (rs.goToNextRow())
}
Logger.info(this, 'queryAll items22=' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
toPzh(cursor: relationalStore.ResultSet): PzhDto {
let info: PzhDto = {
pzh: cursor.getLong(cursor.getColumnIndex('pzh')),
};
return info;
}
}
\ No newline at end of file
common/src/main/ets/db/sql/NativeSql.ets
View file @
51fe3548
...
...
@@ -138,6 +138,13 @@ WHERE
return sql
}
// 临时凭证号查询
static getPzhSql(params): string {
const sql =
`select 'LS' || (count(1) + 1) pzh from tab_bzgl_knzy_app_wzcrk where sjlx = '${params.sjlx}' and pzlx = ${params.pzlx}`
return sql
}
/**
* 包裹管理表
*/
...
...
entry/src/main/ets/model/WzcrkModel.ets
View file @
51fe3548
...
...
@@ -111,6 +111,11 @@ class WzcrkModel {
let res = await SQLiteContext.with(WzcrkDao).getWzmx(params)
return res
}
// 获取临时单据的凭证号
async getLhPzh(params) {
let res = await SQLiteContext.with(WzcrkDao).getPzh(params)
return res
}
// 清空表
async clear() {
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinsertDetail.ets
View file @
51fe3548
...
...
@@ -11,6 +11,7 @@ import { uuid } from '@ohos/common/src/main/ets/utils/util';
import IdentifyService from '../../../../identify/IdentifySerivce'
import emitter from '@ohos.events.emitter';
import { WzInsertInfo } from '../../Common/WzInsertInfo';
import { zmlx_dict } from '@ohos/common/src/main/ets/utils/dict';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
...
...
@@ -61,20 +62,20 @@ struct WzinsertDetail {
if (data.sjlx) {
this.currentSjlx = data.sjlx
}
this.pzForm.zmlx = this.
zmlx_dict[0].value
var
newType = 'rkd'
// this.pzForm.zmlx =
zmlx_dict[0].value
let
newType = 'rkd'
switch (data.pzlx) {
case '1':
this.pageType = '入库'
newType = 'rkd'
this.pzForm.pzlx =
14
this.pzForm.pzlx =
'14'
this.pzForm.pzszlx = 'DR'
this.hanleGetDefaultPzh(this.pzForm.pzlx)
break;
case '2':
this.pageType = '出库'
newType = 'ckd'
this.pzForm.pzlx =
17
this.pzForm.pzlx =
'17'
this.pzForm.pzszlx = 'DC'
this.hanleGetDefaultPzh(this.pzForm.pzlx)
break;
...
...
@@ -85,8 +86,8 @@ struct WzinsertDetail {
case '4':
this.pageType = '调号'
newType = 'thd'
this.pzF
rom.pzlx = 41
this.pzF
ro
m.pzszlx = 'HXTH'
this.pzF
orm.pzlx = '41'
this.pzF
or
m.pzszlx = 'HXTH'
this.hanleGetDefaultPzh(this.pzForm.pzlx)
break;
case 'HW44':
...
...
@@ -101,12 +102,11 @@ struct WzinsertDetail {
default:
this.pageType = '入库'
newType = 'rkd'
this.pzForm.pzlx =
14
this.pzForm.pzlx =
'14'
this.pzForm.pzszlx = 'DR'
this.hanleGetDefaultPzh(this.pzForm.pzlx)
break;
}
this.pzlxOption = pzlxOption.filter((item) => item.type == newType)
}
/***
...
...
@@ -120,21 +120,11 @@ struct WzinsertDetail {
pzlx: pzlx,
sjlx: this.currentSjlx || '新建'
}
const res = await getDefaultPzh(pzlx)
this.pzForm.pzh = res
// if (res && res.length > 0) {
// this.pzhOption = res.map((item) => {
// return {
// text: item.pzh,
// value: item.pzh
// }
// })
// this.pzForm.pzh = res[0].pzh
// } else {
// this.pzhOption = []
// this.pzForm.pzh = ''
// }
},
const res = await wzcrkModel.getLhPzh(params)
if (res && res.length > 0) {
this.pzForm.pzh = res[0].pzh
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论