af-mobile-client-vue3 1.5.94 → 1.5.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +121 -121
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +137 -137
- package/src/components/common/otherCharge/CodePayment.vue +357 -357
- package/src/components/common/otherCharge/FileUploader.vue +602 -602
- package/src/components/common/otherCharge/GridFileUploader.vue +846 -846
- package/src/components/common/otherCharge/PaymentMethodSelector.vue +202 -202
- package/src/components/common/otherCharge/PaymentMethodSelectorCard.vue +45 -45
- package/src/components/common/otherCharge/ReceiptModal.vue +273 -273
- package/src/components/common/otherCharge/index.ts +43 -43
- package/src/components/core/ImageUploader/index.vue +10 -0
- package/src/components/core/Signature/SignatureComponent.vue +312 -312
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +547 -547
- package/src/components/data/contract/addcontract.vue +263 -261
- package/src/components/data/contract/index.vue +43 -39
- package/src/components/data/contract/viewContract.vue +22 -22
- package/src/utils/driving/drivingUtils.ts +158 -158
- package/src/utils/environment.ts +1 -1
- package/src/utils/queryFormDefaultRangePicker.ts +57 -57
- package/src/views/SafeInspection/SecurityCertificate/index.vue +107 -0
- package/src/views/SafeInspection/SecurityFormItem/FormItem.vue +8 -0
- package/src/views/component/Driving/index.vue +127 -127
- package/src/views/component/XCellListView/index.vue +101 -101
- package/src/views/component/XFormGroupView/index.vue +10 -47
- package/src/views/component/XFormView/index.vue +30 -20
package/package.json
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "af-mobile-client-vue3",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
5
|
-
"packageManager": "pnpm@10.13.1",
|
|
6
|
-
"description": "Vue + Vite component lib",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=20.19.0"
|
|
9
|
-
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
-
"compress": "node ./compress.js",
|
|
13
|
-
"build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
|
|
14
|
-
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
-
"preview": "vite preview",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"lint:fix": "eslint . --fix",
|
|
18
|
-
"release": "bumpp --commit --push --tag",
|
|
19
|
-
"typecheck": "vue-tsc --noEmit",
|
|
20
|
-
"commitlint": "commitlint --edit",
|
|
21
|
-
"prepare": "simple-git-hooks"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@iconify/vue": "4.3.0",
|
|
25
|
-
"@matechat/core": "^1.11.1",
|
|
26
|
-
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
27
|
-
"@unhead/vue": "2.0.12",
|
|
28
|
-
"@vant/area-data": "^2.0.0",
|
|
29
|
-
"@vant/touch-emulator": "^1.4.0",
|
|
30
|
-
"@vant/use": "^1.6.0",
|
|
31
|
-
"@vueuse/core": "^13.5.0",
|
|
32
|
-
"mermaid": "11.12.2",
|
|
33
|
-
"axios": "^1.10.0",
|
|
34
|
-
"bcryptjs": "^2.4.3",
|
|
35
|
-
"crypto-js": "^4.2.0",
|
|
36
|
-
"moment": "^2.21.0",
|
|
37
|
-
"dayjs": "^1.11.13",
|
|
38
|
-
"echarts": "^5.6.0",
|
|
39
|
-
"jsencrypt": "^3.3.2",
|
|
40
|
-
"lodash-es": "^4.17.21",
|
|
41
|
-
"nprogress": "^0.2.0",
|
|
42
|
-
"ol": "^10.5.0",
|
|
43
|
-
"pinia": "^3.0.3",
|
|
44
|
-
"pinia-plugin-persistedstate": "^4.4.1",
|
|
45
|
-
"resize-detector": "^0.3.0",
|
|
46
|
-
"vant": "^4.9.21",
|
|
47
|
-
"vconsole": "^3.15.1",
|
|
48
|
-
"vue": "^3.5.17",
|
|
49
|
-
"vue-i18n": "^11.1.10",
|
|
50
|
-
"vue-router": "^4.5.1",
|
|
51
|
-
"vue3-hash-calendar": "^1.1.3",
|
|
52
|
-
"weixin-js-sdk": "^1.6.5",
|
|
53
|
-
"js-base64": "^3.7.8"
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@antfu/eslint-config": "4.17.0",
|
|
57
|
-
"@commitlint/cli": "^19.8.1",
|
|
58
|
-
"@commitlint/config-conventional": "^19.8.1",
|
|
59
|
-
"@commitlint/types": "^19.8.1",
|
|
60
|
-
"@iconify/json": "2.2.318",
|
|
61
|
-
"@iconify/utils": "^2.3.0",
|
|
62
|
-
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
63
|
-
"@types/crypto-js": "^4.2.2",
|
|
64
|
-
"@types/lodash-es": "^4.17.12",
|
|
65
|
-
"@types/node": "^24.0.14",
|
|
66
|
-
"@types/nprogress": "^0.2.3",
|
|
67
|
-
"@unocss/eslint-config": "66.3.3",
|
|
68
|
-
"@vitejs/plugin-legacy": "^7.0.1",
|
|
69
|
-
"@vitejs/plugin-vue": "^6.0.0",
|
|
70
|
-
"autoprefixer": "^10.4.21",
|
|
71
|
-
"bumpp": "^10.2.0",
|
|
72
|
-
"consola": "^3.4.2",
|
|
73
|
-
"cross-env": "^7.0.3",
|
|
74
|
-
"eslint": "^9.31.0",
|
|
75
|
-
"eslint-plugin-format": "^1.0.1",
|
|
76
|
-
"less": "^4.4.0",
|
|
77
|
-
"lint-staged": "^16.1.2",
|
|
78
|
-
"mockjs": "^1.1.0",
|
|
79
|
-
"postcss-mobile-forever": "^5.0.0",
|
|
80
|
-
"rollup": "^4.45.1",
|
|
81
|
-
"simple-git-hooks": "^2.13.0",
|
|
82
|
-
"tar": "^7.4.3",
|
|
83
|
-
"terser": "^5.43.1",
|
|
84
|
-
"typescript": "^5.8.3",
|
|
85
|
-
"unocss": "66.3.3",
|
|
86
|
-
"vite": "^7.0.5",
|
|
87
|
-
"vite-plugin-compression": "^0.5.1",
|
|
88
|
-
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
89
|
-
"vite-plugin-pwa": "^1.0.1",
|
|
90
|
-
"vite-plugin-sitemap": "^0.8.2",
|
|
91
|
-
"vite-plugin-vconsole": "^2.1.1",
|
|
92
|
-
"vite-plugin-vue-devtools": "^7.7.7",
|
|
93
|
-
"vue-tsc": "^3.0.2"
|
|
94
|
-
},
|
|
95
|
-
"pnpm": {
|
|
96
|
-
"allowedDeprecatedVersions": {
|
|
97
|
-
"glob": "7.2.3",
|
|
98
|
-
"inflight": "1.0.6",
|
|
99
|
-
"sourcemap-codec": "1.4.8"
|
|
100
|
-
},
|
|
101
|
-
"peerDependencyRules": {
|
|
102
|
-
"allowedVersions": {}
|
|
103
|
-
},
|
|
104
|
-
"onlyBuiltDependencies": [
|
|
105
|
-
"core-js",
|
|
106
|
-
"esbuild",
|
|
107
|
-
"simple-git-hooks",
|
|
108
|
-
"unrs-resolver"
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
"resolutions": {
|
|
112
|
-
"vite": "^7.0.5"
|
|
113
|
-
},
|
|
114
|
-
"simple-git-hooks": {
|
|
115
|
-
"pre-commit": "pnpm lint-staged",
|
|
116
|
-
"commit-msg": "pnpm commitlint $1"
|
|
117
|
-
},
|
|
118
|
-
"lint-staged": {
|
|
119
|
-
"*": "eslint --fix"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "af-mobile-client-vue3",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.5.96",
|
|
5
|
+
"packageManager": "pnpm@10.13.1",
|
|
6
|
+
"description": "Vue + Vite component lib",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.19.0"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
|
12
|
+
"compress": "node ./compress.js",
|
|
13
|
+
"build:dev": "vue-tsc --noEmit && vite build --mode development && pnpm run compress",
|
|
14
|
+
"build:pro": "vue-tsc --noEmit && vite build --mode production && pnpm run compress",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"lint:fix": "eslint . --fix",
|
|
18
|
+
"release": "bumpp --commit --push --tag",
|
|
19
|
+
"typecheck": "vue-tsc --noEmit",
|
|
20
|
+
"commitlint": "commitlint --edit",
|
|
21
|
+
"prepare": "simple-git-hooks"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@iconify/vue": "4.3.0",
|
|
25
|
+
"@matechat/core": "^1.11.1",
|
|
26
|
+
"@micro-zoe/micro-app": "1.0.0-rc.26",
|
|
27
|
+
"@unhead/vue": "2.0.12",
|
|
28
|
+
"@vant/area-data": "^2.0.0",
|
|
29
|
+
"@vant/touch-emulator": "^1.4.0",
|
|
30
|
+
"@vant/use": "^1.6.0",
|
|
31
|
+
"@vueuse/core": "^13.5.0",
|
|
32
|
+
"mermaid": "11.12.2",
|
|
33
|
+
"axios": "^1.10.0",
|
|
34
|
+
"bcryptjs": "^2.4.3",
|
|
35
|
+
"crypto-js": "^4.2.0",
|
|
36
|
+
"moment": "^2.21.0",
|
|
37
|
+
"dayjs": "^1.11.13",
|
|
38
|
+
"echarts": "^5.6.0",
|
|
39
|
+
"jsencrypt": "^3.3.2",
|
|
40
|
+
"lodash-es": "^4.17.21",
|
|
41
|
+
"nprogress": "^0.2.0",
|
|
42
|
+
"ol": "^10.5.0",
|
|
43
|
+
"pinia": "^3.0.3",
|
|
44
|
+
"pinia-plugin-persistedstate": "^4.4.1",
|
|
45
|
+
"resize-detector": "^0.3.0",
|
|
46
|
+
"vant": "^4.9.21",
|
|
47
|
+
"vconsole": "^3.15.1",
|
|
48
|
+
"vue": "^3.5.17",
|
|
49
|
+
"vue-i18n": "^11.1.10",
|
|
50
|
+
"vue-router": "^4.5.1",
|
|
51
|
+
"vue3-hash-calendar": "^1.1.3",
|
|
52
|
+
"weixin-js-sdk": "^1.6.5",
|
|
53
|
+
"js-base64": "^3.7.8"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@antfu/eslint-config": "4.17.0",
|
|
57
|
+
"@commitlint/cli": "^19.8.1",
|
|
58
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
59
|
+
"@commitlint/types": "^19.8.1",
|
|
60
|
+
"@iconify/json": "2.2.318",
|
|
61
|
+
"@iconify/utils": "^2.3.0",
|
|
62
|
+
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
|
63
|
+
"@types/crypto-js": "^4.2.2",
|
|
64
|
+
"@types/lodash-es": "^4.17.12",
|
|
65
|
+
"@types/node": "^24.0.14",
|
|
66
|
+
"@types/nprogress": "^0.2.3",
|
|
67
|
+
"@unocss/eslint-config": "66.3.3",
|
|
68
|
+
"@vitejs/plugin-legacy": "^7.0.1",
|
|
69
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
70
|
+
"autoprefixer": "^10.4.21",
|
|
71
|
+
"bumpp": "^10.2.0",
|
|
72
|
+
"consola": "^3.4.2",
|
|
73
|
+
"cross-env": "^7.0.3",
|
|
74
|
+
"eslint": "^9.31.0",
|
|
75
|
+
"eslint-plugin-format": "^1.0.1",
|
|
76
|
+
"less": "^4.4.0",
|
|
77
|
+
"lint-staged": "^16.1.2",
|
|
78
|
+
"mockjs": "^1.1.0",
|
|
79
|
+
"postcss-mobile-forever": "^5.0.0",
|
|
80
|
+
"rollup": "^4.45.1",
|
|
81
|
+
"simple-git-hooks": "^2.13.0",
|
|
82
|
+
"tar": "^7.4.3",
|
|
83
|
+
"terser": "^5.43.1",
|
|
84
|
+
"typescript": "^5.8.3",
|
|
85
|
+
"unocss": "66.3.3",
|
|
86
|
+
"vite": "^7.0.5",
|
|
87
|
+
"vite-plugin-compression": "^0.5.1",
|
|
88
|
+
"vite-plugin-mock-dev-server": "^1.9.1",
|
|
89
|
+
"vite-plugin-pwa": "^1.0.1",
|
|
90
|
+
"vite-plugin-sitemap": "^0.8.2",
|
|
91
|
+
"vite-plugin-vconsole": "^2.1.1",
|
|
92
|
+
"vite-plugin-vue-devtools": "^7.7.7",
|
|
93
|
+
"vue-tsc": "^3.0.2"
|
|
94
|
+
},
|
|
95
|
+
"pnpm": {
|
|
96
|
+
"allowedDeprecatedVersions": {
|
|
97
|
+
"glob": "7.2.3",
|
|
98
|
+
"inflight": "1.0.6",
|
|
99
|
+
"sourcemap-codec": "1.4.8"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencyRules": {
|
|
102
|
+
"allowedVersions": {}
|
|
103
|
+
},
|
|
104
|
+
"onlyBuiltDependencies": [
|
|
105
|
+
"core-js",
|
|
106
|
+
"esbuild",
|
|
107
|
+
"simple-git-hooks",
|
|
108
|
+
"unrs-resolver"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"resolutions": {
|
|
112
|
+
"vite": "^7.0.5"
|
|
113
|
+
},
|
|
114
|
+
"simple-git-hooks": {
|
|
115
|
+
"pre-commit": "pnpm lint-staged",
|
|
116
|
+
"commit-msg": "pnpm commitlint $1"
|
|
117
|
+
},
|
|
118
|
+
"lint-staged": {
|
|
119
|
+
"*": "eslint --fix"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import CardContainer from '@af-mobile-client-vue3/components/data/CardContainer/CardContainer.vue'
|
|
3
|
-
import CardHeader from '@af-mobile-client-vue3/components/data/CardContainer/CardHeader.vue'
|
|
4
|
-
import {
|
|
5
|
-
Field as VanField,
|
|
6
|
-
Picker as VanPicker,
|
|
7
|
-
Popup as VanPopup,
|
|
8
|
-
} from 'vant'
|
|
9
|
-
import { ref, watch } from 'vue'
|
|
10
|
-
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
modelValue: string
|
|
13
|
-
remarks: string
|
|
14
|
-
}>()
|
|
15
|
-
|
|
16
|
-
const emit = defineEmits<{
|
|
17
|
-
(e: 'update:modelValue', value: string): void
|
|
18
|
-
(e: 'update:remarks', value: string): void
|
|
19
|
-
}>()
|
|
20
|
-
|
|
21
|
-
const printOptions = [
|
|
22
|
-
{ text: '电子发票', value: '电子发票' },
|
|
23
|
-
{ text: '普通收据', value: '普通收据' },
|
|
24
|
-
{ text: '两者都需要', value: 'both' },
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
const selectedOption = ref(getOptionText(props.modelValue))
|
|
28
|
-
const remarks = ref(props.remarks)
|
|
29
|
-
const showPicker = ref(false)
|
|
30
|
-
|
|
31
|
-
function getOptionText(value: string): string {
|
|
32
|
-
const option = printOptions.find(opt => opt.value === value)
|
|
33
|
-
return option ? option.text : ''
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function onConfirm({ selectedValues }: { selectedValues: string[] }) {
|
|
37
|
-
selectedOption.value = selectedValues[0]
|
|
38
|
-
emit('update:modelValue', selectedValues[0])
|
|
39
|
-
showPicker.value = false
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
watch(() => remarks.value, (newValue) => {
|
|
43
|
-
emit('update:remarks', newValue)
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
// 当从外部更新值时更新内部状态
|
|
47
|
-
watch(() => props.modelValue, (newValue) => {
|
|
48
|
-
selectedOption.value = getOptionText(newValue)
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
watch(() => props.remarks, (newValue) => {
|
|
52
|
-
remarks.value = newValue
|
|
53
|
-
})
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<CardContainer class="charge-print-and-remarks">
|
|
58
|
-
<CardHeader title="打印及备注" />
|
|
59
|
-
<div class="charge-print-options">
|
|
60
|
-
<div class="charge-print-options__section">
|
|
61
|
-
<label class="charge-print-options__label">收据打印选项</label>
|
|
62
|
-
<div class="charge-print-options__selector">
|
|
63
|
-
<VanField
|
|
64
|
-
v-model="selectedOption"
|
|
65
|
-
is-link
|
|
66
|
-
readonly
|
|
67
|
-
placeholder="请选择打印方式"
|
|
68
|
-
@click="showPicker = true"
|
|
69
|
-
/>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div class="charge-print-options__section">
|
|
74
|
-
<label class="charge-print-options__label">备注</label>
|
|
75
|
-
<div class="charge-print-options__selector">
|
|
76
|
-
<VanField
|
|
77
|
-
v-model="remarks"
|
|
78
|
-
type="textarea"
|
|
79
|
-
placeholder="可选填写备注信息"
|
|
80
|
-
rows="2"
|
|
81
|
-
autosize
|
|
82
|
-
maxlength="200"
|
|
83
|
-
show-word-limit
|
|
84
|
-
/>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<VanPopup v-model:show="showPicker" position="bottom" round teleport="body">
|
|
89
|
-
<VanPicker
|
|
90
|
-
:columns="printOptions"
|
|
91
|
-
show-toolbar
|
|
92
|
-
title="选择打印方式"
|
|
93
|
-
@confirm="onConfirm"
|
|
94
|
-
@cancel="showPicker = false"
|
|
95
|
-
/>
|
|
96
|
-
</VanPopup>
|
|
97
|
-
</div>
|
|
98
|
-
</CardContainer>
|
|
99
|
-
</template>
|
|
100
|
-
|
|
101
|
-
<style scoped lang="less">
|
|
102
|
-
.charge-print-and-remarks {
|
|
103
|
-
margin-bottom: 16px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.charge-print-options {
|
|
107
|
-
&__section {
|
|
108
|
-
margin-bottom: 16px;
|
|
109
|
-
|
|
110
|
-
&:last-child {
|
|
111
|
-
margin-bottom: 0;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&__label {
|
|
116
|
-
display: block;
|
|
117
|
-
font-size: 12px;
|
|
118
|
-
font-weight: 500;
|
|
119
|
-
color: #6b7280;
|
|
120
|
-
margin-bottom: 4px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&__selector {
|
|
124
|
-
position: relative;
|
|
125
|
-
|
|
126
|
-
:deep(.van-field) {
|
|
127
|
-
background-color: #f9fafb;
|
|
128
|
-
border-radius: 6px;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
:deep(.van-field__control) {
|
|
133
|
-
background-color: #f9fafb;
|
|
134
|
-
border-radius: 6px;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import CardContainer from '@af-mobile-client-vue3/components/data/CardContainer/CardContainer.vue'
|
|
3
|
+
import CardHeader from '@af-mobile-client-vue3/components/data/CardContainer/CardHeader.vue'
|
|
4
|
+
import {
|
|
5
|
+
Field as VanField,
|
|
6
|
+
Picker as VanPicker,
|
|
7
|
+
Popup as VanPopup,
|
|
8
|
+
} from 'vant'
|
|
9
|
+
import { ref, watch } from 'vue'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
modelValue: string
|
|
13
|
+
remarks: string
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits<{
|
|
17
|
+
(e: 'update:modelValue', value: string): void
|
|
18
|
+
(e: 'update:remarks', value: string): void
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const printOptions = [
|
|
22
|
+
{ text: '电子发票', value: '电子发票' },
|
|
23
|
+
{ text: '普通收据', value: '普通收据' },
|
|
24
|
+
{ text: '两者都需要', value: 'both' },
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
const selectedOption = ref(getOptionText(props.modelValue))
|
|
28
|
+
const remarks = ref(props.remarks)
|
|
29
|
+
const showPicker = ref(false)
|
|
30
|
+
|
|
31
|
+
function getOptionText(value: string): string {
|
|
32
|
+
const option = printOptions.find(opt => opt.value === value)
|
|
33
|
+
return option ? option.text : ''
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function onConfirm({ selectedValues }: { selectedValues: string[] }) {
|
|
37
|
+
selectedOption.value = selectedValues[0]
|
|
38
|
+
emit('update:modelValue', selectedValues[0])
|
|
39
|
+
showPicker.value = false
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
watch(() => remarks.value, (newValue) => {
|
|
43
|
+
emit('update:remarks', newValue)
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
// 当从外部更新值时更新内部状态
|
|
47
|
+
watch(() => props.modelValue, (newValue) => {
|
|
48
|
+
selectedOption.value = getOptionText(newValue)
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
watch(() => props.remarks, (newValue) => {
|
|
52
|
+
remarks.value = newValue
|
|
53
|
+
})
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<template>
|
|
57
|
+
<CardContainer class="charge-print-and-remarks">
|
|
58
|
+
<CardHeader title="打印及备注" />
|
|
59
|
+
<div class="charge-print-options">
|
|
60
|
+
<div class="charge-print-options__section">
|
|
61
|
+
<label class="charge-print-options__label">收据打印选项</label>
|
|
62
|
+
<div class="charge-print-options__selector">
|
|
63
|
+
<VanField
|
|
64
|
+
v-model="selectedOption"
|
|
65
|
+
is-link
|
|
66
|
+
readonly
|
|
67
|
+
placeholder="请选择打印方式"
|
|
68
|
+
@click="showPicker = true"
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="charge-print-options__section">
|
|
74
|
+
<label class="charge-print-options__label">备注</label>
|
|
75
|
+
<div class="charge-print-options__selector">
|
|
76
|
+
<VanField
|
|
77
|
+
v-model="remarks"
|
|
78
|
+
type="textarea"
|
|
79
|
+
placeholder="可选填写备注信息"
|
|
80
|
+
rows="2"
|
|
81
|
+
autosize
|
|
82
|
+
maxlength="200"
|
|
83
|
+
show-word-limit
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<VanPopup v-model:show="showPicker" position="bottom" round teleport="body">
|
|
89
|
+
<VanPicker
|
|
90
|
+
:columns="printOptions"
|
|
91
|
+
show-toolbar
|
|
92
|
+
title="选择打印方式"
|
|
93
|
+
@confirm="onConfirm"
|
|
94
|
+
@cancel="showPicker = false"
|
|
95
|
+
/>
|
|
96
|
+
</VanPopup>
|
|
97
|
+
</div>
|
|
98
|
+
</CardContainer>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<style scoped lang="less">
|
|
102
|
+
.charge-print-and-remarks {
|
|
103
|
+
margin-bottom: 16px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.charge-print-options {
|
|
107
|
+
&__section {
|
|
108
|
+
margin-bottom: 16px;
|
|
109
|
+
|
|
110
|
+
&:last-child {
|
|
111
|
+
margin-bottom: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__label {
|
|
116
|
+
display: block;
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
font-weight: 500;
|
|
119
|
+
color: #6b7280;
|
|
120
|
+
margin-bottom: 4px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__selector {
|
|
124
|
+
position: relative;
|
|
125
|
+
|
|
126
|
+
:deep(.van-field) {
|
|
127
|
+
background-color: #f9fafb;
|
|
128
|
+
border-radius: 6px;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:deep(.van-field__control) {
|
|
133
|
+
background-color: #f9fafb;
|
|
134
|
+
border-radius: 6px;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
</style>
|