This commit is contained in:
许允枞 2025-03-26 16:43:48 +08:00
parent e7b438e29a
commit 6f1ca7d356
7 changed files with 233 additions and 27 deletions

View File

@ -261,9 +261,10 @@ import upload from '@/utils/upload.js'
import {getToken, getTenantId} from '@/utils/auth' import {getToken, getTenantId} from '@/utils/auth'
import {formatDate} from "@/utils/utils"; import {formatDate} from "@/utils/utils";
import headersVue from "@/components/header/headers.vue"; import headersVue from "@/components/header/headers.vue";
import USwitch from "@/uni_modules/uview-ui/components/u-switch/u-switch.vue";
export default { export default {
components: {headersVue}, components: {USwitch, headersVue},
data() { data() {
return { return {
imagePath: '', imagePath: '',
@ -508,6 +509,11 @@ export default {
//goodsId //goodsId
this.goodsId = res.data.goodsId this.goodsId = res.data.goodsId
this.goodstext = this.findItemById(this.columnData, this.skuId).label this.goodstext = this.findItemById(this.columnData, this.skuId).label
//
this.carRegisterDate = res.data.carRegisterDate
this.carRegisterDateStr = formatDate(res.data.carRegisterDate)
//
this.userAddress = res.data.address
//change //change
// change // change
const mockEvent = { const mockEvent = {
@ -616,9 +622,9 @@ export default {
}) })
}, },
async getgoodes() { async getgoodes() {
if (this.carNum == '' || this.customerSource == "" || this.skuId == '' || this.leadManId == undefined || this.carRegisterDate == '') { if (this.carNum == '' || this.customerSource == "" || this.skuId == '' || this.leadManId == undefined || this.carRegisterDate == '' || this.meetManId == undefined || this.meetManId == undefined) {
uni.showToast({ uni.showToast({
title: '车牌号 客户来源 商品 引车员 必填!', title: '车牌号 客户来源 商品 引车员 车辆注册日期 接车人 必填!',
icon: 'none' icon: 'none'
}) })
return return

View File

@ -811,6 +811,7 @@ image {
.box_ds { .box_ds {
display: flex; display: flex;
align-items: center; align-items: center;
width: 80%;
} }
.box_bd { .box_bd {
@ -835,6 +836,9 @@ image {
font-size: 32rpx; font-size: 32rpx;
color: #101A3E; color: #101A3E;
margin-right: 10rpx; margin-right: 10rpx;
white-space: nowrap; /* 禁止换行 */
overflow: hidden; /* 超出部分隐藏 */
text-overflow: ellipsis; /* 超出部分显示省略号 */
} }
.size_ { .size_ {

View File

@ -171,7 +171,7 @@
</view> </view>
<view class="annniu" v-if="detailData.status&&(detailData.status == 0 || detailData.status == 2)&&workNodeStatus == 1" <view class="annniu" v-if="detailData.status&&(detailData.status == 0 || detailData.status == 2)&&workNodeStatus == 1"
@click="hge = true;getProject()"> @click="hge = true;getProject();cancelInterval()">
<view class="">结束检测</view> <view class="">结束检测</view>
</view> </view>
<view class="annniu" <view class="annniu"
@ -389,6 +389,16 @@ export default {
} }
}, },
onShow() { onShow() {
//
this.timer = setInterval(this.getindex, 10000);
},
onHide() {
clearInterval(this.timer);
this.timer = null
},
onUnload() {
clearInterval(this.timer);
this.timer = null;
}, },
methods: { methods: {
judgeUpdateLeadMan(){ judgeUpdateLeadMan(){
@ -399,6 +409,12 @@ export default {
this.isChangeLeadMan = res.data this.isChangeLeadMan = res.data
}) })
}, },
cancelInterval(){
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
chooseBank(e) { chooseBank(e) {
this.receivablesAccount = e.value[0] this.receivablesAccount = e.value[0]
this.bankShow = false this.bankShow = false
@ -802,8 +818,7 @@ export default {
}, },
}, },
mounted() { mounted() {
//
this.timer = setInterval(this.getindex, 3000);
}, },
beforeDestroy() { beforeDestroy() {
// //

View File

@ -25,7 +25,7 @@
</view> </view>
<view class="cont"> <view class="cont">
<view class="c-box" @click="addwenjian()"> <view class="c-box" @click="addwenjian()" v-if="isHasRole">
<!-- <view class=""> <!-- <view class="">
<image src="../../static/imgs/wenjianjia.png" mode=""></image> <image src="../../static/imgs/wenjianjia.png" mode=""></image>
</view> --> </view> -->
@ -55,9 +55,9 @@
<view class="" v-if="!item.count" style=" visibility: hidden;">{{ '1' }}</view> <view class="" v-if="!item.count" style=" visibility: hidden;">{{ '1' }}</view>
<view class="bsd-dis"> <view class="bsd-dis">
<view class="bianji" v-if="item.type == '2'" @click="viewFile(item.filePath)">预览</view> <view class="bianji" v-if="item.type == '2'" @click="viewFile(item.filePath)">预览</view>
<view class="bianji" @click="editFile(item.id)">编辑</view> <view class="bianji" @click="editFile(item.id)" v-if="isHasRole">编辑</view>
<view class="bianji" @click="showHistory(item.id)">历史</view> <view class="bianji" @click="showHistory(item.id)">历史</view>
<view class="sanchu" @click="delFile(item.id)" v-if="!item.defaultKey">删除</view> <view class="sanchu" @click="delFile(item.id)" v-if="!item.defaultKey && isHasRole">删除</view>
</view> </view>
</view> </view>
@ -119,6 +119,7 @@ export default {
drawerData: [], drawerData: [],
isLoading: false, isLoading: false,
imageUrl: config.baseImageUrl + '/', imageUrl: config.baseImageUrl + '/',
isHasRole:false
} }
}, },
@ -131,7 +132,7 @@ export default {
}, },
onShow() { onShow() {
this.getlist() this.getlist()
this.ifHasRole()
}, },
onBackPress(options) { onBackPress(options) {
// //
@ -183,6 +184,15 @@ export default {
this.isLoading = false this.isLoading = false
// this.getCountByDirectory() // this.getCountByDirectory()
}, },
ifHasRole() {
request({
url: '/partnerOwn/partner/ifHasRole',
method: 'get',
params: {dictType: 'ins_file_role'}
}).then((res) => {
this.isHasRole = res.data
})
},
showHistory(id) { showHistory(id) {
this.isShow = true this.isShow = true
this.isShow = true this.isShow = true

View File

@ -65,6 +65,11 @@ export default {
if (this.page < this.pages) { if (this.page < this.pages) {
this.page++; this.page++;
this.getRoyalty(); this.getRoyalty();
}else if (this.page === this.pages) {
uni.showToast({
title: '没有更多数据了',
icon: 'none'
});
} }
}, },
methods: { methods: {

View File

@ -15,7 +15,7 @@
</view> </view>
<!-- 添加编辑按钮 --> <!-- 添加编辑按钮 -->
<view class="edit-button" > <view class="edit-button">
<view style="margin-bottom: 10px" @click="modifyPassword">修改密码</view> <view style="margin-bottom: 10px" @click="modifyPassword">修改密码</view>
<view style="margin-top: 10px" @click="editUserInfo">编辑信息</view> <view style="margin-top: 10px" @click="editUserInfo">编辑信息</view>
</view> </view>
@ -82,19 +82,19 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="ian-box">--> <!-- <view class="ian-box">-->
<!-- <view class="on-input" @click="goWord()">--> <!-- <view class="on-input" @click="goWord()">-->
<!-- <view class="dix">--> <!-- <view class="dix">-->
<!-- <view class="d-icon">--> <!-- <view class="d-icon">-->
<!-- <image src="../../static/detection/zhaq.png" mode=""></image>--> <!-- <image src="../../static/detection/zhaq.png" mode=""></image>-->
<!-- </view>--> <!-- </view>-->
<!-- <view class="aa">word</view>--> <!-- <view class="aa">word</view>-->
<!-- </view>--> <!-- </view>-->
<!-- <view class="">--> <!-- <view class="">-->
<!-- <uni-icons type="right" color="#999999" size="16"></uni-icons>--> <!-- <uni-icons type="right" color="#999999" size="16"></uni-icons>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<view class="ian-box"> <view class="ian-box">
<!-- <view class="on-input"> <!-- <view class="on-input">
<view class="dix"> <view class="dix">
@ -133,7 +133,7 @@
</view> </view>
</view> </view>
<uni-popup ref="alertDialog" type="dialog"> <uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog cancelText="关闭" confirmText="同意" title="通知" content="您确认要退出吗!" <uni-popup-dialog cancelText="关闭" confirmText="同意" title="通知" content="您确认要退出吗!"
@confirm="dialogConfirm" @confirm="dialogConfirm"
@close="dialogClose"></uni-popup-dialog> @close="dialogClose"></uni-popup-dialog>
</uni-popup> </uni-popup>
@ -189,10 +189,11 @@ export default {
this.tui() this.tui()
this.$refs.alertDialog.close() this.$refs.alertDialog.close()
}, },
ifAppointment(){ ifAppointment() {
request({ request({
url: '/partnerOwn/partner/ifAppointment', url: '/partnerOwn/partner/ifHasRole',
method: 'get', method: 'get',
params: {dictType: 'ins_appointment_role'}
}).then((res) => { }).then((res) => {
this.lookAppointment = res.data this.lookAppointment = res.data
}) })

View File

@ -100,6 +100,14 @@
size="10"> size="10">
取消接单 取消接单
</u-button> </u-button>
<u-button class="button" v-if="meetCarButtonShow.includes(tapindex)" @click="meetCarPhoto(item);openMeetCar = true"
size="10">
接车拍照
</u-button>
<u-button class="button" v-if="meetCarButtonShow.includes(tapindex)" @click="getMeetMan();meetCarPhoto(item);showMeetMan = true"
size="10">
更换人员
</u-button>
<u-button class="button" @click="godetails(item)" size="10">查看详情</u-button> <u-button class="button" @click="godetails(item)" size="10">查看详情</u-button>
</view> </view>
</view> </view>
@ -108,6 +116,21 @@
</view> </view>
</view> </view>
</view> </view>
<u-popup :show="openMeetCar" @close="openMeetCar = false" :round="10">
<view class="popup-box">
<u--textarea v-model="remark" placeholder="请输入内容" border="bottom"></u--textarea>
<view class="on-inputx">
<text>施工图片</text>
</view>
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="10"></u-upload>
<view class="bottomx" @click="submit()">
<uni-icons type="compose" color="#0174F6" size="20"></uni-icons>
<text>提交</text>
</view>
</view>
</u-popup>
<u-picker :show="showMeetMan" keyName="nickname" title="更换接车人" :columns="[columnsMeetMan]" @confirm="confirmsMeetMan" @cancel="cancelsMeetMan"></u-picker>
<view class="lanniu-container2"> <view class="lanniu-container2">
<u-picker :show="show" :columns="chooseWorkNodes" @confirm="confirms" @cancel="cancels" <u-picker :show="show" :columns="chooseWorkNodes" @confirm="confirms" @cancel="cancels"
@ -133,6 +156,7 @@ import config from '@/config'
import request from '../../utils/request'; import request from '../../utils/request';
import tabBar from '../../components/staffTabBer/tabBar.vue' import tabBar from '../../components/staffTabBer/tabBar.vue'
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils"; import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
import upload from "@/utils/upload";
export default { export default {
data() { data() {
@ -142,9 +166,13 @@ export default {
imgurl: this.$imgeUrl, imgurl: this.$imgeUrl,
baseUrl: this.$baseUrl, baseUrl: this.$baseUrl,
infoDatas: {}, infoDatas: {},
openMeetCar: false,
selectedInfoId: undefined,
partnerId: uni.getStorageSync("partnerId"), partnerId: uni.getStorageSync("partnerId"),
goodsTitle: '', goodsTitle: '',
tapindex: 0, tapindex: 0,
fileList1: [],
fileList2: [],
tapValue: 1, tapValue: 1,
isExamine: false, isExamine: false,
msg: '1', msg: '1',
@ -153,6 +181,7 @@ export default {
noReadNum: 1, noReadNum: 1,
pageSize: 20,// pageSize: 20,//
totalPages: 0,// totalPages: 0,//
remark: '',
// tapList: [ // tapList: [
// { // {
// text: "", // text: "",
@ -200,13 +229,16 @@ export default {
}, },
], ],
chooseWorkNodes: [], chooseWorkNodes: [],
columnsMeetMan: [],
show: false, show: false,
showMeetMan: false,
takingData: { takingData: {
workNodeId: null, workNodeId: null,
id: null id: null
}, },
beginButtonShow: [0, 2, 3], beginButtonShow: [0, 2, 3],
cancelButtonShow: [1], cancelButtonShow: [1],
meetCarButtonShow: [5],
countMap: [] countMap: []
} }
}, },
@ -260,6 +292,65 @@ export default {
} }
}) })
}, },
/** 接车拍照提交*/
submit() {
console.log('文件', this.fileList1)
console.log('infoid', this.selectedInfoId)
request({
url: '/system/info/meetCarPhoto',
data: {
inspectionInfoId: this.selectedInfoId,
remark: this.remark,
dealImages: this.fileList1.map(item => item.url).join(',')
},
method: 'post'
}).then(res => {
if (res.code === 200) {
uni.showToast({
title: '提交成功',
icon: 'none',
duration: 2000
});
this.openMeetCar = false
this.remark = ''
this.fileList1 = []
this.getList()
}
})
},
async afterRead(event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log(result)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
async uploadFilePromise(url) {
let res = await upload({
url: '/common/upload',
filePath: url,
})
return res.data.url
},
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
goNotice() { goNotice() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/xiaoxi/notice?type=staff' url: '/pages/xiaoxi/notice?type=staff'
@ -273,6 +364,46 @@ export default {
cancels() { cancels() {
this.show = false this.show = false
}, },
confirmsMeetMan(e) {
const selectedUserId = e.value[0].id
console.log('选择的工单id', this.selectedInfoId)
console.log('selectedUserId', e)
//
request({
url: '/system/info/updateLeadMan',
method: 'post',
data: {
id: this.selectedInfoId,
meetManId: selectedUserId
}
}).then(res => {
if (res.code === 200) {
uni.showToast({
title: '更换成功',
icon: 'none',
duration: 2000
});
this.getList()
}
})
this.showMeetMan = false
},
cancelsMeetMan() {
this.showMeetMan = false
},
/*获取接车员信息*/
getMeetMan() {
console.log('执行了吗')
request({
url: '/system/role/getUsersByRoleCode',
method: 'get',
params: {
code: "jcjchc"
}
}).then(res => {
this.columnsMeetMan = res.data
})
},
// //
async orderTakingBefore(item) { async orderTakingBefore(item) {
this.takingData = { this.takingData = {
@ -406,6 +537,10 @@ export default {
} }
}) })
}, },
/**接车拍照 */
meetCarPhoto(data) {
this.selectedInfoId = data.id
},
gogogo() { gogogo() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/Neworder' url: '/pages/index/Neworder'
@ -720,4 +855,34 @@ export default {
top: -15rpx; top: -15rpx;
} }
} }
.on-inputx {
width: 100%;
display: flex;
align-items: center;
margin: 15px auto;
}
.popup-box {
overflow: hidden;
border-radius: 8px;
box-sizing: border-box;
padding: 15px;
width: 100%;
background-color: white;
margin-bottom: 80rpx;
}
.bottomx {
margin: 0 auto;
width: 225px;
height: 46px;
border-radius: 6px 6px 6px 6px;
opacity: 1;
border: 1px solid #0174F6;
display: flex;
align-items: center;
justify-content: center;
//color: #0174F6;
}
</style> </style>