(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/clerk/clerk"],{"198b":function(e,t,r){"use strict";(function(e){r("2d0a");n(r("66fd"));var t=n(r("1a426"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,r("543d")["createPage"])},"1a426":function(e,t,r){"use strict";r.r(t);var n=r("e23a"),o=r("b239");for(var i in o)"default"!==i&&function(e){r.d(t,e,(function(){return o[e]}))}(i);r("3cc4");var a,c=r("f0c5"),u=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"03759a1c",null,!1,n["a"],a);t["default"]=u.exports},"3cc4":function(e,t,r){"use strict";var n=r("6438"),o=r.n(n);o.a},6438:function(e,t,r){},8150:function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r("2f62");function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c=function(){r.e("components/page-component/app-order-goods-info/app-order-goods-info").then(function(){return resolve(r("a9f2"))}.bind(null,r)).catch(r.oe)},u=function(){r.e("components/basic-component/app-order/app-form-data").then(function(){return resolve(r("fbd6"))}.bind(null,r)).catch(r.oe)},s={components:{"app-order-goods-info":c,appFormData:u},data:function(){return{haveForm:!0,id:null,orderDetail:{},clerk_remark:"",is_show:!1,msg:!1,remarkClerk:!1}},computed:i({},(0,n.mapState)({userInfo:function(e){return e.user.info},clerkImg:function(e){return e.mallConfig.__wxapp_img.clerk}})),methods:{showForm:function(e){this.haveForm=!(!e||!e.length)},toIndex:function(){e.redirectTo({url:"/pages/index/index"})},getOrderDetail:function(){var e=this;this.$request({url:this.$api.order.detail,data:{id:this.id,action_type:1}}).then((function(t){e.$hideLoading(),e.is_show=!0,0===t.code&&(e.orderDetail=t.data.detail)})).catch((function(){e.$hideLoading()}))},IsClerk:function(){var e=this;this.$showLoading(),this.$request({url:this.$api.user.is_clerk,data:{clerk_id:this.userInfo.options.user_id}}).then((function(t){0===t.code&&(1==t.data.is_clerk_user?e.getOrderDetail():(e.$hideLoading(),e.msg=!0))})).catch((function(){e.$hideLoading()}))},clerkAffirmPay:function(){var t=this;e.showModal({title:"提示",content:"确认已进行线下收款?",success:function(r){var n=this;r.confirm&&(e.showLoading({title:"加载中"}),t.$request({url:t.$api.order.clerk_affirm_pay,data:{id:t.id,action_type:1}}).then((function(r){e.hideLoading(),0===r.code?t.getOrderDetail():e.showToast({title:r.msg,icon:"none"}),n.msg=r.data.msg})).catch((function(){e.hideLoading()})))}})},orderClerk:function(){var t=this;t.remarkClerk&&(t.remarkClerk=!1),e.showModal({content:"是否核销订单？",success:function(r){r.confirm&&(t.$showLoading(),t.$request({url:t.$api.order.order_clerk,data:{id:t.id,action_type:1,clerk_remark:t.clerk_remark}}).then((function(r){t.$hideLoading(),e.showToast({title:r.msg,icon:"none",duration:2e3,success:function(){0===r.code&&setTimeout((function(){e.redirectTo({url:"/plugins/clerk/order/order?status=1&type=1"})}),2e3)}})})).catch((function(){t.$hideLoading()})))}})},orderClerkRemark:function(){this.remarkClerk=!0},closeDialog:function(){if("核销成功"==this.msg)if(this.msg="",this.is_clerk){var t,r=getCurrentPages();r.forEach((function(e,n){"plugins/clerk/order/order"===r[n].route&&(t=n)})),t>-1?(r[t]._num=1,e.navigateBack({delta:r.length-1-t})):e.redirectTo({url:"/plugins/clerk/order/order?status=1&type=1"})}else e.redirectTo({url:"/pages/index/index"});else this.msg=""}},onLoad:function(e){this.$commonLoad.onload(e);var t=this;t.id=e.id;var r=setInterval((function(){t.userInfo&&(t.IsClerk(),clearInterval(r))}),500)}};t.default=s}).call(this,r("543d")["default"])},b239:function(e,t,r){"use strict";r.r(t);var n=r("8150"),o=r.n(n);for(var i in n)"default"!==i&&function(e){r.d(t,e,(function(){return n[e]}))}(i);t["default"]=o.a},e23a:function(e,t,r){"use strict";var n;r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.remarkClerk=!1})},i=[]}},[["198b","common/runtime","common/vendor"]]]);