2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-goods/index"],{265:function(t,e,n){"use strict";(function(t,e){var a=n(4);n(26);a(n(25));var o=a(n(266));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n(1)["default"],n(2)["createPage"])},266:function(t,e,n){"use strict";n.r(e);var a=n(267),o=n(269);for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n(271);var i,s=n(33),u=Object(s["default"])(o["default"],a["render"],a["staticRenderFns"],!1,null,"c0c42e9e",null,!1,a["components"],i);u.options.__file="pages/order-goods/index.vue",e["default"]=u.exports},267:function(t,e,n){"use strict";n.r(e);var a=n(268);n.d(e,"render",(function(){return a["render"]})),n.d(e,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(e,"components",(function(){return a["components"]}))},268:function(t,e,n){"use strict";var a;n.r(e),n.d(e,"render",(function(){return o})),n.d(e,"staticRenderFns",(function(){return i})),n.d(e,"recyclableRender",(function(){return r})),n.d(e,"components",(function(){return a}));try{a={titleBlock:function(){return n.e("components/title-block/title-block").then(n.bind(null,422))},uActionSheet:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-action-sheet/u-action-sheet")]).then(n.bind(null,462))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,470))},uniPopupDialog:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog")]).then(n.bind(null,477))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.statusValue.map((function(t){return{name:t.label,value:t.value}}))),a=t.statusValue.find((function(e){return e.value===t.artworkStatus})),o=t.__map(t.mainList,(function(e,n){var a=t.__get_orig(e),o=[1].includes(e.artworkStatus),r=o?null:e.startAt.replaceAll("-",".")||"",i=o?null:e.endAt.replaceAll("-",".")||"",s=4!==e.artworkStatus?t.statusValue.find((function(t){return t.value===e.artworkStatus})):null,u=[1,5].includes(e.artworkStatus);return{$orig:a,g2:o,g3:r,g4:i,g5:s,g6:u}}));t._isMounted||(t.e0=function(e){t.show=!1},t.e1=function(e){var n=[],a=arguments.length-1;while(a-- >0)n[a]=arguments[a+1];var o=n[n.length-1].currentTarget.dataset,r=o.eventParams||o["event-params"];e=r.index;t.touchEnd(e)}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:a,l0:o}})},r=!1,i=[];o._withStripped=!0},269:function(t,e,n){"use strict";n.r(e);var a=n(270),o=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=o.a},270:function(t,e,n){"use strict";(function(t){var a=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=a(n(63)),r=a(n(5)),i=a(n(11)),s=a(n(65)),u=n(262);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,i.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=function(){Promise.all([n.e("common/vendor"),n.e("components/uiq-tabbar/uiq-tabbar")]).then(function(){return resolve(n(455))}.bind(null,n)).catch(n.oe)},f=function(){Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u--image/u--image")]).then(function(){return resolve(n(489))}.bind(null,n)).catch(n.oe)},p={name:"index",data:function(){return{messageText:"",show_1:!1,show:!1,mobileKey:"",startX:0,windowWidth:0,page:1,elementBottom:"",item:null,artworkStatus:0,pageSize:999,mainList:[],statusValue:[{label:"全部状态",value:0},{label:"待入库",value:1},{label:"已入库",value:2},{label:"即将到期",value:3},{label:"延期未补款",value:4},{label:"延期已补款",value:7},{label:"已取出",value:5}],status:0}},components:{UImage:f,tabbar:d},mounted:function(){var e=this;t.getSystemInfo({success:function(t){e.windowWidth=t.windowWidth}}),this.getDistanceFromTopToPageBottom(".content3")},onShow:function(){this.getData()},computed:{},methods:{pickUp:function(e){var n=this;return(0,s.default)(o.default.mark((function a(){var r,i,s;return o.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r="",r=e.isUserApplyPickUp?"/api/warehouse/apply/pickup/cancel":"/api/warehouse/apply/pickup",i={ID:e.ID},a.next=5,(0,u.postDataByParams)(r,i);case 5:s=a.sent,200===s.code?t.showToast({title:"请求成功",icon:"none"}):t.showToast({title:s.msg,icon:"none"}),n.getData();case 8:case"end":return a.stop()}}),a)})))()},popForward:function(){"确认补款吗"===this.messageText?this.supplementaryPayment():"确认删除吗"===this.messageText&&this.deleteClick()},openShow2:function(t){this.item=t,this.messageText="确认补款吗",this.$refs.alertDialog.open()},getOpenId:function(){var e=this;return(0,s.default)(o.default.mark((function n(){return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:t.login({provider:"weixin",success:function(){var t=(0,s.default)(o.default.mark((function t(n){var a,r;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=n.code,t.next=3,e.$api.login.getOpenId({code:a});case 3:r=t.sent,e.status=r.data.status,0!==r.data.status&&e.$common.msgToast(r.msg);case 6:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}()});case 1:case"end":return n.stop()}}),n)})))()},supplementaryPayment:function(){var e=this;return(0,s.default)(o.default.mark((function n(){var a,r;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return a={ID:e.item.ID},n.next=3,(0,u.postDataByParams)("/api/warehouse/supply/paid",a);case 3:return r=n.sent,n.next=6,e.getOpenId();case 6:200===r.code&&0===e.status?t.requestPayment(l(l({},r.data),{},{fail:function(t){},success:function(){e.getData(),t.showToast({title:"补款成功",icon:"none"})}})):t.showToast({title:r.msg,icon:"none"});case 7:case"end":return n.stop()}}),n)})))()},getDistanceFromTopToPageBottom:function(e){var n=this;return(0,s.default)(o.default.mark((function a(){var i,s,u,c,l,d;return o.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.getSystemInfo();case 2:return i=a.sent,s=i.windowHeight,u=i.windowWidth,a.next=7,new Promise((function(n){return t.createSelectorQuery().select(e).boundingClientRect().exec(n)}));case 7:c=a.sent,l=(0,r.default)(c,1),d=l[0].top,n.elementBottom=(s-d)/u*750-175;case 11:case"end":return a.stop()}}),a)})))()},openDelete:function(t){this.messageText="确认删除吗",this.$refs.alertDialog.open(),this.item=t},deleteClick:function(){var e=this;return(0,s.default)(o.default.mark((function n(){var a,r;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.show_1=!1,a={ID:e.item.ID},n.next=4,(0,u.postDataByParams)("/api/warehouse/remove",a);case 4:r=n.sent,200===r.code?(e.getData(),t.showToast({title:"删除成功",icon:"none"})):t.showToast({title:r.msg,icon:"none"});case 6:case"end":return n.stop()}}),n)})))()},goRouter:function(e){t.navigateTo({url:"/pages/order-goods/order-details?ID=".concat(e.ID)})},search:function(){this.getData()},statusSelect:function(t){this.artworkStatus=t.value,this.getData()},openStatus:function(){this.show=!0},loadMore:function(){console.log("loadMore")},getData:function(){var e=this;return(0,s.default)(o.default.mark((function n(){var a,r,i;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return a={page:e.page,pageSize:e.pageSize,status:e.artworkStatus,mobileKey:e.mobileKey},n.next=3,(0,u.postDataByParams)("/api/warehouse/list",a);case 3:r=n.sent,200===r.code?(e.mainList=r.data.data,null===(i=e.mainList)||void 0===i||i.forEach((function(t){e.$set(t,"distanceX",0),e.$set(t,"isRight",!1)}))):t.showToast({title:r.msg,icon:"none"});case 5:case"end":return n.stop()}}),n)})))()},touchMove:function(t,e){5===this.mainList[e].artworkStatus&&(this.mainList[e].distanceX=t.touches[0].clientX-this.startX)},touchStart:function(t,e){5===this.mainList[e].artworkStatus&&(this.mainList[e].isRight=!0,this.startX=t.touches[0].clientX)},touchEnd:function(t){5===this.mainList[t].artworkStatus&&(this.mainList[t].distanceX<-.192*this.windowWidth?this.mainList[t].distanceX=-.192*this.windowWidth:(this.mainList[t].isRight=!1,this.mainList[t].distanceX=0))}}};e.default=p}).call(this,n(2)["default"])},271:function(t,e,n){"use strict";n.r(e);var a=n(272),o=n.n(a);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=o.a},272:function(t,e,n){}},[[265,"common/runtime","common/vendor"]]]);
|
||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order-goods/index.js.map
|