1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
| <template>
| <cl-select-table v-model="value" :title="t('选择订单管理')" :service="service.shop.recycleorder" :columns="columns"
| :multiple="multiple" :dict='{ "text": "username" }' pickerType="text" />
| </template>
|
| <script setup lang="ts">
| defineOptions({
| name: "recycle-order-select"
| });
|
| import { useCool } from "/@/cool";
| import { useI18n } from "vue-i18n";
| import { CrudProps } from "/#/crud";
| import { reactive, ref, useModel } from "vue";
|
| const props = defineProps({
| ...CrudProps,
| modelValue: null,
| multiple: Boolean
| });
|
| const { service } = useCool();
| const { t } = useI18n();
|
| const value = useModel(props, "modelValue");
|
| // 选项
| const options = reactive({
| orderType: [
| { label: t("上门回收"), value: 0 },
| { label: t("站点回收"), value: 1 },
| { label: t("投递回收"), value: 2 }
| ],
| status: [
| { label: t("待处理"), value: 0 },
| { label: t("进行中"), value: 1 },
| { label: t("已完成"), value: 2 },
| { label: t("已取消"), value: 3 }
| ]
| });
|
| const columns = ref([
| { label: t("手机号"), prop: "userPhone", minWidth: 140 },
| { label: t("昵称"), prop: "userName", minWidth: 140 },
| { label: t("订单编号"), prop: "orderNo", minWidth: 140 },
| { label: t("校园用户ID"), prop: "campusUserId", minWidth: 120 },
| {
| label: t("订单类型"),
| prop: "orderType",
| minWidth: 120,
| dict: options.orderType
| },
| { label: t("站点ID"), prop: "siteId", minWidth: 120 },
| { label: t("分拣员ID"), prop: "sorterId", minWidth: 120 },
| { label: t("状态"), prop: "status", minWidth: 120, dict: options.status },
| { label: t("总重量"), prop: "totalWeight", minWidth: 140, sortable: "custom" },
| { label: t("总碳积分"), prop: "totalCarbonPoint", minWidth: 140, sortable: "custom" },
| {
| label: t("完成时间"),
| prop: "finishTime",
| minWidth: 170,
| sortable: "custom",
| component: { name: "cl-date-text" }
| }
| ]);
| </script>
|
|