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
f7a8f5b4
Commit
f7a8f5b4
authored
Jan 25, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
插入数据
parent
65f8d38f
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
30 行增加
和
30 行删除
+30
-30
WzcrkmxDao.ets
common/src/main/ets/db/dao/WzcrkmxDao.ets
+8
-5
NativeSql.ets
common/src/main/ets/db/sql/NativeSql.ets
+0
-3
WzInfo.ets
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
+8
-7
Wzcrk.data.ets
entry/src/main/ets/pages/metailmange/Common/Wzcrk.data.ets
+10
-4
WzinDetail.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
+2
-9
WzInvDetail.ets
entry/src/main/ets/pages/metailmange/WzInvPage/WzInvDetail/WzInvDetail.ets
+1
-1
WzOutDetail.ets
entry/src/main/ets/pages/metailmange/WzOutPage/WzOutDetail/WzOutDetail.ets
+1
-1
没有找到文件。
common/src/main/ets/db/dao/WzcrkmxDao.ets
View file @
f7a8f5b4
...
@@ -362,12 +362,15 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
...
@@ -362,12 +362,15 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
}
}
}
}
async updateWzmx(params) {
async updateWzmx(params)
: Promise<number>
{
try {
try {
let val_sql = NativeSql.updateWzmxSql(params)
let valueBucket = {
let db = await this.futureDb;
hwh: params.hwh,
let rs = await db.querySql(val_sql);
crksl: params.crksl
return rs;
}
let wp = this.getPredicates()
wp.equalTo('guid', params.mxguid)
return this.updateData(valueBucket, wp)
} catch (e) {
} catch (e) {
throw new Error('[更新异常]|' + e)
throw new Error('[更新异常]|' + e)
}
}
...
...
common/src/main/ets/db/sql/NativeSql.ets
View file @
f7a8f5b4
import { uuid } from '../../utils/util';
import { uuid } from '../../utils/util';
import { Logger } from '../../utils/Logger';
export class NativeSql {
export class NativeSql {
/**
/**
* 构建出入库明细查询语句
* 构建出入库明细查询语句
...
@@ -173,7 +171,6 @@ WHERE
...
@@ -173,7 +171,6 @@ WHERE
if (hjh) {
if (hjh) {
sql_val += ` where hjh = '${hjh}'`
sql_val += ` where hjh = '${hjh}'`
}
}
Logger.info('sql_val>>', sql_val)
return sql_val
return sql_val
}
}
...
...
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
View file @
f7a8f5b4
...
@@ -106,7 +106,7 @@ export struct WzInfo {
...
@@ -106,7 +106,7 @@ export struct WzInfo {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
ForEach(this.currentWZInfo, item => {
ForEach(this.currentWZInfo, item => {
Text(item.pmdm
code
).width("25%").textAlign(TextAlign.Start).fontSize(14)
Text(item.pmdm
six
).width("25%").textAlign(TextAlign.Start).fontSize(14)
Text(item.wzpm).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.wzpm).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.hxmc).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.hxmc).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.crksl + '')
Text(item.crksl + '')
...
@@ -134,7 +134,6 @@ export struct WzInfo {
...
@@ -134,7 +134,6 @@ export struct WzInfo {
// 页面初始化
// 页面初始化
aboutToAppear() {
aboutToAppear() {
this.pzxqGuild = this.wzcrk.guid
this.pzxqGuild = this.wzcrk.guid
this.historicalInformation = this.wzmx
this.getData()
this.getData()
this.scanCodeListen();
this.scanCodeListen();
}
}
...
@@ -372,7 +371,7 @@ export struct WzInfo {
...
@@ -372,7 +371,7 @@ export struct WzInfo {
const [data] = this.historicalInformation.filter((item, index) => item
const [data] = this.historicalInformation.filter((item, index) => item
.pmdmcode == ITEM.pmdmcode && item.hwh == this.pzForm.hwh)
.pmdmcode == ITEM.pmdmcode && item.hwh == this.pzForm.hwh)
console.log('
data', data
)
console.log('
---过滤后的data---', JSON.stringify(data)
)
if (this.pageType == '调号') {
if (this.pageType == '调号') {
if (data && data.currentModel !== this.currentModel) {
if (data && data.currentModel !== this.currentModel) {
const model = data.currentModel ? '调出' : '调入'
const model = data.currentModel ? '调出' : '调入'
...
@@ -386,7 +385,7 @@ export struct WzInfo {
...
@@ -386,7 +385,7 @@ export struct WzInfo {
if (!!this.currentPmdmcode && this.currentPmdmcode.slice(0, 6) == ITEM
if (!!this.currentPmdmcode && this.currentPmdmcode.slice(0, 6) == ITEM
.pmdmcode
.pmdmcode
.slice(0, 6)) {
.slice(0, 6)) {
console.log('同品名数据时')
console.log('同品名数据时'
, JSON.stringify(res), JSON.stringify(ITEM)
)
this.handleSetInsertOrUpdate(res, ITEM)
this.handleSetInsertOrUpdate(res, ITEM)
// this.setDkScan(ITEM)
// this.setDkScan(ITEM)
} else {
} else {
...
@@ -484,7 +483,9 @@ export struct WzInfo {
...
@@ -484,7 +483,9 @@ export struct WzInfo {
hwh: testPmdmCodeSql[0].hwh || this.pzForm.hwh,
hwh: testPmdmCodeSql[0].hwh || this.pzForm.hwh,
crksl: update_crksl
crksl: update_crksl
}
}
await wzcrkmxModel.updateWzmx(updateParams)
console.log("updateParams", JSON.stringify(updateParams))
let s = await wzcrkmxModel.updateWzmx(updateParams)
console.log("updateParams执行成功或者失败:" + s)
} else {
} else {
var insert_crksl = 0
var insert_crksl = 0
if (this.pageType == '倒库' || this.pageType == '调号' || this.pageType == '换位') {
if (this.pageType == '倒库' || this.pageType == '调号' || this.pageType == '换位') {
...
@@ -1136,7 +1137,7 @@ export struct WzInfo {
...
@@ -1136,7 +1137,7 @@ export struct WzInfo {
.borderRadius(5)
.borderRadius(5)
Button("查看状态").CommonButtonStyle().width("25%").margin({ left: 5, right: 5 }).onClick(() => {
Button("查看状态").CommonButtonStyle().width("25%").margin({ left: 5, right: 5 }).onClick(() => {
router.pushUrl({ url: 'pages/metailmange/WzStatus', params: {
router.pushUrl({ url: 'pages/metailmange/WzStatus', params: {
wzmx: this.
wzmx
wzmx: this.
historicalInformation
} })
} })
})
})
}.width("100%")
}.width("100%")
...
@@ -1144,7 +1145,7 @@ export struct WzInfo {
...
@@ -1144,7 +1145,7 @@ export struct WzInfo {
Column() {
Column() {
List() {
List() {
ForEach(this.
wzmx
, (item) => {
ForEach(this.
historicalInformation
, (item) => {
ListItem() {
ListItem() {
WzList({ wzmx: item })
WzList({ wzmx: item })
}
}
...
...
entry/src/main/ets/pages/metailmange/Common/Wzcrk.data.ets
View file @
f7a8f5b4
...
@@ -169,7 +169,7 @@ export class WzmxClass {
...
@@ -169,7 +169,7 @@ export class WzmxClass {
/**
/**
* 品名代码
* 品名代码
*/
*/
//
pmdmcode: string
pmdmcode: string
/**
/**
* 凭证数量
* 凭证数量
*/
*/
...
@@ -211,10 +211,14 @@ export class WzmxClass {
...
@@ -211,10 +211,14 @@ export class WzmxClass {
*/
*/
wczt: string
wczt: string
currentModel?: boolean
constructor(data: {
constructor(data: {
guid?: string,
guid?: string,
// gznd: string,
// gznd: string,
//
pmdmcode: string,
pmdmcode: string,
pzsl: number,
pzsl: number,
crksl: number,
crksl: number,
wzcrkguid: string,
wzcrkguid: string,
...
@@ -224,11 +228,12 @@ export class WzmxClass {
...
@@ -224,11 +228,12 @@ export class WzmxClass {
xh: string,
xh: string,
wzpm: string,
wzpm: string,
pmdmSix: string,
pmdmSix: string,
wczt: string
wczt: string,
currentModel?: boolean
}) {
}) {
this.guid = data.guid;
this.guid = data.guid;
// this.gznd = data.gznd;
// this.gznd = data.gznd;
//
this.pmdmcode = data.pmdmcode;
this.pmdmcode = data.pmdmcode;
this.pzsl = data.pzsl;
this.pzsl = data.pzsl;
this.crksl = data.crksl;
this.crksl = data.crksl;
this.wzcrkguid = data.wzcrkguid;
this.wzcrkguid = data.wzcrkguid;
...
@@ -239,6 +244,7 @@ export class WzmxClass {
...
@@ -239,6 +244,7 @@ export class WzmxClass {
this.wzpm = data.wzpm;
this.wzpm = data.wzpm;
this.pmdmSix = data.pmdmSix;
this.pmdmSix = data.pmdmSix;
this.wczt = data.wczt;
this.wczt = data.wczt;
this.currentModel = data.currentModel
}
}
}
}
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
View file @
f7a8f5b4
...
@@ -108,15 +108,8 @@ struct WzinDetail {
...
@@ -108,15 +108,8 @@ struct WzinDetail {
// pageType必传 入库 出库 盘库 调号 倒库 换位
// pageType必传 入库 出库 盘库 调号 倒库 换位
// dataType必传 导入是true, 其他为false
// dataType必传 导入是true, 其他为false
// isHaveButton 必传 完成状态 未完成是true, 其他为false
// isHaveButton 必传 完成状态 未完成是true, 其他为false
WzInfo({
WzInfo({ historicalInformation: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getWzmxList,
wzmx: this.wzmx,
pageType: "入库", pzForm: this.pzForm, dataType: this.isUpdate ? true : false, isHaveButton: this.wzcrk.wczt == '未完成' ? true : false})
wzcrk: this.wzcrk,
getDetail: this.getWzmxList,
pageType: "入库",
pzForm: $pzForm,
dataType: this.isUpdate ? true : false,
isHaveButton: this.wzcrk.wczt == '未完成' ? true : false
})
}.width("100%")
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}.tabBar(this.TabBuilder(1, '物资信息'))
}
}
...
...
entry/src/main/ets/pages/metailmange/WzInvPage/WzInvDetail/WzInvDetail.ets
View file @
f7a8f5b4
...
@@ -85,7 +85,7 @@ struct WzInvDetail{
...
@@ -85,7 +85,7 @@ struct WzInvDetail{
TabContent() {
TabContent() {
Column() {
Column() {
WzInfo({
wzmx
: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail })
WzInfo({
historicalInformation
: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail })
}.width("100%")
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}.tabBar(this.TabBuilder(1, '物资信息'))
}
}
...
...
entry/src/main/ets/pages/metailmange/WzOutPage/WzOutDetail/WzOutDetail.ets
View file @
f7a8f5b4
...
@@ -92,7 +92,7 @@ struct WzOutDetail {
...
@@ -92,7 +92,7 @@ struct WzOutDetail {
TabContent() {
TabContent() {
Column() {
Column() {
WzInfo({
wzmx
: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail, pageType: "出库" })
WzInfo({
historicalInformation
: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail, pageType: "出库" })
}.width("100%")
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}.tabBar(this.TabBuilder(1, '物资信息'))
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论