Commit 9893a974 authored by 和慭琛's avatar 和慭琛

预约功能 时间选择插件导入

parent bccd4da2
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
workOrderList:'', workOrderList:'',
//工单详情 //工单详情
workOrderDetail:'', workOrderDetail:'',
//预约 V2
orderReserve:'',
///wxh-worker-rest/rest/project/order/reserve/{token}
}, },
...@@ -57,7 +61,9 @@ ...@@ -57,7 +61,9 @@
} }
}) })
this.globalData.token = 'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502' //
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
this.globalData.token = 'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0'
this.initAPIneedToken() this.initAPIneedToken()
console.log('当前token',this.token) console.log('当前token',this.token)
...@@ -105,6 +111,10 @@ ...@@ -105,6 +111,10 @@
this.globalData.workOrderDetail = '/wxh-worker-rest/rest/order/revision/applets/' this.globalData.workOrderDetail = '/wxh-worker-rest/rest/order/revision/applets/'
+this.globalData.token+'/order/detail', +this.globalData.token+'/order/detail',
console.log('工单详情'+this.globalData.workOrderDetail) console.log('工单详情'+this.globalData.workOrderDetail)
//预约 V2
this.globalData.orderReserve = '/wxh-worker-rest/rest/project/order/reserve/'
+ this.globalData.token,
console.log('预约 V2'+this.globalData.orderReserve)
} }
......
/**
* 获取某年某月有多少天
*/
export const getOneMonthDays = (year,month)=>{
month = Number(month);
const baseMonthsDays = [31,28,31,30,31,30,31,31,30,31,30,31];
if(year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)){
if(month === 1){
baseMonthsDays[month] = 29;
}
}
return baseMonthsDays[month];
}
/**
* 获取日期的年月日时分秒
*/
export const getTimeArray = (date)=>{
const year = date.getFullYear();
const month = date.getMonth()+1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
return [year,month,day,hour,minute,second];
}
/**
* 小于10的数字前面补0
*/
export const addZero = (num)=>{
return num < 10 ? '0' + num : num;
}
/**
* 获取当前值在数组中的索引
*/
export const getIndexOfArray = (value,array)=>{
let index = array.findIndex(item => item == value);
return index > -1 ? index : 0;
}
\ No newline at end of file
This diff is collapsed.
<template> <template>
<view class=""> <view class="">
<view class="topView"> <view class="topView">
<view :class="activeTop == 0 ? 'topItemView activeColor' : 'topItemView' " @click="topClick(0)"> <view :class="activeTop == 0 ? 'topItemView activeColor' : 'topItemView' " @click="topClick(0)">
<text class="topItemText">抢单广场</text> <text class="topItemText">抢单广场</text>
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
</view> </view>
</view> </view>
<view class="listView"> <view class="listView">
<view class="itemView" @click="itemClick(item)" v-for="(item,ikey) in grabList":key="ikey" v-if="activeTop == 0"> <view class="itemView" v-if="activeTop == 0" @click="itemClick(item)" v-for="(item,ikey) in grabList":key="ikey">
<view class="nameView"> <view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text> <text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text>
<text class="u-font-24 u-m-r-24">{{item.type}}</text> <text class="u-font-24 u-m-r-24">{{item.type}}</text>
...@@ -23,24 +24,25 @@ ...@@ -23,24 +24,25 @@
<text class="u-font-24 u-m-r-24">{{item.status}}</text> <text class="u-font-24 u-m-r-24">{{item.status}}</text>
</view> </view>
</view> </view>
<view class="itemView" @click="itemClick(item)" v-for="(item,ikey) in unfinishList":key="ikey" v-if="activeTop == 1"> <view class="itemView" v-if="activeTop == 1" v-for="(item,ikey) in unfinishList":key="ikey">
<view class="nameView"> <view class="nameView" @click="itemClick(item)">
<text class="u-font-24 u-m-l-24">{{item.orderType}}</text> <text class="u-font-24 u-m-l-24">{{item.orderType}}</text>
<text class="u-font-24 u-m-r-24">{{item.date}}</text> <text class="u-font-24 u-m-r-24">{{item.date}}</text>
</view> </view>
<view class="nameView"> <view class="nameView" @click="itemClick(item)">
<text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text> <text class="u-font-24 u-m-l-24">{{item.name}} {{item.phone}}</text>
<text class="u-font-24 u-m-r-24">{{item.type}}</text> <text class="u-font-24 u-m-r-24">{{item.type}}</text>
</view> </view>
<text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text> <text class="u-font-24 u-m-l-24 u-m-r-24" @click="itemClick(item)">{{item.address}}</text>
<view class="nameView"> <view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.product}}</text> <text class="u-font-24 u-m-l-24">{{item.product}}</text>
<text class="u-font-24 underLine" v-if="item.bookDate.length==0" @click="bookClick(item)">(未预约)</text> <text class="u-font-24 underLine" v-if="item.bookDate.length==0" @click="onShowDatePicker('datetime',item)">(未预约)</text>
<text class="u-font-24" v-if="item.bookDate.length>0">(预约:{{item.bookDate}})</text> <text class="u-font-24" v-if="item.bookDate.length>0">(预约:{{item.bookDate}})</text>
<text class="u-font-24 u-m-r-24">{{item.status}}</text> <text class="u-font-24 u-m-r-24">{{item.status}}</text>
</view> </view>
<mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
</view> </view>
<view class="itemView" @click="itemClick(item)" v-for="(item,ikey) in finishList":key="ikey" v-if="activeTop == 2"> <view class="itemView" v-if="activeTop == 2" @click="itemClick(item)" v-for="(item,ikey) in finishList":key="ikey">
<view class="nameView"> <view class="nameView">
<text class="u-font-24 u-m-l-24">{{item.orderType}}</text> <text class="u-font-24 u-m-l-24">{{item.orderType}}</text>
<text class="u-font-24 u-m-r-24">{{item.date}}</text> <text class="u-font-24 u-m-r-24">{{item.date}}</text>
...@@ -56,25 +58,45 @@ ...@@ -56,25 +58,45 @@
</view> </view>
</view> </view>
</view> </view>
<!--timePicker
showType="date"
beginDate="1970-01-01" <!--
endDate="2030-12-31" <view class="bookView">
beginTime="06:00:00" <view>日期选择 - 示例</view>
endTime="23:59:59" {{date}}
@btnConfirm="btnConfirm" <button type="primary" @click="onShowDatePicker('date')">选择日期</button>
@btnCancel="btnCancel" {{time}}
> <button type="primary" @click="onShowDatePicker('time')">选择时间</button>
<text>时间选择器</text> {{datetime}}
</timePicker--> <button type="primary" @click="onShowDatePicker('datetime')">选择日期时间</button>
{{range[0]}} - {{range[1]}}
<button type="primary" @click="onShowDatePicker('range')">选择日期范围</button>
{{rangetime[0]}} - {{rangetime[1]}}
<button type="primary" @click="onShowDatePicker('rangetime')">选择日期时间范围</button>
</view>
<mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
-->
</view> </view>
</template> </template>
<script> <script>
import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
export default { export default {
components: {MxDatePicker},
data() { data() {
return { return {
activeTop:0, activeTop:0,
showPicker: false,
date: '2019/01/01',
time: '15:00:12',
datetime: '2020/12/05 15:00:12',
range: ['2019/01/01','2019/01/06'],
rangetime: ['2019/01/08 14:00','2019/01/16 13:59'],
type: '',
value: '',
grabList:[ grabList:[
{ {
name:'李先生', name:'李先生',
...@@ -139,6 +161,15 @@ ...@@ -139,6 +161,15 @@
} }
], ],
} }
}, },
onLoad() { onLoad() {
...@@ -250,6 +281,9 @@ ...@@ -250,6 +281,9 @@
bookClick: function (item) { bookClick: function (item) {
console.log(item.address) console.log(item.address)
this.type = 'datetime'
this.showPicker = true;
this.value = this['datetime'];
}, },
itemClick: function (item) { itemClick: function (item) {
...@@ -283,6 +317,79 @@ ...@@ -283,6 +317,79 @@
//时间选择器 选择
onShowDatePicker: function (type,item){//显示
console.log('当前工单地址:'+item.address)
this.type = type;
this.showPicker = true;
this.value = this[type];
},
//时间选择器 选择
onSelected: function (e) {//选择
this.showPicker = false;
if(e) {
this[this.type] = e.value;
this.bookPost(e.value)
//选择的值
console.log('value => '+ e.value);
//原始的Date对象
console.log('date => ' + e.date);
}
},
//预约请求
///wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/RTOKEN16ccb9588e63340a6993b3144423131e2c1e0694/order/11889179
//appointmentDatetime=2020-12-05 11:28&orderDelayReason=&orderTraceRemark=&accessoryApply=false
bookPost: function (dateTime) {
//dateTime.split("0,16");
//2020/12/25 15:00:12
dateTime = '2020/12/25 15:00'
console.log('预约请求')
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/'
+'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0'
+'/order/'+'10704466',
method: 'POST',
data: {
appointmentDatetime:dateTime,
orderDelayReason:'',
orderTraceRemark:'',
accessoryApply:false
},
header:{
'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
console.log('预约请求 成功')
console.log(res)
if(res.data.code==200){
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
console.log('预约请求 失败')
console.log(e)
}
})
}
} }
} }
</script> </script>
...@@ -337,4 +444,8 @@ ...@@ -337,4 +444,8 @@
text-decoration:underline; text-decoration:underline;
} }
.bookView{
}
</style> </style>
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
}, },
onLoad(e) { onLoad(e) {
this.orderId = '10704467' //
//10704467
this.orderId = '10704466'
}, },
methods: { methods: {
...@@ -186,7 +188,7 @@ ...@@ -186,7 +188,7 @@
url: 'http://192.168.1.22' url: 'http://192.168.1.22'
+'/wxh-sts-rest/rest/worker/'+ +'/wxh-sts-rest/rest/worker/'+
'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502' 'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502'
+'/order/'+this.orderId+'/accept', +'/order/'+this.orderId+'/receive',//%@/worker/%@/order/%@/receive
method: 'POST', method: 'POST',
data: { data: {
......
...@@ -138,7 +138,11 @@ var _default = ...@@ -138,7 +138,11 @@ var _default =
//工单列表 //工单列表
workOrderList: '', workOrderList: '',
//工单详情 //工单详情
workOrderDetail: '' }, workOrderDetail: '',
//预约 V2
orderReserve: ''
///wxh-worker-rest/rest/project/order/reserve/{token}
},
...@@ -160,7 +164,9 @@ var _default = ...@@ -160,7 +164,9 @@ var _default =
} }); } });
this.globalData.token = 'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502'; //
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
this.globalData.token = 'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0';
this.initAPIneedToken(); this.initAPIneedToken();
console.log('当前token', this.token); console.log('当前token', this.token);
...@@ -208,6 +214,10 @@ var _default = ...@@ -208,6 +214,10 @@ var _default =
this.globalData.workOrderDetail = '/wxh-worker-rest/rest/order/revision/applets/' + this.globalData.workOrderDetail = '/wxh-worker-rest/rest/order/revision/applets/' +
this.globalData.token + '/order/detail', this.globalData.token + '/order/detail',
console.log('工单详情' + this.globalData.workOrderDetail); console.log('工单详情' + this.globalData.workOrderDetail);
//预约 V2
this.globalData.orderReserve = '/wxh-worker-rest/rest/project/order/reserve/' +
this.globalData.token,
console.log('预约 V2' + this.globalData.orderReserve);
} }
......
...@@ -3444,6 +3444,16 @@ u-dropdown { ...@@ -3444,6 +3444,16 @@ u-dropdown {
......
...@@ -55,6 +55,11 @@ ...@@ -55,6 +55,11 @@
/******/ // The module cache /******/ // The module cache
/******/ var installedModules = {}; /******/ var installedModules = {};
/******/ /******/
/******/ // object to store loaded CSS chunks
/******/ var installedCssChunks = {
/******/ "common/runtime": 0
/******/ }
/******/
/******/ // object to store loaded and loading chunks /******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded /******/ // Promise = chunk loading, 0 = chunk loaded
...@@ -64,6 +69,11 @@ ...@@ -64,6 +69,11 @@
/******/ /******/
/******/ var deferredModules = []; /******/ var deferredModules = [];
/******/ /******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "" + chunkId + ".js"
/******/ }
/******/
/******/ // The require function /******/ // The require function
/******/ function __webpack_require__(moduleId) { /******/ function __webpack_require__(moduleId) {
/******/ /******/
...@@ -88,6 +98,108 @@ ...@@ -88,6 +98,108 @@
/******/ return module.exports; /******/ return module.exports;
/******/ } /******/ }
/******/ /******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // mini-css-extract-plugin CSS loading
/******/ var cssChunks = {"components/mx-datepicker/mx-datepicker":1};
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
/******/ var href = "" + ({"components/mx-datepicker/mx-datepicker":"components/mx-datepicker/mx-datepicker"}[chunkId]||chunkId) + ".wxss";
/******/ var fullhref = __webpack_require__.p + href;
/******/ var existingLinkTags = document.getElementsByTagName("link");
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
/******/ var tag = existingLinkTags[i];
/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
/******/ }
/******/ var existingStyleTags = document.getElementsByTagName("style");
/******/ for(var i = 0; i < existingStyleTags.length; i++) {
/******/ var tag = existingStyleTags[i];
/******/ var dataHref = tag.getAttribute("data-href");
/******/ if(dataHref === href || dataHref === fullhref) return resolve();
/******/ }
/******/ var linkTag = document.createElement("link");
/******/ linkTag.rel = "stylesheet";
/******/ linkTag.type = "text/css";
/******/ linkTag.onload = resolve;
/******/ linkTag.onerror = function(event) {
/******/ var request = event && event.target && event.target.src || fullhref;
/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
/******/ err.code = "CSS_CHUNK_LOAD_FAILED";
/******/ err.request = request;
/******/ delete installedCssChunks[chunkId]
/******/ linkTag.parentNode.removeChild(linkTag)
/******/ reject(err);
/******/ };
/******/ linkTag.href = fullhref;
/******/
/******/ var head = document.getElementsByTagName("head")[0];
/******/ head.appendChild(linkTag);
/******/ }).then(function() {
/******/ installedCssChunks[chunkId] = 0;
/******/ }));
/******/ }
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/ /******/
/******/ // expose the modules object (__webpack_modules__) /******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules; /******/ __webpack_require__.m = modules;
...@@ -141,6 +253,9 @@ ...@@ -141,6 +253,9 @@
/******/ // __webpack_public_path__ /******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/"; /******/ __webpack_require__.p = "/";
/******/ /******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || []; /******/ var jsonpArray = global["webpackJsonp"] = global["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray.push = webpackJsonpCallback;
......
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
<block wx:if="{{isShow}}"><view class="picker data-v-16c42f82"><block wx:if="{{type!='time'}}"><view class="picker-modal data-v-16c42f82"><view class="picker-modal-header data-v-16c42f82"><view class="picker-icon picker-icon-zuozuo data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-icon-active" data-event-opts="{{[['tap',[['onSetYear',['-1']]]]]}}" bindtap="__e"></view><view class="picker-icon picker-icon-zuo data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-icon-active" data-event-opts="{{[['tap',[['onSetMonth',['-1']]]]]}}" bindtap="__e"></view><text class="picker-modal-header-title data-v-16c42f82">{{title}}</text><view class="picker-icon picker-icon-you data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-icon-active" data-event-opts="{{[['tap',[['onSetMonth',['+1']]]]]}}" bindtap="__e"></view><view class="picker-icon picker-icon-youyou data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-icon-active" data-event-opts="{{[['tap',[['onSetYear',['+1']]]]]}}" bindtap="__e"></view></view><swiper class="picker-modal-body data-v-16c42f82" circular="{{true}}" duration="{{200}}" skip-hidden-item-layout="{{true}}" current="{{calendarIndex}}" data-event-opts="{{[['change',[['onSwiperChange',['$event']]]]]}}" bindchange="__e"><block wx:for="{{calendars}}" wx:for-item="calendar" wx:for-index="calendarIndex2" wx:key="calendarIndex2"><swiper-item class="picker-calendar data-v-16c42f82"><block wx:for="{{weeks}}" wx:for-item="week" wx:for-index="index"><view class="picker-calendar-view data-v-16c42f82"><view class="picker-calendar-view-item data-v-16c42f82">{{week}}</view></view></block><block wx:for="{{calendar}}" wx:for-item="date" wx:for-index="dateIndex" wx:key="dateIndex"><view data-event-opts="{{[['tap',[['onSelectDate',['$0'],[[['calendars','',calendarIndex2],['','',dateIndex]]]]]]]}}" class="picker-calendar-view data-v-16c42f82" bindtap="__e"><view hidden="{{!(date.bgStyle.type)}}" class="{{['data-v-16c42f82','picker-calendar-view-'+date.bgStyle.type]}}" style="{{'background:'+(date.bgStyle.background)+';'}}"></view><view class="picker-calendar-view-item data-v-16c42f82" style="{{'opacity:'+(date.statusStyle.opacity)+';'+('color:'+(date.statusStyle.color)+';')+('background:'+(date.statusStyle.background)+';')}}"><text class="data-v-16c42f82">{{date.title}}</text></view><view class="picker-calendar-view-dot data-v-16c42f82" style="{{'opacity:'+(date.dotStyle.opacity)+';'+('background:'+(date.dotStyle.background)+';')}}"></view><view hidden="{{!(date.tips)}}" class="picker-calendar-view-tips data-v-16c42f82">{{date.tips}}</view></view></block></swiper-item></block></swiper><view class="picker-modal-footer data-v-16c42f82"><view class="picker-modal-footer-info data-v-16c42f82"><block wx:if="{{isMultiSelect}}"><block class="data-v-16c42f82"><view class="picker-display data-v-16c42f82"><text class="data-v-16c42f82">{{beginText+"日期"}}</text><text class="picker-display-text data-v-16c42f82">{{BeginTitle}}</text><block wx:if="{{isContainTime}}"><view class="picker-display-link data-v-16c42f82" style="{{'color:'+(color)+';'}}" hover-stay-time="{{100}}" hover-class="picker-display-link-active" data-event-opts="{{[['tap',[['onShowTimePicker',['begin']]]]]}}" bindtap="__e">{{BeginTimeTitle}}</view></block></view><view class="picker-display data-v-16c42f82"><text class="data-v-16c42f82">{{endText+"日期"}}</text><text class="picker-display-text data-v-16c42f82">{{EndTitle}}</text><block wx:if="{{isContainTime}}"><view class="picker-display-link data-v-16c42f82" style="{{'color:'+(color)+';'}}" hover-stay-time="{{100}}" hover-class="picker-display-link-active" data-event-opts="{{[['tap',[['onShowTimePicker',['end']]]]]}}" bindtap="__e">{{EndTimeTitle}}</view></block></view></block></block><block wx:else><block class="data-v-16c42f82"><view class="picker-display data-v-16c42f82"><text class="data-v-16c42f82">当前选择</text><text class="picker-display-text data-v-16c42f82">{{BeginTitle}}</text><block wx:if="{{isContainTime}}"><view class="picker-display-link data-v-16c42f82" style="{{'color:'+(color)+';'}}" hover-stay-time="{{100}}" hover-class="picker-display-link-active" data-event-opts="{{[['tap',[['onShowTimePicker',['begin']]]]]}}" bindtap="__e">{{BeginTimeTitle}}</view></block></view></block></block></view><view class="picker-modal-footer-btn data-v-16c42f82"><view class="picker-btn data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-btn-active" data-event-opts="{{[['tap',[['onCancel',['$event']]]]]}}" bindtap="__e">取消</view><view class="picker-btn data-v-16c42f82" style="{{'color:'+(color)+';'}}" hover-stay-time="{{100}}" hover-class="picker-btn-active" data-event-opts="{{[['tap',[['onConfirm',['$event']]]]]}}" bindtap="__e">确定</view></view></view></view></block><block wx:if="{{showTimePicker}}"><view class="picker data-v-16c42f82"><view class="picker-modal picker-time data-v-16c42f82"><view class="picker-modal-header data-v-16c42f82"><text class="picker-modal-header-title data-v-16c42f82">选择日期</text></view><picker-view class="picker-modal-time data-v-16c42f82" indicator-class="picker-modal-time-item" value="{{timeValue}}" data-event-opts="{{[['change',[['onTimeChange',['$event']]]]]}}" bindchange="__e"><picker-view-column class="data-v-16c42f82"><block wx:for="{{24}}" wx:for-item="v" wx:for-index="i" wx:key="i"><view class="data-v-16c42f82">{{(i<10?'0'+i:i)+"时"}}</view></block></picker-view-column><picker-view-column class="data-v-16c42f82"><block wx:for="{{60}}" wx:for-item="v" wx:for-index="i" wx:key="i"><view class="data-v-16c42f82">{{(i<10?'0'+i:i)+"分"}}</view></block></picker-view-column><block wx:if="{{showSeconds}}"><picker-view-column class="data-v-16c42f82"><block wx:for="{{60}}" wx:for-item="v" wx:for-index="i" wx:key="i"><view class="data-v-16c42f82">{{(i<10?'0'+i:i)+"秒"}}</view></block></picker-view-column></block></picker-view><view class="picker-modal-footer data-v-16c42f82"><view class="picker-modal-footer-info data-v-16c42f82"><view class="picker-display data-v-16c42f82"><text class="data-v-16c42f82">当前选择</text><text class="picker-display-text data-v-16c42f82">{{PickerTimeTitle}}</text></view></view><view class="picker-modal-footer-btn data-v-16c42f82"><view class="picker-btn data-v-16c42f82" hover-stay-time="{{100}}" hover-class="picker-btn-active" data-event-opts="{{[['tap',[['onCancelTime',['$event']]]]]}}" bindtap="__e">取消</view><view class="picker-btn data-v-16c42f82" style="{{'color:'+(color)+';'}}" hover-stay-time="{{100}}" hover-class="picker-btn-active" data-event-opts="{{[['tap',[['onConfirmTime',['$event']]]]]}}" bindtap="__e">确定</view></view></view></view></view></block></view></block>
\ No newline at end of file
@charset "UTF-8";
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.picker.data-v-16c42f82 {
position: fixed;
z-index: 100;
background: rgba(255, 255, 255, 0);
left: 0;
top: 0;
width: 100%;
height: 100%;
font-size: 28rpx;
}
.picker-btn.data-v-16c42f82 {
padding: 10rpx 20rpx;
-webkit-border-radius: 12rpx;
border-radius: 12rpx;
color: #666;
}
.picker-btn-active.data-v-16c42f82 {
background: rgba(0, 0, 0, 0.1);
}
.picker-display.data-v-16c42f82 {
color: #666;
}
.picker-display-text.data-v-16c42f82 {
color: #000;
margin: 0 10rpx;
}
.picker-display-link.data-v-16c42f82 {
display: inline-block;
}
.picker-display-link-active.data-v-16c42f82 {
background: rgba(0, 0, 0, 0.1);
}
.picker-time.data-v-16c42f82 {
width: 550rpx !important;
left: 100rpx !important;
}
.picker-modal.data-v-16c42f82 {
background: #fff;
position: absolute;
top: 50%;
left: 60rpx;
width: 630rpx;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
-webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
-webkit-border-radius: 12rpx;
border-radius: 12rpx;
}
.picker-modal-header.data-v-16c42f82 {
text-align: center;
line-height: 80rpx;
font-size: 32rpx;
}
.picker-modal-header-title.data-v-16c42f82 {
display: inline-block;
width: 40%;
}
.picker-modal-header .picker-icon.data-v-16c42f82 {
display: inline-block;
line-height: 50rpx;
width: 50rpx;
height: 50rpx;
-webkit-border-radius: 50rpx;
border-radius: 50rpx;
text-align: center;
margin: 10rpx;
background: #fff;
font-size: 36rpx;
}
.picker-modal-header .picker-icon-active.data-v-16c42f82 {
background: rgba(0, 0, 0, 0.1);
}
.picker-modal-body.data-v-16c42f82 {
width: 630rpx !important;
height: 630rpx !important;
position: relative;
}
.picker-modal-time.data-v-16c42f82 {
width: 100%;
height: 180rpx;
text-align: center;
line-height: 60rpx;
}
.picker-modal-footer.data-v-16c42f82 {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
padding: 20rpx;
}
.picker-modal-footer-info.data-v-16c42f82 {
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1;
}
.picker-modal-footer-btn.data-v-16c42f82 {
-webkit-flex-shrink: 0;
flex-shrink: 0;
display: -webkit-box;
display: -webkit-flex;
display: flex;
}
.picker-calendar.data-v-16c42f82 {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.picker-calendar-view.data-v-16c42f82 {
position: relative;
width: 90rpx;
height: 90rpx;
text-align: center;
}
.picker-calendar-view-bgbegin.data-v-16c42f82, .picker-calendar-view-bg.data-v-16c42f82, .picker-calendar-view-bgend.data-v-16c42f82, .picker-calendar-view-item.data-v-16c42f82, .picker-calendar-view-dot.data-v-16c42f82, .picker-calendar-view-tips.data-v-16c42f82 {
position: absolute;
-webkit-transition: .2s;
transition: .2s;
}
.picker-calendar-view-bgbegin.data-v-16c42f82, .picker-calendar-view-bg.data-v-16c42f82, .picker-calendar-view-bgend.data-v-16c42f82 {
opacity: .15;
height: 80%;
}
.picker-calendar-view-bg.data-v-16c42f82 {
left: 0;
top: 10%;
width: 100%;
}
.picker-calendar-view-bgbegin.data-v-16c42f82 {
-webkit-border-radius: 90rpx 0 0 90rpx;
border-radius: 90rpx 0 0 90rpx;
top: 10%;
left: 10%;
width: 90%;
}
.picker-calendar-view-bgend.data-v-16c42f82 {
-webkit-border-radius: 0 90rpx 90rpx 0;
border-radius: 0 90rpx 90rpx 0;
top: 10%;
left: 0%;
width: 90%;
}
.picker-calendar-view-item.data-v-16c42f82 {
left: 5%;
top: 5%;
width: 90%;
height: 90%;
-webkit-border-radius: 90rpx;
border-radius: 90rpx;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.picker-calendar-view-dot.data-v-16c42f82 {
right: 10%;
top: 10%;
width: 12rpx;
height: 12rpx;
-webkit-border-radius: 12rpx;
border-radius: 12rpx;
}
.picker-calendar-view-tips.data-v-16c42f82 {
bottom: 100%;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
background: #4E4B46;
color: #fff;
-webkit-border-radius: 12rpx;
border-radius: 12rpx;
padding: 10rpx 20rpx;
font-size: 24rpx;
width: -webkit-max-content;
width: max-content;
margin-bottom: 5px;
pointer-events: none;
}
.picker-calendar-view-tips.data-v-16c42f82:after {
content: "";
position: absolute;
top: 100%;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #4E4B46 transparent transparent transparent;
}
@font-face {
font-family: "mxdatepickericon";
src: url("data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMYAAsAAAAACBgAAALMAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDIgqDRIJiATYCJAMUCwwABCAFhG0HSRvfBsg+QCa3noNAyAQ9w6GDvbwpNp2vloCyn8bD/x+y+/5qDhtj+T4eRVEcbsCoKMFASzCgLdDkmqYDwgxkWQ6YH5L/YnppOlLEjlnter43YRjU7M6vJ3iGADVAgJn5kqjv/wEii23T86UsAQT+04fV+o97VTMx4PPZt4DlorLXwIQiGMA5uhaVrBWqGHfQXcTEiE+PE+g2SUlxWlLVBHwUYFMgrgwSB3wstTKSGzqF1nOyiGeeOtNjV4An/vvxR58PSc3AzrMViyDvPo/7dVEUzn5GROfIWAcU4rLXfMFdhte56y4We9gGNEVIezkBOOaQXUrbTf/hJVkhGpDdCw7dSOEzByMEn3kIic98hMxnAfeFPKWCbjRcA148/HxhCEkaA94eGWFaGolsblpaWz8/Po2WVuNHh1fmBpZHIpqal9fOjizhTteY+RZ9rv02I/pq0W6QVH3pSncBz3m55r9ZIPycHfmenvxe4uyutIgfT5u4bgkDusl9gcF0rnfnz+b2NpSaQWBFeu8GIL1xQj5AH/6FAsEr/50F28e/gA9ny6KjLrxIp0TE+UucmQOl5AFNLXkzZufWamWHYEI39PEP2If97CMdm51N6DSmIekwAVmneXTBr0PVYx+aTgfQbU3p+R4jKHdRurBq0oEw6AKSfm+QDbpGF/w3VOP+oBnMHbqdx409FjP4RRHHkAj5IWgQiBUjHfMTuQ1Icpg5avI4sQVRu8EHdWptM1aKrIjuscfeL+kZwxBTYoElztOQ2UygjRIjEphaZsyWodHgvm9SC8QC/JygEA6DiCDeEMhAQFhhOpvxa/18A0TiYMahIy0L2hYIZWeYH9JR085Al4qts1re5St2/SR6DINBGEVYQCWOETHDMAHZ+pcZIQJGTV4RtMmg8UbhuWL1+VLLA2RFHYC71kiRo0SNpjwQh8pj2EFU3oTNmS1WqgIA") format("woff2");
}
.picker-icon.data-v-16c42f82 {
font-family: "mxdatepickericon" !important;
}
.picker-icon-you.data-v-16c42f82:before {
content: "\e63e";
}
.picker-icon-zuo.data-v-16c42f82:before {
content: "\e640";
}
.picker-icon-zuozuo.data-v-16c42f82:before {
content: "\e641";
}
.picker-icon-youyou.data-v-16c42f82:before {
content: "\e642";
}
{
"usingComponents": {},
"component": true
}
\ No newline at end of file
<view><picker mode="multiSelector" range="{{dates}}" value="{{value}}" disabled="{{disabled}}" data-event-opts="{{[['change',[['confirm',['$event']]]],['columnchange',[['scroll',['$event']]]],['cancel',[['cancel',['$event']]]]]}}" bindchange="__e" bindcolumnchange="__e" bindcancel="__e"><slot></slot></picker></view>
\ No newline at end of file
...@@ -130,83 +130,105 @@ __webpack_require__.r(__webpack_exports__); ...@@ -130,83 +130,105 @@ __webpack_require__.r(__webpack_exports__);
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var MxDatePicker = function MxDatePicker() {__webpack_require__.e(/*! require.ensure | components/mx-datepicker/mx-datepicker */ "components/mx-datepicker/mx-datepicker").then((function () {return resolve(__webpack_require__(/*! @/components/mx-datepicker/mx-datepicker.vue */ 58));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default =
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var _default =
{ {
components: { MxDatePicker: MxDatePicker },
data: function data() { data: function data() {
return { return {
activeTop: 0, activeTop: 0,
showPicker: false,
date: '2019/01/01',
time: '15:00:12',
datetime: '2020/12/05 15:00:12',
range: ['2019/01/01', '2019/01/06'],
rangetime: ['2019/01/08 14:00', '2019/01/16 13:59'],
type: '',
value: '',
grabList: [ grabList: [
{ {
name: '李先生', name: '李先生',
...@@ -272,6 +294,15 @@ var _default = ...@@ -272,6 +294,15 @@ var _default =
}, },
onLoad: function onLoad() { onLoad: function onLoad() {
...@@ -382,6 +413,9 @@ var _default = ...@@ -382,6 +413,9 @@ var _default =
bookClick: function bookClick(item) { bookClick: function bookClick(item) {
console.log(item.address); console.log(item.address);
this.type = 'datetime';
this.showPicker = true;
this.value = this['datetime'];
}, },
itemClick: function itemClick(item) { itemClick: function itemClick(item) {
...@@ -411,6 +445,77 @@ var _default = ...@@ -411,6 +445,77 @@ var _default =
} }
},
//时间选择器 选择
onShowDatePicker: function onShowDatePicker(type, item) {//显示
console.log('当前工单地址:' + item.address);
this.type = type;
this.showPicker = true;
this.value = this[type];
},
//时间选择器 选择
onSelected: function onSelected(e) {//选择
this.showPicker = false;
if (e) {
this[this.type] = e.value;
this.bookPost(e.value);
//选择的值
console.log('value => ' + e.value);
//原始的Date对象
console.log('date => ' + e.date);
}
},
//预约请求
///wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/RTOKEN16ccb9588e63340a6993b3144423131e2c1e0694/order/11889179
//appointmentDatetime=2020-12-05 11:28&orderDelayReason=&orderTraceRemark=&accessoryApply=false
bookPost: function bookPost(dateTime) {
//dateTime.split("0,16");
//2020/12/25 15:00:12
dateTime = '2020/12/25 15:00';
console.log('预约请求');
uni.request({
url: getApp().globalData.domain_Name +
'/wxh-worker-rest/rest/order/traceAndAppointment/traceOrder/' +
'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +
'/order/' + '10704466',
method: 'POST',
data: {
appointmentDatetime: dateTime,
orderDelayReason: '',
orderTraceRemark: '',
accessoryApply: false },
header: {
'Content-Type': 'application/x-www-form-urlencoded' },
success: function success(res) {
console.log('预约请求 成功');
console.log(res);
if (res.data.code == 200) {
} else {
uni.showToast({
title: res.errMsg });
}
},
fail: function fail(e) {
console.log('预约请求 失败');
console.log(e);
} });
} } };exports.default = _default; } } };exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"])) /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
......
{ {
"navigationBarTitleText": "接单", "navigationBarTitleText": "接单",
"usingComponents": {} "usingComponents": {
"mx-date-picker": "/components/mx-datepicker/mx-datepicker"
}
} }
\ No newline at end of file
<view><view class="topView"><view data-event-opts="{{[['tap',[['topClick',[0]]]]]}}" class="{{[activeTop==0?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">抢单广场</text></view><view data-event-opts="{{[['tap',[['topClick',[1]]]]]}}" class="{{[activeTop==1?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">全部未完工</text></view><view data-event-opts="{{[['tap',[['topClick',[2]]]]]}}" class="{{[activeTop==2?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">已完工单</text></view></view><view class="listView"><block wx:for="{{grabList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==0}}"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['grabList','',ikey]]]]]]]}}" class="itemView" bindtap="__e"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block><block wx:for="{{unfinishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==1}}"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="itemView" bindtap="__e"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><block wx:if="{{item.bookDate.length==0}}"><text data-event-opts="{{[['tap',[['bookClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="u-font-24 underLine" bindtap="__e">(未预约)</text></block><block wx:if="{{item.bookDate.length>0}}"><text class="u-font-24">{{"(预约:"+item.bookDate+")"}}</text></block><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block><block wx:for="{{finishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==2}}"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['finishList','',ikey]]]]]]]}}" class="itemView" bindtap="__e"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block></view></view> <view><view class="topView"><view data-event-opts="{{[['tap',[['topClick',[0]]]]]}}" class="{{[activeTop==0?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">抢单广场</text></view><view data-event-opts="{{[['tap',[['topClick',[1]]]]]}}" class="{{[activeTop==1?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">全部未完工</text></view><view data-event-opts="{{[['tap',[['topClick',[2]]]]]}}" class="{{[activeTop==2?'topItemView activeColor':'topItemView']}}" bindtap="__e"><text class="topItemText">已完工单</text></view></view><view class="listView"><block wx:for="{{grabList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==0}}"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['grabList','',ikey]]]]]]]}}" class="itemView" bindtap="__e"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block><block wx:for="{{unfinishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==1}}"><view class="itemView"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="nameView" bindtap="__e"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="nameView" bindtap="__e"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text data-event-opts="{{[['tap',[['itemClick',['$0'],[[['unfinishList','',ikey]]]]]]]}}" class="u-font-24 u-m-l-24 u-m-r-24" bindtap="__e">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><block wx:if="{{item.bookDate.length==0}}"><text data-event-opts="{{[['tap',[['onShowDatePicker',['datetime','$0'],[[['unfinishList','',ikey]]]]]]]}}" class="u-font-24 underLine" bindtap="__e">(未预约)</text></block><block wx:if="{{item.bookDate.length>0}}"><text class="u-font-24">{{"(预约:"+item.bookDate+")"}}</text></block><text class="u-font-24 u-m-r-24">{{item.status}}</text></view><mx-date-picker vue-id="{{'6cf9683a-1-'+ikey}}" show="{{showPicker}}" type="{{type}}" value="{{value}}" show-tips="{{true}}" begin-text="入住" end-text="离店" show-seconds="{{true}}" data-event-opts="{{[['^confirm',[['onSelected']]],['^cancel',[['onSelected']]]]}}" bind:confirm="__e" bind:cancel="__e" bind:__l="__l"></mx-date-picker></view></block></block><block wx:for="{{finishList}}" wx:for-item="item" wx:for-index="ikey" wx:key="ikey"><block wx:if="{{activeTop==2}}"><view data-event-opts="{{[['tap',[['itemClick',['$0'],[[['finishList','',ikey]]]]]]]}}" class="itemView" bindtap="__e"><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.orderType}}</text><text class="u-font-24 u-m-r-24">{{item.date}}</text></view><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.name+" "+item.phone}}</text><text class="u-font-24 u-m-r-24">{{item.type}}</text></view><text class="u-font-24 u-m-l-24 u-m-r-24">{{item.address}}</text><view class="nameView"><text class="u-font-24 u-m-l-24">{{item.product}}</text><text class="u-font-24 u-m-r-24">{{item.status}}</text></view></view></block></block></view></view>
\ No newline at end of file \ No newline at end of file
...@@ -70,5 +70,7 @@ ...@@ -70,5 +70,7 @@
.underLine{ .underLine{
text-decoration:underline; text-decoration:underline;
} }
.bookView{
}
...@@ -178,7 +178,9 @@ var _default = ...@@ -178,7 +178,9 @@ var _default =
}, },
onLoad: function onLoad(e) { onLoad: function onLoad(e) {
this.orderId = '10704467'; //
//10704467
this.orderId = '10704466';
}, },
methods: { methods: {
...@@ -318,7 +320,7 @@ var _default = ...@@ -318,7 +320,7 @@ var _default =
url: 'http://192.168.1.22' + url: 'http://192.168.1.22' +
'/wxh-sts-rest/rest/worker/' + '/wxh-sts-rest/rest/worker/' +
'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502' + 'RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502' +
'/order/' + this.orderId + '/accept', '/order/' + this.orderId + '/receive', //%@/worker/%@/order/%@/receive
method: 'POST', method: 'POST',
data: {}, data: {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment