You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
8.1 KiB
JavaScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-goods/index"],{265:function(t,e,n){"use strict";(function(t,e){var o=n(4);n(26);o(n(25));var a=o(n(266));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n(1)["default"],n(2)["createPage"])},266:function(t,e,n){"use strict";n.r(e);var o=n(267),a=n(269);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n(271);var r,s=n(33),u=Object(s["default"])(a["default"],o["render"],o["staticRenderFns"],!1,null,"c0c42e9e",null,!1,o["components"],r);u.options.__file="pages/order-goods/index.vue",e["default"]=u.exports},267:function(t,e,n){"use strict";n.r(e);var o=n(268);n.d(e,"render",(function(){return o["render"]})),n.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(e,"components",(function(){return o["components"]}))},268:function(t,e,n){"use strict";var o;n.r(e),n.d(e,"render",(function(){return a})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return i})),n.d(e,"components",(function(){return o}));try{o={titleBlock:function(){return n.e("components/title-block/title-block").then(n.bind(null,386))},uActionSheet:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-action-sheet/u-action-sheet")]).then(n.bind(null,426))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,434))},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,441))}}}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 a=function(){var t=this,e=t.$createElement,n=(t._self._c,t.statusValue.map((function(t){return{name:t.label,value:t.value}}))),o=t.statusValue.find((function(e){return e.value===t.artworkStatus})),a=t.__map(t.mainList,(function(e,n){var o=t.__get_orig(e),a=[1].includes(e.artworkStatus),i=a?null:e.startAt.replaceAll("-",".")||"",r=a?null:e.endAt.replaceAll("-",".")||"",s=4!==e.artworkStatus?t.statusValue.find((function(t){return t.value===e.artworkStatus})):null;return{$orig:o,g2:a,g3:i,g4:r,g5:s}}));t._isMounted||(t.e0=function(e){t.show=!1},t.e1=function(e){var n=[],o=arguments.length-1;while(o-- >0)n[o]=arguments[o+1];var a=n[n.length-1].currentTarget.dataset,i=a.eventParams||a["event-params"];e=i.index;t.touchEnd(e)}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:o,l0:a}})},i=!1,r=[];a._withStripped=!0},269:function(t,e,n){"use strict";n.r(e);var o=n(270),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},270:function(t,e,n){"use strict";(function(t){var o=n(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=o(n(63)),i=o(n(5)),r=o(n(11)),s=o(n(65)),u=n(262);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}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,r.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(419))}.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(453))}.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}]}},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:{popForward:function(){"确认补款吗"===this.messageText?this.supplementaryPayment():"确认删除吗"===this.messageText&&this.deleteClick()},openShow2:function(t){this.item=t,this.messageText="确认补款吗",this.$refs.alertDialog.open()},supplementaryPayment:function(){var e=this;return(0,s.default)(a.default.mark((function n(){var o,i;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o={ID:e.item.ID},n.next=3,(0,u.postDataByParams)("/api/warehouse/supply/paid",o);case 3:i=n.sent,200===i.code?t.requestPayment(l(l({},i.data),{},{fail:function(t){},success:function(){e.getData(),t.showToast({title:"补款成功",icon:"none"})}})):t.showToast({title:i.msg,icon:"none"});case 5:case"end":return n.stop()}}),n)})))()},getDistanceFromTopToPageBottom:function(e){var n=this;return(0,s.default)(a.default.mark((function o(){var r,s,u,c,l,d;return a.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return o.next=2,t.getSystemInfo();case 2:return r=o.sent,s=r.windowHeight,u=r.windowWidth,o.next=7,new Promise((function(n){return t.createSelectorQuery().select(e).boundingClientRect().exec(n)}));case 7:c=o.sent,l=(0,i.default)(c,1),d=l[0].top,n.elementBottom=(s-d)/u*750-175;case 11:case"end":return o.stop()}}),o)})))()},openDelete:function(t){this.messageText="确认删除吗",this.$refs.alertDialog.open(),this.item=t},deleteClick:function(){var e=this;return(0,s.default)(a.default.mark((function n(){var o,i;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e.show_1=!1,o={ID:e.item.ID},n.next=4,(0,u.postDataByParams)("/api/warehouse/remove",o);case 4:i=n.sent,200===i.code?(e.getData(),t.showToast({title:"删除成功",icon:"none"})):t.showToast({title:i.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)(a.default.mark((function n(){var o,i,r;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o={page:e.page,pageSize:e.pageSize,status:e.artworkStatus,mobileKey:e.mobileKey},n.next=3,(0,u.postDataByParams)("/api/warehouse/list",o);case 3:i=n.sent,200===i.code?(e.mainList=i.data.data,null===(r=e.mainList)||void 0===r||r.forEach((function(t){e.$set(t,"distanceX",0),e.$set(t,"isRight",!1)}))):t.showToast({title:i.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 o=n(272),a=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a},272:function(t,e,n){}},[[265,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order-goods/index.js.map