Commit a2a8d316 by 陈桂东

commit

parent ed6baa89
...@@ -32,4 +32,4 @@ export {Wzcrk} from './src/main/ets/entity/Wzcrk'; ...@@ -32,4 +32,4 @@ export {Wzcrk} from './src/main/ets/entity/Wzcrk';
export {Wzcrkmx} from './src/main/ets/entity/Wzcrkmx'; export {Wzcrkmx} from './src/main/ets/entity/Wzcrkmx';
export {DsRfid} from './src/main/ets/entity/DsRfid'; 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} from './src/main/ets/utils/dict'; export {pzlx_dict,szlx_dict,new_zmlx_dict} from './src/main/ets/utils/dict';
\ No newline at end of file \ No newline at end of file
import { WzcrkmxDao, WzcrkDao, Wzcrk, Wzcrkmx, SQLiteContext } from '@ohos/common' import { WzcrkmxDao, WzcrkDao, Wzcrk, Wzcrkmx, SQLiteContext } from '@ohos/common'
import { uuid } from '@ohos/common/src/main/ets/utils/util';
import wzcrkmxModel from './WzcrkmxModel'; import wzcrkmxModel from './WzcrkmxModel';
// 物资出库入库 // 物资出库入库
...@@ -7,8 +8,34 @@ class WzcrkModel { ...@@ -7,8 +8,34 @@ class WzcrkModel {
async set(data: Wzcrk[]) { async set(data: Wzcrk[]) {
for (let index = 0; index < data.length; index++) { for (let index = 0; index < data.length; index++) {
const uid = uuid();
const wzcrk = data[index]; const wzcrk = data[index];
const wzcrkmx = data[index].jhmx;
// 获取子单数量总和赋给主单
// @ts-ignore
const pzsl = data[index].jhmx.map(v =>Number(v.pmsl)).reduce((a,b) => a+b, 0)
const crksl = data[index].jhmx.map(v =>Number(v.crksl)).reduce((a,b) => a+b, 0)
wzcrk.guid = uid
wzcrk.pzsl = pzsl
wzcrk.crksl = crksl
const wzcrkmx = data[index].jhmx.map((v =>{
return {
...v,
guid: uuid(),
wzcrkguid: uid,
gznd: wzcrk.gznd,
// @ts-ignore
pzsl: v.pmsl,
// @ts-ignore
pzmxguid: v.jhmxguid
}
}));
await SQLiteContext.with(WzcrkDao).insert(wzcrk) await SQLiteContext.with(WzcrkDao).insert(wzcrk)
await wzcrkmxModel.set(wzcrkmx) await wzcrkmxModel.set(wzcrkmx)
} }
......
import { WzinClass,renderPzlx } from './Wzin.data' import { WzinClass,renderPzlx } from './Wzin.data'
@Component @Component
export struct WzInList { export struct WzInList {
@ObjectLink item: WzinClass @ObjectLink item: WzinClass
...@@ -32,7 +31,7 @@ export struct WzInList { ...@@ -32,7 +31,7 @@ export struct WzInList {
Text("数量: ") Text("数量: ")
Text(this.item.crksl + '').fontColor('#ff3d43') Text(this.item.crksl + '').fontColor('#ff3d43')
Text('/').fontColor('#ff3d43') Text('/').fontColor('#ff3d43')
Text(this.item.pzsl + '').fontColor('#ff4aff3d') Text(this.item.pzsl + '').fontColor('#ff3d43')
} }
else { else {
Text("数量: ") Text("数量: ")
...@@ -45,13 +44,12 @@ export struct WzInList { ...@@ -45,13 +44,12 @@ export struct WzInList {
}.width("30%").padding({ top: 8, bottom: 8 }) }.width("30%").padding({ top: 8, bottom: 8 })
Row() { Row() {
if(this.item.wczt == '1') { Text("状态:")
Text("状态: ") if(this.item.wczt != '未完成') {
Text( "完成").fontColor('#ff3d43') Text( "完成").fontColor('#ff3d43')
} }
else { else {
Text("状态:") Text("完成").fontColor('#28bf1d')
Text("未完成").fontColor('#28bf1d')
} }
} }
}.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" }) }.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" })
......
...@@ -223,7 +223,11 @@ export struct WzInPage { ...@@ -223,7 +223,11 @@ export struct WzInPage {
ForEach(this.dataSource, (item) => { ForEach(this.dataSource, (item) => {
ListItem() { ListItem() {
WzInList({ item, checkedList: $checkedList }).width('100%').backgroundColor('#fff') WzInList({ item, checkedList: $checkedList }).width('100%').backgroundColor('#fff')
} }.onClick(() => {
router.pushUrl({url:'pages/metailmange/WzInPage/WzinDetail/WzinDetail',params:{
wzcrk:item
}},)
})
}) })
}.padding(18) }.padding(18)
} }
......
import { pzlx_dict, szlx_dict,zmlx_dict } from '@ohos/common' import { pzlx_dict, szlx_dict,new_zmlx_dict } from '@ohos/common'
@Observed @Observed
export class WzinClass { export class WzinClass {
guid?: string guid?: string
...@@ -160,6 +160,61 @@ export class WzinClass { ...@@ -160,6 +160,61 @@ export class WzinClass {
} }
} }
// 物资明细
@Observed
export class WzmxClass {
guid?: string
/**
* 工作年度
*/
gznd: string
/**
* 品名代码
*/
pmdmcode: string
/**
* 凭证数量
*/
pzsl: number
/**
* 出入库数量
*/
crksl: number
/**
* 关联出入库GUID
*/
wzcrkguid: string
/**
* 货位号
*/
hwh: string
/**
*
*/
pzmxguid: string
constructor(data: {
guid?: string,
gznd: string,
pmdmcode: string,
pzsl: number,
crksl: number,
wzcrkguid: string,
hwh: string,
pzmxguid: string
}) {
this.guid = data.guid;
this.gznd = data.gznd;
this.pmdmcode = data.pmdmcode;
this.pzsl = data.pzsl;
this.crksl = data.crksl;
this.wzcrkguid = data.wzcrkguid;
this.hwh = data.hwh;
this.pzmxguid = data.pzmxguid;
}
}
// 凭证类型 // 凭证类型
export function renderPzlx(pzlx) { export function renderPzlx(pzlx) {
return pzlx_dict.find(v => v.value == pzlx).text return pzlx_dict.find(v => v.value == pzlx).text
...@@ -170,5 +225,5 @@ export function renderSzlx(szlx) { ...@@ -170,5 +225,5 @@ export function renderSzlx(szlx) {
} }
// 账目类型 // 账目类型
export function renderZmlx(zmlx) { export function renderZmlx(zmlx) {
return zmlx_dict.find(v => v.value == zmlx).text return new_zmlx_dict.find(v => v.value == zmlx).text
} }
\ No newline at end of file
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk'
import { renderPzlx, renderSzlx, renderZmlx } from '../Wzin.data'
@Component
// 物资信息
export struct PzInfo {
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false },
{ title: "凭证号", key: 'pzh', enabled: false },
{ title: "库房", key: '', enabled: true },
{ title: "收支类型", key: 'pzszlx', enabled: false },
{ title: "运单号", key: 'ydh', enabled: true },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false },
{ title: "备注", key: '', enabled: true }
]
private wzcrk: Wzcrk
handleText(key: string): string {
switch (key) {
case 'pzlx':
return renderPzlx(this.wzcrk.pzlx)
case 'pzszlx':
return renderSzlx(this.wzcrk.pzszlx)
case 'zmlx':
return renderZmlx(this.wzcrk.zmlx)
case '':
return ''
default:
return String(this.wzcrk[key])
}
}
build(){
Column(){
ForEach(this.arr,(item) => {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Text(item.title)
.fontSize(14)
.width("30%")
.height(40)
.fontColor($r("app.color.item_color_black"))
TextInput({ text: this.handleText(item.key) })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.width("70%")
.height(40)
.padding(10)
.backgroundColor($r("app.color.disabledColor"))
.enabled(item.enabled)
}.padding("10vp")
})
}.backgroundColor('#fff')
}
}
\ No newline at end of file
import router from '@ohos.router';
import { Wzcrkmx } from '@ohos/common/src/main/ets/entity/Wzcrkmx';
import { WzmxClass } from '../Wzin.data';
import { WzList } from './WzList';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#97c6a6')
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
}
@Component
// 物资信息
export struct WzInfo {
private searchcontroller: SearchController = new SearchController()
private wzmx: WzmxClass[]
build() {
Column() {
Flex({ direction: FlexDirection.Column }) {
Column() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("单位/库房信息")
.fontWeight(FontWeight.Medium)
.fontSize(14)
.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 })
}.width("100%")
}.padding({ bottom: 20, top: 20 })
.borderRadius(5)
.width("100%")
.backgroundColor("#fff")
Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text("物资列表")
.fontWeight(FontWeight.Medium)
.fontSize(14)
.fontColor($r("app.color.item_color_black"))
}
}.padding({ left: 2, right: 10 })
.width("100%")
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Search({ placeholder: '请输入品名名称', controller: this.searchcontroller })
.height(40)
.backgroundColor('#F5F5F5')
.placeholderColor(Color.Grey)
.textAlign(TextAlign.Center)
.placeholderFont({ size: 14, weight: 400 })
.textFont({ size: 14, weight: 400 })
.width('75%')
.onSubmit((value: string) => {
})
.onChange((value: string) => {
})
.margin({ left: 10 })
.borderRadius(5)
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() {
List(){
ForEach(this.wzmx,(item) => {
ListItem(){
WzList({wzmx: item})
}
})
}
}.flexGrow(1)
}
.padding({ bottom: 20, top: 20 })
.borderRadius(15)
.margin({ top: 20 })
.width("100%")
.backgroundColor("#fff")
}
.width("100%")
.height("100%")
}
}
}
\ No newline at end of file
import { WzmxClass } from '../Wzin.data'
@Component
export struct WzList {
@ObjectLink wzmx: WzmxClass
build() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Column() {
Text("冬季防寒靴100000").padding({ top: 5, bottom: 5 })
Row() {
Text("号型: ")
Text("1003")
}.alignSelf(ItemAlign.Start).padding({ top: 5, bottom: 5 })
Row() {
Text("货位号: ")
Text(this.wzmx.hwh)
}.alignSelf(ItemAlign.Start).padding({ top: 5, bottom: 5 })
}.margin({ left: 15 })
Column() {
Row() {
Text("总数: ")
Text(this.wzmx.crksl + '')
}.alignSelf(ItemAlign.End).padding({ top: 5, bottom: 5 })
Row() {
Counter() {
Text(this.wzmx.crksl + '')
}
.width(120)
.onInc(() => {
this.wzmx.crksl = this.wzmx.crksl + 1
})
.onDec(() => {
this.wzmx.crksl = this.wzmx.crksl - 1
})
}.alignSelf(ItemAlign.End)
Row() {
Image($r('app.media.trash')).width(35)
}.alignSelf(ItemAlign.End)
}.margin({ right: 20 })
}.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" })
}
}
}
\ No newline at end of file
import { TitleBar } from '../../../../view/title/TitleBar'
import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import {WzInfo} from './WzInfo'
import {PzInfo} from './PzInfo'
import wzcrkmxModel from '../../../../model/WzcrkmxModel';
import { Wzcrkmx } from '@ohos/common/src/main/ets/entity/Wzcrkmx';
import { WzmxClass } from '../Wzin.data';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#97c6a6')
.fontColor('#fff')
.borderRadius(5)
.type(ButtonType.Normal)
.stateEffect(true)
}
interface params {
wzcrk: Wzcrk
}
/*入库详情*/
@Entry
@Component
struct PzInOutDetailPage{
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State wzcrk: Wzcrk = null // 物资出入库单据信息
@State wzmx: WzmxClass[] = [] // 物资出入库明细
private controller: TabsController = new TabsController()
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)
for (let index = 0; index < res.length; index++) {
const element = res[index];
this.wzmx.push(new WzmxClass(element))
}
Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res))
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.fontSize(21)
.lineHeight(36)
} .width('100%')
.height(45)
.border({ width: 2, color: 'rgb(15, 169, 131)' })
.borderRadius(3)
.backgroundColor(this.currentIndex === index ? this.fontColor : '#00000000')
}
@Builder VoucherRow() {
}
build(){
Column() {
Flex({ direction: FlexDirection.Column }) {
TitleBar({ title: "凭证详情"})
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column(){
PzInfo({wzcrk: this.wzcrk})
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
TabContent() {
Column(){
WzInfo({wzmx: this.wzmx})
}.width("100%")
}.tabBar(this.TabBuilder(1, '物资信息'))
}
.margin({left:15,right:15,top:15})
.onChange((index: number) => {
this.currentIndex = index
})
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("射频扫码").CommonButtonStyle().width("50%").onClick(()=>{
router.pushUrl({url:'pages/metailmange/UHFScanPage'})
})
Button("保存").CommonButtonStyle().width("50%")
}
}.margin({left:10,right:10}).height(80)
}.width("100%")
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
...@@ -4,7 +4,8 @@ import router from '@ohos.router'; ...@@ -4,7 +4,8 @@ import router from '@ohos.router';
import { Logger } from '@ohos/common/src/main/ets/utils/Logger'; import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import wzcrkmxModel from '../../model/WzcrkmxModel'; import wzcrkmxModel from '../../model/WzcrkmxModel';
import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk'; import { Wzcrk } from '@ohos/common/src/main/ets/entity/Wzcrk';
import { renderPzlx, renderSzlx,renderZmlx } from '../metailmange/WzInPage/Wzin.data'; 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')
...@@ -14,21 +15,22 @@ import { renderPzlx, renderSzlx,renderZmlx } from '../metailmange/WzInPage/Wzin. ...@@ -14,21 +15,22 @@ import { renderPzlx, renderSzlx,renderZmlx } from '../metailmange/WzInPage/Wzin.
.type(ButtonType.Normal) .type(ButtonType.Normal)
.stateEffect(true) .stateEffect(true)
} }
interface params { interface params {
wzcrk: Wzcrk 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 // 物资出入库单据信息 @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(){ aboutToAppear() {
const params = router.getParams() as params const params = router.getParams() as params
this.wzcrk = params.wzcrk this.wzcrk = params.wzcrk
Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk)) Logger.info('接收到出入库信息>>', JSON.stringify(params.wzcrk))
...@@ -36,28 +38,37 @@ struct PzInOutDetailPage{ ...@@ -36,28 +38,37 @@ struct PzInOutDetailPage{
} }
// 获取凭证信息 // 获取凭证信息
async getDetail() { async getDetail() {
// const res = await wzcrkmxModel.query(this.wzcrk.guid) // const res = await wzcrkmxModel.query(this.wzcrk.guid)
// Logger.info('接收到出入库物资明细信息>>', JSON.stringify(res)) // 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)
...@@ -79,7 +90,7 @@ struct PzInOutDetailPage{ ...@@ -79,7 +90,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: "发物单", text: renderPzlx(this.wzcrk.pzlx) })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderColor("#454545") .borderColor("#454545")
.borderRadius(5) .borderRadius(5)
...@@ -96,7 +107,7 @@ struct PzInOutDetailPage{ ...@@ -96,7 +107,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:this.wzcrk.pzh + '' }) TextInput({ placeholder: "请输入凭证号", text: this.wzcrk.pzh + '' })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(5) .borderRadius(5)
.width("70%") .width("70%")
...@@ -120,13 +131,14 @@ struct PzInOutDetailPage{ ...@@ -120,13 +131,14 @@ 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: "调入", text: renderSzlx(this.wzcrk.pzszlx) })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderColor("#454545") .borderColor("#454545")
.borderRadius(5) .borderRadius(5)
...@@ -136,12 +148,13 @@ struct PzInOutDetailPage{ ...@@ -136,12 +148,13 @@ 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: "请输入运单号", text: this.wzcrk.ydh })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(5) .borderRadius(5)
.backgroundColor($r("app.color.disabledColor")) .backgroundColor($r("app.color.disabledColor"))
...@@ -150,13 +163,14 @@ struct PzInOutDetailPage{ ...@@ -150,13 +163,14 @@ struct PzInOutDetailPage{
.padding(10) .padding(10)
.enabled(false) .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: "浙江钧普科技股份有限公司", text: this.wzcrk.fwgldwdm })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(5) .borderRadius(5)
.width("70%") .width("70%")
...@@ -172,7 +186,7 @@ struct PzInOutDetailPage{ ...@@ -172,7 +186,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:this.wzcrk.swgldwdm }) TextInput({ placeholder: "浙江钧普科技股份有限公司", text: this.wzcrk.swgldwdm })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(5) .borderRadius(5)
.width("70%") .width("70%")
...@@ -188,7 +202,7 @@ struct PzInOutDetailPage{ ...@@ -188,7 +202,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: "请输入账目类型", text: renderZmlx(this.wzcrk.zmlx) })
.enterKeyType(EnterKeyType.Search) .enterKeyType(EnterKeyType.Search)
.borderRadius(5) .borderRadius(5)
.width("70%") .width("70%")
...@@ -196,6 +210,7 @@ struct PzInOutDetailPage{ ...@@ -196,6 +210,7 @@ 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)
...@@ -216,10 +231,11 @@ struct PzInOutDetailPage{ ...@@ -216,10 +231,11 @@ 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)
...@@ -234,19 +250,22 @@ struct PzInOutDetailPage{ ...@@ -234,19 +250,22 @@ 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).padding({bottom:20,top:20}) .textAlign(TextAlign.Start)
.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({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }){ Flex({ direction: FlexDirection.Column }) {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Row() { Row() {
Divider() Divider()
.vertical(true) .vertical(true)
...@@ -260,10 +279,11 @@ struct PzInOutDetailPage{ ...@@ -260,10 +279,11 @@ 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(){
Flex({justifyContent:FlexAlign.SpaceBetween, alignItems: ItemAlign.Center}){ Row() {
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')
...@@ -275,56 +295,62 @@ struct PzInOutDetailPage{ ...@@ -275,56 +295,62 @@ 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(){
BasicTable({dataSource:[]}) Column() {
BasicTable({ dataSource: [] })
}.flexGrow(1) }.flexGrow(1)
}.padding({bottom:20,top:20}).borderRadius(15) }
.margin({top:20}) .padding({ bottom: 20, 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){ 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, // 渐变方向
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"pages/metailmange/WzConversionPage", "pages/metailmange/WzConversionPage",
"pages/metailmange/WzInvPage", "pages/metailmange/WzInvPage",
"pages/metailmange/WzInPage/WzInPage", "pages/metailmange/WzInPage/WzInPage",
"pages/metailmange/WzInPage/WzinDetail/WzinDetail",
"pages/metailmange/WzPositionPage", "pages/metailmange/WzPositionPage",
"pages/metailmange/WzReversePage", "pages/metailmange/WzReversePage",
"pages/metailmange/AddConversionPage", "pages/metailmange/AddConversionPage",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论