From b3b524165aca356446cbea4446235f82da826b03 Mon Sep 17 00:00:00 2001
From: zhangdi <15053473693@163.com>
Date: Mon, 25 Nov 2024 17:19:02 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E6=8A=A5=E6=B5=81=E7=A8=8B=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E5=AE=8C=E5=96=84=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 8 +-
api/maintenance.js | 20 +++++
common/betone_components/betone-list.vue | 77 +++++++++++--------
common/betone_components/betone-new-input.vue | 5 ++
main.js | 3 +
pages/home/index.vue | 2 +-
pages/submission/components/subForm.vue | 76 ++++++++++--------
pages/submission/recordsdetails.vue | 32 ++++++--
pages/submission/sendOrders.vue | 44 ++++-------
utils/request.js | 2 +-
utils/tabbar.js | 4 +-
11 files changed, 165 insertions(+), 108 deletions(-)
create mode 100644 api/maintenance.js
diff --git a/api/api.js b/api/api.js
index 9c8da2d..080088e 100644
--- a/api/api.js
+++ b/api/api.js
@@ -208,8 +208,14 @@ const install = (Vue, vm) => {
isparams: false
})
+ //扫码获取设备id 通过id获取详情
+ let getDeviceDetail = (params) => http.get('/device/detail',params, {
+ authorizations: true,
+ isparams: false
+ })
+
// 将各个定义的接口名称,统一放进对象挂载到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};
+ 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};
}
export default {
diff --git a/api/maintenance.js b/api/maintenance.js
new file mode 100644
index 0000000..8016bf5
--- /dev/null
+++ b/api/maintenance.js
@@ -0,0 +1,20 @@
+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
+}
\ No newline at end of file
diff --git a/common/betone_components/betone-list.vue b/common/betone_components/betone-list.vue
index 19d6443..620bd54 100644
--- a/common/betone_components/betone-list.vue
+++ b/common/betone_components/betone-list.vue
@@ -59,7 +59,7 @@
接单
确认付款
+ @click.stop="openModel(item, 'paymentInfo')" type="primary">确认付款
关闭
@@ -88,7 +88,7 @@
提交
维修完成
+ type="primary" @click="openModel(item, 'repair')">维修完成
@@ -98,7 +98,7 @@
-
+
+
+
+
+ 请确认付款是否已经完成?
+
+
+
@@ -142,7 +149,7 @@ export default {
return {
searchInfo: {
requirementCode: "",
- type: '',//状态
+ statusSearch: '',//状态
reportUnit: '',//提报单位
},
tagColor: {
@@ -175,7 +182,9 @@ export default {
turnShow: false,//驳回弹框
repaiRejectReason: '',//驳回弹框
- repairShow:false,//维修人员 去人维修完成弹框
+ repairShow: false,//维修人员 去人维修完成弹框
+
+ paymentShow: false,//客服确付款
};
},
computed: {
@@ -257,7 +266,7 @@ export default {
// tab切换
changeTab(index) {
this.current = index;
- this.searchInfo.status = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
+ this.searchInfo.statusSearch = this.tabList[index].key == '9999' ? '' : this.tabList[index].key
this.isNomore = false
this.page.currentPage = 1;
this.getRecordsList()
@@ -368,13 +377,13 @@ export default {
subOrder(row) {
let query_ = [row]
this.$u.api.workOrderSave(query_).then(res => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
if (res.code == 200) {
this.page.currentPage = 1;
this.getRecordsList()
}
}).catch(err => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
})
},
@@ -418,9 +427,12 @@ export default {
if (type == 'turn') {
this.turnShow = true
}
- if(type=='repair'){
+ if (type == 'repair') {
this.repairShow = true
}
+ if (type == 'paymentInfo') {
+ this.paymentShow = true
+ }
this.rowInfo = item
},
@@ -433,30 +445,17 @@ export default {
id: this.rowInfo.id,
closeReason: this.closeReason,
}
- this.BetLoading.show();
+ this.BetLoading.show();
this.$u.api.cloneOrder(query).then(res => {
this.cloneVisible = false
- this.BetLoading.hide();
+ this.BetLoading.hide();
if (res.code == 200) {
uni.showToast({ title: "关闭成功", icon: "none" });
this.getRecordsList()
}
})
},
- // 跳转详情
- goPage(item, type) {
-
- // if (type == 'evaluate') {
- // let param = {
- // id: item.id,
- // }
- // uni.navigateTo({
- // url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
- // });
- // }
-
- },
// 查看需求工单
openWorkOrder(row) {
let param = {
@@ -496,7 +495,7 @@ export default {
})
},
// 维修人员确认维修是否完成
- repairFn(){
+ repairFn() {
let query = {
id: this.rowInfo.id,
}
@@ -509,14 +508,30 @@ export default {
})
},
// 跳转评价
- openEvaluate(item){
+ openEvaluate(item) {
let param = {
- id: item.id,
- }
- uni.navigateTo({
- url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
- });
+ id: item.id,
+ }
+ uni.navigateTo({
+ url: `/pages/submission/evaluate${this.$u.queryParams(param)}`,
+ });
},
+ // 客服确认是否已经付款
+ paymentFn() {
+ let query = {
+ id: this.rowInfo.id,
+ }
+ this.BetLoading.show();
+
+ this.$u.api.cloneOrder(query).then(res => {
+ this.paymentShow = false
+ this.BetLoading.hide();
+ if (res.code == 200) {
+ uni.showToast({ title: "确认成功", icon: "none" });
+ this.getRecordsList()
+ }
+ })
+ }
},
};
diff --git a/common/betone_components/betone-new-input.vue b/common/betone_components/betone-new-input.vue
index 0406804..1e4bf70 100644
--- a/common/betone_components/betone-new-input.vue
+++ b/common/betone_components/betone-new-input.vue
@@ -116,6 +116,10 @@ export default {
endIcon:{//输入框后面的icon
type: String,
default: "",
+ },
+ endScanIndex:{
+ type: Number,
+ default:null,
}
},
data() {
@@ -193,6 +197,7 @@ export default {
console.log('扫码结果:' + res.result);
// 扫码成功后的操作,例如:
// this.handleScanResult(res.result);
+ this.$emit("scanSuccess", res.result,this.endScanIndex);
},
fail: (err) => {
console.error('扫码失败:' + err);
diff --git a/main.js b/main.js
index 14a132f..69e03ef 100644
--- a/main.js
+++ b/main.js
@@ -23,4 +23,7 @@ Vue.use(request, app);
// http接口API集中管理引入部分
import httpApi from '@/api/api.js'
Vue.use(httpApi, app)
+
+import maintenance from '@/api/api.js'
+Vue.use(maintenance, app)
// require('@/utils/request.js')(app)
\ No newline at end of file
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 2683dbc..e62321f 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -3,7 +3,7 @@
科研医疗建筑运维平台
-
+
工作台
diff --git a/pages/submission/components/subForm.vue b/pages/submission/components/subForm.vue
index 488a316..201f020 100644
--- a/pages/submission/components/subForm.vue
+++ b/pages/submission/components/subForm.vue
@@ -6,9 +6,8 @@
-
+ placeholder="请输入" endIcon="scan" @scanSuccess="scanSuccess" :endScanIndex="index" />
@@ -37,8 +36,7 @@
- 新增
+ 新增
提交
@@ -89,13 +87,13 @@ export default {
},
onShow() {
- this.$nextTick(() => {
- this.BetLoading.show();
- setTimeout(() => {
- this.BetLoading.hide();
- }, 1000);
+ // this.$nextTick(() => {
+ // this.BetLoading.show();
+ // setTimeout(() => {
+ // this.BetLoading.hide();
+ // }, 1000);
- });
+ // });
},
mounted() {
if (this.type == 'breakdownView') {
@@ -150,12 +148,12 @@ export default {
this.$refs[`breakdownForm${index}`][0].setRules(this.rules)
this.$refs[`breakdownForm${index}`][0].validate(valid => {
if (!valid) {
- this.BetLoading.hide();
+ this.BetLoading.hide();
validator = false
return
} else {
// 判断是新提交还是修改
- this.submit()
+ this.submit()
}
})
@@ -170,14 +168,14 @@ export default {
// 新提交
submit() {
this.$u.api.workOrderSave(this.breakdownInfo).then(res => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
if (res.code == 200) {
uni.navigateTo({
url: "/pages/submission/records",
});
}
}).catch(err => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
})
},
// 修改
@@ -187,14 +185,26 @@ export default {
id: this.pageId
}
this.$u.api.workOrderupdate(query_).then(res => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
if (res.code == 200) {
uni.redirectTo({
url: "/pages/submission/records",
});
}
}).catch(err => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
+ })
+ },
+ // 扫码成功
+ scanSuccess(e,index) {
+ // 扫码返回 设备id
+ let id_ = e.toString()
+ this.$u.api.getDeviceDetail({ id: id_ }).then(res => {
+ console.log(6666666, res)
+ if (res.code == 200) {
+ this.breakdownInfo[index].deviceName = res.data.name
+ this.breakdownInfo[index].faultType = res.data.type
+ }
})
}
},
@@ -208,23 +218,23 @@ export default {
// display: flex;
// flex-direction: column;
- .container {
- flex: 1;
- border-radius: 16rpx;
- background: #fff;
- padding: 28rpx 32rpx 28rpx;
+.container {
+ flex: 1;
+ border-radius: 16rpx;
+ background: #fff;
+ padding: 28rpx 32rpx 28rpx;
+
+}
- }
+.sub-btn {
+ width: 100%;
+ margin-top: 32rpx;
+ margin-bottom: 32rpx;
+}
- .sub-btn {
- width: 100%;
- margin-top: 32rpx;
- margin-bottom: 32rpx;
- }
+/deep/.u-form-item--left__content__label {
+ font-size: 30rpx;
+ color: #000000;
+}
- /deep/.u-form-item--left__content__label {
- font-size: 30rpx;
- color: #000000;
- }
-// }
-
\ No newline at end of file
+// }
\ No newline at end of file
diff --git a/pages/submission/recordsdetails.vue b/pages/submission/recordsdetails.vue
index 3dc4233..f3b7375 100644
--- a/pages/submission/recordsdetails.vue
+++ b/pages/submission/recordsdetails.vue
@@ -40,7 +40,7 @@
+ v-if="(dataTypes == 1 || dataTypes == 2) && (detailForm.status == 5 || detailForm.status == 6 || detailForm.status == 7 || detailForm.status == 8 || detailForm.status == 9) || (dataTypes == 4 && !(detailForm.status == 0 || detailForm.status == 1 || detailForm.status == 2)) || (dataTypes == 3) && (detailForm.closeReason == '')">
维修详情
维修人:
@@ -84,6 +84,22 @@
+
+
+ 处理情况
+
+ 接单时间:
+ {{ detailForm.dispatchTime }}
+
+
+ 计划完成时间:
+ {{ detailForm.planCompleteTime }}
+
+
+ 客服意见:
+ {{ detailForm.customerOpinion }}
+
+
关闭详情
@@ -101,7 +117,7 @@
-
+
主管审批
审批结果:
@@ -113,7 +129,7 @@
-
+
客户审批
审批结果:
@@ -142,23 +158,23 @@
提报时间:
{{ detailForm.createTime }}
-
+
-
+
diff --git a/pages/submission/sendOrders.vue b/pages/submission/sendOrders.vue
index a3cb032..30efa74 100644
--- a/pages/submission/sendOrders.vue
+++ b/pages/submission/sendOrders.vue
@@ -6,11 +6,10 @@
:label-width="200" class="repair_form">
+ :disabled="true" />
-
+
0 ? '修改' : '添加' }}
-
+
{{ approveInfo.totalPrice }}
@@ -223,9 +222,9 @@
-
-
+
+
@@ -290,9 +289,6 @@ export default {
data() {
return {
- disabledDates: {
- to: new Date() // 禁用今天之前的日期
- },
minDate: null,
maxDate: null,
userInfo: {},//用户信息
@@ -509,7 +505,7 @@ export default {
}
this.$u.api.workOrderupdate(updayeQuery).then(res => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
if (res.code == 200) {
this.$u.api.serviceman(sendOrderQuery_).then(res => {
if (res.code == 200) {
@@ -521,7 +517,7 @@ export default {
})
}
}).catch(err => {
- this.BetLoading.hide();
+ this.BetLoading.hide();
})
@@ -607,7 +603,7 @@ export default {
uni.showToast({ title: "申领数量不能为0", icon: "none" });
return false
}
- this.BetLoading.show();
+ this.BetLoading.show();
if (this.sendOrder.isNeedMaterials == 1) {
let data = []
this.sendOrder.materialsData.map(item => {
@@ -775,7 +771,7 @@ export default {
approveResult: this.approveInfo.approveResult,//1通过 0驳回
approveTime: dateFormat("yyyy-MM-dd hh:mm:ss", new Date()),//当前时间
}
- if (!this.approveInfo.discount&&this.repairInfo.isMaterial == 1) {
+ if (!this.approveInfo.discount && this.repairInfo.isMaterial == 1) {
uni.showToast({ title: "请填写折扣信息", icon: "none" });
return false
}
@@ -865,39 +861,25 @@ export default {
})
}
},
- // 获取时间
+ // 设置最大可选择时间
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 - 1;
-
+ let minyear = year;
this.minDate = minyear + "-" + month + "-" + day;
-
//let maxyear = year + 1;
-
this.maxDate = year + 1 + "-" + month + "-" + day; // 最大日期可选到一年后
-
//this.maxDate = year + '-'+ month +'-' + day; // 最大日期可选到今天
-
},
-
+
}
}
diff --git a/utils/request.js b/utils/request.js
index 8c42b38..e0c53c2 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -37,7 +37,7 @@ const install = (Vue, vm) => {
config.header['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
}
//
- config.header['blade-requested-with'] ='BladeHttpRequest'
+ config.header['Blade-Requested-With'] ='BladeHttpRequest'
if(config.header.isparams){
config.params = config.data
}
diff --git a/utils/tabbar.js b/utils/tabbar.js
index 1544949..c9d1604 100644
--- a/utils/tabbar.js
+++ b/utils/tabbar.js
@@ -50,12 +50,12 @@ const manage = [{
const repair = [{
iconPath: "photo",
selectedIconPath: "photo-fill",
- text: "接单记录",
+ text: "维修任务",
pagePath: "/pages/order/tasking",
}, {
iconPath: "setting",
selectedIconPath: "setting-fill",
- text: "维保任务",
+ text: "巡检任务",
pagePath: "/pages/inspection/quest",
}, {
iconPath: "account",