巡检修改

test
zhangdi 1 year ago
parent b3b524165a
commit 043c050d7e
  1. 48
      api/api.js
  2. 20
      api/maintenance.js
  3. 3
      main.js
  4. 13
      pages.json
  5. 11
      pages/inspection/components/detailsCollapse.vue
  6. 216
      pages/inspection/components/plan-list.vue
  7. 12
      pages/inspection/plan.vue
  8. 99
      pages/inspection/quest.vue
  9. 47
      pages/inspection/questDetails.vue
  10. 216
      pages/inspection/questOrder.vue
  11. 2
      store/index.js

@ -6,7 +6,7 @@ const install = (Vue, vm) => {
// 此处没有使用传入的params参数 // 此处没有使用传入的params参数
let getTenantInfo = (params, config = {}) => http.get('/blade-system/tenant/info', params, config) let getTenantInfo = (params, config = {}) => http.get('/blade-system/tenant/info', params, config)
// 此处使用了传入的params参数,一切自定义即可 // 此处使用了传入的params参数,一切自定义即可
let login = (params,data) => http.post('/blade-auth/oauth/token?'+ params,data,{ let login = (params, data) => http.post('/blade-auth/oauth/token?' + params, data, {
authorizations: true, authorizations: true,
isparams: true isparams: true
}) })
@ -17,7 +17,7 @@ const install = (Vue, vm) => {
authorizations: true, authorizations: true,
isparams: true isparams: true
}) })
// 发送验证码 / // 发送验证码 /
let sendVerify = (params) => http.get('/blade-system/user/register/send-verify-code', params, { let sendVerify = (params) => http.get('/blade-system/user/register/send-verify-code', params, {
authorizations: true, authorizations: true,
@ -70,7 +70,7 @@ const install = (Vue, vm) => {
isparams: true isparams: true
}) })
// 获取维修人员 / // 获取维修人员 /
let getRepairPersons = (params) => http.get('/blade-system/user/repairPersons', { ...params }, { let getRepairPersons = (params) => http.get('/blade-system/user/repairPersons', { ...params }, {
@ -85,11 +85,7 @@ const install = (Vue, vm) => {
isparams: false isparams: false
}) })
// 巡检计划列表 /
let getDictionaryList = (params) => http.get('/blade-system/dict/dictionary?code=flow', params, {
authorizations: true,
isparams: false
})
// 获取人员列表 // 获取人员列表
let getUserList = (params) => http.get('/blade-system/user/page', { ...params }, { let getUserList = (params) => http.get('/blade-system/user/page', { ...params }, {
@ -209,13 +205,45 @@ const install = (Vue, vm) => {
}) })
//扫码获取设备id 通过id获取详情 //扫码获取设备id 通过id获取详情
let getDeviceDetail = (params) => http.get('/device/detail',params, { let getDeviceDetail = (params) => http.get('/device/detail', params, {
authorizations: true,
isparams: false
})
// 维修人员存取经纬度
let updateCoordinate = (params) => http.post('/blade-system/user/updateCoordinate', params, {
authorizations: true,
isparams: false
})
// 巡检计划列表 /
let getDictionaryList = (params) => http.get('/lab-ops/maintenance/plan-page', params, {
authorizations: true, authorizations: true,
isparams: false isparams: false
}) })
// 获取巡检任务列表 lab-ops/maintenance/task-page
let getTaskPage = (params) => http.get('/lab-ops/maintenance/task-page', params, {
authorizations: true,
isparams: false
})
// 获取巡检任务详情 lab-ops/maintenance/task-page
let getTaskDetail = (params) => http.get('/lab-ops/maintenance/task-detail', params, {
authorizations: true,
isparams: false
})
// 主管审核并指定维修人员
let taskSupervisorconfirm = (params) => http.post('/lab-ops/maintenance/task-supervisor-confirm', params, {
authorizations: true,
isparams: false
})
//维修人员确认接收 lab-ops/maintenance/task-serviceman-receive
let taskServicemanreceive = (params) => http.post('/lab-ops/maintenance/task-serviceman-receive', params, {
authorizations: true,
isparams: false
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave,sendVerify,serviceman,servicemanReceive,servicemanSubmit,supervisorReject ,supervisorconfirm,customerConfirm,customerReject,servicemanRepairSubmit,evaluateRepairReject,getDeviceDetail}; vm.$u.api = { getTenantInfo, login, logout, registerUser, getworkbench, getLoginRecords, getEditRecords, subEditRecords, getChildList, getDeviceList, workOrderSave, getWorkOrderRecords, getBreakdownInfo, workOrderupdate, evaluateSign, getRepairPersons, getGoodsList, getDictionaryList, getUserList, workList, deviceList, upkeepStat, pieStat, getUserInfo, overview, sendOrders, cloneOrder, editData, repairReject, applySave, sendVerify, serviceman, servicemanReceive, servicemanSubmit, supervisorReject, supervisorconfirm, customerConfirm, customerReject, servicemanRepairSubmit, evaluateRepairReject, getDeviceDetail, getTaskPage, getTaskDetail,taskSupervisorconfirm,taskServicemanreceive,updateCoordinate };
} }
export default { export default {

@ -1,20 +0,0 @@
const http = uni.$u.http
// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
const install = (Vue, vm) => {
// 获取巡检任务列表 lab-ops/maintenance/task-page
let getTaskPage = (params) => http.get('/device/detail',params, {
authorizations: true,
isparams: false
})
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
vm.$u.quest = { getTaskPage};
}
export default {
install
}

@ -23,7 +23,4 @@ Vue.use(request, app);
// http接口API集中管理引入部分 // http接口API集中管理引入部分
import httpApi from '@/api/api.js' import httpApi from '@/api/api.js'
Vue.use(httpApi, app) Vue.use(httpApi, app)
import maintenance from '@/api/api.js'
Vue.use(maintenance, app)
// require('@/utils/request.js')(app) // require('@/utils/request.js')(app)

@ -165,6 +165,19 @@
} }
} }
}, },
{
"path": "pages/inspection/questOrder",
"style": {
"navigationBarTitleText": "巡检任务单",
"enablePullDownRefresh": false,
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F8F8F8",
"app-plus": {
"titleNView": {}
}
}
},
{ {
"path": "pages/inspection/plan", "path": "pages/inspection/plan",
"style": { "style": {

@ -57,6 +57,17 @@
</template> </template>
<script> <script>
export default { export default {
props:{
type:{
type:String,
default:''
}
},
computed: {
disabled() {
return this.type=='view'
},
},
data() { data() {
return { return {
image2: '',// image2: '',//

@ -1,7 +1,7 @@
<template> <template>
<view class="page-css"> <view class="page-css">
<view class="page-search-top"> <view class="page-search-top">
<betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单单号' icon="search" <betone-new-input v-model="searchInfo.requirementCode" placeholder='搜索巡检单位名称' icon="search"
style="margin-bottom: 32rpx" @changevalue="searchData()" /> style="margin-bottom: 32rpx" @changevalue="searchData()" />
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab" <u-tabs :list="tabList" :is-scroll="false" :current="current" @change="changeTab"
bg-color="rgba(248, 248, 248, 1)"></u-tabs> bg-color="rgba(248, 248, 248, 1)"></u-tabs>
@ -12,8 +12,8 @@
<view class="item-top"> <view class="item-top">
<view class="item-left"> <view class="item-left">
<text class="item-orderNo">{{ item.unitName }}</text> <text class="item-orderNo">单位</text>
<text class="item-time"> 单号{{ item.inspectionNo }}</text> <text class="item-time"> {{ item.deptName }}</text>
</view> </view>
<view class="item-right"> <view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" <u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
@ -22,24 +22,25 @@
</view> </view>
<view class="item-con"> <view class="item-con">
<view class="con-right"> <view class="con-right">
<text class="con-title">提报类型{{ item.faultType }}</text> <text class="con-title">巡检标题{{ item.planContent }}</text>
<text class="con-title">巡检项目名称{{ item.inspectionName }}</text> <text class="con-title">创建时间{{ item.createTime }}</text>
<text class="con-title">项目地址{{ item.projectAddr }}</text>
<text class="con-title">巡检周期{{ item.cycle }}</text> <view class="con-btn">
<text class="con-title">巡检时间{{ item.startTime }}-{{ item.nextDate }} </text> <block v-if="item.status == 0 && dataTypes == 3">
<u-button size="mini" plain style="margin-right: 32rpx"
<!-- <view class="con-btn"> @click="assign(item)">指派</u-button>
</block>
</view> --> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<betone-loading ref="BetLoading" /> <!-- 分派人员-->
<u-select v-model="sendOrdersShow" :list="sendOrdersList" @confirm="sendOrdersConfirm" :isShowsearch="true"
value-name="id" title="选择维修人员"></u-select>
<betone-loading ref="BetLoading" />
</view> </view>
</template> </template>
@ -74,14 +75,27 @@ export default {
}, },
current: 0, current: 0,
loadingState: "loadmore",
isNomore: false,
noDataFlag: false,
page: {
currentPage: 1,
pageSize: 10,
},
orderData: [], orderData: [],
sendOrder: {
repairPerson: '',// id
name: '',//
},
sendOrdersShow: false,//
sendOrdersList: [],
}; };
}, },
computed: { computed: {
noData() {
return this.orderData && this.orderData.length == 0;
},
dataTypes() { dataTypes() {
return this.$store.state.dataType return this.$store.state.dataType
}, },
@ -90,82 +104,51 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.getRecordsList() this.getRecordsList()
this.getRepairPersons()
//
uni.$on('onReachBottom', () => {
if (this.isNomore) {
return;
}
this.page.currentPage++;
this.getRecordsList();
})
//
uni.$on('onPullDownRefresh', () => {
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList();
uni.stopPullDownRefresh();
});
}); });
}, },
methods: { methods: {
// //
getRecordsList() { getRecordsList() {
//this.BetLoading.show(); this.BetLoading.show();
// this.$u.api.getDictionaryList().then(res => {
// if (res.code == 200) {
this.$u.api.getDictionaryList().then(res => {
var totalPage = res.data.total;
var newOrders = res.data.records;
if (this.page.currentPage == 1) {
this.orderData = [];
}
// this.orderData = res.data; this.orderData = [...this.orderData, ...(res.data.records || [])];
if (newOrders.length == 0) {
this.loadingState = "nomore";
this.isNomore = true;
}
if (totalPage == this.orderData.length) {
this.loadingState = "nomore";
this.isNomore = true;
}
this.BetLoading.hide();
}).catch(err => {
// this.BetLoading.hide(); })
// }
// }).catch(err => {
// })
this.orderData = [
{
inspectionNo: 'WX-20240820-01',
unitName: '济南安池实验室',
inspectionName: '实验室设备巡检',
projectAddr: '济南市钢城区',
team: '巡检班组一,巡检班组二',
startTime: '2024-05-21',
cycle: '季度',
nextDate: '2024-07-21',
status: 0,
tableData: [
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
]
},
{
inspectionNo: 'WX-20240820-01',
unitName: '济南安池实验室',
inspectionName: '实验室设备巡检',
projectAddr: '济南市钢城区',
team: '巡检班组一,巡检班组二',
startTime: '2024-09-21',
cycle: '季度',
nextDate: '2024-12-21',
status: 1,
tableData: [
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
]
},
{
inspectionNo: 'WX-20240820-01',
unitName: '济南安池实验室',
inspectionName: '实验室设备巡检',
projectAddr: '济南市钢城区',
team: '巡检班组一,巡检班组二',
startTime: '2024-09-21',
cycle: '季度',
nextDate: '2024-12-21',
status: 1,
tableData: [
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求1' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '水系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求2' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
{ majorName: '电气系统', inspectionCon: '1、水量水压满足用水要求', techRequire: '工艺要求3' },
]
},
]
}, },
// //
searchData() { searchData() {
@ -189,52 +172,45 @@ export default {
}, },
// //
statusName(item) { statusName(item) {
if (item == 0) { if (item == 1) {
return '停用' return '停用'
} }
if (item == 1) { if (item == 0) {
return '启用' return '启用'
} }
}, },
//
assign(item) {
this.rowInfo = item
// this.sendOrdersShow = true
goPage(item, type) { },
if (type == 'details') { //
uni.navigateTo({ getRepairPersons() {
url: "/pages/submission/recordsdetails?id=" + item.id, this.$u.api.getRepairPersons().then(res => {
}); if (res.code == 200) {
} let data_ = res.data
data_.forEach(i => {
if (type == 'breakdownView') { this.sendOrdersList.push({ ...i, label: i.name })
let param = { })
id: item.id,
type: type
}
uni.navigateTo({
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`,
});
}
if (type == 'breakdownUpdate') {
let param = {
id: item.id,
type: type
} }
uni.navigateTo({ })
url: `/pages/submission/submissionDetails${this.$u.queryParams(param)}`, },
}); //
sendOrdersConfirm(e) {
let query = {
servicemanId: e[0].value,
id: this.rowInfo.id
} }
if (type == 'evaluate') { this.$u.api.taskSupervisorconfirm(query).then(res => {
let param = { if (res.code == 200) {
id: item.id, uni.showToast({ title: "指派成功", icon: "none" });
this.sendOrdersShow = false
//
this.getRecordsList()
} }
uni.navigateTo({ })
url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
});
}
}, },
}, },

@ -17,19 +17,26 @@ export default {
}, },
data() { data() {
return { return {
}; };
}, },
computed: { computed: {
},
onReachBottom() {
uni.$emit('onReachBottom');
},
onPullDownRefresh() {
uni.$emit('onPullDownRefresh');
}, },
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
}); });
}, },
methods: { methods: {
}, },
@ -40,6 +47,7 @@ export default {
.page-css { .page-css {
padding: 0; padding: 0;
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
.page-search-top { .page-search-top {
height: 210rpx; height: 210rpx;
background-color: rgba(248, 248, 248, 1); background-color: rgba(248, 248, 248, 1);

@ -12,8 +12,8 @@
@click="goPage(item, '/pages/inspection/questDetails')"> @click="goPage(item, '/pages/inspection/questDetails')">
<view class="item-top"> <view class="item-top">
<view class="item-left"> <view class="item-left">
<text class="item-orderNo">{{ item.reportUnit }}</text> <text class="item-orderNo">{{ item.unitName }}</text>
<text class="item-time"> 单号{{ item.requirementCode }} {{ item.fillingTime }}</text> <text class="item-time"> 单号{{ item.taskNo }} {{ item.fillingTime }}</text>
</view> </view>
<view class="item-right"> <view class="item-right">
<u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle" <u-tag :text="statusName(item.status)" type="success" mode="dark" shape="circle"
@ -30,13 +30,18 @@
<text>{{ item.faultDescribe }}</text> <text>{{ item.faultDescribe }}</text>
</view> </view>
<view class="con-btn"> <view class="con-btn">
<block>
<u-button size="mini" plain style="margin-right: 32rpx"
@click="taskDetails(item)">查看</u-button>
<u-button size="mini" plain style="margin-right: 32rpx" @click="openWorkOrder(item)">接收</u-button>
</block>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" /> <u-loadmore margin-top="10" margin-bottom="40" :status="loadingState" />
<betone-loading ref="BetLoading" /> <betone-loading ref="BetLoading" />
<betone-tabbar ref="tabbarRef" /> <betone-tabbar ref="tabbarRef" />
@ -55,6 +60,7 @@ export default {
type: '',// type: '',//
reportUnit: '',// reportUnit: '',//
}, },
rowInfo:{},//
tagColor: { tagColor: {
维修中: "#3A62D7", 维修中: "#3A62D7",
待确认: "#81B337", 待确认: "#81B337",
@ -87,12 +93,23 @@ export default {
isNomore: false, isNomore: false,
noDataFlag: false, noDataFlag: false,
orderData: [], orderData: [{
id: '888888', //id
taskNo: '888888', //
unitName: '888888', //
inspectionName: '888888', //
projectAddr: '888888', //
inspectionFloor: '888888', //
inspectionDate: '888888', //
status: '888888', // 0- 1-
appointTime: '888888', //
}],
page: { page: {
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
}, },
}; };
}, },
@ -106,10 +123,11 @@ export default {
}, },
onShow() { onShow() {
this.$nextTick(() => { this.$nextTick(() => {
this.getRecordsList()
this.$refs.tabbarRef.getPermission(); this.$refs.tabbarRef.getPermission();
this.BetLoading.show(); this.BetLoading.show();
setTimeout(() => { setTimeout(() => {
this.BetLoading.hide(); this.BetLoading.hide();
}, 1000); }, 1000);
}); });
}, },
@ -126,44 +144,36 @@ export default {
this.getRecordsList(); this.getRecordsList();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
mounted() {
this.$nextTick(() => {
this.getRecordsList()
});
},
methods: { methods: {
// //
getRecordsList() { getRecordsList() {
this.BetLoading.show(); this.BetLoading.show();
this.loadingState = "loading"; this.loadingState = "loading";
let query = { let query = {
current: this.page.currentPage, // current: this.page.currentPage, //
size: this.page.pageSize, // size: this.page.pageSize, //
dataType: this.dataTypes,//
// ...this.searchInfo
// reportUnit: this.searchInfo.reportUnit
} }
this.$u.api.getWorkOrderRecords(query).then(res => { this.$u.api.getTaskPage(query).then(res => {
if (res.code == 200) { if (res.code == 200) {
var totalPage = res.data.total; var totalPage = res.data.total;
var newOrders = res.data.records; var newOrders = res.data.records;
if (this.page.currentPage == 1) { // if (this.page.currentPage == 1) {
this.orderData = []; // this.orderData = [];
} // }
this.orderData = [...this.orderData, ...(res.data.records || [])]; // this.orderData = [...this.orderData, ...(res.data.records || [])];
if (newOrders.length == 0) { // if (newOrders.length == 0) {
this.loadingState = "nomore"; // this.loadingState = "nomore";
this.isNomore = true; // this.isNomore = true;
} // }
if (totalPage == this.orderData.length) { // if (totalPage == this.orderData.length) {
this.loadingState = "nomore"; // this.loadingState = "nomore";
this.isNomore = true; // this.isNomore = true;
} // }
this.BetLoading.hide(); this.BetLoading.hide();
} }
}).catch(err => { }).catch(err => {
@ -205,16 +215,27 @@ export default {
} }
}, },
//
taskDetails(item) {
let param = {
id: item.id,
// type: 'view'
goPage(item, path) { }
uni.navigateTo({ uni.navigateTo({
url: path, url: `/pages/inspection/questDetails${this.$u.queryParams(param)}`,
}); });
}, },
//
openWorkOrder(item){
let param = {
id: item.id,
type: 'view'
}
uni.navigateTo({
url: `/pages/inspection/questOrder${this.$u.queryParams(param)}`,
});
}
}, },
}; };

@ -46,6 +46,30 @@ export default {
components: { components: {
detailsCollapse, detailsCollapse,
}, },
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
data() {
return {
detailForm: {},
optionsType: '',//
}
},
onLoad(options) {
this.optionsType = options.type
this.getDetails()
},
methods: {
getDetails() {
this.$u.api.getTaskDetail().then(res => {
if (res.code == 200) {
this.detailForm = res.data
}
})
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -97,18 +121,19 @@ export default {
} }
} }
} }
.repair-btn { .repair-btn {
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
/* 水平均匀分布 */ /* 水平均匀分布 */
margin-top: 32rpx; margin-top: 32rpx;
padding: 0 32rpx; padding: 0 32rpx;
/deep/.u-btn { /deep/.u-btn {
width: 48%; width: 48%;
}
} }
} }
}
</style> </style>

@ -0,0 +1,216 @@
<template>
<view class="page-css">
<view class="info">
<view class="info_title">基本信息</view>
<view class="info_item">
<text class="item_left_txt">单位名称</text>
<text class="item_right_txt">张三</text>
</view>
<view class="info_item">
<text class="item_left_txt">巡检项目名称</text>
<text class="item_right_txt">张三</text>
</view>
<view class="info_item">
<text class="item_left_txt">项目地址</text>
<text class="item_right_txt">张三</text>
</view>
</view>
<view class="info">
<view class="info_title">巡检配置</view>
<!-- <view class="info_item">
<text class="item_left_txt">巡检内容</text>
<text class="item_right_txt">张三</text>
</view>
<view class="info_item">
<text class="item_left_txt">任务开始时间</text>
<text class="item_right_txt"></text>
</view>
<view class="info_item">
<text class="item_left_txt">预约上门时间</text>
<text class="item_right_txt"></text>
</view> -->
<u-form labelPosition="left" ref="sendOrderForm" :model="detailForm" :label-width="200" class="repair_form">
<u-form-item label="巡检内容:" prop="dispatchTime" :border-bottom="false">
<betone-new-input label="" v-model="detailForm.dispatchTime" placeholder="" />
</u-form-item>
<u-form-item label="任务开始时间:" prop="planCompleteTime" :border-bottom="false">
<!-- <u-input v-model="sendOrder.planCompleteTime" type="select" @click="calendarShow = true"
:border="true" placeholder="请选择时间" /> -->
</u-form-item>
<u-form-item label="预约上门时间:" prop="customerOpinion" :border-bottom="false">
<u-input v-model="reservationTime" type="select" @click="calendarShow = true" :border="true"
placeholder="请选择时间" />
</u-form-item>
</u-form>
</view>
<view class="info">
<view class="info_title">巡检任务</view>
<detailsCollapse type="view"></detailsCollapse>
</view>
<!-- <view class="repair-btn" style="margin-right: 32rpx;width:100%">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary">提交</u-button>
</view> -->
<!-- 维修人员接收任务单 -->
<view class="repair-btn" style="margin-right: 32rpx;width:100%">
<u-button size="medium" @click="endOrderCancel()">取消</u-button>
<u-button size="medium" type="primary" @click="receiveQuest()">接收</u-button>
</view>
<u-calendar v-model="calendarShow" mode="date" @change="calendarChange" :min-date="minDate"
:max-date="maxDate"></u-calendar>
</view>
</template>
<script>
import detailsCollapse from './components/detailsCollapse.vue'
export default {
components: {
detailsCollapse,
},
computed: {
dataTypes() {
return this.$store.state.dataType
},
},
data() {
return {
detailForm: {},
orderId: '',//id
optionsType: '',//
reservationTime: '',//
minDate: null,
maxDate: null,
calendarShow: false,//
}
},
onLoad(options) {
this.optionsType = options.type
this.orderId = options.id
this.getDetails()
this.initDate()
},
methods: {
getDetails() {
let query = {
id: this.orderId
}
this.$u.api.getTaskDetail(query).then(res => {
if (res.code == 200) {
this.detailForm = res.data
}
})
},
endOrderCancel() {
uni.navigateBack({
delta: 1 // 1退
})
},
//
receiveQuest() {
let query = {
id: this.detailForm.id
}
this.$u.api.taskServicemanreceive(query).then(res => {
if (res.code == 200) {
// setTimeout(() => {
// uni.navigateBack({
// delta: 1 // 1退
// })
// },500)
}
})
},
//
initDate() {
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (month < 10) {
month = "0" + month;
}
if (day < 10) {
day = "0" + day;
}
let minyear = year;
this.minDate = minyear + "-" + month + "-" + day;
//let maxyear = year + 1;
this.maxDate = year + 1 + "-" + month + "-" + day; //
//this.maxDate = year  + '-'+ month +'-' + day; //
},
calendarChange(e) {
this.reservationTime = e.result
}
}
}
</script>
<style lang="scss" scoped>
.page-css {
width: 100%;
padding: 0;
padding-top: 26rpx;
.info {
margin: 0 24rpx 20rpx;
border-radius: 20rpx;
background-color: rgba(255, 255, 255, 1);
padding: 6rpx 0 34rpx;
.info_title {
line-height: 60rpx;
color: rgba(0, 0, 0, 1);
font-size: 32rpx;
text-align: left;
font-family: SourceHanSansSC-bold;
margin: 18rpx 0 0rpx 20rpx;
font-weight: bold;
}
.info_item {
padding: 4rpx 20rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.item_left_txt {
color: rgba(108, 108, 108, 1);
font-size: 28rpx;
text-align: left;
font-family: SourceHanSansSC-regular;
width: 210rpx;
margin-right: 20rpx;
line-height: 60rpx;
}
.item_right_txt {
max-width: calc(100% - 220rpx);
color: rgba(0, 0, 0, 1);
font-size: 28rpx;
// text-align: left;
text-align: justify;
font-family: SourceHanSansSC-regular;
}
}
}
.repair-btn {
width: 100%;
height: 150rpx;
display: flex;
justify-content: space-between;
/* 水平均匀分布 */
margin-top: 32rpx;
padding: 0 32rpx;
/deep/.u-btn {
width: 48%;
}
}
.repair_form {
padding: 0 18rpx;
}
}
</style>

@ -53,7 +53,9 @@ const store = new Vuex.Store({
uni.reLaunch({ uni.reLaunch({
url: "/pages/order/tasking", url: "/pages/order/tasking",
}); });
// this.$u.api.updateCoordinate().then(res=>{
// })
} }
if (res.role_id == "1839552581620793346") { if (res.role_id == "1839552581620793346") {

Loading…
Cancel
Save