解决冲突
This commit is contained in:
commit
78bb5006ab
@ -70,6 +70,9 @@
|
|||||||
<view v-if="(order.ticketsStatus == '04' || order.ticketsStatus == '05')&& (userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection'))" @click="addProj(order)" class="btn pg">
|
<view v-if="(order.ticketsStatus == '04' || order.ticketsStatus == '05')&& (userInfo.roleCodes.includes('weixiu') || userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('general_inspection'))" @click="addProj(order)" class="btn pg">
|
||||||
修改项目
|
修改项目
|
||||||
</view>
|
</view>
|
||||||
|
<view @click="editWaresPrice" v-if="userInfo.roleCodes.includes('repair_warehouse')" class="btn pg">
|
||||||
|
修改价格
|
||||||
|
</view>
|
||||||
<view @click="gotoDetail" class="btn pg">
|
<view @click="gotoDetail" class="btn pg">
|
||||||
<!-- 在什么都不能操作的情况下,可以查看详情-->
|
<!-- 在什么都不能操作的情况下,可以查看详情-->
|
||||||
查看详情
|
查看详情
|
||||||
@ -95,6 +98,12 @@ export default {
|
|||||||
default: () => {
|
default: () => {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
userInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -119,14 +128,11 @@ export default {
|
|||||||
roleCanJd:false,
|
roleCanJd:false,
|
||||||
//当前用户是否可以进行施工、施工过程、结束施工操作---
|
//当前用户是否可以进行施工、施工过程、结束施工操作---
|
||||||
roleCanSg:false,
|
roleCanSg:false,
|
||||||
//当前用户
|
|
||||||
userInfo:{},
|
|
||||||
ifLeader:false,
|
ifLeader:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.ifLeader = getStrData('ifLeader')
|
this.ifLeader = getStrData('ifLeader')
|
||||||
this.userInfo = getUserInfo()
|
|
||||||
if(this.userInfo.roleCodes.includes("service_advisor") || this.userInfo.roleCodes.includes("general_inspection") || (this.userInfo.roleCodes.includes("repair_staff") && getStrData("ifLeader"))){
|
if(this.userInfo.roleCodes.includes("service_advisor") || this.userInfo.roleCodes.includes("general_inspection") || (this.userInfo.roleCodes.includes("repair_staff") && getStrData("ifLeader"))){
|
||||||
//服务顾问、总检可以派工,维修班组长需要判断是否可以派工
|
//服务顾问、总检可以派工,维修班组长需要判断是否可以派工
|
||||||
this.roleCanPg = true
|
this.roleCanPg = true
|
||||||
@ -167,6 +173,14 @@ export default {
|
|||||||
url: '/pages-order/orderDetail/orderDetail?id=' + this.order.id + '&isDetail=' + '1'
|
url: '/pages-order/orderDetail/orderDetail?id=' + this.order.id + '&isDetail=' + '1'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 修改配件价格
|
||||||
|
*/
|
||||||
|
editWaresPrice(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages-order/orderDetail/orderDetail?id=${this.order.id}&isDetail=0`
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 作废
|
* 作废
|
||||||
|
|||||||
@ -3,6 +3,9 @@
|
|||||||
<!--<VNavigationBar style="position: relative;z-index: 99;" leftTitle="true" backgroundColor="rgba(0,0,0,0)" title-color="#fff" title=" "></VNavigationBar>-->
|
<!--<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="bodyTopBg"></view>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
|
<view style="text-align: left;margin: 0 32rpx" >
|
||||||
|
<text class="company-text">{{ companyInfo.simpleName || companyInfo.corpName }}</text>
|
||||||
|
</view>
|
||||||
<view class="userInfoBox" >
|
<view class="userInfoBox" >
|
||||||
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-if="''==userInfo.avatar || null == userInfo.avatar" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
|
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-if="''==userInfo.avatar || null == userInfo.avatar" :src="defaultAvatar" mode="scaleToFill" @error="avatarErr"></image>
|
||||||
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else :src="imgUrlPrex+userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
|
<image @click="showUserDetail" style="width: 104rpx;height: 104rpx;border-radius: 50%;" v-else :src="imgUrlPrex+userInfo.avatar" mode="scaleToFill" @error="avatarErr"></image>
|
||||||
@ -67,25 +70,35 @@
|
|||||||
<u-icon style="width: 20rpx" color="#999" name="arrow-right" size="12"></u-icon>
|
<u-icon style="width: 20rpx" color="#999" name="arrow-right" size="12"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 总检角色和维修业务管理员 -->
|
||||||
|
<view v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||||
|
<view class="body-top-tab">
|
||||||
|
<view v-for="(item, index) in timePicker" @click="activeTab(index)" :key="index"
|
||||||
|
:class="{ active: active === index }"
|
||||||
|
class="body-top-tab-item">
|
||||||
|
{{ item }}
|
||||||
|
<view v-if="index === active" class="activeLine"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orderCount" >
|
||||||
|
<view class="orderCountItem">
|
||||||
|
<text class="label">维修中</text>
|
||||||
|
<text class="value">{{ bossNum.workingNum }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="orderCountItem">
|
||||||
|
<text class="label">已完成</text>
|
||||||
|
<text class="value">{{ bossNum.doneNum }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<!-- 服务顾问角色 -->
|
<!-- 服务顾问角色 -->
|
||||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('service_advisor')" @click="serviceWork">
|
<view class="orderCount" v-if="userInfo.roleCodes.includes('service_advisor') || userInfo.roleCodes.includes('weixiu')|| userInfo.roleCodes.includes('general_inspection')" @click="serviceWork">
|
||||||
<view class="orderCountItem">
|
<view class="orderCountItem">
|
||||||
<text class="label">待审批配件申请单</text>
|
<text class="label">待审批配件申请单</text>
|
||||||
<text class="value">{{serviceNum}}</text>
|
<text class="value">{{serviceNum}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- TODO 总检角色 -->
|
|
||||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
|
||||||
<view class="orderCountItem">
|
|
||||||
<text class="label">维修中</text>
|
|
||||||
<text class="value">{{ bossNum.workingNum }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="line"></view>
|
|
||||||
<view class="orderCountItem">
|
|
||||||
<text class="label">已完成</text>
|
|
||||||
<text class="value">{{ bossNum.doneNum }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="todoListBox">
|
<view class="todoListBox">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
待办工单
|
待办工单
|
||||||
@ -97,7 +110,7 @@
|
|||||||
<view class="todoList">
|
<view class="todoList">
|
||||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||||
<view style="text-align: center" v-if="orderList.length==0">
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
<image class="" src="@/static/images/nothing.png" ></image>
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
</view>
|
</view>
|
||||||
@ -179,6 +192,9 @@ export default {
|
|||||||
avatar: undefined,
|
avatar: undefined,
|
||||||
nickname: ''
|
nickname: ''
|
||||||
},
|
},
|
||||||
|
//时间可选项--总检、业务管理员用
|
||||||
|
timePicker:['当日','累计'],
|
||||||
|
active:0,
|
||||||
menuList: [
|
menuList: [
|
||||||
{
|
{
|
||||||
title: '新建工单',
|
title: '新建工单',
|
||||||
@ -231,6 +247,8 @@ export default {
|
|||||||
//告知客户的内容
|
//告知客户的内容
|
||||||
tellCusText:"",
|
tellCusText:"",
|
||||||
ifLeader:false,
|
ifLeader:false,
|
||||||
|
//企业信息
|
||||||
|
companyInfo:{},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
@ -239,6 +257,7 @@ export default {
|
|||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
this.companyInfo = getJSONData("companyInfo")
|
||||||
if(!this.$msgSocket){
|
if(!this.$msgSocket){
|
||||||
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
||||||
}
|
}
|
||||||
@ -269,6 +288,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
activeTab(index) {
|
||||||
|
this.active = index
|
||||||
|
//刷新统计数据
|
||||||
|
this.getBossTodo()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 作废
|
* 作废
|
||||||
*/
|
*/
|
||||||
@ -557,9 +581,13 @@ export default {
|
|||||||
* 从总检的角度差维修中、已完成的工单数量
|
* 从总检的角度差维修中、已完成的工单数量
|
||||||
*/
|
*/
|
||||||
getBossTodo(){
|
getBossTodo(){
|
||||||
|
let params={
|
||||||
|
selectType:this.active==0?"today":"all"
|
||||||
|
}
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/tickets/getBossNum',
|
url: '/admin-api/repair/tickets/getBossNum',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params:params
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
@ -751,6 +779,12 @@ export default {
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding-bottom: 30rpx;
|
padding-bottom: 30rpx;
|
||||||
}
|
}
|
||||||
|
.company-text {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 8rpx 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.userInfoBox {
|
.userInfoBox {
|
||||||
margin: 0 32rpx 40rpx;
|
margin: 0 32rpx 40rpx;
|
||||||
@ -920,7 +954,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.orderCount {
|
.orderCount {
|
||||||
margin: 40rpx 32rpx;
|
margin: 0 40rpx 32rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
padding: 40rpx;
|
padding: 40rpx;
|
||||||
@ -1064,6 +1098,35 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.body-top-tab {
|
||||||
|
display: flex;
|
||||||
|
font-size: 30rpx;
|
||||||
|
margin: 0 32rpx;
|
||||||
|
|
||||||
|
.body-top-tab-item {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
text-align: center;
|
||||||
|
padding: 16rpx 20rpx;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #0174F6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activeLine {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
width: 96rpx;
|
||||||
|
height: 6rpx;
|
||||||
|
background: #0174F6;
|
||||||
|
border-radius: 4rpx 4rpx 0rpx 0rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.repairShop {
|
.repairShop {
|
||||||
width: 686rpx;
|
width: 686rpx;
|
||||||
margin: 38rpx auto 0;
|
margin: 38rpx auto 0;
|
||||||
|
|||||||
@ -120,7 +120,7 @@
|
|||||||
<view class="projList">
|
<view class="projList">
|
||||||
<template>
|
<template>
|
||||||
<view v-for="(item,index) in ticketInfo.projects" :key="item.id" class="projEditItem">
|
<view v-for="(item,index) in ticketInfo.projects" :key="item.id" class="projEditItem">
|
||||||
<view v-if="isDetail == '0'" class="del-proj-box" @click="delProj(item.id,index)"><uni-icons type="trash" size="25" style="color: #0174F6"></uni-icons></view>
|
<view v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'" class="del-proj-box" @click="delProj(item.id,index)"><uni-icons type="trash" size="25" style="color: #0174F6"></uni-icons></view>
|
||||||
<view class="projEditLine1">
|
<view class="projEditLine1">
|
||||||
<text>{{ item.itemName }}</text>
|
<text>{{ item.itemName }}</text>
|
||||||
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
<view v-if="canSeeMoney">折扣:<input @input="onKeyInput('zk',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入折扣(0-1)" v-model="item.itemDiscount" /></view>
|
<view v-if="canSeeMoney">折扣:<input @input="onKeyInput('zk',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入折扣(0-1)" v-model="item.itemDiscount" /></view>
|
||||||
<view v-if="canSeeMoney">金额:<input type="number" disabled placeholder="请输入售价" v-model="item.itemMoney" /></view>
|
<view v-if="canSeeMoney">金额:<input type="number" disabled placeholder="请输入售价" v-model="item.itemMoney" /></view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="projBaseInfo" v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail != '0'" >
|
<view v-else class="projBaseInfo" >
|
||||||
<!-- 只读 -->
|
<!-- 只读 -->
|
||||||
<view v-if="canSeeMoney">售价:{{ item.itemPrice || "" }}</view>
|
<view v-if="canSeeMoney">售价:{{ item.itemPrice || "" }}</view>
|
||||||
<view>数量:{{ item.itemCount || "" }}</view>
|
<view>数量:{{ item.itemCount || "" }}</view>
|
||||||
@ -150,11 +150,11 @@
|
|||||||
<text >{{item.saleName || ""}}
|
<text >{{item.saleName || ""}}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
|
<image v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
|
||||||
@click="editPeople('xs', item)"></image>
|
@click="editPeople('xs', item)"></image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="isDetail == '0'">
|
<template v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'">
|
||||||
<image @click="editPeople('xs', item)"src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
<image @click="editPeople('xs', item)"src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||||
<!-- <text class="addText" @click="editPeople('xs', item)">添加服务顾问</text>-->
|
<!-- <text class="addText" @click="editPeople('xs', item)">添加服务顾问</text>-->
|
||||||
</template>
|
</template>
|
||||||
@ -167,11 +167,11 @@
|
|||||||
<text class="label">施工人员</text>
|
<text class="label">施工人员</text>
|
||||||
<text >{{ item.repairNames || ""}}</text>
|
<text >{{ item.repairNames || ""}}</text>
|
||||||
</view>
|
</view>
|
||||||
<image v-if="isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
|
<image v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
|
||||||
@click="editPeople('sg', item)"></image>
|
@click="editPeople('sg', item)"></image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="isDetail == '0'">
|
<template v-if="(loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')) && isDetail == '0'">
|
||||||
<image @click="editPeople('sg', item)" src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
<image @click="editPeople('sg', item)" src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||||
<!-- <text class="addText" @click="editPeople('sg', item)">添加施工人员</text>-->
|
<!-- <text class="addText" @click="editPeople('sg', item)">添加施工人员</text>-->
|
||||||
</template>
|
</template>
|
||||||
@ -187,12 +187,18 @@
|
|||||||
<view class="projList">
|
<view class="projList">
|
||||||
<template>
|
<template>
|
||||||
<view v-for="item in ticketInfo.wares" :key="item.id" class="projEditItem">
|
<view v-for="item in ticketInfo.wares" :key="item.id" class="projEditItem">
|
||||||
|
|
||||||
<view class="projEditLine1">
|
<view class="projEditLine1">
|
||||||
<text>{{ item.itemName }}</text>
|
<text>{{ item.itemName }}</text>
|
||||||
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
<text v-if="canSeeMoney" class="projAmount">¥{{ item.itemMoney }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="projBaseInfo">
|
<view class="projBaseInfo" v-if="loginUser.roleCodes.includes('repair_warehouse') && isDetail == '0'" >
|
||||||
|
<view v-if="canSeeMoney">售价:<input @input="onKeyInput('sj',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入售价" v-model="item.itemPrice" /></view>
|
||||||
|
<view>数量:<input @input="onKeyInput('sl',item)" style="background: white;padding: 0 10rpx" type="number" placeholder="请输入数量" v-model="item.itemCount" /></view>
|
||||||
|
<view>单位:<input style="padding: 0 10rpx" type="text" v-model="item.itemUnit" disabled /></view>
|
||||||
|
<view v-if="canSeeMoney">折扣:<input @input="onKeyInput('zk',item)" style="background: white;padding: 0 10rpx" type="decimal" placeholder="请输入折扣(0-1)" v-model="item.itemDiscount" /></view>
|
||||||
|
<view v-if="canSeeMoney">金额:{{ item.itemMoney || "" }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="projBaseInfo" v-else >
|
||||||
<view v-if="canSeeMoney">售价:{{ 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>
|
||||||
@ -467,6 +473,7 @@ export default {
|
|||||||
},
|
},
|
||||||
submit (){
|
submit (){
|
||||||
let canSubmit = true
|
let canSubmit = true
|
||||||
|
let itemList = []
|
||||||
//校验所有项目、配件是否填写了价格、数量、折扣,并且是否合理
|
//校验所有项目、配件是否填写了价格、数量、折扣,并且是否合理
|
||||||
if(this.ticketInfo.projects && this.ticketInfo.projects.length>0){
|
if(this.ticketInfo.projects && this.ticketInfo.projects.length>0){
|
||||||
this.ticketInfo.projects.map((item)=>{
|
this.ticketInfo.projects.map((item)=>{
|
||||||
@ -490,30 +497,49 @@ export default {
|
|||||||
item.itemDiscount = 1
|
item.itemDiscount = 1
|
||||||
}
|
}
|
||||||
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
||||||
|
let itemObj = {
|
||||||
|
id:item.id,
|
||||||
|
ticketId:item.ticketId,
|
||||||
|
itemPrice:item.itemPrice,
|
||||||
|
itemCount:item.itemCount,
|
||||||
|
itemDiscount:item.itemDiscount,
|
||||||
|
itemMoney:item.itemMoney,
|
||||||
|
}
|
||||||
|
itemList.push(itemObj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//APP暂时不修改配件的信息--
|
//修改配件的信息
|
||||||
// if(this.ticketInfo.wares && this.ticketInfo.wares.length>0){
|
if(this.ticketInfo.wares && this.ticketInfo.wares.length>0){
|
||||||
// this.ticketInfo.wares.map((item)=>{
|
this.ticketInfo.wares.map((item)=>{
|
||||||
// if((item.itemPrice && item.itemPrice>0) && (item.itemCount && item.itemCount>0) && (item.itemDiscount && item.itemDiscount>0 && item.itemDiscount<=1)){
|
//不校验项目金额、折扣、数量必填,但是为null的设置为0
|
||||||
// //数据符合要求重新计算
|
if(!item.itemPrice){
|
||||||
// item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
item.itemPrice = 0
|
||||||
// }else{
|
}
|
||||||
// canSubmit=false
|
if(!item.itemCount){
|
||||||
// uni.showToast({
|
item.itemCount = 0
|
||||||
// title: '维修配件'+item.itemName+'价格有误!',
|
}
|
||||||
// icon: 'none'
|
if(!item.itemDiscount){
|
||||||
// })
|
item.itemDiscount = 1
|
||||||
// return
|
}
|
||||||
// }
|
item.itemMoney = item.itemPrice*item.itemCount*item.itemDiscount
|
||||||
// })
|
let itemObj = {
|
||||||
// }
|
id:item.id,
|
||||||
|
ticketId:item.ticketId,
|
||||||
|
itemPrice:item.itemPrice,
|
||||||
|
itemCount:item.itemCount,
|
||||||
|
itemDiscount:item.itemDiscount,
|
||||||
|
itemMoney:item.itemMoney,
|
||||||
|
}
|
||||||
|
itemList.push(itemObj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if(canSubmit){
|
if(canSubmit){
|
||||||
//更新工单配件价格
|
//更新工单配件价格
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/titem/updateRepairItem',
|
url: '/admin-api/repair/titem/updateRepairItem',
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data:{"itemList":this.ticketInfo.projects,"delProjIdList":this.delProjId,"ticketId":this.ticketId}
|
data:{"itemList":itemList,"delProjIdList":this.delProjId,"ticketId":this.ticketId}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -521,9 +547,18 @@ export default {
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
uni.navigateTo({
|
//判断角色
|
||||||
url: '/pages-home/home/home'
|
if(this.loginUser.roleCodes.includes('repair_warehouse')){
|
||||||
})
|
//仓管
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-warehouse/home/home'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//其他
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/home/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
},700)
|
},700)
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
<scroll-view :refresher-triggered="isTriggered" @scrolltolower="onReachBottomCus" class="itemContent"
|
<scroll-view :refresher-triggered="isTriggered" @scrolltolower="onReachBottomCus" class="itemContent"
|
||||||
refresher-enabled
|
refresher-enabled
|
||||||
scroll-y="true" style="height: 100%" @refresherrefresh="onRefresherrefresh">
|
scroll-y="true" style="height: 100%" @refresherrefresh="onRefresherrefresh">
|
||||||
<view v-for="(item, index) in ticketWares" :key="index" class="orderItem">
|
<view v-if="active!=3" v-for="(item, index) in ticketWares" :key="index" class="orderItem">
|
||||||
<view class="order-top">
|
<view class="order-top">
|
||||||
<view class="order-top-left">
|
<view class="order-top-left">
|
||||||
<text class="order-top-name">{{ item.repairName }}{{ '配件申请单' }}</text>
|
<text class="order-top-name">{{ item.repairName }}{{ '配件申请单' }}</text>
|
||||||
@ -82,9 +82,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="ticketWares.length==0" style="text-align: center">
|
<view v-if="ticketWares.length==0 && active!=3" style="text-align: center">
|
||||||
<image class="" src="@/static/images/nothing.png"></image>
|
<image class="" src="@/static/images/nothing.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
<order-card :userInfo="userInfo" v-if="active==3" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0 && active==3">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -105,7 +109,7 @@ import {
|
|||||||
getTenantId,
|
getTenantId,
|
||||||
setJSONData
|
setJSONData
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
import {getDictTextByCodeAndValue, formatDate, formatTimestamp} from "@/utils/utils";
|
import {getDictTextByCodeAndValue, formatDate,builderOrder, formatTimestamp} from "@/utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -125,6 +129,9 @@ export default {
|
|||||||
{
|
{
|
||||||
name: '待审核'
|
name: '待审核'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '进行中工单'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
//配件单查询条件
|
//配件单查询条件
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -135,24 +142,19 @@ export default {
|
|||||||
},
|
},
|
||||||
//配件单列表
|
//配件单列表
|
||||||
ticketWares: [],
|
ticketWares: [],
|
||||||
|
//工单列表
|
||||||
|
orderList:[],
|
||||||
//数量
|
//数量
|
||||||
total: 0,
|
total: 0,
|
||||||
//下拉刷新状态
|
//下拉刷新状态
|
||||||
isTriggered: false,
|
isTriggered: false,
|
||||||
|
|
||||||
imgUrlPrex: config.baseImageUrl,
|
imgUrlPrex: config.baseImageUrl,
|
||||||
userInfo: {
|
userInfo: {
|
||||||
avatar: undefined,
|
avatar: undefined,
|
||||||
nickname: ''
|
nickname: ''
|
||||||
},
|
},
|
||||||
isShow: true,
|
isShow: true,
|
||||||
|
|
||||||
active: 0,
|
active: 0,
|
||||||
|
|
||||||
bannerIndex: 0,
|
|
||||||
shopList: [],
|
|
||||||
bannerList: [],
|
|
||||||
richTextHtml: null,
|
|
||||||
defaultAvatar: require('@/static/icons/avatar.png'),
|
defaultAvatar: require('@/static/icons/avatar.png'),
|
||||||
//未读消息数量
|
//未读消息数量
|
||||||
noReadNum: 0,
|
noReadNum: 0,
|
||||||
@ -241,7 +243,12 @@ export default {
|
|||||||
this.queryParams.pageNo = 1
|
this.queryParams.pageNo = 1
|
||||||
this.total = 0
|
this.total = 0
|
||||||
this.ticketWares = []
|
this.ticketWares = []
|
||||||
this.getTicketWares()
|
this.orderList = []
|
||||||
|
if(this.active==3){
|
||||||
|
this.getOrderList()
|
||||||
|
}else{
|
||||||
|
this.getTicketWares()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 配件单查询
|
* 配件单查询
|
||||||
@ -272,7 +279,54 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 查本人待处理工单
|
||||||
|
*/
|
||||||
|
getOrderList(){
|
||||||
|
let paramsObj = {pageNo: this.queryParams.pageNo, pageSize: this.queryParams.pageSize ,ticketNo:this.queryParams.query}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tickets/pageType',
|
||||||
|
method: 'get',
|
||||||
|
params:paramsObj
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
let thisPageRecords = []
|
||||||
|
if(res.data && res.data.hasOwnProperty("records")){
|
||||||
|
for (let i = 0; i < res.data.records.length; i++) {
|
||||||
|
let order = res.data.records[i]
|
||||||
|
let viewOrder = builderOrder(order)
|
||||||
|
if(order.booking){
|
||||||
|
viewOrder['appointDate'] = formatTimestamp(order.createTime)
|
||||||
|
}
|
||||||
|
let projectList = []
|
||||||
|
if(order.itemList){
|
||||||
|
for (let j = 0; j < order.itemList.length; j++) {
|
||||||
|
let itemObj = order.itemList[j]
|
||||||
|
if("01"==itemObj.itemType){
|
||||||
|
projectList.push({
|
||||||
|
id:itemObj.id,
|
||||||
|
name:itemObj.itemName
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
viewOrder['projectList'] = projectList
|
||||||
|
thisPageRecords.push(viewOrder)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//判断 如果获取的数据的页码不是第一页,就让之前赋值获取过的数组数据 concat连接 刚获取的第n页数据
|
||||||
|
if (this.pageNo != 1) {
|
||||||
|
this.orderList = this.orderList.concat(thisPageRecords)
|
||||||
|
} else {
|
||||||
|
this.orderList = thisPageRecords
|
||||||
|
}
|
||||||
|
//将获取的总条数赋值
|
||||||
|
this.total = res.data.total
|
||||||
|
this.isTriggered = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
@ -286,7 +340,11 @@ export default {
|
|||||||
//页码+1,调用获取数据的方法获取第二页数据
|
//页码+1,调用获取数据的方法获取第二页数据
|
||||||
this.queryParams.pageNo++
|
this.queryParams.pageNo++
|
||||||
//此处调用自己获取数据列表的方法
|
//此处调用自己获取数据列表的方法
|
||||||
this.getTicketWares()
|
if(this.active==3){
|
||||||
|
this.getOrderList()
|
||||||
|
}else{
|
||||||
|
this.getTicketWares()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,32 +24,52 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
// #ifdef APP
|
// #ifdef APP
|
||||||
//保活技术
|
//保活技术
|
||||||
this.register()
|
this.register()
|
||||||
// #endif
|
// #endif
|
||||||
if(getToken()){
|
if (getToken()) {
|
||||||
this.getNoReadNum()
|
this.getNoReadNum()
|
||||||
//跳转首页
|
//跳转首页
|
||||||
//判断是否是仓管,仓管需要跳单独的首页
|
//判断是否是仓管,仓管需要跳单独的首页
|
||||||
let userInfo = getUserInfo()
|
let userInfo = getUserInfo()
|
||||||
if(userInfo.roleCodes.includes('repair_warehouse')){
|
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||||
//仓管
|
//仓管
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-warehouse/home/home'
|
url: '/pages-warehouse/home/home'
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-home/home/home'
|
url: '/pages-home/home/home'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow(){
|
||||||
|
if (getToken()) {
|
||||||
|
//判断是否是仓管,仓管需要跳单独的首页
|
||||||
|
let userInfo = getUserInfo()
|
||||||
|
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||||
|
//仓管
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-warehouse/home/home'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/home/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
register() { //注册
|
register() { //注册
|
||||||
console.log(keepAlivePlugin, 'keepAlive');
|
console.log(keepAlivePlugin, 'keepAlive');
|
||||||
|
|||||||
@ -48,6 +48,8 @@
|
|||||||
loginApp
|
loginApp
|
||||||
} from '@/api/login';
|
} from '@/api/login';
|
||||||
import {
|
import {
|
||||||
|
getToken,
|
||||||
|
getUserInfo,
|
||||||
setToken,
|
setToken,
|
||||||
setTenantId,
|
setTenantId,
|
||||||
getTenantId,
|
getTenantId,
|
||||||
@ -96,6 +98,22 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
onShow(){
|
||||||
|
if (getToken()) {
|
||||||
|
//判断是否是仓管,仓管需要跳单独的首页
|
||||||
|
let userInfo = getUserInfo()
|
||||||
|
if (userInfo.roleCodes.includes('repair_warehouse')) {
|
||||||
|
//仓管
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-warehouse/home/home'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-home/home/home'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
wxlogin() {
|
wxlogin() {
|
||||||
uni.login({
|
uni.login({
|
||||||
@ -163,6 +181,8 @@
|
|||||||
setToken(res.data.loginResult.accessToken)
|
setToken(res.data.loginResult.accessToken)
|
||||||
setUserInfo(res.data.userinfo)
|
setUserInfo(res.data.userinfo)
|
||||||
setStrData("userId",res.data.userinfo.id)
|
setStrData("userId",res.data.userinfo.id)
|
||||||
|
//查租户下维修企业信息
|
||||||
|
this.getCompanyInfo()
|
||||||
this.getNoReadNum()
|
this.getNoReadNum()
|
||||||
if(res.data.userinfo.roleCodes.includes("repair_staff")){
|
if(res.data.userinfo.roleCodes.includes("repair_staff")){
|
||||||
//维修工角色,需要再查一下是否是班组长
|
//维修工角色,需要再查一下是否是班组长
|
||||||
@ -320,6 +340,18 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
async getCompanyInfo(){
|
||||||
|
await request({
|
||||||
|
url: "/admin-api/base/company/getCompanyByTenantId",
|
||||||
|
method: "GET",
|
||||||
|
params:{tenantId:getTenantId(),systemCode:"weixiu"}
|
||||||
|
}).then((res) => {
|
||||||
|
if(res.code==200){
|
||||||
|
setJSONData("companyInfo",res.data)
|
||||||
|
console.log(res.data,"企业信息")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
dianyidain() {
|
dianyidain() {
|
||||||
if(!this.ifPlay){
|
if(!this.ifPlay){
|
||||||
console.log('执行了,dianyidain');
|
console.log('执行了,dianyidain');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user