This commit is contained in:
许允枞 2025-03-25 13:05:16 +08:00
parent 77c48e04f7
commit 58b4fc5fd1
3 changed files with 236 additions and 87 deletions

View File

@ -1,19 +1,21 @@
<!-- 新增线下订单-->
<template>
<view class="content">
<!-- <view style="width: 100%; height: 44px;"></view>-->
<!-- <view class="top-heder">-->
<!-- <view class="t-left" @click="getback()">-->
<!-- <uni-icons type="left" size="18"></uni-icons>-->
<!-- </view>-->
<!-- <view class="t-title">-->
<!-- <text>{{ title }}</text>-->
<!-- </view>-->
<!-- <view class="t-you"></view>-->
<!-- </view>-->
<!-- <view style="width: 100%; height: 44px;"></view>-->
<!-- <view class="top-heder">-->
<!-- <view class="t-left" @click="getback()">-->
<!-- <uni-icons type="left" size="18"></uni-icons>-->
<!-- </view>-->
<!-- <view class="t-title">-->
<!-- <text>{{ title }}</text>-->
<!-- </view>-->
<!-- <view class="t-you"></view>-->
<!-- </view>-->
<headersVue :titles="title" style="position: static !important;">
<u-icon name="arrow-left" color="#fff" size="18"></u-icon>
</headersVue>
<u-loading-page :loading="isLoading" style="z-index: 3"></u-loading-page>
<view class="mub">
<view class="top-ail">
@ -143,32 +145,42 @@
<input type="text" v-model="nickname" placeholder="请输入引车员">
</view>
</view>
<view class="list-box">
<view class="l-left" @click="showMeetMan = true">
<text style="color: red;font-weight: bold;text-align: center;">*</text>
接车员
<text class="xixi">点击选择</text>
</view>
<view class="l-right">
<input type="text" v-model="meetName" placeholder="请输入接车员">
</view>
</view>
<!-- <view class="list-box">-->
<!-- <view class="l-left">是否补录</view>-->
<!-- <view class="l-right">-->
<!-- <u-radio-group-->
<!-- v-model="radioValue"-->
<!-- iconPlacement="right"-->
<!-- @change="handleRadioChange"-->
<!-- >-->
<!-- <u-radio label="否" name="0" style="padding-right: 10rpx"></u-radio>-->
<!-- <u-radio label="是" name="1"></u-radio>-->
<!-- </u-radio-group>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="list-box">-->
<!-- <view class="l-left">是否补录</view>-->
<!-- <view class="l-right">-->
<!-- <u-radio-group-->
<!-- v-model="radioValue"-->
<!-- iconPlacement="right"-->
<!-- @change="handleRadioChange"-->
<!-- >-->
<!-- <u-radio label="否" name="0" style="padding-right: 10rpx"></u-radio>-->
<!-- <u-radio label="是" name="1"></u-radio>-->
<!-- </u-radio-group>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="list-box" v-if="radioValue === '1'">-->
<!-- <view class="l-left" @click="showRecord = true">-->
<!-- <text style="color: red;font-weight: bold;text-align: center;">*</text>-->
<!-- 选择补录时间-->
<!-- <text class="xixi">点击选择</text>-->
<!-- </view>-->
<!-- <view class="l-right">-->
<!-- <input type="text" v-model="recordTimeStr" placeholder="请选择补录时间">-->
<!-- </view>-->
<!-- <view class="list-box" v-if="radioValue === '1'">-->
<!-- <view class="l-left" @click="showRecord = true">-->
<!-- <text style="color: red;font-weight: bold;text-align: center;">*</text>-->
<!-- 选择补录时间-->
<!-- <text class="xixi">点击选择</text>-->
<!-- </view>-->
<!-- <view class="l-right">-->
<!-- <input type="text" v-model="recordTimeStr" placeholder="请选择补录时间">-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="list-box" @click="toSelectProject()" v-if="isInsert">
<view class="l-left">检测流程</view>
@ -204,6 +216,9 @@
<u-picker :show="showLeadMan" :columns="leadManList" :defaultIndex="defaultIndex" @confirm="confirmLeadMan"
@cancel="cancelLeadMan"
keyName="nickname"></u-picker>
<u-picker :show="showMeetMan" :columns="meetManList" :defaultIndex="defaultIndex" @confirm="confirmMeetMan"
@cancel="showMeetMan = false"
keyName="nickname"></u-picker>
<u-datetime-picker
:show="showRegisterDate"
v-model="carRegisterDate"
@ -211,14 +226,14 @@
@cancel="showRegisterDate = false"
@confirm="confirmRegisterDate"
></u-datetime-picker>
<!-- <u-datetime-picker-->
<!-- :show="showRecord"-->
<!-- v-model="recordTime"-->
<!-- :formatter="formatter"-->
<!-- @cancel="cancelRecord"-->
<!-- @confirm="confirmRecord"-->
<!-- mode="datetime"-->
<!-- ></u-datetime-picker>-->
<!-- <u-datetime-picker-->
<!-- :show="showRecord"-->
<!-- v-model="recordTime"-->
<!-- :formatter="formatter"-->
<!-- @cancel="cancelRecord"-->
<!-- @confirm="confirmRecord"-->
<!-- mode="datetime"-->
<!-- ></u-datetime-picker>-->
</view>
</view>
@ -255,7 +270,7 @@ export default {
carModel: '',
carNature: '',
otherPhone: '',
showRegisterDate:false,
showRegisterDate: false,
show: false,
shownature: false,
showgoods: false,
@ -263,11 +278,13 @@ export default {
showzhi: false,
showRecord: false,
showLeadMan: false,
showMeetMan: false,
skuId: 0,
inspectionWorkNodes: [],
defaultIndex: [0],
kehuDefaultIndex: [0],
goodsDefaultIndex: [0, 0],
meetName:'',
columns: [],
options: [],
nature: [],
@ -276,6 +293,7 @@ export default {
columnData: [],
xinlist: [],
zhilist: [],
isLoading:false,
recordTime: Number(new Date()),
baseUrl: this.$baseImageUrl,
goodsId: '',
@ -287,24 +305,29 @@ export default {
shopImages: [],
shoplist: {},
province: '',
carRegisterDateStr:'',
carRegisterDateStr: '',
unitName: '',
kehui: '',
naturetext: '',
customerData: [],
inspectionWorkNodeStr: "",
leadManId: undefined,
meetManId: undefined,
leadManList: [],
meetManList: [],
isInsert: true,
inspectionId: undefined,
xinDefaultIndex: [0],
recordTimeStr: '',
carRegisterDate : '',
carRegisterDate: '',
appointmentId: null
}
},
onLoad(options) {
this.getinitialize()
this.getLeadeMan()
async onLoad(options) {
this.isLoading = true
await this.getinitialize()
await this.getLeadeMan()
await this.getMeetMan()
uni.$on('selectProject', (data) => {
this.inspectionWorkNodes = data
for (var i = 0; i < this.inspectionWorkNodes.length; i++) {
@ -316,8 +339,14 @@ export default {
this.isInsert = false
this.inspectionId = options.inspectionInfoId
this.title = '修改线下订单'
this.getInspectionInfo()
await this.getInspectionInfo()
}
//
if (options.appointmentId) {
this.appointmentId = options.appointmentId
await this.getAppointmentDetail()
}
this.isLoading = false
},
onShow() {
@ -391,6 +420,11 @@ export default {
this.leadManId = e.value[0].id
this.showLeadMan = false
},
confirmMeetMan(e) {
this.meetName = e.value[0].nickname
this.meetManId = e.value[0].id
this.showMeetMan = false
},
confirmRecord(e) {
//
this.recordTime = e.value
@ -436,6 +470,60 @@ export default {
cancelRecord() {
this.showRecord = false
},
/*获取预约记录详情*/
async getAppointmentDetail() {
let res = await request({
url: `/inspection/appointment/${this.appointmentId}`,
method: 'get'
})
//
this.buyName = res.data.buyName
this.buyPhone = res.data.buyPhoneNum
//
this.carNum = res.data.carNo
//
this.carNature = res.data.carNature
//
this.carModel = res.data.carModel
//
this.carIdNo = res.data.carIdNo
//skuid
this.skuId = res.data.skuId
//goodsId
this.goodsId = res.data.goodsId
this.goodstext = this.findItemById(this.columnData, this.skuId).label
//change
// change
const mockEvent = {
columnIndex: 0, //
index: this.findGroupById(this.columnData, this.skuId).index, //
picker: this.$refs.uPicker //
};
this.changeHandler(mockEvent);
//goodsId
this.goodsDefaultIndex = [this.goodsone[0].findIndex(item => item.value === this.goodsId),this.$refs.uPicker.getColumnValues(1).findIndex(item => item.value == this.skuId)]
},
findItemById(data, id) {
for (const group of data) {
for (const item of group) {
if (item.value === id) {
return item; //
}
}
}
return null; // null
},
findGroupById(data, id) {
for (let index = 0; index < data.length; index++) {
const group = data[index];
for (const item of group) {
if (item.value === id) {
return { group, index }; //
}
}
}
return null; // null
},
/*获取引车员信息*/
getLeadeMan() {
request({
@ -448,6 +536,18 @@ export default {
this.leadManList.push(res.data)
})
},
/*获取接车员信息*/
getMeetMan() {
request({
url: '/system/role/getUsersByRoleCode',
method: 'get',
params: {
code: "jcjchc"
}
}).then(res => {
this.meetManList.push(res.data)
})
},
confirmsnature(e) {
this.naturetext = e.value[0].label
@ -539,7 +639,7 @@ export default {
}
let res = await request({
url: '/system/info/add',
url: '/system/info/add',
method: 'post',
data: data
})

View File

@ -122,11 +122,18 @@
</view>
<view class="box_" v-for="(item,index) in goodsList" :key="index" v-else>
<view class="box_ds">
<view class="box_title">{{ item.goodsTitle }}</view>
<u-tag :text="item.skuName" plain size="mini" style=" height: 44rpx; "></u-tag>
<!-- <image src="/static/imgs/ns.png" mode=""></image>-->
<view style="display: flex;justify-content: space-between;">
<view class="box_ds">
<view class="box_title">{{ item.goodsTitle }}</view>
<u-tag :text="item.skuName" plain size="mini" style=" height: 44rpx; "></u-tag>
<!-- <image src="/static/imgs/ns.png" mode=""></image>-->
</view>
<view style="color:#3c9cff;" @click="goAddOrder(item)" v-if="!item.orderId">
转订单
</view>
</view>
<view class="box_bd">
<view class="box_ds">
<image src="/static/imgs/car.png" style="width: 36rpx; height: 36rpx; " mode=""></image>
@ -278,21 +285,37 @@ export default {
uni.navigateTo({
url: '/pages/manage/internalManagement'
})
this.clearMyInterval()
},
goAddOrder(data){
uni.navigateTo({
url: `/pages/index/Neworder?appointmentId=${data.id}`
})
this.clearMyInterval()
},
clearMyInterval() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
goordermanage() {
uni.navigateTo({
url: '/pages/index/ordermanage'
})
this.clearMyInterval()
},
goNotice() {
uni.navigateTo({
url: '/pages/xiaoxi/notice'
})
this.clearMyInterval()
},
goordercount() {
uni.navigateTo({
url: '/pages/index/neworderStatistic'
})
this.clearMyInterval()
},
goback() {
uni.navigateBack()
@ -301,21 +324,25 @@ export default {
uni.navigateTo({
url: '/pages/order/order'
})
this.clearMyInterval()
},
coupon() {
uni.navigateTo({
url: '/pages/coupon/coupon'
})
this.clearMyInterval()
},
gocode() {
uni.navigateTo({
url: "/pages/my/rwm",
})
this.clearMyInterval()
},
gohomecar() {
uni.navigateTo({
url: "/pages/index/homecar",
})
this.clearMyInterval()
},
goPresent() {
if (!this.present?.filePath) {
@ -346,21 +373,25 @@ export default {
uni.navigateTo({
url: '/pages/Tollannouncement/Tollannouncement'
})
this.clearMyInterval()
},
goemployees() {
uni.navigateTo({
url: '/pages/index/countEmployees'
})
this.clearMyInterval()
},
goneworderStatistic() {
uni.navigateTo({
url: '/pages/index/orderStatistics'
})
this.clearMyInterval()
},
gobusiness() {
uni.navigateTo({
url: '/pages/statistics/business'
})
this.clearMyInterval()
},
gettel(num) {
const value = num.buyPhoneNum
@ -372,6 +403,7 @@ export default {
uni.navigateTo({
url: '/pages/index/UserInfo'
})
this.clearMyInterval()
},
avatarErr(err) {
console.log('err', err)
@ -381,6 +413,7 @@ export default {
uni.navigateTo({
url: '/pages/xiaoxi/xiaoxi?index=1'
})
this.clearMyInterval()
},
getUserInfo() {
let roleNames = getStorageWithExpiry("roleNames")

View File

@ -19,8 +19,9 @@
<scroll-view scroll-x="true" style="width: 100%;">
<view style="display: flex; align-items: center; white-space: nowrap;">
<view class="tap-box" v-for="(item, index) in tapList" :key="index" @click="tapqh(index)">
<view class="xhuihui" :class="{'xzhei': tapindex == index}" style="white-space: nowrap;margin-right: 0.5rem">
{{ item.text }}{{ countMap.length !== 0 ? ('(' + countMap.get(index + "") + ')') : '' }}
<view class="xhuihui" :class="{'xzhei': tapindex == index}"
style="white-space: nowrap;margin-right: 0.5rem">
{{ item.text }}{{ countMap.length !== 0 ? ('(' + countMap.get(index + 1 + "") + ')') : '' }}
</view>
<view class="gang" v-if="tapindex == index"></view>
</view>
@ -57,31 +58,33 @@
</view>
</view>
<view class="">
<view class="on-input">
<uni-icons type="person" color="#999999" size="16"></uni-icons>
<text>客户</text>
<text>{{ item.buyName ? item.buyName : "" }}</text>
</view>
<view class="on-input">
<uni-icons type="phone" color="#999999" size="16"></uni-icons>
<text>电话</text>
<text>{{ item.buyPhone }}</text>
<view v-if="isShowClient">
<view class="on-input">
<uni-icons type="person" color="#999999" size="16"></uni-icons>
<text>客户</text>
<text>{{ item.buyName ? item.buyName : "" }}</text>
</view>
<view class="on-input">
<uni-icons type="phone" color="#999999" size="16"></uni-icons>
<text>电话</text>
<text>{{ item.buyPhone }}</text>
</view>
<view class="on-input">
<uni-icons type="map" color="#999999" size="16"></uni-icons>
<text>客户来源</text>
<text>{{ item.customerSource }}</text>
</view>
<view class="on-input" v-if="item.otherPhone">
<uni-icons type="map" color="#999999" size="16"></uni-icons>
<text>代办人电话</text>
<text>{{ item.otherPhone }}</text>
</view>
</view>
<view class="on-input">
<uni-icons type="map" color="#999999" size="16"></uni-icons>
<text>车牌号</text>
<text>{{ item.carNum }}</text>
</view>
<view class="on-input">
<uni-icons type="map" color="#999999" size="16"></uni-icons>
<text>客户来源</text>
<text>{{ item.customerSource }}</text>
</view>
<view class="on-input" v-if="item.otherPhone">
<uni-icons type="map" color="#999999" size="16"></uni-icons>
<text>代办人电话</text>
<text>{{ item.otherPhone }}</text>
</view>
<view class="on-input" v-if="item.nodeNames">
<uni-icons type="more" color="#999999" size="16"></uni-icons>
<text class="single-line">检测内容</text>
@ -89,10 +92,12 @@
</view>
<view class="bottom-di">
<view class="button-container">
<u-button class="button" v-if="beginButtonShow.includes(tapindex)" @click="orderTakingBefore(item)" size="10">
<u-button class="button" v-if="beginButtonShow.includes(tapindex)" @click="orderTakingBefore(item)"
size="10">
开始检测
</u-button>
<u-button class="button" v-if="cancelButtonShow.includes(tapindex)" @click="cancelAnOrder(item)" size="10">
<u-button class="button" v-if="cancelButtonShow.includes(tapindex)" @click="cancelAnOrder(item)"
size="10">
取消接单
</u-button>
<u-button class="button" @click="godetails(item)" size="10">查看详情</u-button>
@ -132,6 +137,7 @@ import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
export default {
data() {
return {
isShowClient: false,
msgSocket: this.$msgSocket,
imgurl: this.$imgeUrl,
baseUrl: this.$baseUrl,
@ -139,6 +145,7 @@ export default {
partnerId: uni.getStorageSync("partnerId"),
goodsTitle: '',
tapindex: 0,
tapValue: 1,
isExamine: false,
msg: '1',
carNum: '',
@ -168,23 +175,27 @@ export default {
// },
{
text: "待检测",
value: "2"
value: "1"
},
{
text: "检测中",
value: "3",
value: "2",
},
{
text: "待重检",
value: "4",
value: "3",
},
{
text: "待复检",
value: "5",
value: "4",
},
{
text: "已完成",
value: "5",
},
{
text: "待接车",
value: "6",
},
],
@ -194,8 +205,8 @@ export default {
workNodeId: null,
id: null
},
beginButtonShow: [1, 3, 4],
cancelButtonShow: [2],
beginButtonShow: [0, 2, 3],
cancelButtonShow: [1],
countMap: []
}
},
@ -231,7 +242,7 @@ export default {
tabBar,
},
methods: {
async getCount(){
async getCount() {
await request({
url: '/system/info/getCountByType?partnerId=' + this.partnerId,
method: 'get'
@ -272,7 +283,7 @@ export default {
url: `/system/info/getWorkNodeByIdAndNow?id=${item.id}&status=${(this.tapindex === 4 ? "3" : "0")}${(this.tapindex === 3 ? "&flag=false" : "")}`,
method: 'get',
})
if (res.data){
if (res.data) {
this.chooseWorkNodes = [Object.keys(res.data).map(key => ({
value: key,
label: res.data[key]
@ -318,7 +329,7 @@ export default {
method: 'get',
params: {
partnerId: this.partnerId,
status: this.tapindex,
status: this.tapValue,
carNum: this.carNum,
pageSize: this.pageSize,
pageNum: this.pageNum,
@ -331,12 +342,12 @@ export default {
this.infoDatas = res.rows
}
const ids = this.infoDatas.filter(item => !item.nodeNames).map(item => item.id)
if (ids && ids.length > 0){
if (ids && ids.length > 0) {
const response = await request({
url: "/partnerOwn/partner/getProjectByIds?ids=" + ids,
method: 'get'
})
if (response.data){
if (response.data) {
const data = response.data
this.infoDatas.forEach(item => {
this.$set(item, 'nodeNames', data[item.id])
@ -406,6 +417,10 @@ export default {
})
},
tapqh(index) {
//
if (this.tapList[index].value == '6') {
}
this.tapValue = this.tapList[index].value
this.tapindex = index
this.infoDatas = []
this.pageNum = 1
@ -681,6 +696,7 @@ export default {
border-radius: 20rpx; /* 椭圆效果 */
white-space: nowrap; /* 确保文本不换行 */
}
.icon1 {
position: relative;
width: 56rpx;