|
@@ -31,41 +31,60 @@
|
31
|
31
|
</uni-forms-item>
|
32
|
32
|
|
33
|
33
|
<!-- 设备选择 -->
|
34
|
|
- <uni-forms-item label="选择设备" required class="form-item" name="devices">
|
|
34
|
+ <uni-forms-item label="申请设备" required class="form-item" name="devices"
|
|
35
|
+ v-if="taskName != '安排设备' && taskName != '归还确认'">
|
35
|
36
|
<uv-button type="primary" @click="openDevice = true" v-if="taskName == '设备申请'">+ 选择设备</uv-button>
|
36
|
|
- <device-picker :visible.sync="openDevice" :selected.sync="selectDevice"
|
|
37
|
+ <device-picker :visible.sync="openDevice" :selected.sync="selectDevice" :multiple="!isReplaceMode"
|
37
|
38
|
@confirm="handleDeviceConfirm"></device-picker>
|
38
|
|
- <uni-table v-if="deviceList.length > 0">
|
39
|
|
- <uni-tr>
|
40
|
|
- <uni-th>序号</uni-th>
|
41
|
|
- <uni-th>出厂编号</uni-th>
|
42
|
|
- <uni-th>设备品牌</uni-th>
|
43
|
|
- <uni-th>设备名称</uni-th>
|
44
|
|
- <uni-th>规格型号</uni-th>
|
45
|
|
- <uni-th>存放地址</uni-th>
|
46
|
|
- </uni-tr>
|
47
|
|
- <uni-tr v-for="(item, index) in deviceList" :key="index">
|
48
|
|
- <uni-td>{{ index + 1 }}</uni-td>
|
49
|
|
- <uni-td>{{ item.code }}</uni-td>
|
50
|
|
- <uni-td>{{ item.brand }}</uni-td>
|
51
|
|
- <uni-td>{{ item.name }}</uni-td>
|
52
|
|
- <uni-td>{{ item.series }}</uni-td>
|
53
|
|
- <uni-td>{{ item.place }}</uni-td>
|
54
|
|
- </uni-tr>
|
55
|
|
- </uni-table>
|
|
39
|
+ <view class="device-cards" v-if="deviceList.length > 0">
|
|
40
|
+ <view class="device-card" v-for="(item, index) in deviceList" :key="index">
|
|
41
|
+ <view class="card-header">
|
|
42
|
+ <text class="card-title">{{ index + 1 }}. 出厂编号:{{ item.code }}</text>
|
|
43
|
+ </view>
|
|
44
|
+ <view class="card-content">
|
|
45
|
+ <view class="card-row">
|
|
46
|
+ <view class="card-item">
|
|
47
|
+ <text class="label">设备名称:</text>
|
|
48
|
+ <text class="value">{{ item.name }}</text>
|
|
49
|
+ </view>
|
|
50
|
+ </view>
|
|
51
|
+ <view class="card-row">
|
|
52
|
+ <view class="card-item">
|
|
53
|
+ <text class="label">设备品牌:</text>
|
|
54
|
+ <text class="value">{{ item.brand }}</text>
|
|
55
|
+ </view>
|
|
56
|
+ <view class="card-item">
|
|
57
|
+ <text class="label">存放地址:</text>
|
|
58
|
+ <text class="value">{{ item.place }}</text>
|
|
59
|
+ </view>
|
|
60
|
+ </view>
|
|
61
|
+ <view class="card-row">
|
|
62
|
+ <view class="card-item">
|
|
63
|
+ <text class="label">规格型号:</text>
|
|
64
|
+ <text class="value">{{ item.series }}</text>
|
|
65
|
+ </view>
|
|
66
|
+ </view>
|
|
67
|
+ </view>
|
|
68
|
+ </view>
|
|
69
|
+ </view>
|
56
|
70
|
</uni-forms-item>
|
57
|
71
|
|
58
|
72
|
<!-- 申领事由 -->
|
59
|
73
|
<uni-forms-item label="申领事由" required class="form-item" name="applyReason">
|
60
|
|
- <uni-easyinput type="textarea" v-model="form.applyReason" placeholder="请输入申领事由"
|
61
|
|
- :disabled="taskName != '设备申请'" />
|
|
74
|
+ <uv-textarea v-model="form.applyReason" placeholder="请输入申领事由" :disabled="taskName != '设备申请'"></uv-textarea>
|
62
|
75
|
</uni-forms-item>
|
63
|
76
|
|
64
|
77
|
<!-- 日期选择 -->
|
65
|
78
|
<view class="date-range">
|
66
|
79
|
<uni-forms-item label="使用日期" required class="form-item" name="dateRange">
|
67
|
|
- <uni-datetime-picker v-model="dateRange" type="daterange" rangeSeparator="至" :clearIcon="false"
|
68
|
|
- :disabled="taskName != '设备申请'" @change="handleDateRangeChange" />
|
|
80
|
+ <uni-datetime-picker v-model="form.dateRange" type="daterange" rangeSeparator="至" :clearIcon="false"
|
|
81
|
+ v-if="taskName == '设备申请'" @change="handleDateRangeChange" />
|
|
82
|
+ <view class="date-display" v-else>
|
|
83
|
+ <uni-icons type="calendar" size="16"></uni-icons>
|
|
84
|
+ <text class="date-text">{{ form.beginDate }}</text>
|
|
85
|
+ <text class="date-separator">至</text>
|
|
86
|
+ <text class="date-text">{{ form.endDate }}</text>
|
|
87
|
+ </view>
|
69
|
88
|
</uni-forms-item>
|
70
|
89
|
<uni-forms-item label="共计" class="form-item">
|
71
|
90
|
<text>{{ form.days + '天' }}</text>
|
|
@@ -73,88 +92,159 @@
|
73
|
92
|
</view>
|
74
|
93
|
|
75
|
94
|
<!-- 安排设备意见 -->
|
76
|
|
- <uni-forms-item label="拟发放设备" class="form-item" v-if="taskName == '安排设备'">
|
77
|
|
- <uni-table v-if="modifyDeviceList.length > 0">
|
78
|
|
- <uni-tr>
|
79
|
|
- <uni-th>序号</uni-th>
|
80
|
|
- <uni-th>出厂编号</uni-th>
|
81
|
|
- <uni-th>设备品牌</uni-th>
|
82
|
|
- <uni-th>设备名称</uni-th>
|
83
|
|
- <uni-th>规格型号</uni-th>
|
84
|
|
- <uni-th>存放地址</uni-th>
|
85
|
|
- <uni-th>操作</uni-th>
|
86
|
|
- </uni-tr>
|
87
|
|
- <uni-tr v-for="(item, index) in modifyDeviceList" :key="index">
|
88
|
|
- <uni-td>{{ index + 1 }}</uni-td>
|
89
|
|
- <uni-td>{{ item.code }}</uni-td>
|
90
|
|
- <uni-td>{{ item.brand }}</uni-td>
|
91
|
|
- <uni-td>{{ item.name }}</uni-td>
|
92
|
|
- <uni-td>{{ item.series }}</uni-td>
|
93
|
|
- <uni-td>{{ item.place }}</uni-td>
|
94
|
|
- <uni-td>
|
|
95
|
+ <uni-forms-item label="拟发放设备" required class="form-item" v-if="taskName != '设备申请' && taskName != '归还确认'">
|
|
96
|
+ <view class="device-cards" v-if="modifyDeviceList.length > 0">
|
|
97
|
+ <view class="device-card" v-for="(item, index) in modifyDeviceList" :key="index">
|
|
98
|
+ <view class="card-header">
|
|
99
|
+ <text class="card-title">{{ index + 1 }}. 出厂编号:{{ item.code }}</text>
|
|
100
|
+ </view>
|
|
101
|
+ <view class="card-content">
|
|
102
|
+ <view class="card-row">
|
|
103
|
+ <view class="card-item">
|
|
104
|
+ <text class="label">设备名称:</text>
|
|
105
|
+ <text class="value">{{ item.name }}</text>
|
|
106
|
+ </view>
|
|
107
|
+ </view>
|
|
108
|
+ <view class="card-row">
|
|
109
|
+ <view class="card-item">
|
|
110
|
+ <text class="label">设备品牌:</text>
|
|
111
|
+ <text class="value">{{ item.brand }}</text>
|
|
112
|
+ </view>
|
|
113
|
+ <view class="card-item">
|
|
114
|
+ <text class="label">存放地址:</text>
|
|
115
|
+ <text class="value">{{ item.place }}</text>
|
|
116
|
+ </view>
|
|
117
|
+ </view>
|
|
118
|
+ <view class="card-row">
|
|
119
|
+ <view class="card-item">
|
|
120
|
+ <text class="label">规格型号:</text>
|
|
121
|
+ <text class="value">{{ item.series }}</text>
|
|
122
|
+ </view>
|
|
123
|
+ </view>
|
|
124
|
+ </view>
|
|
125
|
+ <view class="card-actions" v-if="taskName == '安排设备'">
|
95
|
126
|
<uv-button type="primary" size="mini" @click="replaceRowData(item, index)">重新选择</uv-button>
|
96
|
127
|
<uv-button type="error" size="mini" @click="deleteRowData(item, index)">删除</uv-button>
|
97
|
|
- </uni-td>
|
98
|
|
- </uni-tr>
|
99
|
|
- </uni-table>
|
|
128
|
+ </view>
|
|
129
|
+ </view>
|
|
130
|
+ </view>
|
100
|
131
|
<uv-button type="primary" @click="addRowdata()" v-if="taskName == '安排设备'">新增设备</uv-button>
|
101
|
132
|
</uni-forms-item>
|
102
|
133
|
|
103
|
134
|
<!-- 安排设备意见 -->
|
104
|
|
- <uni-forms-item label="安排设备意见" class="form-item" v-if="taskName == '安排设备'">
|
105
|
|
- <uni-easyinput type="textarea" v-model="form.dispatchComment" placeholder="请输入安排设备意见"
|
106
|
|
- :disabled="taskName != '安排设备'" />
|
|
135
|
+ <uni-forms-item label="安排设备意见" required class="form-item" name="dispatchComment" v-if="taskName != '设备申请'">
|
|
136
|
+ <uv-textarea v-model="form.dispatchComment" placeholder="请输入安排设备意见"
|
|
137
|
+ :disabled="taskName != '安排设备'"></uv-textarea>
|
|
138
|
+ <auditor :name="form.dispatcher ? form.dispatchUser.nickName : ''" :time="form.dispatchTime"></auditor>
|
107
|
139
|
</uni-forms-item>
|
108
|
140
|
|
109
|
141
|
<!-- 分管审核意见 -->
|
110
|
|
- <uni-forms-item label="分管审核意见" class="form-item" v-if="taskName == '分管审核'">
|
111
|
|
- <uni-easyinput type="textarea" v-model="form.managerComment" placeholder="请输入分管审核意见"
|
112
|
|
- :disabled="taskName != '分管审核'" />
|
|
142
|
+ <uni-forms-item label="分管审核意见" required name="managerComment" class="form-item"
|
|
143
|
+ v-if="taskName != '设备申请' && taskName != '安排设备'">
|
|
144
|
+ <uv-textarea v-model="form.managerComment" placeholder="请输入分管审核意见" :disabled="taskName != '分管审核'"></uv-textarea>
|
|
145
|
+ <auditor :name="form.managerUser ? form.managerUser.nickName : ''" :time="form.managerTime"></auditor>
|
113
|
146
|
</uni-forms-item>
|
114
|
147
|
|
115
|
148
|
<!-- 归还确认 -->
|
116
|
|
- <uni-forms-item label="已归还设备" class="form-item" v-if="taskName == '归还确认'">
|
117
|
|
- <uni-table v-if="returnDevicesList.length > 0">
|
118
|
|
- <uni-tr>
|
119
|
|
- <uni-th>序号</uni-th>
|
120
|
|
- <uni-th>出厂编号</uni-th>
|
121
|
|
- <uni-th>设备品牌</uni-th>
|
122
|
|
- <uni-th>设备名称</uni-th>
|
123
|
|
- <uni-th>规格型号</uni-th>
|
124
|
|
- <uni-th>存放地址</uni-th>
|
125
|
|
- </uni-tr>
|
126
|
|
- <uni-tr v-for="(item, index) in returnDevicesList" :key="index">
|
127
|
|
- <uni-td>{{ index + 1 }}</uni-td>
|
128
|
|
- <uni-td>{{ item.code }}</uni-td>
|
129
|
|
- <uni-td>{{ item.brand }}</uni-td>
|
130
|
|
- <uni-td>{{ item.name }}</uni-td>
|
131
|
|
- <uni-td>{{ item.series }}</uni-td>
|
132
|
|
- <uni-td>{{ item.place }}</uni-td>
|
133
|
|
- </uni-tr>
|
134
|
|
- </uni-table>
|
|
149
|
+ <uni-forms-item label="已归还设备" required class="form-item" v-if="taskName == '' || taskName == '归还确认'">
|
|
150
|
+ <text style="color: #a69494;" v-if="taskName == '归还确认'">Tips:请点击卡片,切换归还状态</text>
|
|
151
|
+ <view class="device-cards" v-if="returnDevicesList.length > 0">
|
|
152
|
+ <view class="device-card" v-for="(item, index) in returnDevicesList" :key="index"
|
|
153
|
+ :class="{ 'selected': isDeviceSelected(item.deviceId) }" @click="toggleDeviceSelection(item)">
|
|
154
|
+ <view class="card-header">
|
|
155
|
+ <text class="card-title">{{ index + 1 }}. 出厂编号:{{ item.code }}</text>
|
|
156
|
+ <view class="return-tag" v-if="isDeviceSelected(item.deviceId)">
|
|
157
|
+ <uni-tag type="success" text="已归还" size="small"></uni-tag>
|
|
158
|
+ </view>
|
|
159
|
+ </view>
|
|
160
|
+ <view class="card-content">
|
|
161
|
+ <view class="card-row">
|
|
162
|
+ <view class="card-item">
|
|
163
|
+ <text class="label">设备名称:</text>
|
|
164
|
+ <text class="value">{{ item.name }}</text>
|
|
165
|
+ </view>
|
|
166
|
+ </view>
|
|
167
|
+ <view class="card-row">
|
|
168
|
+ <view class="card-item">
|
|
169
|
+ <text class="label">设备品牌:</text>
|
|
170
|
+ <text class="value">{{ item.brand }}</text>
|
|
171
|
+ </view>
|
|
172
|
+ <view class="card-item">
|
|
173
|
+ <text class="label">存放地址:</text>
|
|
174
|
+ <text class="value">{{ item.place }}</text>
|
|
175
|
+ </view>
|
|
176
|
+ </view>
|
|
177
|
+ <view class="card-row">
|
|
178
|
+ <view class="card-item">
|
|
179
|
+ <text class="label">规格型号:</text>
|
|
180
|
+ <text class="value">{{ item.series }}</text>
|
|
181
|
+ </view>
|
|
182
|
+ </view>
|
|
183
|
+ </view>
|
|
184
|
+ </view>
|
|
185
|
+ </view>
|
135
|
186
|
</uni-forms-item>
|
136
|
187
|
|
137
|
188
|
<!-- 需维修设备 -->
|
138
|
|
- <uni-forms-item label="需维修设备" class="form-item" v-if="taskName == '归还确认'">
|
139
|
|
- <uni-data-select v-model="form.repairDevices" :localdata="modifyDeviceList" multiple
|
140
|
|
- :disabled="taskName != '归还确认'" />
|
|
189
|
+ <uni-forms-item label="需维修设备" class="form-item" v-if="taskName == '' || taskName == '归还确认'">
|
|
190
|
+ <uv-button type="primary" @click="openRepairDevice = true" v-if="taskName == '归还确认'">+ 选择需维修设备</uv-button>
|
|
191
|
+ <repair-device-picker :visible.sync="openRepairDevice" :deviceList="modifyDeviceList"
|
|
192
|
+ :selectedDevices.sync="form.repairDevices"></repair-device-picker>
|
|
193
|
+ <view class="device-cards" v-if="repairDevicesList.length > 0">
|
|
194
|
+ <view class="device-card repair-card" v-for="(item, index) in repairDevicesList" :key="index">
|
|
195
|
+ <view class="card-header">
|
|
196
|
+ <text class="card-title">{{ index + 1 }}. 出厂编号:{{ item.code }}</text>
|
|
197
|
+ <view class="repair-tag">
|
|
198
|
+ <uni-tag type="error" text="需维修" size="small"></uni-tag>
|
|
199
|
+ </view>
|
|
200
|
+ </view>
|
|
201
|
+ <view class="card-content">
|
|
202
|
+ <view class="card-row">
|
|
203
|
+ <view class="card-item">
|
|
204
|
+ <text class="label">设备名称:</text>
|
|
205
|
+ <text class="value">{{ item.name }}</text>
|
|
206
|
+ </view>
|
|
207
|
+ </view>
|
|
208
|
+ <view class="card-row">
|
|
209
|
+ <view class="card-item">
|
|
210
|
+ <text class="label">设备品牌:</text>
|
|
211
|
+ <text class="value">{{ item.brand }}</text>
|
|
212
|
+ </view>
|
|
213
|
+ <view class="card-item">
|
|
214
|
+ <text class="label">存放地址:</text>
|
|
215
|
+ <text class="value">{{ item.place }}</text>
|
|
216
|
+ </view>
|
|
217
|
+ </view>
|
|
218
|
+ <view class="card-row">
|
|
219
|
+ <view class="card-item">
|
|
220
|
+ <text class="label">规格型号:</text>
|
|
221
|
+ <text class="value">{{ item.series }}</text>
|
|
222
|
+ </view>
|
|
223
|
+ </view>
|
|
224
|
+ </view>
|
|
225
|
+ </view>
|
|
226
|
+ </view>
|
|
227
|
+ <view v-else>
|
|
228
|
+ <uni-tag type="success" text="没有需维修的设备" size="small"></uni-tag>
|
|
229
|
+ </view>
|
141
|
230
|
</uni-forms-item>
|
142
|
231
|
|
143
|
232
|
<!-- 备注 -->
|
144
|
|
- <uni-forms-item label="备注" class="form-item" v-if="taskName == '归还确认'">
|
145
|
|
- <uni-easyinput type="textarea" v-model="form.remark" placeholder="请输入备注" :disabled="taskName != '归还确认'" />
|
|
233
|
+ <uni-forms-item label="备注" class="form-item" v-if="taskName == '' || taskName == '归还确认'">
|
|
234
|
+ <uv-textarea v-model="form.remark" placeholder="请输入备注" :disabled="taskName != '归还确认'"></uv-textarea>
|
146
|
235
|
</uni-forms-item>
|
147
|
236
|
|
148
|
237
|
<!-- 归还日期 -->
|
149
|
|
- <uni-forms-item label="归还日期" class="form-item" v-if="taskName == '归还确认'">
|
|
238
|
+ <uni-forms-item label="归还日期" required name="returnDate" class="form-item"
|
|
239
|
+ v-if="taskName == '' || taskName == '归还确认'">
|
150
|
240
|
<uni-datetime-picker v-model="form.returnDate" type="date" :disabled="taskName != '归还确认'" />
|
151
|
241
|
</uni-forms-item>
|
152
|
242
|
|
153
|
243
|
<!-- 操作按钮 -->
|
154
|
|
- <view class="form-actions">
|
155
|
|
- <uv-button style="margin-bottom: 5px;" type="warning" @click="saves">保存</uv-button>
|
|
244
|
+ <view class="form-actions" v-if="taskName">
|
156
|
245
|
<uv-button type="primary" @click="submit" v-if="taskName == '设备申请'">提交申请</uv-button>
|
157
|
246
|
<template v-else>
|
|
247
|
+ <uv-button style="margin-bottom: 5px;" type="warning" @click="saves">保存</uv-button>
|
158
|
248
|
<uv-button type="primary" @click="completeApply">完成审批</uv-button>
|
159
|
249
|
</template>
|
160
|
250
|
</view>
|
|
@@ -164,18 +254,27 @@
|
164
|
254
|
|
165
|
255
|
<script>
|
166
|
256
|
import { parseTime } from "@/utils/common.js"
|
167
|
|
-import { listDeviceApproval, getDeviceApproval, updateDeviceApproval, submitDeviceApproval, modifyDeviceApproval } from '@/api/oa/device/deviceApproval'
|
|
257
|
+import { getDeviceApproval, submitDeviceApproval, modifyDeviceApproval } from '@/api/oa/device/deviceApproval'
|
|
258
|
+import { complete, getNextFlowNode } from "@/api/flowable/todo";
|
|
259
|
+import { getProject } from "@/api/oa/project/project";
|
|
260
|
+import { getDevice } from "@/api/oa/device/device";
|
|
261
|
+import { getUserByRole } from "@/api/system/role";
|
|
262
|
+import { getUsersManageLeader } from '@/api/system/post.js'
|
168
|
263
|
import FlowNote from '@/pages/components/flowNote.vue';
|
169
|
264
|
import ProjectPicker from '@/pages/components/ProjectPicker.vue';
|
170
|
265
|
import ProjectInfo from '@/pages/components/ProjectInfo.vue';
|
171
|
266
|
import DevicePicker from "@/pages/components/DevicePicker.vue";
|
|
267
|
+import Auditor from "@/pages/components/auditor.vue";
|
|
268
|
+import RepairDevicePicker from "@/pages/components/RepairDevicePicker.vue";
|
172
|
269
|
|
173
|
270
|
export default {
|
174
|
271
|
components: {
|
175
|
272
|
FlowNote,
|
176
|
273
|
ProjectPicker,
|
177
|
274
|
ProjectInfo,
|
178
|
|
- DevicePicker
|
|
275
|
+ DevicePicker,
|
|
276
|
+ Auditor,
|
|
277
|
+ RepairDevicePicker
|
179
|
278
|
},
|
180
|
279
|
props: {
|
181
|
280
|
taskForm: Object,
|
|
@@ -200,15 +299,17 @@ export default {
|
200
|
299
|
applyReason: '',
|
201
|
300
|
beginDate: '',
|
202
|
301
|
endDate: '',
|
|
302
|
+ dateRange: [],
|
203
|
303
|
days: 0,
|
204
|
304
|
dispatchComment: '',
|
205
|
305
|
managerComment: '',
|
206
|
306
|
devices: [],
|
|
307
|
+ modifyDevices: [],
|
|
308
|
+ returnDevices: [],
|
207
|
309
|
repairDevices: [],
|
208
|
310
|
remark: '',
|
209
|
311
|
returnDate: ''
|
210
|
312
|
},
|
211
|
|
- dateRange: [],
|
212
|
313
|
rules: {
|
213
|
314
|
projectId: {
|
214
|
315
|
rules: [{ required: true, errorMessage: '请选择项目' }]
|
|
@@ -220,7 +321,56 @@ export default {
|
220
|
321
|
rules: [{ required: true, errorMessage: '请输入申领事由' }]
|
221
|
322
|
},
|
222
|
323
|
dateRange: {
|
223
|
|
- rules: [{ required: true, errorMessage: '请选择使用日期' }]
|
|
324
|
+ rules: [{
|
|
325
|
+ required: this.taskName === '设备申请',
|
|
326
|
+ errorMessage: '请选择使用日期',
|
|
327
|
+ validateFunction: (rule, value, data, callback) => {
|
|
328
|
+ if (!value || value.length !== 2 || !value[0] || !value[1]) {
|
|
329
|
+ callback('请选择使用日期');
|
|
330
|
+ } else {
|
|
331
|
+ callback();
|
|
332
|
+ }
|
|
333
|
+ }
|
|
334
|
+ }]
|
|
335
|
+ },
|
|
336
|
+ dispatchComment: {
|
|
337
|
+ rules: [{
|
|
338
|
+ required: true,
|
|
339
|
+ errorMessage: '请输入安排设备意见',
|
|
340
|
+ validateFunction: (rule, value, data, callback) => {
|
|
341
|
+ if (this.taskName === '安排设备' && !value) {
|
|
342
|
+ callback('请输入安排设备意见');
|
|
343
|
+ } else {
|
|
344
|
+ callback();
|
|
345
|
+ }
|
|
346
|
+ }
|
|
347
|
+ }]
|
|
348
|
+ },
|
|
349
|
+ managerComment: {
|
|
350
|
+ rules: [{
|
|
351
|
+ required: true,
|
|
352
|
+ errorMessage: '请输入分管审核意见',
|
|
353
|
+ validateFunction: (rule, value, data, callback) => {
|
|
354
|
+ if (this.taskName === '分管审核' && !value) {
|
|
355
|
+ callback('请输入分管审核意见');
|
|
356
|
+ } else {
|
|
357
|
+ callback();
|
|
358
|
+ }
|
|
359
|
+ }
|
|
360
|
+ }]
|
|
361
|
+ },
|
|
362
|
+ returnDate: {
|
|
363
|
+ rules: [{
|
|
364
|
+ required: true,
|
|
365
|
+ errorMessage: '请选择归还日期',
|
|
366
|
+ validateFunction: (rule, value, data, callback) => {
|
|
367
|
+ if (this.taskName === '归还确认' && !value) {
|
|
368
|
+ callback('请选择归还日期');
|
|
369
|
+ } else {
|
|
370
|
+ callback();
|
|
371
|
+ }
|
|
372
|
+ }
|
|
373
|
+ }]
|
224
|
374
|
}
|
225
|
375
|
},
|
226
|
376
|
applierUserName: '',
|
|
@@ -232,20 +382,119 @@ export default {
|
232
|
382
|
deviceList: [],
|
233
|
383
|
modifyDeviceList: [],
|
234
|
384
|
returnDevicesList: [],
|
235
|
|
- formTotal: 0
|
|
385
|
+ formTotal: 0,
|
|
386
|
+ currentIndex: -1,
|
|
387
|
+ isReplaceMode: false,
|
|
388
|
+ openRepairDevice: false,
|
|
389
|
+ repairDevicesList: []
|
236
|
390
|
};
|
237
|
391
|
},
|
|
392
|
+ watch: {
|
|
393
|
+ 'form.repairDevices': {
|
|
394
|
+ handler(newVal) {
|
|
395
|
+ this.updateRepairDevicesList();
|
|
396
|
+ },
|
|
397
|
+ immediate: true
|
|
398
|
+ }
|
|
399
|
+ },
|
238
|
400
|
methods: {
|
239
|
|
- initForm() {
|
240
|
|
- getDeviceApproval(this.taskForm.formId).then(res => {
|
|
401
|
+ async initForm() {
|
|
402
|
+ try {
|
|
403
|
+ const res = await getDeviceApproval(this.taskForm.formId);
|
241
|
404
|
if (res.data) {
|
242
|
405
|
this.formTotal = 1;
|
243
|
406
|
this.form = res.data;
|
244
|
|
- this.deviceList = res.data.devices || [];
|
245
|
|
- this.modifyDeviceList = res.data.modifyDevices || [];
|
246
|
|
- this.returnDevicesList = res.data.returnDevices || [];
|
|
407
|
+ this.applierUserName = res.data.applierUser.nickName;
|
|
408
|
+ const project = await getProject(res.data.projectId);
|
|
409
|
+ this.projectObj = project.data;
|
|
410
|
+ // 初始化申请设备
|
|
411
|
+ if (res.data.devices) {
|
|
412
|
+ const deviceIds = res.data.devices.split(',').map(id => parseInt(id));
|
|
413
|
+ this.form.devices = res.data.devices.split(',');
|
|
414
|
+ this.deviceList = [];
|
|
415
|
+ this.selectDevice = [];
|
|
416
|
+
|
|
417
|
+ for (const id of deviceIds) {
|
|
418
|
+ const response = await getDevice(id);
|
|
419
|
+ if (response.data) {
|
|
420
|
+ this.deviceList.push(response.data);
|
|
421
|
+ this.selectDevice.push(response.data);
|
|
422
|
+ }
|
|
423
|
+ }
|
|
424
|
+ } else {
|
|
425
|
+ this.deviceList = [];
|
|
426
|
+ }
|
|
427
|
+
|
|
428
|
+ // 初始化拟发放设备列表
|
|
429
|
+ if (res.data.modifyDevices) {
|
|
430
|
+ const modifyDeviceIds = typeof res.data.modifyDevices === 'string'
|
|
431
|
+ ? res.data.modifyDevices.split(',').map(id => parseInt(id))
|
|
432
|
+ : Array.isArray(res.data.modifyDevices)
|
|
433
|
+ ? res.data.modifyDevices.map(id => parseInt(id))
|
|
434
|
+ : [];
|
|
435
|
+ this.form.modifyDevices = res.data.modifyDevices.split(',');
|
|
436
|
+ this.modifyDeviceList = [];
|
|
437
|
+
|
|
438
|
+ for (const id of modifyDeviceIds) {
|
|
439
|
+ const response = await getDevice(id);
|
|
440
|
+ if (response.data) {
|
|
441
|
+ this.modifyDeviceList.push(response.data);
|
|
442
|
+ }
|
|
443
|
+ }
|
|
444
|
+ } else if (this.taskName === '安排设备') {
|
|
445
|
+ this.modifyDeviceList = [...this.deviceList];
|
|
446
|
+ } else {
|
|
447
|
+ this.modifyDeviceList = [];
|
|
448
|
+ }
|
|
449
|
+
|
|
450
|
+ // 初始化归还设备列表
|
|
451
|
+ if (res.data.returnDevices) {
|
|
452
|
+ const returnDeviceIds = typeof res.data.returnDevices === 'string'
|
|
453
|
+ ? res.data.returnDevices.split(',').map(id => parseInt(id))
|
|
454
|
+ : Array.isArray(res.data.returnDevices)
|
|
455
|
+ ? res.data.returnDevices.map(id => parseInt(id))
|
|
456
|
+ : [];
|
|
457
|
+ this.form.returnDevices = returnDeviceIds;
|
|
458
|
+
|
|
459
|
+ // 获取所有拟发放的设备
|
|
460
|
+ const modifyDeviceIds = typeof res.data.modifyDevices === 'string'
|
|
461
|
+ ? res.data.modifyDevices.split(',').map(id => parseInt(id))
|
|
462
|
+ : Array.isArray(res.data.modifyDevices)
|
|
463
|
+ ? res.data.modifyDevices.map(id => parseInt(id))
|
|
464
|
+ : [];
|
|
465
|
+
|
|
466
|
+ this.returnDevicesList = [];
|
|
467
|
+ for (const id of modifyDeviceIds) {
|
|
468
|
+ const response = await getDevice(id);
|
|
469
|
+ if (response.data) {
|
|
470
|
+ this.returnDevicesList.push(response.data);
|
|
471
|
+ }
|
|
472
|
+ }
|
|
473
|
+ } else if (this.taskName === '归还确认') {
|
|
474
|
+ // 在归还确认节点,使用拟发放的设备列表
|
|
475
|
+ this.returnDevicesList = [...this.modifyDeviceList];
|
|
476
|
+ this.form.returnDevices = []; // 初始化空数组
|
|
477
|
+ } else {
|
|
478
|
+ this.returnDevicesList = [];
|
|
479
|
+ this.form.returnDevices = []; // 初始化空数组
|
|
480
|
+ }
|
|
481
|
+
|
|
482
|
+ // 初始化维修设备列表
|
|
483
|
+ if (res.data.repairDevices) {
|
|
484
|
+ const repairDeviceIds = typeof res.data.repairDevices === 'string'
|
|
485
|
+ ? res.data.repairDevices.split(',').map(id => parseInt(id))
|
|
486
|
+ : Array.isArray(res.data.repairDevices)
|
|
487
|
+ ? res.data.repairDevices.map(id => parseInt(id))
|
|
488
|
+ : [];
|
|
489
|
+ this.form.repairDevices = repairDeviceIds;
|
|
490
|
+ this.updateRepairDevicesList();
|
|
491
|
+ } else if (this.taskName === '归还确认') {
|
|
492
|
+ this.form.repairDevices = [];
|
|
493
|
+ this.repairDevicesList = [];
|
|
494
|
+ }
|
|
495
|
+
|
247
|
496
|
if (this.form.beginDate && this.form.endDate) {
|
248
|
|
- this.dateRange = [this.form.beginDate, this.form.endDate];
|
|
497
|
+ this.form.dateRange = [this.form.beginDate, this.form.endDate];
|
249
|
498
|
}
|
250
|
499
|
} else {
|
251
|
500
|
this.form.applier = this.$store.getters.userId;
|
|
@@ -254,8 +503,16 @@ export default {
|
254
|
503
|
this.form.user.nickName = name[0];
|
255
|
504
|
this.form.dept.deptName = name[1];
|
256
|
505
|
this.formTotal = 0;
|
|
506
|
+ this.form.returnDevices = []; // 初始化空数组
|
|
507
|
+ this.form.repairDevices = []; // 初始化空数组
|
257
|
508
|
}
|
258
|
|
- });
|
|
509
|
+ } catch (error) {
|
|
510
|
+ console.error('初始化表单失败:', error);
|
|
511
|
+ uni.showToast({
|
|
512
|
+ title: '初始化表单失败',
|
|
513
|
+ icon: 'error'
|
|
514
|
+ });
|
|
515
|
+ }
|
259
|
516
|
},
|
260
|
517
|
handleConfirm(project) {
|
261
|
518
|
this.selectedProject = project;
|
|
@@ -263,14 +520,27 @@ export default {
|
263
|
520
|
this.form.projectId = project.projectId;
|
264
|
521
|
},
|
265
|
522
|
handleDeviceConfirm(devices) {
|
266
|
|
- this.deviceList = Array.isArray(devices) ? devices : [devices];
|
267
|
|
- this.form.devices = this.deviceList.map(item => item.deviceId);
|
|
523
|
+ if (this.taskName === '安排设备') {
|
|
524
|
+ if (this.currentIndex >= 0) {
|
|
525
|
+ // 替换指定位置的设备,确保只使用第一个选中的设备
|
|
526
|
+ const selectedDevice = Array.isArray(devices) ? devices[0] : devices;
|
|
527
|
+ this.modifyDeviceList.splice(this.currentIndex, 1, selectedDevice);
|
|
528
|
+ } else {
|
|
529
|
+ // 新增设备
|
|
530
|
+ this.modifyDeviceList.push(...devices);
|
|
531
|
+ }
|
|
532
|
+ this.isReplaceMode = false;
|
|
533
|
+ } else {
|
|
534
|
+ this.deviceList = Array.isArray(devices) ? devices : [devices];
|
|
535
|
+ this.form.devices = this.deviceList.map(item => item.deviceId);
|
|
536
|
+ }
|
268
|
537
|
},
|
269
|
538
|
handleDateRangeChange(e) {
|
270
|
539
|
if (Array.isArray(e) && e.length === 2) {
|
271
|
540
|
const [start, end] = e;
|
272
|
541
|
this.form.beginDate = start;
|
273
|
542
|
this.form.endDate = end;
|
|
543
|
+ this.form.dateRange = [start, end];
|
274
|
544
|
this.calculateDay();
|
275
|
545
|
}
|
276
|
546
|
},
|
|
@@ -286,62 +556,70 @@ export default {
|
286
|
556
|
replaceRowData(row, index) {
|
287
|
557
|
this.openDevice = true;
|
288
|
558
|
this.currentIndex = index;
|
|
559
|
+ this.isReplaceMode = true;
|
|
560
|
+ // 在安排设备节点时,设置当前选中的设备
|
|
561
|
+ if (this.taskName === '安排设备') {
|
|
562
|
+ this.selectDevice = [row];
|
|
563
|
+ }
|
289
|
564
|
},
|
290
|
565
|
deleteRowData(row, index) {
|
291
|
|
- this.modifyDeviceList.splice(index, 1);
|
|
566
|
+ uni.showModal({
|
|
567
|
+ title: '确认删除',
|
|
568
|
+ content: '确定要删除该设备吗?',
|
|
569
|
+ success: (res) => {
|
|
570
|
+ if (res.confirm) {
|
|
571
|
+ this.modifyDeviceList.splice(index, 1);
|
|
572
|
+ }
|
|
573
|
+ }
|
|
574
|
+ });
|
292
|
575
|
},
|
293
|
576
|
addRowdata() {
|
294
|
577
|
this.openDevice = true;
|
295
|
578
|
this.currentIndex = -1;
|
|
579
|
+ this.isReplaceMode = false;
|
|
580
|
+ // 在安排设备节点时,清空已选设备
|
|
581
|
+ if (this.taskName === '安排设备') {
|
|
582
|
+ this.selectDevice = [];
|
|
583
|
+ }
|
296
|
584
|
},
|
297
|
585
|
submit() {
|
298
|
586
|
this.$refs.form.validate().then(() => {
|
299
|
|
- submitDeviceApproval(this.form).then(res => {
|
300
|
|
- uni.showToast({
|
301
|
|
- title: '提交成功',
|
302
|
|
- icon: 'success'
|
303
|
|
- });
|
304
|
|
- uni.navigateBack();
|
305
|
|
- });
|
306
|
|
- });
|
307
|
|
- },
|
308
|
|
- saves() {
|
309
|
|
- try {
|
310
|
|
- // 构建提交数据
|
311
|
587
|
let submitData = {
|
312
|
588
|
...this.form,
|
313
|
|
- formId: this.taskForm.formId,
|
314
|
|
- deviceApplyId: this.taskForm.formId,
|
|
589
|
+ ...(this.form.formId ? {} : { formId: this.taskForm.formId }),
|
|
590
|
+ ...(this.form.deviceApplyId ? {} : { deviceApplyId: this.taskForm.formId })
|
315
|
591
|
};
|
316
|
|
- let formData = new FormData();
|
317
|
592
|
let jsonForm = JSON.stringify(submitData);
|
318
|
|
- formData.append("form", jsonForm);
|
319
|
|
- console.log(formData.get('form'));
|
320
|
|
- // 根据表单状态选择接口
|
321
|
|
- if (this.formTotal !== 0) {
|
322
|
|
- modifyDeviceApproval(formData).then(res => {
|
323
|
|
- console.log('修改响应:', res);
|
324
|
|
- if (res.code === 200) {
|
325
|
|
- uni.showToast({
|
326
|
|
- title: '保存成功',
|
327
|
|
- icon: 'success'
|
328
|
|
- });
|
329
|
|
- } else {
|
330
|
|
- uni.showToast({
|
331
|
|
- title: res.msg || '保存失败',
|
332
|
|
- icon: 'error'
|
333
|
|
- });
|
334
|
|
- }
|
335
|
|
- }).catch(error => {
|
336
|
|
- console.error('修改错误:', error);
|
|
593
|
+ submitDeviceApproval(jsonForm).then(res => {
|
|
594
|
+ // 获取下一个流程节点
|
|
595
|
+ this.getNextFlowNodeApproval().then(() => {
|
337
|
596
|
uni.showToast({
|
338
|
|
- title: error.message || '保存失败',
|
339
|
|
- icon: 'error'
|
|
597
|
+ title: '提交成功',
|
|
598
|
+ icon: 'success'
|
340
|
599
|
});
|
341
|
|
- });
|
342
|
|
- } else {
|
343
|
|
- submitDeviceApproval(formData).then(res => {
|
344
|
|
- console.log('提交响应:', res);
|
|
600
|
+ setTimeout(() => {
|
|
601
|
+ uni.switchTab({
|
|
602
|
+ url: '/pages/message/index'
|
|
603
|
+ })
|
|
604
|
+ }, 500);
|
|
605
|
+ })
|
|
606
|
+ });
|
|
607
|
+ });
|
|
608
|
+ },
|
|
609
|
+ saves() {
|
|
610
|
+ try {
|
|
611
|
+ this.$refs.form.validate().then(() => {
|
|
612
|
+ let submitData = {
|
|
613
|
+ ...this.form,
|
|
614
|
+ ...(this.form.formId ? {} : { formId: this.taskForm.formId }),
|
|
615
|
+ ...(this.form.deviceApplyId ? {} : { deviceApplyId: this.taskForm.formId })
|
|
616
|
+ };
|
|
617
|
+ // 在安排设备节点时,添加拟发放设备列表
|
|
618
|
+ if (this.taskName === '安排设备') {
|
|
619
|
+ submitData.modifyDevices = this.modifyDeviceList.map(item => item.deviceId);
|
|
620
|
+ }
|
|
621
|
+ let jsonForm = JSON.stringify(submitData);
|
|
622
|
+ modifyDeviceApproval(jsonForm).then(res => {
|
345
|
623
|
if (res.code === 200) {
|
346
|
624
|
uni.showToast({
|
347
|
625
|
title: '保存成功',
|
|
@@ -353,14 +631,8 @@ export default {
|
353
|
631
|
icon: 'error'
|
354
|
632
|
});
|
355
|
633
|
}
|
356
|
|
- }).catch(error => {
|
357
|
|
- console.error('提交错误:', error);
|
358
|
|
- uni.showToast({
|
359
|
|
- title: error.message || '保存失败',
|
360
|
|
- icon: 'error'
|
361
|
|
- });
|
362
|
|
- });
|
363
|
|
- }
|
|
634
|
+ })
|
|
635
|
+ })
|
364
|
636
|
} catch (error) {
|
365
|
637
|
console.error('保存方法错误:', error);
|
366
|
638
|
uni.showToast({
|
|
@@ -370,13 +642,122 @@ export default {
|
370
|
642
|
}
|
371
|
643
|
},
|
372
|
644
|
completeApply() {
|
373
|
|
- modifyDeviceApproval(this.form).then(res => {
|
374
|
|
- uni.showToast({
|
375
|
|
- title: '审批完成',
|
376
|
|
- icon: 'success'
|
|
645
|
+ this.$refs.form.validate().then(() => {
|
|
646
|
+ // 在归还确认节点时,检查所有设备是否都已归还
|
|
647
|
+ if (this.taskName === '归还确认') {
|
|
648
|
+ const allDevices = this.modifyDeviceList.map(item => item.deviceId);
|
|
649
|
+ const returnedDevices = this.form.returnDevices || [];
|
|
650
|
+ const unreturnedDevices = allDevices.filter(id => !returnedDevices.includes(id));
|
|
651
|
+
|
|
652
|
+ if (unreturnedDevices.length > 0) {
|
|
653
|
+ uni.showToast({
|
|
654
|
+ title: '请确认所有设备都已归还',
|
|
655
|
+ icon: 'none'
|
|
656
|
+ });
|
|
657
|
+ return;
|
|
658
|
+ }
|
|
659
|
+ }
|
|
660
|
+
|
|
661
|
+ uni.showModal({
|
|
662
|
+ title: '提示',
|
|
663
|
+ content: '确定提交审批吗?',
|
|
664
|
+ success: (res) => {
|
|
665
|
+ if (res.confirm) {
|
|
666
|
+ let submitData = {
|
|
667
|
+ ...this.form,
|
|
668
|
+ ...(this.form.formId ? {} : { formId: this.taskForm.formId }),
|
|
669
|
+ ...(this.form.deviceApplyId ? {} : { deviceApplyId: this.taskForm.formId })
|
|
670
|
+ };
|
|
671
|
+ // 在安排设备节点时,添加拟发放设备列表
|
|
672
|
+ if (this.taskName === '安排设备') {
|
|
673
|
+ submitData.modifyDevices = this.modifyDeviceList.map(item => item.deviceId);
|
|
674
|
+ }
|
|
675
|
+ let jsonForm = JSON.stringify(submitData);
|
|
676
|
+ modifyDeviceApproval(jsonForm).then(res => {
|
|
677
|
+ // 获取下一个流程节点
|
|
678
|
+ getNextFlowNode({ taskId: this.taskForm.taskId }).then(res => {
|
|
679
|
+ this.getNextFlowNodeApproval().then(() => {
|
|
680
|
+ uni.showToast({
|
|
681
|
+ title: '提交成功',
|
|
682
|
+ icon: 'success'
|
|
683
|
+ });
|
|
684
|
+ setTimeout(() => {
|
|
685
|
+ uni.switchTab({
|
|
686
|
+ url: '/pages/message/index'
|
|
687
|
+ });
|
|
688
|
+ }, 500);
|
|
689
|
+ });
|
|
690
|
+ });
|
|
691
|
+ });
|
|
692
|
+ }
|
|
693
|
+ }
|
377
|
694
|
});
|
378
|
|
- uni.navigateBack();
|
379
|
695
|
});
|
|
696
|
+ },
|
|
697
|
+ // 获取下一个审批人
|
|
698
|
+ getNextFlowNodeApproval() {
|
|
699
|
+ return new Promise((resolve, reject) => {
|
|
700
|
+ const handleComplete = (response) => {
|
|
701
|
+ this.$modal.msgSuccess(response.msg);
|
|
702
|
+ resolve();
|
|
703
|
+ };
|
|
704
|
+
|
|
705
|
+ const setApprovalAndComplete = (result) => {
|
|
706
|
+ this.$set(this.taskForm.variables, "approval", result.data[0]);
|
|
707
|
+ complete(this.taskForm).then(handleComplete).catch(reject);
|
|
708
|
+ };
|
|
709
|
+
|
|
710
|
+ switch (this.taskName) {
|
|
711
|
+ case '设备申请':
|
|
712
|
+ case '分管审核':
|
|
713
|
+ getUserByRole({ roleId: 4 }).then(setApprovalAndComplete).catch(reject);
|
|
714
|
+ break;
|
|
715
|
+
|
|
716
|
+ case '安排设备':
|
|
717
|
+ getUsersManageLeader({ userId: this.form.applier }).then(res => {
|
|
718
|
+ const userIds = res.data.map(user => user.userId);
|
|
719
|
+ this.$set(this.taskForm.variables, "approvalList", userIds);
|
|
720
|
+ complete(this.taskForm).then(handleComplete).catch(reject);
|
|
721
|
+ }).catch(reject);
|
|
722
|
+ break;
|
|
723
|
+
|
|
724
|
+ case '归还确认':
|
|
725
|
+ this.$modal.confirm('最后一个节点,提交将结束流程,是否提交?')
|
|
726
|
+ .then(() => complete(this.taskForm).then(handleComplete).catch(reject))
|
|
727
|
+ .catch(reject);
|
|
728
|
+ break;
|
|
729
|
+ }
|
|
730
|
+ });
|
|
731
|
+ },
|
|
732
|
+ isDeviceSelected(deviceId) {
|
|
733
|
+ return this.form.returnDevices && this.form.returnDevices.includes(deviceId);
|
|
734
|
+ },
|
|
735
|
+ toggleDeviceSelection(device) {
|
|
736
|
+ if (this.taskName !== '归还确认') return;
|
|
737
|
+ // 确保 returnDevices 是数组
|
|
738
|
+ if (!Array.isArray(this.form.returnDevices)) {
|
|
739
|
+ this.form.returnDevices = [];
|
|
740
|
+ }
|
|
741
|
+ const index = this.form.returnDevices.indexOf(device.deviceId);
|
|
742
|
+ if (index === -1) {
|
|
743
|
+ // 添加设备到已归还列表
|
|
744
|
+ this.form.returnDevices.push(device.deviceId);
|
|
745
|
+ } else {
|
|
746
|
+ // 从已归还列表中移除设备
|
|
747
|
+ this.form.returnDevices.splice(index, 1);
|
|
748
|
+ }
|
|
749
|
+ },
|
|
750
|
+ updateRepairDevicesList() {
|
|
751
|
+ // 如果 repairDevices 是字符串,转换为数组
|
|
752
|
+ if (typeof this.form.repairDevices === 'string') {
|
|
753
|
+ this.form.repairDevices = this.form.repairDevices.split(',').map(id => parseInt(id));
|
|
754
|
+ } else if (!Array.isArray(this.form.repairDevices)) {
|
|
755
|
+ this.form.repairDevices = [];
|
|
756
|
+ }
|
|
757
|
+
|
|
758
|
+ this.repairDevicesList = this.modifyDeviceList.filter(device =>
|
|
759
|
+ this.form.repairDevices.includes(device.deviceId)
|
|
760
|
+ );
|
380
|
761
|
}
|
381
|
762
|
}
|
382
|
763
|
}
|
|
@@ -409,6 +790,11 @@ export default {
|
409
|
790
|
gap: 32rpx;
|
410
|
791
|
}
|
411
|
792
|
|
|
793
|
+.date-text {
|
|
794
|
+ margin: 0 10px;
|
|
795
|
+ font-weight: bold;
|
|
796
|
+}
|
|
797
|
+
|
412
|
798
|
.form-actions {
|
413
|
799
|
justify-content: center;
|
414
|
800
|
gap: 32rpx;
|
|
@@ -418,4 +804,119 @@ export default {
|
418
|
804
|
::v-deep .uni-forms-item__label {
|
419
|
805
|
font-weight: bold;
|
420
|
806
|
}
|
|
807
|
+
|
|
808
|
+.device-cards {
|
|
809
|
+ margin-top: 20rpx;
|
|
810
|
+}
|
|
811
|
+
|
|
812
|
+.device-card {
|
|
813
|
+ background: #fff;
|
|
814
|
+ border-radius: 12rpx;
|
|
815
|
+ margin-bottom: 20rpx;
|
|
816
|
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
817
|
+ overflow: hidden;
|
|
818
|
+ transition: all 0.3s ease;
|
|
819
|
+ cursor: pointer;
|
|
820
|
+
|
|
821
|
+ &.selected {
|
|
822
|
+ border: 2rpx solid #67c23a;
|
|
823
|
+ background-color: rgba(103, 194, 58, 0.05);
|
|
824
|
+ }
|
|
825
|
+}
|
|
826
|
+
|
|
827
|
+.card-header {
|
|
828
|
+ padding: 16rpx 20rpx;
|
|
829
|
+ background: #f5f7fa;
|
|
830
|
+ border-bottom: 1rpx solid #eee;
|
|
831
|
+ display: flex;
|
|
832
|
+ justify-content: space-between;
|
|
833
|
+ align-items: center;
|
|
834
|
+}
|
|
835
|
+
|
|
836
|
+.return-tag {
|
|
837
|
+ margin-left: 10rpx;
|
|
838
|
+}
|
|
839
|
+
|
|
840
|
+.card-title {
|
|
841
|
+ font-size: 28rpx;
|
|
842
|
+ font-weight: bold;
|
|
843
|
+ color: #333;
|
|
844
|
+ display: block;
|
|
845
|
+ overflow: hidden;
|
|
846
|
+ text-overflow: ellipsis;
|
|
847
|
+ white-space: nowrap;
|
|
848
|
+}
|
|
849
|
+
|
|
850
|
+.card-content {
|
|
851
|
+ padding: 16rpx 20rpx;
|
|
852
|
+}
|
|
853
|
+
|
|
854
|
+.card-row {
|
|
855
|
+ display: flex;
|
|
856
|
+ margin-bottom: 12rpx;
|
|
857
|
+
|
|
858
|
+ &:last-child {
|
|
859
|
+ margin-bottom: 0;
|
|
860
|
+ }
|
|
861
|
+}
|
|
862
|
+
|
|
863
|
+.card-item {
|
|
864
|
+ flex: 1;
|
|
865
|
+ display: flex;
|
|
866
|
+ align-items: center;
|
|
867
|
+ font-size: 26rpx;
|
|
868
|
+ line-height: 1.4;
|
|
869
|
+ padding: 0 10rpx;
|
|
870
|
+ min-width: 0; // 防止内容溢出
|
|
871
|
+
|
|
872
|
+ .label {
|
|
873
|
+ color: #666;
|
|
874
|
+ flex-shrink: 0;
|
|
875
|
+ margin-right: 8rpx;
|
|
876
|
+ }
|
|
877
|
+
|
|
878
|
+ .value {
|
|
879
|
+ color: #333;
|
|
880
|
+ flex: 1;
|
|
881
|
+ overflow: hidden;
|
|
882
|
+ text-overflow: ellipsis;
|
|
883
|
+ white-space: nowrap;
|
|
884
|
+ }
|
|
885
|
+}
|
|
886
|
+
|
|
887
|
+.card-actions {
|
|
888
|
+ padding: 16rpx 20rpx;
|
|
889
|
+ display: flex;
|
|
890
|
+ justify-content: flex-end;
|
|
891
|
+ gap: 20rpx;
|
|
892
|
+ border-top: 1rpx solid #eee;
|
|
893
|
+}
|
|
894
|
+
|
|
895
|
+.device-card {
|
|
896
|
+ background: #fff;
|
|
897
|
+ border-radius: 12rpx;
|
|
898
|
+ margin-bottom: 20rpx;
|
|
899
|
+ box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
|
900
|
+ overflow: hidden;
|
|
901
|
+ transition: all 0.3s ease;
|
|
902
|
+ cursor: pointer;
|
|
903
|
+
|
|
904
|
+ &.repair-card {
|
|
905
|
+ border: 2rpx solid #f56c6c;
|
|
906
|
+ background-color: rgba(245, 108, 108, 0.05);
|
|
907
|
+ }
|
|
908
|
+}
|
|
909
|
+
|
|
910
|
+.card-header {
|
|
911
|
+ padding: 16rpx 20rpx;
|
|
912
|
+ background: #f5f7fa;
|
|
913
|
+ border-bottom: 1rpx solid #eee;
|
|
914
|
+ display: flex;
|
|
915
|
+ justify-content: space-between;
|
|
916
|
+ align-items: center;
|
|
917
|
+}
|
|
918
|
+
|
|
919
|
+.repair-tag {
|
|
920
|
+ margin-left: 10rpx;
|
|
921
|
+}
|
421
|
922
|
</style>
|