Commit ce046a86 by huangqy

先提交再说

parent e447d0d8
...@@ -137,6 +137,7 @@ export struct WzInfo { ...@@ -137,6 +137,7 @@ export struct WzInfo {
// 页面初始化 // 页面初始化
aboutToAppear() { aboutToAppear() {
this.pzxqGuild = this.wzcrk.guid this.pzxqGuild = this.wzcrk.guid
this.historicalInformation = []
// 获取物资明细信息 // 获取物资明细信息
this.getMxDetailsData() this.getMxDetailsData()
this.getData() this.getData()
...@@ -299,13 +300,10 @@ export struct WzInfo { ...@@ -299,13 +300,10 @@ export struct WzInfo {
// 扫描物资 // 扫描物资
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))
let isNumber = false // 判断扫描的物资的srsl一定是数字才会通过校验不是就报错
res.data.forEach(element => { const errNumber = res.data.filter(i => !/^\d+$/.test(i.srsl))?.length
if (/^\d+$/.test(element.srsl)) { // 判断扫描的物资的srsl一定是数字才会通过校验不是就报错 console.log(">>>>>>>>扫描物资>>>>>>>" + errNumber)
isNumber = true if (errNumber > 0) {
}
});
if (!isNumber) {
Prompt.showToast({ Prompt.showToast({
message: '当前扫描的物资信息不完整', message: '当前扫描的物资信息不完整',
}) })
...@@ -450,6 +448,7 @@ export struct WzInfo { ...@@ -450,6 +448,7 @@ export struct WzInfo {
async pageInit(ITEM, tip, callback?) { async pageInit(ITEM, tip, callback?) {
try { try {
this.historicalInformation = []
// 不同号型新增 // 不同号型新增
// 查询同号型数据 // 查询同号型数据
const params = { const params = {
...@@ -464,13 +463,9 @@ export struct WzInfo { ...@@ -464,13 +463,9 @@ export struct WzInfo {
}) })
} }
this.currentPmdmcode = ITEM.pmdmcode this.currentPmdmcode = ITEM.pmdmcode
this.historicalInformation = []
res.forEach(element => { res.forEach(element => {
this.historicalInformation.push(new historicalInformationClass(element)) this.historicalInformation.push(new historicalInformationClass(element))
}) })
res.forEach(i => {
Logger.info(this, '赋值成为了什么', JSON.stringify(i))
})
this.setDefaultActive() this.setDefaultActive()
callback && callback() callback && callback()
} catch (e) { } catch (e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论