(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/clerk/clerk"],{1543:function(e,t,n){"use strict";n.r(t);var r=n("7aad"),o=n.n(r);for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);t["default"]=o.a},"7aad":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("2f62");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){n.e("components/page-component/app-order-goods-info/app-order-goods-info").then(function(){return resolve(n("176f"))}.bind(null,n)).catch(n.oe)},u={components:{"app-order-goods-info":a},data:function(){return{id:null,orderDetail:{},clerk_remark:"",is_show:!1,msg:!1}},computed:i({},(0,r.mapState)({userInfo:function(e){return e.user.info}})),methods:{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(n){var r=this;n.confirm&&(e.showLoading({title:"加载中"}),t.$request({url:t.$api.order.clerk_affirm_pay,data:{id:t.id,action_type:1}}).then((function(n){e.hideLoading(),0===n.code?t.getOrderDetail():e.showToast({title:n.msg,icon:"none"}),r.msg=n.data.msg})).catch((function(){e.hideLoading()})))}})},orderClerk:function(){var t=this;e.showModal({content:"是否核销订单？",success:function(n){n.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(n){t.$hideLoading(),e.showToast({title:n.msg,icon:"none",duration:2e3,success:function(){0===n.code&&setTimeout((function(){e.redirectTo({url:"/plugins/clerk/order/order?status=1&type=1"})}),2e3)}})})).catch((function(){t.$hideLoading()})))}})},closeDialog:function(){if("核销成功"==this.msg)if(this.msg="",this.is_clerk){var t,n=getCurrentPages();n.forEach((function(e,r){"plugins/clerk/order/order"===n[r].route&&(t=r)})),t>-1?(n[t]._num=1,e.navigateBack({delta:n.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){var t=this;t.id=e.id;var n=setInterval((function(){t.userInfo&&(t.IsClerk(),clearInterval(n))}),500)}};t.default=u}).call(this,n("543d")["default"])},"93d4":function(e,t,n){"use strict";var r=n("c8f9"),o=n.n(r);o.a},a53c:function(e,t,n){"use strict";(function(e){n("8748");r(n("66fd"));var t=r(n("dcce"));function r(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},c8f9:function(e,t,n){},dcce:function(e,t,n){"use strict";n.r(t);var r=n("fb38"),o=n("1543");for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);n("93d4");var c,a=n("f0c5"),u=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,"7ee8f300",null,!1,r["a"],c);t["default"]=u.exports},fb38:function(e,t,n){"use strict";var r,o=function(){var e=this,t=e.$createElement;e._self._c},i=[];n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r}))}},[["a53c","common/runtime","common/vendor"]]]);