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
9.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/consignment-painting/index"],{311:function(e,t,n){"use strict";(function(e,t){var a=n(4);n(26);a(n(25));var r=a(n(312));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n(1)["default"],n(2)["createPage"])},312:function(e,t,n){"use strict";n.r(t);var a=n(313),r=n(315);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n(317);var i,s=n(33),u=Object(s["default"])(r["default"],a["render"],a["staticRenderFns"],!1,null,"06cb0d30",null,!1,a["components"],i);u.options.__file="pages/consignment-painting/index.vue",t["default"]=u.exports},313:function(e,t,n){"use strict";n.r(t);var a=n(314);n.d(t,"render",(function(){return a["render"]})),n.d(t,"staticRenderFns",(function(){return a["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return a["recyclableRender"]})),n.d(t,"components",(function(){return a["components"]}))},314:function(e,t,n){"use strict";var a;n.r(t),n.d(t,"render",(function(){return r})),n.d(t,"staticRenderFns",(function(){return i})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return a}));try{a={titleBlock:function(){return n.e("components/title-block/title-block").then(n.bind(null,386))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-upload/u-upload")]).then(n.bind(null,360))},tmPoup:function(){return n.e("tm-vuetify/components/tm-poup/tm-poup").then(n.bind(null,467))},uLoadingPage:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-loading-page/u-loading-page")]).then(n.bind(null,459))}}}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 r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.warehouseID?e.addressList.find((function(t){return t.ID===e.warehouseID})):null),a=e.cycleId?e.cycleList.find((function(t){return t.ID===e.cycleId})):null;e._isMounted||(e.e0=function(t){e.show_2=!1},e.e1=function(t){e.show_1=!1},e.e2=function(t){e.show_2=!0}),e.$mp.data=Object.assign({},{$root:{g0:n,g1:a}})},o=!1,i=[];r._withStripped=!0},315:function(e,t,n){"use strict";n.r(t);var a=n(316),r=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=r.a},316:function(e,t,n){"use strict";(function(e){var a=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(63)),o=a(n(11)),i=a(n(65)),s=a(n(223)),u=n(262);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,o.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={name:"order-details",data:function(){for(var e=new Date,t=[],n=e.getFullYear(),a=[],r=e.getMonth()+1,o=[],i=e.getDate(),s=1990;s<=e.getFullYear();s++)t.push(s);for(var u=1;u<=12;u++)a.push(u);for(var c=1;c<=31;c++)o.push(c);return{loading:!1,fileList1:[],dayMoney:"",expectedPayment:"",warehouseID:"",cycleId:"",cycleList:[],addressList:[],info:{},show_2:!1,data:[],show_1:!1,title:"picker-view",years:t,year:n,months:a,month:r,days:o,day:i,value:[9999,r-1,i-1],visible:!0,url:""}},watch:{"info.artworkSquareSize":{handler:function(){this.obtainAmount()}},cycleId:function(e){this.obtainAmount()}},mounted:function(){this.getCycle(),this.$mp.query.url&&(this.url=this.$mp.query.url,this.getDetailUrl()),this.getAddress();var e=new Date;this.value=[e.getFullYear()-1990,e.getMonth(),e.getDate()-1],this.data=[e.getFullYear(),e.getMonth()+1,e.getDate()]},methods:{openShow1:function(){this.info.artworkSquareSize?this.show_1=!0:e.showToast({title:"请先填写画作平尺数",duration:2e3,icon:"none"})},uploadFilePromise:function(t){return new Promise((function(n){e.uploadFile({url:s.default.baseUrl+"/api/wxuser/uploadpic",filePath:t,name:"file",success:function(e){console.log(e,"res");var t=JSON.parse(e.data).data.path;n(t)}})}))},deletePic:function(){this.fileList1=[]},afterRead:function(e){var t=this;return(0,i.default)(r.default.mark((function n(){var a,o,i,s,u;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:a=[].concat(e.file),o=t["fileList1"].length,a.map((function(e){t["fileList1"].push(l(l({},e),{},{status:"uploading",message:"上传中"}))})),i=0;case 4:if(!(i<a.length)){n.next=15;break}return n.next=7,t.uploadFilePromise(a[i].url,"check");case 7:s=n.sent,console.log(s),u=t["fileList1"][o],t["fileList1"].splice(o,1,Object.assign(u,{status:"success",message:"",url:s})),o++;case 12:i++,n.next=4;break;case 15:case"end":return n.stop()}}),n)})))()},signContract:function(){var t=this;return(0,i.default)(r.default.mark((function n(){var a,o,i,s,c,l,d,f;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=[{value:t.fileList1.length>0,message:"请上传画作图片"},{value:t.info.artworkSquareSize,message:"请输入画作平尺数"},{value:t.info.artistName,message:"请输入画家名称"},{value:t.info.artworkName,message:"请输入画作名称"},{value:t.info.artworkNum,message:"请输入画作编号"},{value:t.warehouseID,message:"请选择寄存地址"},{value:t.cycleId,message:"请选择寄存时限"}],s=0,c=i;case 2:if(!(s<c.length)){n.next=10;break}if(l=c[s],l.value){n.next=7;break}return e.showToast({title:l.message,icon:"none"}),n.abrupt("return");case 7:s++,n.next=2;break;case 10:return t.loading=!0,d={cycleId:t.cycleId,warehouseID:t.warehouseID,artworkSquareSize:Number(t.info.artworkSquareSize),artworkName:t.info.artworkName,artworkImage:null===(a=t.fileList1)||void 0===a||null===(o=a[0])||void 0===o?void 0:o.url,artworkNum:t.info.artworkNum,artistName:t.info.artistName},n.next=14,(0,u.postDataByParams)("/api/warehouse/fdd/contract/h5",d);case 14:f=n.sent,200===f.code&&(e.setStorageSync("jumpUrl",f.data.jumpUrl),t.info.artworkImg=t.fileList1[0].url,e.setStorageSync("orderingInfo",{cycleID:t.cycleId,warehouseID:t.warehouseID,transactionId:f.data.transactionId,dayMoney:t.dayMoney,info:t.info,expectedPayment:t.expectedPayment,addressName:t.addressList.find((function(e){return e.ID===t.warehouseID})).address,cycleName:t.cycleList.find((function(e){return e.ID===t.cycleId})).name}),e.navigateTo({url:"/pages/signwebview/index"}),t.loading=!1);case 16:case"end":return n.stop()}}),n)})))()},obtainAmount:function(){var e=this;return(0,i.default)(r.default.mark((function t(){var n,a;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={cycleID:e.cycleId,artworkSquareSize:Number(e.info.artworkSquareSize)},t.next=3,(0,u.postDataByParams)("/api/warehouse/calculate",n);case 3:a=t.sent,200===a.code&&(e.expectedPayment=a.data.money,e.dayMoney=a.data.dayMoney);case 5:case"end":return t.stop()}}),t)})))()},confirmCycle:function(){this.show_1=!1},confirmAddress:function(){this.show_2=!1},selectAddress:function(e){this.warehouseID=e.ID},selectionPeriod:function(e){this.cycleId=e.ID},getCycle:function(){var e=this;return(0,i.default)(r.default.mark((function t(){var n;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,u.postDataByParams)("/api/warehouse/cycle");case 2:n=t.sent,200===n.code&&(e.cycleList=n.data.data);case 4:case"end":return t.stop()}}),t)})))()},getAddress:function(){var e=this;return(0,i.default)(r.default.mark((function t(){var n;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,u.postDataByParams)("/api/warehouse/address");case 2:n=t.sent,200===n.code&&(e.addressList=n.data.data);case 4:case"end":return t.stop()}}),t)})))()},getDetailUrl:function(){var t=this;return(0,i.default)(r.default.mark((function n(){var a,o;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return a={url:t.url},n.next=3,(0,u.postDataByParams)("/api/warehouse/ocr",a);case 3:o=n.sent,200===o.code?(t.info=o.data,t.fileList1=[{url:t.info.artworkImg}]):e.showToast({title:o.msg,icon:"none"}),console.log(o,"getDetailUrl");case 6:case"end":return n.stop()}}),n)})))()},isDateFont:function(e,t){if(Array.isArray&&3===this.data.length)return this.data[t]===e},changeData:function(e){this.data=[e.detail.value[0]+1990,e.detail.value[1]+1,e.detail.value[2]+1]},back:function(){e.navigateBack({delta:2})}}};t.default=d}).call(this,n(2)["default"])},317:function(e,t,n){"use strict";n.r(t);var a=n(318),r=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=r.a},318:function(e,t,n){}},[[311,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/consignment-painting/index.js.map