更新
This commit is contained in:
parent
e7b438e29a
commit
6f1ca7d356
@ -261,9 +261,10 @@ import upload from '@/utils/upload.js'
|
||||
import {getToken, getTenantId} from '@/utils/auth'
|
||||
import {formatDate} from "@/utils/utils";
|
||||
import headersVue from "@/components/header/headers.vue";
|
||||
import USwitch from "@/uni_modules/uview-ui/components/u-switch/u-switch.vue";
|
||||
|
||||
export default {
|
||||
components: {headersVue},
|
||||
components: {USwitch, headersVue},
|
||||
data() {
|
||||
return {
|
||||
imagePath: '',
|
||||
@ -508,6 +509,11 @@ export default {
|
||||
//goodsId
|
||||
this.goodsId = res.data.goodsId
|
||||
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事件
|
||||
const mockEvent = {
|
||||
@ -616,9 +622,9 @@ export default {
|
||||
})
|
||||
},
|
||||
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({
|
||||
title: '车牌号 客户来源 商品 引车员 必填!',
|
||||
title: '车牌号 客户来源 商品 引车员 车辆注册日期 接车人 必填!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
|
@ -811,6 +811,7 @@ image {
|
||||
.box_ds {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.box_bd {
|
||||
@ -835,6 +836,9 @@ image {
|
||||
font-size: 32rpx;
|
||||
color: #101A3E;
|
||||
margin-right: 10rpx;
|
||||
white-space: nowrap; /* 禁止换行 */
|
||||
overflow: hidden; /* 超出部分隐藏 */
|
||||
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
||||
}
|
||||
|
||||
.size_ {
|
||||
|
@ -171,7 +171,7 @@
|
||||
|
||||
</view>
|
||||
<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>
|
||||
<view class="annniu"
|
||||
@ -389,6 +389,16 @@ export default {
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// 在组件挂载后启动定时器
|
||||
this.timer = setInterval(this.getindex, 10000);
|
||||
},
|
||||
onHide() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null
|
||||
},
|
||||
onUnload() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
judgeUpdateLeadMan(){
|
||||
@ -399,6 +409,12 @@ export default {
|
||||
this.isChangeLeadMan = res.data
|
||||
})
|
||||
},
|
||||
cancelInterval(){
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
chooseBank(e) {
|
||||
this.receivablesAccount = e.value[0]
|
||||
this.bankShow = false
|
||||
@ -802,8 +818,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// 在组件挂载后启动定时器
|
||||
this.timer = setInterval(this.getindex, 3000);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 在组件销毁前清除定时器
|
||||
|
@ -25,7 +25,7 @@
|
||||
</view>
|
||||
|
||||
<view class="cont">
|
||||
<view class="c-box" @click="addwenjian()">
|
||||
<view class="c-box" @click="addwenjian()" v-if="isHasRole">
|
||||
<!-- <view class="">
|
||||
<image src="../../static/imgs/wenjianjia.png" mode=""></image>
|
||||
</view> -->
|
||||
@ -55,9 +55,9 @@
|
||||
<view class="" v-if="!item.count" style=" visibility: hidden;">{{ '1' }}</view>
|
||||
<view class="bsd-dis">
|
||||
<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="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>
|
||||
|
||||
@ -119,6 +119,7 @@ export default {
|
||||
drawerData: [],
|
||||
isLoading: false,
|
||||
imageUrl: config.baseImageUrl + '/',
|
||||
isHasRole:false
|
||||
}
|
||||
},
|
||||
|
||||
@ -131,7 +132,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
this.getlist()
|
||||
|
||||
this.ifHasRole()
|
||||
},
|
||||
onBackPress(options) {
|
||||
// 点击虚拟键或者侧滑的时候触发(不允许返回)
|
||||
@ -183,6 +184,15 @@ export default {
|
||||
this.isLoading = false
|
||||
// this.getCountByDirectory()
|
||||
},
|
||||
ifHasRole() {
|
||||
request({
|
||||
url: '/partnerOwn/partner/ifHasRole',
|
||||
method: 'get',
|
||||
params: {dictType: 'ins_file_role'}
|
||||
}).then((res) => {
|
||||
this.isHasRole = res.data
|
||||
})
|
||||
},
|
||||
showHistory(id) {
|
||||
this.isShow = true
|
||||
this.isShow = true
|
||||
|
@ -65,6 +65,11 @@ export default {
|
||||
if (this.page < this.pages) {
|
||||
this.page++;
|
||||
this.getRoyalty();
|
||||
}else if (this.page === this.pages) {
|
||||
uni.showToast({
|
||||
title: '没有更多数据了',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -15,7 +15,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 添加编辑按钮 -->
|
||||
<view class="edit-button" >
|
||||
<view class="edit-button">
|
||||
<view style="margin-bottom: 10px" @click="modifyPassword">修改密码</view>
|
||||
<view style="margin-top: 10px" @click="editUserInfo">编辑信息</view>
|
||||
</view>
|
||||
@ -82,19 +82,19 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="ian-box">-->
|
||||
<!-- <view class="on-input" @click="goWord()">-->
|
||||
<!-- <view class="dix">-->
|
||||
<!-- <view class="d-icon">-->
|
||||
<!-- <image src="../../static/detection/zhaq.png" mode=""></image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="aa">word</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="">-->
|
||||
<!-- <uni-icons type="right" color="#999999" size="16"></uni-icons>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="ian-box">-->
|
||||
<!-- <view class="on-input" @click="goWord()">-->
|
||||
<!-- <view class="dix">-->
|
||||
<!-- <view class="d-icon">-->
|
||||
<!-- <image src="../../static/detection/zhaq.png" mode=""></image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="aa">word</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view class="">-->
|
||||
<!-- <uni-icons type="right" color="#999999" size="16"></uni-icons>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="ian-box">
|
||||
<!-- <view class="on-input">
|
||||
<view class="dix">
|
||||
@ -133,7 +133,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="alertDialog" type="dialog">
|
||||
<uni-popup-dialog cancelText="关闭" confirmText="同意" title="通知" content="您确认要退出吗!"
|
||||
<uni-popup-dialog cancelText="关闭" confirmText="同意" title="通知" content="您确认要退出吗!"
|
||||
@confirm="dialogConfirm"
|
||||
@close="dialogClose"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
@ -189,10 +189,11 @@ export default {
|
||||
this.tui()
|
||||
this.$refs.alertDialog.close()
|
||||
},
|
||||
ifAppointment(){
|
||||
ifAppointment() {
|
||||
request({
|
||||
url: '/partnerOwn/partner/ifAppointment',
|
||||
url: '/partnerOwn/partner/ifHasRole',
|
||||
method: 'get',
|
||||
params: {dictType: 'ins_appointment_role'}
|
||||
}).then((res) => {
|
||||
this.lookAppointment = res.data
|
||||
})
|
||||
|
@ -100,6 +100,14 @@
|
||||
size="10">
|
||||
取消接单
|
||||
</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>
|
||||
</view>
|
||||
</view>
|
||||
@ -108,6 +116,21 @@
|
||||
</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">
|
||||
<u-picker :show="show" :columns="chooseWorkNodes" @confirm="confirms" @cancel="cancels"
|
||||
@ -133,6 +156,7 @@ import config from '@/config'
|
||||
import request from '../../utils/request';
|
||||
import tabBar from '../../components/staffTabBer/tabBar.vue'
|
||||
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
|
||||
import upload from "@/utils/upload";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@ -142,9 +166,13 @@ export default {
|
||||
imgurl: this.$imgeUrl,
|
||||
baseUrl: this.$baseUrl,
|
||||
infoDatas: {},
|
||||
openMeetCar: false,
|
||||
selectedInfoId: undefined,
|
||||
partnerId: uni.getStorageSync("partnerId"),
|
||||
goodsTitle: '',
|
||||
tapindex: 0,
|
||||
fileList1: [],
|
||||
fileList2: [],
|
||||
tapValue: 1,
|
||||
isExamine: false,
|
||||
msg: '1',
|
||||
@ -153,6 +181,7 @@ export default {
|
||||
noReadNum: 1,
|
||||
pageSize: 20,//一页多少张
|
||||
totalPages: 0,//总数
|
||||
remark: '',
|
||||
// tapList: [
|
||||
// {
|
||||
// text: "待接受",
|
||||
@ -200,13 +229,16 @@ export default {
|
||||
},
|
||||
],
|
||||
chooseWorkNodes: [],
|
||||
columnsMeetMan: [],
|
||||
show: false,
|
||||
showMeetMan: false,
|
||||
takingData: {
|
||||
workNodeId: null,
|
||||
id: null
|
||||
},
|
||||
beginButtonShow: [0, 2, 3],
|
||||
cancelButtonShow: [1],
|
||||
meetCarButtonShow: [5],
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/xiaoxi/notice?type=staff'
|
||||
@ -273,6 +364,46 @@ export default {
|
||||
cancels() {
|
||||
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) {
|
||||
this.takingData = {
|
||||
@ -406,6 +537,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
/**接车拍照 */
|
||||
meetCarPhoto(data) {
|
||||
this.selectedInfoId = data.id
|
||||
},
|
||||
gogogo() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/Neworder'
|
||||
@ -720,4 +855,34 @@ export default {
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user