From 668256f5f4d86a74cca922afb71bde2cbcf53394 Mon Sep 17 00:00:00 2001 From: PQZ Date: Tue, 5 Nov 2024 12:04:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E6=B4=BE=E8=BF=94=E5=B7=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/orderCard.vue | 6 +-- pages-order/choosePeople/choosePeople.vue | 65 +++++++++++++++++++++-- 2 files changed, 65 insertions(+), 6 deletions(-) diff --git a/components/orderCard.vue b/components/orderCard.vue index ba693bb..1266ba6 100644 --- a/components/orderCard.vue +++ b/components/orderCard.vue @@ -68,7 +68,7 @@ 修改派工 - + 内返派工 @@ -285,9 +285,9 @@ export default { /** * 项目派工 */ - projectDis(){ + projectDis(isNei){ uni.navigateTo({ - url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + '&isNei='+isNei }) } } diff --git a/pages-order/choosePeople/choosePeople.vue b/pages-order/choosePeople/choosePeople.vue index c625dae..7da5748 100644 --- a/pages-order/choosePeople/choosePeople.vue +++ b/pages-order/choosePeople/choosePeople.vue @@ -45,10 +45,21 @@ - + + + + + + + + + + - 确定选择 + 确定选择(内返派工) + 确定选择 + @@ -57,6 +68,8 @@ import VNavigationBar from '@/components/VNavigationBar.vue' import {bus} from "@/utils/eventBus"; import request from '@/utils/request'; import {getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils"; +import config from "@/config"; +import upload from "@/utils/upload"; export default { components: { @@ -64,6 +77,11 @@ export default { }, data() { return { + //上传的图片数组 + fileList: [], + sizeType:['compressed'], + remark:'', + isNei:false, current: 0, ticketId: '', list: [], @@ -84,6 +102,10 @@ export default { this.ticketId = data.id this.workByTicketId() } + if (data.isNei) { + //内返派工 + this.isNei = true + } if (data.ifDetail) { //从订单详情页跳过来的,返回时需要返回2步 this.ifDetail = true @@ -109,6 +131,31 @@ export default { } }, methods: { + /** + * 内返派工打开上传附件弹窗 + */ + openFile(){ + this.$refs.popup.open("bottom") + }, + + afterRead(file) { + for (let i = 0; i < file.tempFilePaths.length; i++) { + upload({ + url:'/admin-api/infra/file/upload', + filePath: file.tempFilePaths[i] + }).then((res)=>{ + this.fileList.push({ + url: config.baseImageUrl+res.data + }) + console.log(this.fileList) + }) + } + }, + + deleteFile(file, index) { + this.fileList.splice(index, 1); + }, + radioChange: function (evt) { for (let i = 0; i < this.list.length; i++) { if (this.list[i].userId == evt.detail.value) { @@ -202,7 +249,7 @@ export default { this.sgIds = arr this.sgNames = nameArr }, - async submit() { + async submit(type) { if (this.type == 'sg') { if (this.sgIds.length == 0) { uni.showToast({ @@ -270,6 +317,10 @@ export default { nowRepairName: this.checkedUserName, operateCode:"sgwczj" } + if (type == '1'){ + param.remark = this.remark + param.image = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",") + } console.log(param) request({ url: '/admin-api/repair/tickets/notify', @@ -302,6 +353,14 @@ export default {