Commit 98758423 by 毛勇泽

盘库。倒库,调号

parent 8895519d
......@@ -73,6 +73,8 @@ export class WzhxdmDao extends BaseTable<Wzhxdm> {
wp.endWrap()
wp.endWrap()
}
console.log("执行语句==="+JSON.stringify(hx_map))
console.log("执行语句==="+JSON.stringify(wp))
return this.query(wp, this.getTableColumns())
}
}
\ No newline at end of file
......@@ -227,8 +227,7 @@ struct UHFScanPage{
this.doneEpcsList.push(epc)
try {
// this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
this.handleanalysisQrCode('0504000D2490C80C56033C44FC1A111100096300E0D220713000');
IdentifyService.stopRfidInv()
this.handleanalysisQrCode(epc);
}catch (err){
Logger.info("解析失败1"+epc+JSON.stringify(err))
......@@ -245,8 +244,8 @@ struct UHFScanPage{
console.log("proEpc"+pro.strEpc)
console.log("LSM"+pro.getiWzLsm())
console.log("箱号===》"+pro.getiXangNo().toString())
const scan = await analysisQrCode(pro.getiWzLsm().toString(), true)
console.log('扫描返回数据', JSON.stringify(scan))
// const scan = await analysisQrCode(pro.getiWzLsm().toString(), true)
// console.log('扫描返回数据', JSON.stringify(scan))
const res = await bzhxModal.queryLsm(pro.getiWzLsm().toString())
console.log('RFDID解析返回数据', res)
if (res && res.length == 0) {
......
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { WzInfo } from '../../WzInPage/WzinDetail/WzInfo'
import { PzInfo } from '../../WzInPage/WzinDetail/PzInfo'
import {AddWzin} from '../../WzInPage/WzinDetail/AddWzin'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { WzClass, WzmxClass } from '../../Common/Wzcrk.data';
import bzhxModel from '../../../../model/BzhxModel';
import promptAction from '@ohos.promptAction';
import wzcrkModel from '../../../../model/WzcrkModel';
import { SQLiteContext, Wzcrkmx, WzcrkmxDao } from '@ohos/common';
import { uuid } from '@ohos/common/src/main/ets/utils/util';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#97c6a6')
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
}
interface params {
wzcrk: Wzcrk,
isUpdate: boolean
}
@Entry
@Component
struct WzExchangeDetailPage{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State isUpdate: boolean = false
@State wzcrk: WzClass = null // 物资出入库单据信息
@State wzmx: WzmxClass[] = [] // 物资出入库明细
private controller: TabsController = new TabsController()
wzcrkmxDao: WzcrkmxDao = SQLiteContext.with(WzcrkmxDao)
onPageShow() {
const params = router.getParams() as params
this.isUpdate = params.isUpdate
this.wzcrk = new WzClass(params.wzcrk)
Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk))
this.getDetail()
}
// 获取凭证信息
async getDetail(wzpm?) {
this.wzmx = []
const res = await wzcrkmxModel.query(this.wzcrk.guid, wzpm)
res.forEach(i => {
// @ts-ignore
this.wzmx.push(new WzmxClass(i))
})
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.lineHeight(36)
}
.width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情" })
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column() {
if(this.isUpdate) {
PzInfo({ wzcrk: this.wzcrk })
} else {
AddWzin({ wzcrk: this.wzcrk })
}
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column() {
WzInfo({ wzmx: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail })
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.margin({ left: 15, right: 15, top: 15 })
.onChange((index: number) => {
this.currentIndex = index
})
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("保存").CommonButtonStyle().width("100%")
.onClick(async () => {
try {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.wzmx))
if(this.isUpdate) {
await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
dec: this.wzcrk.dec,
ydh: this.wzcrk.ydh,
})
}
else {
this.wzcrk.guid = uuid()
this.wzcrk.gznd = new Date().getFullYear() + ''
this.wzcrk.sjlx = '新建'
await wzcrkModel.setOne(this.wzcrk)
Logger.info('添加的入库数据>>', JSON.stringify(this.wzcrk))
}
// for (let index = 0; index < this.wzmx.length; index++) {
// const element = this.wzmx[index];
// try {
// Logger.error(this, '更新数据参数' + JSON.stringify({
// 'guid': element.guid,
// 'crksl': element.crksl
// }))
// let val1 = await this.wzcrkmxDao.update({ 'guid': element.guid, 'crksl': element.crksl } as Wzcrkmx)
// Logger.error(this, '更新查询的入库数据>>' + JSON.stringify(val1));
// } catch (e) {
// Logger.error(this, '保存失败了>>' + JSON.stringify(e))
// }
// }
//
// const crksl = this.wzmx.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
//
// await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
// dec: this.wzcrk.dec,
// ydh: this.wzcrk.ydh,
// crksl
// })
//
promptAction.showToast({
message: '保存入库数据成功',
bottom: 300
})
setTimeout(() => {
router.replaceUrl({ url: 'pages/metailmange/WzInPage/WzInPage' })
}, 300)
} catch (e) {
promptAction.showToast({
message: '保存入库数据失败',
bottom: 200
})
}
})
}
}.margin({ left: 10, right: 10 }).height(80)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { WzInfo } from '../../WzInPage/WzinDetail/WzInfo'
import { PzInfo } from '../../WzInPage/WzinDetail/PzInfo'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { WzClass, WzmxClass } from '../../Common/Wzcrk.data';
import bzhxModel from '../../../../model/BzhxModel';
import promptAction from '@ohos.promptAction';
import wzcrkModel from '../../../../model/WzcrkModel';
import { SQLiteContext, Wzcrkmx, WzcrkmxDao } from '@ohos/common';
import { uuid } from '@ohos/common/src/main/ets/utils/util';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#97c6a6')
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
}
interface params {
wzcrk: Wzcrk,
isUpdate: boolean
}
/*盘库详情*/
@Entry
@Component
struct WzInvDetail{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State isUpdate: boolean = false
@State wzcrk: WzClass = null // 物资出入库单据信息
@State wzmx: WzmxClass[] = [] // 物资出入库明细
private controller: TabsController = new TabsController()
wzcrkmxDao: WzcrkmxDao = SQLiteContext.with(WzcrkmxDao)
onPageShow() {
const params = router.getParams() as params
this.isUpdate = params.isUpdate
this.wzcrk = new WzClass(params.wzcrk)
Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk))
this.getDetail()
}
// 获取凭证信息
async getDetail(wzpm?) {
this.wzmx = []
const res = await wzcrkmxModel.query(this.wzcrk.guid, wzpm)
res.forEach(i => {
// @ts-ignore
this.wzmx.push(new WzmxClass(i))
})
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.lineHeight(36)
}
.width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情" })
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column() {
PzInfo({ wzcrk: this.wzcrk })
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column() {
WzInfo({ wzmx: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail })
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.margin({ left: 15, right: 15, top: 15 })
.onChange((index: number) => {
this.currentIndex = index
})
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("保存").CommonButtonStyle().width("100%")
.onClick(async () => {
try {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.wzmx))
if(this.isUpdate) {
await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
dec: this.wzcrk.dec,
ydh: this.wzcrk.ydh,
})
}
else {
this.wzcrk.guid = uuid()
this.wzcrk.gznd = new Date().getFullYear() + ''
this.wzcrk.sjlx = '新建'
await wzcrkModel.setOne(this.wzcrk)
Logger.info('添加的入库数据>>', JSON.stringify(this.wzcrk))
}
// for (let index = 0; index < this.wzmx.length; index++) {
// const element = this.wzmx[index];
// try {
// Logger.error(this, '更新数据参数' + JSON.stringify({
// 'guid': element.guid,
// 'crksl': element.crksl
// }))
// let val1 = await this.wzcrkmxDao.update({ 'guid': element.guid, 'crksl': element.crksl } as Wzcrkmx)
// Logger.error(this, '更新查询的入库数据>>' + JSON.stringify(val1));
// } catch (e) {
// Logger.error(this, '保存失败了>>' + JSON.stringify(e))
// }
// }
//
// const crksl = this.wzmx.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
//
// await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
// dec: this.wzcrk.dec,
// ydh: this.wzcrk.ydh,
// crksl
// })
//
promptAction.showToast({
message: '保存入库数据成功',
bottom: 300
})
setTimeout(() => {
router.replaceUrl({ url: 'pages/metailmange/WzInPage/WzInPage' })
}, 300)
} catch (e) {
promptAction.showToast({
message: '保存入库数据失败',
bottom: 200
})
}
})
}
}.margin({ left: 10, right: 10 }).height(80)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { WzInfo } from '../../WzInPage/WzinDetail/WzInfo'
import { PzInfo } from '../../WzInPage/WzinDetail/PzInfo'
import {AddWzin} from '../../WzInPage/WzinDetail/AddWzin'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { WzClass, WzmxClass } from '../../Common/Wzcrk.data';
import bzhxModel from '../../../../model/BzhxModel';
import promptAction from '@ohos.promptAction';
import wzcrkModel from '../../../../model/WzcrkModel';
import { SQLiteContext, Wzcrkmx, WzcrkmxDao } from '@ohos/common';
import { uuid } from '@ohos/common/src/main/ets/utils/util';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#97c6a6')
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
}
interface params {
wzcrk: Wzcrk,
isUpdate: boolean
}
@Entry
@Component
struct WzReverseDetailPage{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State isUpdate: boolean = false
@State wzcrk: WzClass = null // 物资出入库单据信息
@State wzmx: WzmxClass[] = [] // 物资出入库明细
private controller: TabsController = new TabsController()
wzcrkmxDao: WzcrkmxDao = SQLiteContext.with(WzcrkmxDao)
onPageShow() {
const params = router.getParams() as params
this.isUpdate = params.isUpdate
this.wzcrk = new WzClass(params.wzcrk)
Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk))
this.getDetail()
}
// 获取凭证信息
async getDetail(wzpm?) {
this.wzmx = []
const res = await wzcrkmxModel.query(this.wzcrk.guid, wzpm)
res.forEach(i => {
// @ts-ignore
this.wzmx.push(new WzmxClass(i))
})
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.lineHeight(36)
}
.width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情" })
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column() {
if(this.isUpdate) {
PzInfo({ wzcrk: this.wzcrk })
} else {
AddWzin({ wzcrk: this.wzcrk })
}
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column() {
WzInfo({ wzmx: this.wzmx, wzcrk: this.wzcrk, getDetail: this.getDetail })
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.margin({ left: 15, right: 15, top: 15 })
.onChange((index: number) => {
this.currentIndex = index
})
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("保存").CommonButtonStyle().width("100%")
.onClick(async () => {
try {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.wzmx))
if(this.isUpdate) {
await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
dec: this.wzcrk.dec,
ydh: this.wzcrk.ydh,
})
}
else {
this.wzcrk.guid = uuid()
this.wzcrk.gznd = new Date().getFullYear() + ''
this.wzcrk.sjlx = '新建'
await wzcrkModel.setOne(this.wzcrk)
Logger.info('添加的入库数据>>', JSON.stringify(this.wzcrk))
}
// for (let index = 0; index < this.wzmx.length; index++) {
// const element = this.wzmx[index];
// try {
// Logger.error(this, '更新数据参数' + JSON.stringify({
// 'guid': element.guid,
// 'crksl': element.crksl
// }))
// let val1 = await this.wzcrkmxDao.update({ 'guid': element.guid, 'crksl': element.crksl } as Wzcrkmx)
// Logger.error(this, '更新查询的入库数据>>' + JSON.stringify(val1));
// } catch (e) {
// Logger.error(this, '保存失败了>>' + JSON.stringify(e))
// }
// }
//
// const crksl = this.wzmx.map(v => Number(v.crksl)).reduce((a, b) => a + b, 0)
//
// await wzcrkModel.updateWcztByData(this.wzcrk.guid, {
// dec: this.wzcrk.dec,
// ydh: this.wzcrk.ydh,
// crksl
// })
//
promptAction.showToast({
message: '保存入库数据成功',
bottom: 300
})
setTimeout(() => {
router.replaceUrl({ url: 'pages/metailmange/WzInPage/WzInPage' })
}, 300)
} catch (e) {
promptAction.showToast({
message: '保存入库数据失败',
bottom: 200
})
}
})
}
}.margin({ left: 10, right: 10 }).height(80)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
......@@ -7,12 +7,18 @@
"pages/metailmange/WzInPage/WzInPage",
"pages/metailmange/WzOutPage/WzOutPage",
"pages/metailmange/WzExchangePage",
"pages/metailmange/WzExchangePage/WzExchangeDetailPage/WzExchangeDetailPage",
"pages/metailmange/WzExchangePage/WzExchangePage",
"pages/metailmange/WzConversionPage",
"pages/metailmange/WzInvPage",
"pages/metailmange/WzInvPage/WzInvPage",
"pages/metailmange/WzInvPage/WzInvDetail/WzInvDetail",
"pages/metailmange/WzInPage/WzInPage",
"pages/metailmange/WzInPage/WzinDetail/WzinDetail",
"pages/metailmange/WzPositionPage",
"pages/metailmange/WzReversePage",
"pages/metailmange/WzReversePage/WzReverseDetailPage/WzReverseDetailPage",
"pages/metailmange/WzReversePage/WzReversePage",
"pages/metailmange/AddConversionPage",
"pages/metailmange/AddTemporaryInPage",
"pages/metailmange/AddTemporaryOutPage",
......
......@@ -91,17 +91,17 @@ export struct MaterialManagement {
break;
case "exchange":
router.pushUrl({
url: "pages/metailmange/WzExchangePage",
url: "pages/metailmange/WzExchangePage/WzExchangePage",
})
break;
case "reverse":
router.pushUrl({
url: "pages/metailmange/WzReversePage",
url: "pages/metailmange/WzReversePage/WzReversePage",
})
break;
case "inv":
router.pushUrl({
url: "pages/metailmange/WzInvPage",
url: "pages/metailmange/WzInvPage/WzInvPage",
})
break;
case "conversion":
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论