diff --git a/manifest.json b/manifest.json
index f75769d..cad895e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "危废数据终端",
"appid" : "__UNI__F18DD0A",
"description" : "",
- "versionName" : "1.1.0",
- "versionCode" : 110,
+ "versionName" : "1.1.1",
+ "versionCode" : 111,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
diff --git a/pages/ledger/detail.vue b/pages/ledger/detail.vue
index 21fa539..a95fc94 100644
--- a/pages/ledger/detail.vue
+++ b/pages/ledger/detail.vue
@@ -29,12 +29,15 @@
{{ item.fwmc }}
- {{ item.fwdm }}
+
{{ item.csl || item.rkl}}{{ item.jldw }}
{{ item.cssj }}
+
+ {{ item.szsbm }}
+
@@ -47,6 +50,22 @@
+
+
+
+
+
@@ -77,7 +96,9 @@ export default {
/*手机高度*/
phoneHeight: 0,
/* 选择模式 */
- isSelectMode: false,
+ isSelectMode: true,
+ /* 弹窗选中的台账条目 */
+ selectedItem: null,
}
},
onLoad(options) {
@@ -163,19 +184,45 @@ export default {
this.currentPage += 1
this.loadData(true)
},
- /** 选择模式下点击数据条目,将数据回传给上一页 */
+ /** 点击列表项:选择模式下回传数据,普通模式弹出操作选择 */
handleSelectItem(item) {
- if (!this.isSelectMode) return
- const pages = getCurrentPages()
- const prevPage = pages[pages.length - 2]
- if (prevPage) {
- // 将选中项存入上一页,由上一页根据需要提取字段
- prevPage.$vm.selectedItem = item
- prevPage.$vm.isSelected = true
- }
- uni.navigateBack()
+ // 选择模式:将数据回传给上一页
+ // if (this.isSelectMode) {
+ // const pages = getCurrentPages()
+ // const prevPage = pages[pages.length - 2]
+ // if (prevPage) {
+ // // 将选中项存入上一页,由上一页根据需要提取字段
+ // prevPage.$vm.selectedItem = item
+ // prevPage.$vm.isSelected = true
+ // }
+ // uni.navigateBack()
+ // return
+ // }
+ // 普通模式:弹出撤销/补打选择弹窗
+ this.selectedItem = item
+ this.$refs.actionPopup.open()
},
- handleScan() { uni.showToast({ title: '扫码查询', icon: 'none' }) }
+ /** 撤销:跳转数据撤销页并携带数字识别码 */
+ handleUndo() {
+ const code = this.selectedItem ? this.selectedItem.szsbm : ''
+ this.$refs.actionPopup.close()
+ if (!code) {
+ uni.showToast({ title: '该条数据无数字识别码,无法撤销', icon: 'none' })
+ return
+ }
+ uni.navigateTo({ url: `/pages/waste/undo?code=${encodeURIComponent(code)}` })
+ },
+ /** 补打:跳转标签补打页并携带数字识别码 */
+ handleReprint() {
+ const code = this.selectedItem ? this.selectedItem.szsbm : ''
+ this.$refs.actionPopup.close()
+ if (!code) {
+ uni.showToast({ title: '该条数据无数字识别码,无法补打', icon: 'none' })
+ return
+ }
+ uni.navigateTo({ url: `/pages/waste/reprint?code=${encodeURIComponent(code)}` })
+ },
+ // handleScan() { uni.showToast({ title: '扫码查询', icon: 'none' }) }
}
}
@@ -212,6 +259,9 @@ export default {
.data-card-text{
justify-content: space-between;
display: flex;
+ .light{
+ opacity: 0.7;
+ }
}
/* 选择模式右侧箭头 */
@@ -226,4 +276,56 @@ export default {
text-align: center;
padding: $spacing-md 0;
}
+
+/* 撤销/补打操作弹窗 */
+.action-popup {
+ width: 100%;
+ background: #ffffff;
+ border-radius: $border-radius-lg;
+ padding: $spacing-lg $spacing-md $spacing-md;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .action-popup-title {
+ font-size: $font-size-lg;
+ font-weight: 600;
+ color: $text-primary;
+ }
+
+ .action-popup-info {
+ width: 100%;
+ margin-top: $spacing-md;
+ padding: $spacing-base;
+ // background: $bg-primary;
+ // border-radius: $border-radius-sm;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .action-popup-name {
+ font-size: $font-size-md;
+ color: $text-primary;
+ font-weight: 500;
+ }
+
+ .action-popup-code {
+ margin-top: $spacing-xs;
+ font-size: $font-size-sm;
+ color: $text-secondary;
+ }
+ }
+
+ .action-popup-btns {
+ width: 100%;
+ display: flex;
+ gap: $spacing-base;
+ margin-top: $spacing-lg;
+
+ .action-btn {
+ flex: 1;
+ height: 40px;
+ }
+ }
+}
diff --git a/pages/settings/device.vue b/pages/settings/device.vue
index 8e2a08d..b15dd8c 100644
--- a/pages/settings/device.vue
+++ b/pages/settings/device.vue
@@ -42,7 +42,7 @@
说明
- {{ scanMode === 'uniapp' ? '使用默认摄像头扫码' : scanMode === 'idata' ? '仅支持 iData 设备内置扫码' : '通用 Android PDA 设备' }}
+ {{ scanModeDesc }}
@@ -130,10 +130,22 @@ export default {
scanModeText() {
const map = {
uniapp: '安卓设备',
- idata: 'IDATA PDA设备',
- android: '带扫码PDA设备'
+ idata: 'IDATA设备',
+ android: '通用扫码设备',
+ pda: 'PDA设备'
}
return map[this.scanMode] || '安卓设备'
+ },
+
+ // 扫码模式说明
+ scanModeDesc() {
+ const map = {
+ uniapp: '使用默认摄像头扫码',
+ idata: '仅支持 iData 设备内置扫码',
+ android: '通用 Android PDA 设备',
+ pda: '带物理扫码键 PDA 设备(hbyapi 广播协议)'
+ }
+ return map[this.scanMode] || '使用默认摄像头扫码'
}
},
onLoad() {
@@ -174,8 +186,9 @@ export default {
// 使用对象数组,key:value 形式定义选项
const modeOptions = [
{ key: 'uniapp', label: '安卓设备' },
- { key: 'idata', label: 'IDATA PDA设备' },
- { key: 'android', label: '带扫码PDA设备' }
+ { key: 'idata', label: 'IDATA设备' },
+ { key: 'android', label: '通用扫码设备' },
+ { key: 'pda', label: 'PDA设备' }
]
const res = await uni.showActionSheet({
diff --git a/pages/settings/devices/printTest.vue b/pages/settings/devices/printTest.vue
index e56b79a..3bb9d52 100644
--- a/pages/settings/devices/printTest.vue
+++ b/pages/settings/devices/printTest.vue
@@ -294,9 +294,10 @@ export default {
*/
selectCommandType(type) {
this.commandType = type
- printerService.setCommandType(type)
- // 切换指令类型时同步更新纸张尺寸
- printerService.setPaperSize(this.paperWidth, this.paperHeight)
+ // 测试页临时切换指令类型,不覆盖正式配置
+ printerService.setCommandTypeTemporary(type)
+ // 切换指令类型时同步更新纸张尺寸(临时生效)
+ printerService.setPaperSizeTemporary(this.paperWidth, this.paperHeight)
},
/**
* 选择打印纸尺寸
@@ -304,7 +305,8 @@ export default {
selectPaperSize(width, height) {
this.paperWidth = width
this.paperHeight = height
- printerService.setPaperSize(width, height)
+ // 测试页临时切换纸张尺寸,不覆盖正式配置
+ printerService.setPaperSizeTemporary(width, height)
},
/**
* 快捷模板
@@ -325,29 +327,29 @@ export default {
riqi: new Date().toISOString().split('T')[0],
zhongliang: '10kg',
beizhu: '测试备注',
- biaoshi: '',
+ biaoshi: [1, 2, 3, 4],
qrcode: 'https://www.cswm.org.cn/qr/?code=7G6MOYELnFHZfF1Y0F8e6gjxR2K2pALNJJNhJSuOg17LV6IZfuDWUnF2qC3Rsdejs&type=WFBQ'
}
- // 确保 service 使用当前的 commandType 和 paperSize
- printerService.setCommandType(this.commandType)
- printerService.setPaperSize(this.paperWidth, this.paperHeight)
+ // 确保 service 使用当前的 commandType 和 paperSize(临时生效,不覆盖配置)
+ printerService.setCommandTypeTemporary(this.commandType)
+ printerService.setPaperSizeTemporary(this.paperWidth, this.paperHeight)
this.printContent = printerService.generateWasteLabel(testData)
return
- }
+ }
- if (type === 'qrcode') {
- printerService.setCommandType(this.commandType)
- printerService.setPaperSize(this.paperWidth, this.paperHeight)
+ if (type === 'qrcode') {
+ printerService.setCommandTypeTemporary(this.commandType)
+ printerService.setPaperSizeTemporary(this.paperWidth, this.paperHeight)
this.printContent = printerService.generateQRCodeTemplate('https://www.example.com')
return
- }
+ }
- if (type === 'barcode') {
- printerService.setCommandType(this.commandType)
- printerService.setPaperSize(this.paperWidth, this.paperHeight)
+ if (type === 'barcode') {
+ printerService.setCommandTypeTemporary(this.commandType)
+ printerService.setPaperSizeTemporary(this.paperWidth, this.paperHeight)
this.printContent = printerService.generateBarcodeTemplate('1234567890')
return
- }
+ }
},
/**
* 清空打印内容
@@ -367,9 +369,9 @@ export default {
this.isPrinting = true
try {
- // 确保打印前同步配置
- printerService.setCommandType(this.commandType)
- printerService.setPaperSize(this.paperWidth, this.paperHeight)
+ // 确保打印前同步配置(测试页临时生效,不覆盖正式配置)
+ printerService.setCommandTypeTemporary(this.commandType)
+ printerService.setPaperSizeTemporary(this.paperWidth, this.paperHeight)
await printerService.printText(this.printContent)
uni.showToast({ title: '打印成功', icon: 'success' })
} catch (err) {
diff --git a/pages/waste/manifest.vue b/pages/waste/manifest.vue
index 16cd3c8..c36081c 100644
--- a/pages/waste/manifest.vue
+++ b/pages/waste/manifest.vue
@@ -35,20 +35,37 @@
- 处置公司:{{ selectedTypeCorp.jydwmc || '-' }}
- 废物名称:{{ selectedTypeCorp.fwmc || '-' }}
- 废物代码:{{ selectedTypeCorp.fwdm || '-' }}
+
+ 处置公司:
+ {{ selectedTypeCorp.jydwmc || '-' }}
+
+ 废物名称:
+ {{ selectedTypeCorp.fwmc || '-' }}
+
+ 废物代码:
+ {{ selectedTypeCorp.fwdm || '-' }}
-
+
-
-
- {{ line }}
+
+
+ 总条数: {{ typeCorpInfoData.total_items }} 总重量: {{ typeCorpInfoData.total_weight }}千克
+
+
+
+ {{ group.waste_name }}
+ {{ group.waste_count }}件
+
+
+ {{ group.total_weight }} {{ group.rows[0].unit }}
+
+
+
@@ -87,16 +104,19 @@
转运数量:
- {{ item.zysl }}{{ item.jldw || '' }}
+ {{ item.zysl }}{{ item.jldw || '' }}
- 接收数量:{{ item.jssl }}{{ item.jldw || '' }}
+ 接收数量:
+ {{ item.jssl }}{{ item.jldw || '' }}
- 危废运出时间:{{ item.wfycsj || '-' }}
+ 危废运出时间:
+ {{ item.wfycsj || '-' }}
- 办结时间:{{ item.bjsj || '-' }}
+ 办结时间:
+ {{ item.bjsj || '-' }}
@@ -105,6 +125,7 @@