This commit is contained in:
许允枞 2025-03-12 18:02:00 +08:00
parent 2f04c1adcf
commit a4c1fd25b4
3 changed files with 546 additions and 441 deletions

View File

@ -42,7 +42,7 @@
<text>检测类型</text>
<text>{{ detailData.goodsName }}</text>
</view>
<view class="dis-hui">
<view class="dis-hui" v-if="roleSelect == 'shop'">
<text></text>
<text>{{ detailData.goodsPrice / 100 }}</text>
</view>

View File

@ -18,7 +18,7 @@
<view v-else>
<image :src="sureWorker.avatar" mode=""></image>
</view>
<view style="margin-left: 35%;" v-if="sureWorker.workName" class="h-title">{{sureWorker.workName}} </view>
<view style="margin-left: 35%;" v-if="sureWorker.nickname" class="h-title">{{ sureWorker.nickname }}</view>
<view class="sanniu" @click="getWorker()">
<text>选择接待员</text>
</view>
@ -77,11 +77,28 @@
<view class="o-zui">{{ (orderInfo.payMoney + orderInfo.balance) / 100 }}</view>
</view>
<view class="on-input">
<view class="o-left" @click="showLeadMan = true">
<text style="color: red;font-weight: bold;text-align: center;">*</text>
引车员
<text class="xixi">点击选择</text>
</view>
<view class="o-right">
<input type="text" v-model="leadManName" placeholder="请输入引车员">
</view>
</view>
<view class="on-input" @click="toSelectProject()" v-if="isInsert">
<view class="o-left">检测流程</view>
<view class="o-right">
<input type="textarea" v-model="inspectionWorkNodeStr" placeholder="点击选择检测流程">
</view>
</view>
</view>
<view @click="takeOut()" class="annniu">
<view class="">开始检测</view>
</view>
<u-picker :show="show" :columns="columns" keyName="label" @close="close" @confirm="confirm" @change="change" @cancel="cancel"></u-picker>
<u-picker :show="show" :columns="columns" keyName="label" @close="close" @confirm="confirm" @change="change"
@cancel="cancel"></u-picker>
<u-popup :show="xling" @close="closexl" :round="10" @open="openxl">
<view class="popup-box">
<view class="sousuo">
@ -92,7 +109,9 @@
<view class="list-box">
<scroll-view class="list_scroll" scroll-y="true">
<view class="list-qiu" v-for="(item,index) in workerList" :key="index">
<view class="">{{item.workName}} <text class="tel">{{item.workPhone}}</text> </view>
<view class="">{{ item.nickname }}
<text class="tel">{{ item.mobile }}</text>
</view>
<view class="banniu">
<text @click="sureWorkerFun(item)">选择</text>
</view>
@ -101,12 +120,16 @@
</view>
</view>
</u-popup>
<u-picker :show="showLeadMan" :columns="leadManList" :defaultIndex="defaultIndex" @confirm="confirmLeadMan"
@cancel="cancelLeadMan"
keyName="nickname"></u-picker>
</view>
</template>
<script>
import config from '@/config'
import request from '../../utils/request';
export default {
data() {
return {
@ -122,13 +145,29 @@
partnerId: uni.getStorageSync("partnerId"),
orderInfo: {},
searchValue: '',
sureWorker:{}
inspectionWorkNodeStr: "",
inspectionWorkNodes: [],
sureWorker: {},
leadManList: [],
showLeadMan: false,
defaultIndex: [0],
isInsert: true,
leadManName:'',
leadManId:'',
}
},
onLoad(opion) {
this.orderId = opion.orderId
this.getindex()
uni.$on('selectProject', (data) => {
this.inspectionWorkNodes = data
for (var i = 0; i < this.inspectionWorkNodes.length; i++) {
this.inspectionWorkNodeStr = this.inspectionWorkNodeStr + this.inspectionWorkNodes[i].projectName + " "
this.inspectionWorkNodes[i].orderNum = i + 1
}
});
this.getLeadeMan()
},
methods: {
async takeOut() {
@ -146,15 +185,30 @@
})
return
}
if (!this.inspectionWorkNodes.length) {
uni.showToast({
title: "请选择检测流程",
icon: "error"
})
return
}
if (!this.leadManId) {
uni.showToast({
title: "请选择引车员",
icon: "error"
})
return
}
let res = await request({
url: '/partnerOwn/partner/takeOut',
method: 'post',
params:{
data: {
partnerId: this.partnerId,
orderId: this.orderId,
workId: this.sureWorker.id,
inspectionWorkNodes: this.inspectionWorkNodes,
leadManId: this.leadManId,
carNum: this.cph
},
})
@ -163,9 +217,7 @@
title: "订单正式开始"
})
setTimeout(() => {
uni.navigateTo({
url:"/pages/index/index"
})
uni.navigateBack()
}, 1000);
} else {
uni.showToast({
@ -175,6 +227,31 @@
}
},
cancelLeadMan() {
this.showLeadMan = false
},
confirmLeadMan(e) {
this.leadManName = e.value[0].nickname
this.leadManId = e.value[0].id
this.showLeadMan = false
},
toSelectProject() {
uni.navigateTo({
url: `/pages/index/selectProject?selectProject=${JSON.stringify(this.inspectionWorkNodes)}`
})
},
/*获取引车员信息*/
getLeadeMan() {
request({
url: '/system/role/getUsersByRoleCode',
method: 'get',
params: {
code: "jcycy"
}
}).then(res => {
this.leadManList.push(res.data)
})
},
async sureWorkerFun(data) {
this.sureWorker = data
this.xling = false
@ -188,7 +265,7 @@
partnerId: this.partnerId,
workName: this.searchValue,
pageNum: 1,
pageSize:100,
pageSize: 1000,
},
})
this.workerList = res.rows
@ -237,6 +314,7 @@
width: 100%;
height: 100%;
}
.content {
box-sizing: border-box;
width: 100%;
@ -257,18 +335,22 @@
padding-bottom: 15px;
margin-bottom: 10px;
}
.t-title {
font-size: 17px;
font-weight: bold;
color: #333333;
}
.t-left {
width: 10%;
}
.t-you {
height: 100%;
width: 10%;
}
.x-box {
width: 95%;
margin: 10px auto;
@ -278,6 +360,7 @@
padding: 10px;
background: white;
}
.touxiang {
width: 50px;
height: 50px;
@ -286,6 +369,7 @@
margin: 10px auto;
}
.sanniu {
width: 105px;
height: 35px;
@ -300,6 +384,7 @@
line-height: 15px;
margin: 0 auto;
}
.annniu {
width: 90%;
height: 45px;
@ -314,6 +399,7 @@
line-height: 15px;
margin: 15px auto;
}
.banniu {
width: 20%;
height: 30px;
@ -326,15 +412,18 @@
font-weight: 400;
color: #FFFFFF;
}
.box {
}
.box-dis {
box-sizing: border-box;
padding: 15px;
// border-bottom: 1px solid #EEEEEE;
display: flex;
}
.shop-img {
width: 80px;
height: 80px;
@ -342,6 +431,7 @@
overflow: hidden;
margin-right: 10px;
}
.dis-hui {
width: 100%;
display: flex;
@ -351,12 +441,14 @@
color: #999999;
margin-bottom: 5px;
}
.h-title {
font-size: 16px;
font-weight: bold;
color: #333333;
margin-bottom: 5px;
}
.box-top {
box-sizing: border-box;
padding: 15px;
@ -366,6 +458,7 @@
align-items: center;
justify-content: space-around;
}
.t-input {
width: 90%;
margin: 20px auto;
@ -375,6 +468,7 @@
padding: 2px 5px;
}
.on-input {
width: 100%;
display: flex;
@ -382,6 +476,7 @@
align-items: center;
margin: 15px auto;
}
.bottom-input {
border-top: 1px solid #F4F4F4;
box-sizing: border-box;
@ -390,21 +485,25 @@
justify-content: space-between;
width: 100%;
}
.o-left {
font-size: 15px;
font-weight: 400;
color: #666666;
}
.o-right {
font-size: 15px;
font-weight: 400;
color: #333333;
}
.o-zui {
font-size: 20px;
font-weight: 500;
color: #333333;
}
.popup-box {
overflow: hidden;
border-radius: 8px;
@ -413,6 +512,7 @@
width: 100%;
background-color: white;
}
.sousuo {
width: 95%;
margin: 0 auto;
@ -426,10 +526,12 @@
display: flex;
align-items: center;
justify-content: space-between;
input {
width: 80%;
}
}
.list-box {
width: 100%;
height: 300px;
@ -437,12 +539,14 @@
box-sizing: border-box;
}
.list_scroll {
height: 100%; //
display: flex;
flex-direction: column;
}
.list-qiu {
width: 95%;
border-bottom: 1px solid #EEEEEE;
@ -452,6 +556,7 @@
justify-content: space-between;
align-items: center;
}
.tel {
margin-left: 5px;
font-size: 15px;