Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-repair-app
This commit is contained in:
commit
6090a17748
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="orderCard" @click="viewDetail">
|
<view class="orderCard" @click="viewDetail">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ order.licenseNumber }} 的{{titleText}}
|
{{'配件申请单'==titleText?"【"+order.repairName+"】":""}} {{ order.licenseNumber }} 的{{titleText}}
|
||||||
</view>
|
</view>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
{{'配件申请单'==titleText?'申请':'发起'}}时间:{{formatTimestamp(order.createTime)}}
|
{{'配件申请单'==titleText?'申请':'发起'}}时间:{{formatTimestamp(order.createTime)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="message red" v-if="order.status=='05'">
|
<!-- <view class="message red" v-if="order.status=='05'">-->
|
||||||
<view class="remark">
|
<!-- <view class="remark">-->
|
||||||
原因:{{ order.remark }}
|
<!-- 原因:{{ order.remark }}-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
</view>
|
<!-- </view>-->
|
||||||
<view v-if="'配件申请单'==titleText">
|
<view v-if="'配件申请单'==titleText">
|
||||||
<image v-if="order.status=='05'" class="stateImg" src="@/pages-repair/static/weitongguo.png" ></image>
|
<image v-if="order.status=='05'" class="stateImg" src="@/pages-repair/static/weitongguo.png" ></image>
|
||||||
<image v-else-if="order.status=='01'" class="stateImg" src="@/pages-repair/static/daishenhe.png" ></image>
|
<image v-else-if="order.status=='01'" class="stateImg" src="@/pages-repair/static/daishenhe.png" ></image>
|
||||||
|
@ -53,6 +53,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 服务顾问角色 -->
|
||||||
|
<view class="orderCount" v-if="userInfo.roleCodes.includes('service_advisor')" @click="serviceWork">
|
||||||
|
<view class="orderCountItem">
|
||||||
|
<text class="label">待审批配件申请单</text>
|
||||||
|
<text class="value">{{serviceNum}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- TODO 总检角色 -->
|
<!-- TODO 总检角色 -->
|
||||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||||
<view class="orderCountItem">
|
<view class="orderCountItem">
|
||||||
@ -148,6 +155,8 @@ export default {
|
|||||||
waitingReceiveNum:0,
|
waitingReceiveNum:0,
|
||||||
waitingBackNum:0,
|
waitingBackNum:0,
|
||||||
},
|
},
|
||||||
|
//服务顾问待处理数量
|
||||||
|
serviceNum:0,
|
||||||
defaultAvatar: require('@/static/icons/avatar.png')
|
defaultAvatar: require('@/static/icons/avatar.png')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -174,6 +183,9 @@ export default {
|
|||||||
if(this.userInfo.roleCodes.includes('repair_staff')){
|
if(this.userInfo.roleCodes.includes('repair_staff')){
|
||||||
//维修工
|
//维修工
|
||||||
this.getWorkerTodo()
|
this.getWorkerTodo()
|
||||||
|
}else if(this.userInfo.roleCodes.includes('service_advisor')){
|
||||||
|
//服务顾问
|
||||||
|
this.getServiceTodo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -262,6 +274,27 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 服务顾问的角度查待处理的配件申请单数量
|
||||||
|
*/
|
||||||
|
getServiceTodo(){
|
||||||
|
let params = {
|
||||||
|
pageNo:this.pageNo,
|
||||||
|
pageSize:this.pageSize,
|
||||||
|
type:"01",
|
||||||
|
status:"01"
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tw/page',
|
||||||
|
method: 'get',
|
||||||
|
params:params
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.serviceNum = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 查本人待处理工单
|
* 查本人待处理工单
|
||||||
*/
|
*/
|
||||||
@ -329,6 +362,14 @@ export default {
|
|||||||
url: '/pages-repair/applyList/applyList'
|
url: '/pages-repair/applyList/applyList'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 服务顾问待办
|
||||||
|
*/
|
||||||
|
serviceWork(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/service/applyList'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
226
pages-home/service/applyList.vue
Normal file
226
pages-home/service/applyList.vue
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<VNavigationBar style="position: relative;z-index: 99;" backgroundColor="#fff" title-color="#000" title="申请单处理"></VNavigationBar>
|
||||||
|
<view class="body">
|
||||||
|
<view class="tabList">
|
||||||
|
<view v-for="(item, index) in tabList" :key="index" :class="{actived: item.id === activeKey}" class="tabItem"
|
||||||
|
@click.stop="changeTabFun(item.id)">
|
||||||
|
{{ item.title }}
|
||||||
|
<view v-if="activeKey === item.id" class="activeLine"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orderList">
|
||||||
|
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
|
<order-card v-for="(item, index) in orderList" :titleText="(0==activeKey || 1==activeKey)?'配件申请单':(2==activeKey)?'领料单':'退料单'" :key="index" :order="item" @childEvent="viewDetail" ></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
|
import tabBarVue from '@/components/tabBar/tabBar.vue'
|
||||||
|
import OrderCard from "@/components/applyCard.vue";
|
||||||
|
import request from '@/utils/request';
|
||||||
|
import {getUserInfo} from '@/utils/auth';
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
OrderCard,
|
||||||
|
tabBarVue,
|
||||||
|
VNavigationBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeKey: 0,
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
//下来刷新状态
|
||||||
|
isTriggered:false,
|
||||||
|
tabList: [
|
||||||
|
{
|
||||||
|
id: 0,
|
||||||
|
title: '待审批'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
title: '所有'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
orderList: [
|
||||||
|
// {
|
||||||
|
// carNo: "川E795C0",
|
||||||
|
// createTime: '2024-10-20 12:00',
|
||||||
|
// ticketsStatus: '05',
|
||||||
|
// remark: '大厦预订奴化时间内丢进爱上牛津阿斯顿你'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// carNo: "川E795C1",
|
||||||
|
// createTime: '2024-10-20 12:00',
|
||||||
|
// ticketsStatus: '02',
|
||||||
|
// remark: '大厦预订奴化时间内丢进爱上牛津阿斯顿你'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// carNo: "川E795C2",
|
||||||
|
// createTime: '2024-10-20 12:00',
|
||||||
|
// ticketsStatus: '01',
|
||||||
|
// remark: '大厦预订奴化时间内丢进爱上牛津阿斯顿你'
|
||||||
|
// }
|
||||||
|
],
|
||||||
|
userInfo:null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(){
|
||||||
|
this.userInfo = getUserInfo()
|
||||||
|
console.log(this.userInfo)
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
this.onRefresherrefresh()
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
changeTabFun(id) {
|
||||||
|
this.activeKey = id
|
||||||
|
this.onRefresherrefresh()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 上滑加载数据
|
||||||
|
*/
|
||||||
|
onReachBottomCus() {
|
||||||
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
|
uni.$u.toast('没有更多数据了')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
|
this.pageNo++
|
||||||
|
//此处调用自己获取数据列表的方法
|
||||||
|
this.getOrderList()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 下拉刷新数据
|
||||||
|
*/
|
||||||
|
onRefresherrefresh(){
|
||||||
|
this.isTriggered = true
|
||||||
|
this.pageNo = 1
|
||||||
|
this.total = 0
|
||||||
|
this.orderList = []
|
||||||
|
this.getOrderList()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 查看申请单详情
|
||||||
|
*/
|
||||||
|
viewDetail(item){
|
||||||
|
if(0==this.activeKey){
|
||||||
|
//配件申请单审批
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/service/todoDetail?canOperate=true&id='+item.id
|
||||||
|
})
|
||||||
|
}else if(1==this.activeKey){
|
||||||
|
//配件申请单查看
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/service/todoDetail?id='+item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 查数据
|
||||||
|
*/
|
||||||
|
getOrderList(){
|
||||||
|
let url="/admin-api/repair/tw/page"
|
||||||
|
let params = {
|
||||||
|
pageNo:this.pageNo,
|
||||||
|
pageSize:this.pageSize,
|
||||||
|
type:"01"
|
||||||
|
}
|
||||||
|
if(0==this.activeKey){
|
||||||
|
//待审批的配件申请单
|
||||||
|
params.status="01"
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: url,
|
||||||
|
method: 'get',
|
||||||
|
params:params
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
if(res.data.records.length > 0){
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.orderList = this.orderList.concat(res.data.records)
|
||||||
|
} else {
|
||||||
|
this.orderList = res.data.records
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//将获取的总条数赋值
|
||||||
|
this.total = res.data.total
|
||||||
|
this.isTriggered = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
background: #F3F5F7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
.body {
|
||||||
|
flex: 1;
|
||||||
|
height: 0;
|
||||||
|
padding: 24rpx 32rpx;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabList {
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
|
||||||
|
.tabItem {
|
||||||
|
padding: 30rpx;
|
||||||
|
flex: 1;
|
||||||
|
z-index: 9999999;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
&.actived {
|
||||||
|
color: #0174F6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeLine {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 96rpx;
|
||||||
|
height: 6rpx;
|
||||||
|
background: #0174F6;
|
||||||
|
border-radius: 4rpx 4rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderList {
|
||||||
|
//padding: 30rpx 0;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
height: calc(100% - 90rpx);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 20rpx;
|
||||||
|
|
||||||
|
.stateImg {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
279
pages-home/service/todoDetail.vue
Normal file
279
pages-home/service/todoDetail.vue
Normal file
@ -0,0 +1,279 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<VNavigationBar background-color="#fff" :title="title" title-color="#333"></VNavigationBar>
|
||||||
|
<view class="body">
|
||||||
|
<view class="repairInfo">
|
||||||
|
<view class="header">
|
||||||
|
配件信息
|
||||||
|
</view>
|
||||||
|
<view class="repairItem" v-for="(item, index) in repairList" :key="index">
|
||||||
|
<view class="repairName">{{ item.waresName }} <text class="repairNum">×{{item.waresCount}}</text></view>
|
||||||
|
<view class="grid">
|
||||||
|
<view style="grid-area: a" class="girdItem">
|
||||||
|
<text class="label">配件分类</text>
|
||||||
|
<text class="value">{{ item.typeName }}</text>
|
||||||
|
</view>
|
||||||
|
<view style="grid-area: b" class="girdItem">
|
||||||
|
<text class="label">当前库存</text>
|
||||||
|
<text class="value">{{ item.wares.stock }}</text>
|
||||||
|
</view>
|
||||||
|
<view style="grid-area: c" class="girdItem">
|
||||||
|
<text class="label">单位</text>
|
||||||
|
<text class="value">{{ item.wares.unit }}</text>
|
||||||
|
</view>
|
||||||
|
<view style="grid-area: d" class="girdItem">
|
||||||
|
<text class="label">编码</text>
|
||||||
|
<text class="value">{{ item.wares.code || ""}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="canOperate" class="footer">
|
||||||
|
<view class="no" @click="confirmOpe('no')">
|
||||||
|
{{ backText }}
|
||||||
|
</view>
|
||||||
|
<view class="yes" @click="confirmOpe('yes')">
|
||||||
|
{{ yesText }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||||
|
import request from '@/utils/request';
|
||||||
|
import {getDictTextByCodeAndValue} from "@/utils/utils";
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
VNavigationBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
viewType:"",
|
||||||
|
id:"",
|
||||||
|
title:"",
|
||||||
|
canOperate:false,
|
||||||
|
backText:"",
|
||||||
|
yesText:"",
|
||||||
|
repairList: [
|
||||||
|
// {
|
||||||
|
// name: '7字小钩',
|
||||||
|
// num: 3,
|
||||||
|
// type: '机电',
|
||||||
|
// unit: '桶',
|
||||||
|
// total: 35,
|
||||||
|
// code: 'XCQHCJYS7 SPI SP 5W30 4L'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: '7字小钩',
|
||||||
|
// num: 3,
|
||||||
|
// type: '机电',
|
||||||
|
// unit: '桶',
|
||||||
|
// total: 35,
|
||||||
|
// code: 'XCQHCJYS7 SPI SP 5W30 4L'
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(data){
|
||||||
|
this.canOperate = data.canOperate
|
||||||
|
this.id = data.id
|
||||||
|
this.getDetail()
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
getDetail(){
|
||||||
|
let url;
|
||||||
|
let params={};
|
||||||
|
this.title = "配件申请单详情"
|
||||||
|
//配件申请单
|
||||||
|
url = "/admin-api/repair/twi/list"
|
||||||
|
params.twId = this.id
|
||||||
|
this.yesText="审批通过"
|
||||||
|
this.backText="驳回"
|
||||||
|
request({
|
||||||
|
url: url,
|
||||||
|
method: 'get',
|
||||||
|
params:params
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
res.data.map((item)=>{
|
||||||
|
getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => {
|
||||||
|
item.wares.unit = value
|
||||||
|
}).catch(error => {
|
||||||
|
item.wares.unit = "未知"
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
this.repairList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmOpe(type){
|
||||||
|
let url = '/admin-api/repair/tw/audit'
|
||||||
|
let dataObj={
|
||||||
|
id:this.id,
|
||||||
|
type:"01",
|
||||||
|
status:"yes"==type?"02":"05"
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: url,
|
||||||
|
method: 'POST',
|
||||||
|
data:dataObj
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '审批成功!',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
}, 700)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.container {
|
||||||
|
height: 100%;
|
||||||
|
background: #F3F5F7;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.body {
|
||||||
|
flex: 1;
|
||||||
|
height: 0;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.todoInfo {
|
||||||
|
margin: 20rpx 32rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.todoName {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.todoDate {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #858BA0;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
height: 1rpx;
|
||||||
|
background-color: #DDDDDD;
|
||||||
|
margin: 30rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
'a b'
|
||||||
|
'c c';
|
||||||
|
gap: 20rpx;
|
||||||
|
|
||||||
|
.gridItem {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 10rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
|
||||||
|
.gridItemLabel {
|
||||||
|
color: #858BA0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gridItemValue {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.repairInfo {
|
||||||
|
margin: 20rpx 32rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 1rpx solid #DDDDDD;
|
||||||
|
}
|
||||||
|
.repairItem {
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 1rpx solid #DDDDDD;
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.repairName {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
column-gap: 20rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
.repairNum {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #0174F6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas:
|
||||||
|
'a b'
|
||||||
|
'c d';
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 30rpx;
|
||||||
|
.girdItem {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
row-gap: 12rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
.label {
|
||||||
|
color: #858BA0;
|
||||||
|
}
|
||||||
|
.value {
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 30rpx 32rpx;
|
||||||
|
|
||||||
|
.yes, .no {
|
||||||
|
width: 310rpx;
|
||||||
|
height: 76rpx;
|
||||||
|
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
column-gap: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yes {
|
||||||
|
background: #0174F6;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no {
|
||||||
|
border: 2rpx solid #858BA0;
|
||||||
|
color: #858BA0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -56,7 +56,7 @@
|
|||||||
import VNavigationBar from '@/components/VNavigationBar.vue'
|
import VNavigationBar from '@/components/VNavigationBar.vue'
|
||||||
import {bus} from "@/utils/eventBus";
|
import {bus} from "@/utils/eventBus";
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import {getDictTextByCodeAndValue} from "@/utils/utils";
|
import {getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -73,7 +73,8 @@ export default {
|
|||||||
type: "",
|
type: "",
|
||||||
sgIds: [], // 初始化为数组
|
sgIds: [], // 初始化为数组
|
||||||
sgNames : [],
|
sgNames : [],
|
||||||
projectId: ''
|
projectId: '',
|
||||||
|
itemId:"",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
@ -87,6 +88,10 @@ export default {
|
|||||||
//从订单详情页跳过来的,返回时需要返回2步
|
//从订单详情页跳过来的,返回时需要返回2步
|
||||||
this.ifDetail = true
|
this.ifDetail = true
|
||||||
}
|
}
|
||||||
|
if (data.itemId) {
|
||||||
|
//从订单详情页跳过来的,返回时需要返回2步
|
||||||
|
this.itemId = data.itemId
|
||||||
|
}
|
||||||
if (data.type) {
|
if (data.type) {
|
||||||
this.type = data.type
|
this.type = data.type
|
||||||
if (data.type == 'xs') {
|
if (data.type == 'xs') {
|
||||||
@ -206,7 +211,7 @@ export default {
|
|||||||
this.sgIds = arr
|
this.sgIds = arr
|
||||||
this.sgNames = nameArr
|
this.sgNames = nameArr
|
||||||
},
|
},
|
||||||
submit() {
|
async submit() {
|
||||||
if (this.type == 'sg') {
|
if (this.type == 'sg') {
|
||||||
if (this.sgIds.length == 0) {
|
if (this.sgIds.length == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -285,6 +290,8 @@ export default {
|
|||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.ifDetail) {
|
if (this.ifDetail) {
|
||||||
|
//记录一下操作记录
|
||||||
|
saveTicketsRecords(this.ticketId, '03',this.itemId,"03","sgwczj","维修完成移交下一班组维修","","01",this.checkedUserName);
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 2 // 返回倒数第2页
|
delta: 2 // 返回倒数第2页
|
||||||
})
|
})
|
||||||
|
@ -122,14 +122,14 @@
|
|||||||
|
|
||||||
<view class="projEditLine1">
|
<view class="projEditLine1">
|
||||||
<text>{{ item.itemName }}</text>
|
<text>{{ item.itemName }}</text>
|
||||||
<text v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" class="projAmount">¥{{ item.itemMoney }}</text>
|
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="projBaseInfo" v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" >
|
<view class="projBaseInfo" v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" >
|
||||||
<view>售价:{{ item.itemPrice || "" }}</view>
|
<view v-if="canSeeMoney">售价:{{ item.itemPrice || "" }}</view>
|
||||||
<view>数量:{{ item.itemCount || "" }}</view>
|
<view>数量:{{ item.itemCount || "" }}</view>
|
||||||
<!-- <view>单位:{{ item.itemUnit}}</view>-->
|
<!-- <view>单位:{{ item.itemUnit}}</view>-->
|
||||||
<view>折扣:{{ item.itemDiscount || "" }}</view>
|
<view v-if="canSeeMoney">折扣:{{ item.itemDiscount || "" }}</view>
|
||||||
<view>金额:{{ item.itemMoney || "" }}</view>
|
<view v-if="canSeeMoney">金额:{{ item.itemMoney || "" }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="projEditFoot">
|
<view class="projEditFoot">
|
||||||
<view class="block1">
|
<view class="block1">
|
||||||
@ -180,14 +180,14 @@
|
|||||||
|
|
||||||
<view class="projEditLine1">
|
<view class="projEditLine1">
|
||||||
<text>{{ item.itemName }}</text>
|
<text>{{ item.itemName }}</text>
|
||||||
<text class="projAmount">¥{{ item.itemMoney }}</text>
|
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="projBaseInfo">
|
<view class="projBaseInfo">
|
||||||
<view>售价:{{ item.itemPrice || "" }}</view>
|
<view v-if="canSeeMoney">售价:{{ item.itemPrice || "" }}</view>
|
||||||
<view>数量:{{ item.itemCount || "" }}</view>
|
<view>数量:{{ item.itemCount || "" }}</view>
|
||||||
<view>单位:{{ item.itemUnit || ""}}</view>
|
<view>单位:{{ item.itemUnit || ""}}</view>
|
||||||
<view>折扣:{{ item.itemDiscount || "" }}</view>
|
<view v-if="canSeeMoney">折扣:{{ item.itemDiscount || "" }}</view>
|
||||||
<view>金额:{{ item.itemMoney || "" }}</view>
|
<view v-if="canSeeMoney">金额:{{ item.itemMoney || "" }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@ -297,64 +297,67 @@ export default {
|
|||||||
},
|
},
|
||||||
//是否可以授权给客户看
|
//是否可以授权给客户看
|
||||||
canOpenCus:false,
|
canOpenCus:false,
|
||||||
|
//是否可以看见钱
|
||||||
|
canSeeMoney:false,
|
||||||
//当前选择的操作:working-维修期间|done_half-阶段完成|done-全部完成递交下一维修班组选人维修
|
//当前选择的操作:working-维修期间|done_half-阶段完成|done-全部完成递交下一维修班组选人维修
|
||||||
nowChooseOperate:"",
|
nowChooseOperate:"",
|
||||||
carInfo: {},
|
carInfo: {},
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
loginUser:{},
|
loginUser:{},
|
||||||
selectedProj: [
|
selectedProj: [
|
||||||
{
|
// {
|
||||||
projName: '清洗内饰',
|
// projName: '清洗内饰',
|
||||||
amount: '280',
|
// amount: '280',
|
||||||
date: '2024-10-20 12:00',
|
// date: '2024-10-20 12:00',
|
||||||
desc: '车辆已到维修厂,工作人员正准备开始维修',
|
// desc: '车辆已到维修厂,工作人员正准备开始维修',
|
||||||
imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
|
// imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
|
||||||
isSend: true,
|
// isSend: true,
|
||||||
// 待审核部件
|
// // 待审核部件
|
||||||
examinePart: [],
|
// examinePart: [],
|
||||||
id: 'projId1',
|
// id: 'projId1',
|
||||||
// 销售
|
// // 销售
|
||||||
salesman: [
|
// salesman: [
|
||||||
{
|
// {
|
||||||
name: '魏书豪',
|
// name: '魏书豪',
|
||||||
id: '11111'
|
// id: '11111'
|
||||||
}
|
// }
|
||||||
],
|
// ],
|
||||||
// 施工
|
// // 施工
|
||||||
constructor: []
|
// constructor: []
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
projName: '清洗内饰',
|
// projName: '清洗内饰',
|
||||||
amount: '280',
|
// amount: '280',
|
||||||
date: '2024-10-20 12:00',
|
// date: '2024-10-20 12:00',
|
||||||
desc: '车辆已到维修厂,工作人员正准备开始维修',
|
// desc: '车辆已到维修厂,工作人员正准备开始维修',
|
||||||
imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
|
// imageList: [{filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}, {filePath: ''}],
|
||||||
isSend: false,
|
// isSend: false,
|
||||||
// 待审核部件
|
// // 待审核部件
|
||||||
hasNoReviewPart: false,
|
// hasNoReviewPart: false,
|
||||||
id: 'projId2',
|
// id: 'projId2',
|
||||||
salesman: [],
|
// salesman: [],
|
||||||
constructor: []
|
// constructor: []
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
projName: '清洗内饰',
|
// projName: '清洗内饰',
|
||||||
amount: '280',
|
// amount: '280',
|
||||||
date: '2024-10-20 12:00',
|
// date: '2024-10-20 12:00',
|
||||||
desc: '车辆已到维修厂,工作人员正准备开始维修',
|
// desc: '车辆已到维修厂,工作人员正准备开始维修',
|
||||||
imageList: [],
|
// imageList: [],
|
||||||
isSend: false,
|
// isSend: false,
|
||||||
// 待审核部件
|
// // 待审核部件
|
||||||
hasNoReviewPart: true,
|
// hasNoReviewPart: true,
|
||||||
id: 'projId3',
|
// id: 'projId3',
|
||||||
salesman: [],
|
// salesman: [],
|
||||||
constructor: []
|
// constructor: []
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
submitData:[]
|
submitData:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(data) {
|
onLoad(data) {
|
||||||
this.loginUser = getUserInfo()
|
this.loginUser = getUserInfo()
|
||||||
|
this.canSeeMoney = !this.loginUser.roleCodes.includes('repair_staff');
|
||||||
console.log(this.loginUser,294)
|
console.log(this.loginUser,294)
|
||||||
console.log(data)
|
console.log(data)
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
@ -414,10 +417,14 @@ export default {
|
|||||||
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
let fileStr = this.fileList.map(item=>item.url.replace(config.baseImageUrl,"")).join(",")
|
||||||
if("working"==this.nowChooseOperate){
|
if("working"==this.nowChooseOperate){
|
||||||
//维修中拍照
|
//维修中拍照
|
||||||
const result = await saveTicketsRecords(this.ticketInfo.id,null,null,null,"sgz","施工中拍照记录",fileStr);
|
const result = await saveTicketsRecords(this.ticketInfo.id,null,this.nowRepair.repairItemId,null,"sgz","施工中拍照记录",fileStr,"","");
|
||||||
}else if("done_half"==this.nowChooseOperate || "done"==this.nowChooseOperate){
|
}else if("done_half"==this.nowChooseOperate){
|
||||||
//阶段完成
|
//阶段完成
|
||||||
const result = await saveTicketsRecords(this.ticketInfo.id, '03',this.nowRepair.repairItemId,"03","sgwczj","阶段完成",fileStr);
|
const result = await saveTicketsRecords(this.ticketInfo.id, '03',this.nowRepair.repairItemId,"03","sgwczj","阶段完成",fileStr,"","");
|
||||||
|
}else if("done"==this.nowChooseOperate){
|
||||||
|
//移交总检
|
||||||
|
const result = await saveTicketsRecords(this.ticketInfo.id, '03',this.nowRepair.repairItemId,"03","sgwczj","维修完成移交总检",fileStr,"02","");
|
||||||
|
//
|
||||||
}
|
}
|
||||||
this.$refs.popup.close()
|
this.$refs.popup.close()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -425,13 +432,20 @@ export default {
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
if("done"==this.nowChooseOperate){
|
if("done"==this.nowChooseOperate){
|
||||||
//全部完成,需要指派下一个维修人
|
//移交总检需要返回
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack()
|
||||||
|
},500)
|
||||||
|
}
|
||||||
|
if("other"==this.nowChooseOperate){
|
||||||
|
//移交下一班组维修,需要指派下一个维修人
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-order/choosePeople/choosePeople?id=' + this.ticketInfo.id +'&ifDetail=true'
|
url: '/pages-order/choosePeople/choosePeople?id=' + this.ticketInfo.id+'&itemId='+this.nowRepair.repairItemId +'&ifDetail=true'
|
||||||
})
|
})
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error("result",result);
|
console.error("result",result);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
@ -470,7 +484,10 @@ export default {
|
|||||||
text: '阶段完成', active: false,code:"done_half"
|
text: '阶段完成', active: false,code:"done_half"
|
||||||
})
|
})
|
||||||
this.content.push({
|
this.content.push({
|
||||||
text: '全部完成', active: false,code:"done"
|
text: '项目完成', active: false,code:"other"
|
||||||
|
})
|
||||||
|
this.content.push({
|
||||||
|
text: '移交总检', active: false,code:"done"
|
||||||
})
|
})
|
||||||
//查当前维修的项目
|
//查当前维修的项目
|
||||||
this.selectNowRepair()
|
this.selectNowRepair()
|
||||||
@ -491,8 +508,8 @@ export default {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
this.content[e.index].active = !e.item.active
|
this.content[e.index].active = !e.item.active
|
||||||
this.nowChooseOperate = e.item.code
|
this.nowChooseOperate = e.item.code
|
||||||
if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code){
|
if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code || "other"==e.item.code){
|
||||||
//维修过程中拍照上传、阶段完成、整体完成
|
//维修过程中拍照上传、阶段完成、移交其他班组、移交总检
|
||||||
this.fileList=[]
|
this.fileList=[]
|
||||||
this.$refs.popup.open("bottom")
|
this.$refs.popup.open("bottom")
|
||||||
}else if("start" == e.item.code){
|
}else if("start" == e.item.code){
|
||||||
@ -572,7 +589,6 @@ export default {
|
|||||||
async startWorkRequest(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark){
|
async startWorkRequest(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark){
|
||||||
try {
|
try {
|
||||||
const result = await saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark,null);
|
const result = await saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark,null);
|
||||||
debugger
|
|
||||||
//刷新数据
|
//刷新数据
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
console.log(this.userInfo)
|
console.log(this.userInfo)
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
this.getOrderList()
|
this.onRefresherrefresh()
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
changeTabFun(id) {
|
changeTabFun(id) {
|
||||||
|
12
pages.json
12
pages.json
@ -122,6 +122,18 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "service/applyList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "service/todoDetail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -88,8 +88,10 @@ export function getDictByCode(dictCode){
|
|||||||
* @param recordType 操作类型 对应后端枚举:RecordTypeEnum
|
* @param recordType 操作类型 对应后端枚举:RecordTypeEnum
|
||||||
* @param remark 备注
|
* @param remark 备注
|
||||||
* @param image 图片相对路径,多个英文逗号隔开
|
* @param image 图片相对路径,多个英文逗号隔开
|
||||||
|
* @param finishType 完成类型 01:完成并移交下一班组、02:完成并移交总检、03:完成工单
|
||||||
|
* @param nextName 下一班组名称
|
||||||
*/
|
*/
|
||||||
export function saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark,image){
|
export function saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,recordType,remark,image,finishType,nextName){
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let dataObj = {
|
let dataObj = {
|
||||||
id: id,
|
id: id,
|
||||||
@ -97,6 +99,8 @@ export function saveTicketsRecords(id,ticketsWorkStatus,itemId,itemStatus,record
|
|||||||
item: {id: itemId, itemStatus: itemStatus},
|
item: {id: itemId, itemStatus: itemStatus},
|
||||||
recordType: recordType,
|
recordType: recordType,
|
||||||
remark: remark,
|
remark: remark,
|
||||||
|
finishType:finishType,
|
||||||
|
nextName:nextName,
|
||||||
image: image
|
image: image
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
|
Loading…
Reference in New Issue
Block a user