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
412119d3
Commit
412119d3
authored
Jan 22, 2024
by
huangqy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出
parent
cb6c4d13
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
154 行增加
和
8 行删除
+154
-8
Wzcrkmx.ts
common/src/main/ets/entity/Wzcrkmx.ts
+6
-1
WzInPage.ets
entry/src/main/ets/pages/metailmange/WzInPage/WzInPage.ets
+63
-1
Wzin.data.ets
entry/src/main/ets/pages/metailmange/WzInPage/Wzin.data.ets
+0
-6
ExportOrderDialog.ets
entry/src/main/ets/view/ExportOrderDialog/ExportOrderDialog.ets
+85
-0
没有找到文件。
common/src/main/ets/entity/Wzcrkmx.ts
View file @
412119d3
...
...
@@ -25,7 +25,11 @@ export interface Wzcrkmx {
*/
hwh
:
string
,
/**
*
*
凭证明细的guid
*/
pzmxguid
:
string
/**
* 临时码
*/
wzdm
:
string
}
\ No newline at end of file
entry/src/main/ets/pages/metailmange/WzInPage/WzInPage.ets
View file @
412119d3
...
...
@@ -6,6 +6,7 @@ import { Logger } from '@ohos/common/src/main/ets/utils/Logger';
import { WzinClass } from './Wzin.data'
import promptAction from '@ohos.promptAction';
import { SetStatusDialog } from '../../../view/SetStatusDialog/SetStatusDialog';
import { ExportOrderDialog } from '../../../view/ExportOrderDialog/ExportOrderDialog';
@Extend(Button) function bottomBtnSty() {
.borderWidth(1)
...
...
@@ -98,6 +99,12 @@ export struct WzInPage {
}
}
@Builder exportContainer() {
Column() {
Text('请选择导出单据模式')
}.height(40)
}
dialogController: CustomDialogController = new CustomDialogController({
builder: SetStatusDialog({
cancel: this.onCancel,
...
...
@@ -120,7 +127,6 @@ export struct WzInPage {
this.checkedList.forEach(async (element) => {
let num = await wzcrkModel.updateWzcrkWczt(element, this.radioChecked ? '已完成' : '未完成')
if (num) {// 如果更新成功就减少
Logger.info("删除的数据是:" + JSON.stringify(this.dataSource))
this.dataSource.splice(this.dataSource.findIndex(i => i.guid == element), 1)
}
})
...
...
@@ -131,6 +137,49 @@ export struct WzInPage {
}
}
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() {
// let newObj = {
// cbdwdm: filterData.ckdwguid,
// ckkfdm: filterData.KFDM,
// ...filterData,
// scjid: getClientId(),
// cjmc: '普华',
// bbh: this.sysConfig.bbh,
// imei: getDevice().imei,
// model: getDevice().model,
// vendor: getDevice().vendor,
// dcsj: date,
// pzmx: ItemData
// }
this.checkedList.forEach(element => {
this.dataSource.find(i => i.guid == element)
})
Logger.info('--------覆盖合并-------:' + JSON.stringify(this.dataSource), JSON.stringify(this.checkedList))
promptAction.showToast({
message: '导出'
})
}
@Builder TabBuilder(index: number, name: string) {
Column() {
Text(name)
...
...
@@ -188,6 +237,19 @@ export struct WzInPage {
.visibility(this.currentIndex === 0 ? Visibility.Visible : Visibility.None)
.bottomBtnSty()
.onClick(() => {
if (this.checkedList.length == 0) {
promptAction.showToast({
message: '请至少选择一条单据'
})
} else if (this.dataSource.filter(i => i.wczt == '未完成').length > 0) {
promptAction.showToast({
message: '请选择已完成的单据'
})
} else {
if (this.exportDialogController != undefined) {
this.exportDialogController.open()
}
}
}).fontColor("#0fa983").fontSize("14vp")
Button("全选")
.bottomBtnSty().fontColor("#0fa983") .fontSize("14vp")
...
...
entry/src/main/ets/pages/metailmange/WzInPage/Wzin.data.ets
View file @
412119d3
...
...
@@ -98,10 +98,6 @@ export class WzinClass {
* 备注
*/
dec: string
/**
* 有无被选中
*/
checked: boolean
constructor(data: {
gznd: string;
...
...
@@ -129,7 +125,6 @@ export class WzinClass {
pzh?: number;
pzsl?: number;
crksl?: number;
checked?: boolean;
}) {
this.guid = data.guid;
this.gznd = data.gznd;
...
...
@@ -156,7 +151,6 @@ export class WzinClass {
this.zmlx = data.zmlx;
this.bdguid = data.bdguid;
this.dec = data.dec;
this.checked = data.checked
}
}
...
...
entry/src/main/ets/view/ExportOrderDialog/ExportOrderDialog.ets
0 → 100644
View file @
412119d3
import { UniListItem } from '@ohos/system/src/main/ets/model/UniInitList';
import { WzinClass } from '../../pages/metailmange/WzInPage/Wzin.data';
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
.borderColor('#0fa983')
.backgroundColor('#fff')
.fontColor('#0fa983')
.borderRadius(10)
.type(ButtonType.Normal)
.stateEffect(true)
}
// 需要提交的表单
interface FormData {
httpURL: string,
httpPORT: string,
scoketURL: string,
scoketPORT: string,
themeName: string,
themeColor: string,
reconnection_mode: boolean,
push_mode: boolean,
transmission_mode: string,
continue_scan_mode: boolean,
scan_read_mode: string,
scanning_mode: string,
broadcastKey: string,
power: string
}
@CustomDialog
@Component
export struct ExportOrderDialog {
@Link dataSource: WzinClass[]
@Link checkedList: Array<string>
controller: CustomDialogController
cancel: () => void
confirm: () => void
@BuilderParam container: () => void
build() {
Column() {
Flex({ alignItems: ItemAlign.Start }) {
Row() {
Divider()
.vertical(true)
.height(14)
.strokeWidth(3)
.color('#19ac88')
.opacity(0.6)
.margin({ left: 8, right: 8 })
Text('提示').fontSize(20)
}
.padding({ top: 10, bottom: 10 })
}
this.container()
Flex({ justifyContent: FlexAlign.SpaceAround }) {
Button('覆盖')
.onClick(() => {
this.controller.close()
this.confirm()
}).CommonButtonStyle()
Button('合并')
.onClick(() => {
this.controller.close()
this.confirm()
}).CommonButtonStyle()
Button('取消')
.onClick(() => {
this.controller.close()
this.cancel()
}).CommonButtonStyle()
}.margin({ top: 10, bottom: 10 })
}
.width('100%')
.borderRadius(5)
.backgroundColor('#fff')
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论