vue2-client 1.8.121 → 1.8.122

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/CHANGELOG.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
- **1.8.121 -2024-3-27 @陈博晨**
4
+ **1.8.121-1.8.122 -2024-3-28 @陈博晨**
5
5
  - 售后问题反馈平台详情页修改
6
6
 
7
7
  **1.8.117 -2024-3-14 @张振宇**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.8.121",
3
+ "version": "1.8.122",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve --no-eslint",
@@ -86,6 +86,19 @@
86
86
  </a-select>
87
87
  </a-form-item>
88
88
  <!-- 退回原因 -->
89
+ <a-form-item label="退回截图" v-show="customerSure.sfwc === '否'">
90
+ <div class="clearfix">
91
+ <upload v-if="uploadVisible" :model="imageUploadModel" @setFiles="setImages" />
92
+ <a-modal
93
+ :footer="null"
94
+ :visible="previewVisible"
95
+ @cancel="handleCancel"
96
+ >
97
+ <img :src="previewImage" alt="图片上传" style="width: 100%"/>
98
+ </a-modal>
99
+ </div>
100
+ </a-form-item>
101
+ <!-- 退回原因 -->
89
102
  <a-form-item label="退回原因" v-show="customerSure.sfwc === '否'">
90
103
  <a-textarea placeholder="请输入退回原因" v-model="customerSure.thyy"></a-textarea>
91
104
  </a-form-item>
@@ -132,13 +145,16 @@ import { TicketDetailsViewApi, post } from '@vue2-client/services/api'
132
145
  import { formatDate } from '@vue2-client/utils/util'
133
146
  import { FileItem, ImageItem } from '@vue2-client/components/FileImageItem'
134
147
  import FilePreview from '@vue2-client/components/FilePreview'
148
+ import Upload from '@vue2-client/base-client/components/common/Upload'
135
149
 
136
150
  const AStepItemGroup = AStepItem.Group
137
151
  const DetailListItem = DetailList.Item
152
+ const fileUploadModel = JSON.parse('{"addOrEdit":"all","resUploadStock":1,"pathKey":"cs","rule":{"type":"string","required":"false"},"isOnlyAddOrEdit":true,"acceptCount":3,"type":"file","accept":["*"],"stockAlias":"webmeter","fileRootPath":"D:\\\\nginx-resource\\\\resource\\\\","name":"附件","resUploadMode":"server","model":"FilesId"}')
153
+ const imageUploadModel = JSON.parse('{"addOrEdit":"all","resUploadStock":1,"pathKey":"cs","rule":{"type":"string","required":"false"},"isOnlyAddOrEdit":true,"acceptCount":5,"type":"image","accept":[".jpg,.jpeg,.ico,.gif,svg,.webp,.png,.bmp,.pjpeg,"],"stockAlias":"webmeter","fileRootPath":"D:\\\\nginx-resource\\\\resource\\\\","name":"图片","resUploadMode":"server","model":"Images"}')
138
154
 
139
155
  export default {
140
156
  name: 'SubmitTicketSuccess',
141
- components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result, FileItem, ImageItem, FilePreview },
157
+ components: { AStepItemGroup, AStepItem, DetailListItem, DetailList, Result, FileItem, ImageItem, FilePreview, Upload },
142
158
  props: {
143
159
  // 工单序列号
144
160
  serialNumber: {
@@ -148,6 +164,8 @@ export default {
148
164
  },
149
165
  data () {
150
166
  return {
167
+ fileUploadModel,
168
+ imageUploadModel,
151
169
  title: '提交成功',
152
170
  description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。', // +
153
171
  // '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
@@ -187,14 +205,20 @@ export default {
187
205
  },
188
206
  // 工单id
189
207
  applyId: 0,
190
- // 工单步骤
191
- stepId: 0,
192
- // 确认详情
193
- verifyDetails: {
194
- shpj: '',
195
- sfwc: '',
196
- fkyj: ''
197
- }
208
+ // 工单步骤
209
+ stepId: 0,
210
+ // 确认详情
211
+ verifyDetails: {
212
+ shpj: '',
213
+ sfwc: '',
214
+ fkyj: ''
215
+ },
216
+ uploadVisible: true,
217
+ // 控制预览显示
218
+ previewVisible: false,
219
+ // 图片真实地址
220
+ previewImage: '',
221
+ imageList: []
198
222
  }
199
223
  },
200
224
  mounted () {
@@ -256,7 +280,7 @@ export default {
256
280
  serialNumber: this.serialNumber
257
281
  })
258
282
  .then(res => {
259
- this.stepId = res.stepId
283
+ this.stepId = res.stepId
260
284
  this.applyId = res.apply_id
261
285
  this.details.uploader = res.uploader
262
286
  // 判断负责人有没有值
@@ -284,19 +308,19 @@ export default {
284
308
  this.details.files = res.files
285
309
  this.details.images = res.images
286
310
  this.details.resultrecord = res.resultrecord
287
- // 如果工单已经关闭, 获取用户确认信息
288
- if (res.status === 3) {
289
- post(TicketDetailsViewApi.getApplyCompletedStepData, {
290
- applyId: this.applyId,
291
- stepId: this.stepId
292
- }).then(res => {
293
- if (res.data) {
294
- this.verifyDetails.fkyj = res.data.fkyj ? res.data.fkyj : '无'
295
- this.verifyDetails.shpj = res.data.shpj ? res.data.shpj : '满意'
296
- this.verifyDetails.sfwc = res.data.sfwc ? res.data.sfwc : '是'
297
- }
298
- })
299
- }
311
+ // 如果工单已经关闭, 获取用户确认信息
312
+ if (res.status === 3) {
313
+ post(TicketDetailsViewApi.getApplyCompletedStepData, {
314
+ applyId: this.applyId,
315
+ stepId: this.stepId
316
+ }).then(res => {
317
+ if (res.data) {
318
+ this.verifyDetails.fkyj = res.data.fkyj ? res.data.fkyj : '无'
319
+ this.verifyDetails.shpj = res.data.shpj ? res.data.shpj : '满意'
320
+ this.verifyDetails.sfwc = res.data.sfwc ? res.data.sfwc : '是'
321
+ }
322
+ })
323
+ }
300
324
  }, err => {
301
325
  console.log(err)
302
326
  })
@@ -343,15 +367,18 @@ this.verifyDetails.sfwc = res.data.sfwc ? res.data.sfwc : '是'
343
367
  applyId: this.applyId
344
368
  }).then(
345
369
  res => {
346
- this.saveWorkflowLog('退回', '第12步: 客户确认 ---> 第11步: 售后确认', { notes })
370
+ this.saveWorkflowLog('退回', `第${this.stepId}步: 客户确认 ---> 第${this.stepId - 1}步: 售后确认`, { notes })
347
371
  this.$message.success('退回成功')
348
372
  // 修改工单状态为 1(待处理)
349
373
  post(TicketDetailsViewApi.clientSubmit, {
350
374
  status: 1,
351
- serial_number: this.serialNumber
375
+ serial_number: this.serialNumber,
376
+ Images: this.imageList,
377
+ applyId: this.applyId
352
378
  }).then(res => {
353
379
  console.log('res', res)
354
380
  })
381
+ this.uploadVisible = false
355
382
  this.getTicketDetail()
356
383
  this.$emit('afterSubmit')
357
384
  },
@@ -402,22 +429,28 @@ this.verifyDetails.sfwc = res.data.sfwc ? res.data.sfwc : '是'
402
429
  console.log(err)
403
430
  }
404
431
  )
405
- }
432
+ },
433
+ handleCancel () {
434
+ this.previewVisible = false
435
+ },
436
+ setImages (imageIds) {
437
+ this.imageList = imageIds
438
+ },
406
439
  },
407
440
  computed: {
408
441
  // 用于进度条,进度显示控制
409
442
  step () {
410
443
  switch (this.details.status) {
411
- case 0:
412
- return 0
413
- case 1:
414
- return 1
415
- case 2:
416
- return 2
417
- case 3:
418
- return 3
419
- case 4:
420
- return 2
444
+ case 0:
445
+ return 0
446
+ case 1:
447
+ return 1
448
+ case 2:
449
+ return 2
450
+ case 3:
451
+ return 3
452
+ case 4:
453
+ return 2
421
454
  }
422
455
  }
423
456
  }