diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 582561b..9b0d791 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -1,16 +1,20 @@ -{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version": "0.0", - "configurations": [{ - "app-plus" : - { - "launchtype" : "local" - }, - "default" : - { - "launchtype" : "local" - }, - "type" : "uniCloud" - } +{ + // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : { + "launchtype" : "local" + }, + "default" : { + "launchtype" : "local" + }, + "type" : "uniCloud" + }, + { + "playground" : "standard", + "type" : "uni-app:app-android" + } ] } diff --git a/App.vue b/App.vue index 338d556..16f6ccc 100644 --- a/App.vue +++ b/App.vue @@ -28,4 +28,7 @@ * { box-sizing: border-box; } + .image-view-img{ + background: white; + } diff --git a/components/orderCard.vue b/components/orderCard.vue index bd1cdae..4de631d 100644 --- a/components/orderCard.vue +++ b/components/orderCard.vue @@ -42,10 +42,15 @@ - + 项目派工 - + + + 重新派工 + + + 重新派工 @@ -92,27 +97,29 @@ export default { }, data() { return { - //当前角色是否可以派工 - roleCanPg:false, //当前角色是否可以告知取车 roleCanQc:false, //当前角色是否可以接单 roleCanJd:false, //当前用户是否可以进行施工、施工过程、结束施工操作--- roleCanSg:false, + //当前用户 + userInfo:{}, + ifLeader:false, } }, mounted(){ - let userInfo = getUserInfo() - if(userInfo.roleCodes.includes("service_advisor") || userInfo.roleCodes.includes("general_inspection") || (userInfo.roleCodes.includes("repair_staff") && 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"))){ + //服务顾问、总检可以派工,维修班组长需要判断是否可以派工 this.roleCanPg = true } - if(userInfo.roleCodes.includes("service_advisor")){ + if(this.userInfo.roleCodes.includes("service_advisor")){ //服务顾问可以告知取车 this.roleCanQc = true } - if(userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId==userInfo.id){ + if(this.userInfo.roleCodes.includes("repair_staff") && this.order.nowRepairId==userInfo.id){ //维修工角色,并且指派处理的人就是当前用户可以接单 this.roleCanJd = true } diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue index 068e768..18aee8e 100644 --- a/components/tabBar/tabBar.vue +++ b/components/tabBar/tabBar.vue @@ -12,7 +12,7 @@ - 工单 + {{ title }} @@ -57,7 +57,14 @@ } }, props: { - msg: String|Number + msg: { + type: String|Number, + default: '' + }, + title: { + type: String, + default: '工单' + }, }, onLoad() { this.userInfo = getUserInfo(); diff --git a/config.js b/config.js index 369c868..5fcf339 100644 --- a/config.js +++ b/config.js @@ -1,12 +1,14 @@ // 应用全局配置 module.exports = { // baseUrl: 'https://www.nuoyunr.com', - // baseUrl: 'http://192.168.1.17:48080', - baseUrl: "http://localhost:48080", + // baseUrl: 'http://124.222.105.7:48080', + baseUrl: 'http://192.168.1.17:48080', + // baseUrl: "http://localhost:48080", imagesUrl: 'http://shequ.0315e.com/static/images/pages/', baseImageUrl: 'https://www.nuoyunr.com/minio/', shareUrl: 'https://www.lighting-it.cn/share?inviteId=', wsUrl: 'ws://192.168.1.17:48080', + //com.carService.qx // 应用信息 appInfo: { // 应用名称 diff --git a/manifest.json b/manifest.json index b0e635b..043a56d 100644 --- a/manifest.json +++ b/manifest.json @@ -41,9 +41,27 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios" : { + "dSYMs" : false + }, /* SDK配置 */ "sdkConfigs" : {} + }, + "nativePlugins" : { + "Ba-KeepAlive" : { + "__plugin_info__" : { + "name" : "安卓保活(采用多种主流技术) Ba-KeepAlive", + "description" : "原生保活插件,支持市面上大部分机型,Android4.4到13.0 。为定位、推送、websocket、定时任务、蓝牙、聊天等保驾护航(**注意:**不保证支持所有机型和场景,建议先试用再购买)", + "platforms" : "Android", + "url" : "https://ext.dcloud.net.cn/plugin?id=9423", + "android_package_name" : "com.carService.qx", + "ios_bundle_id" : "", + "isCloud" : true, + "bought" : 1, + "pid" : "9423", + "parameters" : {} + } + } } }, /* 快应用特有相关 */ diff --git a/pages-home/service/todoDetail.vue b/pages-home/service/todoDetail.vue index 2442324..b9e135a 100644 --- a/pages-home/service/todoDetail.vue +++ b/pages-home/service/todoDetail.vue @@ -101,14 +101,6 @@ export default { params:params }).then((res) => { if (res.code == 200) { - res.data.map((item)=>{ - getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => { - item.wares.unit = value - }).catch(error => { - item.wares.unit = "未知" - console.error(error); - }); - }) this.repairList = res.data } }) diff --git a/pages-order/addOrder/addOrder.vue b/pages-order/addOrder/addOrder.vue index 5abb48d..36bfeaa 100644 --- a/pages-order/addOrder/addOrder.vue +++ b/pages-order/addOrder/addOrder.vue @@ -220,7 +220,9 @@ export default { }, onShow() { if (this.phone != '') { - this.listUserInfo() + setTimeout(() => { + this.listUserInfo() + }, 500) } }, methods: { @@ -306,7 +308,7 @@ export default { }) } else { uni.showToast({ - title: '请输入手机号', + title: '请输入手机号|车牌号|车架号', icon: 'none' }) } @@ -340,7 +342,9 @@ export default { getCarList() { const params = { - userId: this.userInfo.userId + userId: this.userInfo.userId, + pageNo: 1, + pageSize: 100000 } request({ url: '/admin-api/base/carMain/page', @@ -348,7 +352,6 @@ export default { params: params }).then(res => { this.carList = res.data.records - console.log('车列表', this.carList) for (let i = 0; i < this.carList.length; i++) { if (this.carList[i].licenseNumber.toLowerCase() == this.phone.toLowerCase()) { this.activeCarIndex = i @@ -360,9 +363,21 @@ export default { } //将时间戳转换 this.carList.forEach(item => { - item.inspectionDate = formatTimestampCustom(item.inspectionDate) - item.insuranceDate = formatTimestampCustom(item.insuranceDate) - item.carRegisterDate = formatTimestampCustom(item.carRegisterDate) + if (item.inspectionDate) { + item.inspectionDate = formatTimestampCustom(item.inspectionDate) + }else { + item.inspectionDate = '' + } + if (item.insuranceDate) { + item.insuranceDate = formatTimestampCustom(item.insuranceDate) + }else { + item.insuranceDate = '' + } + if (item.carRegisterDate) { + item.carRegisterDate = formatTimestampCustom(item.carRegisterDate) + }else { + item.carRegisterDate = '' + } }) }) }, @@ -389,6 +404,10 @@ export default { }, editUserInfo(userInfo) { + if (this.phone == '') return uni.showToast({ + title: '请先输入手机号,再添加客户', + icon: 'none' + }) bus.$off('updateUserInfo') bus.$on('updateUserInfo', (userInfo) => { this.userInfo = userInfo diff --git a/pages-order/orderDetail/orderDetail.vue b/pages-order/orderDetail/orderDetail.vue index 4e510f0..d9c2df0 100644 --- a/pages-order/orderDetail/orderDetail.vue +++ b/pages-order/orderDetail/orderDetail.vue @@ -553,30 +553,30 @@ export default { } } if(this.loginUser.roleCodes.includes("repair_staff")){ - //维修工角色 - if(this.ticketInfo.nowRepairId==this.loginUser.id && "05"==this.ticketInfo.ticketsStatus){ - //当前用户就是施工人,,订单状态处于维修中 可以提交配件申请 - this.content.push({ - text: '配件申请', active: false,code:"apply" - }) - if("02"==this.ticketInfo.ticketsWorkStatus){ - //当前正在施工,可以随时上传图片、也可以结束施工 + //维修工角色,可以提交配件申请 + this.content.push({ + text: '配件申请', active: false, code: "apply" + }) + if ("05" == this.ticketInfo.ticketsStatus && this.ticketInfo.nowRepairId == this.loginUser.id) { + //订单状态处于维修中 ,且自己就是施工人 + if ("02" == this.ticketInfo.ticketsWorkStatus) { + //当前正在施工且可以随时上传图片、也可以结束施工 this.content.push({ - text: '拍照上传', active: false,code:"working" + text: '拍照上传', active: false, code: "working" }) this.content.push({ - text: '阶段完成', active: false,code:"done_half" + text: '阶段完成', active: false, code: "done_half" }) this.content.push({ - text: '项目完成', active: false,code:"other" + text: '项目完成', active: false, code: "other" }) this.content.push({ - text: '移交总检', active: false,code:"done" + text: '移交总检', active: false, code: "done" }) //查当前维修的项目 this.selectNowRepair() } - if("03"==this.ticketInfo.ticketsWorkStatus || "04"==this.ticketInfo.ticketsWorkStatus) { + if ("03" == this.ticketInfo.ticketsWorkStatus || "04" == this.ticketInfo.ticketsWorkStatus) { //当前子状态是已接单和已完成,可以开始施工 this.content.push({ text: '开始施工', active: false, code: "start" diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue index 2aa47ef..ba848bb 100644 --- a/pages-order/orderList/orderList.vue +++ b/pages-order/orderList/orderList.vue @@ -34,7 +34,8 @@ - + + diff --git a/pages-repair/apply/newWare.vue b/pages-repair/apply/newWare.vue index fa5a212..f15caab 100644 --- a/pages-repair/apply/newWare.vue +++ b/pages-repair/apply/newWare.vue @@ -58,7 +58,7 @@ - + {{ item.corpName }} @@ -153,6 +153,9 @@ export default { }, methods: { + cs(e){ + this.checkedCorpIdList =e.detail.value + }, /** * 初始化配件数据 */ @@ -290,10 +293,14 @@ export default { return } //组装可用的子公司 + + console.log(this.allCompanyList,"this.checkedCorpIdList") + debugger if(this.checkedCorpIdList.length>0){ this.formData.corpId = this.checkedCorpIdList.join() } //组装所属分类 + this.formData.status = "01" this.formData.type = this.allTypeList[this.typeIndex].id this.formData.unit = this.allUnitList[this.unitIndex].value this.formData.dataForm = this.allFromList[this.fromIndex].value diff --git a/pages-repair/signature/signature.vue b/pages-repair/signature/signature.vue index 408f782..091c68d 100644 --- a/pages-repair/signature/signature.vue +++ b/pages-repair/signature/signature.vue @@ -1,10 +1,10 @@ diff --git a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue index 1626ebb..12b526f 100644 --- a/pages-warehouse/inOutWarehouse/inOutWarehouse.vue +++ b/pages-warehouse/inOutWarehouse/inOutWarehouse.vue @@ -38,7 +38,7 @@ - + 采购 {{isReceive?'通知领料':'通知退料'}} diff --git a/pages-warehouse/inOutWarehouse/part.vue b/pages-warehouse/inOutWarehouse/part.vue index 6045acc..fdf2b73 100644 --- a/pages-warehouse/inOutWarehouse/part.vue +++ b/pages-warehouse/inOutWarehouse/part.vue @@ -5,7 +5,7 @@ 供应商 - + 查询 @@ -17,11 +17,11 @@ - 单价 + 单价 - 数量 + 数量 @@ -325,6 +325,7 @@ export default { .formLabel { font-size: 32rpx; color: #333333; + width: 50px; } .formValue { diff --git a/pages.json b/pages.json index 63bf437..0047a91 100644 --- a/pages.json +++ b/pages.json @@ -67,8 +67,7 @@ { "path": "pages/project/project", "style": { - "navigationBarTitleText": "新增维修项目", - "enablePullDownRefresh": true + "navigationBarTitleText": "新增维修项目" } } ], @@ -94,29 +93,25 @@ { "path": "choosePeople/choosePeople", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "" } }, { "path": "chooseImg/chooseImg", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "" } }, { "path": "reviewList/reviewList", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "" } }, { "path": "inWare/inWare", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "" } } ] @@ -204,8 +199,7 @@ { "path": "signature/signature", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "" } } ] diff --git a/pages/index/index.vue b/pages/index/index.vue index 08b7164..6c9c70c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -10,10 +10,21 @@ export default { data() { return { - + keepLive: { + channelId: 'Ba-KeepAlive', + channelName: "Ba-KeepAlive", + title: "汽修小助手正在运行", + content: "汽修小助手正在运行", + dataResult: "", + type: undefined + } } }, onLoad() { + // #ifdef APP + //保活技术 + this.register() + // #endif if(getToken()){ //跳转首页 //判断是否是仓管,仓管需要跳单独的首页 @@ -32,10 +43,21 @@ uni.navigateTo({ url: '/pages/login/login' }) - } + } }, methods: { - + register() { //注册 + console.log(keepAlivePlugin, 'keepAlive'); + keepAlivePlugin.register({ + channelId: this.keepLive.channelId, + channelName: this.keepLive.channelName, + title: this.keepLive.title, + content: this.keepLive.content, + }, + (res) => { + console.log('保活注册', res); + }); + }, } } diff --git a/pages/myCar/carDetail.vue b/pages/myCar/carDetail.vue index 3c06531..18883d9 100644 --- a/pages/myCar/carDetail.vue +++ b/pages/myCar/carDetail.vue @@ -5,7 +5,14 @@ - + - - - + + + + {{ brandList && brandList[arrayIndex] ? brandList[arrayIndex].brandName : '' }} + + + + {{ natureList[natureIndex].value}} + + @@ -91,24 +96,6 @@ - - - - - - @@ -131,8 +118,10 @@