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.
1 lines
13 KiB
1 lines
13 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-admin-scan-index"],{"27a7":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n("ade3")),r=i(n("c7eb")),o=i(n("1da1"));n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d"),n("9861"),n("14d9"),n("a434"),n("d81d");var d=i(n("2243")),c=n("f26a"),s=(n("316e"),i(n("2e02"))),u={components:{easyLoadimage:d.default},data:function(){return{uploading:!0,domain:c.HTTP_REQUEST_URL,imgList:[],fileList:[],token:"",images:[],mer_id:0,allSize:0,limit:20}},onLoad:function(e){this.token=e.token,this.mer_id=e.mer_id||0},onShow:function(){},methods:{add:function(){var e=this;uni.chooseImage({count:100,sizeType:["compressed"],sourceType:["album","camera"],success:function(t){for(var n=function(n){uni.getImageInfo({src:t.tempFilePaths[n],success:function(i){var a=i.width,r=i.height,o=a/r;a>400&&(a=400,r=Math.floor(a/o));var d=document.createElement("img");d.src=t.tempFilePaths[n];var c=document.createElement("canvas"),s=c.getContext("2d");c.width=a,c.height=r,s.drawImage(d,0,0,a,r),c.toBlob((function(i){new File([i],t.tempFiles[n].name,{type:i.type});var a=window.URL.createObjectURL(i);e.images.push({img:a,name:t.tempFiles[n].name});var r=i.size,o=r/1024/1024;e.imgList.length<20&&(e.imgList.push({src:a,size:o}),e.allSize+=o)}),"image/jpeg",.8)},fail:function(e){}})},i=0;i<t.tempFiles.length;i++)n(i)}})},submitUpload:function(){var e=this;return(0,o.default)((0,r.default)().mark((function t(){var n,i;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:n=e,i=0;case 2:if(!(i<n.images.length)){t.next=9;break}return t.next=5,n.uploadImages(n.images[i]);case 5:i==n.imgList.length-1&&(n.uploading=!1,n.loading=!1);case 6:i++,t.next=2;break;case 9:case"end":return t.stop()}}),t)})))()},uploadImages:function(e){var t=this;return new Promise(function(){var n=(0,o.default)((0,r.default)().mark((function n(i){return(0,r.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:uni.showLoading({title:"上传中..."}),uni.uploadFile({url:c.HTTP_REQUEST_URL+"/api/scan_upload/image/field/"+t.token,filePath:e.img,name:"field",formData:{name:e.name,mer_id:t.mer_id},header:(0,a.default)({},c.TOKENNAME,"Bearer "+s.default.state.app.token),success:function(e){if(uni.hideLoading(),403==e.statusCode)t.$util.Tips({title:e.message});else{var n=e.data?JSON.parse(e.data):{};200==n.status?i(n):t.$util.Tips({title:e.message})}},fail:function(e){uni.hideLoading(),t.$util.Tips({title:e})}});case 2:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())},DelPic:function(e){this.imgList.splice(e,1),this.images.splice(e,1),this.getImageSize()},getImageSize:function(){var e=0;this.imgList.length?(this.imgList.map((function(t){e+=t.size})),this.allSize=e):this.allSize=0},again:function(){this.uploading=!0,this.imgList=[],this.images=[],this.allSize=0}},onHide:function(){}};t.default=u},"28ed":function(e,t,n){"use strict";var i=n("3d69"),a=n.n(i);a.a},"316e":function(e,t,n){"use strict";n("7a82");var i=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.computeRefundPrice=function(e,t){return a.default.post("server/".concat(e,"/refund/compute"),t,{login:!0})},t.confirmRefundApi=function(e,t){return a.default.post("server/".concat(e,"/refund/create"),t,{login:!0})},t.getAdminOrderDelivery=function(e){return a.default.get("admin/order/delivery/gain/"+e,{},{login:!0})},t.getAdminOrderDetail=function(e,t){return a.default.get("admin/"+e+"/order/"+t,{},{login:!0})},t.getAdminOrderList=function(e){return a.default.get("admin/order/list",e,{login:!0})},t.getDeliveryStoreLst=function(e){return a.default.get("admin/".concat(e,"/delivery_options"))},t.getLogistics=function(){return a.default.get("logistics",{},{login:!1})},t.getOrderList=function(e,t){return a.default.get("admin/".concat(t,"/order_list"),e,{login:!0})},t.getRefundOrderApi=function(e,t){return a.default.get("server/".concat(e,"/refund/check/").concat(t),{},{login:!0})},t.getRefundOrderDetail=function(e,t){return a.default.get("server/".concat(e,"/refund/detail/").concat(t),{},{login:!0})},t.getRefundOrderInfo=function(e,t){return a.default.get("server/".concat(e,"/refund/get/").concat(t))},t.getRefundOrderList=function(e,t){return a.default.get("server/".concat(t,"/refund/lst"),e,{login:!0})},t.getStatisticsInfo=function(){return a.default.get("admin/order/statistics",{},{login:!0})},t.getStatisticsMonth=function(e){return a.default.get("admin/order/data",e,{login:!0})},t.getStatisticsTime=function(e){return a.default.get("admin/order/time",e,{login:!0})},t.getTempAndDelivery=function(e){return a.default.get("admin/".concat(e,"/delivery_config"))},t.orderCancellation=function(e,t){return a.default.post("admin/".concat(e,"/verify/").concat(t))},t.orderDeliveryInfo=function(e){return a.default.get("admin/".concat(e,"/mer_form"))},t.orderExportTemp=function(e){return a.default.get("store/expr/temps",e)},t.orderNumberStatistics=function(e,t){return a.default.get("admin/".concat(t,"/pay_number"),e,{login:!0})},t.orderPrice=function(e,t){return a.default.get("admin/"+t+"/order_price",e,{login:!0})},t.orderStatistics=function(e){return a.default.get("admin/"+e+"/statistics")},t.orderVerific=function(e,t,n){return a.default.post("verifier/".concat(e,"/").concat(t),n)},t.refundOrderReceive=function(e,t){return a.default.post("server/".concat(e,"/refund/confirm/").concat(t),{},{login:!0})},t.refundOrderSubmit=function(e,t,n){return a.default.post("server/".concat(e,"/refund/status/").concat(t),n,{login:!0})},t.scanUpload=function(e,t,n){return a.default.post("scan_upload/image/".concat(e,"/").concat(t),n,{login:!0})},t.setAdminOrderDelivery=function(e,t,n){return a.default.post("admin/"+e+"/delivery/"+t,n,{login:!0})},t.setAdminOrderPrice=function(e,t,n){return a.default.post("admin/"+e+"/price/"+t,n,{login:!0})},t.setAdminOrderRemark=function(e,t,n){return a.default.post("admin/"+e+"/mark/"+t,n,{login:!0})},t.setOfflinePay=function(e,t){return a.default.post("admin/"+e+"/order/offline",t,{login:!0})},t.setOrderRefund=function(e,t){return a.default.post("admin/"+e+"/order/refund",t,{login:!0})},t.setRefundMark=function(e,t,n){return a.default.post("server/".concat(e,"/refund/mark/").concat(t),n,{login:!0})},t.turnoverStatistics=function(e,t){return a.default.get("admin/".concat(t,"/pay_price"),e,{login:!0})},t.verifierOrder=function(e,t){return a.default.get("verifier/"+e+"/order/"+t)},n("99af");var a=i(n("3314"))},"366f":function(e,t,n){"use strict";n.r(t);var i=n("27a7"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},"3d69":function(e,t,n){var i=n("4ba3");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);var a=n("4f06").default;a("4c4dbe1a",i,!0,{sourceMap:!1,shadowMode:!1})},"4ba3":function(e,t,n){var i=n("24fb");t=i(!1),t.push([e.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-page-body[data-v-60e8eddc]{background:#fff}body.?%PAGE?%[data-v-60e8eddc]{background:#fff}.main[data-v-60e8eddc]{width:100%}.main .image-list[data-v-60e8eddc]{padding:%?20?%;overflow:scroll;height:calc(100vh - %?90?%)}.main .add[data-v-60e8eddc]{height:%?300?%;background:#f9f9f9;border:1px dashed #ebeef5;border-radius:%?12?%;color:#bbb}.main .add .icon-a-guanzhu[data-v-60e8eddc]{font-size:%?46?%;font-weight:700}.main .add .text[data-v-60e8eddc]{font-size:%?26?%;color:#999;margin-top:%?32?%}.main[data-v-60e8eddc] .input_photo .easy-loadimage, .main[data-v-60e8eddc] .input_photo uni-image, .main[data-v-60e8eddc] .input_photo uni-image{width:%?230?%;height:%?230?%;border-radius:%?12?%!important}.main .pictrue[data-v-60e8eddc]{width:%?220?%;height:%?220?%;border-radius:%?12?%!important;margin:0 %?15?% %?10?% 0;position:relative;overflow:hidden}.main .pictrue[data-v-60e8eddc]:nth-child(3n){margin-right:0}.main .pictrue .close_btn[data-v-60e8eddc]{width:%?30?%;height:%?30?%;background:rgba(0,0,0,.6);border-radius:0 %?12?% 0 %?12?%;position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;z-index:10}.main .pictrue .close_btn .iconfont[data-v-60e8eddc]{color:#fff;font-size:%?12?%}.footer[data-v-60e8eddc]{padding:0 %?20?% 0 %?30?%;position:fixed;bottom:0;width:100%;box-sizing:border-box;background-color:hsla(0,0%,100%,.85);-webkit-backdrop-filter:blur(%?20?%);backdrop-filter:blur(%?20?%);z-index:277;border-top:%?2?% solid #f0f0f0;height:%?80?%;height:calc(80rpx+ constant(safe-area-inset-bottom));height:calc(%?80?% + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;color:#666;font-size:%?24?%}.footer .btn[data-v-60e8eddc]{border:%?2?% solid #ccc;width:%?170?%;height:%?60?%;border-radius:%?30?%;color:#000;font-size:%?26?%;font-family:PingFang SC-Regular,PingFang SC;font-weight:400;color:#666;display:flex;align-items:center;justify-content:center}.footer .upload[data-v-60e8eddc]{background-color:#e93323;color:#fff;margin-left:%?20?%}.footer .upload.no-pic[data-v-60e8eddc]{background:#e93323;opacity:.3}.upload-success[data-v-60e8eddc]{display:flex;align-items:center;justify-content:center;flex-direction:column;height:80vh}.upload-success .success[data-v-60e8eddc]{width:%?100?%;height:%?100?%;background:#4bbc12;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-bottom:%?40?%}.upload-success .success .image[data-v-60e8eddc]{width:60%}.upload-success .text[data-v-60e8eddc]{font-size:%?32?%;font-family:PingFang SC-Medium,PingFang SC;font-weight:500;color:#282828;margin-bottom:%?80?%}.upload-success .again[data-v-60e8eddc]{width:%?300?%;height:%?86?%;border-radius:%?42?%;text-align:center;line-height:%?86?%;font-size:%?30?%;font-weight:400;color:#333;border:%?2?% solid #ccc}',""]),e.exports=t},"594b":function(e,t,n){"use strict";n.r(t);var i=n("9586"),a=n("366f");for(var r in a)["default"].indexOf(r)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("28ed");var o=n("f0c5"),d=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"60e8eddc",null,!1,i["a"],void 0);t["default"]=d.exports},9586:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var i={easyLoadimage:n("2243").default},a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"main"},[e.uploading?[n("v-uni-view",{staticClass:"image-list"},[n("v-uni-view",{staticClass:"input_photo acea-row row-middle"},e._l(e.imgList,(function(t,i){return i<=19?n("v-uni-view",{key:i,staticClass:"pictrue"},[n("easy-loadimage",{attrs:{mode:"widthFix","image-src":t.src}}),n("v-uni-view",{staticClass:"close_btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.DelPic(i)}}},[n("v-uni-text",{staticClass:"iconfont icon-guanbi4"})],1)],1):e._e()})),1),e.imgList.length?e._e():n("v-uni-view",{staticClass:"acea-row row-center-wrapper row-column add",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.add.apply(void 0,arguments)}}},[n("v-uni-view",[n("v-uni-text",{staticClass:"iconfont icon-a-guanzhu"})],1),n("v-uni-view",{staticClass:"text"},[e._v("点击选择图片")])],1)],1),n("v-uni-view",{staticClass:"footer acea-row row-between-wrapper"},[e.imgList.length?n("v-uni-view",[e._v("共"+e._s(e.imgList.length)+"/"+e._s(e.limit)+"张,"+e._s(e.allSize.toFixed(2))+" M")]):n("v-uni-view"),n("v-uni-view",{staticClass:"upload-btn acea-row row-between-wrapper"},[e.imgList.length<e.limit?n("v-uni-button",{staticClass:"btn",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.add.apply(void 0,arguments)}}},[e._v(e._s(e.imgList.length?"继续选择":"选择图片"))]):e._e(),n("v-uni-button",{staticClass:"btn upload",class:{"no-pic":!e.imgList.length},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.submitUpload.apply(void 0,arguments)}}},[e._v("确认上传")])],1)],1)]:[n("v-uni-view",{staticClass:"upload-success"},[n("v-uni-view",{staticClass:"success"},[n("img",{staticClass:"image",attrs:{src:e.domain+"/static/images/success.jpg",alt:""}})]),n("v-uni-view",{staticClass:"text"},[e._v("图片上传成功")]),n("v-uni-view",{staticClass:"again",on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.again.apply(void 0,arguments)}}},[e._v("继续上传")])],1)]],2)},r=[]}}]); |