diff --git a/common/js/data.js b/common/js/data.js index e5486e1..6f9d667 100644 --- a/common/js/data.js +++ b/common/js/data.js @@ -90,7 +90,7 @@ const masterRules = [ '7规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容', '8规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容规则内容' ] - + // type: 0=升降序,1=功能按钮;order: 0=升序,1=降序; const taskConditions = [{ code: 'area', @@ -100,109 +100,197 @@ const taskConditions = [{ title: '品类' }, { code: 'distance', - title: '距离', - type: 0, + title: '距离', + type: 0, value: 0, }, { code: 'time', - title: '时间', - type: 0, + title: '时间', + type: 0, value: 0, }, { - code: 'reset', + code: 'reset', type: 1, title: '重置' -}] - -const tasks = [{ - id: 1, - title: '清洗-油烟机/油烟机全拆洗+空调挂机', - tag: ['油烟机全拆洗+空调挂机', '京东店铺'], - address: '广东省惠州市惠城区小金口街道兴华街10号', - doorTime: '2022-01-17 12:00:00-12:15:00', - price: '170.00', - expeditedPrice: '70.00', - phoneNum: '13455635441', - canQuote: true -}, { - id: 2, - title: '清洗-油烟机/油烟机全拆洗+空调挂机', - tag: ['油烟机全拆洗+空调挂机', '京东店铺'], - address: '广东省惠州市惠城区小金口街道兴华街10号', - doorTime: '2022-01-17 12:00:00-12:15:00', - price: '170.00', - expeditedPrice: '70.00', - phoneNum: '13455635442', - canQuote: true -}, { - id: 3, - title: '清洗-油烟机/油烟机全拆洗+空调挂机', - tag: ['油烟机全拆洗+空调挂机', '京东店铺'], - address: '广东省惠州市惠城区小金口街道兴华街10号', - doorTime: '2022-01-17 12:00:00-12:15:00', - price: '170.00', - expeditedPrice: '70.00', - phoneNum: '13455635443', - canQuote: true -}]; - -const takeCertify = true; - -const areaList = [[{ - id: 100, - name: '广东' -}, { - id: 101, - name: '海南' -}], [{ - id: 200, - name: '广州' -}], [{ - id: 300, - name: '天河' -}]] - -const categoryList = [[{ - id: 100, - name: '电器类' -}, { - id: 101, - name: '家政类' -}], [{ - id: 200, - name: '全部' -}], [{ - id: 300, - name: '全部' -}]]; - -const order = { - id: 1, - title: '清洗-油烟机/油烟机全拆洗+空调挂机', - tag: ['油烟机全拆洗+空调挂机', '京东店铺'], - address: '广东省惠州市惠城区小金口街道兴华街10号', - doorTime: '2022-01-17 12:00:00-12:15:00', - price: '170.00', - expeditedPrice: '70.00', - phoneNum: '13455635441', - contactPerson: '周梅', - picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big6001.jpg', - spec: '200*300cm', - servType: '空调清洗', - serialId: '12233342345223', - createTime: '2022-01-17 15:44:32', - comments: '上门前10分钟先电话联系' -} +}] + +const tasks = [{ + id: 1, + title: '清洗-油烟机/油烟机全拆洗+空调挂机', + tag: ['油烟机全拆洗+空调挂机', '京东店铺'], + address: '广东省惠州市惠城区小金口街道兴华街10号', + doorTime: '2022-01-17 12:00:00-12:15:00', + price: '170.00', + expeditedPrice: '70.00', + phoneNum: '13455635441', + canQuote: true +}, { + id: 2, + title: '清洗-油烟机/油烟机全拆洗+空调挂机', + tag: ['油烟机全拆洗+空调挂机', '京东店铺'], + address: '广东省惠州市惠城区小金口街道兴华街10号', + doorTime: '2022-01-17 12:00:00-12:15:00', + price: '170.00', + expeditedPrice: '70.00', + phoneNum: '13455635442', + canQuote: true +}, { + id: 3, + title: '清洗-油烟机/油烟机全拆洗+空调挂机', + tag: ['油烟机全拆洗+空调挂机', '京东店铺'], + address: '广东省惠州市惠城区小金口街道兴华街10号', + doorTime: '2022-01-17 12:00:00-12:15:00', + price: '170.00', + expeditedPrice: '70.00', + phoneNum: '13455635443', + canQuote: true +}]; + +const takeCertify = true; + +const areaList = [ + [{ + id: 100, + name: '广东' + }, { + id: 101, + name: '海南' + }], + [{ + id: 200, + name: '广州' + }], + [{ + id: 300, + name: '天河' + }] +] + +const categoryList = [ + [{ + id: 100, + name: '电器类' + }, { + id: 101, + name: '家政类' + }], + [{ + id: 200, + name: '全部' + }], + [{ + id: 300, + name: '全部' + }] +]; + +const order = { + id: 1, + title: '清洗-油烟机/油烟机全拆洗+空调挂机', + tag: ['油烟机全拆洗+空调挂机', '京东店铺'], + address: '广东省惠州市惠城区小金口街道兴华街10号', + doorTime: '2022-01-17 12:00:00-12:15:00', + price: '170.00', + expeditedPrice: '70.00', + phoneNum: '13455635441', + contactPerson: '周梅', + picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big6001.jpg', + spec: '200*300cm', + servType: '空调清洗', + serialId: '12233342345223', + createTime: '2022-01-17 15:44:32', + comments: '上门前10分钟先电话联系' +} + +const myOrders = { + summary: { + overtimeOrderNum: 336, + todayOrderNum: 1, + tomorrowOrderNum: 0, + urgentMsgOrderNum: 0, + newOrderNum: 1 + }, + orderList: [{ + id: 1, + title: '清洗空调/挂机内机拆洗(不分匹)', + state: '', + subState: 'waitServing', + tags: [{ + level: 'info', + content: '商城订单' + }, { + level: 'error', + content: '超时未预约' + }], + name: 'cc', + address: '广东省广州市天河区。。。。。。', + servTime: '2022-06-01 08:00-08:30', + doorTime: '2022-06-01 08:15:00', + comments: '备注内容。。。。。。', + phoneNum: '13233433467', + deadlineDate: '2022-06-01 08:30:00', + product: { + id: 1, + picUrl: 'https://ossweb-img.qq.com/images/lol/web201310/skin/big20000.jpg', + name: '柜机空调清洗1', + comments: '备---------注', + salePrice: 199, + price: 250, + type: '空调/清洗', + servArea: ['天河区', '黄埔区', '荔湾区'], + pickedList: [{ + id: 101, + name: '挂机内机拆洗1(不分匹)', + valColArr: [{ + value: 3 + }, { + numberBox: true, + max: 3 + }] + }] + } + }] +} + +const timeRangeList = [ + '08:00-08:30', + '08:30-09:00', + '09:00-09:30', + '09:30-10:00', + '10:00-10:30', + '10:30-11:00', + '11:00-11:30', + '11:30-12:00', + '12:00-12:30', + '12:30-13:00', + '13:00-13:30', + '13:30-14:00', + '14:00-14:30', + '14:30-15:00', + '14:30-15:00', + '15:00-15:30', + '15:30-16:00', + '16:00-16:30', + '16:30-17:00', + '17:00-17:30', + '17:30-18:00', + '18:00-18:30', + '18:30-19:00', + '19:00-19:30', + '19:30-20:00' +] export default { moduleBarInfos, myInfo, myTeamInfo, masterRules, - taskConditions, - tasks, - takeCertify, - categoryList, - areaList, - order + taskConditions, + tasks, + takeCertify, + categoryList, + areaList, + order, + myOrders, + timeRangeList } diff --git a/common/js/dateUtil.js b/common/js/dateUtil.js new file mode 100644 index 0000000..cd7df7c --- /dev/null +++ b/common/js/dateUtil.js @@ -0,0 +1,30 @@ +export default { + dateCache: null, + countDownDiffCache: null, + countDownDiff(dateStr) { + if (dateStr == this.dateCache) { + return this.countDownDiffCache; + } + let dayTimes = 24*60*60*1000; + let hourTimes = 60*60*1000; + let minTimes = 60*1000; + let secondsTimes = 1000; + let dateTimesDiff = new Date(dateStr).getTime() - new Date().getTime(); + let day = Math.floor(dateTimesDiff / dayTimes); + let leftOver = dateTimesDiff % dayTimes; + let hour = Math.floor(leftOver / hourTimes); + leftOver = leftOver % hourTimes; + let min = Math.floor(leftOver / minTimes); + leftOver = leftOver % minTimes; + let seconds = Math.floor(leftOver / secondsTimes); + leftOver = leftOver % secondsTimes; + this.dateCache = dateStr; + this.countDownDiffCache = { + day: day, + hour: hour, + min: min, + seconds: seconds + } + return this.countDownDiffCache; + } +} \ No newline at end of file diff --git a/common/js/glogalFun.js b/common/js/glogalFun.js index 3285a85..cdfc529 100644 --- a/common/js/glogalFun.js +++ b/common/js/glogalFun.js @@ -3,5 +3,8 @@ export default { CANCEL: 'cacelCallback', VERTICAL_NAV_GET_ITEM: 'verticalNavGetItem', VERTICAL_NAV_SEARCH: 'verticalNavSearch', - CHOOSE_ADDRESS: 'chooseAddress' + CHOOSE_ADDRESS: 'chooseAddress', + SHOW_ARRANGE_FAIL_TIME: 'showArrangeFailTime', + HIDE_MODAL: 'hideModal', + SUBMIT_FAIL_REASON: 'submitFailReason' } diff --git a/components/goods-card/horizontal-goods-card.vue b/components/goods-card/horizontal-goods-card.vue new file mode 100644 index 0000000..574b914 --- /dev/null +++ b/components/goods-card/horizontal-goods-card.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/components/goods-card/product-picked.vue b/components/goods-card/product-picked.vue new file mode 100644 index 0000000..458f426 --- /dev/null +++ b/components/goods-card/product-picked.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/components/uni-combox/my-uni-combox.vue b/components/uni-combox/my-uni-combox.vue new file mode 100644 index 0000000..434ee05 --- /dev/null +++ b/components/uni-combox/my-uni-combox.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/main.js b/main.js index f66a7a0..aca3ed6 100644 --- a/main.js +++ b/main.js @@ -5,16 +5,15 @@ import CuCustom from 'colorui/components/cu-custom.vue'; import ConfirmModal from '@/components/modal/confirm-modal.vue'; import Data from './common/js/data.js'; import globalFun from './common/js/glogalFun.js'; -import validate from './common/js/validate.js'; +import validate from './common/js/validate.js'; +import dateUtil from './common/js/dateUtil.js'; Vue.component('cu-custom', CuCustom) Vue.component('confirm-modal', ConfirmModal); const data = type => { //模拟异步请求数据 return new Promise(resolve => { - setTimeout(() => { - resolve(Data[type]); - }, 0) + resolve(Data[type]); }) } Vue.prototype.$api = { @@ -22,6 +21,7 @@ Vue.prototype.$api = { } Vue.prototype.$globalFun = globalFun; Vue.prototype.$validate = validate; +Vue.prototype.$dateUtil = dateUtil; Vue.config.productionTip = false diff --git a/pages.json b/pages.json index 72202b8..63445f7 100644 --- a/pages.json +++ b/pages.json @@ -1,7 +1,6 @@ { "pages": [{ - "path": "pages/index/index" - // "path": "pages/area-proxy/my-team" + "path": "pages/index/index" }], "subPackages": [{ "root": "pages/area-proxy/", @@ -17,6 +16,11 @@ }, { "path": "demand-detail" }] + }, { + "root": "pages/order-manage/", + "pages": [{ + "path": "order-manage" + }] }], "globalStyle": { "navigationStyle": "custom", diff --git a/pages/index/index-home.vue b/pages/index/index-home.vue index febfc03..3976e16 100644 --- a/pages/index/index-home.vue +++ b/pages/index/index-home.vue @@ -122,7 +122,7 @@ name: '查看详情', color: 'orange', cuIcon: 'text', - pageUrl: '' + pageUrl: '/pages/order-manage/order-manage' }, { id: 3, title: '叮咚学院', @@ -217,12 +217,12 @@ .nav-list>navigator:nth-child(even) { margin-left: 30rpx; - } - - .right-tag { - background-color: rgba(0, 0, 0, 0.3); - position: relative; - right: -30rpx; - border-radius: 40rpx 0 0 40rpx; + } + + .right-tag { + background-color: rgba(0, 0, 0, 0.3); + position: relative; + right: -30rpx; + border-radius: 40rpx 0 0 40rpx; } diff --git a/pages/order-manage/dispatch-order.vue b/pages/order-manage/dispatch-order.vue new file mode 100644 index 0000000..4deb5f7 --- /dev/null +++ b/pages/order-manage/dispatch-order.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/pages/order-manage/modal/time-arrange-fail.vue b/pages/order-manage/modal/time-arrange-fail.vue new file mode 100644 index 0000000..1df2e31 --- /dev/null +++ b/pages/order-manage/modal/time-arrange-fail.vue @@ -0,0 +1,138 @@ +