You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
xxdj1/unpackage/dist/build/h5/static/js/technician-pages-time-manag...

1 lines
7.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-time-manage"],{4265:function(t,e,i){"use strict";var n=i("b02e"),o=i.n(n);o.a},9558:function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.technician-time-manage .iconfont[data-v-612418d1]{font-size:%?80?%;line-height:%?34?%;position:relative;top:%?20?%}.technician-time-manage .item-time[data-v-612418d1]{display:flex;justify-content:space-between;padding:%?40?% %?30?%;border-radius:%?30?%;background-color:#fff}.timemanage[data-v-612418d1]{border-radius:%?30?%;margin:%?20?% %?24?%}',""]),t.exports=e},ac2e:function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("99af");var o=n(i("c7eb")),a=n(i("1da1")),r=n(i("5530")),s=i("26cb"),c=n(i("62d7")),u={components:{wPicker:c.default},data:function(){return{toDay:"",toDayTime:"",showKey:"",showTime:!1,form:{id:0,is_work:0,start_time:"",end_time:"",coach_status:0},is_next_day:!1}},computed:(0,s.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo}}),onLoad:function(){this.initIndex()},methods:(0,r.default)((0,r.default)({},(0,s.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=this;return(0,a.default)((0,o.default)().mark((function e(){var i,n,a;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.$jweixin.isWechat()){e.next=4;break}return e.next=3,t.$jweixin.initJssdk();case 3:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 4:return i=new Date(Math.ceil((new Date).getTime())),t.toDay=t.$util.formatTime(i,"YY-M-D"),t.toDayTime=t.$util.formatTime(i,"h:m"),e.next=9,t.$api.technician.coachInfo();case 9:for(a in n=e.sent,t.form)t.form[a]=n[a];t.$util.setNavigationBarColor({bg:t.primaryColor}),t.toCount();case 13:case"end":return e.stop()}}),e)})))()},toChangeItem:function(){3!=this.form.coach_status&&(this.form.is_work=1==this.form.is_work?0:1)},toShowTime:function(t){3!=this.form.coach_status&&(this.showKey=t,this.showTime=!0)},onConfirm:function(t){this.form[this.showKey]=t.result,this.toCount()},toCount:function(){var t=this.toDay,e=void 0===t?"":t,i=this.form,n=i.start_time,o=void 0===n?"":n,a=i.end_time,r=void 0===a?"":a;if(e&&o&&r){var s="".concat(e," ").concat(o),c="".concat(e," ").concat(r);this.is_next_day=this.$util.DateToUnix(s)>=this.$util.DateToUnix(c)}},submit:function(){var t=this;return(0,a.default)((0,o.default)().mark((function e(){var i,n,a;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=t.$util.deepCopy(t.form),i.start_time&&i.end_time){e.next=4;break}return t.$util.showToast({title:i.start_time?"请选择结束时间":"请选择开始时间"}),e.abrupt("return");case 4:if(n="".concat(t.toDay," ").concat(i.start_time),a="".concat(t.toDay," ").concat(i.end_time),!(t.$util.DateToUnix(n)>t.$util.DateToUnix(a)-1)){e.next=9;break}return t.$util.showToast({title:"结束时间不能小于或等于开始时间"}),e.abrupt("return");case 9:return delete i.coach_status,console.log(i),t.$util.showLoading(),e.next=14,t.$api.technician.coachUpdate(i);case 14:t.$util.hideAll(),t.$util.showToast({title:"保存成功"}),setTimeout((function(){t.$util.back(),t.$util.goUrl({url:1,openType:"navigateBack"})}),1e3);case 17:case"end":return e.stop()}}),e)})))()}})};e.default=u},b02e:function(t,e,i){var n=i("9558");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var o=i("4f06").default;o("1f0d3ad2",n,!0,{sourceMap:!1,shadowMode:!1})},c110:function(t,e,i){"use strict";i.r(e);var n=i("e80e"),o=i("e5fd");for(var a in o)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(a);i("4265");var r=i("f0c5"),s=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"612418d1",null,!1,n["a"],void 0);e["default"]=s.exports},e5fd:function(t,e,i){"use strict";i.r(e);var n=i("ac2e"),o=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=o.a},e80e:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}));var n={wPicker:i("62d7").default},o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"technician-time-manage"},[i("v-uni-view",{staticClass:"fill-base pd-lg flex-between timemanage"},[i("v-uni-view",{staticClass:"flex-1 flex-y-baseline f-title c-title"},[t._v("是否接单"),i("v-uni-view",{staticClass:"f-paragraph ml-sm",style:{color:1==t.form.is_work?t.primaryColor:"#999"}})],1),i("v-uni-view",{on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toChangeItem.apply(void 0,arguments)}}},[t._v(t._s(1==t.form.is_work?"接单":"休息")),i("i",{staticClass:"iconfont icon-switch c-caption ml-sm",class:[{"icon-switch-on":1==t.form.is_work}],style:{color:1==t.form.is_work?t.primaryColor:""}})])],1),i("v-uni-view",{staticClass:" mt-md b-1px-b"},[i("v-uni-view",{staticClass:"f-title c-title pd-lg"},[t._v("选择接单时间")])],1),i("v-uni-view",{staticClass:"f-paragraph c-desc pt-lg pb-lg timemanage"},[i("v-uni-view",{staticClass:"item-time",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTime("start_time")}}},[i("v-uni-view",[t._v("选择开始时间")]),i("v-uni-view",{style:{color:t.form.start_time?t.primaryColor:"#999"}},[t._v(t._s(t.form.start_time||"选择时间"))])],1),i("v-uni-view",{staticClass:"item-time b-1px-l",staticStyle:{"margin-top":"20rpx"},on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toShowTime("end_time")}}},[i("v-uni-view",[t._v("选择结束时间")]),i("v-uni-view",{style:{color:t.form.end_time?t.primaryColor:"#999"}},[t._v(t._s(t.is_next_day?"次日":"")+t._s(t.form.end_time||"选择时间"))])],1)],1),i("v-uni-view",{staticClass:"space-max-footer"}),i("w-picker",{ref:"time",attrs:{visible:t.showTime,mode:"time",value:t.toDayTime,current:!1,second:!1,themeColor:t.primaryColor},on:{"update:visible":function(e){arguments[0]=e=t.$handleEvent(e),t.showTime=e},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.onConfirm.apply(void 0,arguments)}}}),3!=t.form.coach_status?i("auth",{attrs:{needAuth:t.userInfo&&!t.userInfo.nickName,must:!0,type:"userInfo"},on:{go:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[i("fix-bottom-button",{attrs:{text:[{text:"保存",type:"confirm"}],bgColor:"#fff"}})],1):t._e()],1)},a=[]}}]);