af-mobile-client-vue3 1.4.16 → 1.4.18
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 +1 -1
- package/src/components/common/otherCharge/ChargePrintSelectorAndRemarks.vue +10 -5
- package/src/components/common/otherCharge/CodePayment.vue +12 -6
- package/src/components/common/otherCharge/FileUploader.vue +4 -1
- package/src/components/common/otherCharge/GridFileUploader.vue +17 -11
- package/src/components/common/otherCharge/ReceiptModal.vue +10 -6
- package/src/components/core/XSelect/index.vue +1 -1
- package/src/components/data/OtherCharge/OtherChargeForm.vue +21 -13
- package/src/components/data/OtherCharge/OtherChargeItem.vue +4 -2
- package/src/components/data/OtherCharge/OtherChargeItemModal.vue +53 -35
- package/src/router/routes.ts +6 -0
- package/src/views/component/OtherCharge/index.vue +42 -0
- package/src/views/component/index.vue +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import CardContainer from '@af-mobile-client-vue3/components/data/CardContainer/CardContainer.vue'
|
|
3
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'
|
|
4
9
|
import { ref, watch } from 'vue'
|
|
5
10
|
|
|
6
11
|
const props = defineProps<{
|
|
@@ -55,7 +60,7 @@ watch(() => props.remarks, (newValue) => {
|
|
|
55
60
|
<div class="charge-print-options__section">
|
|
56
61
|
<label class="charge-print-options__label">收据打印选项</label>
|
|
57
62
|
<div class="charge-print-options__selector">
|
|
58
|
-
<
|
|
63
|
+
<VanField
|
|
59
64
|
v-model="selectedOption"
|
|
60
65
|
is-link
|
|
61
66
|
readonly
|
|
@@ -68,7 +73,7 @@ watch(() => props.remarks, (newValue) => {
|
|
|
68
73
|
<div class="charge-print-options__section">
|
|
69
74
|
<label class="charge-print-options__label">备注</label>
|
|
70
75
|
<div class="charge-print-options__selector">
|
|
71
|
-
<
|
|
76
|
+
<VanField
|
|
72
77
|
v-model="remarks"
|
|
73
78
|
type="textarea"
|
|
74
79
|
placeholder="可选填写备注信息"
|
|
@@ -80,15 +85,15 @@ watch(() => props.remarks, (newValue) => {
|
|
|
80
85
|
</div>
|
|
81
86
|
</div>
|
|
82
87
|
|
|
83
|
-
<
|
|
84
|
-
<
|
|
88
|
+
<VanPopup v-model:show="showPicker" position="bottom" round teleport="body">
|
|
89
|
+
<VanPicker
|
|
85
90
|
:columns="printOptions"
|
|
86
91
|
show-toolbar
|
|
87
92
|
title="选择打印方式"
|
|
88
93
|
@confirm="onConfirm"
|
|
89
94
|
@cancel="showPicker = false"
|
|
90
95
|
/>
|
|
91
|
-
</
|
|
96
|
+
</VanPopup>
|
|
92
97
|
</div>
|
|
93
98
|
</CardContainer>
|
|
94
99
|
</template>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { post } from '@af-mobile-client-vue3/services/restTools'
|
|
3
3
|
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
showDialog,
|
|
6
|
+
showToast,
|
|
7
|
+
Button as VanButton,
|
|
8
|
+
Icon as VanIcon,
|
|
9
|
+
Popup as VanPopup,
|
|
10
|
+
} from 'vant'
|
|
5
11
|
import { defineEmits, defineProps, onMounted, onUnmounted, ref } from 'vue'
|
|
6
12
|
|
|
7
13
|
const props = defineProps({
|
|
@@ -221,7 +227,7 @@ onUnmounted(() => {
|
|
|
221
227
|
</script>
|
|
222
228
|
|
|
223
229
|
<template>
|
|
224
|
-
<
|
|
230
|
+
<VanPopup
|
|
225
231
|
v-model:show="showCode"
|
|
226
232
|
:close-on-click-overlay="false"
|
|
227
233
|
:style="{ width: '90%', maxWidth: '400px' }"
|
|
@@ -229,7 +235,7 @@ onUnmounted(() => {
|
|
|
229
235
|
<div class="qrcode-payment">
|
|
230
236
|
<div class="qrcode-payment__header">
|
|
231
237
|
<div class="qrcode-payment__title">
|
|
232
|
-
<
|
|
238
|
+
<VanIcon name="scan" size="24" color="#1989fa" />
|
|
233
239
|
<span>请扫描下方二维码进行付款</span>
|
|
234
240
|
</div>
|
|
235
241
|
|
|
@@ -254,16 +260,16 @@ onUnmounted(() => {
|
|
|
254
260
|
</div>
|
|
255
261
|
|
|
256
262
|
<div class="qrcode-payment__footer">
|
|
257
|
-
<
|
|
263
|
+
<VanButton
|
|
258
264
|
type="default"
|
|
259
265
|
block
|
|
260
266
|
@click="cancelPayment"
|
|
261
267
|
>
|
|
262
268
|
取消支付
|
|
263
|
-
</
|
|
269
|
+
</VanButton>
|
|
264
270
|
</div>
|
|
265
271
|
</div>
|
|
266
|
-
</
|
|
272
|
+
</VanPopup>
|
|
267
273
|
</template>
|
|
268
274
|
|
|
269
275
|
<style lang="less" scoped>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import CardHeader from '@af-mobile-client-vue3/components/data/CardContainer/CardHeader.vue'
|
|
3
3
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
showFailToast,
|
|
6
|
+
showImagePreview,
|
|
7
|
+
} from 'vant'
|
|
5
8
|
import { computed } from 'vue'
|
|
6
9
|
|
|
7
10
|
export interface FileItem {
|
|
@@ -3,7 +3,13 @@ import type { FileItem } from './FileUploader.vue'
|
|
|
3
3
|
import CardContainer from '@af-mobile-client-vue3/components/data/CardContainer/CardContainer.vue'
|
|
4
4
|
import CardHeader from '@af-mobile-client-vue3/components/data/CardContainer/CardHeader.vue'
|
|
5
5
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
showFailToast,
|
|
8
|
+
showToast,
|
|
9
|
+
Button as VanButton,
|
|
10
|
+
Icon as VanIcon,
|
|
11
|
+
ImagePreview as VanImagePreview,
|
|
12
|
+
} from 'vant'
|
|
7
13
|
import { computed, onMounted, onUnmounted, reactive, ref } from 'vue'
|
|
8
14
|
|
|
9
15
|
export interface FileTypeConfig {
|
|
@@ -406,7 +412,7 @@ defineExpose({
|
|
|
406
412
|
>
|
|
407
413
|
必
|
|
408
414
|
</div>
|
|
409
|
-
<
|
|
415
|
+
<VanIcon
|
|
410
416
|
v-else-if="isRequirementMet(config)"
|
|
411
417
|
name="success"
|
|
412
418
|
class="grid-file-uploader__item-success"
|
|
@@ -416,7 +422,7 @@ defineExpose({
|
|
|
416
422
|
<div class="grid-file-uploader__item-content" @click="showFloatingMenu(config.userType)">
|
|
417
423
|
<!-- 图标 -->
|
|
418
424
|
<div class="grid-file-uploader__item-icon">
|
|
419
|
-
<
|
|
425
|
+
<VanIcon
|
|
420
426
|
:icon="getIcon(config)"
|
|
421
427
|
class="grid-file-uploader__icon"
|
|
422
428
|
/>
|
|
@@ -447,7 +453,7 @@ defineExpose({
|
|
|
447
453
|
class="grid-file-uploader__floating-buttons"
|
|
448
454
|
@click.stop
|
|
449
455
|
>
|
|
450
|
-
<
|
|
456
|
+
<VanButton
|
|
451
457
|
v-if="getUploadedCount(config.userType) > 0"
|
|
452
458
|
type="primary"
|
|
453
459
|
size="small"
|
|
@@ -456,8 +462,8 @@ defineExpose({
|
|
|
456
462
|
@click="viewFiles(config.userType)"
|
|
457
463
|
>
|
|
458
464
|
查看
|
|
459
|
-
</
|
|
460
|
-
<
|
|
465
|
+
</VanButton>
|
|
466
|
+
<VanButton
|
|
461
467
|
type="success"
|
|
462
468
|
size="small"
|
|
463
469
|
:icon="isDev ? 'photograph' : 'camera-o'"
|
|
@@ -465,13 +471,13 @@ defineExpose({
|
|
|
465
471
|
@click="uploadFiles(config.userType)"
|
|
466
472
|
>
|
|
467
473
|
{{ isDev ? '上传' : '拍照' }}
|
|
468
|
-
</
|
|
474
|
+
</VanButton>
|
|
469
475
|
</div>
|
|
470
476
|
</div>
|
|
471
477
|
</div>
|
|
472
478
|
|
|
473
479
|
<!-- 图片预览组件 -->
|
|
474
|
-
<
|
|
480
|
+
<VanImagePreview
|
|
475
481
|
v-model:show="showPreview"
|
|
476
482
|
:images="previewImages"
|
|
477
483
|
:start-position="previewIndex"
|
|
@@ -482,7 +488,7 @@ defineExpose({
|
|
|
482
488
|
<div class="preview-footer" style="text-align: center;">
|
|
483
489
|
<span class="preview-index">第{{ previewIndex + 1 }}页</span>
|
|
484
490
|
<br>
|
|
485
|
-
<
|
|
491
|
+
<VanButton
|
|
486
492
|
type="danger"
|
|
487
493
|
size="small"
|
|
488
494
|
icon="delete-o"
|
|
@@ -490,10 +496,10 @@ defineExpose({
|
|
|
490
496
|
@click="deleteCurrentPreviewImage"
|
|
491
497
|
>
|
|
492
498
|
删除
|
|
493
|
-
</
|
|
499
|
+
</VanButton>
|
|
494
500
|
</div>
|
|
495
501
|
</template>
|
|
496
|
-
</
|
|
502
|
+
</VanImagePreview>
|
|
497
503
|
</CardContainer>
|
|
498
504
|
</template>
|
|
499
505
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { runLogic } from '@af-mobile-client-vue3/services/api/common'
|
|
3
3
|
import { mobileUtil } from '@af-mobile-client-vue3/utils/mobileUtil'
|
|
4
|
+
import {
|
|
5
|
+
Button as VanButton,
|
|
6
|
+
Popup as VanPopup,
|
|
7
|
+
} from 'vant'
|
|
4
8
|
import { defineEmits, onUnmounted, ref, watch } from 'vue'
|
|
5
9
|
|
|
6
10
|
interface PrintItem {
|
|
@@ -136,7 +140,7 @@ defineExpose({ printParams, close })
|
|
|
136
140
|
</script>
|
|
137
141
|
|
|
138
142
|
<template>
|
|
139
|
-
<
|
|
143
|
+
<VanPopup
|
|
140
144
|
:show="show"
|
|
141
145
|
|
|
142
146
|
:close-on-click-overlay="false"
|
|
@@ -173,20 +177,20 @@ defineExpose({ printParams, close })
|
|
|
173
177
|
</template>
|
|
174
178
|
</div>
|
|
175
179
|
<div class="receipt-modal-footer">
|
|
176
|
-
<
|
|
180
|
+
<VanButton
|
|
177
181
|
v-if="showSaveButton"
|
|
178
182
|
class="save-button"
|
|
179
183
|
type="primary"
|
|
180
184
|
@click="ok"
|
|
181
185
|
>
|
|
182
186
|
{{ saveButtonText }}
|
|
183
|
-
</
|
|
184
|
-
<
|
|
187
|
+
</VanButton>
|
|
188
|
+
<VanButton class="close-button" @click="close">
|
|
185
189
|
{{ closeButtonText }}
|
|
186
|
-
</
|
|
190
|
+
</VanButton>
|
|
187
191
|
</div>
|
|
188
192
|
</div>
|
|
189
|
-
</
|
|
193
|
+
</VanPopup>
|
|
190
194
|
</template>
|
|
191
195
|
|
|
192
196
|
<style lang="less">
|
|
@@ -172,7 +172,7 @@ watch(() => props.columns, () => {
|
|
|
172
172
|
:border="props.border"
|
|
173
173
|
@click="showPopu($attrs.readonly)"
|
|
174
174
|
/>
|
|
175
|
-
<VanPopup v-model:show="show" position="bottom">
|
|
175
|
+
<VanPopup v-model:show="show" position="bottom" teleport="body">
|
|
176
176
|
<div class="x-select-popup">
|
|
177
177
|
<!-- 搜索框 -->
|
|
178
178
|
<VanSearch
|
|
@@ -4,7 +4,14 @@ import CardContainer from '@af-mobile-client-vue3/components/data/CardContainer/
|
|
|
4
4
|
import CardHeader from '@af-mobile-client-vue3/components/data/CardContainer/CardHeader.vue'
|
|
5
5
|
import { getConfigByNameAsync, runLogic } from '@af-mobile-client-vue3/services/api/common'
|
|
6
6
|
import useUserStore from '@af-mobile-client-vue3/stores/modules/user'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
showDialog,
|
|
9
|
+
showFailToast,
|
|
10
|
+
showToast,
|
|
11
|
+
Button as VanButton,
|
|
12
|
+
Field as VanField,
|
|
13
|
+
Icon as VanIcon,
|
|
14
|
+
} from 'vant'
|
|
8
15
|
import { computed, onMounted, reactive, ref } from 'vue'
|
|
9
16
|
// import { otherCharge } from '@/services/api/business'
|
|
10
17
|
import ChargePrintSelectorAndRemarks from '../../common/otherCharge/ChargePrintSelectorAndRemarks.vue'
|
|
@@ -315,7 +322,7 @@ async function processPayment(tradeNo = ''): Promise<any> {
|
|
|
315
322
|
const newChargeItems = chargeItems.value.map((item) => {
|
|
316
323
|
return {
|
|
317
324
|
f_work_order_id: item.workOrderId || '',
|
|
318
|
-
|
|
325
|
+
f_service_id: item.workOrderCode || '',
|
|
319
326
|
f_brand_spec: item.type,
|
|
320
327
|
f_typename: item.item,
|
|
321
328
|
f_typenumber: item.model,
|
|
@@ -326,6 +333,7 @@ async function processPayment(tradeNo = ''): Promise<any> {
|
|
|
326
333
|
})
|
|
327
334
|
const param = {
|
|
328
335
|
f_workflow_id: props.user.f_workflow_id,
|
|
336
|
+
f_userinfo_id: props.user.f_userinfo_id,
|
|
329
337
|
// f_serial_id: this.model.f_serial_id,
|
|
330
338
|
// nopay_id: this.model.nopay_id,
|
|
331
339
|
f_collection: totalAmount.value,
|
|
@@ -403,7 +411,7 @@ function onFileRemoved(): void {
|
|
|
403
411
|
<div id="other-charge-form" class="other-charge-form">
|
|
404
412
|
<!-- 信息提示 -->
|
|
405
413
|
<div class="other-charge-form__info-box">
|
|
406
|
-
<
|
|
414
|
+
<VanIcon name="info-o" class="other-charge-form__info-icon" />
|
|
407
415
|
<div class="other-charge-form__info-content">
|
|
408
416
|
<p class="other-charge-form__info-text">
|
|
409
417
|
请填写收费信息,系统将自动计算应收金额。
|
|
@@ -419,7 +427,7 @@ function onFileRemoved(): void {
|
|
|
419
427
|
<CardContainer class="other-charge-form__section-margin">
|
|
420
428
|
<CardHeader title="费用项目">
|
|
421
429
|
<template #extra>
|
|
422
|
-
<
|
|
430
|
+
<VanButton
|
|
423
431
|
type="primary"
|
|
424
432
|
size="small"
|
|
425
433
|
icon="plus"
|
|
@@ -427,7 +435,7 @@ function onFileRemoved(): void {
|
|
|
427
435
|
@click="showAddItemModal = true"
|
|
428
436
|
>
|
|
429
437
|
添加费用项
|
|
430
|
-
</
|
|
438
|
+
</VanButton>
|
|
431
439
|
</template>
|
|
432
440
|
</CardHeader>
|
|
433
441
|
|
|
@@ -455,7 +463,7 @@ function onFileRemoved(): void {
|
|
|
455
463
|
<div class="other-charge-form__field">
|
|
456
464
|
<label class="other-charge-form__label">应收金额</label>
|
|
457
465
|
<div class="other-charge-form__amount-input">
|
|
458
|
-
<
|
|
466
|
+
<VanField
|
|
459
467
|
v-model="totalAmount"
|
|
460
468
|
readonly
|
|
461
469
|
input-align="right"
|
|
@@ -466,14 +474,14 @@ function onFileRemoved(): void {
|
|
|
466
474
|
<template #suffix>
|
|
467
475
|
<span class="other-charge-form__suffix">元</span>
|
|
468
476
|
</template>
|
|
469
|
-
</
|
|
477
|
+
</VanField>
|
|
470
478
|
</div>
|
|
471
479
|
</div>
|
|
472
480
|
|
|
473
481
|
<div class="other-charge-form__field">
|
|
474
482
|
<label class="other-charge-form__label">收费项目数</label>
|
|
475
483
|
<div class="other-charge-form__count-input">
|
|
476
|
-
<
|
|
484
|
+
<VanField
|
|
477
485
|
:model-value="chargeItems.length.toString()"
|
|
478
486
|
readonly
|
|
479
487
|
input-align="right"
|
|
@@ -481,7 +489,7 @@ function onFileRemoved(): void {
|
|
|
481
489
|
<template #suffix>
|
|
482
490
|
<span class="other-charge-form__suffix">项</span>
|
|
483
491
|
</template>
|
|
484
|
-
</
|
|
492
|
+
</VanField>
|
|
485
493
|
</div>
|
|
486
494
|
</div>
|
|
487
495
|
</CardContainer>
|
|
@@ -541,22 +549,22 @@ function onFileRemoved(): void {
|
|
|
541
549
|
|
|
542
550
|
<!-- 按钮区域 -->
|
|
543
551
|
<div class="other-charge-form__buttons">
|
|
544
|
-
<
|
|
552
|
+
<VanButton
|
|
545
553
|
plain
|
|
546
554
|
type="default"
|
|
547
555
|
class="other-charge-form__cancel-btn"
|
|
548
556
|
@click="cancelOperation"
|
|
549
557
|
>
|
|
550
558
|
取消
|
|
551
|
-
</
|
|
552
|
-
<
|
|
559
|
+
</VanButton>
|
|
560
|
+
<VanButton
|
|
553
561
|
type="primary"
|
|
554
562
|
native-type="submit"
|
|
555
563
|
class="other-charge-form__confirm-btn"
|
|
556
564
|
:disabled="chargeItems.length === 0"
|
|
557
565
|
>
|
|
558
566
|
确认收费
|
|
559
|
-
</
|
|
567
|
+
</VanButton>
|
|
560
568
|
</div>
|
|
561
569
|
</form>
|
|
562
570
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { Icon as VanIcon } from 'vant'
|
|
3
|
+
|
|
2
4
|
interface ChargeItem {
|
|
3
5
|
id: number
|
|
4
6
|
workOrderCode?: string
|
|
@@ -32,7 +34,7 @@ function formatPrice(price: number): string {
|
|
|
32
34
|
<h5 class="other-charge-item__title">
|
|
33
35
|
费用项 #{{ index + 1 }}
|
|
34
36
|
</h5>
|
|
35
|
-
<
|
|
37
|
+
<VanIcon
|
|
36
38
|
name="cross"
|
|
37
39
|
class="other-charge-item__delete"
|
|
38
40
|
@click="$emit('remove', item.id)"
|
|
@@ -42,7 +44,7 @@ function formatPrice(price: number): string {
|
|
|
42
44
|
<div class="other-charge-item__info">
|
|
43
45
|
<div v-if="isWorkOrder" class="other-charge-item__field">
|
|
44
46
|
<p class="other-charge-item__label">
|
|
45
|
-
|
|
47
|
+
所属工单
|
|
46
48
|
</p>
|
|
47
49
|
<p class="other-charge-item__value">
|
|
48
50
|
{{ item.workOrderCode }}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
Button as VanButton,
|
|
4
|
+
Field as VanField,
|
|
5
|
+
Icon as VanIcon,
|
|
6
|
+
Picker as VanPicker,
|
|
7
|
+
Popup as VanPopup,
|
|
8
|
+
Stepper as VanStepper,
|
|
9
|
+
} from 'vant'
|
|
2
10
|
import { computed, reactive, ref, watch } from 'vue'
|
|
3
11
|
|
|
4
12
|
// 型号接口
|
|
@@ -61,8 +69,14 @@ const showModal = computed({
|
|
|
61
69
|
set: value => emit('update:show', value),
|
|
62
70
|
})
|
|
63
71
|
|
|
72
|
+
// 工单选项
|
|
73
|
+
const workOrderOptions = computed(() => {
|
|
74
|
+
return props.workOrderData || []
|
|
75
|
+
})
|
|
76
|
+
|
|
64
77
|
const formData = reactive<FormData>({
|
|
65
|
-
|
|
78
|
+
workOrderCode: workOrderOptions.value.length === 1 ? workOrderOptions.value[0].text : '',
|
|
79
|
+
workOrderId: workOrderOptions.value.length === 1 ? workOrderOptions.value[0].value : '',
|
|
66
80
|
type: '',
|
|
67
81
|
item: '',
|
|
68
82
|
model: '', // 新增型号字段
|
|
@@ -78,11 +92,9 @@ const workOrderError = ref(false)
|
|
|
78
92
|
const typeError = ref(false)
|
|
79
93
|
const itemError = ref(false)
|
|
80
94
|
const priceError = ref(false)
|
|
95
|
+
const isWorkOrder = computed(() => props.isWorkOrder)
|
|
81
96
|
|
|
82
97
|
// 分类选项
|
|
83
|
-
const workOrderOptions = computed(() => {
|
|
84
|
-
return props.workOrderData || []
|
|
85
|
-
})
|
|
86
98
|
const typeOptions = computed(() => {
|
|
87
99
|
return props.chargeTypes.value.map(category => ({ text: category.name, value: category.name }))
|
|
88
100
|
})
|
|
@@ -179,7 +191,7 @@ function handleSubmit() {
|
|
|
179
191
|
// 验证表单
|
|
180
192
|
let isValid = true
|
|
181
193
|
// 验证工单
|
|
182
|
-
if (
|
|
194
|
+
if (isWorkOrder.value && !formData.workOrderId) {
|
|
183
195
|
workOrderError.value = true
|
|
184
196
|
isValid = false
|
|
185
197
|
}
|
|
@@ -227,8 +239,14 @@ function handleSubmit() {
|
|
|
227
239
|
}
|
|
228
240
|
|
|
229
241
|
function resetForm() {
|
|
230
|
-
|
|
231
|
-
|
|
242
|
+
if (isWorkOrder.value && workOrderOptions.value.length === 1) {
|
|
243
|
+
formData.workOrderId = workOrderOptions.value[0].value || ''
|
|
244
|
+
formData.workOrderCode = workOrderOptions.value[0].text || ''
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
formData.workOrderId = ''
|
|
248
|
+
formData.workOrderCode = ''
|
|
249
|
+
}
|
|
232
250
|
formData.type = ''
|
|
233
251
|
formData.item = ''
|
|
234
252
|
formData.model = '' // 重置型号
|
|
@@ -257,7 +275,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
257
275
|
</script>
|
|
258
276
|
|
|
259
277
|
<template>
|
|
260
|
-
<
|
|
278
|
+
<VanPopup
|
|
261
279
|
v-model:show="showModal"
|
|
262
280
|
round
|
|
263
281
|
position="center"
|
|
@@ -270,13 +288,13 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
270
288
|
<h3 class="other-charge-item-modal__title">
|
|
271
289
|
添加费用项
|
|
272
290
|
</h3>
|
|
273
|
-
<
|
|
291
|
+
<VanIcon name="cross" @click="closeModal" />
|
|
274
292
|
</div>
|
|
275
293
|
|
|
276
294
|
<form class="other-charge-item-modal__form" @submit.prevent="handleSubmit">
|
|
277
|
-
<div v-if="
|
|
278
|
-
<label class="other-charge-item-modal__label"
|
|
279
|
-
<
|
|
295
|
+
<div v-if="isWorkOrder" class="other-charge-item-modal__field">
|
|
296
|
+
<label class="other-charge-item-modal__label">所属工单</label>
|
|
297
|
+
<VanField
|
|
280
298
|
v-model="formData.workOrderCode"
|
|
281
299
|
placeholder="请选择工单"
|
|
282
300
|
readonly
|
|
@@ -288,7 +306,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
288
306
|
|
|
289
307
|
<div class="other-charge-item-modal__field">
|
|
290
308
|
<label class="other-charge-item-modal__label">收费类型</label>
|
|
291
|
-
<
|
|
309
|
+
<VanField
|
|
292
310
|
v-model="formData.type"
|
|
293
311
|
placeholder="请选择收费类型"
|
|
294
312
|
readonly
|
|
@@ -300,7 +318,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
300
318
|
|
|
301
319
|
<div class="other-charge-item-modal__field">
|
|
302
320
|
<label class="other-charge-item-modal__label">具体项目</label>
|
|
303
|
-
<
|
|
321
|
+
<VanField
|
|
304
322
|
v-model="formData.item"
|
|
305
323
|
placeholder="请选择具体项目"
|
|
306
324
|
readonly
|
|
@@ -314,7 +332,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
314
332
|
<!-- 新增型号选择字段 -->
|
|
315
333
|
<div v-if="hasModelOptions" class="other-charge-item-modal__field">
|
|
316
334
|
<label class="other-charge-item-modal__label">型号</label>
|
|
317
|
-
<
|
|
335
|
+
<VanField
|
|
318
336
|
v-model="formData.model"
|
|
319
337
|
placeholder="请选择型号"
|
|
320
338
|
readonly
|
|
@@ -328,7 +346,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
328
346
|
<div class="other-charge-item-modal__field">
|
|
329
347
|
<label class="other-charge-item-modal__label">单价 (元)</label>
|
|
330
348
|
<div class="other-charge-item-modal__price-input">
|
|
331
|
-
<
|
|
349
|
+
<VanField
|
|
332
350
|
v-model="formData.unitPrice"
|
|
333
351
|
type="digit"
|
|
334
352
|
placeholder="0.00"
|
|
@@ -337,13 +355,13 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
337
355
|
<template #prefix>
|
|
338
356
|
<span class="other-charge-item-modal__prefix">¥</span>
|
|
339
357
|
</template>
|
|
340
|
-
</
|
|
358
|
+
</VanField>
|
|
341
359
|
</div>
|
|
342
360
|
</div>
|
|
343
361
|
|
|
344
362
|
<div class="other-charge-item-modal__field">
|
|
345
363
|
<label class="other-charge-item-modal__label">数量</label>
|
|
346
|
-
<
|
|
364
|
+
<VanStepper
|
|
347
365
|
v-model="formData.quantity"
|
|
348
366
|
min="1"
|
|
349
367
|
step="1"
|
|
@@ -355,7 +373,7 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
355
373
|
</div>
|
|
356
374
|
|
|
357
375
|
<div class="other-charge-item-modal__buttons">
|
|
358
|
-
<
|
|
376
|
+
<VanButton
|
|
359
377
|
plain
|
|
360
378
|
type="default"
|
|
361
379
|
size="normal"
|
|
@@ -363,87 +381,87 @@ watch(() => formData.unitPrice, () => { priceError.value = false })
|
|
|
363
381
|
@click="closeModal"
|
|
364
382
|
>
|
|
365
383
|
取消
|
|
366
|
-
</
|
|
367
|
-
<
|
|
384
|
+
</VanButton>
|
|
385
|
+
<VanButton
|
|
368
386
|
type="primary"
|
|
369
387
|
size="normal"
|
|
370
388
|
native-type="submit"
|
|
371
389
|
class="other-charge-item-modal__confirm-btn"
|
|
372
390
|
>
|
|
373
391
|
添加
|
|
374
|
-
</
|
|
392
|
+
</VanButton>
|
|
375
393
|
</div>
|
|
376
394
|
</form>
|
|
377
395
|
</div>
|
|
378
396
|
|
|
379
397
|
<!-- 工单 -->
|
|
380
|
-
<
|
|
398
|
+
<VanPopup
|
|
381
399
|
v-model:show="showWorkOrderSelector"
|
|
382
400
|
position="bottom"
|
|
383
401
|
|
|
384
402
|
teleport="#other-charge-form"
|
|
385
403
|
round destroy-on-close
|
|
386
404
|
>
|
|
387
|
-
<
|
|
405
|
+
<VanPicker
|
|
388
406
|
:columns="workOrderOptions"
|
|
389
407
|
show-toolbar
|
|
390
408
|
title="选择工单"
|
|
391
409
|
@confirm="onWorkOrderSelected"
|
|
392
410
|
@cancel="showWorkOrderSelector = false"
|
|
393
411
|
/>
|
|
394
|
-
</
|
|
412
|
+
</VanPopup>
|
|
395
413
|
|
|
396
414
|
<!-- 收费类型选择器 -->
|
|
397
|
-
<
|
|
415
|
+
<VanPopup
|
|
398
416
|
v-model:show="showTypeSelector"
|
|
399
417
|
position="bottom"
|
|
400
418
|
destroy-on-close
|
|
401
419
|
teleport="#other-charge-form"
|
|
402
420
|
round
|
|
403
421
|
>
|
|
404
|
-
<
|
|
422
|
+
<VanPicker
|
|
405
423
|
:columns="typeOptions"
|
|
406
424
|
show-toolbar
|
|
407
425
|
title="选择收费类型"
|
|
408
426
|
@confirm="onTypeSelected"
|
|
409
427
|
@cancel="showTypeSelector = false"
|
|
410
428
|
/>
|
|
411
|
-
</
|
|
429
|
+
</VanPopup>
|
|
412
430
|
|
|
413
431
|
<!-- 具体项目选择器 -->
|
|
414
|
-
<
|
|
432
|
+
<VanPopup
|
|
415
433
|
v-model:show="showItemSelector"
|
|
416
434
|
destroy-on-close
|
|
417
435
|
position="bottom"
|
|
418
436
|
round
|
|
419
437
|
teleport="#other-charge-form"
|
|
420
438
|
>
|
|
421
|
-
<
|
|
439
|
+
<VanPicker
|
|
422
440
|
:columns="itemOptions"
|
|
423
441
|
show-toolbar
|
|
424
442
|
title="选择具体项目"
|
|
425
443
|
@confirm="onItemSelected"
|
|
426
444
|
@cancel="showItemSelector = false"
|
|
427
445
|
/>
|
|
428
|
-
</
|
|
446
|
+
</VanPopup>
|
|
429
447
|
|
|
430
448
|
<!-- 型号选择器 -->
|
|
431
|
-
<
|
|
449
|
+
<VanPopup
|
|
432
450
|
v-model:show="showModelSelector"
|
|
433
451
|
destroy-on-close
|
|
434
452
|
position="bottom"
|
|
435
453
|
round
|
|
436
454
|
teleport="#other-charge-form"
|
|
437
455
|
>
|
|
438
|
-
<
|
|
456
|
+
<VanPicker
|
|
439
457
|
:columns="modelOptions"
|
|
440
458
|
show-toolbar
|
|
441
459
|
title="选择型号"
|
|
442
460
|
@confirm="onModelSelected"
|
|
443
461
|
@cancel="showModelSelector = false"
|
|
444
462
|
/>
|
|
445
|
-
</
|
|
446
|
-
</
|
|
463
|
+
</VanPopup>
|
|
464
|
+
</VanPopup>
|
|
447
465
|
</template>
|
|
448
466
|
|
|
449
467
|
<style scoped lang="less">
|
package/src/router/routes.ts
CHANGED
|
@@ -10,6 +10,7 @@ import NotFound from '@af-mobile-client-vue3/views/common/NotFound.vue'
|
|
|
10
10
|
import EvaluateRecordView from '@af-mobile-client-vue3/views/component/EvaluateRecordView/index.vue'
|
|
11
11
|
import IconifyView from '@af-mobile-client-vue3/views/component/IconifyView/index.vue'
|
|
12
12
|
import ComponentView from '@af-mobile-client-vue3/views/component/index.vue'
|
|
13
|
+
import OtherChargeForm from '@af-mobile-client-vue3/views/component/OtherCharge/index.vue'
|
|
13
14
|
import UserDetailView from '@af-mobile-client-vue3/views/component/UserDetailView/index.vue'
|
|
14
15
|
import UserDetailPage from '@af-mobile-client-vue3/views/component/UserDetailView/UserDetailPage.vue'
|
|
15
16
|
import XCellDetailView from '@af-mobile-client-vue3/views/component/XCellDetailView/index.vue'
|
|
@@ -159,6 +160,11 @@ const routes: Array<RouteRecordRaw> = [
|
|
|
159
160
|
name: 'XFormView',
|
|
160
161
|
component: XFormView,
|
|
161
162
|
},
|
|
163
|
+
{
|
|
164
|
+
path: '/Component/OtherCharge',
|
|
165
|
+
name: 'OtherChargeForm',
|
|
166
|
+
component: OtherChargeForm,
|
|
167
|
+
},
|
|
162
168
|
{
|
|
163
169
|
path: '/Component/EvaluateRecordView',
|
|
164
170
|
name: 'EvaluateRecordView',
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import OtherChargeForm from '@af-mobile-client-vue3/components/data/OtherCharge/OtherChargeForm.vue'
|
|
3
|
+
import { onMounted, ref } from 'vue'
|
|
4
|
+
import { useRouter } from 'vue-router'
|
|
5
|
+
|
|
6
|
+
const router = useRouter()
|
|
7
|
+
|
|
8
|
+
const loading = ref(false)
|
|
9
|
+
|
|
10
|
+
const workOrderData = ref([])
|
|
11
|
+
|
|
12
|
+
const userinfo = {
|
|
13
|
+
f_workflow_id: '1',
|
|
14
|
+
f_userinfo_id: '1',
|
|
15
|
+
f_userinfo_code: '1',
|
|
16
|
+
f_user_name: '1',
|
|
17
|
+
f_userfiles_id: '1',
|
|
18
|
+
f_orgid: '1',
|
|
19
|
+
}
|
|
20
|
+
function backList() {
|
|
21
|
+
router.back()
|
|
22
|
+
}
|
|
23
|
+
onMounted(() => {
|
|
24
|
+
console.log('userinfo', userinfo)
|
|
25
|
+
workOrderData.value = [{ text: '1', value: '1' }, { text: '2', value: '2' }]
|
|
26
|
+
loading.value = true
|
|
27
|
+
})
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<OtherChargeForm
|
|
32
|
+
v-if="loading"
|
|
33
|
+
:user="userinfo"
|
|
34
|
+
:is-work-order="true"
|
|
35
|
+
:work-order-data="workOrderData"
|
|
36
|
+
@close-operation="backList"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<style scoped lang="less">
|
|
41
|
+
|
|
42
|
+
</style>
|