1
This commit is contained in:
parent
85a3ec3f81
commit
bf1385b3cc
@ -45,9 +45,17 @@
|
||||
<view >
|
||||
<u-modal showCancelButton @cancel="doVoidCancel" @confirm = "doVoidConfirm" :show="show" :title="title">
|
||||
<input type="text" v-model="voidData.remark" placeholder="请输入作废原因" >
|
||||
|
||||
</u-modal>
|
||||
</view>
|
||||
<!-- 普通弹窗---拍照上传 -->
|
||||
<uni-popup ref="popup" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="dl-avatar-box">
|
||||
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="请上传诊断维修单和车辆维修前照片"></uni-file-picker>
|
||||
</view>
|
||||
<button type="primary" @click="receiveOrder">保存</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<view class="footer">
|
||||
<view @click="projectDis" v-if="order.ticketsStatus == '04' && (userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection'))" class="btn pg">
|
||||
项目派工
|
||||
@ -60,7 +68,7 @@
|
||||
<!--服务顾问和总检,可以重新派工-->
|
||||
重新派工
|
||||
</view>
|
||||
<view @click="receiveOrder(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='01' && roleCanJd" class="btn qc">
|
||||
<view @click="openFile(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='01' && roleCanJd" class="btn qc">
|
||||
接单
|
||||
</view>
|
||||
<!-- <view @click="doOrder(order.id)" v-if="order.ticketsStatus == '05' && order.ticketsWorkStatus=='04' && roleCanSg" class="btn qc">-->
|
||||
@ -88,6 +96,8 @@ import {
|
||||
getStrData
|
||||
} from '@/utils/auth';
|
||||
import request from '@/utils/request';
|
||||
import config from "@/config";
|
||||
import upload from "@/utils/upload";
|
||||
export default {
|
||||
name: "orderCard",
|
||||
props: {
|
||||
@ -108,6 +118,9 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//上传的图片数组
|
||||
fileList: [],
|
||||
sizeType:['compressed'],
|
||||
show:false,
|
||||
title:'作废',
|
||||
voidData:{},
|
||||
@ -120,6 +133,7 @@ export default {
|
||||
//当前用户
|
||||
userInfo:{},
|
||||
ifLeader:false,
|
||||
takeOrderId:'',
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
@ -142,6 +156,33 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 接单上传附件
|
||||
*/
|
||||
openFile(id){
|
||||
this.takeOrderId = id
|
||||
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);
|
||||
},
|
||||
|
||||
getFlagColor(flag) {
|
||||
if (flag == 1) {
|
||||
return '#E8A321'
|
||||
@ -152,11 +193,15 @@ export default {
|
||||
/**
|
||||
* 接单
|
||||
*/
|
||||
receiveOrder(id){
|
||||
receiveOrder(){
|
||||
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||
request({
|
||||
url: '/admin-api/repair/tickets/take',
|
||||
method: 'get',
|
||||
params:{id:id}
|
||||
params:{
|
||||
id:this.takeOrderId,
|
||||
image:fileStr
|
||||
}
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
@ -237,6 +282,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.popup-content {
|
||||
@include flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
.orderCard {
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
|
@ -29,11 +29,20 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 普通弹窗---拍照上传 -->
|
||||
<uni-popup ref="popup" background-color="#fff">
|
||||
<view class="popup-content">
|
||||
<view class="dl-avatar-box">
|
||||
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="请拍照上传(图片最多上传9张)"></uni-file-picker>
|
||||
</view>
|
||||
<button type="primary" @click="confirmOpe('yes')">保存</button>
|
||||
</view>
|
||||
</uni-popup>
|
||||
<view v-if="canOperate" class="footer">
|
||||
<view class="no" @click="confirmOpe('no')">
|
||||
{{ backText }}
|
||||
</view>
|
||||
<view class="yes" @click="confirmOpe('yes')">
|
||||
<view class="yes" @click="openFile">
|
||||
{{ yesText }}
|
||||
</view>
|
||||
</view>
|
||||
@ -44,36 +53,24 @@
|
||||
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||
import request from '@/utils/request';
|
||||
import {getDictTextByCodeAndValue} from "@/utils/utils";
|
||||
import config from "@/config";
|
||||
import upload from "@/utils/upload";
|
||||
export default {
|
||||
components: {
|
||||
VNavigationBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
//上传的图片数组
|
||||
fileList: [],
|
||||
sizeType:['compressed'],
|
||||
viewType:"",
|
||||
id:"",
|
||||
title:"",
|
||||
canOperate:false,
|
||||
backText:"",
|
||||
yesText:"",
|
||||
repairList: [
|
||||
// {
|
||||
// name: '7字小钩',
|
||||
// num: 3,
|
||||
// type: '机电',
|
||||
// unit: '桶',
|
||||
// total: 35,
|
||||
// code: 'XCQHCJYS7 SPI SP 5W30 4L'
|
||||
// },
|
||||
// {
|
||||
// name: '7字小钩',
|
||||
// num: 3,
|
||||
// type: '机电',
|
||||
// unit: '桶',
|
||||
// total: 35,
|
||||
// code: 'XCQHCJYS7 SPI SP 5W30 4L'
|
||||
// }
|
||||
]
|
||||
repairList: []
|
||||
};
|
||||
},
|
||||
onLoad(data){
|
||||
@ -83,6 +80,35 @@ export default {
|
||||
this.getDetail()
|
||||
},
|
||||
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);
|
||||
},
|
||||
|
||||
|
||||
|
||||
getDetail(){
|
||||
let url;
|
||||
let params={};
|
||||
@ -150,7 +176,11 @@ export default {
|
||||
confirmOpe(type){
|
||||
if("yes"==type){
|
||||
let url;
|
||||
let params={id:this.id};
|
||||
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||
let params={
|
||||
id:this.id,
|
||||
image:fileStr
|
||||
};
|
||||
if("receive"==this.viewType) {
|
||||
//领料
|
||||
url = "/admin-api/repair/so/confirmGet"
|
||||
@ -202,6 +232,14 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.popup-content {
|
||||
@include flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15px;
|
||||
height: auto;
|
||||
background-color: #fff;
|
||||
}
|
||||
.container {
|
||||
height: 100%;
|
||||
background: #F3F5F7;
|
||||
|
Loading…
Reference in New Issue
Block a user