Commit fa0b57c8 by 毛勇泽

落位扫描

parent 0919e842
...@@ -36,4 +36,5 @@ export {DsRfid} from './src/main/ets/entity/DsRfid'; ...@@ -36,4 +36,5 @@ export {DsRfid} from './src/main/ets/entity/DsRfid';
export {DsRfidDao} from './src/main/ets/db/dao/DsRfidDao'; export {DsRfidDao} from './src/main/ets/db/dao/DsRfidDao';
export {pzlx_dict,szlx_dict,new_zmlx_dict} from './src/main/ets/utils/dict'; export {pzlx_dict,szlx_dict,new_zmlx_dict} from './src/main/ets/utils/dict';
export {SearchData} from './src/main/ets/bean/dto/SearchData'; export {SearchData} from './src/main/ets/bean/dto/SearchData';
export {HWFromData} from './src/main/ets/bean/dto/SearchData';
export {WzPositionInfo} from './src/main/ets/bean/dto/WzPositionInfo'; export {WzPositionInfo} from './src/main/ets/bean/dto/WzPositionInfo';
\ No newline at end of file
...@@ -4,4 +4,16 @@ export interface SearchData{ ...@@ -4,4 +4,16 @@ export interface SearchData{
gldwguid?: string; gldwguid?: string;
kfguid?: string; kfguid?: string;
zmlx?: string zmlx?: string
gldwmc?:string
kfmc?:string
kfdm?:string
zmmc?:string,
hwh?:string
}
export interface HWFromData{
hwh?: string,
guid?: string,
hjguid?: string,
kfdm?: string,
wzInfo?: Array<any>
} }
\ No newline at end of file
...@@ -260,6 +260,24 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> { ...@@ -260,6 +260,24 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
throw new Error('[查询异常]|' + e) throw new Error('[查询异常]|' + e)
} }
} }
/*验证扫描:验证扫描完的数据有没有*/
async testInsertSql(params):Promise<TestHwWzDto[]>{
try {
let val_sql = NativeSql.testInsertSql(params);
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toTestHwWzDto(rs))
} while (rs.goToNextRow())
}
Logger.info(this, 'queryAll items=' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
/** /**
* 验证当前货位在本方库转换 * 验证当前货位在本方库转换
...@@ -375,6 +393,30 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> { ...@@ -375,6 +393,30 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
throw new Error('[更新异常]|' + e) throw new Error('[更新异常]|' + e)
} }
} }
/*验证扫描完更新*/
async updateWzcshSql(params){
try {
let val_sql = NativeSql.updateWzcshSql(params)
Logger.info("更新扫描",val_sql)
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
return rs;
} catch (e) {
throw new Error('[插入异常]|' + e)
}
}
/*验证扫描完新增*/
async insertWzcshSql(params){
try {
let val_sql = NativeSql.insertWzcshSql(params)
Logger.info("扫描完新增",val_sql)
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
return rs;
} catch (e) {
throw new Error('[插入异常]|' + e)
}
}
} }
\ No newline at end of file
...@@ -582,4 +582,19 @@ WHERE ...@@ -582,4 +582,19 @@ WHERE
const sql=`select hw.pmdmcode, hx.hxmc, sum (case when hw.hwh='LS-1-1-1' then ifnull (hw.hwsl,0) +0 else 0 end) SY,sum (case when hw.hwh != 'LS-1-1-1' then ifnull (hw.hwsl, 0) +0 else 0 end) YL from tab_bzgl_knzy_app_hwb hw inner join TAB_BZGL_KNZY_APP_HJB hj on hj.guid = hw.hjguid inner join TAB_BZGL_KNZY_APP_QYB gy on gy.guid = hj.qyguid left join TAB_XTWH_JCSJ_BZHX hx on hw.pmdmcode = hx.pmdmten where substr (hw.pmdmcode, 1, 6) = ${params.pmdmcode} and hw.kfguid = ${params.kfguid} and hw.gldwguid= ${params.gldwguid} and zmlx = ${params.zmlx} group by hw.pmdmcode, hx.hxmc` const sql=`select hw.pmdmcode, hx.hxmc, sum (case when hw.hwh='LS-1-1-1' then ifnull (hw.hwsl,0) +0 else 0 end) SY,sum (case when hw.hwh != 'LS-1-1-1' then ifnull (hw.hwsl, 0) +0 else 0 end) YL from tab_bzgl_knzy_app_hwb hw inner join TAB_BZGL_KNZY_APP_HJB hj on hj.guid = hw.hjguid inner join TAB_BZGL_KNZY_APP_QYB gy on gy.guid = hj.qyguid left join TAB_XTWH_JCSJ_BZHX hx on hw.pmdmcode = hx.pmdmten where substr (hw.pmdmcode, 1, 6) = ${params.pmdmcode} and hw.kfguid = ${params.kfguid} and hw.gldwguid= ${params.gldwguid} and zmlx = ${params.zmlx} group by hw.pmdmcode, hx.hxmc`
return sql return sql
} }
/*验证扫描:验证扫描完的数据有没有*/
static testInsertSql(params?: any):string{
const sql= `select * from (select hw.*,qy.kfdm kfdm from tab_bzgl_knzy_app_hwb hw left join tab_bzgl_knzy_app_hjb hj on hj.guid = hw.hjguid left join tab_bzgl_knzy_app_qyb qy on qy.guid = hj.qyguid ) where kfguid = '${params.kfguid}' and hwh = ${params.hwh} and (pmdmcode = ${(params.pmdmcode)} or pmdmcode ='' or pmdmcode is null )`
return sql
}
/*验证扫描完更新*/
static updateWzcshSql(params?: any):string{
const sql=`update tab_bzgl_knzy_app_hwb set hwsl = ifnull(hwsl,0) + ${params.srsl}, pmdmcode = ${params.pmdmcode} where guid = ${params.guid}`
return sql
}
/*验证扫描完新增*/
static insertWzcshSql(params?: any):string{
const sql=`insert into tab_bzgl_knzy_app_hwb (guid, hwh, pmdmcode, hwsl, hjguid,hwzt,gldwguid,kfguid,zmlx) values ('${params.guid}','${params.hwh}',${params.pmdmcode},${params.srsl},'${params.hjguid}','11111111SF1','${params.gldwguid}','${params.kfguid}',${params.zmlx})`
return sql
}
} }
\ No newline at end of file
...@@ -53,6 +53,11 @@ class WzcrkmxModel { ...@@ -53,6 +53,11 @@ class WzcrkmxModel {
let res = await SQLiteContext.with(WzcrkmxDao).testHwWz(data.kfdm, data.hjguid, data.hwh) let res = await SQLiteContext.with(WzcrkmxDao).testHwWz(data.kfdm, data.hjguid, data.hwh)
return res return res
} }
// 验证扫描:验证扫描完的数据有没有
async testInsertSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).testInsertSql(params)
return res
}
async getPzMxItem(params, isPmSix) { async getPzMxItem(params, isPmSix) {
let res = await SQLiteContext.with(WzcrkmxDao).getPzMxItem(params, isPmSix) let res = await SQLiteContext.with(WzcrkmxDao).getPzMxItem(params, isPmSix)
return res return res
...@@ -69,6 +74,16 @@ class WzcrkmxModel { ...@@ -69,6 +74,16 @@ class WzcrkmxModel {
let res = await SQLiteContext.with(WzcrkmxDao).updateWzmx(params) let res = await SQLiteContext.with(WzcrkmxDao).updateWzmx(params)
return res return res
} }
/*验证扫描完更新*/
async updateWzcshSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).updateWzcshSql(params)
return res
}
/*验证扫描完新增*/
async insertWzcshSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).insertWzcshSql(params)
return res
}
// 清空表 // 清空表
async clear() { async clear() {
await SQLiteContext.with(WzcrkmxDao).clearTable() await SQLiteContext.with(WzcrkmxDao).clearTable()
......
...@@ -16,7 +16,7 @@ struct WzHxPositionTotalPage{ ...@@ -16,7 +16,7 @@ struct WzHxPositionTotalPage{
} }
build() { build() {
Column() { Column() {
TitleBar({ title: "物资状态" }) TitleBar({ title: "号型落位统计" })
Flex({ direction: FlexDirection.Column }) { Flex({ direction: FlexDirection.Column }) {
Row() { Row() {
List({ space: 2 }) { List({ space: 2 }) {
...@@ -28,10 +28,8 @@ struct WzHxPositionTotalPage{ ...@@ -28,10 +28,8 @@ struct WzHxPositionTotalPage{
Text('品名代码: ' + item.pmdmcode).fontSize(14).fontColor('#3b4144') Text('品名代码: ' + item.pmdmcode).fontSize(14).fontColor('#3b4144')
} }
.width('70%') .width('70%')
Blank() Blank()
.layoutWeight(1) .layoutWeight(1)
Flex({ Flex({
direction: FlexDirection.Column, direction: FlexDirection.Column,
justifyContent: FlexAlign.Center, justifyContent: FlexAlign.Center,
......
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router'
import { Logger, KfInfo, Gldw, WzPositionClass,SearchData,WzPositionInfo,HWFromData} from '@ohos/common';
import hwModel from "../../../../model/HwModel"
import IdentifyService from '../../../../identify/IdentifySerivce'
import {analysisQrCode} from '../../../../identify/analysis/analysis_QR_code'
import emitter from '@ohos.events.emitter';
import { WzPositionScanDialog } from '../dialog/WzPositionScanDialog';
import Prompt from '@system.prompt';
import { uuid } from '@ohos/common/src/main/ets/utils/util'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
@Entry
@Component
struct WzScanPositionPage{
@State isAutomation: boolean = true //控制扫描提示显示隐藏
@State dataList: Array<any> = []
@State updateList: Array<any> = []
@State insertList: Array<any> = []
@State searchData: SearchData = {}
@State hwFrom:HWFromData= {}
scanInfoDialog: CustomDialogController = new CustomDialogController({
builder: WzPositionScanDialog({
currentInfo: $searchData
}),
autoCancel: true,
alignment: DialogAlignment.Top,
customStyle: true
})
// 在自定义组件即将析构销毁时将dialogController置空
aboutToDisappear() {
this.scanInfoDialog = undefined // 将dialogController置空
}
build() {
Column() {
TitleBar({ title: "扫描落位" })
Text('请扫描货位码').fontColor('#fff').fontSize(20).height("20")
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween , alignItems: ItemAlign.Start}) {
Row() {
List({ space: 2 }) {
ForEach(this.dataList, (item) => {
ListItem() {
Row() {
Flex({ direction: FlexDirection.Column, justifyContent: FlexAlign.Center }) {
Text('品名: ' + item.wzpm).fontSize(14).fontColor('#3b4144')
Text('货位号: ' + item.hwh).fontSize(14).fontColor('#3b4144')
}
.width('70%')
Blank()
.layoutWeight(1)
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Center,
alignItems: ItemAlign.Start
}) {
Text('号型: ' + String(item.hxmc)).fontSize(14).fontColor('#3b4144')
Text('数量: ' + String(item.srsl)).fontSize(14).fontColor('#3b4144')
}
.width('40%')
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.padding({ left: 12, right: 18 })
}
.height(90)
})
}
.width('100%')
.backgroundColor('#fff')
.divider({ strokeWidth: 1, color: 'rgb(242,242,242)' }) // 每行之间的分界线
}.margin({ bottom: 50 })
}
.width('100%')
.height('100%')
.border({ width: 1, color: '#fff', style: BorderStyle.Dotted})
}
.padding(20)
.height('82%')
Flex({ justifyContent: FlexAlign.Center }) {
Button("保存")
.borderRadius(4)
.type(ButtonType.Normal)
.width('90%')
.fontColor('#0fa983')
.backgroundColor('#fff')
.onClick(() => {
// this.onSubmit()
console.log("保存数据")
this.handleSave()
})
}
.height(70)
}.onKeyEvent((e: globalThis.KeyEvent) => {
console.error('keycode====》:' + e.keyCode)
if ((e.keyCode == 2096 || e.keyCode == 2093)) {
if(e.type==1){
IdentifyService.openScan()
}
}
console.error('keycode====》:' + e.keyCode)
}).height("100%").width("100%").linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [['#36a3c0', 0.0], ['#97c6a6', 1.0], ['#c7d799', 2.0]]// 数组末尾元素占比小于1时满足重复着色效果
})
}
@Builder container() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("当前扫描货位号:").fontSize(16).lineHeight(18)
Text("请扫描货位").fontSize(20).fontColor("#0fa983").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.Start }) {
Text("当前扫描物资信息: ").fontSize(16).lineHeight(18)
Text("请扫描物资信息").fontSize(14)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("品名代码").width("25%").textAlign(TextAlign.Start)
Text("物资品名").width("25%").textAlign(TextAlign.Center)
Text("号型名称").width("25%").textAlign(TextAlign.Center)
Text("数量").width("25%").textAlign(TextAlign.Center)
}.padding(15)
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center}) {
ForEach([], item => {
Text(item.pmdmsix).width("25%").textAlign(TextAlign.Start).fontSize(14)
Text(item.wzpm).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.hxmc).width("25%").textAlign(TextAlign.Center).fontSize(14)
Text(item.crksl + '')
.width("25%")
.textAlign(TextAlign.Center)
.fontSize(20)
.fontColor("#0fa983")
.fontWeight(700)
})
}.padding(15)
}
}
scanCodeListen() {
var innerEvent = { eventId: 2 }
emitter.on(innerEvent, (eventData) => {
if (innerEvent.eventId == 2) {
let result = eventData.data.scancode
console.log("扫码校验", "收到扫码信息:" + result)
this.showQRDetail(result)
}
})
}
async showQRDetail(hwQrCode: string) {
Logger.info("扫码二维码===》"+hwQrCode)
this.handleanalysisQrCode(hwQrCode)
}
// async handleanalysisQrCode(value) {
// this.isAutomation = false
// const res = await analysisQrCode(value, false)
// if (res.data && res.data.length > 0) {
// if (this.scanInfoDialog != undefined) {
// this.scanInfoDialog.open()
// }
// }
// }
async handleanalysisQrCode(value:string) {
try {
var that = this
if (this.scanInfoDialog != undefined) {
this.scanInfoDialog.open()
}
this.isAutomation = false
const res = await analysisQrCode(value, false)
Logger.info(this,"解析数据"+JSON.stringify(res.data))
// 1.检查基础数据完善
if (res.data && res.data.length == 0) {
Prompt.showToast({
message: '请检查基础数据是否完善'
})
return
}
// 2.检查是否扫描货位
if (!this.hwFrom.hwh && !res.data[0].hwh) {
Prompt.showToast({
message: '请先扫描货位'
})
return
}
if (!this.hwFrom.hwh && res.data[0].hwh) {
const isHwParams = {
kfdm: this.hwFrom.kfdm,
hwh: res.data[0].hwh,
hjguid: res.data[0].hjguid
}
this.searchData.hwh=res.data[0].hwh
const testHwForKf = await wzcrkmxModel.testHwWz(isHwParams)
console.log('testHwForKf', JSON.stringify(testHwForKf))
if (testHwForKf.length == 0) {
Prompt.showToast({
message: '当前库房不存在' + res.data[0].hwh + '货位'
})
return
}
this.hwFrom.hwh = res.data[0].hwh
this.hwFrom.guid = res.data[0].guid
this.hwFrom.hjguid = res.data[0].hjguid
Prompt.showToast({
message: '当前货位:'+res.data[0].hwh
})
return
}
if (this.hwFrom.hwh) {
if (this.hwFrom.hwh !== res.data[0].hwh && res.data[0].hjguid) {
const isHwParams = {
kfdm: this.hwFrom.kfdm,
hwh: res.data[0].hwh,
hjguid: res.data[0].hjguid
}
// console.log('testHwWzSql(isHwParams)', testHwWzSql(isHwParams))
// const testHwForKf = await database.selectInformationType("GY_M_PMV3",
// testHwWzSql(isHwParams))
const testHwForKf = await wzcrkmxModel.testHwWz(isHwParams)
console.log('testHwForKf', JSON.stringify(testHwForKf))
if (testHwForKf.length == 0) {
Prompt.showToast({
message:'当前库房不存在' + res.data[0].hwh + '货位'
})
return
}
that.hwFrom.hwh = res.data[0].hwh
that.hwFrom.guid = res.data[0].guid
that.hwFrom.hjguid = res.data[0].hjguid
Prompt.showToast({
message:'切换货位:' + res.data[0].hwh
})
return
}
if (this.hwFrom.hwh == res.data[0].hwh) {
Prompt.showToast({
message:'当前货位:' + res.data[0].hwh
})
return
}
// 3.扫描物资处理
if (res.data && res.data.length > 0) {
res.data.forEach(async (ITEM) => {
const uuId = uuid()
var scanData = {
...ITEM,
hwh: this.hwFrom.hwh,
guid: uuId,
hjguid: this.hwFrom.hjguid,
// kfdm: this.hwFrom.kfdm,
...this.searchData
}
// const [filterData] = await database.selectInformationType("GY_M_PMV3",
// testScanItemSql(scanData))
// console.log('filterData', filterData)
// if (filterData) {
// scanData.gldwguid = filterData.gldwguid.
// scanData.kfguid = filterData.kfguid
// scanData.zmlx = filterData.zmlx
// } else {
// scanData.gldwguid = this.currentInfo.gldwguid
// scanData.kfguid = this.currentInfo.kfguid
// scanData.zmlx = this.currentInfo.zmlx
// }
// console.log('开始组装数据', scanData)
// console.log('判断临时数据')
if (this.dataList && this.dataList.length > 0) {
// console.log('有临时数据')
// console.log('筛选同品名同货位的数据')
const [data] = this.dataList.filter((item, index) => item.pmdmcode ==
ITEM
.pmdmcode && item.hwh == this.hwFrom.hwh)
if (data) {
// console.log('有同品名同货位的数据')
// console.log('this.dataList', this.dataList)
this.dataList.forEach((item, index) => {
if (item.pmdmcode == data.pmdmcode && item.hwh == this
.hwFrom.hwh) {
// console.log('同品名,同货位的数据')
// 同货位同号型
// console.log('同货位同号型', item.hwh, this.hwFrom.hwh)
let num = ITEM.srsl || 1
let hjsl = Number(item.srsl) + Number(num)
// this.handleCkHwWzTest({
// ...item,
// srsl: hjsl
// }, (res) => {
// if (res) {
item.srsl = hjsl
item.lsguid = item.lsguid || uuid()
// this.handleSetData(scanData, uuId)
// console.log('完成', dateUtils.formatDate(
// new Date()))
// }
// })
this.convertionList(res.data)
}
if (item.pmdmcode == data.pmdmcode && item.hwh !==
this.hwFrom.hwh) {
// console.log('同品名,不同货位的数据')
// 不同货位同号型
// console.log('不同货位同号型', item.hwh, this.hwFrom.hwh)
const [filterData] = this.dataList.filter((
filItem) =>
filItem.pmdmcode == data.pmdmcode &&
filItem
.hwh == this.hwFrom.hwh)
if (!filterData) {
// this.handleSetData(scanData, uuId)
this.dataList.push(scanData)
this.convertionList(res.data)
}
}
})
} else {
// console.log('没有同品名同货位的数据')
// this.handleSetData(scanData, uuId)
this.dataList.push(scanData)
this.convertionList(res.data)
}
} else {
// console.log('没有临时数据')
// this.handleSetData(scanData, uuId)
this.dataList.push(scanData)
this.convertionList(res.data)
}
})
// console.log('res.data', res.data)
// this.hwFrom.wzInfo = res.data
// this.convertionList(res.data)
}
} else {
Prompt.showToast({
message:'请先扫描货位'
})
}
} catch (e) {
//TODO handle the exception
Logger.info(this,"扫描失败信息",JSON.stringify(e))
Prompt.showToast({
message:'扫描失败'
})
}
}
convertionList(data) {
const newData = data.map((el) => {
const [filterData] = this.dataList.filter((item) => item.hwh == this.hwFrom.hwh && item
.pmdmcode == el.pmdmcode)
return filterData
})
console.log('=====================', this.dataList)
// if (this.dataList && this.dataList.length > 0) {
// const newData = data.map((item) => {
// // console.log('=====================', this.dataList, item)
// const [filterData] = this.dataList.filter((filItem) => filItem.pmdmcode == item.pmdmcode &&
// filItem.hwh == item.hwh)
// console.log('filterData', filterData)
// return filterData
// })
// this.hwFrom.wzInfo = newData
// } else {
this.hwFrom.wzInfo = newData
// }
}
async handleSave() {
try {
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(async (item, index) => {
const [isTest] = await wzcrkmxModel.testInsertSql(item)
console.log('isTest======================', isTest)
if (isTest) {
// console.log('updata==============================', updateWzcshSql(item))
item.guid = isTest.guid
await wzcrkmxModel.updateWzcshSql(item)
this.updateList.push(item)
} else {
await wzcrkmxModel.insertWzcshSql(item)
this.insertList.push(item)
}
// await database.createOrFindSQL("GY_M_PMV3", setLsqWzSql(
// item))
})
Prompt.showToast({
message:'保存成功'
})
router.back()
} else {
Prompt.showToast({
message:'请扫描物资'
})
}
} catch (e) {
//TODO handle the exception
Prompt.showToast({
message:'保存失败'
})
}
}
onPageShow() {
console.error("========onPageShow=========")
this.searchData=router.getParams()["searchData"]
if(this.searchData!=undefined){
this.hwFrom.kfdm=this.searchData.kfdm
}
this.scanCodeListen()
IdentifyService.openScanPort()
}
onPageHide() {
IdentifyService.closeScan()
/*取消扫码订阅*/
emitter.off(2);
}
}
\ No newline at end of file
...@@ -33,12 +33,7 @@ struct WzPositionPage { ...@@ -33,12 +33,7 @@ struct WzPositionPage {
@State dataSource: WzPositionClass[] = [] @State dataSource: WzPositionClass[] = []
@State checkedList: Array<string> = [] @State checkedList: Array<string> = []
@State radioChecked: boolean = true @State radioChecked: boolean = true
@State searchData: SearchData = { @State searchData: SearchData = {}
wzpm: '',
gldwguid: '',
kfguid: '',
zmlx: ''
}
@State gldwselectValue: Array<SelectOption> = [] @State gldwselectValue: Array<SelectOption> = []
@State kfselectValue: Array<SelectOption> = [] @State kfselectValue: Array<SelectOption> = []
@State zmlxselectValue: Array<SelectOption> = [] @State zmlxselectValue: Array<SelectOption> = []
...@@ -68,6 +63,19 @@ struct WzPositionPage { ...@@ -68,6 +63,19 @@ struct WzPositionPage {
.fontSize("14vp") .fontSize("14vp")
Button("扫描落位") Button("扫描落位")
.bottomBtnSty().fontColor("#0fa983").fontSize("14vp") .bottomBtnSty().fontColor("#0fa983").fontSize("14vp")
.onClick(() => {
if (this.searchData.gldwguid && this.searchData.kfguid && this.searchData.zmlx) {
router.pushUrl({ url: 'pages/metailmange/WzPositionPage/WzPositionDetailPage/WzScanPositionPage', params: {
searchData: this.searchData
} })
}else {
promptAction.showToast({
message: '请选择管理单位、库房、账目类型',
bottom: 200
})
}
})
Button("导出结果数据包") Button("导出结果数据包")
.bottomBtnSty() .bottomBtnSty()
.onClick(async () => { .onClick(async () => {
...@@ -183,6 +191,7 @@ struct WzPositionPage { ...@@ -183,6 +191,7 @@ struct WzPositionPage {
.borderColor("#454545") .borderColor("#454545")
.onSelect(async (index: number, value?: string) => { .onSelect(async (index: number, value?: string) => {
this.searchData.gldwguid = this.dwList[index].guid this.searchData.gldwguid = this.dwList[index].guid
this.searchData.gldwmc=value
this.getPositionPage() this.getPositionPage()
}) })
.width(100) .width(100)
...@@ -198,6 +207,8 @@ struct WzPositionPage { ...@@ -198,6 +207,8 @@ struct WzPositionPage {
.borderColor("#454545") .borderColor("#454545")
.onSelect(async (index: number, value?: string) => { .onSelect(async (index: number, value?: string) => {
this.searchData.kfguid = this.kfList[index].guid this.searchData.kfguid = this.kfList[index].guid
this.searchData.kfdm = this.kfList[index].kfdm
this.searchData.kfmc=value
this.getPositionPage() this.getPositionPage()
}) })
.width(100) .width(100)
...@@ -213,6 +224,7 @@ struct WzPositionPage { ...@@ -213,6 +224,7 @@ struct WzPositionPage {
.borderColor("#454545") .borderColor("#454545")
.onSelect(async (index: number, value?: string) => { .onSelect(async (index: number, value?: string) => {
this.searchData.zmlx = "'"+zmlx_dict[index].value+"'" this.searchData.zmlx = "'"+zmlx_dict[index].value+"'"
this.searchData.zmmc=value
this.getPositionPage() this.getPositionPage()
}) })
.width(100) .width(100)
......
import { DividerTitle } from '../../../../view/DividerTitle/DividerTitle'
@CustomDialog
@Component
export struct WzPositionScanDialog {
@Link currentInfo: {
gldwguid?: string,
kfguid?: string,
zmlx?: string,
gldwmc?: string,
kfmc?: string,
zmmc?: string,
hwh?: string
}
controller: CustomDialogController
build() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("管理单位:").fontSize(16).lineHeight(18)
Text(this.currentInfo.gldwmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("库房:").fontSize(16).lineHeight(18)
Text(this.currentInfo.kfmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("账目类型:").fontSize(16).lineHeight(18)
Text(this.currentInfo.zmmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("当前扫描货位号:").fontSize(16).lineHeight(18)
Text(this.currentInfo.hwh).fontSize(20).fontColor("#0fa983").fontWeight(700)
}.padding(15)
}
.margin({ top: 80 })
.width('100%')
.borderRadius(5)
.backgroundColor('#fff')
}
}
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"pages/metailmange/WzPositionPage/WzPositionPage", "pages/metailmange/WzPositionPage/WzPositionPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzPositionTotalPage", "pages/metailmange/WzPositionPage/WzPositionDetailPage/WzPositionTotalPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzHxPositionTotalPage", "pages/metailmange/WzPositionPage/WzPositionDetailPage/WzHxPositionTotalPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzScanPositionPage",
"pages/metailmange/WzReversePage", "pages/metailmange/WzReversePage",
"pages/metailmange/WzReversePage/WzReverseDetailPage/WzReverseDetailPage", "pages/metailmange/WzReversePage/WzReverseDetailPage/WzReverseDetailPage",
"pages/metailmange/WzReversePage/WzReversePage", "pages/metailmange/WzReversePage/WzReversePage",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论