内派返工
This commit is contained in:
parent
db2726043e
commit
668256f5f4
@ -68,7 +68,7 @@
|
|||||||
<!--修改派工-->
|
<!--修改派工-->
|
||||||
修改派工
|
修改派工
|
||||||
</view>
|
</view>
|
||||||
<view @click="projectDis" v-if="order.ticketsStatus == '05' && userInfo.roleCodes.includes('general_inspection')" class="btn pg">
|
<view @click="projectDis('1')" v-if="order.ticketsStatus == '05' && userInfo.roleCodes.includes('general_inspection')" class="btn pg">
|
||||||
<!--内返派工-->
|
<!--内返派工-->
|
||||||
内返派工
|
内返派工
|
||||||
</view>
|
</view>
|
||||||
@ -285,9 +285,9 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 项目派工
|
* 项目派工
|
||||||
*/
|
*/
|
||||||
projectDis(){
|
projectDis(isNei){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id
|
url: '/pages-order/choosePeople/choosePeople?id=' + this.order.id + '&isNei='+isNei
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,21 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 普通弹窗---拍照上传 -->
|
||||||
|
<uni-popup ref="popup" background-color="#fff">
|
||||||
|
<view class="popup-content">
|
||||||
|
<view class="dl-avatar-box">
|
||||||
|
<input type="text" placeholder="请输入内返派工原因" v-model="remark" />
|
||||||
|
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile" limit="9" title="请上传图片(最多上传9张)"></uni-file-picker>
|
||||||
|
</view>
|
||||||
|
<button type="primary" @click="submit('1')">保存</button>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
<view class="foot">
|
<view class="foot">
|
||||||
<view class="submit" @click="submit">确定选择</view>
|
<view v-if="isNei" class="submit" @click="openFile">确定选择(内返派工)</view>
|
||||||
|
<view v-else class="submit" @click="submit('0')">确定选择</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -57,6 +68,8 @@ import VNavigationBar from '@/components/VNavigationBar.vue'
|
|||||||
import {bus} from "@/utils/eventBus";
|
import {bus} from "@/utils/eventBus";
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import {getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
|
import {getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
|
||||||
|
import config from "@/config";
|
||||||
|
import upload from "@/utils/upload";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -64,6 +77,11 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//上传的图片数组
|
||||||
|
fileList: [],
|
||||||
|
sizeType:['compressed'],
|
||||||
|
remark:'',
|
||||||
|
isNei:false,
|
||||||
current: 0,
|
current: 0,
|
||||||
ticketId: '',
|
ticketId: '',
|
||||||
list: [],
|
list: [],
|
||||||
@ -84,6 +102,10 @@ export default {
|
|||||||
this.ticketId = data.id
|
this.ticketId = data.id
|
||||||
this.workByTicketId()
|
this.workByTicketId()
|
||||||
}
|
}
|
||||||
|
if (data.isNei) {
|
||||||
|
//内返派工
|
||||||
|
this.isNei = true
|
||||||
|
}
|
||||||
if (data.ifDetail) {
|
if (data.ifDetail) {
|
||||||
//从订单详情页跳过来的,返回时需要返回2步
|
//从订单详情页跳过来的,返回时需要返回2步
|
||||||
this.ifDetail = true
|
this.ifDetail = true
|
||||||
@ -109,6 +131,31 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
radioChange: function (evt) {
|
||||||
for (let i = 0; i < this.list.length; i++) {
|
for (let i = 0; i < this.list.length; i++) {
|
||||||
if (this.list[i].userId == evt.detail.value) {
|
if (this.list[i].userId == evt.detail.value) {
|
||||||
@ -202,7 +249,7 @@ export default {
|
|||||||
this.sgIds = arr
|
this.sgIds = arr
|
||||||
this.sgNames = nameArr
|
this.sgNames = nameArr
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit(type) {
|
||||||
if (this.type == 'sg') {
|
if (this.type == 'sg') {
|
||||||
if (this.sgIds.length == 0) {
|
if (this.sgIds.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -270,6 +317,10 @@ export default {
|
|||||||
nowRepairName: this.checkedUserName,
|
nowRepairName: this.checkedUserName,
|
||||||
operateCode:"sgwczj"
|
operateCode:"sgwczj"
|
||||||
}
|
}
|
||||||
|
if (type == '1'){
|
||||||
|
param.remark = this.remark
|
||||||
|
param.image = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||||
|
}
|
||||||
console.log(param)
|
console.log(param)
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/tickets/notify',
|
url: '/admin-api/repair/tickets/notify',
|
||||||
@ -302,6 +353,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.popup-content {
|
||||||
|
@include flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 30rpx 30rpx 120rpx 30rpx;
|
||||||
|
height: auto;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
.container {
|
.container {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #F3F5F7;
|
background-color: #F3F5F7;
|
||||||
|
Loading…
Reference in New Issue
Block a user