优化操作流程2/3

This commit is contained in:
xiaofajia 2024-12-10 16:34:13 +08:00
parent d700f72a8c
commit be51b4a470
2 changed files with 46 additions and 8 deletions

View File

@ -80,7 +80,12 @@
<view class="l-right"> <view class="l-right">
<input type="text" v-model="customerSource" placeholder="请输入客户来源"> <input type="text" v-model="customerSource" placeholder="请输入客户来源">
</view> </view>
</view>
<view class="list-box">
<view class="l-left">代办人手机号</view>
<view class="l-right">
<input type="text" v-model="otherPhone" placeholder="请输入品牌型号">
</view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="l-left" @click="handleClick"> <view class="l-left" @click="handleClick">
@ -227,6 +232,7 @@ export default {
radioValue: '0', radioValue: '0',
carModel: '', carModel: '',
carNature: '', carNature: '',
otherPhone: '',
show: false, show: false,
shownature: false, shownature: false,
showgoods: false, showgoods: false,
@ -496,6 +502,7 @@ export default {
inspectionWorkNodes: this.inspectionWorkNodes, inspectionWorkNodes: this.inspectionWorkNodes,
leadManId: this.leadManId, leadManId: this.leadManId,
startTime: this.recordTime, startTime: this.recordTime,
otherPhone: this.otherPhone,
} }
let res = await request({ let res = await request({

View File

@ -38,9 +38,9 @@
<view class="m-top"> <view class="m-top">
<view class="top-left"> <view class="top-left">
<view class="dhei">{{ item.goodsName }}</view> <view class="dhei">{{ item.goodsName }}</view>
<text class="xhui">接待人{{ item.workerName }}</text> <text class="xhui">车型{{ item.goodsTitle }}</text>
<text class="xhui" style="margin-left: 50rpx;"> <text class="xhui" style="margin-left: 50rpx;">
检测类型{{ item.projectName }} 检测类型{{ item.skuName }}
</text> </text>
</view> </view>
<view @click="callUser(item.buyPhone)" class="top-right"> <view @click="callUser(item.buyPhone)" class="top-right">
@ -68,10 +68,15 @@
<text>客户来源</text> <text>客户来源</text>
<text>{{ item.customerSource }}</text> <text>{{ item.customerSource }}</text>
</view> </view>
<view class="on-input"> <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> <uni-icons type="more" color="#999999" size="16"></uni-icons>
<text>检测内容</text> <text class="single-line">检测内容</text>
<text>{{ item.carNum }}</text> <text class="multi-line">{{ item.nodeNames }}</text>
</view> </view>
<view class="bottom-di"> <view class="bottom-di">
<view class="button-container"> <view class="button-container">
@ -113,6 +118,7 @@
import config from '@/config' 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";
export default { export default {
data() { data() {
@ -272,19 +278,32 @@ export default {
method: 'get', method: 'get',
params: { params: {
partnerId: this.partnerId, partnerId: this.partnerId,
status: this.tapindex + 1, status: this.tapindex,
carNum: this.carNum, carNum: this.carNum,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNum: this.pageNum, pageNum: this.pageNum,
} }
}) })
if (res.code == 200) { if (res.code == 200) {
if (this.pageNum != 1) { if (this.pageNum != 1) {
this.infoDatas = this.infoDatas.concat(res.rows) this.infoDatas = this.infoDatas.concat(res.rows)
} else { } else {
this.infoDatas = res.rows this.infoDatas = res.rows
} }
const ids = this.infoDatas.filter(item => !item.nodeNames).map(item => item.id)
if (ids && ids.length > 0){
const response = await request({
url: "/partnerOwn/partner/getProjectByIds?ids=" + ids,
method: 'get'
})
if (response.data){
const data = response.data
this.infoDatas.forEach(item => {
this.$set(item, 'nodeNames', data[item.id])
})
}
}
let total = res.total let total = res.total
this.totalPages = Math.ceil(total / this.pageSize); this.totalPages = Math.ceil(total / this.pageSize);
} }
@ -590,4 +609,16 @@ export default {
font-weight: bold; font-weight: bold;
color: #FF571A; color: #FF571A;
} }
/* 确保 "检测内容:" 始终在一行 */
.single-line {
white-space: nowrap;
flex-shrink: 0;
}
/* 允许 item.nodeNames 多行显示 */
.multi-line {
white-space: pre-line; /* 保留换行符,但允许文本换行 */
word-break: break-all; /* 长单词或 URL 会在必要时断开 */
}
</style> </style>