已完成接口调用95%,新增页面开始

master
chen 2022-06-21 17:53:12 +08:00
parent e40f1fa74d
commit a0b1ddb2c1
12 changed files with 954 additions and 434 deletions

View File

@ -29,7 +29,7 @@ export function handleWorkOrderGet(data) {
}
// 处理工单,提交
export function handleWorkOrderSubmit(data) {
return request.post("/universal/api.order/process_order", data);
return request.get("/universal/api.order/process_order", data);
}
// 获取产品类型

View File

@ -76,6 +76,14 @@
"enablePullDownRefresh": false
}
},
{
"path": "workOrder/workOrderAudit",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom", //
"enablePullDownRefresh": false
}
},
{
"path": "workOrder/workorderTwo",
"style": {

View File

@ -13,8 +13,8 @@
statuHeigh:uni.getSystemInfoSync().statusBarHeight,
// ad_img:'/static/public/icon-guide.png',
ad_img:'',
count:6,//
timeNum:6000,//
count:3,//
timeNum:3000,//
countTimer:null,//
timeNumTimer:null,//
omg:0//0 1
@ -26,7 +26,7 @@
if(res.code) {
this.ad_img = res.data.ad_img;
this.countTimer = setInterval(()=>{
if(this.count >= 1){
if(this.count > 1){
this.count--
}
},1000)

View File

@ -85,7 +85,7 @@
</view>
</view>
<!-- 工程师可见 -->
<view v-if="role==4 || role==3">
<view v-if="role==3 || role==4 || role==5">
<!-- 项目维保 -->
<view class="home-fun-box" v-if="role==4">
<view class="fun-title col3 fon28 disac bold">项目维保</view>
@ -99,9 +99,9 @@
</view>
</view>
</view>
<view v-if="role==3">
<view v-if="role==3 || role==5">
<!-- 待办工单 -->
<view class="home-fun-box">
<view class="home-fun-box" v-if="role==3">
<view class="fun-title col3 fon28 disac bold">待办工单</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
@ -128,7 +128,7 @@
</view>
</view>
<!-- 工单数据 -->
<view class="home-fun-box">
<view class="home-fun-box" v-if="role !== 5">
<view class="fun-title col3 fon28 disac bold">工单数据</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
@ -287,7 +287,7 @@
//
projectRepairList:[
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0,id:2},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:0,id:2},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维保中',num:0,id:4},
],
//
@ -301,12 +301,12 @@
settlementList:[
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0,id:7},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:5},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:0},
],
//
stayWorkOrderList:[
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:0,id:1},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维保',num:0,id:3},
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8},
],
@ -333,6 +333,7 @@
onShow() {
//
this.checkHome();
console.log(this.role,'角色id')
},
onLoad(options) {
// url
@ -413,7 +414,7 @@
})
},
//
//
getIncrementServiceType(){
this.$requst.get('/universal/api.vas/vas_type').then(res=>{
if(res.code) {

View File

@ -16,20 +16,30 @@
<view @tap="checkEv(dataIndex)" class="button">查询</view>
</view>
</view>
<view class="recently-query-title">最近查询</view>
<view class="recently-query-content" v-for="(item,index) in recentlyQuery ">
<view class="li" @click="goDetail()">
<image class="icon" src="../../static/iocn/jfd.png" mode="widthFix"></image>
<view class="text-content">
<view class="title clips1">{{item.name}}</view>
<view class="text">编号{{item.code}}</view>
<view class="text">{{item.date}}</view>
</view>
</view>
<view class="recently-query-title">最新客户</view>
<view class="recently-query-content">
<view @tap="goDetail(item.id)" class="li mar-x20 animated fadeIn" v-for="(item,index) in recentlyQuery" :key="index">
<view class="li-content">
<view class="">
<view class="title">{{item.name}}</view>
<view class="code">编号{{item.serial_number}}</view>
<view class="label-content fw" >
<view :class="industry_name ? 'label' : ''">{{item.industry_name}}</view>
<view :class="member_level ? 'label' : ''">{{item.member_level}}</view>
<view :class="member_type ? 'label' : ''">{{item.member_type}}</view>
</view>
</view>
<view class="icon">{{item.project_count}}</view>
</view>
<view class="address">
<image class="img flexs" src="../../static/iocn/dizi.png" mode=""></image>
<view class="text">{{item.address}}</view>
</view>
</view>
</view>
<view class="imgJCon">
<!-- <view class="imgJCon">
<image class="imgJ" src="../../static/iocn/jh.png" mode=""></image>
</view>
</view> -->
</view>
</template>
@ -39,116 +49,6 @@
return {
dataIndex: 0,
recentlyQuery: [],
customerQuery: [{
name: "湖南争鸣光电科技有限公司",
code: "FRID23123141123321124",
date: "2121-1-8 12:23",
img: "../../static/iocn/jfd.png"
},
{
name: "湖南争鸣光电科技有限公司a",
code: "FRID23123141123321124",
date: "2121-1-8 12:23",
img: "../../static/iocn/jfd.png"
},
{
name: "湖南争鸣光电科技有限公司b",
code: "FRID23123141123321124",
date: "2121-1-8 12:23",
img: "../../static/iocn/jfd.png"
},
{
name: "湖南争鸣光电科技有限公司c",
code: "FRID23123141123321124",
date: "2121-1-8 12:23",
img: "../../static/iocn/jfd.png"
}
],
projectQuery: [
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 2
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 1
},
{
name: "湖南工业大学化工学院会议室P2.5全彩LED显示屏",
img: "../../static/del/img001.png",
code: "20220108-1001",
model: "DS-CK25FI/H",
size: "3.94*2.02",
installationSite: "xxx综合楼2楼会议室",
address: "湖南省长沙市高新开发区谷园路109号像素大厦1205",
date: "2022/01/08",
state: 0
},
],
spareQuery: [{
name: "湖南工业大学生化学院三楼会议室",
date: "2021-04-06 16:45:45"
},
{
name: "湖南工业大学生化学院三楼会议室",
date: "2021-04-06 16:45:45"
},
{
name: "湖南工业大学生化学院三楼会议室",
date: "2021-04-06 16:45:45"
},
{
name: "湖南工业大学生化学院三楼会议室",
date: "2021-04-06 16:45:45"
},
],
dataList: [{
title: "客户查询",
},
@ -160,28 +60,45 @@
},
],
key_word: '', //
list_rows: 10,
page:1
}
},
onLoad(op) {
if (op.index != undefined) this.dataIndex = op.index;
this.recentlyQuery = [...this.customerQuery]
this.getData();
},
methods: {
//
navIndex(index) {
this.dataIndex = index
if (this.dataIndex == 0) {
this.recentlyQuery = [...this.customerQuery]
} else if (this.dataIndex == 1) {
this.recentlyQuery = [...this.projectQuery]
} else {
this.recentlyQuery = [...this.spareQuery]
}
},
//
//
getData(){
let params = {
type_id:1,
keyword:this.key_word,
list_rows:this.list_rows,
page:this.page
}
this.$requst.post('/universal/api.search/search',params).then(res=>{
console.log(res,'最新客户')
if(res.code) {
res.data.data.forEach(item=>{
let obj = {
id:item.member_id,
name:item.name,
industry_name:item.industry_name,
serial_number:item.serial_number,
member_level:item.member_level,
member_type:item.member_type,
project_count:item.project_count,
address:item.address
}
this.recentlyQuery.push(obj);
})
}
})
},
//
checkEv(index) {
@ -195,20 +112,10 @@
})
},
//
goDetail() {
if (this.dataIndex == 1) {
uni.navigateTo({
url: "/pagesA/project/details"
})
} else if (this.dataIndex == 0) {
uni.navigateTo({
url: '/pagesA/dataQuery/details'
})
} else {
uni.navigateTo({
url: '/pagesA/dataQuery/dataQuery'
})
}
goDetail(id) {
uni.navigateTo({
url: `/pagesA/dataQuery/details?id=${id}`
})
},
}
@ -223,7 +130,6 @@
padding-top: 107rpx;
background-color: #00A2E9;
box-sizing: border-box;
}
.head .text {
@ -325,263 +231,70 @@
font-weight: bold;
padding: 50rpx 34rpx 44rpx;
}
.recently-query-content {
padding: 0 34rpx;
box-sizing: border-box;
}
.recently-query-content .li {
width: 100%;
height: 232rpx;
box-sizing: border-box;
background-color: #FFFFFF;
border-radius: 15rpx;
padding-top: 30rpx;
padding-left: 40rpx;
margin-bottom: 37rpx;
display: flex;
}
.recently-query-content .li .icon {
width: 37rpx;
height: 37rpx;
margin-right: 40rpx;
margin-top: 8rpx;
}
.recently-query-content .li .text-content {
flex: 1;
}
.recently-query-content .li .text-content .title {
color: #30364c;
font-size: 33rpx;
margin-bottom: 25rpx;
padding-right: 50rpx;
}
.recently-query-content .li .text-content .text {
color: #b5b5b5;
font-size: 27rpx;
margin-bottom: 25rpx;
}
.imgJ {
width: 40rpx;
height: 40rpx;
position: fixed;
display: block;
margin: auto;
}
.imgJCon {
display: flex;
justify-content: center;
height: 40rpx;
margin-top: 180rpx;
}
.project-list .li {
width: 710rpx;
box-sizing: border-box;
background-color: #FFFFFF;
position: relative;
margin: auto;
margin-bottom: 20rpx;
padding: 33rpx 23rpx;
}
.project-list .li .icon {
width: 135rpx;
height: 40rpx;
position: absolute;
font-size: 24rpx;
color: #FFFFFF;
right: 23rpx;
line-height: 40rpx;
text-align: center;
background-size: 100% 100%;
top: -10rpx;
}
.project-list .li .iconBer {
background-image: url(../../static/iocn/za.png);
}
.project-list .li .iconBera {
background-image: url(../../static/iocn/zac.png);
}
.project-list .li .iconBerb {
background-image: url(../../static/iocn/lsxm.png);
}
.project-list .li .message {
display: flex;
}
.project-list .li .message .img {
width: 230rpx;
margin-right: 11rpx;
height: 180rpx;
}
.project-list .li .message .text {
flex: 1;
}
.project-list .li .message .text .title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
word-break: break-all;
margin-bottom: 15rpx;
font-size: 28rpx;
line-height: 30rpx;
color: #333333;
font-weight: bold;
}
.project-list .li .message .serial-number {
color: #ff8800;
font-size: 24rpx;
margin-bottom: 15rpx;
line-height: 24rpx;
}
.project-list .li .message .specification {
color: #00b1ff;
font-size: 24rpx;
margin-bottom: 15rpx;
line-height: 24rpx;
}
.project-list .li .message .installation-site {
color: #6b6a6a;
font-size: 24rpx;
margin-bottom: 15rpx;
line-height: 24rpx;
}
.project-list-address {
display: flex;
margin-top: 10rpx;
/* justify-content: space-between; */
}
.project-list-address .text {
font-size: 24rpx;
}
.project-list-address .date {
font-size: 24rpx;
text-align: right;
margin-left: 20rpx;
margin-top: 12rpx;
}
.project-list-address .img {
width: 23rpx;
height: 28rpx;
margin-right: 10rpx;
}
.project-list-address .address {
display: flex;
color: #666666;
align-items: center;
}
.dataQuery-content {
font-size: 24rpx;
color: #333333;
margin-top: 15rpx;
}
.dataQuery-content .li {
background-color: #FFFFFF;
padding: 26rpx 28rpx;
margin-bottom: 14rpx;
}
.dataQuery-content .li {
position: relative;
}
.dataQuery-content .li .text-content {
display: flex;
border-bottom: 2rpx solid #EEEEEE;
padding-bottom: 10rpx;
}
.dataQuery-content .li .text-content .left {
width: 48%;
}
.dataQuery-content .li .text-content .text {
margin-top: 20rpx;
}
.cor {
color: #ff9000;
}
.cor1 {
color: #999999;
}
.dataQuery-content .li .icon {
background-image: url(../../static/iocn/zc.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon .icon-text {
transform: rotateZ(20deg);
color: #53e5d0;
}
.dataQuery-content .li .icon1 {
background-image: url(../../static/iocn/dwx.png);
width: 125rpx;
height: 91rpx;
display: flex;
align-items: center;
box-sizing: border-box;
background-size: 100%;
padding-left: 30rpx;
right: 20rpx;
top: 20rpx;
position: absolute;
}
.dataQuery-content .li .icon1 .icon-text {
transform: rotateZ(20deg);
color: #ff0006;
}
.recently-query-content .li {
background-color: #FFFFFF;
padding: 30rpx 34rpx;
}
.recently-query-content .li .title {
font-size: 30rpx;
color: #333333;
margin-bottom: 25rpx;
}
.recently-query-content .li .code {
font-size: 24rpx;
margin-bottom: 25rpx;
color: #666666;
}
.recently-query-content .li .label-content {
display: flex;
padding-bottom: 22rpx;
}
.recently-query-content .li .label-content .label {
padding: 10rpx 30rpx;
background-color: #EDEDED;
margin-right: 12rpx;
color: #999999;
font-size: 24rpx;
border-radius: 5rpx;
margin-top: 10rpx;
}
.recently-query-content .li .li-content {
display: flex;
align-items: center;
border-bottom: 2rpx solid #EDEDED;
justify-content: space-between;
}
.recently-query-content .li .li-content .icon {
width: 71rpx;
height: 66rpx;
background-color: #00A2E9;
box-shadow: -5rpx 5rpx 10rpx rgba(0, 0, 0, 0.2);
font-size: 36rpx;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
}
.recently-query-content .li .address {
display: flex;
align-items: center;
padding-top: 20rpx;
color: #666666;
font-size: 24rpx
}
.recently-query-content .li .address .img {
width: 17rpx;
height: 24rpx;
margin-right: 10rpx;
}
</style>

View File

@ -123,12 +123,14 @@
title:'加载中...',
mask:true
})
this.$requst.post('/universal/api.accessory/accessory_list', {
this.$requst.get('/universal/api.accessory/accessory_list', {
list_rows: this.dataList.list_rows,
page: this.dataList.page,
}).then(res => {
if (res.code == 1) {
this.dataList.data = res.data;
this.dataList.data = res.data.data;
this.total = res.data.total;
console.log(res,'配件数据')
for (var i = 0; i < this.dataList.data.length; i++) {
this.$set(this.dataList.data,i,{num:1,...this.dataList.data[i],sum:this.dataList.data[i].price,isJob:false})
}

View File

@ -101,6 +101,7 @@
keyword:this.keyword
}
this.$requst.get('/universal/api.order/user_location',params).then(res=>{
console.log(res,'人员状态')
if(res.code) {
this.total = res.data.total;
if(this.page==1) this.dataList = [];

View File

@ -390,7 +390,9 @@
fault_picture:this.temporaryImg.join(','),//
service_method:this.serviceModeList[this.serviceModeIndex].id//
}
console.log(params,'签到数据')
handleWorkOrderSubmit(params).then(res=>{
console.log(res,'签到状态')
if(res.code) {
uni.navigateTo({
url: `/pagesA/workOrder/workorderTwo?id=${this.orderId}`

View File

@ -0,0 +1,792 @@
<template>
<view class="content">
<statusNav returnColor="#c2c2c2" navBarTitle="审核工单"></statusNav>
<container-subgroup-two>
<view slot="content" style="margin:-30rpx -30rpx 0 -30rpx;">
<view class="details-nav" :style="{top:statusBarHeight + 'px'}">
<view class="li pad-sx36" @click="detailsNavpa(index)" :class="item.state?'on':''"
v-for="(item,index) in detailsNav" :key="index">
{{item.title}}
</view>
</view>
<swiper class="swiper" @change="swiperCurrentFun" :current="swiperCurrent"
:style="'height:'+swiHeight+'px'">
<!-- 基础信息 start -->
<swiper-item>
<view class="swiper-item uni-bg-red">
<view id="swi1">
<view class="work-order-from">
<view class="state" :style="{backgroundColor: statusColor}">状态{{statusText}}</view>
<view class="li" style="margin-top: 20rpx;">
<view class="title">工单编号</view>
<input type="text" disabled class="input" :value="detailObj.order_number" />
</view>
<view class="li">
<view class="title">项目编号</view>
<input type="text" disabled class="input" :value="detailObj.project_number" />
</view>
<view class="li">
<view class="title">项目名称</view>
<input type="text" disabled class="input input-black"
:value="detailObj.project_name" />
</view>
<view class="li">
<view class="title">产品类型</view>
<input type="text" disabled class="input" :value="detailObj.product_type" />
</view>
<view class="li">
<view class="title">安装位置</view>
<input type="text" disabled class="input"
:value="detailObj.installation_location" />
</view>
<view class="li">
<view class="title">维保类型</view>
<input type="text" disabled class="input" :value="detailObj.fault_type" />
</view>
<view class="li">
<view class="title">紧急程度</view>
<input type="text" disabled class="input"
:value="detailObj.emergency_level_view" />
</view>
<view class="li">
<view class="title">维保说明</view>
<view style="overflow: hidden;overflow-y: scroll;max-height: 200rpx;"
class="input line-h36">{{detailObj.failure_description}}</view>
</view>
<view class="li">
<view class="title">维保图片</view>
<view class="input">
<image class="img" v-for="(item,index) in detailObj.fault_picture" :key="index" :src="item" mode="aspectFill" lazy-load></image>
</view>
</view>
</view>
<view class="work-order-from">
<view class="li">
<view class="title"> </view>
<input type="text" disabled class="input" :value="detailObj.order_contact" />
</view>
<view class="li">
<view class="title">报单时间</view>
<input type="text" disabled class="input" :value="detailObj.order_times" />
</view>
<view class="li">
<view class="title">服务方式</view>
<input type="text" disabled class="input input-black"
:value="detailObj.service_method_view" />
</view>
<view class="li">
<view class="title">定位地址</view>
<input type="text" disabled class="input" :value="detailObj.service_address" />
</view>
</view>
</view>
</view>
</swiper-item>
<!-- 基础信息 end -->
<!-- 处理详情 start -->
<swiper-item>
<view class="swiper-item uni-bg-green">
<view id="swi2">
<view class="work-order-from">
<view class="state" :style="{backgroundColor: statusColor}">状态{{statusText}}</view>
<view class="li" style="margin-top: 20rpx;">
<view class="title">开始时间</view>
<input type="text" disabled class="input " :value="handleDetail.start_times" />
</view>
<view class="li">
<view class="title">结束时间</view>
<input type="text" disabled class="input "
:value="handleDetail.completion_times" />
</view>
<view class="li">
<view class="title">维保用时 </view>
<input type="text" disabled class="input input-black"
:value="handleDetail.maintenance_time" />
</view>
<view class="li">
<view class="title">维保费用</view>
<input type="text" disabled class="input "
:value="`¥${handleDetail.pay_price}元`" />
</view>
<view class="li">
<view class="title">等待时长</view>
<input type="text" disabled class="input " :value="handleDetail.waiting_time" />
</view>
<view class="li">
<view class="title">主维保人</view>
<input type="text" disabled class="input "
:value="handleDetail.maintenance_name" />
</view>
<view class="li">
<view class="title">更换配件</view>
<view class="rideo">
<view class="isrideo">
<view class="icon " :class="handleDetail.is_accessory == 1 ?'on':''">
<view class="icon-content"></view>
</view>
<view class="fon24" style="color: #8b8b8b;"></view>
</view>
<view class="isrideo">
<view class="icon" :class="handleDetail.is_accessory == 1 ?'':'on'">
<view class="icon-content"></view>
</view>
<view class="fon24" style="color: #8b8b8b;"></view>
</view>
</view>
</view>
<view class="li">
<view class="title">工作描述</view>
<view style="overflow: hidden;overflow-y: scroll;max-height: 200rpx;"
class="input line-h36">{{handleDetail.work_explanation}}</view>
</view>
<view class="li">
<view class="title">维保图片</view>
<view class="input add-display">
<view class="">
<image class="img"
v-for="(item,index) in handleDetail.maintenance_pictures"
:key="index" :src="item" mode="aspectFill" lazy-load></image>
</view>
</view>
</view>
<view class="li">
<view class="title">维保原因</view>
<textarea auto-height disabled class="input "
:value="handleDetail.failure_reason" />
</view>
<view class="li">
<view class="title">维保人员 </view>
<input type="text" disabled class="input "
:value="handleDetail.maintenance_more" />
</view>
</view>
</view>
</view>
</swiper-item>
<!-- 处理详情 end -->
<!-- 更换配件 start -->
<swiper-item>
<view class="swiper-item uni-bg-blue">
<view id="swi3">
<view class="change-accessory">
<view class="state" :style="{backgroundColor: statusColor}">状态{{statusText}}</view>
<view class="list">
<view class="li" v-for="(item,index) in replaceParts" :key="index">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"
lazy-load></image>
<view class="text-content">
<view class="title">
<view class="text clips1">全彩LED显示屏电源</view>
<view class="date">1011-1</view>
</view>
<view class="text">配件品牌华鑫电源</view>
<view class="text">规格型号5A-75B</view>
<view class="text">使用数量1</view>
</view>
</view>
</view>
</view>
</view>
</view>
</swiper-item>
<!-- 更换配件 end -->
<!-- 处理过程 start -->
<swiper-item>
<view class="swiper-item uni-bg-blue">
<view id="swi4">
<view class="course-nav">
<view class="state" :style="{backgroundColor: statusColor}">状态{{statusText}}</view>
<view class="date">报修时间{{handleProcess.order_times}}</view>
<view class="code">
<view class="">工单编号{{handleProcess.order_number}}</view>
<view class="btn" @click="copy(handleProcess.order_number)"></view>
</view>
</view>
<view class="course-content">
<view class="record-content">
<view class="title">过程追踪</view>
<view class="list">
<view class="li pad-z40 fon27 col9 pad-x20"
:class="index==0 ? 'activeTrack' : ''"
v-for="(item,index) in handleProcess.time_line" :key="index">
<view class="disac fw line-h40">
<view class="text">{{item.value}}</view>
<view class="date">{{item.create_time}}</view>
</view>
</view>
</view>
<view v-if="order_status==8" class="button" @tap="goEvaluate()"></view>
</view>
</view>
</view>
</view>
</swiper-item>
<!-- 处理过程 end -->
</swiper>
</view>
</container-subgroup-two>
</view>
</template>
<script>
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
import statusNav from '../../components/status-nav.vue';
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
import {
handleWorkOrderGet
} from '../../jsFile/public-api.js';
export default {
components: {
footTabOne,
statusNav,
containerSubgroupTwo
},
data() {
return {
swiperCurrent: 0,
swiHeight: 0,
statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40,
statusText: '', //
statusColor: '', //
detailsNav: [{
title: "基础信息",
state: true
},
{
title: "处理详情",
state: false
},
{
title: "更换配件",
state: false
},
{
title: "处理过程",
state: false
},
],
orderId: '', //id
detailObj: {}, //
handleDetail: {}, //
replaceParts: [], //
handleProcess: {}, //
order_status: '' //
}
},
mounted() {
const query = uni.createSelectorQuery().in(this);
query.select('#swi1').boundingClientRect(data => {
this.swiHeight = data.height - 100
}).exec();
this.detailsNavFun(0)
},
onLoad(op) {
this.statusText = op.statusText;
this.statusColor = op.statusColor;
if (op.orderId != undefined) {
this.orderId = op.orderId;
//
this.getDetail(1);
}
},
methods: {
//
getDetail(type) {
let params = {
order_id: this.orderId,
type:type
}
this.$requst.get('/universal/api.order/order_info', params).then(res => {
console.log(res.data,'工单详情')
if (res.code) {
switch (type) {
case 1:
this.detailObj = res.data;
this.order_status = this.detailObj.order_status;
break;
case 2:
this.handleDetail = res.data;
break;
case 3:
this.replaceParts = res.data.accessory;
break;
case 4:
this.handleProcess = res.data;
break;
}
setTimeout(() => {
const query = uni.createSelectorQuery().in(this);
query.select(`#swi${type}`).boundingClientRect(data => {
this.swiHeight = data.height
}).exec();
}, 500)
}
})
},
copy(value) {
//
uni.showModal({
content: value, //
confirmText: '复制内容',
success: () => { //
//uni.setClipboardData
uni.setClipboardData({
data: value, //
success: () => { //
uni.showToast({ //
title: '复制成功'
})
}
});
}
});
},
swiperCurrentFun(data) {
let current = data.detail.current;
//
// this.detailSwitch(current);
this.detailsNavFun(current);
},
detailsNavFun(index) {
for (var i = 0; i < this.detailsNav.length; i++) {
this.detailsNav[i].state = false
}
this.detailsNav[index].state = true
},
detailsNavpa(index) {
this.swiperCurrent = index;
//
this.detailSwitch(index);
},
//
detailSwitch(index) {
let type = [1, 2, 3, 4][index];
this.getDetail(type);
},
//
goEvaluate() {
uni.navigateTo({
url: `/pagesB/i-want-evaluate/i-want-evaluate?orderId=${this.orderId}`
})
}
}
}
</script>
<style>
.content {}
.swiper {
width: 100%;
}
.submit-button {
width: 686rpx;
border-radius: 50rpx;
height: 90rpx;
background-color: #02A2ea;
line-height: 90rpx;
color: #FFFFFF;
margin-top: 60rpx;
text-align: center;
font-size: 30rpx;
}
.work-order-from {
margin-top: 10rpx;
background-color: #FFFFFF;
padding-bottom: 40rpx;
}
.work-order-from .li {
display: flex;
padding: 20rpx 40rpx;
border-bottom: 2rpx solid #ececec;
}
.work-order-from .li .title {
font-size: 26rpx;
text-align: right;
white-space: nowrap;
/* flex: 1; */
}
.work-order-from .li .input {
font-size: 24rpx;
color: #8b8b8b;
width: 80%;
padding-left: 0;
}
.work-order-from .li .input .img {
width: 169rpx;
height: 127rpx;
margin-right: 10rpx;
}
.state {
display: inline-block;
padding: 2rpx 20rpx 2rpx 16rpx;
height: 52rpx;
line-height: 52rpx;
border-radius: 0 25rpx 25rpx 0;
font-size: 24rpx;
color: #ffffff;
background-color: #dddddd;
box-shadow: 0rpx 6rpx 6rpx #999999;
}
.work-order-from .li .input-black {
color: #292929;
}
.details-nav {
display: flex;
justify-content: space-between;
border-bottom: solid #D5D4D4 2rpx;
padding: 0 24rpx;
position: sticky;
z-index: 2;
box-sizing: border-box;
width: 100%;
background-color: #F7F7F7;
left: 0rpx;
margin-bottom: 20rpx;
}
.details-nav .li {
width: 130rpx;
font-size: 30rpx;
}
.details-nav .on {
color: #00A2E9;
position: relative;
}
.details-nav .on::after {
content: "";
width: 100%;
position: absolute;
left: 0rpx;
bottom: 0rpx;
height: 6rpx;
background-color: #00A2E9;
}
.course-nav {
background-color: #fff;
}
.course-nav .date {
font-size: 28rpx;
color: #333333;
padding: 20rpx 34rpx;
}
.course-nav .code {
display: flex;
font-size: 28rpx;
padding: 20rpx 34rpx;
padding-top: 0rpx;
align-items: center;
}
.course-nav .code .btn {
background-color: #eeeeee;
height: 40rpx;
border-radius: 10rpx;
text-align: center;
line-height: 40rpx;
padding: 4rpx 20rpx;
margin-left: 28rpx;
border: solid #999999 2rpx;
}
.record-content {
padding: 0 34rpx;
}
.course-content {
background-color: #FFFFFF;
padding-bottom: 20rpx;
margin-top: 20rpx;
padding-top: 20rpx;
}
.record-content .list .li {
display: flex;
align-items: center;
}
.record-content .list .li .icon {
width: 14rpx;
height: 14rpx;
margin-right: 50rpx;
border-radius: 50%;
background-color: #999999;
margin-left: 5rpx;
position: relative;
}
.record-content .list .li .icon::after {
content: "";
width: 2rpx;
position: absolute;
left: 7rpx;
height: 106rpx;
background-color: #999999;
top: 14rpx;
}
.record-content .list .li .con {
font-size: 26rpx;
color: #999999;
flex: 1;
}
.record-content .list .on .icon {
background-color: #5caefb;
width: 21rpx;
height: 21rpx;
margin-left: 1rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 1;
}
.record-content .list .on .icon .icon-con {
background-color: #0084ff;
width: 13rpx;
height: 13rpx;
border-radius: 50%;
}
.record-content .list .on .icon::after {
content: "";
width: 2rpx;
position: absolute;
left: 9rpx;
height: 167rpx;
z-index: 1;
background-color: #0084ff;
top: 20rpx;
}
.record-content .list .on .con {
display: block;
color: #0084ff;
}
.record-content .list .on .con .text {
margin-bottom: 35rpx;
}
.record-content .list .li .con .text {
margin-bottom: 10rpx;
}
.record-content .list .on {
align-items: flex-start;
}
.button {
width: 315rpx;
height: 88rpx;
background-color: #00A2E9;
border-radius: 44rpx;
text-align: center;
line-height: 88rpx;
margin: auto;
margin-top: 50rpx;
color: #FFFFFF;
}
.work-order-from .li .input .add-img {
width: 136rpx;
height: 127rpx;
display: flex;
justify-content: center;
background-color: #DCDCDC;
align-items: center;
}
.work-order-from .li .input .add-img .icon {
width: 64rpx;
height: 64rpx;
}
.work-order-from .li .add-display {
display: flex;
}
.change-accessory {
background-color: #FFFFFF;
}
.change-accessory .li .img {
width: 185rpx;
height: 185rpx;
margin-right: 30rpx;
}
.change-accessory .li {
padding: 34rpx;
display: flex;
border-bottom: 2rpx solid #EEEEEE;
}
.change-accessory .li .text-content {
flex: 1;
}
.change-accessory .li .text-content .title {
font-size: 30rpx;
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
}
.change-accessory .li .text-content .title .text {
width: 77%;
font-size: 30rpx;
color: #333333;
}
.change-accessory .li .text-content .date {
color: #ff0000;
font-size: 24rpx;
font-weight: bold;
}
.change-accessory .li .text-content .text {
width: auto;
font-size: 26rpx;
margin-bottom: 12rpx;
color: #666666;
}
.work-order-from .rideo {
display: flex;
}
.work-order-from .isrideo {
display: flex;
align-items: center;
margin-right: 41rpx;
}
.work-order-from .isrideo .icon {
width: 26rpx;
border: 2rpx solid #818181;
border-radius: 50%;
height: 26rpx;
margin-right: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.work-order-from .isrideo .icon .icon-content {
width: 19rpx;
height: 19rpx;
background-color: #818181;
border-radius: 50%;
}
.work-order-from .isrideo .on {
border: 2rpx solid #D81E06;
}
.work-order-from .isrideo .on .icon-content {
background-color: #D81E06
}
.record-content {
padding: 0 52rpx;
padding-top: 33rpx;
padding-bottom: 40rpx;
background-color: #FFFFFF;
}
.record-content .title {
color: #333333;
margin-left: -10rpx;
font-size: 36rpx;
margin-bottom: 40rpx;
}
.record-content .list .li {
position: relative;
display: flex;
align-items: center;
padding-top: 20rpx;
border-left: 2rpx solid #999999;
}
.record-content .list .li::before {
content: '';
display: block;
position: absolute;
left: -8rpx;
width: 14rpx;
height: 14rpx;
background-color: #999999;
border-radius: 100%;
}
.record-content .list .activeTrack {
color: #0084ff;
padding-top: 0rpx;
}
.record-content .list .activeTrack::before {
background-color: rgba(0, 132, 255, .5);
top: -4rpx;
width: 22rpx;
height: 22rpx;
left: -12rpx;
z-index: 1;
}
.record-content .list .activeTrack::after {
content: '';
display: block;
position: absolute;
top: 0;
left: -8rpx;
width: 14rpx;
height: 14rpx;
background-color: #999999;
border-radius: 100%;
}
.record-content .list .activeTrack .line-h40 {
margin-top: -20rpx;
line-height: 60rpx;
}
.record-content .list .date {
margin-left: 20rpx;
}
</style>

View File

@ -92,7 +92,7 @@
})
return {
statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40,
role: uni.getStorageSync('type_id'), // 1 2: 3: 4
role: uni.getStorageSync('type_id'), // 1 2: 3: 4 5:
date: currentDate,
workeOrderStatus:'工单状态',
array: [],
@ -154,6 +154,7 @@
title:'加载中...'
})
this.$requst.get('/universal/api.order/order_list',this.dataPage).then(res => {
console.log(res,'工单列表')
if (res.code==1) {
this.total = res.data.total;
if(this.dataPage.page==1) this.dataList = [];
@ -194,6 +195,11 @@
}
}
})
}else if(uni.getStorageSync('type_id')==5){
//
uni.navigateTo({
url: `/pagesA/workOrder/workOrderAudit?orderId=${id}&status=${status}&statusText=${statusText}&statusColor=${statusColor}`
})
} else {
//
uni.navigateTo({
@ -205,10 +211,9 @@
this.workeOrderStatus = '';
this.workeOrderStatusIndex = data.detail.value;
console.log( data.detail.value)
this.dataPage.order_status=this.array[data.detail.value].id-0
this.getDatalist()
console.log( this.dataPage.order_status,123)
this.getDatalist()
},
bindDateChange(date) {

View File

@ -3,7 +3,7 @@
<status-nav navBarTitle="新产品" returnColor="#c2c2c2"></status-nav>
<container-subgroup>
<view slot="content" style="margin: 0 -16rpx;" class="fon28">
<view @tap="goDetail(index)" class="bacf radius10 pad-sx20 pad-zy10 disjbac mar-x20 animated fadeIn" style="box-shadow: 0rpx 3rpx 20rpx rgba(0,0,0,.3);" v-for="(item,index) in dataList" :key="index">
<view @tap="goDetail(item.id)" class="bacf radius10 pad-sx20 pad-zy10 disjbac mar-x20 animated fadeIn" style="box-shadow: 0rpx 3rpx 20rpx rgba(0,0,0,.3);" v-for="(item,index) in dataList" :key="index">
<image :src="item.imgsrc" mode="aspectFill" lazy-load class="flexs" style="width: 240rpx;height: 184rpx;"></image>
<view style="height: 184rpx;" class="width100 disjb fc pad-zy20 fon24">
<view class=" clips2">{{item.title}}</view>
@ -58,6 +58,7 @@
})
this.$requst.get('/universal/api.new_product/new_product_list',{list_rows:this.size,page:this.page}).then(res=>{
if(res.code) {
console.log(res,'新产品列表1')
this.total = res.data.total;
let list = res.data.data;
list.forEach(item=>{
@ -80,9 +81,9 @@
})
},
//
goDetail(index){
goDetail(id){
uni.navigateTo({
url:'/pagesB/plan-fault-product-detail/detail?index=2'
url:`/pagesB/plan-fault-product-detail/detail?index=2&id=${id}`
})
},
//

View File

@ -39,17 +39,12 @@
this.getDetail(op.id);
},
methods: {
//
goDetail(index){
uni.navigateTo({
url:'/pagesB/product-detail/product-detail'
})
},
//
getDetail(id){
let urls = [
'/universal/api.solution/solution_info',
'/universal/api.question/question_info',
'/universal/api.new_product/new_product_info'
]
this.$requst.get(urls[this.current],{id}).then(res=>{
if(res.code==1) {