增加新增工单时选择引车员

This commit is contained in:
许允枞 2024-11-12 16:40:34 +08:00
parent 0d01cf9c94
commit 577b1bf762

View File

@ -44,13 +44,18 @@
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="l-left"><text style="color: red;font-weight: bold;text-align: center;">* </text>车牌号</view> <view class="l-left">
<text style="color: red;font-weight: bold;text-align: center;">*</text>
车牌号
</view>
<view class="l-right"> <view class="l-right">
<input type="text" v-model="carNum" placeholder="请输入车牌号"> <input type="text" v-model="carNum" placeholder="请输入车牌号">
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="l-left" @click="showzhi = true">使用性质 <text class="xixi">点击选择</text></view> <view class="l-left" @click="showzhi = true">使用性质
<text class="xixi">点击选择</text>
</view>
<view class="l-right"> <view class="l-right">
<input type="text" v-model="carNature" placeholder="请输入使用性质"> <input type="text" v-model="carNature" placeholder="请输入使用性质">
</view> </view>
@ -68,22 +73,43 @@
</view> </view>
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="l-left" @click="show = true"><text style="color: red;font-weight: bold;text-align: center;">* </text>客户来源<text class="xixi">点击选择</text></view> <view class="l-left" @click="show = true">
<text style="color: red;font-weight: bold;text-align: center;">*</text>
客户来源
<text class="xixi">点击选择</text>
</view>
<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>
<view class="list-box"> <view class="list-box">
<view class="l-left" @click="showgoods = true"><text style="color: red;font-weight: bold;text-align: center;">* </text>商品选择<text class="xixi">点击选择</text></view> <view class="l-left" @click="showgoods = true">
<text style="color: red;font-weight: bold;text-align: center;">*</text>
商品选择
<text class="xixi">点击选择</text>
</view>
<view class="l-right"> <view class="l-right">
<text>{{ goodstext }}</text> <text>{{ goodstext }}</text>
<!-- <input type="text" v-model="goodstext" placeholder="请选择商品"> --> <!-- <input type="text" v-model="goodstext" placeholder="请选择商品"> -->
</view> </view>
</view> </view>
<view class="list-box">
<view class="l-left" @click="showLeadMan = 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="nickname" placeholder="请输入引车员">
</view>
</view>
<view class="list-box"> <view class="list-box">
<view class="l-left" @click="showxin = true">新旧车 <text class="xixi">点击选择</text> </view> <view class="l-left" @click="showxin = true">新旧车
<text class="xixi">点击选择</text>
</view>
<view class="l-right"> <view class="l-right">
<input type="text" v-model="carStatus" placeholder="请输入新旧车"> <input type="text" v-model="carStatus" placeholder="请输入新旧车">
</view> </view>
@ -116,12 +142,18 @@
</view> </view>
<u-picker :show="show" :columns="columns" @confirm="confirms" @cancel="cancels" keyName="label"></u-picker> <u-picker :show="show" :columns="columns" @confirm="confirms" @cancel="cancels" keyName="label"></u-picker>
<u-picker :show="showgoods" ref="uPicker" :columns="goodsone" @confirm="confirmgoods" @cancel="cancelgoods" @change="changeHandler" keyName="label"></u-picker> <u-picker :show="showgoods" ref="uPicker" :columns="goodsone" @confirm="confirmgoods" @cancel="cancelgoods"
@change="changeHandler" keyName="label"></u-picker>
<u-picker :show="shownature" :columns="nature" @confirm="confirmsnature" @cancel="cancelsnature" keyName="label"></u-picker> <u-picker :show="shownature" :columns="nature" @confirm="confirmsnature" @cancel="cancelsnature"
keyName="label"></u-picker>
<u-picker :show="showxin" :columns="xinlist" @confirm="confirmxin" @cancel="cancelxin" keyName="label"></u-picker> <u-picker :show="showxin" :columns="xinlist" @confirm="confirmxin" @cancel="cancelxin"
<u-picker :show="showzhi" :columns="zhilist" @confirm="confirmzhi" @cancel="cancelzhi" keyName="label"></u-picker> keyName="label"></u-picker>
<u-picker :show="showzhi" :columns="zhilist" @confirm="confirmzhi" @cancel="cancelzhi"
keyName="label"></u-picker>
<u-picker :show="showLeadMan" :columns="leadManList" @confirm="confirmLeadMan" @cancel="cancelLeadMan"
keyName="nickname"></u-picker>
</view> </view>
</view> </view>
@ -136,6 +168,7 @@
import request from '../../utils/request'; import request from '../../utils/request';
import upload from '@/utils/upload.js' import upload from '@/utils/upload.js'
import {getToken, getTenantId} from '@/utils/auth' import {getToken, getTenantId} from '@/utils/auth'
export default { export default {
data() { data() {
return { return {
@ -143,6 +176,7 @@
fileList: [], fileList: [],
customerSource: '', customerSource: '',
buyName: '', buyName: '',
nickname:'',
buyPhone: '', buyPhone: '',
userAddress: '', userAddress: '',
carNum: '', carNum: '',
@ -155,6 +189,7 @@
showgoods: false, showgoods: false,
showxin: false, showxin: false,
showzhi: false, showzhi: false,
showLeadMan: false,
skuId: 0, skuId: 0,
inspectionWorkNodes: [], inspectionWorkNodes: [],
columns: [], columns: [],
@ -179,11 +214,14 @@
kehui: '', kehui: '',
naturetext: '', naturetext: '',
customerData: [], customerData: [],
inspectionWorkNodeStr:"" inspectionWorkNodeStr: "",
leadManId:undefined,
leadManList: []
} }
}, },
onLoad() { onLoad() {
this.getinitialize() this.getinitialize()
this.getLeadeMan()
uni.$on('selectProject', (data) => { uni.$on('selectProject', (data) => {
this.inspectionWorkNodes = data this.inspectionWorkNodes = data
for (var i = 0; i < this.inspectionWorkNodes.length; i++) { for (var i = 0; i < this.inspectionWorkNodes.length; i++) {
@ -234,9 +272,29 @@
this.carNature = e.value[0].label this.carNature = e.value[0].label
this.showzhi = false this.showzhi = false
}, },
confirmLeadMan(e) {
this.nickname = e.value[0].nickname
this.leadManId = e.value[0].id
this.showLeadMan = false
},
cancelzhi() { cancelzhi() {
this.showzhi = false this.showzhi = false
}, },
cancelLeadMan() {
this.showLeadMan = false
},
/*获取引车员信息*/
getLeadeMan() {
request({
url: '/system/role/getUsersByRoleCode',
method: 'get',
params: {
code: "jcycy"
}
}).then(res => {
this.leadManList.push(res.data)
})
},
confirmsnature(e) { confirmsnature(e) {
this.naturetext = e.value[0].label this.naturetext = e.value[0].label
@ -257,7 +315,6 @@
let res = await request({ let res = await request({
url: '/partnerOwn/partner/getCustomerSource', url: '/partnerOwn/partner/getCustomerSource',
method: 'get', method: 'get',
}) })
this.columns.push(res.data) this.columns.push(res.data)
let rescar = await request({ let rescar = await request({
@ -290,9 +347,9 @@
}) })
}, },
async getgoodes() { async getgoodes() {
if(this.carNum == ''|| this.customerSource == "" || this.skuId == ''){ if (this.carNum == '' || this.customerSource == "" || this.skuId == '' || this.leadManId == undefined) {
uni.showToast({ uni.showToast({
title:'车牌号 客户来源 商品 必填!', title: '车牌号 客户来源 商品 引车员 必填!',
icon: 'none' icon: 'none'
}) })
return return
@ -318,7 +375,8 @@
customerSource: this.customerSource, customerSource: this.customerSource,
skuId: this.skuId, skuId: this.skuId,
carNature: this.carNature, carNature: this.carNature,
inspectionWorkNodes:this.inspectionWorkNodes inspectionWorkNodes: this.inspectionWorkNodes,
leadManId: this.leadManId
} }
let res = await request({ let res = await request({
@ -336,7 +394,6 @@
}, 2000); }, 2000);
}, },
// //
@ -461,8 +518,6 @@
} }
} }
} }
</script> </script>
@ -485,18 +540,22 @@
box-sizing: border-box; box-sizing: border-box;
padding: 5px 15px; padding: 5px 15px;
} }
.t-title { .t-title {
font-size: 17px; font-size: 17px;
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
} }
.t-left { .t-left {
width: 10%; width: 10%;
} }
.t-you { .t-you {
height: 100%; height: 100%;
width: 20%; width: 20%;
} }
.t-input { .t-input {
width: 80%; width: 80%;
height: 36px; height: 36px;
@ -508,6 +567,7 @@
align-items: center; align-items: center;
} }
.top-ail { .top-ail {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
@ -515,14 +575,17 @@
background-color: #F4F4F4; background-color: #F4F4F4;
// height: calc(100vh); // height: calc(100vh);
} }
.mub { .mub {
background-color: #F4F4F4; background-color: #F4F4F4;
height: calc(100vh); height: calc(100vh);
} }
.dix { .dix {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.upimg { .upimg {
width: 100%; width: 100%;
height: 126px; height: 126px;
@ -530,11 +593,13 @@
box-sizing: border-box; box-sizing: border-box;
background-color: white; background-color: white;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.box-list { .box-list {
width: 100%; width: 100%;
border-radius: 8px; border-radius: 8px;
@ -543,6 +608,7 @@
background-color: white; background-color: white;
margin: 10px auto; margin: 10px auto;
} }
.list-box { .list-box {
display: flex; display: flex;
align-items: center; align-items: center;
@ -551,17 +617,20 @@
padding: 15px 5px; padding: 15px 5px;
border-bottom: 1px solid #EEEEEE; border-bottom: 1px solid #EEEEEE;
} }
.l-left { .l-left {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
} }
.l-right { .l-right {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
color: #999999; color: #999999;
text-align: right; text-align: right;
} }
.xiaolan { .xiaolan {
// width: 109px; // width: 109px;
// height: 30px; // height: 30px;
@ -576,6 +645,7 @@
font-weight: 400; font-weight: 400;
color: #0D2E8D; color: #0D2E8D;
} }
.xiaohui { .xiaohui {
// width: 141px; // width: 141px;
// height: 30px; // height: 30px;
@ -589,17 +659,20 @@
margin: 10px; margin: 10px;
} }
.hui-right { .hui-right {
border-left: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD;
padding: 5px; padding: 5px;
margin-left: 5px; margin-left: 5px;
} }
.wrap-box { .wrap-box {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.bottom-di { .bottom-di {
width: 100%; width: 100%;
height: 56px; height: 56px;
@ -612,6 +685,7 @@
padding: 0px 20px; padding: 0px 20px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.thui { .thui {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
@ -619,10 +693,12 @@
margin-top: 10px; margin-top: 10px;
margin-left: 8px; margin-left: 8px;
} }
.imgs { .imgs {
box-sizing: border-box; box-sizing: border-box;
margin-top: 20px; margin-top: 20px;
} }
.p-box { .p-box {
border-radius: 10px; border-radius: 10px;
overflow: hidden; overflow: hidden;
@ -631,6 +707,7 @@
width: 100%; width: 100%;
background-color: white; background-color: white;
} }
.p-top { .p-top {
width: 100%; width: 100%;
text-align: center; text-align: center;
@ -639,6 +716,7 @@
color: #000000; color: #000000;
margin-bottom: 20px; margin-bottom: 20px;
} }
.on-input { .on-input {
width: 100%; width: 100%;
display: flex; display: flex;
@ -646,6 +724,7 @@
box-sizing: border-box; box-sizing: border-box;
} }
.ipt-kuang { .ipt-kuang {
width: 70%; width: 70%;
height: 30px; height: 30px;
@ -659,12 +738,14 @@
box-sizing: border-box; box-sizing: border-box;
padding: 0px 10px; padding: 0px 10px;
} }
.t-left { .t-left {
width: 20%; width: 20%;
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
color: #000000; color: #000000;
} }
.dlanniu { .dlanniu {
width: 80%; width: 80%;
height: 45px; height: 45px;
@ -676,9 +757,11 @@
margin: 20px auto; margin: 20px auto;
color: white; color: white;
} }
.da { .da {
font-size: 16px; font-size: 16px;
} }
// //
.top { .top {
box-sizing: border-box; box-sizing: border-box;
@ -688,6 +771,7 @@
margin: 10px auto; margin: 10px auto;
background-color: white; background-color: white;
} }
.top-box { .top-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -695,12 +779,14 @@
box-sizing: border-box; box-sizing: border-box;
padding: 20px 0px; padding: 20px 0px;
} }
.tb-left { .tb-left {
height: 100%; height: 100%;
width: 80%; width: 80%;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.uicon { .uicon {
width: 18px; width: 18px;
height: 18px; height: 18px;
@ -714,31 +800,37 @@
font-weight: bold; font-weight: bold;
margin-right: 6px; margin-right: 6px;
} }
.tb-right { .tb-right {
width: 20px; width: 20px;
height: 26px; height: 26px;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.text1 { .text1 {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
color: #363636; color: #363636;
} }
.hong1 { .hong1 {
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
color: #FF5453; color: #FF5453;
} }
.hong2 { .hong2 {
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
font-weight: 400; font-weight: 400;
} }
.tinput { .tinput {
width: 100%; width: 100%;
display: flex; display: flex;
@ -749,6 +841,7 @@
padding: 16px; padding: 16px;
margin-top: 14px; margin-top: 14px;
} }
.xixi { .xixi {
font-size: 12px; font-size: 12px;
color: #0D2E8D; color: #0D2E8D;