|
|
@@ -50,53 +50,103 @@
|
|
|
</uni-card>
|
|
|
|
|
|
<uni-card title="待办工单" :thumbnail="orderLogo">
|
|
|
- <uni-list>
|
|
|
- <uni-list-item v-for="item in todoOrderList" :key="item.id">
|
|
|
- <template v-slot:body>
|
|
|
- <view class="list-item-block">
|
|
|
- <view class="line">
|
|
|
- <uni-icons type="gear" size="18" color="lightblue" />
|
|
|
- <view v-if="item.orderType==1" class="text" style="width: 90%;color: gray;">
|
|
|
- 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">维修工单</span>
|
|
|
+ <uni-section title="新工单" type="line">
|
|
|
+
|
|
|
+ <uni-list>
|
|
|
+ <uni-list-item v-for="item in unconfirmOrderList" :key="item.id" showArrow clickable
|
|
|
+ @click="toConfirm(item)" rightText="去接单">
|
|
|
+ <template v-slot:body>
|
|
|
+ <view class="list-item-block">
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="personadd" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 创建人: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view v-else class="text" style="width: 90%;color: gray;">
|
|
|
- 工单类型: <span style="margin-left: 5px;color: cornflowerblue;">服务工单</span>
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="calendar" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 创建时间: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="line">
|
|
|
- <uni-icons type="personadd" size="18" color="lightblue" />
|
|
|
- <view class="text" style="width: 90%;color: gray;">
|
|
|
- 工单发起人: <span
|
|
|
- style="margin-left: 5px;color: cornflowerblue;">{{item.createOrderPersonName}}</span>
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="help" size="18" color="lightblue" />
|
|
|
+ <view class="text text-ellipsis" style="width: 90%;color: gray;">
|
|
|
+ 问题描述: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="line">
|
|
|
- <uni-icons type="calendar" size="18" color="lightblue" />
|
|
|
- <view class="text" style="width: 90%;color: gray;">
|
|
|
- 发起时间: <span
|
|
|
- style="margin-left: 5px;color: cornflowerblue;">{{item.createTime}}</span>
|
|
|
+ </template>
|
|
|
+ </uni-list-item>
|
|
|
+ </uni-list>
|
|
|
+ </uni-section>
|
|
|
+ <uni-section title="已接工单" type="line">
|
|
|
+ <uni-list>
|
|
|
+ <uni-list-item v-for="item in todoOrderList" :key="item.id" showArrow clickable @click="toDo(item)"
|
|
|
+ rightText="去处理">
|
|
|
+ <template v-slot:body>
|
|
|
+ <view class="list-item-block">
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="personadd" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 处理人: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.orderConfirmName}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="line">
|
|
|
- <uni-icons type="help" size="18" color="lightblue" />
|
|
|
- <view class="text text-ellipsis" style="width: 90%;color: gray;">
|
|
|
- 问题描述: <span
|
|
|
- style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="calendar" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 完成时限: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.orderCompleteTime}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ <!-- <view class="line">
|
|
|
+ <uni-icons type="help" size="18" color="lightblue" />
|
|
|
+ <view class="text text-ellipsis" style="width: 90%;color: gray;">
|
|
|
+ 问题描述: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.orderDesc}}</span>
|
|
|
+ </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
- <view class="line">
|
|
|
- <view class="block">
|
|
|
- <uni-icons type="arrow-right" size="20" color="coral" />
|
|
|
+ </template>
|
|
|
+ </uni-list-item>
|
|
|
+ </uni-list>
|
|
|
+ </uni-section>
|
|
|
+ <uni-section title="工单完结审批" type="line">
|
|
|
+ <uni-list>
|
|
|
+ <uni-list-item v-for="item in closeApproveOrderList" :key="item.id" showArrow clickable
|
|
|
+ @click="toCloseApprove(item)" rightText="去审批">
|
|
|
+ <template v-slot:body>
|
|
|
+ <view class="list-item-block">
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="personadd" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 填报人: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.processorName}}</span>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="calendar" size="18" color="lightblue" />
|
|
|
+ <view class="text" style="width: 90%;color: gray;">
|
|
|
+ 填报时间: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.orderProcessTime}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="text text-underline" style="color: coral;margin-left: 2px;font-size: 1rem;"
|
|
|
- @click="toDo(item)">
|
|
|
- 去处理
|
|
|
+ <view class="line">
|
|
|
+ <uni-icons type="help" size="18" color="lightblue" />
|
|
|
+ <view class="text text-ellipsis" style="width: 90%;color: gray;">
|
|
|
+ 反馈意见: <span
|
|
|
+ style="margin-left: 5px;color: cornflowerblue;">{{item.processDesc}}</span>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </template>
|
|
|
- </uni-list-item>
|
|
|
- </uni-list>
|
|
|
+ </template>
|
|
|
+ </uni-list-item>
|
|
|
+ </uni-list>
|
|
|
+ </uni-section>
|
|
|
</uni-card>
|
|
|
<uni-card title="巡检保养任务" :thumbnail="checkLogo">
|
|
|
<!-- <uni-list>
|
|
|
@@ -159,6 +209,8 @@
|
|
|
total: 0,
|
|
|
noticeDot: false,
|
|
|
noticeValue: 0,
|
|
|
+ unconfirmOrderCount: 0,
|
|
|
+ unconfirmOrderList: [],
|
|
|
todoOrderCount: 0,
|
|
|
todoOrderList: [],
|
|
|
costsApproveOrderCount: 0,
|
|
|
@@ -172,49 +224,82 @@
|
|
|
computed: {},
|
|
|
onLoad() {
|
|
|
console.log(JSON.stringify(this.userInfo))
|
|
|
- this.permission.admin = false;
|
|
|
- this.permission.orgAdmin = false;
|
|
|
- this.permission.companyAdmin = false;
|
|
|
- this.permission.companyServciePerson = false;
|
|
|
- this.permission.yjServicePerson = false;
|
|
|
- this.navButton = navBtns.navButtons;
|
|
|
- if (this.userInfo.role_name === role.admin) {
|
|
|
- this.permission.admin = true;
|
|
|
- this.navButtonIndex = navBtns.sysAdminNavButton;
|
|
|
- this.currentRole = role.admin;
|
|
|
- } else if (this.userInfo.role_name === role.orgAdmin) {
|
|
|
- this.permission.orgAdmin = true;
|
|
|
- this.currentRole = role.orgAdmin;
|
|
|
- this.navButtonIndex = navBtns.orgAdminNavButton;
|
|
|
- } else if (this.userInfo.role_name === role.companyAdmin) {
|
|
|
- this.permission.companyAdmin = true;
|
|
|
- this.currentRole = role.companyAdmin;
|
|
|
- this.navButtonIndex = navBtns.companyAdminNavButton;
|
|
|
- } else if (this.userInfo.role_name === role.companyServciePerson) {
|
|
|
- this.permission.companyServciePerson = true;
|
|
|
- this.currentRole = role.companyServciePerson;
|
|
|
- this.navButtonIndex = navBtns.companyServicePersonNavButton;
|
|
|
- if (this.userInfo.post_id == '1706859505948098562') {
|
|
|
- this.postName = "engineer";
|
|
|
- } else if (this.userInfo.post_id == '1730535542909140993') {
|
|
|
- this.postName = "servicePerson";
|
|
|
- }
|
|
|
- }
|
|
|
+ // this.permission.admin = false;
|
|
|
+ // this.permission.orgAdmin = false;
|
|
|
+ // this.permission.companyAdmin = false;
|
|
|
+ // this.permission.companyServciePerson = false;
|
|
|
+ // this.permission.yjServicePerson = false;
|
|
|
+ // this.navButton = navBtns.navButtons;
|
|
|
+ // if (this.userInfo.role_name === role.admin) {
|
|
|
+ // this.permission.admin = true;
|
|
|
+ // this.navButtonIndex = navBtns.sysAdminNavButton;
|
|
|
+ // this.currentRole = role.admin;
|
|
|
+ // } else if (this.userInfo.role_name === role.orgAdmin) {
|
|
|
+ // this.permission.orgAdmin = true;
|
|
|
+ // this.currentRole = role.orgAdmin;
|
|
|
+ // this.navButtonIndex = navBtns.orgAdminNavButton;
|
|
|
+ // } else if (this.userInfo.role_name === role.companyAdmin) {
|
|
|
+ // this.permission.companyAdmin = true;
|
|
|
+ // this.currentRole = role.companyAdmin;
|
|
|
+ // this.navButtonIndex = navBtns.companyAdminNavButton;
|
|
|
+ // } else if (this.userInfo.role_name === role.companyServciePerson) {
|
|
|
+ // this.permission.companyServciePerson = true;
|
|
|
+ // this.currentRole = role.companyServciePerson;
|
|
|
+ // this.navButtonIndex = navBtns.companyServicePersonNavButton;
|
|
|
+ // if (this.userInfo.post_id == '1706859505948098562') {
|
|
|
+ // this.postName = "engineer";
|
|
|
+ // } else if (this.userInfo.post_id == '1730535542909140993') {
|
|
|
+ // this.postName = "servicePerson";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// if (this.$u.func.checkLogin()) {
|
|
|
// console.log("timer start +++++++ ")
|
|
|
// this.timer = true;
|
|
|
// setTimeout(this.timeCall, 10);
|
|
|
// }
|
|
|
+ // console.log(JSON.stringify(this.isLogin))
|
|
|
+ // if (this.$u.func.checkLogin()) {} else {
|
|
|
+ // this.$u.func.logout();
|
|
|
+ // }
|
|
|
+
|
|
|
|
|
|
- this.getTodoOrderList();
|
|
|
+ if (this.$u.func.checkLogin()) {
|
|
|
+ try {
|
|
|
+ let loginTime = uni.getStorageSync("loginTime");
|
|
|
+ if (loginTime) {
|
|
|
+ let dt = new Date();
|
|
|
+ let time = dt.getTime();
|
|
|
+ let expires = this.userInfo.expires_in;
|
|
|
+ if (expires) {
|
|
|
+ if ((time - loginTime) / 1000 > (expires - 60)) {
|
|
|
+ this.$u.func.logout();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$u.func.logout();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$u.func.logout();
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ this.$u.func.logout();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$u.func.logout();
|
|
|
+ }
|
|
|
+ if (this.isLogin) {
|
|
|
+ this.getTodoOrderList();
|
|
|
+ this.getTodoOrderConfirmList();
|
|
|
+ }
|
|
|
},
|
|
|
onUnload() {
|
|
|
//this.timer = false;
|
|
|
},
|
|
|
onReady() {
|
|
|
- // if (this.$u.func.checkLogin()) {} else {
|
|
|
- // this.$u.func.logout();
|
|
|
- // }
|
|
|
+ if (this.$u.func.checkLogin()) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ // this.$u.func.logout();
|
|
|
+ }
|
|
|
},
|
|
|
onShow() {
|
|
|
// if (this.$u.func.checkLogin()) {
|
|
|
@@ -283,7 +368,24 @@
|
|
|
setTimeout(this.timeCall, 10000);
|
|
|
}
|
|
|
},
|
|
|
+ toConfirm(item) {
|
|
|
+ var url = '/pages/check-order/orderconfirm?orderType=' + item.orderType + '&orderId=' + item.id;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ })
|
|
|
+ },
|
|
|
toDo(item) {
|
|
|
+ var url = '/pages/check-order/orderprocessreport?orderId=' + item.id + '&skipPage=1';
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ })
|
|
|
+
|
|
|
+ // var url = '/pages/check-order/orderconfirm?orderType=' + item.orderType + '&orderId=' + item.id;
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: url
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ toCloseApprove(item) {
|
|
|
var url = '/pages/check-order/orderconfirm?orderType=' + item.orderType + '&orderId=' + item.id;
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
@@ -322,10 +424,29 @@
|
|
|
})
|
|
|
},
|
|
|
getHomeInfo() {
|
|
|
+ this.getTodoOrderConfirmList();
|
|
|
this.getTodoOrderList();
|
|
|
- this.getTodoCostsApproveOrderList();
|
|
|
+ //this.getTodoCostsApproveOrderList();
|
|
|
this.getTodoCloseOrderList();
|
|
|
},
|
|
|
+ getTodoOrderConfirmList() {
|
|
|
+ let that = this;
|
|
|
+ let postData = {};
|
|
|
+ http.request({
|
|
|
+ url: '/galaxy-business/order/todo/confirm/list',
|
|
|
+ method: 'GET',
|
|
|
+ data: postData,
|
|
|
+ }).then(res => {
|
|
|
+ console.log(JSON.stringify(res))
|
|
|
+ that.unconfirmOrderCount = 0;
|
|
|
+ if (res.data != null) {
|
|
|
+ that.unconfirmOrderCount = res.data.length;
|
|
|
+ that.unconfirmOrderList = res.data;
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(JOSN.stringify(err))
|
|
|
+ })
|
|
|
+ },
|
|
|
getTodoOrderList() {
|
|
|
let that = this;
|
|
|
let postData = {};
|