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
915c4216
Commit
915c4216
authored
Jan 27, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
临时单据保存
parent
71593ac9
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
38 行增加
和
17 行删除
+38
-17
WzInsertInfo.ets
entry/src/main/ets/pages/metailmange/Common/WzInsertInfo.ets
+25
-6
AddWzin.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
+7
-6
WzList.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzList.ets
+1
-1
WzinsertDetail.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinsertDetail.ets
+5
-4
没有找到文件。
entry/src/main/ets/pages/metailmange/Common/WzInsertInfo.ets
View file @
915c4216
...
...
@@ -41,7 +41,7 @@ export struct WzInsertInfo {
@State currentPmdmcode: string = '' //当前扫描pmdm10位
@State defaultHwh: string = this.convertionDefaultHwh()
@State hjsl:
number |
string = this.convertionHjsl()
@State hjsl: string = this.convertionHjsl()
@State currentDw: string = ''
@State kfmc: string = ''
@ObjectLink wzcrk: PzFormClass
...
...
@@ -67,8 +67,9 @@ export struct WzInsertInfo {
* @return {*}
* @author: 王弘钢
*/
convertionHjsl() {
convertionHjsl()
: string
{
var newData = this.historicalInformation
newData.forEach((item, index) => {
if (this.pageType == '调号') {
if (item.currentModel) {
...
...
@@ -112,9 +113,11 @@ export struct WzInsertInfo {
res2 = sArr.reduce((x, y) => x + y);
}
if (this.pageType == '调号' || this.pageType == '换位') {
return
res1 || 0
return
(res1 || 0).toString()
} else {
return res1 || 0 + '/' + res2 || 0
console.log(".......---计算的数量1---", JSON.stringify(this.historicalInformation))
console.log(".......---计算的数量2---", (res1 || 0 + '/' + res2 || 0))
return (res1 || 0 + '/' + res2 || 0).toString()
}
// const srslList = this.historicalInformation.map(item => {
// if (item.srsl) {
...
...
@@ -354,6 +357,18 @@ export struct WzInsertInfo {
}
// 6.处理物资数据
if (res.data && res.data.length > 0) {
let isNumber = false
res.data.forEach(element => {
if (/^\d+$/.test(element.srsl)) { // 判断扫描的物资的srsl一定是数字才会通过校验不是就报错
isNumber = true
}
});
if (!isNumber) {
Prompt.showToast({
message: '当前扫描的物资信息不完整',
})
return
}
// this.currentWZInfo = res.data
res.data.forEach((ITEM) => {
if (this.historicalInformation && this.historicalInformation.length > 0) {
...
...
@@ -398,7 +413,7 @@ export struct WzInsertInfo {
const [data] = this.historicalInformation.filter((item, index) => item
.pmdmcode == ITEM.pmdmcode && item.hwh == this.wzcrk.hwh && item
.currentModel == this.currentModel)
console.log('
data
', data)
console.log('
-------data-----
', data)
if (data) {
this.historicalInformation.forEach((item, index) => {
if (item.pmdmcode == data.pmdmcode && item.hwh == this
...
...
@@ -428,12 +443,14 @@ export struct WzInsertInfo {
// @ts-ignore
hjguid: this.wzcrk.hjguid,
hwsl: ITEM.srsl,
crksl: ITEM.srsl,
currentModel: this.currentModel,
guid: uuid()
}
// this.handleCkHwWzTest(params, (RES) => {
// if (RES) {
this.historicalInformation.push(params)
console.log("------------1.0historicalInformation--------" + JSON.stringify(params));
this.setWZInfo(res.data)
// }
// })
...
...
@@ -445,11 +462,13 @@ export struct WzInsertInfo {
// @ts-ignore
hjguid: this.wzcrk.hjguid,
hwsl: ITEM.srsl,
crksl: ITEM.srsl,
currentModel: this.currentModel,
guid: uuid()
}
// this.handleCkHwWzTest(params, (RES) => {
// if (RES) {
console.log("------------2.0historicalInformation--------" + JSON.stringify(params));
this.historicalInformation.push(params)
this.setWZInfo(res.data)
// }
...
...
@@ -1206,7 +1225,7 @@ export struct WzInsertInfo {
Text("品种个数:")
Text(this.historicalInformation.length + '' || '0').fontColor("#0fa983").fontSize(20).fontWeight(700)
Text("合计数量:")
Text(this.hjsl
+ ''
).fontColor("#0fa983").fontSize(20).fontWeight(700)
Text(this.hjsl).fontColor("#0fa983").fontSize(20).fontWeight(700)
}
}.padding({ left: 2, right: 10 })
.width("100%")
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
View file @
915c4216
...
...
@@ -131,7 +131,7 @@ export struct AddWzin {
const kfList = await kfModel.query({})
// 获取货架列表
const hwList = await hwModel.query()
//
const hwList = await hwModel.query()
// 获取单位列表
const dwList = await gldwModel.queryByData({})
...
...
@@ -140,17 +140,18 @@ export struct AddWzin {
this.form.push(new Form(i))
})
kfList.forEach(i => {
this.form[this.form.findIndex(v => v.key == 'kfdm')]
.options
.push(new Options(i.kfmc, i.kfdm))
})
hwList.forEach(i => {
this.form[this.form.findIndex(v => v.key == 'hwh')]
.options
.push(new Options(i.hwh, i.hwh))
})
//
hwList.forEach(i => {
//
this.form[this.form.findIndex(v => v.key == 'hwh')]
//
.options
//
.push(new Options(i.hwh, i.hwh))
//
})
zmlx_dict.forEach(i => {
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzList.ets
View file @
915c4216
...
...
@@ -22,7 +22,7 @@ export struct WzList {
Column() {
Row() {
Text("总数: ")
Text(this.wzmx.pzsl + '')
Text(this.wzmx.pzsl
? this.wzmx.pzsl + '' : this.wzmx.crksl
+ '')
}.alignSelf(ItemAlign.End).padding({ top: 5, bottom: 5 })
Row() {
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinsertDetail.ets
View file @
915c4216
...
...
@@ -127,7 +127,7 @@ struct WzinsertDetail {
Button("保存").CommonButtonStyle().width("50%")
.onClick(async () => {
try {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.historicalInformation))
Logger.info('保存的入库明细数据>>',
JSON.stringify(this.historicalInformation))
// if (this.isUpdate) {
// const crksl = this.historicalInformation.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
...
...
@@ -153,14 +153,15 @@ struct WzinsertDetail {
this.wzcrk.sjlx = '新建'
await wzcrkModel.setOne(this.wzcrk)
Logger.info('添加的入库数据>>', JSON.stringify(this.wzcrk))
await wzcrkmxModel.set(this.historicalInformation)
// }
promptAction.showToast({
message: '保存入库数据成功',
bottom: 300
})
setTimeout(() => {
router.back({ url: 'pages/metailmange/WzInPage/WzInPage' })
}, 300)
//
setTimeout(() => {
//
router.back({ url: 'pages/metailmange/WzInPage/WzInPage' })
//
}, 300)
} catch (e) {
promptAction.showToast({
message: '保存入库数据失败',
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论