内派返工
This commit is contained in:
parent
db2726043e
commit
668256f5f4
@ -68,7 +68,7 @@
|
||||
<!--修改派工-->
|
||||
修改派工
|
||||
</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>
|
||||
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -45,10 +45,21 @@
|
||||
|
||||
</div>
|
||||
</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="submit" @click="submit">确定选择</view>
|
||||
<view v-if="isNei" class="submit" @click="openFile">确定选择(内返派工)</view>
|
||||
<view v-else class="submit" @click="submit('0')">确定选择</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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 {
|
||||
</script>
|
||||
|
||||
<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 {
|
||||
height: 100%;
|
||||
background-color: #F3F5F7;
|
||||
|
Loading…
Reference in New Issue
Block a user