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
dfeccf20
Commit
dfeccf20
authored
Jan 29, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
4f664e8c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
294 行增加
和
181 行删除
+294
-181
WzDetail.ets
entry/src/main/ets/pages/metailmange/Common/WzDetail.ets
+9
-10
WzinsertDetail.ets
entry/src/main/ets/pages/metailmange/Common/WzinsertDetail.ets
+8
-9
WzConversionPage.ets
entry/src/main/ets/pages/metailmange/WzConversionPage/WzConversionPage.ets
+125
-53
WzExchangePage.ets
entry/src/main/ets/pages/metailmange/WzExchangePage/WzExchangePage.ets
+0
-0
AddWzin.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
+73
-46
PzInfo.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo.ets
+16
-15
WzInvPage.ets
entry/src/main/ets/pages/metailmange/WzInvPage/WzInvPage.ets
+0
-0
WzOutPage.ets
entry/src/main/ets/pages/metailmange/WzOutPage/WzOutPage.ets
+0
-0
WzReversePage.ets
entry/src/main/ets/pages/metailmange/WzReversePage/WzReversePage.ets
+63
-48
没有找到文件。
entry/src/main/ets/pages/metailmange/Common/WzDetail.ets
View file @
dfeccf20
...
...
@@ -36,7 +36,6 @@ struct WzinDetail {
@State fontColor: string = '#0FA983'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
@State dataType: boolean = false
@State isHaveButton: boolean = false // 完成状态, 未完成是true, 其他false
@State pageType: string = '入库'
...
...
@@ -82,7 +81,7 @@ struct WzinDetail {
break;
case '5':
this.pageType = '倒库'
// this.currentModel = true
// this.currentModel = true
break;
case 'HW44':
this.pageType = '换位'
...
...
@@ -134,7 +133,7 @@ struct WzinDetail {
if (testDkSql && testDkSql.length > 0) {
const testDkSqlData = testDkSql.map(item => item.crksl)
var statistics = 0
statistics = testDkSqlData.reduce(function(prev, cur, index, array) {
statistics = testDkSqlData.reduce(function
(prev, cur, index, array) {
return Number(prev) + Number(cur);
})
console.log('倒库验证', statistics)
...
...
@@ -194,9 +193,6 @@ struct WzinDetail {
}
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
...
...
@@ -248,11 +244,14 @@ struct WzinDetail {
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
Button("射频扫码").CommonButtonStyle().width("50%").onClick(() => {
router.pushUrl({ url: 'pages/metailmange/UHFScanPage', params: { wzcrkItem: this.wzcrk } })
})
Button("保存").CommonButtonStyle().width("50%")
if (['入库', '出库'].includes(this.pageType)) {
Button("射频扫码").CommonButtonStyle().width("50%").onClick(() => {
router.pushUrl({ url: 'pages/metailmange/UHFScanPage', params: { wzcrkItem: this.wzcrk } })
})
}
Button("保存").CommonButtonStyle().width(['入库', '出库'].includes(this.pageType) ? '50%' : '90%')
.onClick(async () => {
try {
Logger.info('保存的入库明细数据>>', JSON.stringify(this.historicalInformation))
...
...
entry/src/main/ets/pages/metailmange/Common/WzinsertDetail.ets
View file @
dfeccf20
...
...
@@ -93,9 +93,9 @@ struct WzinsertDetail {
newType = 'wzhw'
this.wzcrk.pzlx = 'HW44'
this.hanleGetDefaultPzh(this.wzcrk.pzlx)
// uni.setNavigationBarTitle({
// title: '物资换位', // 设置页签名称
// });
// uni.setNavigationBarTitle({
// title: '物资换位', // 设置页签名称
// });
break;
default:
this.pageType = '入库'
...
...
@@ -313,8 +313,8 @@ struct WzinsertDetail {
if (testRk && testRk.length > 0) {
testRk.forEach(async (tItem) => {
await wzcrkModel.updateRkWz({
...data[count],
hwguid: tItem.guid
...data[count],
hwguid: tItem.guid
})
// await createOrFindSQL("GY_M_PMV3",
// updateRkWzSql({
...
...
@@ -355,8 +355,8 @@ struct WzinsertDetail {
const zsParams = {
wzcrkguid: this.uuId
}
wzcrkModel.selectZs(zsParams).then(async
(hjData) => {
// selectInformationType("GY_M_PMV3", selectZs(zsParams)).then((hjData) => {
wzcrkModel.selectZs(zsParams).then(async (hjData) => {
// selectInformationType("GY_M_PMV3", selectZs(zsParams)).then((hjData) => {
if (hjData && hjData.length > 0) {
const {
crksl,
...
...
@@ -379,7 +379,6 @@ struct WzinsertDetail {
}, 1500)
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
...
...
@@ -401,7 +400,7 @@ struct WzinsertDetail {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
Column() {
AddWzin({ wzcrk: this.wzcrk })
AddWzin({ wzcrk: this.wzcrk
, pageType: this.pageType
})
}.width("100%")
}.tabBar(this.TabBuilder(0, '凭证信息'))
...
...
entry/src/main/ets/pages/metailmange/WzConversionPage/WzConversionPage.ets
View file @
dfeccf20
差异被折叠。
点击展开。
entry/src/main/ets/pages/metailmange/WzExchangePage/WzExchangePage.ets
View file @
dfeccf20
差异被折叠。
点击展开。
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/AddWzin.ets
View file @
dfeccf20
...
...
@@ -23,6 +23,7 @@ class Form {
enabled: boolean
required: boolean
type: 'input' | 'select'
typeList: string[]
options?: Options[]
constructor(data: {
...
...
@@ -31,12 +32,14 @@ class Form {
enabled: boolean
type: 'input' | 'select',
required: boolean,
typeList: string[],
options?: Options[]
}) {
this.title = data.title
this.key = data.key
this.enabled = data.enabled
this.type = data.type
this.typeList = data.typeList || []
this.required = data.required || false
this.options = data.options
}
...
...
@@ -47,9 +50,16 @@ class Form {
export struct AddWzin {
@ObjectLink wzcrk: WzClass
@State form: Form[] = []
pageType: string
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false, type: 'input' },
{ title: "凭证号", key: 'pzh', enabled: false, type: 'input' },
{ title: "收支类型", key: 'pzszlx', enabled: false, type: 'input' },
{
title: "收支类型",
key: 'pzszlx',
enabled: false,
type: 'input',
typeList: ['出库', '入库', '调号']
},
{
title: "库房",
key: 'kfdm',
...
...
@@ -90,7 +100,20 @@ export struct AddWzin {
options: [],
required: true
},
{ title: "运单号", key: 'ydh', enabled: true, type: 'input' },
{
title: "运单号",
key: 'ydh',
enabled: true,
type: 'input',
typeList: ['出库', '入库']
},
{
title: "调号单位",
key: 'sfdw',
enabled: false,
type: 'input',
typeList: ['调号']
},
{ title: "备注", key: 'dec', enabled: true, type: 'input' }
]
...
...
@@ -189,55 +212,59 @@ export struct AddWzin {
List() {
ForEach(this.form, (item) => {
ListItem() {
Column() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
if (item.typeList.length == 0 || item.typeList.includes[this.pageType]) {
ListItem() {
Column() {
Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Center }) {
Row() {
if (item.required) {
Text('*').fontColor('red').margin({ right: 5 })
Row() {
if (item.required) {
Text('*').fontColor('red').margin({ right: 5 })
}
Text(item.title)
.fontSize(14)
.height(40)
.fontColor($r("app.color.item_color_black"))
}.width("35%")
if (item.type == 'select') {
Select(item.options)
.value(`请选择${item.title}`)
.width(230)
.borderWidth(1)
.borderRadius(5)
.flexGrow(1)
.borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => {
this.wzcrk[item.key] = item.options[index].id
console.log('>>>>>>>>>选择了+', JSON.stringify(this.wzcrk))
})
}
Text(item.title)
.fontSize(14)
.height(40)
.fontColor($r("app.color.item_color_black"))
}.width("35%")
if (item.type == 'select') {
Select(item.options)
.value(`请选择${item.title}`)
.width(230)
.borderWidth(1)
.borderRadius(5)
.flexGrow(1)
.borderColor($r("app.color.rank_secondary_border"))
.onSelect((index: number, value?: string) => {
this.wzcrk[item.key] = item.options[index].id
console.log('>>>>>>>>>选择了+', JSON.stringify(this.wzcrk))
})
}
if (item.type == 'input') {
TextInput({ text: this.handleText(item.key) })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.height(40)
.padding(10)
.flexGrow(1)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if (item.enabled) {
this.wzcrk[item.key] = value
}
})
if (item.type == 'input') {
TextInput({ text: this.handleText(item.key) })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.height(40)
.padding(10)
.flexGrow(1)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if (item.enabled) {
this.wzcrk[item.key] = value
}
})
}
}
}
}
}.padding(15)
}.padding(15)
}
})
}.margin({ bottom: 40 })
}.backgroundColor('#fff')
...
...
entry/src/main/ets/pages/metailmange/WzInPage/WzinDetail/PzInfo.ets
View file @
dfeccf20
import gldwModel from '../../../../model/GldwModel'
import kfModel from '../../../../model/KfModel'
import { renderPzlx, renderSzlx, renderZmlx, WzClass } from '../../Common/Wzcrk.data'
@Component
// 物资信息
export struct PzInfo {
...
...
@@ -8,11 +9,11 @@ export struct PzInfo {
@State fwgldw: string = ''
@State swgldw: string = ''
@ObjectLink wzcrk: WzClass
arr = [{ title: "凭证类型", key: 'pzlx', enabled: false },
{ title: "凭证号", key: 'pzh', enabled: false },
{ title: "库房", key: 'kfguid', enabled: false },
{ title: "收支类型", key: 'pzszlx', enabled: false },
{ title: "调号单位", key: 'pzszlx', enabled: false },
{ title: "运单号", key: 'ydh', enabled: true },
{ title: "发物管理单位", key: 'fwgldwdm', enabled: false },
{ title: "收物管理单位", key: 'swgldwdm', enabled: false },
...
...
@@ -20,22 +21,21 @@ export struct PzInfo {
{ title: "备注", key: 'dec', enabled: true }
]
aboutToAppear(){
aboutToAppear()
{
this.getData()
}
async getData() {
const res = await kfModel.query({
guid: this.wzcrk.kfguid
})
const res = await kfModel.query({
guid: this.wzcrk.kfguid
})
this.kfmc = res[0].kfmc ?? ''
const res1 = await gldwModel.queryByData({
dwdm:this.wzcrk.fwgldwdm
})
const res1 = await gldwModel.queryByData({
dwdm: this.wzcrk.fwgldwdm
})
this.fwgldw = res1[0].dwfh ?? ''
const res2 = await gldwModel.queryByData({
dwdm:this.wzcrk.swgldwdm
})
const res2 = await gldwModel.queryByData({
dwdm: this.wzcrk.swgldwdm
})
this.swgldw = res2[0].dwfh ?? ''
}
handleText(key: string): string {
switch (key) {
case 'pzlx':
...
...
@@ -61,8 +61,8 @@ export struct PzInfo {
}
}
build(){
Column(){
build()
{
Column()
{
Flex({ direction: FlexDirection.Row, justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Divider()
.vertical(true)
...
...
@@ -74,17 +74,18 @@ export struct PzInfo {
Text("凭证信息")
.fontSize(16)
}.height('8%')
List(){
ForEach(this.arr,(item) => {
ListItem(){
Column(){
List() {
ForEach(this.arr, (item) => {
ListItem() {
Column() {
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),placeholder: `请输入${item.title}` })
TextInput({ text: this.handleText(item.key),
placeholder: `请输入${item.title}` })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
...
...
@@ -96,7 +97,7 @@ export struct PzInfo {
.backgroundColor(item.enabled ? '#fff' : "app.color.disabledColor")
.enabled(item.enabled)
.onChange((value: string) => {
if(item.enabled) {
if
(item.enabled) {
this.wzcrk[item.key] = value
}
})
...
...
@@ -104,7 +105,7 @@ export struct PzInfo {
}
}.padding(15)
})
}.margin({
bottom:40
})
}.margin({
bottom: 40
})
}.backgroundColor('#fff')
}
...
...
entry/src/main/ets/pages/metailmange/WzInvPage/WzInvPage.ets
View file @
dfeccf20
差异被折叠。
点击展开。
entry/src/main/ets/pages/metailmange/WzOutPage/WzOutPage.ets
View file @
dfeccf20
差异被折叠。
点击展开。
entry/src/main/ets/pages/metailmange/WzReversePage/WzReversePage.ets
View file @
dfeccf20
...
...
@@ -13,7 +13,7 @@ import { ExportOrderDialog } from '../../../view/ExportOrderDialog/ExportOrderDi
@Extend(Button) function bottomBtnSty() {
.borderWidth(1)
.padding({
top:1,bottom:1,right:7,left:7
})
.padding({
top: 1, bottom: 1, right: 7, left: 7
})
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
...
...
@@ -22,6 +22,7 @@ import { ExportOrderDialog } from '../../../view/ExportOrderDialog/ExportOrderDi
.stateEffect(true)
}
interface SearchData {
pzh?: string;
wczt?: string;
...
...
@@ -29,7 +30,7 @@ interface SearchData {
@Entry
@Component
struct WzReversePage{
struct WzReversePage
{
@State fontColor: string = '#182431'
@State selectedFontColor: string = '#fff'
@State currentIndex: number = 0
...
...
@@ -40,16 +41,41 @@ struct WzReversePage{
pzh: '',
wczt: '未完成'
}
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
@State page: number = 1
@State rows: number = 10
@State sjlx: string = "0"
@State wczt: string = ""
@State pzh: string = ""
dialogController: CustomDialogController = new CustomDialogController({
builder: SetStatusDialog({
confirm: this.onSubmit,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.container
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
customStyle: true
})
exportDialogController: CustomDialogController = new CustomDialogController({
builder: ExportOrderDialog({
cancel: this.onExportCancel,
confirm: this.onExportSubmit,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.exportContainer
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
customStyle: true
})
private controller: TabsController = new TabsController()
private searchcontroller: SearchController = new SearchController()
aboutToAppear() {
this.getWzcrkList()
}
async getWzcrkList(qzh?: number, wczt?: string) {
this.dataSource = []
const res = await wzcrkModel.query({
...
...
@@ -61,6 +87,7 @@ struct WzReversePage{
});
Logger.info('数量是' + JSON.stringify(this.dataSource))
}
@Builder container() {
Column() {
Row() {
...
...
@@ -87,56 +114,35 @@ struct WzReversePage{
Divider().strokeWidth(1).color('rgb(242,242,242)')
}
}
@Builder exportContainer() {
Column() {
Text('请选择导出单据模式')
}.height(40)
}
dialogController: CustomDialogController = new CustomDialogController({
builder: SetStatusDialog({
confirm: this.onSubmit,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.container
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
customStyle: true
})
onSubmit() {
try{
this.checkedList.forEach(async (element)
=>
{
try
{
this.checkedList.forEach(async (element)
=>
{
let num = await wzcrkModel.updateWzcrkWczt(element, (this.radioChecked == undefined || this.radioChecked ? '完成' : '未完成'))
if(num) {
if
(num) {
this.dataSource.splice(this.dataSource.findIndex(i => i.guid == element), 1)
}
})
}
catch(e)
{
}
catch (e)
{
}
finally
{
}
finally
{
this.checkedList = []
}
}
exportDialogController: CustomDialogController = new CustomDialogController({
builder: ExportOrderDialog({
cancel: this.onExportCancel,
confirm: this.onExportSubmit,
checkedList: $checkedList,
dataSource: $dataSource,
container: this.exportContainer
}),
autoCancel: true,
alignment: DialogAlignment.Bottom,
customStyle: true
})
onExportCancel() {
}
onExportSubmit() {
this.checkedList.forEach(async element => {
let res = await ViewdrdcModel.queryExport({
guid: element, wczt: '完成', pzlx: '17'
})
let res = await ViewdrdcModel.queryExport({
guid: element, wczt: '完成', pzlx: '17'
})
const jhguidArr = res.map((item) => item.guid)
if (jhguidArr && jhguidArr.length > 0) {
const date = dateUtils.formatDateTime(new Date(), 'before')
...
...
@@ -165,7 +171,7 @@ struct WzReversePage{
...filterData,
crksl: ItemData.map(i => i.sjsl).reduce((a, b) => {
return a + b
},0),
},
0),
scjid: "863576927543400,863576927543400",
cjmc: "普华",
imei: "863576927543400,863576927543400",
...
...
@@ -195,6 +201,7 @@ struct WzReversePage{
}],
})
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
...
...
@@ -209,6 +216,7 @@ struct WzReversePage{
.opacity(this.currentIndex === index ? 1 : 0)
}.width('100%')
}
@Builder renderEmpty() {
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
Column() {
...
...
@@ -217,6 +225,7 @@ struct WzReversePage{
}
}.height('70%')
}
@Builder bottomButtons() {
Row() {
Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) {
...
...
@@ -252,9 +261,11 @@ struct WzReversePage{
this.exportDialogController.open()
}
}
}).fontColor("#0fa983") .fontSize("14vp")
})
.fontColor("#0fa983")
.fontSize("14vp")
Button("全选")
.bottomBtnSty().fontColor("#0fa983")
.fontSize("14vp")
.bottomBtnSty().fontColor("#0fa983").fontSize("14vp")
.onClick(() => {
this.checkedList = this.dataSource.map((item) => item.guid)
})
...
...
@@ -262,15 +273,16 @@ struct WzReversePage{
.bottomBtnSty()
.onClick(() => {
this.checkedList = []
}).fontColor("#0fa983")
.fontSize("14vp")
}).fontColor("#0fa983").fontSize("14vp")
}
}.height(80)
}
build(){
build() {
Column() {
Flex({
direction:FlexDirection.Column})
{
TitleBar({ title:"物资倒库" })
Row(){
Flex({
direction: FlexDirection.Column })
{
TitleBar({ title:
"物资倒库" })
Row()
{
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Center }) {
Search({ placeholder: '请输入凭证号', controller: this.searchcontroller })
.height(40)
...
...
@@ -290,6 +302,7 @@ struct WzReversePage{
}
}.width("100%")
.padding('15vp')
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
TabContent() {
// Column().width('100%').height('100%').backgroundColor('#00CB87')
...
...
@@ -300,7 +313,7 @@ struct WzReversePage{
}.tabBar(this.TabBuilder(1, '完成'))
}
.height(80)
.margin({
top:-15
})
.margin({
top: -15
})
.onChange((index: number) => {
this.currentIndex = index
this.getWzcrkList()
...
...
@@ -316,9 +329,11 @@ struct WzReversePage{
ListItem() {
WzList({ item, checkedList: $checkedList }).width('100%').backgroundColor('#fff')
}.onClick(() => {
router.pushUrl({ url: 'pages/metailmange/WzReversePage/WzReverseDetailPage/WzReverseDetailPage', params: {
wzcrk: item
} },)
router.pushUrl({ url: 'pages/metailmange/Common/WzDetail', params: {
wzcrk: item,
pzlx: '5',
tab: '导入',
} })
})
})
}.padding(18)
...
...
@@ -326,8 +341,7 @@ struct WzReversePage{
}.flexGrow(1).alignSelf(ItemAlign.Center)
Row(){
Row() {
// 底部按钮
this.bottomButtons();
}.backgroundColor("#97c6a6").width("100%").height(80)
...
...
@@ -335,7 +349,7 @@ struct WzReversePage{
}.linearGradient({
direction: GradientDirection.Right, // 渐变方向
repeating: true, // 渐变颜色是否重复
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]]
// 数组末尾元素占比小于1时满足重复着色效果
colors: [[0x36a3c0, 0.0], [0x97c6a6, 1], [0xc7d799, 0.0]] // 数组末尾元素占比小于1时满足重复着色效果
})
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论