diff --git a/App.vue b/App.vue
index 9dd5962..eb61edb 100644
--- a/App.vue
+++ b/App.vue
@@ -88,6 +88,11 @@
console.error('获取用户信息失败', err)
})
}
+
+ // #ifdef APP-PLUS
+ plus.screen.lockOrientation('portrait-primary'); //锁死屏幕方向为竖屏
+ plus.navigator.setFullscreen(false);
+ // #endif
},
onShow: function() {
console.log('App Show')
diff --git a/components/orderCard.vue b/components/orderCard.vue
index 6e1c1a6..f01deae 100644
--- a/components/orderCard.vue
+++ b/components/orderCard.vue
@@ -241,6 +241,7 @@
* 接单
*/
openFile(orderId) {
+ console.log('执行');
this.$emit('getOrder', orderId);
},
/**
diff --git a/main.js b/main.js
index 59558d6..72ed18e 100644
--- a/main.js
+++ b/main.js
@@ -1,6 +1,12 @@
import App from './App'
import uView from "uview-ui";
-import config from '@/config'
+import config from '@/config';
+import {
+ checkPermi,
+ checkRole
+} from './utils/permission'
+Vue.prototype.checkPermi = checkPermi
+Vue.prototype.checkRole = checkRole
const baseUrl = config.baseUrl
Vue.prototype.$baseUrl = baseUrl;
const baseImageUrl = config.baseImageUrl
diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue
index c3e2f0f..ddd09e9 100644
--- a/pages-home/home/home.vue
+++ b/pages-home/home/home.vue
@@ -31,7 +31,7 @@
业务管理
-
+
数据统计
@@ -70,23 +70,24 @@
进厂数
- {{ bossNum.inCompanyNum }}
+ {{ bossNum.newOrderNum }}
-
+
维修中
{{ bossNum.workingNum }}
-
+
已竣工
{{ bossNum.overNum }}
-
+
+
@@ -423,6 +424,11 @@
url: '/pages-business/businessManage/businessManage' // 3. 建议使用单引号
});
break;
+ case 3: // 2. 补上冒号
+ uni.navigateTo({
+ url: '/pages-business/statistics/statistics' // 3. 建议使用单引号
+ });
+ break;
case 4:
uni.navigateTo({
url: '/pages-home/msg/message' // 3. 建议使用单引号
diff --git a/pages-home/service/todoDetail.vue b/pages-home/service/todoDetail.vue
index 928a727..c513ee8 100644
--- a/pages-home/service/todoDetail.vue
+++ b/pages-home/service/todoDetail.vue
@@ -1,657 +1,697 @@
-
-
-
-
-
-
-
-
- 岗位
- {{ info.repairWork }}
-
-
- 姓名
- {{ info.repairName }}
-
-
- 服务顾问
- {{ info.adviserName }}
-
-
- 时间
- {{ getDateFormat(info.createTime) }}
-
-
-
-
-
-
-
-
-
- 车牌号
- {{ info.licenseNumber }}
-
-
- 车系
- {{ info.carBrandName }}
-
-
- 姓名
- {{ info.userName }}
-
-
- 电话
- {{ info.userMobile }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }}
-
-
-
- 当前库存
- {{item.stock}}
-
-
- 售价
- {{item.salePrice}}
-
-
- 状态
- {{ getWaresStatus(item.waresStatus) }}
-
-
- 审核人
- {{ item.handleName }}
-
-
- 审核时间
- {{ item.approvalTime }}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 岗位
+ {{ info.repairWork }}
+
+
+ 姓名
+ {{ info.repairName }}
+
+
+ 服务顾问
+ {{ info.adviserName }}
+
+
+ 时间
+ {{ getDateFormat(info.createTime) }}
+
+
+
+
+
+
+
+
+
+ 车牌号
+ {{ info.licenseNumber }}
+
+
+ 车系
+ {{ info.carBrandName }}
+
+
+ 姓名
+ {{ info.userName }}
+
+
+ 电话
+ {{ info.userMobile }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{info.remark}}
+
+
+
+
+
+
+
+
+
+
+ {{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }}
+
+
+
+ 当前库存
+ {{item.stock}}
+
+
+ 售价
+ {{item.salePrice}}
+
+
+ 状态
+ {{ getWaresStatus(item.waresStatus) }}
+
+
+ 审核人
+ {{ item.handleName }}
+
+
+ 审核时间
+ {{ item.approvalTime }}
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+ .fullscreen-image {
+ max-width: 90vw;
+ /* 最大宽度为视口宽度的90% */
+ max-height: 90vh;
+ /* 最大高度为视口高度的90% */
+ object-fit: contain;
+ /* 保持宽高比 */
+ cursor: pointer;
+ margin: 0 20rpx;
+ /* 增加左右边距,使图片距离屏幕边缘有一定距离 */
+ }
+
+ .popup-content {
+ width: 80%;
+ max-width: 400px;
+ background-color: #fff;
+ padding: 20px;
+ border-radius: 10px;
+ margin: auto;
+ }
+
+ .popup-title {
+ font-size: 18px;
+ margin-bottom: 20px;
+ text-align: center;
+ }
+
+ .uni-form-item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 15px;
+ }
+
+ .uni-label {
+ width: 20rem;
+ }
+
+ .uni-input {
+ padding: 2px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ box-sizing: border-box;
+ height: 2rem;
+ width: 26rem;
+ }
+
+ .popup-footer {
+ display: flex;
+ justify-content: space-between;
+ margin-top: 20px;
+ }
+
+ .confirm-btn,
+ .cancel-btn {
+ flex: 1;
+ margin: 0 5px;
+ height: 40px;
+ line-height: 40px;
+ border: none;
+ border-radius: 5px;
+ }
+
+ .confirm-btn {
+ background-color: #0174F6;
+ color: #fff;
+ }
+
+ .cancel-btn {
+ background-color: #f5f5f5;
+ color: #666;
+ }
+
\ No newline at end of file
diff --git a/pages-internal/workReport/reportDetails.vue b/pages-internal/workReport/reportDetails.vue
index f548a30..df9cfee 100644
--- a/pages-internal/workReport/reportDetails.vue
+++ b/pages-internal/workReport/reportDetails.vue
@@ -25,8 +25,8 @@
汇报内容
-
-
+
+
附件
上传附件
diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue
index 6dcdff5..1a6910c 100644
--- a/pages-order/addOrder/addOrder.vue
+++ b/pages-order/addOrder/addOrder.vue
@@ -233,7 +233,7 @@
-
+
+
+ 渠道/来源
+
@@ -392,7 +398,8 @@
import config from "@/config";
import {
formatTimestamp,
- formatTimestampCustom
+ formatTimestampCustom,
+ handleTree
} from "@/utils/utils";
import upload from "@/utils/upload";
import {
@@ -424,6 +431,7 @@
cusFromIndex: 0,
busiFromList: [],
busiFromIndex: 0,
+ busiAndCusList: [],
partDisposals: [],
partDisposalIndex: 0,
formData: {
@@ -479,6 +487,7 @@
ticketNo: '',
//前一个页面传过来的参数
pageData: {},
+ busIAndCusValue: undefined
}
},
watch: {
@@ -543,6 +552,7 @@
this.initDict("repair_type")
this.initDict("cus_data_from")
this.initDict("repair_part_disposal")
+ this.queryBusiAndCus()
},
onShow() {},
methods: {
@@ -588,8 +598,6 @@
this.partDisposalIndex = newIndex;
this.formData.partDisposal = this.partDisposals[newIndex].value;
},
-
-
async initDict(dictCode) {
let dictArray = getStorageWithExpiry(dictCode);
console.log(dictArray, "partDisposals")
@@ -652,6 +660,24 @@
})
}
},
+ /**
+ * 获取业务来源和渠道
+ */
+ queryBusiAndCus() {
+ request({
+ url: `/admin-api/business/list`,
+ method: 'GET',
+ params: {
+ systemCode: 'repair'
+ }
+ }).then(res => {
+ this.busiAndCusList = handleTree(res.data, 'id', 'pid')
+ })
+ },
+ onBusiAndCuschange(e) {
+ this.formData.busiFrom = e.detail.value[0].value
+ this.formData.cusFrom = e.detail.value[1].value
+ },
buildRepairType() {
if (this.pageData.repairType) {
this.repairTypes.map((item, index) => {
@@ -708,7 +734,8 @@
* 创建工单前上传图片
*/
submitUpload() {
- if (this.userInfo === null || this.carList.length === 0 || this.selectedProj.length === 0) {
+ if (this.userInfo === null || this.carList.length === 0 || this.selectedProj.length === 0 || !this.formData
+ .busiFrom || !this.formData.cusFrom) {
uni.showToast({
title: '请完善信息',
icon: 'none'
@@ -721,12 +748,12 @@
//新增工单
submit() {
let fileStr = this.fileList.map(item => item.url.replace(config.baseImageUrl, "")).join(",")
- if (!this.formData.busiFrom) {
- this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value
- }
- if (!this.formData.cusFrom) {
- this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value
- }
+ // if (!this.formData.busiFrom) {
+ // this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value
+ // }
+ // if (!this.formData.cusFrom) {
+ // this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value
+ // }
const data = {
userId: this.userInfo.id,
ticketNo: this.ticketNo,
@@ -798,9 +825,20 @@
method: 'GET',
params: params
}).then(res => {
- if (res.data.records.length > 0) {
+ if (res.data.records.length == 1) {
this.userInfo = res.data.records[0]
this.getCarList()
+ } else if (res.data.records.length != 0) {
+ uni.showActionSheet({
+ title: '选择客户',
+ itemList: res.data.records.map(m => m.cusName + m.phoneNumber),
+ success: ({
+ tapIndex
+ }) => {
+ this.userInfo = res.data.records[tapIndex]
+ this.getCarList()
+ }
+ })
}
})
} else {
diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue
index 60c77e9..06bb689 100644
--- a/pages-order/orderDetail/orderDetail.vue
+++ b/pages-order/orderDetail/orderDetail.vue
@@ -55,43 +55,46 @@
class="carImage" mode="aspectFit">
-
- 车主
- {{ ticketInfo.userName }}
+
+
+ 车主
+ {{ ticketInfo.userName }}
+
+
+ 联系方式
+ {{ ticketInfo.userMobile }}
+
+
+ 客户来源
+ {{ ticketInfo.customerInfo.dataFromText }}
+
+
+ 性别
+ {{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }}
+
+
+ 经办人
+ {{ ticketInfo.handleName }}
+
+
+ 经办人电话
+ {{ ticketInfo.handleMobile }}
+
+
+ 业务来源
+ {{ ticketInfo.busiFrom }}
+
+
-
- 联系方式
- {{ ticketInfo.userMobile }}
-
-
- 客户来源
- {{ ticketInfo.customerInfo.dataFromText }}
-
-
- 性别
- {{ ticketInfo.customerInfo.sex === '1' ? '女' : '男' }}
-
-
- 经办人
- {{ ticketInfo.handleName }}
-
-
- 经办人电话
- {{ ticketInfo.handleMobile }}
-
-
- 业务来源
- {{ ticketInfo.busiFrom }}
-
-
+
车架号
{{ ticketInfo.carVin }}
@@ -102,48 +105,62 @@
车辆注册日期
- {{ ticketInfo.carRegisterDate }}
+ {{ formatDate(ticketInfo.carInfo.carRegisterDate) }}
车龄(年)
{{ ticketInfo.carInfo.carYear }}
- 年检到期时间
- {{ ticketInfo.nextInspectionDate}}
+ 当前表显里程
+ {{ ticketInfo.carInfo.mileageTraveled}}
+
+
+ 下次年检时间
+ {{ formatDate(ticketInfo.carInfo.nextInspectionDate)}}
保险到期时间
- {{ ticketInfo.insuranceExpiryDate}}
+ {{ formatDate(ticketInfo.carInfo.insuranceExpiryDate)}}
-
+
+
+ 下次保养里程
+ {{ ticketInfo.carInfo.nextMaintenanceMileage}}
最近保养日期
{{ ticketInfo.maintenanceDate}}
-
- 表显里程
- {{ ticketInfo.mileageTraveled}}
-
最近保养公里数
{{ ticketInfo.maintenanceMileage}}
-
-
-
-
+
+ 档案资料
+
+
+
+
+
+
+
+
+
+ 点击编辑车辆信息
+
+
@@ -456,6 +473,32 @@
+
+
+
@@ -487,7 +530,10 @@
setStorageWithExpiry,
getStorageWithExpiry
} from '@/utils/auth'
- import config from '@/config'
+ import config from '@/config';
+ import {
+ fixScreen
+ } from '@/utils/fixScreen.js';
export default {
components: {
VNavigationBar,
@@ -526,10 +572,29 @@
repairItemId: "",
itemName: "",
},
+ // 补充车辆信息
+ carFormData: {
+ nextInspectionDate: undefined,
+ insuranceExpiryDate: undefined,
+ nextMaintenanceMileage: undefined,
+ mileageTraveled: undefined,
+ },
//是否可以授权给客户看
canOpenCus: false,
//是否可以看见钱
canSeeMoney: false,
+ listStyles: {
+ // 是否显示边框
+ border: false,
+ // 是否显示分隔线
+ dividline: false,
+ // 线条样式
+ borderStyle: {
+ width: 1,
+ color: 'blue',
+ radius: 2
+ }
+ },
//当前选择的操作:working-维修期间|done_half-阶段完成|done-全部完成递交下一维修班组选人维修
nowChooseOperate: "",
carInfo: {},
@@ -555,7 +620,8 @@
activeProjTabKey: 0,
activePartTabKey: 0,
processList: [{}, {}],
- carImgList: []
+ carImgList: [],
+ cararchivesPhotos: []
};
},
watch: {
@@ -587,8 +653,20 @@
this.refreshData(false)
}
},
-
+ onShow() {
+ // 调用修复方法
+ fixScreen();
+ },
+ computed: {
+ startDate() {
+ return this.getDate('start');
+ },
+ endDate() {
+ return this.getDate('end');
+ }
+ },
methods: {
+ formatDate,
chooseProjTab(index) {
this.activeProjTabKey = index
},
@@ -641,6 +719,67 @@
}
})
},
+ /**
+ * 打开编辑车辆弹窗
+ */
+ showCarPopup() {
+ this.carFormData = this.ticketInfo.carInfo
+ if (this.carFormData.insuranceExpiryDate) {
+ this.carFormData.insuranceExpiryDate = formatDate(this.carFormData.insuranceExpiryDate)
+ }
+ if (this.carFormData.nextInspectionDate) {
+ this.carFormData.nextInspectionDate = formatDate(this.carFormData.nextInspectionDate)
+ }
+ this.$refs.carPopup.open()
+ },
+ /**
+ * @param {Object} type获取时间
+ */
+ getDate(type) {
+ const date = new Date();
+ let year = date.getFullYear();
+ let month = date.getMonth() + 1;
+ let day = date.getDate();
+
+ if (type === 'start') {
+ year = year - 10;
+ } else if (type === 'end') {
+ year = year + 10;
+ }
+ month = month > 9 ? month : '0' + month;
+ day = day > 9 ? day : '0' + day;
+ return `${year}-${month}-${day}`;
+ },
+ /**
+ * 修改下次年检时间
+ * @param {Object} e
+ */
+ bindnextInspectionDateChange(e) {
+ console.log('e', e);
+ this.carFormData.nextInspectionDate = e.detail.value
+ },
+ bindInsuranceExpiryDateChange(e) {
+ this.carFormData.insuranceExpiryDate = e.detail.value
+ },
+ submitCarForm() {
+ // 如果 nextInspectionDate 有值,并且格式是 yyyy-MM-dd,就补上时分秒
+ if (this.carFormData.nextInspectionDate) {
+ this.carFormData.nextInspectionDate = new Date(this.carFormData.nextInspectionDate).getTime()
+ }
+ // 如果 nextInspectionDate 有值,并且格式是 yyyy-MM-dd,就补上时分秒
+ if (this.carFormData.insuranceExpiryDate) {
+ this.carFormData.insuranceExpiryDate = new Date(this.carFormData.insuranceExpiryDate).getTime()
+ }
+
+
+ request({
+ url: `/admin-api/base/carMain/update`,
+ method: 'PUT',
+ data: this.carFormData
+ })
+
+ this.$refs.carPopup.close()
+ },
/**
* 监听输入框
*/
@@ -669,7 +808,11 @@
prviewImage(imgList, index) {
let urls = []
imgList.forEach(i => {
- urls.push(this.imgUrlPrex + i.image)
+ if (!i.image.includes("http")) {
+ urls.push(this.imgUrlPrex + i.image)
+ } else {
+ urls.push(i.image)
+ }
})
uni.previewImage({
urls: urls,
@@ -782,6 +925,7 @@
}
},
afterRead(file) {
+ console.log('文件', file);
uni.showLoading({
title: '正在上传中...',
mask: true
@@ -1012,8 +1156,11 @@
}
if (this.loginUser.roleCodes.includes("repair_staff")) {
//维修工角色,可以提交配件申请
+ const has02 = this.ticketInfo.items.some(item => item.itemType === '02');
+ console.log('has02', has02);
this.content.push({
- text: '配件申请',
+ // text: '配件申请',
+ text: !has02 ? '是否申请配件' : '是否增加配件',
active: false,
code: "apply"
})
@@ -1275,6 +1422,7 @@
}).then((res) => {
let resultObj = res.data
resultObj.statusStr = getOrderStatusText(res.data.ticketsStatus, res.data.isHandover)
+
//注册日期
if (null != resultObj.carInfo.carRegisterDate) {
resultObj.carRegisterDate = formatDate(resultObj.carInfo.carRegisterDate)
@@ -1379,8 +1527,17 @@
}
if (resultObj.carInfo.carLicenseImg) {
resultObj.carInfo.carLicenseImg.split(",").map((item) => {
+ let url = item.includes("http") ? item : this.imgUrlPrex + item;
this.carImgList.push({
- image: item
+ image: url
+ });
+ });
+
+ }
+ if (resultObj.carInfo.archivesPhoto) {
+ resultObj.carInfo.archivesPhoto.split(",").map((item) => {
+ this.cararchivesPhotos.push({
+ url: this.$baseImageUrl + item
})
})
}
@@ -1457,7 +1614,7 @@
url: '/pages-order/reviewList/reviewList?formData=' + encodeURIComponent(JSON.stringify(
formData))
})
- }
+ },
}
}
@@ -2309,4 +2466,8 @@
background-color: #efefef;
}
}
+
+ .car-popup-out {
+ padding: 30rpx 40rpx;
+ }
\ No newline at end of file
diff --git a/pages-repair/apply/applyForm.vue b/pages-repair/apply/applyForm.vue
index ce1645c..e2e306d 100644
--- a/pages-repair/apply/applyForm.vue
+++ b/pages-repair/apply/applyForm.vue
@@ -33,9 +33,9 @@
-
-
-
+
+
+
@@ -46,34 +46,38 @@
确认添加
拍照上传
-
-
-
-
+
+
+
+