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

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/index/shareBill"],{"1b29":function(t,e,n){"use strict";n.r(e);var i=n("5e88"),r=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=r.a},"383c":function(t,e,n){"use strict";n.r(e);var i=n("40f1"),r=n("1b29");for(var s in r)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(s);n("837a");var u=n("828b"),o=Object(u["a"])(r["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},"40f1":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={cmdNavBar:function(){return n.e("components/cmd-nav-bar/cmd-nav-bar").then(n.bind(null,"3d8f"))},uNoticeBar:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-notice-bar/u-notice-bar")]).then(n.bind(null,"013b"))},uniDatetimePicker:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(n.bind(null,"4632"))},uniSegmentedControl:function(){return n.e("uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control").then(n.bind(null,"4631"))},uniTable:function(){return n.e("uni_modules/uni-table/components/uni-table/uni-table").then(n.bind(null,"e2fa"))},uniTr:function(){return n.e("uni_modules/uni-table/components/uni-tr/uni-tr").then(n.bind(null,"9b2f"))},uniTh:function(){return n.e("uni_modules/uni-table/components/uni-th/uni-th").then(n.bind(null,"83ad"))},uniTd:function(){return n.e("uni_modules/uni-table/components/uni-td/uni-td").then(n.bind(null,"5776"))},uniCard:function(){return n.e("uni_modules/uni-card/components/uni-card/uni-card").then(n.bind(null,"1e6b"))},uLoadmore:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-loadmore/u-loadmore")]).then(n.bind(null,"9fc5"))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"2864"))},uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"6bbb6"))}},r=function(){var t=this,e=t.$createElement,n=(t._self._c,"khName"==t.type?t.__map(t.list,(function(e,n){var i=t.__get_orig(e),r=t._f("removeStr")(e.createTime);return{$orig:i,f0:r}})):null),i="khName"==t.type&&null!=t.duizhangList.initialArrears?Math.abs(t.duizhangList.initialArrears):null,r="khName"==t.type&&null!=t.duizhangList.endArrears?Math.abs(t.duizhangList.endArrears):null,s="khName"==t.type&&null!=t.duizhangList.arrears?Math.abs(t.duizhangList.arrears):null,u="khName"==t.type?t.__map(t.duizhangRecords,(function(e,n){var i=t.__get_orig(e),r=t.duizhangList?t._f("removeStr")(e.createTime):null,s=t.duizhangList&&e.lastDebtAmount<0&&null!=e.lastDebtAmount?Math.abs(e.lastDebtAmount):null,u=t.duizhangList&&(5==e.dealingsType||e.amount>=0)&&null!=e.amount&&5==e.dealingsType?Math.abs(e.amount):null,o=t.duizhangList&&e.amount<0&&5!=e.dealingsType&&null!=e.amount?Math.abs(e.amount):null,a=t.duizhangList&&e.balanceDue<0&&null!=e.balanceDue?Math.abs(e.balanceDue):null;return{$orig:i,f1:r,g3:s,g4:u,g5:o,g6:a}})):null,o="khName"==t.type?t.__map(t.list,(function(e,n){var i=t.__get_orig(e),r=t.__map(e.customerBuySaleVoList,(function(e,n){var i=t.__get_orig(e),r=t._f("removeStr")(e.createTime);return{$orig:i,f2:r}}));return{$orig:i,l2:r}})):null,a="khName"==t.type?t.__map(t.list,(function(e,n){var i=t.__get_orig(e),r=t._f("removeStr")(e.createTime);return{$orig:i,f3:r}})):null,c="khName"==t.type?t.__map(t.list,(function(e,n){var i=t.__get_orig(e),r=1==t.type?t.__map(e.purchaseDetails,(function(e,n){var i=t.__get_orig(e),r=t.__map(e.stockLogList1,(function(e,n){var i=t.__get_orig(e),r=t._f("sliceMsg")(e.attributeList);return{$orig:i,f4:r}}));return{$orig:i,l5:r}})):null;return{$orig:i,l6:r}})):null,l=t.__map(t.GDList,(function(e,n){var i=t.__get_orig(e),r=t._f("sliceMsg")(e.attributeList);return{$orig:i,f5:r}})),d=t.__map(t.detailList.billAttributeListVos,(function(e,n){var i=t.__get_orig(e),r=t._f("sliceMsg")(e.attributeList);return{$orig:i,f6:r}}));t._isMounted||(t.e0=function(e){return t.$refs.xsdetailPopup.close()},t.e1=function(e){return t.$refs.detailPopup.close()},t.e2=function(e){return t.$refs.sharePopup.close()}),t.$mp.data=Object.assign({},{$root:{l0:n,g0:i,g1:r,g2:s,l1:u,l3:o,l4:a,l7:c,l8:l,l9:d}})},s=[]},"5e88":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("7eb4")),s=i(n("af34")),u=i(n("ee10")),o=(n("072a"),{components:{cmdNavBar:function(){n.e("components/cmd-nav-bar/cmd-nav-bar").then(function(){return resolve(n("3d8f"))}.bind(null,n)).catch(n.oe)}},data:function(){return{enDayShow:!1,textArr:["您还未关注快衣店服务号,暂无法接收充值及上新提醒,点击关注"],FWHPic:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/f2ba2080aaa54c618c2e47df4f220087.png",isSelfOrder:!1,list:[],range:[],GDList:[],status:"loadmore",isDetail:"2",pages:1,pageNum:1,userId:"",customId:"",shopId:"",duizhangRecords:[],detailList:{},duizhangList:{},type:"",userType:t.getStorageSync("type"),items:["对账单","拿货(按订单)","拿货(按商品)","退货明细"],current:0,shopName:"",userName:""}},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var n=JSON.parse(t);for(var i in n)e+=n[i]+"/"}return e},removeStr:function(t){if(null==t)return"";var e=t.indexOf(".");return-1!==e?t.substring(0,e):t}},onShow:function(){t.getStorageSync("officialAccountOpenid")||t.getStorageSync("shopId")||"散客"==this.userName||this.getUserInfo()},onLoad:function(e){var n=this;this.userId=e.userId,this.customId=e.customId,this.type=e.popleType,this.userName=e.userName,this.shopName=e.shopName?e.shopName:t.getStorageSync("shopName"),this.shopId=e.shopId?e.shopId:t.getStorageSync("shopId"),this.mini_program_openid=e.mini_program_openid,e.range?this.$nextTick((function(){n.range=JSON.parse(e.range),n.$forceUpdate()})):this.getMonth(),t.setNavigationBarTitle({title:this.shopName}),t.getStorageSync("shopId")||"散客"==this.userName?this.isSelfOrder=!0:this.contrastOpneId(),this.duizhangdan()},onReachBottom:function(){this.pageNum>=this.pages||(this.status="loading",this.pageNum++,0==this.current?this.duizhangdan():this.getList())},methods:{contrastOpneId:function(){var e=this;return(0,u.default)(r.default.mark((function n(){var i,s;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.getStorageSync("miniProgramOpenid"),s=e.mini_program_openid,""==i||void 0==i||null==i){n.next=6;break}void 0!=s&&"undefined"!=s&&"null"!=s&&""!=s&&null!=s?i!=s||(e.isSelfOrder=!0,e.$forceUpdate()):(e.updateUserId(),e.isSelfOrder=!0,e.$forceUpdate()),n.next=11;break;case 6:if(t.getStorageSync("shopId")){n.next=9;break}return n.next=9,e.getOpenId(e.customId,t.getStorageSync("id")?t.getStorageSync("id"):e.userId);case 9:i=t.getStorageSync("miniProgramOpenid"),void 0!=s&&"undefined"!=s&&"null"!=s&&""!=s&&null!=s?i!=s||(e.isSelfOrder=!0,e.$forceUpdate()):(e.updateUserId(),e.isSelfOrder=!0,e.$forceUpdate());case 11:case"end":return n.stop()}}),n)})))()},getOpenId:function(e,n){var i=this;return new Promise((function(r,s){t.login({provider:"weixin",success:function(s){t.getUserInfo({provider:"weixin",success:function(u){i.tui.request("/user/login","post",{jsCode:s.code,customId:e,userId:n,wechatName:u.userInfo.nickName,userType:"2"},!1,!1).then((function(e){if(200==e.code)return t.setStorageSync("hiver_token",e.result.accessToken),t.setStorageSync("wayValue","2"),t.setStorageSync("nickname",e.result.user.nickname),t.setStorageSync("id",e.result.user.id),t.setStorageSync("unionid",e.result.user.unionid),t.setStorageSync("miniProgramOpenid",e.result.user.miniProgramOpenid),t.setStorageSync("officialAccountOpenid",e.result.user.officialAccountOpenid),"null"!=e.result.user.officialAccountOpenid&&null!=e.result.user.officialAccountOpenid&&void 0!=e.result.user.officialAccountOpenid&&""!=e.result.user.officialAccountOpenid||(i.enDayShow=!0,i.$forceUpdate()),r(e.result);tui.toast(e.message)})).catch((function(t){}))},fail:function(t){}})},fail:function(t){}})}))},updateUserId:function(){var e=this;this.tui.request("/app/customer/updateUserId","post",{customerId:this.customId,userId:t.getStorageSync("id")},!1,!0).then((function(t){200!=t.code&&e.tui.toast(t.message)})).catch((function(t){}))},getUserInfo:function(){var e=this;this.tui.request("/user/getUserInfo","post",{miniProgramOpenid:t.getStorageSync("miniProgramOpenid")},!1,!0).then((function(n){200==n.code&&(null==n.result.officialAccountOpenid||""==n.result.officialAccountOpenid||"null"==n.result.officialAccountOpenid||void 0==n.result.officialAccountOpenid?e.enDayShow=!0:(t.setStorageSync("officialAccountOpenid",n.result.officialAccountOpenid),e.enDayShow=!1))})).catch((function(t){}))},bigFWHPic:function(){t.previewImage({urls:[this.FWHPic]})},goToInfo:function(){t.reLaunch({url:"/pages/index/home"})},getMonth:function(){var t=new Date,e=t.getFullYear().toString(),n=t.getMonth()+1<10?"0"+(t.getMonth()+1).toString():(t.getMonth()+1).toString(),i=t.getDate()<10?"0"+t.getDate().toString():t.getDate().toString(),r=e+"-"+n+"-"+i;this.range=["2024-01-01",r]},duizhangdan:function(){var t,e=this;t={customerId:this.customId,pageNum:this.pageNum,pageSize:"10",startDate:this.range[0],endDate:this.range[1],shopId:this.shopId},this.tui.request("/app/bill/getCustomerBill","post",t,!1,!1).then((function(t){if(200==t.code){if(e.status="nomore",1==e.pages)e.duizhangList=t.result,e.duizhangRecords=t.result.customerBillSaleVos.records;else for(var n=0;n<t.result.customerBillSaleVos.records.length;n++)e.duizhangRecords.push(t.result.customerBillSaleVos.records[n]);e.pages=t.result.customerBillSaleVos.pages}else e.tui.toast(t.message)})).catch((function(t){}))},xiaoshouDetail:function(t,e){e&&("1"==t?(this.GDList=e.stockLogList1,this.$refs.xsdetailPopup.open()):"2"==t?(this.GDList=e.customerBuyProductDetailLogVos,this.$refs.xsdetailPopup.open()):"3"==t&&(this.GDList=e.stockLogList1,this.$refs.xsdetailPopup.open()))},getList:function(t){var e,n,i=this;this.status="loading",1==this.current?(e="/app/sale/listPages",n={userId:this.customId,pageVo:{pageSize:10,pageNumber:this.pageNum},searchStr:"",startTime:this.range[0],endTime:this.range[1],shopId:this.shopId,fromWhere:1}):2==this.current?(e="/app/sale/getCustomerBuyProductLog",n={userId:this.customId,pageSize:10,startDate:this.range[0],endDate:this.range[1],pageNum:this.pageNum,shopId:this.shopId}):3==this.current&&(e="/app/return/getReturnSaleListByUserId",n={userId:this.customId,startDate:this.range[0],endDate:this.range[1],pageNum:this.pageNum,pageSize:"10",shopId:this.shopId}),this.tui.request(e,"post",n,!1,!1).then((function(t){if(i.status="nomore",200==t.code){if(1==i.pages?i.list=t.result.records:i.list=[].concat((0,s.default)(i.list),(0,s.default)(t.result.records)),i.pages=t.result.pages,1==i.current){for(var e=0;e<i.list.length;e++){i.list[e].productCount=0;for(var n=0;n<i.list[e].saleDetailDTOList.length;n++){i.list[e].saleDetailDTOList[n].productCount=0;for(var r=0;r<i.list[e].saleDetailDTOList[n].stockLogList1.length;r++)i.list[e].productCount+=i.list[e].saleDetailDTOList[n].stockLogList1[r].productCount,i.list[e].saleDetailDTOList[n].productCount+=i.list[e].saleDetailDTOList[n].stockLogList1[r].productCount}}i.$forceUpdate()}else if(2==i.current){for(var u=0;u<i.list.length;u++){i.list[u].productCount=0;for(var o=0;o<i.list[u].customerBuySaleVoList.length;o++){i.list[u].customerBuySaleVoList[o].productCount=0;for(var a=0;a<i.list[u].customerBuySaleVoList[o].customerBuyProductDetailLogVos.length;a++)i.list[u].productCount+=i.list[u].customerBuySaleVoList[o].customerBuyProductDetailLogVos[a].productCount,i.list[u].customerBuySaleVoList[o].productCount+=i.list[u].customerBuySaleVoList[o].customerBuyProductDetailLogVos[a].productCount}}i.$forceUpdate()}else if(3==i.current){for(var c=0;c<i.list.length;c++)for(var l=0;l<i.list[c].returnSaleDetailList.length;l++){i.list[c].returnSaleDetailList[l].productCount=0;for(var d=0;d<i.list[c].returnSaleDetailList[l].stockLogList1.length;d++)i.list[c].returnSaleDetailList[l].productCount+=i.list[c].returnSaleDetailList[l].stockLogList1[d].productCount}i.$forceUpdate()}}else i.tui.toast(t.message)})).catch((function(t){}))},clickDetail:function(t){this.detailList=t,this.$refs.detailPopup.open()},onClickItem:function(t){this.current!==t.currentIndex&&(this.current=t.currentIndex),0==t.currentIndex?(this.duizhangList=[],this.pageNum=1,this.pages=1,this.duizhangdan()):(1==t.currentIndex||2==t.currentIndex||3==t.currentIndex)&&(this.list=[],this.pageNum=1,this.getList())},searchList:function(){0==this.current?(this.duizhangList=[],this.pageNum=1,this.pages=1,this.duizhangdan()):(1==this.current||2==this.current||3==this.current)&&(this.list=[],this.pageNum=1,this.getList())}}});e.default=o}).call(this,n("df3c")["default"])},6697:function(t,e,n){},"66b3":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7859");i(n("3240"));var r=i(n("383c"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"837a":function(t,e,n){"use strict";var i=n("6697"),r=n.n(i);r.a}},[["66b3","common/runtime","common/vendor"]]]);