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
6d27777a
Commit
6d27777a
authored
Jan 22, 2024
by
毛勇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
射频扫码
parent
25f48c26
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
247 行增加
和
149 行删除
+247
-149
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
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
没有找到文件。
common/src/main/ets/db/dao/BzhxDao.ets
View file @
6d27777a
...
...
@@ -67,4 +67,12 @@ export class BzhxDao extends BaseTable<Bzhx> {
wp.orderByAsc('GUID').offsetAs(offset).limitAs(20);
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 @
6d27777a
...
...
@@ -53,4 +53,30 @@ export class DsRfidDao extends BaseTable<DsRfid> {
)`;
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 @
6d27777a
...
...
@@ -60,5 +60,12 @@ export class HwInfoDao extends BaseTable<HwInfo> {
wp.orderByAsc('HWH');
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 @
6d27777a
...
...
@@ -62,7 +62,7 @@ export class WzhxdmDao extends BaseTable<Wzhxdm> {
async selectHXList(sql?: string): Promise<Wzhxdm[]> {
let db = await this.futureDb;
let rs = await db.querySql(
'', []
);
let rs = await db.querySql(
sql, this.getTableColumns()
);
let items: Wzhxdm[];
if (rs.goToFirstRow()) {
do {
...
...
entry/src/main/ets/identify/analysis/analysis_QR_code.ets
View file @
6d27777a
...
...
@@ -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 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"] + "' " +
" or lsm in (" + hx_map["pmdm_hxmc"] + ")"+
" or pmdmten = '" + hx_map["wzdm"] + "' " +
...
...
@@ -255,8 +255,12 @@ async function analysisQrCode(bqData:string, isData:boolean = false) {
// const allList = await selectInformationType("GY_M_PMV3", allsql)
// const allList1 = await createOrFindSQL("GY_M_PMV3", allsql1)\
bzhxModal.queryLsm(str)
console.log('sql
',
sql)
console.log('sql
查询语句'+
sql)
let wzdmList = await bzhxModal.queryHXlist(sql)
console.log('sql查询结果'+JSON.stringify(wzdmList))
if(!wzdmList){
wzdmList=[]
}
for (let j = 0; j < wzdmList.length; j++) {
let wzdm = wzdmList[j];
Object.keys(hx_map).forEach((item) => {
...
...
entry/src/main/ets/model/BzhxModel.ets
View file @
6d27777a
...
...
@@ -26,8 +26,8 @@ class BzhxModel {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(offset, pmdmsix, pmdmten)
return res;
}
async queryLsm(lsm?: string):Promise<
Wzdm
[]> {
let res = await SQLiteContext.with(
WzdmDao).selectWZDM
(lsm);
async queryLsm(lsm?: string):Promise<
Bzhx
[]> {
let res = await SQLiteContext.with(
BzhxDao).selectWZInfo
(lsm);
Logger.info("查询LSM结果"+JSON.stringify(res))
return res;
}
...
...
entry/src/main/ets/model/DsRfidModel.ets
View file @
6d27777a
...
...
@@ -6,6 +6,20 @@ class DsRfidModel {
data.guid=uuid()
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()
...
...
entry/src/main/ets/model/HwModel.ets
View file @
6d27777a
...
...
@@ -12,6 +12,11 @@ class HwModel {
let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
return res;
}
// 查询库房下货位
async queryHw(kfguid? : string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getselectHwList(kfguid)
return res;
}
// 清空表
async clear() {
await SQLiteContext.with(HwInfoDao).clearTable()
...
...
entry/src/main/ets/pages/metailmange/GoodsSelectHwPage.ets
View file @
6d27777a
import { TitleBar } from '../../view/title/TitleBar'
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() {
.borderWidth(2)
...
...
@@ -10,20 +14,54 @@ import promptAction from '@ohos.promptAction'
.type(ButtonType.Normal)
.stateEffect(true)
}
@Entry
@Component
struct GoodsSelectHwPage{
@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(){
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "货位"})
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Column() {
Select(
[{ value: "LS-1-1-2" }, { value: "LS-1-1-3" }, { value: "LS-1-1-4" }]
)
Select(
this.selectValue
)
.value('请选择')
.borderWidth(1)
.borderRadius(6)
...
...
@@ -34,7 +72,7 @@ struct GoodsSelectHwPage{
.borderColor("#e5e5e5")
.width(220)
.onSelect((index: number, value?: string) => {
this.hwh=value
})
}.visibility(this.model?Visibility.Visible:Visibility.Hidden).width('70%').margin({ right: 10 })
...
...
@@ -52,7 +90,7 @@ struct GoodsSelectHwPage{
if (this.model) {
} else {
Flex({ justifyContent: FlexAlign.Center , alignItems: ItemAlign.Center
}) {
Flex({ justifyContent: FlexAlign.Center , alignItems: ItemAlign.Center}) {
Text('请扫描货位码').fontColor('#fff').fontSize(20)
}
.width('100%')
...
...
@@ -72,14 +110,10 @@ struct GoodsSelectHwPage{
.fontColor('#0fa983')
.backgroundColor('#fff')
.onClick(() => {
promptAction.showToast({
message: "保存"
})
this.onSubmit()
})
}
.height(70)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
...
...
entry/src/main/ets/pages/metailmange/UHFScanPage.ets
View file @
6d27777a
...
...
@@ -2,8 +2,10 @@ import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
import {analysisQrCode} from '../../identify/analysis/analysis_QR_code'
import dsRfidModel from '../../model/DsRfidModel';
import
Prompt from '@system.prompt
';
import
promptAction from '@ohos.promptAction
';
import ProductEpc from '../../identify/analysis/label/ProductEpc';
import bzhxModal from '../../model/BzhxModel'
import { uuid } from '@ohos/common/src/main/ets/utils/util'
import {
DsRfid,Logger
} from '@ohos/common';
...
...
@@ -29,7 +31,27 @@ struct UHFScanPage{
@State rfidList:DsRfid[]=[]
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@State checkedList: Array<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) {
Column() {
Text(name)
...
...
@@ -48,15 +70,20 @@ struct UHFScanPage{
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.selectedColor('#007DFF')
.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)
}).margin({ right: 10,left: 10 })
Column(){
Text(
"07常服"
).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.pmmc
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
Text(
item.hxmc
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%").padding({top:10})
}.width("50%")
Text(
"8"
).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(
"暂无"
).fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Center).width("20%")
Text(
item.xh
).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(
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})
}.margin({left:10,right:10})
}
...
...
@@ -69,10 +96,11 @@ struct UHFScanPage{
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})
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text("0").fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.pmTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.hxTotal)).fontColor('#0fa983').textAlign(TextAlign.Center).width("25%")
Text(String(this.xhTotal)).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})
}.height(80).margin({left:10,right:10})
}
...
...
@@ -105,6 +133,7 @@ struct UHFScanPage{
}
.onChange((index: number) => {
this.currentIndex = index
this.getUPorDown()
}).width("60%")
Column(){
Text("RFID扫描:").fontColor($r("app.color.item_color_black")).textAlign(TextAlign.Start).width("100%")
...
...
@@ -116,12 +145,12 @@ struct UHFScanPage{
.onChange((isOn: boolean) => {
if(isOn){
IdentifyService.openRFIDInv()
this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
//
this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
}else {
IdentifyService.stopRfidInv()
}
Logger.info('RFID开启状态:' + isOn)
})
})
.enabled(this.currentIndex == 0 ? true : false)
Text("开启").margin({left:5,right:5})
}.width("100%")
}.width("40%").margin({left:20,right:20})
...
...
@@ -137,7 +166,15 @@ struct UHFScanPage{
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center}) {
Button("选择货位").CommonButtonStyle().width("45%")
.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%")
}
...
...
@@ -156,8 +193,7 @@ struct UHFScanPage{
let result = eventData.data.epc
console.log("射频扫码","收到EPC:" + result)
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{
// this.handleanalysisQrCode("050400000000000016033C62BF2A111F0000A10040E220419000");
const [filterData] = this.hjRfidList.filter(fItem => fItem.epc == epc)
if (!filterData) {
this.handleanalysisQrCode(
"050400000000000016033C62BF2A111F0000A10040E220419000"
);
this.handleanalysisQrCode(
epc
);
}
}catch (err){
Logger.info("解析失败1"+epc+JSON.stringify(err))
...
...
@@ -184,34 +220,27 @@ struct UHFScanPage{
pro.getInfoFormEpc();
console.log("proEpc"+pro.strEpc)
console.log("LSM"+pro.getiWzLsm())
try {
const res = await analysisQrCode(pro.getiWzLsm().toString(), true)
}catch (err){
Logger.info("解析失败"+epcstr+JSON.stringify(err))
console.error("Stack Trace:", err.stack);
}
const res = await analysisQrCode(pro.getiWzLsm().toString(), true)
const res = await bzhxModal.queryLsm(pro.getiWzLsm().toString())
console.log('RFDID解析返回数据', res)
if (res
.data && res.data
.length == 0) {
if (res
&& res
.length == 0) {
console.log('RFDID解析返回数据', res)
return
}
if (res.data && res.data.length > 0) {
Logger
res.data.forEach((item) => {
if (res && res.length > 0) {
res.forEach((item) => {
let params: DsRfid = {
guid:
""
,
guid:
uuid()
,
wzcrkguid: "1",
pmdmcode:
""
,
pmmc:
""
,
pmdm:
""
,
hxmc:
""
,
pmdmcode:
item.pmdmTen
,
pmmc:
item.wzpm
,
pmdm:
item.wzpm
,
hxmc:
item.hxmc
,
xh: pro.getiXangNo().toString(),
sl: pro.get
StrNum
(),
hwh: "",
sl: pro.get
iNum().toString
(),
hwh: "
暂无
",
epc: epcstr,
subepc: epcstr,
...item
subepc: epcstr
}
console.log('params', params)
dsRfidModel.set(params)
...
...
@@ -224,16 +253,42 @@ struct UHFScanPage{
hxmc: params.hxmc,
xh: params.xh,
sl: params.sl,
hwh: "",
hwh: "
暂无
",
epc: params.epc,
subepc: params.subepc,
}
this.hjRfidList.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() {
console.error("========onPageShow=========")
this.rfidInvListen()
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/WzinDetail.ets
View file @
6d27777a
...
...
@@ -24,7 +24,7 @@ interface params {
/*入库详情*/
@Entry
@Component
struct
PzInOutDetailPage
{
struct
WzinDetail
{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
...
...
entry/src/main/ets/pages/order_detail/PzInOutDetailPage.ets
View file @
6d27777a
import { TitleBar } from '../../view/title/TitleBar'
import { BasicTable } from '../../view/BasicTable/BasicTable'
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() {
.borderWidth(2)
.borderColor('#0fa983')
...
...
@@ -15,60 +10,29 @@ import { renderPzlx, renderSzlx, renderZmlx } from '../metailmange/WzInPage/Wzin
.type(ButtonType.Normal)
.stateEffect(true)
}
interface params {
wzcrk: Wzcrk
}
/*入库.出库*/
@Entry
@Component
struct PzInOutDetailPage
{
struct PzInOutDetailPage{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State wzcrk: Wzcrk = null // 物资出入库单据信息
private controller: TabsController = new TabsController()
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))
}
private searchcontroller: SearchController = new SearchController()
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.lineHeight(36)
}
.width('100%')
} .width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.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() {
Flex({ direction: FlexDirection.Column
}) {
Flex({ direction: FlexDirection.Column}) {
Row() {
Divider()
.vertical(true)
...
...
@@ -90,7 +54,7 @@ struct PzInOutDetailPage {
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "发物单"
, text: renderPzlx(this.wzcrk.pzlx)
})
TextInput({ placeholder: "发物单" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
...
...
@@ -107,14 +71,13 @@ struct PzInOutDetailPage {
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入凭证号"
, text: this.wzcrk.pzh + ''
})
TextInput({ placeholder: "请输入凭证号" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
...
@@ -131,14 +94,13 @@ struct PzInOutDetailPage {
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("收支类型:")
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "调入"
, text: renderSzlx(this.wzcrk.pzszlx)
})
TextInput({ placeholder: "调入" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
...
...
@@ -148,36 +110,32 @@ struct PzInOutDetailPage {
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("运单号:")
.fontSize(14)
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入运单号"
, text: this.wzcrk.ydh
})
TextInput({ placeholder: "请输入运单号" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.backgroundColor($r("app.color.disabledColor"))
.width("70%")
.height(40)
.padding(10)
.enabled(false)
}.padding("10vp").width("100%")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text("发物管理单位:")
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "浙江钧普科技股份有限公司"
, text: this.wzcrk.fwgldwdm
})
TextInput({ placeholder: "浙江钧普科技股份有限公司" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
...
@@ -186,14 +144,13 @@ struct PzInOutDetailPage {
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "浙江钧普科技股份有限公司"
, text: this.wzcrk.swgldwdm
})
TextInput({ placeholder: "浙江钧普科技股份有限公司" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.enabled(false)
}.padding("10vp")
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
...
...
@@ -202,7 +159,7 @@ struct PzInOutDetailPage {
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ placeholder: "请输入账目类型"
, text: renderZmlx(this.wzcrk.zmlx)
})
TextInput({ placeholder: "请输入账目类型" })
.enterKeyType(EnterKeyType.Search)
.borderRadius(5)
.width("70%")
...
...
@@ -210,7 +167,6 @@ struct PzInOutDetailPage {
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
}.padding("10vp").width("100%")
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Text("备注:")
.fontSize(14)
...
...
@@ -231,11 +187,10 @@ struct PzInOutDetailPage {
.borderRadius(15)
.backgroundColor("#fff")
}
@Builder WzInfoRow() {
Flex({ direction: FlexDirection.Column }) {
Column() {
Flex({
justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center })
{
Flex({
justifyContent:FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center})
{
Row() {
Divider()
.vertical(true)
...
...
@@ -250,22 +205,19 @@ struct PzInOutDetailPage {
.fontColor($r("app.color.item_color_black"))
}
.width("35%")
Text("浙江钧普科技股份有有限公司1号库房")
.fontWeight(FontWeight.Medium)
.fontSize(21)
.fontColor($r("app.color.title_background"))
.width("60%")
.textAlign(TextAlign.Start)
.padding({ bottom: 20, top: 20 })
.textAlign(TextAlign.Start).padding({bottom:20,top:20})
}.width("100%")
}.padding({
bottom: 20, top: 20
})
}.padding({
bottom:20,top:20
})
.borderRadius(5)
.width("100%")
.backgroundColor("#fff")
Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Flex({ direction: FlexDirection.Column}) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){
Row() {
Divider()
.vertical(true)
...
...
@@ -279,11 +231,10 @@ struct PzInOutDetailPage {
.fontSize(14)
.fontColor($r("app.color.item_color_black"))
}
}.padding({
left: 2, right: 10
})
}.padding({
left:2,right:10
})
.width("100%")
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Row(){
Flex({justifyContent:FlexAlign.SpaceBetween, alignItems: ItemAlign.Center}){
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
...
...
@@ -295,62 +246,53 @@ struct PzInOutDetailPage {
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
.margin({ left: 10 })
}).margin({left:10})
.borderRadius(5)
Button("查看状态").CommonButtonStyle().width("25%").margin({
left: 5, right: 5 }).onClick(() =>
{
router.pushUrl({
url: 'pages/metailmange/WzStatus'
})
Button("查看状态").CommonButtonStyle().width("25%").margin({
left:5,right:5}).onClick(()=>
{
router.pushUrl({
url:'pages/metailmange/WzStatus'
})
})
}.width("100%")
}.padding({ top: 10, bottom: 10 }).width("100%")
Column() {
BasicTable({ dataSource: [] })
}.padding({top:10,bottom:10}).width("100%")
Column(){
BasicTable({dataSource:[]})
}.flexGrow(1)
}
.padding({ bottom: 20, top: 20 })
.borderRadius(15)
.margin({ top: 20 })
}.padding({bottom:20,top:20}).borderRadius(15)
.margin({top:20})
.width("100%")
.backgroundColor("#fff")
}
.width("100%")
.height("100%")
}
build() {
build(){
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情"
})
TitleBar({ title: "凭证详情"})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column()
{
Column(){
this.VoucherRow()
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column() {
if (this.wzcrk) {
this.WzInfoRow()
}
Column(){
this.WzInfoRow()
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.margin({
left: 15, right: 15, top: 15
})
.margin({
left:15,right:15,top:15
})
.onChange((index: number) => {
this.currentIndex = index
})
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("射频扫码").CommonButtonStyle().width("50%").onClick(()
=>
{
router.pushUrl({
url: 'pages/metailmange/UHFScanPage'
})
Button("射频扫码").CommonButtonStyle().width("50%").onClick(()
=>
{
router.pushUrl({
url:'pages/metailmange/UHFScanPage'
})
})
Button("保存").CommonButtonStyle().width("50%")
}
}.margin({
left: 10, right: 10
}).height(80)
}.margin({
left:10,right:10
}).height(80)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论