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
c834d195
Commit
c834d195
authored
Jan 22, 2024
by
ning
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f5c78c06
2e175768
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
311 行增加
和
181 行删除
+311
-181
BzhxDao.ets
common/src/main/ets/db/dao/BzhxDao.ets
+9
-0
DsRfidDao.ets
common/src/main/ets/db/dao/DsRfidDao.ets
+27
-0
HwInfoDao.ets
common/src/main/ets/db/dao/HwInfoDao.ets
+9
-1
WzhxdmDao.ets
common/src/main/ets/db/dao/WzhxdmDao.ets
+1
-1
analysis_QR_code.ets
entry/src/main/ets/identify/analysis/analysis_QR_code.ets
+6
-2
BzhxModel.ets
entry/src/main/ets/model/BzhxModel.ets
+2
-2
DsRfidModel.ets
entry/src/main/ets/model/DsRfidModel.ets
+14
-0
HwModel.ets
entry/src/main/ets/model/HwModel.ets
+5
-0
GoodsSelectHwPage.ets
entry/src/main/ets/pages/metailmange/GoodsSelectHwPage.ets
+44
-10
UHFScanPage.ets
entry/src/main/ets/pages/metailmange/UHFScanPage.ets
+93
-38
WzInPage.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzInPage.ets
+4
-11
WzinDetail.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
+1
-1
PzInOutDetailPage.ets
entry/src/main/ets/pages/order_detail/PzInOutDetailPage.ets
+36
-94
DataSynchronism.ets
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
+23
-11
ListDialog.ets
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/ListDialog.ets
+34
-9
SetStatusDialog.ets
entry/src/main/ets/view/SetStatusDialog/SetStatusDialog.ets
+3
-1
没有找到文件。
common/src/main/ets/db/dao/BzhxDao.ets
View file @
c834d195
...
@@ -67,4 +67,12 @@ export class BzhxDao extends BaseTable<Bzhx> {
...
@@ -67,4 +67,12 @@ export class BzhxDao extends BaseTable<Bzhx> {
wp.orderByAsc('GUID').offsetAs(offset).limitAs(20);
wp.orderByAsc('GUID').offsetAs(offset).limitAs(20);
return this.query(wp, this.getTableColumns())
return this.query(wp, this.getTableColumns())
}
}
async selectWZInfo(lsm?:string):Promise<Bzhx[]>{
let wp = this.getPredicates();
if (lsm) {
wp.equalTo('LSM', lsm);
}
wp.orderByAsc('LSM');
return this.query(wp, this.getTableColumns())
}
}
}
\ No newline at end of file
common/src/main/ets/db/dao/DsRfidDao.ets
View file @
c834d195
...
@@ -53,4 +53,30 @@ export class DsRfidDao extends BaseTable<DsRfid> {
...
@@ -53,4 +53,30 @@ export class DsRfidDao extends BaseTable<DsRfid> {
)`;
)`;
return count_sql;
return count_sql;
}
}
/*查询上架---sjType:0(待上架),1(已上架)*/
async getselectSJList(wzcrkguid: string,sjType:number): Promise<DsRfid[]> {
let wp = this.getPredicates();
if (wzcrkguid) {
wp.equalTo('WZCRKGUID', wzcrkguid);
}
if(sjType==0){
wp.equalTo("HWH","暂无")
}else {
wp.notEqualTo("HWH","暂无")
}
wp.orderByAsc('HWH');
return this.query(wp, this.getTableColumns())
}
/**
* 更新上架状态
*/
async updateSJStatus(guid: string, hwh?: string): Promise<number> {
const valueBucket = {
"HWH": hwh
};
let wp = this.getPredicates()
wp.equalTo('guid', guid)
return this.updateData(valueBucket, wp)
}
}
}
\ No newline at end of file
common/src/main/ets/db/dao/HwInfoDao.ets
View file @
c834d195
...
@@ -60,5 +60,12 @@ export class HwInfoDao extends BaseTable<HwInfo> {
...
@@ -60,5 +60,12 @@ export class HwInfoDao extends BaseTable<HwInfo> {
wp.orderByAsc('HWH');
wp.orderByAsc('HWH');
return this.query(wp, this.getTableColumns())
return this.query(wp, this.getTableColumns())
}
}
async getselectHwList(kfguid: string): Promise<HwInfo[]> {
let wp = this.getPredicates();
if (kfguid) {
wp.equalTo('KFGUID', kfguid);
}
wp.orderByAsc('HWH');
return this.query(wp, this.getTableColumns())
}
}
}
\ No newline at end of file
common/src/main/ets/db/dao/WzhxdmDao.ets
View file @
c834d195
...
@@ -62,7 +62,7 @@ export class WzhxdmDao extends BaseTable<Wzhxdm> {
...
@@ -62,7 +62,7 @@ export class WzhxdmDao extends BaseTable<Wzhxdm> {
async selectHXList(sql?: string): Promise<Wzhxdm[]> {
async selectHXList(sql?: string): Promise<Wzhxdm[]> {
let db = await this.futureDb;
let db = await this.futureDb;
let rs = await db.querySql(
'', []
);
let rs = await db.querySql(
sql, this.getTableColumns()
);
let items: Wzhxdm[];
let items: Wzhxdm[];
if (rs.goToFirstRow()) {
if (rs.goToFirstRow()) {
do {
do {
...
...
entry/src/main/ets/identify/analysis/analysis_QR_code.ets
View file @
c834d195
...
@@ -238,7 +238,7 @@ async function analysisQrCode(bqData:string, isData:boolean = false) {
...
@@ -238,7 +238,7 @@ async function analysisQrCode(bqData:string, isData:boolean = false) {
// "' or lsm = '" + hx_map["wzdm"] + "') " + " and ( pmdmten in (" + hx_map["pmdm_hxmc"] +
// "' or lsm = '" + hx_map["wzdm"] + "') " + " and ( pmdmten in (" + hx_map["pmdm_hxmc"] +
// ") or hxmc in (" + hx_map["pmdm_hxmc"] + ") or lsm in (" + hx_map["pmdm_hxmc"] + ")) ";
// ") or hxmc in (" + hx_map["pmdm_hxmc"] + ") or lsm in (" + hx_map["pmdm_hxmc"] + ")) ";
let sql = "select wzdm,hxdm,hxmc,lsm,wzpm from
tab_xtwh_jcsj_wzhxdm
where "+
let sql = "select wzdm,hxdm,hxmc,lsm,wzpm from
TAB_XTWH_JCSJ_WZHXDM
where "+
" lsm = '" + hx_map["wzdm"] + "' " +
" lsm = '" + hx_map["wzdm"] + "' " +
" or lsm in (" + hx_map["pmdm_hxmc"] + ")"+
" or lsm in (" + hx_map["pmdm_hxmc"] + ")"+
" or pmdmten = '" + hx_map["wzdm"] + "' " +
" or pmdmten = '" + hx_map["wzdm"] + "' " +
...
@@ -255,8 +255,12 @@ async function analysisQrCode(bqData:string, isData:boolean = false) {
...
@@ -255,8 +255,12 @@ async function analysisQrCode(bqData:string, isData:boolean = false) {
// const allList = await selectInformationType("GY_M_PMV3", allsql)
// const allList = await selectInformationType("GY_M_PMV3", allsql)
// const allList1 = await createOrFindSQL("GY_M_PMV3", allsql1)\
// const allList1 = await createOrFindSQL("GY_M_PMV3", allsql1)\
bzhxModal.queryLsm(str)
bzhxModal.queryLsm(str)
console.log('sql
',
sql)
console.log('sql
查询语句'+
sql)
let wzdmList = await bzhxModal.queryHXlist(sql)
let wzdmList = await bzhxModal.queryHXlist(sql)
console.log('sql查询结果'+JSON.stringify(wzdmList))
if(!wzdmList){
wzdmList=[]
}
for (let j = 0; j < wzdmList.length; j++) {
for (let j = 0; j < wzdmList.length; j++) {
let wzdm = wzdmList[j];
let wzdm = wzdmList[j];
Object.keys(hx_map).forEach((item) => {
Object.keys(hx_map).forEach((item) => {
...
...
entry/src/main/ets/model/BzhxModel.ets
View file @
c834d195
...
@@ -26,8 +26,8 @@ class BzhxModel {
...
@@ -26,8 +26,8 @@ class BzhxModel {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix, pmdmten)
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix, pmdmten)
return res;
return res;
}
}
async queryLsm(lsm?: string):Promise<
Wzdm
[]> {
async queryLsm(lsm?: string):Promise<
Bzhx
[]> {
let res = await SQLiteContext.with(
WzdmDao).selectWZDM
(lsm);
let res = await SQLiteContext.with(
BzhxDao).selectWZInfo
(lsm);
Logger.info("查询LSM结果"+JSON.stringify(res))
Logger.info("查询LSM结果"+JSON.stringify(res))
return res;
return res;
}
}
...
...
entry/src/main/ets/model/DsRfidModel.ets
View file @
c834d195
...
@@ -6,6 +6,20 @@ class DsRfidModel {
...
@@ -6,6 +6,20 @@ class DsRfidModel {
data.guid=uuid()
data.guid=uuid()
await SQLiteContext.with(DsRfidDao).insert(data)
await SQLiteContext.with(DsRfidDao).insert(data)
}
}
// 查询待上架
async queryDSJ(wzcrkguid? : string,sjType?:number): Promise<DsRfid[]> {
let res = await SQLiteContext.with(DsRfidDao).getselectSJList(wzcrkguid,sjType)
return res;
}
// 查询已上架
async queryYSJ(wzcrkguid? : string,sjType?:number): Promise<DsRfid[]> {
let res = await SQLiteContext.with(DsRfidDao).getselectSJList(wzcrkguid,sjType)
return res;
}
async updateSJStatus(guid: string, hwh: string):Promise<number> {
let res = await SQLiteContext.with(DsRfidDao).updateSJStatus(guid, hwh)
return res;
}
}
}
const dsRfidModel = new DsRfidModel()
const dsRfidModel = new DsRfidModel()
...
...
entry/src/main/ets/model/HwModel.ets
View file @
c834d195
...
@@ -12,6 +12,11 @@ class HwModel {
...
@@ -12,6 +12,11 @@ class HwModel {
let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
return res;
return res;
}
}
// 查询库房下货位
async queryHw(kfguid? : string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getselectHwList(kfguid)
return res;
}
// 清空表
// 清空表
async clear() {
async clear() {
await SQLiteContext.with(HwInfoDao).clearTable()
await SQLiteContext.with(HwInfoDao).clearTable()
...
...
entry/src/main/ets/pages/metailmange/GoodsSelectHwPage.ets
View file @
c834d195
import { TitleBar } from '../../view/title/TitleBar'
import { TitleBar } from '../../view/title/TitleBar'
import promptAction from '@ohos.promptAction'
import promptAction from '@ohos.promptAction'
import hwModel from "../../model/HwModel"
import { HwInfo, SQLiteContext, HwInfoDao,Logger} from '@ohos/common'
import dsRfidModel from '../../model/DsRfidModel';
import router from '@ohos.router'
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderWidth(2)
...
@@ -10,20 +14,54 @@ import promptAction from '@ohos.promptAction'
...
@@ -10,20 +14,54 @@ import promptAction from '@ohos.promptAction'
.type(ButtonType.Normal)
.type(ButtonType.Normal)
.stateEffect(true)
.stateEffect(true)
}
}
@Entry
@Entry
@Component
@Component
struct GoodsSelectHwPage{
struct GoodsSelectHwPage{
@State model: boolean = true
@State model: boolean = true
@State hwInfoList:HwInfo[]=[]
@State selectValue:Array<SelectOption>=[]
@State checkedList: Array<string> = []
@State hwh:string=""
aboutToAppear(){
this.checkedList= router.getParams() as string[];
this.getHwList()
}
async getHwList(){
this.hwInfoList=await hwModel.queryHw("")
this.selectValue=this.hwInfoList.map(item =>{
return {value:item.hwh}
})
}
/*手动保存*/
onSubmit() {
try {
Logger.info("选择上架数据===》"+JSON.stringify(this.checkedList))
this.checkedList.forEach(async (element) => {
let num = await dsRfidModel.updateSJStatus(element, this.hwh)
if (num) {// 如果更新成功就减少
promptAction.showToast({
message: "保存成功"
})
}else{
promptAction.showToast({
message: "保存失败"
})
}
})
} catch (e) {
} finally {
router.back()
this.checkedList = []
}
}
build(){
build(){
Column() {
Column() {
Flex({ direction: FlexDirection.Column }) {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "货位"})
TitleBar({ title: "货位"})
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Column() {
Column() {
Select(
[{ value: "LS-1-1-2" }, { value: "LS-1-1-3" }, { value: "LS-1-1-4" }]
)
Select(
this.selectValue
)
.value('请选择')
.value('请选择')
.borderWidth(1)
.borderWidth(1)
.borderRadius(6)
.borderRadius(6)
...
@@ -34,7 +72,7 @@ struct GoodsSelectHwPage{
...
@@ -34,7 +72,7 @@ struct GoodsSelectHwPage{
.borderColor("#e5e5e5")
.borderColor("#e5e5e5")
.width(220)
.width(220)
.onSelect((index: number, value?: string) => {
.onSelect((index: number, value?: string) => {
this.hwh=value
})
})
}.visibility(this.model?Visibility.Visible:Visibility.Hidden).width('70%').margin({ right: 10 })
}.visibility(this.model?Visibility.Visible:Visibility.Hidden).width('70%').margin({ right: 10 })
...
@@ -52,7 +90,7 @@ struct GoodsSelectHwPage{
...
@@ -52,7 +90,7 @@ struct GoodsSelectHwPage{
if (this.model) {
if (this.model) {
} else {
} else {
Flex({ justifyContent: FlexAlign.Center , alignItems: ItemAlign.Center
}) {
Flex({ justifyContent: FlexAlign.Center , alignItems: ItemAlign.Center}) {
Text('请扫描货位码').fontColor('#fff').fontSize(20)
Text('请扫描货位码').fontColor('#fff').fontSize(20)
}
}
.width('100%')
.width('100%')
...
@@ -72,14 +110,10 @@ struct GoodsSelectHwPage{
...
@@ -72,14 +110,10 @@ struct GoodsSelectHwPage{
.fontColor('#0fa983')
.fontColor('#0fa983')
.backgroundColor('#fff')
.backgroundColor('#fff')
.onClick(() => {
.onClick(() => {
promptAction.showToast({
this.onSubmit()
message: "保存"
})
})
})
}
}
.height(70)
.height(70)
}.width("100%")
}.width("100%")
}.linearGradient({
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
direction: GradientDirection.Right, // 渐变方向
...
...
entry/src/main/ets/pages/metailmange/UHFScanPage.ets
View file @
c834d195
...
@@ -2,8 +2,10 @@ import { TitleBar } from '../../view/title/TitleBar'
...
@@ -2,8 +2,10 @@ import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import {analysisQrCode} from '../../identify/analysis/analysis_QR_code'
import {analysisQrCode} from '../../identify/analysis/analysis_QR_code'
import dsRfidModel from '../../model/DsRfidModel';
import dsRfidModel from '../../model/DsRfidModel';
import
Prompt from '@system.prompt
';
import
promptAction from '@ohos.promptAction
';
import ProductEpc from '../../identify/analysis/label/ProductEpc';
import ProductEpc from '../../identify/analysis/label/ProductEpc';
import bzhxModal from '../../model/BzhxModel'
import { uuid } from '@ohos/common/src/main/ets/utils/util'
import {
import {
DsRfid,Logger
DsRfid,Logger
} from '@ohos/common';
} from '@ohos/common';
...
@@ -29,7 +31,27 @@ struct UHFScanPage{
...
@@ -29,7 +31,27 @@ struct UHFScanPage{
@State rfidList:DsRfid[]=[]
@State rfidList:DsRfid[]=[]
private controller: TabsController = new TabsController()
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
private searchcontroller: SearchController = new SearchController()
@State checkedList: Array<string> = []
@State doneEpcsList: string[] = []
@State doneEpcsList: string[] = []
@State pmTotal:number=0;
@State hxTotal:number=0;
@State xhTotal:number=0;
@State sumTotal:number=0;
aboutToAppear(){
this.getUPorDown()
}
/*统计品种,号型,箱号,数量*/
async countToal(){
this.pmTotal=this.convertionRfid("pmdm")
this.hxTotal=this.convertionRfid("hxmc")
this.xhTotal=this.convertionRfid("xh")
this.sumTotal=this.convertionRfid("sl")
}
/*获取上架或待上架数据*/
async getUPorDown(){
this.rfidList=await dsRfidModel.queryDSJ("1",this.currentIndex)
this.countToal()
}
@Builder TabBuilder(index: number, name: string) {
@Builder TabBuilder(index: number, name: string) {
Column() {
Column() {
Text(name)
Text(name)
...
@@ -48,15 +70,20 @@ struct UHFScanPage{
...
@@ -48,15 +70,20 @@ struct UHFScanPage{
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.selectedColor('#007DFF')
.selectedColor('#007DFF')
.onChange((value: boolean) => {
.onChange((value: boolean) => {
if (value) {
this.checkedList.push(item.guid)
} else {
this.checkedList = this.checkedList.filter(i => i !== item.guid);
}
console.info('Checkbox1 change is' + value)
console.info('Checkbox1 change is' + value)
}).margin({ right: 10,left: 10 })
}).margin({ right: 10,left: 10 })
Column(){
Column(){
Text(
"07常服"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
Text(
item.pmmc
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
Text(
"无号配号"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%").padding({top:10})
Text(
item.hxmc
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%").padding({top:10})
}.width("50%")
}.width("50%")
Text(
"8"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("15%")
Text(
item.xh
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("15%")
Text(
"5"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("15%")
Text(
item.sl
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("15%")
Text(
"暂无"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("20%")
Text(
item.hwh
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("20%")
}.height("65").backgroundColor('#fff').padding({left:5,right:10,top:5,bottom:5})
}.height("65").backgroundColor('#fff').padding({left:5,right:10,top:5,bottom:5})
}.margin({left:10,right:10})
}.margin({left:10,right:10})
}
}
...
@@ -69,10 +96,11 @@ struct UHFScanPage{
...
@@ -69,10 +96,11 @@ struct UHFScanPage{
Text("数量/个").fontColor($r("app.color.white")).textAlign(TextAlign.Center).width("25%")
Text("数量/个").fontColor($r("app.color.white")).textAlign(TextAlign.Center).width("25%")
}.borderRadius({ topLeft:6, topRight: 6 }).width("100%").backgroundColor('#0fa983').padding({left:10,right:10,top:5,bottom:5})
}.borderRadius({ topLeft:6, topRight: 6 }).width("100%").backgroundColor('#0fa983').padding({left:10,right:10,top:5,bottom:5})
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.pmTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.hxTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.xhTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.sumTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
// this.convertionRfid('PMDM').toString()
}.borderRadius({ bottomLeft:6, bottomRight: 6 }).width("100%").backgroundColor($r("app.color.white")).padding({left:10,right:10,top:5,bottom:5})
}.borderRadius({ bottomLeft:6, bottomRight: 6 }).width("100%").backgroundColor($r("app.color.white")).padding({left:10,right:10,top:5,bottom:5})
}.height(80).margin({left:10,right:10})
}.height(80).margin({left:10,right:10})
}
}
...
@@ -105,6 +133,7 @@ struct UHFScanPage{
...
@@ -105,6 +133,7 @@ struct UHFScanPage{
}
}
.onChange((index: number) => {
.onChange((index: number) => {
this.currentIndex = index
this.currentIndex = index
this.getUPorDown()
}).width("60%")
}).width("60%")
Column(){
Column(){
Text("RFID扫描:").fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
Text("RFID扫描:").fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
...
@@ -116,12 +145,12 @@ struct UHFScanPage{
...
@@ -116,12 +145,12 @@ struct UHFScanPage{
.onChange((isOn: boolean) => {
.onChange((isOn: boolean) => {
if(isOn){
if(isOn){
IdentifyService.openRFIDInv()
IdentifyService.openRFIDInv()
this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
//
this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
}else {
}else {
IdentifyService.stopRfidInv()
IdentifyService.stopRfidInv()
}
}
Logger.info('RFID开启状态:' + isOn)
Logger.info('RFID开启状态:' + isOn)
})
})
.enabled(this.currentIndex == 0 ? true : false)
Text("开启").margin({left:5,right:5})
Text("开启").margin({left:5,right:5})
}.width("100%")
}.width("100%")
}.width("40%").margin({left:20,right:20})
}.width("40%").margin({left:20,right:20})
...
@@ -137,7 +166,15 @@ struct UHFScanPage{
...
@@ -137,7 +166,15 @@ struct UHFScanPage{
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center}) {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center}) {
Button("选择货位").CommonButtonStyle().width("45%")
Button("选择货位").CommonButtonStyle().width("45%")
.onClick(()=>{
.onClick(()=>{
router.pushUrl({url:"pages/metailmange/GoodsSelectHwPage"})
if (this.checkedList.length == 0) {
promptAction.showToast({
message: '请至少选择一条单据'
})
}else {
router.pushUrl({url:"pages/metailmange/GoodsSelectHwPage"
,params:this.checkedList})
}
})
})
Button("扫货位码").CommonButtonStyle().width("45%")
Button("扫货位码").CommonButtonStyle().width("45%")
}
}
...
@@ -156,8 +193,7 @@ struct UHFScanPage{
...
@@ -156,8 +193,7 @@ struct UHFScanPage{
let result = eventData.data.epc
let result = eventData.data.epc
console.log("射频扫码","收到EPC:" + result)
console.log("射频扫码","收到EPC:" + result)
if(result!=undefined&&!this.doneEpcsList.includes(result)&&result.substring(0, 2)=='05'){
if(result!=undefined&&!this.doneEpcsList.includes(result)&&result.substring(0, 2)=='05'){
IdentifyService.stopRfidInv();
this.showList(result)
// this.showList(result)
}
}
}
}
})
})
...
@@ -168,7 +204,7 @@ struct UHFScanPage{
...
@@ -168,7 +204,7 @@ struct UHFScanPage{
// this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
// this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
const [filterData] = this.hjRfidList.filter(fItem => fItem.epc == epc)
const [filterData] = this.hjRfidList.filter(fItem => fItem.epc == epc)
if (!filterData) {
if (!filterData) {
this.handleanalysisQrCode(
"050400000000000016033C62BF2A111F0000A10040E220419000"
);
this.handleanalysisQrCode(
epc
);
}
}
}catch (err){
}catch (err){
Logger.info("解析失败1"+epc+JSON.stringify(err))
Logger.info("解析失败1"+epc+JSON.stringify(err))
...
@@ -184,34 +220,27 @@ struct UHFScanPage{
...
@@ -184,34 +220,27 @@ struct UHFScanPage{
pro.getInfoFormEpc();
pro.getInfoFormEpc();
console.log("proEpc"+pro.strEpc)
console.log("proEpc"+pro.strEpc)
console.log("LSM"+pro.getiWzLsm())
console.log("LSM"+pro.getiWzLsm())
try {
const res = await analysisQrCode(pro.getiWzLsm().toString(), true)
const res = await bzhxModal.queryLsm(pro.getiWzLsm().toString())
}catch (err){
Logger.info("解析失败"+epcstr+JSON.stringify(err))
console.error("Stack Trace:", err.stack);
}
const res = await analysisQrCode(pro.getiWzLsm().toString(), true)
console.log('RFDID解析返回数据', res)
console.log('RFDID解析返回数据', res)
if (res
.data && res.data
.length == 0) {
if (res
&& res
.length == 0) {
console.log('RFDID解析返回数据', res)
console.log('RFDID解析返回数据', res)
return
return
}
}
if (res.data && res.data.length > 0) {
if (res && res.length > 0) {
Logger
res.forEach((item) => {
res.data.forEach((item) => {
let params: DsRfid = {
let params: DsRfid = {
guid:
""
,
guid:
uuid()
,
wzcrkguid: "1",
wzcrkguid: "1",
pmdmcode:
""
,
pmdmcode:
item.pmdmTen
,
pmmc:
""
,
pmmc:
item.wzpm
,
pmdm:
""
,
pmdm:
item.wzpm
,
hxmc:
""
,
hxmc:
item.hxmc
,
xh: pro.getiXangNo().toString(),
xh: pro.getiXangNo().toString(),
sl: pro.get
StrNum
(),
sl: pro.get
iNum().toString
(),
hwh: "",
hwh: "
暂无
",
epc: epcstr,
epc: epcstr,
subepc: epcstr,
subepc: epcstr
...item
}
}
console.log('params', params)
console.log('params', params)
dsRfidModel.set(params)
dsRfidModel.set(params)
...
@@ -224,16 +253,42 @@ struct UHFScanPage{
...
@@ -224,16 +253,42 @@ struct UHFScanPage{
hxmc: params.hxmc,
hxmc: params.hxmc,
xh: params.xh,
xh: params.xh,
sl: params.sl,
sl: params.sl,
hwh: "",
hwh: "
暂无
",
epc: params.epc,
epc: params.epc,
subepc: params.subepc,
subepc: params.subepc,
}
}
this.hjRfidList.push(newParams)
this.hjRfidList.push(newParams)
this.rfidList.push(newParams)
this.rfidList.push(newParams)
// this.handleGetRfidList
()
this.countToal
()
})
})
}
}
}
}
/*RFID统计*/
convertionRfid(rfidName:string):number{
var finite = []
Logger.info("识别数据"+JSON.stringify(this.rfidList))
finite = this.rfidList.map(item => item[rfidName])
Logger.info("筛选"+JSON.stringify(finite))
if (finite && finite.length > 0) {
if (rfidName == 'pmdm' || rfidName == 'hxmc' || rfidName == 'xh') {
finite = [...new Set(finite)]
Logger.info(`${rfidName}`+'统计数量'+finite.length)
return finite.length || 0
}
if (rfidName == 'sl' || rfidName == 'smsl') {
return this.sum(finite) || 0
}
} else {
Logger.info(`${rfidName}`+'统计数量'+0)
return 0
}
}
/*计算方法*/
sum(arr) {
return arr.reduce((prev, curr, idx, arr) => {
return Number(prev) + Number(curr);
});
}
onPageShow() {
onPageShow() {
console.error("========onPageShow=========")
console.error("========onPageShow=========")
this.rfidInvListen()
this.rfidInvListen()
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzInPage.ets
View file @
c834d195
...
@@ -61,11 +61,6 @@ export struct WzInPage {
...
@@ -61,11 +61,6 @@ export struct WzInPage {
this.getWzcrkList()
this.getWzcrkList()
}
}
ininData() {
this.checkedList = []
this.getWzcrkList()
}
async getWzcrkList(qzh?: number, wczt?: string) {
async getWzcrkList(qzh?: number, wczt?: string) {
Logger.info('出入库传入参数>>:', JSON.stringify(this.searchData))
Logger.info('出入库传入参数>>:', JSON.stringify(this.searchData))
this.dataSource = []
this.dataSource = []
...
@@ -75,10 +70,7 @@ export struct WzInPage {
...
@@ -75,10 +70,7 @@ export struct WzInPage {
res.forEach(element => {
res.forEach(element => {
this.dataSource.push(new WzinClass(element))
this.dataSource.push(new WzinClass(element))
});
});
// for (let index = 0; index < res.length; index++) {
Logger.info('数量是' + JSON.stringify(this.dataSource))
// const element = res[index];
// this.dataSource.push(new WzinClass(element))
// }
}
}
@Builder container() {
@Builder container() {
...
@@ -111,6 +103,7 @@ export struct WzInPage {
...
@@ -111,6 +103,7 @@ export struct WzInPage {
cancel: this.onCancel,
cancel: this.onCancel,
confirm: this.onSubmit,
confirm: this.onSubmit,
checkedList: $checkedList,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.container
container: this.container
}),
}),
autoCancel: true,
autoCancel: true,
...
@@ -127,13 +120,13 @@ export struct WzInPage {
...
@@ -127,13 +120,13 @@ export struct WzInPage {
this.checkedList.forEach(async (element) => {
this.checkedList.forEach(async (element) => {
let num = await wzcrkModel.updateWzcrkWczt(element, this.radioChecked ? '已完成' : '未完成')
let num = await wzcrkModel.updateWzcrkWczt(element, this.radioChecked ? '已完成' : '未完成')
if (num) {// 如果更新成功就减少
if (num) {// 如果更新成功就减少
this.dataSource = this.dataSource.filter(i => i.guid != element)
Logger.info("删除的数据是:" + JSON.stringify(this.dataSource))
this.dataSource.splice(this.dataSource.findIndex(i => i.guid == element), 1)
}
}
})
})
} catch (e) {
} catch (e) {
} finally {
} finally {
this.checkedList = []
this.checkedList = []
}
}
}
}
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
View file @
c834d195
...
@@ -24,7 +24,7 @@ interface params {
...
@@ -24,7 +24,7 @@ interface params {
/*入库详情*/
/*入库详情*/
@Entry
@Entry
@Component
@Component
struct
PzInOutDetailPage
{
struct
WzinDetail
{
@State fontColor: string = '#0FA983'
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State currentIndex: number = 0
...
...
entry/src/main/ets/pages/order_detail/PzInOutDetailPage.ets
View file @
c834d195
import { TitleBar } from '../../view/title/TitleBar'
import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import router from '@ohos.router';
import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import wzcrkmxModel from '../../model/WzcrkmxModel';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { renderPzlx, renderSzlx, renderZmlx } from '../metailmange/WzInPage/Wzin.data';
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderWidth(2)
.borderColor('#0fa983')
.borderColor('#0fa983')
...
@@ -15,60 +10,29 @@ import { renderPzlx, renderSzlx, renderZmlx } from '../metailmange/WzInPage/Wzin
...
@@ -15,60 +10,29 @@ import { renderPzlx, renderSzlx, renderZmlx } from '../metailmange/WzInPage/Wzin
.type(ButtonType.Normal)
.type(ButtonType.Normal)
.stateEffect(true)
.stateEffect(true)
}
}
interface params {
wzcrk: Wzcrk
}
/*入库.出库*/
/*入库.出库*/
@Entry
@Entry
@Component
@Component
struct PzInOutDetailPage
{
struct PzInOutDetailPage{
@State fontColor: string = '#0FA983'
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State currentIndex: number = 0
@State wzcrk: Wzcrk = null // 物资出入库单据信息
private controller: TabsController = new TabsController()
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
private searchcontroller: SearchController = new SearchController()
aboutToAppear() {
const params = router.getParams() as params
this.wzcrk = params.wzcrk
Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk))
this.getDetail()
}
// 获取凭证信息
async getDetail() {
// const res = await wzcrkmxModel.query(this.wzcrk.guid)
// Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
}
@Builder TabBuilder(index: number, name: string) {
@Builder TabBuilder(index: number, name: string) {
Column() {
Column() {
Text(name)
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.fontSize(21)
.lineHeight(36)
.lineHeight(36)
}
} .width('100%')
.width('100%')
.height(45)
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
}
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false },
{ title: "凭证号", key: 'pzh', enabled: false },
{ title: "库房", key: '', enabled: false },
{ title: "收支类型", key: 'pzszlx', enabled: false },
{ title: "运单号", key: 'ydh', enabled: false },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false },
{ title: "备注", key: 'zmlx', enabled: false }
]
@Builder VoucherRow() {
@Builder VoucherRow() {
Flex({ direction: FlexDirection.Column
}) {
Flex({ direction: FlexDirection.Column}) {
Row() {
Row() {
Divider()
Divider()
.vertical(true)
.vertical(true)
...
@@ -90,7 +54,7 @@ struct PzInOutDetailPage {
...
@@ -90,7 +54,7 @@ struct PzInOutDetailPage {
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "发物单"
, text: renderPzlx(this.wzcrk.pzlx)
})
TextInput({ placeholder: "发物单" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderColor("#454545")
.borderRadius(5)
.borderRadius(5)
...
@@ -107,14 +71,13 @@ struct PzInOutDetailPage {
...
@@ -107,14 +71,13 @@ struct PzInOutDetailPage {
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入凭证号"
, text: this.wzcrk.pzh + ''
})
TextInput({ placeholder: "请输入凭证号" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.borderRadius(5)
.width("70%")
.width("70%")
.height(40)
.height(40)
.padding(10)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
@@ -131,14 +94,13 @@ struct PzInOutDetailPage {
...
@@ -131,14 +94,13 @@ struct PzInOutDetailPage {
.padding(10)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
}.padding("10vp")
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("收支类型:")
Text("收支类型:")
.fontSize(14)
.fontSize(14)
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "调入"
, text: renderSzlx(this.wzcrk.pzszlx)
})
TextInput({ placeholder: "调入" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderColor("#454545")
.borderRadius(5)
.borderRadius(5)
...
@@ -148,36 +110,32 @@ struct PzInOutDetailPage {
...
@@ -148,36 +110,32 @@ struct PzInOutDetailPage {
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
.enabled(false)
}.padding("10vp")
}.padding("10vp")
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("运单号:")
Text("运单号:")
.fontSize(14)
.fontSize(14)
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入运单号"
, text: this.wzcrk.ydh
})
TextInput({ placeholder: "请输入运单号" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.borderRadius(5)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
.width("70%")
.width("70%")
.height(40)
.height(40)
.padding(10)
.padding(10)
.enabled(false)
}.padding("10vp").width("100%")
}.padding("10vp").width("100%")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("发物管理单位:")
Text("发物管理单位:")
.fontSize(14)
.fontSize(14)
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "浙江钧普科技股份有限公司"
, text: this.wzcrk.fwgldwdm
})
TextInput({ placeholder: "浙江钧普科技股份有限公司" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.borderRadius(5)
.width("70%")
.width("70%")
.height(40)
.height(40)
.padding(10)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
@@ -186,14 +144,13 @@ struct PzInOutDetailPage {
...
@@ -186,14 +144,13 @@ struct PzInOutDetailPage {
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "浙江钧普科技股份有限公司"
, text: this.wzcrk.swgldwdm
})
TextInput({ placeholder: "浙江钧普科技股份有限公司" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.borderRadius(5)
.width("70%")
.width("70%")
.height(40)
.height(40)
.padding(10)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
@@ -202,7 +159,7 @@ struct PzInOutDetailPage {
...
@@ -202,7 +159,7 @@ struct PzInOutDetailPage {
.width("30%")
.width("30%")
.height(40)
.height(40)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入账目类型"
, text: renderZmlx(this.wzcrk.zmlx)
})
TextInput({ placeholder: "请输入账目类型" })
.enterKeyType(EnterKeyType.Search)
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.borderRadius(5)
.width("70%")
.width("70%")
...
@@ -210,7 +167,6 @@ struct PzInOutDetailPage {
...
@@ -210,7 +167,6 @@ struct PzInOutDetailPage {
.padding(10)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.backgroundColor($r("app.color.disabledColor"))
}.padding("10vp").width("100%")
}.padding("10vp").width("100%")
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("备注:")
Text("备注:")
.fontSize(14)
.fontSize(14)
...
@@ -231,11 +187,10 @@ struct PzInOutDetailPage {
...
@@ -231,11 +187,10 @@ struct PzInOutDetailPage {
.borderRadius(15)
.borderRadius(15)
.backgroundColor("#fff")
.backgroundColor("#fff")
}
}
@Builder WzInfoRow() {
@Builder WzInfoRow() {
Flex({ direction: FlexDirection.Column }) {
Flex({ direction: FlexDirection.Column }) {
Column() {
Column() {
Flex({
justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center })
{
Flex({
justifyContent:FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center})
{
Row() {
Row() {
Divider()
Divider()
.vertical(true)
.vertical(true)
...
@@ -250,22 +205,19 @@ struct PzInOutDetailPage {
...
@@ -250,22 +205,19 @@ struct PzInOutDetailPage {
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
}
}
.width("35%")
.width("35%")
Text("浙江钧普科技股份有有限公司1号库房")
Text("浙江钧普科技股份有有限公司1号库房")
.fontWeight(FontWeight.Medium)
.fontWeight(FontWeight.Medium)
.fontSize(21)
.fontSize(21)
.fontColor($r("app.color.title_background"))
.fontColor($r("app.color.title_background"))
.width("60%")
.width("60%")
.textAlign(TextAlign.Start)
.textAlign(TextAlign.Start).padding({bottom:20,top:20})
.padding({ bottom: 20, top: 20 })
}.width("100%")
}.width("100%")
}.padding({
bottom: 20, top: 20
})
}.padding({
bottom:20,top:20
})
.borderRadius(5)
.borderRadius(5)
.width("100%")
.width("100%")
.backgroundColor("#fff")
.backgroundColor("#fff")
Flex({ direction: FlexDirection.Column}) {
Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Row() {
Row() {
Divider()
Divider()
.vertical(true)
.vertical(true)
...
@@ -279,11 +231,10 @@ struct PzInOutDetailPage {
...
@@ -279,11 +231,10 @@ struct PzInOutDetailPage {
.fontSize(14)
.fontSize(14)
.fontColor($r("app.color.item_color_black"))
.fontColor($r("app.color.item_color_black"))
}
}
}.padding({
left: 2, right: 10
})
}.padding({
left:2,right:10
})
.width("100%")
.width("100%")
Row(){
Row() {
Flex({justifyContent:FlexAlign.SpaceBetween, alignItems: ItemAlign.Center}){
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
.height(40)
.height(40)
.backgroundColor('#F5F5F5')
.backgroundColor('#F5F5F5')
...
@@ -295,62 +246,53 @@ struct PzInOutDetailPage {
...
@@ -295,62 +246,53 @@ struct PzInOutDetailPage {
.onSubmit((value: string) => {
.onSubmit((value: string) => {
})
})
.onChange((value: string) => {
.onChange((value: string) => {
})
}).margin({left:10})
.margin({ left: 10 })
.borderRadius(5)
.borderRadius(5)
Button("查看状态").CommonButtonStyle().width("25%").margin({
left: 5, right: 5 }).onClick(() =>
{
Button("查看状态").CommonButtonStyle().width("25%").margin({
left:5,right:5}).onClick(()=>
{
router.pushUrl({
url: 'pages/metailmange/WzStatus'
})
router.pushUrl({
url:'pages/metailmange/WzStatus'
})
})
})
}.width("100%")
}.width("100%")
}.padding({ top: 10, bottom: 10 }).width("100%")
}.padding({top:10,bottom:10}).width("100%")
Column(){
Column() {
BasicTable({dataSource:[]})
BasicTable({ dataSource: [] })
}.flexGrow(1)
}.flexGrow(1)
}
}.padding({bottom:20,top:20}).borderRadius(15)
.padding({ bottom: 20, top: 20 })
.margin({top:20})
.borderRadius(15)
.margin({ top: 20 })
.width("100%")
.width("100%")
.backgroundColor("#fff")
.backgroundColor("#fff")
}
}
.width("100%")
.width("100%")
.height("100%")
.height("100%")
}
}
build(){
build() {
Column() {
Column() {
Flex({ direction: FlexDirection.Column }) {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情"
})
TitleBar({ title: "凭证详情"})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
TabContent() {
Column()
{
Column(){
this.VoucherRow()
this.VoucherRow()
}.width("100%")
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
TabContent() {
Column() {
Column(){
if (this.wzcrk) {
this.WzInfoRow()
this.WzInfoRow()
}
}.width("100%")
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}.tabBar(this.TabBuilder(1, '物资信息'))
}
}
.margin({
left: 15, right: 15, top: 15
})
.margin({
left:15,right:15,top:15
})
.onChange((index: number) => {
.onChange((index: number) => {
this.currentIndex = index
this.currentIndex = index
})
})
Row() {
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("射频扫码").CommonButtonStyle().width("50%").onClick(()
=>
{
Button("射频扫码").CommonButtonStyle().width("50%").onClick(()
=>
{
router.pushUrl({
url: 'pages/metailmange/UHFScanPage'
})
router.pushUrl({
url:'pages/metailmange/UHFScanPage'
})
})
})
Button("保存").CommonButtonStyle().width("50%")
Button("保存").CommonButtonStyle().width("50%")
}
}
}.margin({
left: 10, right: 10
}).height(80)
}.margin({
left:10,right:10
}).height(80)
}.width("100%")
}.width("100%")
}.linearGradient({
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
direction: GradientDirection.Right, // 渐变方向
...
...
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
View file @
c834d195
...
@@ -19,6 +19,7 @@ import bgglModel from '../../../model/BgglModel'
...
@@ -19,6 +19,7 @@ import bgglModel from '../../../model/BgglModel'
import wzdmModel from '../../../model/WzdmModel'
import wzdmModel from '../../../model/WzdmModel'
import drModel from '../../../model/DrModel'
import drModel from '../../../model/DrModel'
import { DrInfo } from '@ohos/common/src/main/ets/entity/DrInfo'
import { DrInfo } from '@ohos/common/src/main/ets/entity/DrInfo'
import wzcrkmxModel from '../../../model/WzcrkmxModel'
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderWidth(2)
...
@@ -57,6 +58,7 @@ export struct Pmhx {
...
@@ -57,6 +58,7 @@ export struct Pmhx {
listController: CustomDialogController = new CustomDialogController({
listController: CustomDialogController = new CustomDialogController({
builder: ListDialog({
builder: ListDialog({
cancel: this.onCancel,
cancel: this.onCancel,
getDrData: this.getDrData
}),
}),
autoCancel: true,
autoCancel: true,
alignment: DialogAlignment.Bottom,
alignment: DialogAlignment.Bottom,
...
@@ -77,7 +79,7 @@ export struct Pmhx {
...
@@ -77,7 +79,7 @@ export struct Pmhx {
console.log("onSubmit")
console.log("onSubmit")
}
}
aboutToAppear(){
aboutToAppear()
{
this.getDrData()
this.getDrData()
}
}
...
@@ -94,6 +96,11 @@ export struct Pmhx {
...
@@ -94,6 +96,11 @@ export struct Pmhx {
case "基础信息":
case "基础信息":
try {
try {
this.showProgress = true
this.showProgress = true
await qyModel.clear();
await kfModel.clear();
await hwModel.clear();
await hjModel.clear();
await gldwModel.clear();
const res = await getPmList({ rows: 5000, page: 1 })
const res = await getPmList({ rows: 5000, page: 1 })
// 获取品名
// 获取品名
const allData = JSON.parse(res).bzhxList as Bzhx[]
const allData = JSON.parse(res).bzhxList as Bzhx[]
...
@@ -142,6 +149,8 @@ export struct Pmhx {
...
@@ -142,6 +149,8 @@ export struct Pmhx {
case "单据导入":
case "单据导入":
try {
try {
this.showProgress = true
this.showProgress = true
await wzcrkModel.clear()
await wzcrkmxModel.clear()
const { rows } = await getDjList({})
const { rows } = await getDjList({})
// 使用map对rows进行操作
// 使用map对rows进行操作
const mappedRows = rows.map((row) => {
const mappedRows = rows.map((row) => {
...
@@ -193,6 +202,7 @@ export struct Pmhx {
...
@@ -193,6 +202,7 @@ export struct Pmhx {
case "订单导入":
case "订单导入":
try {
try {
this.showProgress = true
this.showProgress = true
await bgglModel.clear()
const res = await getBgList({})
const res = await getBgList({})
// 获取包裹数据
// 获取包裹数据
const bgData = JSON.parse(res) as Bggl[]
const bgData = JSON.parse(res) as Bggl[]
...
@@ -257,18 +267,20 @@ export struct Pmhx {
...
@@ -257,18 +267,20 @@ export struct Pmhx {
Column() {
Column() {
Row() {
Row() {
Text("当前数据导入版本:").fontSize(12).fontColor("#0fa983")
Text("当前数据导入版本:").fontSize(12).fontColor("#0fa983")
Text("暂无").fontSize(12).fontColor("#0fa983")
Text("暂无").fontSize(12).fontColor("#0fa983").margin({ left: 20 })
}
}.margin({ top: 5 })
List(){
ForEach(this.drData,(item: DrInfo) => {
List() {
ListItem(){
ForEach(this.drData, (item: DrInfo) => {
Column(){
ListItem() {
Text(item.filename).fontSize(11)
Column() {
Text(item.time).fontSize(10).fontSize('#858383')
Text(item.filename).fontSize(12).alignSelf(ItemAlign.Start).padding({ top: 6, bottom: 3 })
}
Text(item.time).fontSize(10).padding({ bottom: 4 }).fontColor('#8a919f').alignSelf(ItemAlign.Start)
}.margin({ left: 8 })
}
}
})
})
}
}.divider({ strokeWidth: 1, color: "#afb5c0" }).margin({ top: 6 })
}.border({ width: 1, color: 0x0fa983, radius: 2, style: BorderStyle.Dotted })
}.border({ width: 1, color: 0x0fa983, radius: 2, style: BorderStyle.Dotted })
.height("92%").width('92%').margin({ top: 12 })
.height("92%").width('92%').margin({ top: 12 })
}
}
...
...
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/ListDialog.ets
View file @
c834d195
...
@@ -11,12 +11,14 @@ import kfModel from '../../../model/KfModel'
...
@@ -11,12 +11,14 @@ import kfModel from '../../../model/KfModel'
import hwModel from '../../../model/HwModel'
import hwModel from '../../../model/HwModel'
import hjModel from '../../../model/HjModel'
import hjModel from '../../../model/HjModel'
import gldwModel from '../../../model/GldwModel'
import gldwModel from '../../../model/GldwModel'
import drModel from '../../../model/DrModel'
@CustomDialog
@CustomDialog
@Component
@Component
export struct ListDialog {
export struct ListDialog {
cancel: () => void
cancel: () => void
@State content: string = ''
@State content: string = ''
getDrData: () => void
dialogController: CustomDialogController = new CustomDialogController({
dialogController: CustomDialogController = new CustomDialogController({
builder: TipDialog({
builder: TipDialog({
cancel: this.onCancel,
cancel: this.onCancel,
...
@@ -41,11 +43,13 @@ export struct ListDialog {
...
@@ -41,11 +43,13 @@ export struct ListDialog {
case '是否确定清除基础数据':
case '是否确定清除基础数据':
try {
try {
qyModel.clear();
await qyModel.clear();
kfModel.clear();
await kfModel.clear();
hwModel.clear();
await hwModel.clear();
hjModel.clear();
await hjModel.clear();
gldwModel.clear();
await gldwModel.clear();
await await drModel.set('清除基础数据')
await this.getDrData()
promptAction.showToast({
promptAction.showToast({
message: '清除基础数据成功'
message: '清除基础数据成功'
})
})
...
@@ -57,8 +61,10 @@ export struct ListDialog {
...
@@ -57,8 +61,10 @@ export struct ListDialog {
case '是否确认清除单据数据':
case '是否确认清除单据数据':
try {
try {
wzcrkModel.clear()
await wzcrkModel.clear()
wzcrkmxModel.clear()
await wzcrkmxModel.clear()
await drModel.set('清除单据数据')
// await this.getDrData()
promptAction.showToast({
promptAction.showToast({
message: '清除单据数据成功'
message: '清除单据数据成功'
})
})
...
@@ -71,7 +77,9 @@ export struct ListDialog {
...
@@ -71,7 +77,9 @@ export struct ListDialog {
case '是否确认清除包裹数据':
case '是否确认清除包裹数据':
try {
try {
bgglModel.clear()
await bgglModel.clear()
await drModel.set('清除包裹数据')
await this.getDrData()
promptAction.showToast({
promptAction.showToast({
message: '清除包裹数据成功'
message: '清除包裹数据成功'
})
})
...
@@ -84,7 +92,9 @@ export struct ListDialog {
...
@@ -84,7 +92,9 @@ export struct ListDialog {
case '是否确认清除品名及号型数据':
case '是否确认清除品名及号型数据':
try {
try {
bzhxModel.clear()
await bzhxModel.clear()
await drModel.set('清除品名及号型')
await this.getDrData()
promptAction.showToast({
promptAction.showToast({
message: '清除品名及号型数据成功'
message: '清除品名及号型数据成功'
})
})
...
@@ -95,6 +105,21 @@ export struct ListDialog {
...
@@ -95,6 +105,21 @@ export struct ListDialog {
}
}
break;
break;
case '是否确认清除导入导出数据':
try {
await drModel.clear()
await drModel.set('清除导入导出数据')
await this.getDrData()
promptAction.showToast({
message: '清除导入导出数据成功'
})
} catch (e) {
promptAction.showToast({
message: '清除导入导出数据失败'
})
}
break;
default:
default:
break;
break;
}
}
...
...
entry/src/main/ets/view/SetStatusDialog/SetStatusDialog.ets
View file @
c834d195
import { UniListItem } from '@ohos/system/src/main/ets/model/UniInitList';
import { UniListItem } from '@ohos/system/src/main/ets/model/UniInitList';
import { WzinClass } from '../../pages/metailmange/WzInPage/Wzin.data';
@Extend(Button) function CommonButtonStyle() {
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderWidth(2)
.borderColor('#0fa983')
.borderColor('#0fa983')
...
@@ -31,7 +32,7 @@ interface FormData {
...
@@ -31,7 +32,7 @@ interface FormData {
@CustomDialog
@CustomDialog
@Component
@Component
export struct SetStatusDialog {
export struct SetStatusDialog {
@Link dataSource: WzinClass[]
@Link checkedList: Array<string>
@Link checkedList: Array<string>
controller: CustomDialogController
controller: CustomDialogController
cancel: () => void
cancel: () => void
...
@@ -39,6 +40,7 @@ export struct SetStatusDialog {
...
@@ -39,6 +40,7 @@ export struct SetStatusDialog {
@BuilderParam container: () => void
@BuilderParam container: () => void
build() {
build() {
Column() {
Column() {
Flex({ alignItems: ItemAlign.Start }) {
Flex({ alignItems: ItemAlign.Start }) {
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论