business_tms_program 0.0.0

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.
Files changed (136) hide show
  1. package/.editorconfig +12 -0
  2. package/.eslintrc-auto-import.json +113 -0
  3. package/.eslintrc.js +121 -0
  4. package/.prettierrc.js +9 -0
  5. package/.stylelintignore +4 -0
  6. package/README.md +43 -0
  7. package/components.d.ts +23 -0
  8. package/index.html +20 -0
  9. package/package.json +70 -0
  10. package/shims-uni.d.ts +10 -0
  11. package/src/App.vue +81 -0
  12. package/src/api/afterSale.ts +184 -0
  13. package/src/api/context.ts +26 -0
  14. package/src/api/device.ts +134 -0
  15. package/src/api/index.ts +80 -0
  16. package/src/api/installtion.ts +155 -0
  17. package/src/api/model/index.ts +15 -0
  18. package/src/api/model/userModel.ts +62 -0
  19. package/src/api/order.ts +49 -0
  20. package/src/api/system.ts +19 -0
  21. package/src/api/user.ts +171 -0
  22. package/src/auto-imports.d.ts +108 -0
  23. package/src/components/ConfirmDialog.vue +101 -0
  24. package/src/components/DaySelect.vue +212 -0
  25. package/src/components/Drawer.vue +104 -0
  26. package/src/components/DrawerSelect.vue +105 -0
  27. package/src/components/DropMenu.vue +144 -0
  28. package/src/components/Empty.vue +49 -0
  29. package/src/components/Loading.vue +41 -0
  30. package/src/components/RippleBtn.vue +159 -0
  31. package/src/components/SinglePick.vue +120 -0
  32. package/src/components/Skeleton.vue +43 -0
  33. package/src/components/Timeline.vue +85 -0
  34. package/src/components/Upload.vue +217 -0
  35. package/src/config/app.ts +32 -0
  36. package/src/config/env.ts +29 -0
  37. package/src/dict/afterSale.ts +161 -0
  38. package/src/dict/device.ts +29 -0
  39. package/src/dict/installtion.ts +141 -0
  40. package/src/dict/systems.ts +4 -0
  41. package/src/env.d.ts +8 -0
  42. package/src/hooks/useForm.ts +222 -0
  43. package/src/hooks/useUpload.ts +80 -0
  44. package/src/main.ts +8 -0
  45. package/src/manifest.json +39 -0
  46. package/src/pages/acceptance/DeviceInfo.vue +132 -0
  47. package/src/pages/acceptance/list.vue +276 -0
  48. package/src/pages/afterSale/DeviceInfo.vue +128 -0
  49. package/src/pages/afterSale/Step.vue +0 -0
  50. package/src/pages/afterSale/faultReport.vue +552 -0
  51. package/src/pages/afterSale/orderDetail.vue +327 -0
  52. package/src/pages/afterSale/orderFinish.vue +517 -0
  53. package/src/pages/afterSale/orderList.vue +305 -0
  54. package/src/pages/afterSale/returnVisit.vue +288 -0
  55. package/src/pages/afterSale/searchDeviceList.vue +148 -0
  56. package/src/pages/device/Search.vue +201 -0
  57. package/src/pages/device/acceptance.vue +270 -0
  58. package/src/pages/device/detail.vue +165 -0
  59. package/src/pages/device/index.vue +322 -0
  60. package/src/pages/device/info.vue +140 -0
  61. package/src/pages/device/list.vue +219 -0
  62. package/src/pages/device/materialTowerCode.vue +589 -0
  63. package/src/pages/device/searchList.vue +224 -0
  64. package/src/pages/installtion/Record.vue +145 -0
  65. package/src/pages/installtion/StatusTimeline.vue +85 -0
  66. package/src/pages/installtion/addAcceptance.vue +409 -0
  67. package/src/pages/installtion/addRecord.vue +338 -0
  68. package/src/pages/installtion/orderDetail.vue +220 -0
  69. package/src/pages/installtion/orderList.vue +100 -0
  70. package/src/pages/user/component/PersonAgree.vue +226 -0
  71. package/src/pages/user/component/PrivayAgree.vue +221 -0
  72. package/src/pages/user/component/SliderCode.vue +173 -0
  73. package/src/pages/user/forgetPassword.vue +249 -0
  74. package/src/pages/user/index.vue +139 -0
  75. package/src/pages/user/login.vue +342 -0
  76. package/src/pages/user/register.vue +348 -0
  77. package/src/pages/user/repassword.vue +329 -0
  78. package/src/pages/user/utils/mcaptcha.js +75 -0
  79. package/src/pages/user/utils/verifyCode.ts +41 -0
  80. package/src/pages/workspace/index.vue +225 -0
  81. package/src/pages.json +203 -0
  82. package/src/shime-uni.d.ts +6 -0
  83. package/src/static/icon/system/breeder_icon.png +0 -0
  84. package/src/static/icon/system/check.png +0 -0
  85. package/src/static/icon/system/factory_icon.png +0 -0
  86. package/src/static/icon/system/plus.png +0 -0
  87. package/src/static/icon/system/right.png +0 -0
  88. package/src/static/icon/system/unCheck.png +0 -0
  89. package/src/static/icon/tab/search.png +0 -0
  90. package/src/static/icon/tab/user.png +0 -0
  91. package/src/static/icon/tab/user_active.png +0 -0
  92. package/src/static/icon/tab/workspace.png +0 -0
  93. package/src/static/icon/tab/workspace_active.png +0 -0
  94. package/src/static/img/active_dot.png +0 -0
  95. package/src/static/img/afterSale_icon.png +0 -0
  96. package/src/static/img/check.png +0 -0
  97. package/src/static/img/close.png +0 -0
  98. package/src/static/img/confirm.png +0 -0
  99. package/src/static/img/empty.png +0 -0
  100. package/src/static/img/equipment_icon.png +0 -0
  101. package/src/static/img/fault_icon.png +0 -0
  102. package/src/static/img/install_icon.png +0 -0
  103. package/src/static/img/login_bg2.png +0 -0
  104. package/src/static/img/movable_right.png +0 -0
  105. package/src/static/img/navigation.png +0 -0
  106. package/src/static/img/psw_off.png +0 -0
  107. package/src/static/img/psw_on.png +0 -0
  108. package/src/static/img/scan.png +0 -0
  109. package/src/static/img/scan_icon.png +0 -0
  110. package/src/static/img/search.png +0 -0
  111. package/src/static/img/turn_right.png +0 -0
  112. package/src/static/img/unActive_dot.png +0 -0
  113. package/src/static/img/verifyBg.png +0 -0
  114. package/src/stores/index.ts +11 -0
  115. package/src/stores/modules/customer.ts +146 -0
  116. package/src/stores/modules/installtion.ts +30 -0
  117. package/src/stores/modules/system.ts +56 -0
  118. package/src/stores/modules/user.ts +133 -0
  119. package/src/stores/types.ts +16 -0
  120. package/src/stores/utils.ts +6 -0
  121. package/src/styles/index.less +63 -0
  122. package/src/types/chengyiApi.d.ts +36 -0
  123. package/src/types/index.d.ts +95 -0
  124. package/src/utils/address.ts +17 -0
  125. package/src/utils/cipher.ts +61 -0
  126. package/src/utils/form.ts +155 -0
  127. package/src/utils/httpEnum.ts +31 -0
  128. package/src/utils/image.ts +21 -0
  129. package/src/utils/index.ts +111 -0
  130. package/src/utils/request.ts +139 -0
  131. package/src/utils/requestCancelHandle.ts +67 -0
  132. package/stylelint.config.js +87 -0
  133. package/tsconfig.docs.json +11 -0
  134. package/tsconfig.json +30 -0
  135. package/typedoc.json +6 -0
  136. package/vite.config.ts +55 -0
@@ -0,0 +1,219 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { isCheckStatusEnum } from '@/dict/device'
4
+ import { queryDevicePageList } from '@/api/device'
5
+ import { throttle } from 'lodash-es';
6
+ import DropMenu from '@/components/DropMenu.vue'
7
+ import Skeleton from '@/components/Skeleton.vue';
8
+ import LoadingView from '@/components/Loading.vue';
9
+ import Empty from '@/components/Empty.vue';
10
+ defineOptions({
11
+ name: "deviceList"
12
+ });
13
+ const selectedValue = ref('customerCode')
14
+ const options = [
15
+ { value: 'customerCode', name: '客户名称' },
16
+ { value: 'deviceCode', name: '设备编号' },
17
+ ]
18
+ const state = reactive({
19
+ itemDatas: [] as any[],
20
+ current: 1,
21
+ size: 10,
22
+ loadMore: false,
23
+ hasMore: true,
24
+ screenHeight: uni.getSystemInfoSync().windowHeight,
25
+ triggerRatio: 0.3, // 设置触发比例为屏幕高度的30%
26
+ loadingTop: false, // 顶部下拉刷新
27
+ customerCode: '',
28
+ searchValue: '', // 搜索框的值
29
+ hasSearch: false, // 是否有搜索过
30
+ });
31
+ const loadData = async (page?: number) => {
32
+ if (state.loadMore) return;
33
+ state.loadMore = true;
34
+ const { records, current } = await queryDevicePageList({
35
+ size: state.size,
36
+ current: page || state.current,
37
+ [selectedValue.value]: state.searchValue, // 动态查询字段
38
+ });
39
+ state.loadMore = false;
40
+ if (!records) {
41
+ return
42
+ }
43
+ const newData = records.map((item) => {
44
+ return { ...item, show: true };
45
+ });
46
+ if (page === 1) {
47
+ state.itemDatas = newData;
48
+ } else {
49
+ state.itemDatas = [...state.itemDatas,...newData];
50
+ }
51
+ state.current = current;
52
+ state.hasMore = records.length > 0;
53
+ if (!state.hasSearch) {
54
+ state.hasSearch = true;
55
+ }
56
+ }
57
+ // 滚动到底部加载更多
58
+ const onScrollToLower = throttle(() => {
59
+ if (!state.loadMore && state.hasMore) {
60
+ state.current++;
61
+ nextTick(() => {
62
+ loadData(state.current);
63
+ })
64
+ }
65
+ }, 500);
66
+ const handleSearchInput = (e: any) => {
67
+ state.searchValue = e.detail.value;
68
+ loadData(1); // 刷新数据
69
+ }
70
+ const toDeviceDetail = (item: any) => {
71
+ uni.navigateTo({ url: `/pages/device/detail?deviceCode=${item.deviceCode}` })
72
+ }
73
+ const toSearchList = () => {
74
+ uni.navigateTo({ url: `/pages/device/searchList`})
75
+ }
76
+ onMounted(async () => {
77
+ loadData(1);
78
+ uni.$on('deviceList-updated', () => {
79
+ loadData(1); // 刷新数据
80
+ });
81
+ })
82
+ </script>
83
+
84
+ <template>
85
+ <view class="content">
86
+ <view class="header">
87
+ <DropMenu v-model="selectedValue" :options="options" />
88
+ <view class="input-wrapper">
89
+ <view class="search-input" @click="toSearchList">搜索</view>
90
+ <image class="uni-icon" src="/static/img/search.png">
91
+ </image>
92
+ </view>
93
+ </view>
94
+ <view class="skeleton-box" v-if="!state.hasSearch">
95
+ <Skeleton class="skeleton-container"></Skeleton>
96
+ <Skeleton class="skeleton-container"></Skeleton>
97
+ <Skeleton class="skeleton-container"></Skeleton>
98
+ <Skeleton class="skeleton-container"></Skeleton>
99
+ <Skeleton class="skeleton-container"></Skeleton>
100
+ </view>
101
+ <scroll-view
102
+ v-else
103
+ class="scroll-view"
104
+ scroll-y
105
+ style="height: 100vh;"
106
+ bounces
107
+ show-scrollbar
108
+ scroll-with-animation
109
+ @scrolltolower="onScrollToLower"
110
+ :lower-threshold="`${state.screenHeight * state.triggerRatio}`"
111
+ >
112
+ <view class="scroll-box">
113
+ <view class="record-box"
114
+ v-for="item in state.itemDatas"
115
+ :key="item.deviceCode"
116
+ @click="toDeviceDetail(item)"
117
+ >
118
+ <view class="img"></view>
119
+ <view class="info">
120
+ <view class="inlineBox">
121
+ <view class="code">{{item.deviceCode}}</view>
122
+ <view class="status"
123
+ :class="{'unCheck': item.isCheckStatus === isCheckStatusEnum.NO}">
124
+ {{item.isCheckStatus === isCheckStatusEnum.YES ? '已验收' : '未验收'}}
125
+ </view>
126
+ </view>
127
+ <view class="contact">客户:{{item.customerName}}</view>
128
+ </view>
129
+ </view>
130
+ <Empty v-if="state.itemDatas.length === 0 && state.hasSearch" />
131
+ <LoadingView v-if="state.loadMore" class="loading-indicator" :size="50"></LoadingView>
132
+ <view v-if="state.itemDatas.length > 0 && !state.hasMore" class="noMore">没有更多数据了</view>
133
+ </view>
134
+ </scroll-view>
135
+ </view>
136
+ </template>
137
+ <style scoped lang="less">
138
+ .content {
139
+ background-color: #F5F5F5;
140
+ min-height: 100vh;
141
+ }
142
+ .header {
143
+ padding: 8rpx 12rpx;
144
+ background-color: #fff;
145
+ display: flex;
146
+ align-items: center;
147
+ position: relative;
148
+ .input-wrapper{
149
+ flex: 1;
150
+ margin-left: 4rpx;
151
+ padding: 0 24rpx;
152
+ background: rgba(0,0,0,0.04);
153
+ border-radius: 8rpx;
154
+ display: flex;
155
+ align-items: center;
156
+ }
157
+ .search-input {
158
+ flex: 1;
159
+ margin-right: 12rpx;
160
+ font-size: 24rpx;
161
+ padding: 12rpx 0 12rpx 0;
162
+ text-align: right;
163
+ color: rgba(0,0,0,0.4);
164
+ }
165
+ .uni-icon {
166
+ width: 36rpx;
167
+ height: 36rpx;
168
+ }
169
+ }
170
+ .scroll-box {
171
+ padding: 16rpx 32rpx;
172
+ box-sizing: border-box;
173
+ }
174
+ .record-box{
175
+ display: flex;
176
+ margin-bottom: 16rpx;
177
+ padding: 36rpx;
178
+ background: #FFFFFF;
179
+ border-radius: 16rpx;
180
+ .img{
181
+ margin-right: 16rpx;
182
+ width: 96rpx;
183
+ height: 96rpx;
184
+ background: #E8E8E8;
185
+ border-radius: 8rpx;
186
+ }
187
+ .inlineBox{
188
+ display: flex;
189
+ margin-bottom: 6rpx;
190
+ .code{
191
+ margin-right: 16rpx;
192
+ font-weight: bold;
193
+ font-size: 32rpx;
194
+ color: #000000;
195
+ line-height: 38rpx;
196
+ }
197
+ .status{
198
+ padding: 6rpx 16rpx 8rpx 16rpx;
199
+ font-weight: 400;
200
+ font-size: 24rpx;
201
+ color: #1D6FE9;
202
+ line-height: 34rpx;
203
+ border-radius: 24rpx;
204
+ background: rgba(29,111,233,0.1);
205
+ border: 1rpx solid #1D6FE9;
206
+ }
207
+ .unCheck {
208
+ color: #F5894E;
209
+ border: 1rpx solid #F5894E;
210
+ background: rgba(245,137,78,0.1);
211
+ }
212
+ }
213
+ .contact{
214
+ font-size: 28rpx;
215
+ color: rgba(0,0,0, 0.6);
216
+ line-height: 40rpx;
217
+ }
218
+ }
219
+ </style>