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
9c73eeea
Commit
9c73eeea
authored
Jan 25, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
84bce72a
aee46615
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
96 行增加
和
1 行删除
+96
-1
NativeSql.ets
common/src/main/ets/db/sql/NativeSql.ets
+2
-0
WzcrkmxModel.ets
entry/src/main/ets/model/WzcrkmxModel.ets
+5
-0
WzInfo.ets
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
+89
-1
没有找到文件。
common/src/main/ets/db/sql/NativeSql.ets
View file @
9c73eeea
...
@@ -15,6 +15,8 @@ export class NativeSql {
...
@@ -15,6 +15,8 @@ export class NativeSql {
return sql_val;
return sql_val;
}
}
/**
/**
* 获取推荐货位
* 获取推荐货位
* @param pmguid 品名主键
* @param pmguid 品名主键
...
...
entry/src/main/ets/model/WzcrkmxModel.ets
View file @
9c73eeea
...
@@ -39,6 +39,11 @@ class WzcrkmxModel {
...
@@ -39,6 +39,11 @@ class WzcrkmxModel {
Logger.info('splsplspl>>',sql)
Logger.info('splsplspl>>',sql)
return await SQLiteContext.with(WzcrkmxDao).updateWcztBySql(sql)
return await SQLiteContext.with(WzcrkmxDao).updateWcztBySql(sql)
}
}
// 获取推荐货位
async queryRecommendHw(data) {
let res = await SQLiteContext.with(WzcrkmxDao).queryRecommendHw(data.pmguid, data.kfdm)
return res
}
// 清空表
// 清空表
async clear() {
async clear() {
await SQLiteContext.with(WzcrkmxDao).clearTable()
await SQLiteContext.with(WzcrkmxDao).clearTable()
...
...
entry/src/main/ets/pages/metailmange/Common/WzInfo.ets
View file @
9c73eeea
...
@@ -9,6 +9,8 @@ import { pzForm } from './action'
...
@@ -9,6 +9,8 @@ import { pzForm } from './action'
import { WzScanInfoDialog } from './Dialog/WzScanInfoDialog';
import { WzScanInfoDialog } from './Dialog/WzScanInfoDialog';
import { analysisQrCode } from '../../../identify/analysis/analysis_QR_code'
import { analysisQrCode } from '../../../identify/analysis/analysis_QR_code'
import emitter from '@ohos.events.emitter';
import emitter from '@ohos.events.emitter';
import Prompt from '@system.prompt';
import wzcrkmxModel from '../../../model/WzcrkmxModel';
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
...
@@ -41,6 +43,12 @@ export struct WzInfo {
...
@@ -41,6 +43,12 @@ export struct WzInfo {
@ObjectLink wzcrk: WzClass
@ObjectLink wzcrk: WzClass
getDetail: (wzpm?: string) => void
getDetail: (wzpm?: string) => void
// 在自定义组件即将析构销毁时将dialogController置空
aboutToDisappear() {
this.scanInfoDialog = undefined // 将dialogController置空
}
@Builder container() {
@Builder container() {
Column() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
...
@@ -153,10 +161,90 @@ export struct WzInfo {
...
@@ -153,10 +161,90 @@ export struct WzInfo {
* @description: 扫码解析
* @description: 扫码解析
*/
*/
async handleanalysisQrCode(value) {
async handleanalysisQrCode(value) {
console.log("扫码校验", "handleanalysisQrCode:" + value)
this.isAutomation = false
if (this.scanInfoDialog != undefined) {
this.scanInfoDialog.open()
}
const res = await analysisQrCode(value, false)
const res = await analysisQrCode(value, false)
if (res.data && res.data.length > 0) {
if (res.data && res.data.length > 0) {
console.log("解析货位", JSON.stringify(res.data))
console.log("解析货位", JSON.stringify(res.data))
//1. 获取默认货位
this.handleGetDefaultHwh(res)
// 2.检验基础数据
if (res.data.length == 0) {
Prompt.showToast({
message: '请检查基础数据是否完善'
})
return
}
// 无货位
// if (!this.wzcrk.hwh && !res.data[0].hwh) {
// Prompt.showToast({
// message: '请优先扫描货位'
// })
// return
// }
// 如果没有货位:
// if (!this.pzFrom.hwh && res.data[0].hwh) {
// // if (this.pageType == '倒库') {
// const hwParams = {
// kfdm: this.pzFrom.kfdm,
// hwh: res.data[0].hwh,
// hjguid: res.data[0].hjguid
// }
// // console.log('this.currentModel', this.currentModel, this.pzFrom)
// if (this.pageType == '倒库') {
// if (this.currentModel) {
// hwParams.kfdm = this.pzFrom.kfdm
// } else {
// hwParams.kfdm = this.pzFrom.rkkfdm
// }
// } else {
// hwParams.kfdm = this.pzFrom.kfdm
// }
// const testHwForKf = await selectInformationType("GY_M_PMV3",
// testHwWzSql(hwParams))
// if (testHwForKf.length == 0) {
// Prompt.showToast({
// message: '当前库房不存在' + res.data[0].hwh + '货位'
// })
// return
// }
// // }
// this.pzFrom.hwh = res.data[0].hwh
// this.pzFrom.hjguid = res.data[0].hjguid
// this.currentHwh = res.data[0].hwh
// Prompt.showToast({
// message: '当前货位:' + res.data[0].hwh,
// })
// return
// }
}
}
handleGetDefaultHwh(res) {
try {
var defaultArr = []
res.data.forEach(async (item, index) => {
const defaultParams = {
kfdm: this.wzcrk.kfdm,
pmguid: item.pmdm
}
// 获取推荐货位
const defaultData = await wzcrkmxModel.queryRecommendHw(defaultParams)
defaultArr = defaultArr.concat(defaultData)
const last = res.data.length - 1
if (index == last) {
Logger.info(this, 'defaultArr-------', JSON.stringify(defaultArr))
this.defaultArr = defaultArr
}
})
} catch (e) {
Prompt.showToast({
message: '获取默认货位失败'
})
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论