This commit is contained in:
ChuShiZ 2024-10-15 23:40:11 +08:00
parent e9eb9005c4
commit 74c7cf99a6
14 changed files with 764 additions and 173 deletions

View File

@ -3,6 +3,14 @@
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
<view class="bodyTopBg"></view>
<view class="body">
<view class="userInfoBox">
<image style="width: 104rpx;height: 104rpx" :src="userInfo.avatarUrl || defaultAvatar" mode="aspectFill" @error="avatarErr"></image>
<view class="userInfo">
<text class="userName">{{ userInfo.userName }}</text>
<text class="userType">{{ userInfo.userType }}</text>
</view>
<image @click="showUserDetail" style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
</view>
<view class="body-top-grid">
<view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)">
<view>
@ -44,6 +52,11 @@ export default {
},
data() {
return {
userInfo: {
avatarUrl: undefined,
userName: '曾廷',
userType: '服务顾问'
},
menuList: [
{
title: '新建工单',
@ -86,7 +99,8 @@ export default {
appointDate: '2024-10-20 12:00',
counselorName: '李相东'
}
]
],
defaultAvatar: require('@/static/icons/avatar.png')
}
},
onShow() {
@ -97,6 +111,15 @@ export default {
url: menu.path
})
},
avatarErr(err) {
console.log('err', err)
this.userInfo.avatarUrl = this.defaultAvatar
},
showUserDetail() {
uni.navigateTo({
url: '/pages/my/myInfo'
})
}
}
}
</script>
@ -122,7 +145,9 @@ export default {
left: 0;
width: 100%;
height: 500rpx;
background: rgba(1, 116, 246, 0.2);
background-image: url("@/static/bg.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.body {
@ -134,6 +159,34 @@ export default {
padding-bottom: 30rpx;
}
.userInfoBox {
margin: 0 32rpx 40rpx;
display: flex;
column-gap: 20rpx;
align-items: center;
.userInfo {
flex: 1;
width: 0;
.userName {
font-weight: bold;
font-size: 36rpx;
color: #333333;
display: block;
margin-bottom: 16rpx;
}
.userType {
font-size: 24rpx;
color: #0174F6;
display: inline-block;
border-radius: 24rpx 24rpx 24rpx 24rpx;
border: 1rpx solid #0174F6;
padding: 8rpx 16rpx;
}
}
}
.body-top-grid {
display: grid;
grid-template-columns: 1fr 1fr;

View File

@ -0,0 +1,153 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="选择人员" title-color="#333"></VNavigationBar>
<view class="body">
<div class="searchBox">
<div class="inputBox">
<input placeholder="请输入人员姓名" type="text">
</div>
<text>搜索</text>
</div>
<div class="userList">
<u-checkbox-group
placement="column"
v-model="checked">
<view v-for="item in list" :key="item.id" class="userItem">
<view class="info">
<text class="name">{{item.name}}</text>
<text class="trade">{{item.gz}}{{item.checked}}</text>
</view>
<u-checkbox v-model="item.checked" :name="item.id" iconSize="24" shape="circle" activeColor="#1890ff"></u-checkbox>
</view>
</u-checkbox-group>
</div>
</view>
<view class="foot">
<view class="submit" @click="submit">确定选择</view>
</view>
</view>
</template>
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
import {bus} from "@/utils/eventBus";
export default {
components: {
VNavigationBar,
},
data() {
return {
list: [
{name: '杨其华', id: 1, gz: '机修'},
{name: '钣金', id: 2, gz: '机修'},
{name: '周正', id: 3, gz: '喷漆'},
],
checked: []
}
},
onLoad(data) {
},
methods: {
submit() {
console.log('this.checked', this.checked)
const selected = this.list.filter(f => this.checked.includes(f.id))
bus.$emit('choosePeople', selected)
uni.navigateBack()
}
}
}
</script>
<style lang="less" scoped>
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
.body {
flex: 1;
height: 0;
overflow: auto;
padding: 20rpx 0;
.searchBox {
margin: 0 32rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 30rpx;
display: flex;
align-items: center;
column-gap: 20rpx;
font-weight: 500;
font-size: 28rpx;
color: #0174F6;
.inputBox {
flex: 1;
width: 0;
color: #000;
}
}
.userList {
margin: 20rpx 32rpx 0;
background-color: #fff;
padding: 0 20rpx;
.userItem {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
display: flex;
align-items: center;
justify-content: space-between;
.info {
display: flex;
flex-direction: column;
row-gap: 20rpx;
.name {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
.trade {
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
}
}
.userItem:last-child {
border-bottom: none;
}
}
}
.foot {
background-color: #fff;
padding: 30rpx;
.submit {
margin: 0 auto;
width: 510rpx;
height: 76rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@ -4,10 +4,12 @@
<VNavigationBar background-color="#fff" title="工单详情" title-color="#333"></VNavigationBar>
<view class="body">
<view v-if="carInfo" class="card cardInfo carCard">
<view class="orderFlag" :class="{'end': orderInfo.flag == 5}">
<view :class="{'end': orderInfo.flag == 5}" class="orderFlag">
<template>
<image style="width: 48rpx;height: 48rpx" v-if="orderInfo.flag == 5" src="/static/icons/orderEnd.png" mode="aspectFit"></image>
<image style="width: 48rpx;height: 48rpx" v-else src="/static/icons/orderIng.png" mode="aspectFit"></image>
<image v-if="orderInfo.flag == 5" mode="aspectFit" src="/static/icons/orderEnd.png"
style="width: 48rpx;height: 48rpx"></image>
<image v-else mode="aspectFit" src="/static/icons/orderIng.png"
style="width: 48rpx;height: 48rpx"></image>
<view class="flagBody">
<text>{{ orderInfo.flag == 5 ? '已完成' : '待处理' }}</text>
<text class="flagDesc">当前工单维修项目{{ orderInfo.flag == 5 ? '已全部完成' : '正在进行维修' }}</text>
@ -110,7 +112,8 @@
<view v-if="selectedProj && selectedProj.length > 0" class="card cardInfo projCard">
<view class="projTitle">维修项目</view>
<view class="projList">
<view v-if="role == 'admin'" v-for="item in selectedProj" :key="item.id" class="projItem">
<template v-if="role == 'admin'">
<view v-for="item in selectedProj" :key="item.id" class="projItem">
<view class="projTop">
<text class="projName">{{ item.projName }}</text>
<text class="projAmount">${{ item.amount }}</text>
@ -120,6 +123,12 @@
<image mode="aspectFit" src="/static/icons/date.png" style="width: 24rpx;height: 24rpx"></image>
<text class="projDateText">{{ item.date }}</text>
</view>
<view v-if="item.hasNoReviewPart" class="noReviewPart" @click="showReviewList(item.id)">
<u-icon color="#E8A321" name="error-circle-fill" size="14"></u-icon>
<text class="messageText">当前项目有待审批的配件申请单</text>
<u-icon color="#E8A321" name="arrow-right" size="14"></u-icon>
</view>
<template v-else>
<view class="projDesc">
{{ item.desc }}
</view>
@ -138,9 +147,13 @@
<text style="color: #0174F6">发送给客户</text>
</template>
</view>
</template>
</view>
</view>
<view v-else v-for="item in selectedProj" :key="item.id" class="projEditItem">
</template>
<template v-else>
<view v-for="item in selectedProj" :key="item.id" class="projEditItem">
<view class="projEditLine1">
<text>{{ item.projName }}</text>
<text class="projAmount">{{ item.amount }}</text>
@ -155,31 +168,51 @@
</view>
<view class="projEditFoot">
<view class="block1">
<template v-if="!orderInfo.salesman || !orderInfo.salesman.id">
<image style="width: 28rpx;height: 28rpx" src="/pages-order/static/addIcon.png"></image>
<text class="addText">添加销售人员</text>
</template>
<template v-else>
<template v-if="item.salesman && item.salesman.length > 0">
<view class="editPeople">
<view class="editForm">
<text class="label">销售人员</text>
<text>{{ orderInfo.salesman.name }}</text>
<text v-if="item.salesman">{{
item.salesman && item.salesman.map(m => m.name).join(',')
}}
</text>
</view>
<image style="width: 28rpx;height: 28rpx" src="/static/icons/edit.png" @click="editPeople('xs', orderInfo.salesman.id)"></image>
<image src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@click="editPeople('xs', item)"></image>
</view>
</template>
<template v-else>
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
<text class="addText" @click="editPeople('xs', item)">添加销售人员</text>
</template>
</view>
<view class="line"></view>
<view class="block2">
<template v-if="!orderInfo.constructor || !orderInfo.constructor.id">
<image style="width: 28rpx;height: 28rpx" src="/pages-order/static/addIcon.png"></image>
<text class="addText">添加施工人员</text>
<template v-if="item.constructor && item.constructor.length > 0">
<view class="editPeople">
<view class="editForm">
<text class="label">施工人员</text>
<text v-if="item.constructor">{{ item.constructor.map(m => m.name).join(',') }}</text>
</view>
<image src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@click="editPeople('sg', item)"></image>
</view>
</template>
<template v-else>
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
<text class="addText" @click="editPeople('sg', item)">添加施工人员</text>
</template>
</view>
</view>
</view>
</template>
</view>
</view>
</view>
</view>
</view>
<view class="foot">
<view class="submit">保存工单</view>
</view>
</view>
</view>
@ -187,7 +220,7 @@
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
import request from "../../utils/request";
import {bus} from "@/utils/eventBus";
export default {
components: {
@ -195,21 +228,10 @@ export default {
},
data() {
return {
// role: 'admin',
role: 'yewu',
role: 'admin',
// role: 'yewu',
orderId: '',
orderInfo: {
//
salesman: {
name: '魏书豪',
id: '11111'
},
//
constructor: {
name: '',
id: ''
}
},
orderInfo: {},
carInfo: {
licenseNumber: '川A 184AO1',
carCategory: '一汽奥迪 2024款 A6L',
@ -240,7 +262,16 @@ export default {
isSend: true,
//
examinePart: [],
id: 'projId1'
id: 'projId1',
//
salesman: [
{
name: '魏书豪',
id: '11111'
}
],
//
constructor: []
},
{
projName: '清洗内饰',
@ -250,8 +281,23 @@ export default {
imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
isSend: false,
//
examinePart: [],
id: 'projId1'
hasNoReviewPart: false,
id: 'projId2',
salesman: [],
constructor: []
},
{
projName: '清洗内饰',
amount: '280',
date: '2024-10-20 12:00',
desc: '车辆已到维修厂,工作人员正准备开始维修',
imageList: [],
isSend: false,
//
hasNoReviewPart: true,
id: 'projId3',
salesman: [],
constructor: []
}
]
};
@ -262,8 +308,26 @@ export default {
}
},
methods: {
editPeople(type, id) {
editPeople(type, proj) {
bus.$off('choosePeople')
bus.$on('choosePeople', (data) => {
console.log('choosePeople', data)
console.log('type', type)
if (type === 'xs') {
proj.salesman = data
} else if (type === 'sg') {
proj.constructor = data
}
console.log('proj', proj)
})
uni.navigateTo({
url: `/pages-order/choosePeople/choosePeople?type=${type}`
})
},
showReviewList(projId) {
uni.navigateTo({
url: `/pages-order/reviewList/reviewList?projId=${projId}`
})
}
}
}
@ -391,6 +455,7 @@ export default {
border-top: 8rpx solid #17DBB1;
background-color: #E3FFF9;
}
.flagBody {
display: flex;
flex-direction: column;
@ -398,6 +463,7 @@ export default {
font-weight: bold;
font-size: 32rpx;
color: #333333;
.flagDesc {
font-weight: 500;
font-size: 24rpx;
@ -406,6 +472,7 @@ export default {
}
}
.carDetail {
background-size: 100% 184rpx;
padding: 0 30rpx;
@ -523,6 +590,25 @@ export default {
}
}
.noReviewPart {
padding: 20rpx 36rpx 20rpx 10rpx;
display: flex;
align-items: center;
column-gap: 10rpx;
background: #FFF6E7;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-weight: 500;
font-size: 28rpx;
color: #E8A321;
.messageText {
flex: 1;
width: 0;
}
}
.projSend {
display: flex;
align-items: center;
@ -563,6 +649,7 @@ export default {
gap: 20rpx;
margin-bottom: 20rpx;
}
.projEditFoot {
padding: 30rpx 0;
border-top: 1px solid #DDDDDD;
@ -570,6 +657,7 @@ export default {
display: flex;
align-items: center;
column-gap: 10rpx;
.block1, .block2 {
flex: 1;
width: 0;
@ -597,6 +685,7 @@ export default {
row-gap: 10rpx;
font-size: 28rpx;
color: #333333;
.label {
font-size: 24rpx;
color: #999999;
@ -604,6 +693,7 @@ export default {
}
}
}
.line {
height: 28rpx;
width: 2rpx;
@ -651,5 +741,26 @@ export default {
justify-content: center;
column-gap: 6rpx;
}
.foot {
padding: 30rpx;
background-color: #fff;
.submit {
margin: 0 auto;
width: 510rpx;
height: 76rpx;
background: #0174F6;
border-radius: 38rpx 38rpx 38rpx 38rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #FFFFFF;
}
}
}
</style>

View File

@ -0,0 +1,231 @@
<template>
<view class="container">
<VNavigationBar background-color="#fff" title="选择人员" title-color="#333"></VNavigationBar>
<view class="body">
<div class="userList">
<view v-for="item in list" :key="item.id" class="userItem">
<view class="info">
<text class="name">{{ item.name }}</text>
<text class="num">x{{ item.num }}</text>
</view>
<view class="info2">
<view class="info2-item">
<text class="label">配件分类</text>
<text class="value">{{ item.typeName }}</text>
</view>
<view class="info2-item">
<text class="label">当前库存</text>
<text class="value">{{ item.count }}</text>
</view>
</view>
</view>
</div>
<u-popup bgColor="#fff" :show="show" mode="bottom" round @close="close" @open="open">
<view class="pop">
<view class="popHeader">
<text class="btn1" @click="cancel">取消</text>
<text class="popHeaderText">
填写理由
</text>
<text class="btn2" @click="confirm">确定</text>
</view>
<view class="popContent">
<textarea style="padding: 36rpx 32rpx" placeholder="填写审批未通过理由" v-model="argument"></textarea>
</view>
</view>
</u-popup>
</view>
<view class="foot">
<view class="btn1" @click="noFun">
<image mode="aspectFit" src="/pages-order/static/dh.png" style="width: 32rpx;height: 32rpx"></image>
取消审批
</view>
<view class="line"></view>
<view class="btn2" @click="yesFun">
<image mode="aspectFit" src="/pages-order/static/tg.png" style="width: 32rpx;height: 32rpx"></image>
审批通过
</view>
</view>
</view>
</template>
<script>
import VNavigationBar from '@/components/VNavigationBar.vue'
export default {
components: {
VNavigationBar,
},
data() {
return {
list: [
{name: '7字小钩', id: 1, typeName: '机修', num: 3, count: 35},
{name: '反光贴', id: 2, typeName: '机修', num: 3, count: 35},
{name: '刹车油DOT4', id: 3, typeName: '喷漆', num: 3, count: 35},
],
show: false,
argument: ''
}
},
onLoad(data) {
console.log('data', data)
},
methods: {
close() {
this.show = false
},
open() {},
noFun() {
this.show = true
},
yesFun() {
},
confirm() {
this.show = false
uni.navigateBack()
},
cancel() {
this.show = false
this.argument = ''
}
}
}
</script>
<style lang="less" scoped>
.container {
height: 100%;
background-color: #F3F5F7;
display: flex;
flex-direction: column;
.body {
flex: 1;
height: 0;
overflow: auto;
padding: 20rpx 0;
.userList {
margin: 20rpx 32rpx 0;
background-color: #fff;
padding: 0 20rpx;
.userItem {
padding: 30rpx 0;
border-bottom: 1rpx solid #DDDDDD;
.info {
margin-bottom: 30rpx;
display: flex;
align-items: flex-end;
column-gap: 10rpx;
row-gap: 20rpx;
.name {
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.num {
font-size: 28rpx;
color: #0174F6;
}
}
.info2 {
display: flex;
.info2-item {
display: flex;
flex-direction: column;
flex: 1;
width: 0;
.label {
font-size: 28rpx;
color: #858BA0;
}
.value {
font-size: 28rpx;
color: #333333;
}
}
}
}
.userItem:last-child {
border-bottom: none;
}
}
}
.foot {
background-color: #fff;
padding: 30rpx;
display: flex;
align-items: center;
.btn1, .btn2 {
flex: 1;
width: 0;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
column-gap: 10rpx;
}
.btn1 {
color: #858BA0;
}
.btn2 {
color: #0174F6;
}
.line {
height: 32rpx;
width: 1rpx;
background-color: #ddd;
}
}
.pop {
//background-color: #fff;
height: 60vh;
}
.popHeader {
padding: 40rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #EEEEEE;
.btn2 {
color: #0174F6;
}
.btn1 {
color: #999999;
}
.popHeaderText {
flex: 1;
width: 0;
text-align: center;
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
}
.popContent {
}
}
</style>

BIN
pages-order/static/dh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
pages-order/static/tg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -83,6 +83,20 @@
},
{
"path": "orderDetail/orderDetail"
},
{
"path": "choosePeople/choosePeople",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "reviewList/reviewList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
}
]
},

View File

@ -1,26 +1,31 @@
<template>
<view class="container">
<VNavigationBarVue titleColor="#333" backgroundColor="#fff" title="我的资料"></VNavigationBarVue>
<VNavigationBarVue backgroundColor="#fff" title="个人信息" titleColor="#333"></VNavigationBarVue>
<view class="body">
<!-- <view class="formItem">-->
<!-- <text class="formLabel">头像</text>-->
<!-- <image class="avatar" src="../../static/images/avatar.png" mode="aspectFit"></image>-->
<!-- </view>-->
<view class="formItem">
<text class="formLabel">姓名</text>
<text class="formValue">{{ customInfo.cusName }}</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>-->
<image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_1.png"></image>
<text class="formLabel">头像</text>
<view class="formValue">
<image :src="customInfo.avatar || defaultAvatar" class="avatar" mode="aspectFill"
style="width: 64rpx;height: 64rpx"></image>
</view>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view>
<view class="formItem">
<image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_2.png"></image>
<text class="formLabel">账号昵称</text>
<text class="formValue">{{ customInfo.name }}</text>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view>
<view style="padding-bottom: 60rpx;border-bottom: 1px solid #ddd" class="formItem">
<image class="formIcon" mode="aspectFit" src="/static/icons/userInfo_3.png"></image>
<text class="formLabel">绑定电话</text>
<text class="formValue">{{ customInfo.phone }}</text>
<u-icon color="#999" name="arrow-right" size="12"></u-icon>
</view>
</view>
<view class="formItem">
<text class="formLabel">手机号</text>
<text class="formValue">{{ customInfo.phoneNumber }}</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>-->
</view>
<view class="formItem">
<text class="formLabel">联系地址</text>
<text class="formValue">{{ customInfo.address }}</text>
<!-- <image class="formBtn" src="../../static/icons/homeInfoMore.png" mode="aspectFit"></image>-->
<view class="btn">
退出登录
</view>
</view>
</view>
@ -28,18 +33,24 @@
<script>
import VNavigationBarVue from '../../components/VNavigationBar.vue';
export default {
components: {
VNavigationBarVue
},
data() {
return {
customInfo:{}
customInfo: {
phone: '157****4960',
name: '千舟寻渡',
avatar: ''
},
defaultAvatar: require('@/static/icons/avatar.png')
};
},
onShow(data) {
//
this.customInfo = JSON.parse(uni.getStorageSync('customerInfo'))
// this.customInfo = uni.getStorageSync('customerInfo') ? JSON.parse(uni.getStorageSync('customerInfo')) : {}
},
}
</script>
@ -47,24 +58,26 @@
<style lang="less" scoped>
.container {
height: 100%;
background-color: #fff;
background: #fff;
.body {
border-top: 1px solid #ddd;
padding: 20rpx 32rpx;
}
.formItem {
box-sizing: border-box;
width: 686rpx;
margin: 0 auto;
padding: 40rpx;
padding: 40rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
column-gap: 20rpx;
}
border-bottom: 1rpx solid #DDDDDD;
.formIcon {
width: 44rpx;
height: 44rpx;
}
.formLabel {
@ -89,5 +102,21 @@
width: 108rpx;
height: 108rpx;
}
.btn {
width: 520rpx;
height: 80rpx;
border-radius: 40rpx 40rpx 40rpx 40rpx;
border: 1rpx solid #999999;
margin: 60rpx auto;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
color: #999999;
}
}
</style>

BIN
static/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

BIN
static/icons/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
static/icons/more.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

BIN
static/icons/userInfo_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/icons/userInfo_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/icons/userInfo_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B