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
14 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/other/custom"],{"1e13":function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var i={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"))},uniSection:function(){return n.e("uni_modules/uni-section/components/uni-section/uni-section").then(n.bind(null,"497e"))},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"))},uniDataSelect:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(n.bind(null,"90dc"))},uniSegmentedControl:function(){return n.e("uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control").then(n.bind(null,"4631"))},uniCard:function(){return n.e("uni_modules/uni-card/components/uni-card/uni-card").then(n.bind(null,"1e6b"))},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"))},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"))},uniFab:function(){return n.e("uni_modules/uni-fab/components/uni-fab/uni-fab").then(n.bind(null,"e36c"))}},s=function(){var t=this,e=t.$createElement,n=(t._self._c,t.userList.length),i=t.userList.length,s=t.list.length,u=null!=t.duizhangList.initialArrears?Math.abs(t.duizhangList.initialArrears):null,r=null!=t.duizhangList.endArrears?Math.abs(t.duizhangList.endArrears):null,o=null!=t.duizhangList.arrears?Math.abs(t.duizhangList.arrears):null,a=t.__map(t.duizhangRecords,(function(e,n){var i=t.__get_orig(e),s=t.duizhangList?t._f("removeStr")(e.createTime):null,u=t.duizhangList&&e.lastDebtAmount<0&&null!=e.lastDebtAmount?Math.abs(e.lastDebtAmount):null,r=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,f0:s,g6:u,g7:r,g8:o,g9:a}})),c=t.__map(t.list,(function(e,n){var i=t.__get_orig(e),s=t.__map(e.customerBuySaleVoList,(function(e,n){var i=t.__get_orig(e),s=t._f("removeStr")(e.createTime);return{$orig:i,f1:s}}));return{$orig:i,l1:s}})),l=t.__map(t.list,(function(e,n){var i=t.__get_orig(e),s=t._f("removeStr")(e.createTime);return{$orig:i,f2:s}})),d=t.__map(t.detailList.billAttributeListVos,(function(e,n){var i=t.__get_orig(e),s=t._f("sliceMsg")(e.attributeList);return{$orig:i,f3:s}})),h=t.__map(t.GDList,(function(e,n){var i=t.__get_orig(e),s=t._f("sliceMsg")(e.attributeList);return{$orig:i,f4:s}}));t._isMounted||(t.e0=function(e){return t.$refs.userPopup.open()},t.e1=function(e){return t.$refs.detailPopup.close()},t.e2=function(e){return t.$refs.xsdetailPopup.close()},t.e3=function(e){return t.$refs.userPopup.close()}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:s,g3:u,g4:r,g5:o,l0:a,l2:c,l3:l,l4:d,l5:h}})},u=[]},"28c1":function(t,e,n){"use strict";n.r(e);var i=n("dedd"),s=n.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=s.a},3241:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7859");i(n("3240"));var s=i(n("b32b"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(s.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"8e7f":function(t,e,n){},b32b:function(t,e,n){"use strict";n.r(e);var i=n("1e13"),s=n("28c1");for(var u in s)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(u);n("e8c3");var r=n("828b"),o=Object(r["a"])(s["default"],i["b"],i["c"],!1,null,"e0f5a8da",null,!1,i["a"],void 0);e["default"]=o.exports},dedd:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i(n("7eb4")),u=i(n("ee10")),r=i(n("af34")),o=n("8f59"),a=(n("072a"),{computed:(0,o.mapState)(["userId","mobile"]),data:function(){return{enDayShow:!1,textArr:["您还未关注快衣店服务号,暂无法接收充值及上新提醒,点击关注"],range:[],name:"",GDList:[],FWHPic:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/f2ba2080aaa54c618c2e47df4f220087.png",list:[],detailList:{},shopList:[],userList:[],pages:1,duizhangRecords:[],customerId:"",current:"",items:["拿货(按订单)","对账单","拿货(按商品)","退货明细"],userId:"",pageNum:1,duizhangList:[],shopId:"",bList:[],query:{startDate:"",endDate:""},horizontal:"right",content:[{iconPath:"/static/images/tabbar/home.png",selectedIconPath:"/static/images/tabbar/home-sel.png",text:"我的",active:!1},{iconPath:"/static/images/tabbar/home.png",selectedIconPath:"/static/images/tabbar/home-sel.png",text:"退出登录",active:!1}]}},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}},created:function(){t.hideHomeButton()},onReachBottom:function(){this.pageNum>=this.pages||(this.status="loading",this.pageNum++,1==this.current?this.duizhangdan():this.getList())},onShow:function(){t.getStorageSync("officialAccountOpenid")||this.getUserInfo(),""==this.range&&this.getMonth()},onLoad:function(e){e.q&&t.setStorageSync("codePage",!0),""!=e.saleId&&e.userId==t.getStorageSync("userId")&&this.kehuList(e.saleId),this.getShopList()},methods:{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?e.enDayShow=!0:t.setStorageSync("officialAccountOpenid",n.result.officialAccountOpenid))})).catch((function(t){}))},getToken:function(){t.login({provider:"weixin",success:function(t){this.getOpenId(t.code)}})},getOpenId:function(t){var e=this;this.tui.request("","post",{appid:"wx6d7d4fb58d1502db",secret:"3a2c8cd00926764bbd12fd7361e01f1d",js_code:t,grant_type:"authorization_code",customId:""},!1,!1).then((function(t){e.status="nomore",200==t.code||e.tui.toast(t.message)})).catch((function(t){}))},bigFWHPic:function(){t.previewImage({urls:[this.FWHPic]})},goDetail:function(e){t.navigateTo({url:"/package1/index/orderDetail?id="+e.id+"&userId="+e.userId+"&shopId="+e.shopId})},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(),s=e+"-"+n+"-"+i;this.range=["2024-01-01",s]},sectionChange:function(){1==this.current?(this.duizhangList=[],this.pageNum=1,this.pages=1,this.duizhangdan()):(this.list=[],this.pageNum=1,this.pages=1,this.getList())},clickDetail:function(t){this.detailList=t,this.$refs.detailPopup.open()},getShopList:function(){var t=this;this.tui.request("/app/shop/getAllShopByCustomer","get",{},!1,!0,!1).then((function(e){200===e.code&&(t.shopId=e.result[0].id,t.change(),t.shopList=e.result.map((function(t){return{text:t.shopName,value:t.id}})))}))},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()))},onClickItem:function(t){this.current!==t.currentIndex&&(this.current=t.currentIndex),this.customerIdIsExist()},getList:function(t){var e,n,i=this;this.status="loading",""==this.current&&(this.current=0),0==this.current?(e="/app/sale/listPages",n={userId:this.customerId,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.customerId,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.customerId,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,r.default)(i.list),(0,r.default)(t.result.records)),i.pages=t.result.pages,0==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 s=0;s<i.list[e].saleDetailDTOList[n].stockLogList1.length;s++)i.list[e].productCount+=i.list[e].saleDetailDTOList[n].stockLogList1[s].productCount,i.list[e].saleDetailDTOList[n].productCount+=i.list[e].saleDetailDTOList[n].stockLogList1[s].productCount}}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}}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}}else i.tui.toast(t.message)})).catch((function(t){})),this.$forceUpdate()},duizhangdan:function(){var t=this;this.tui.request("/app/bill/getCustomerBill","post",{customerId:this.customerId,pageNum:this.pageNum,pageSize:"10",startDate:this.range[0],endDate:this.range[1],shopId:this.shopId},!1,!1).then((function(e){if(200==e.code){if(t.status="nomore",1==t.pages)t.duizhangList=e.result,t.duizhangRecords=e.result.customerBillSaleVos.records;else for(var n=0;n<e.result.customerBillSaleVos.records.length;n++)t.duizhangRecords.push(e.result.customerBillSaleVos.records[n]);t.pages=e.result.customerBillSaleVos.pages}else"客户id不能为空"==e.message?t.tui.toast("请选择店铺后再操作!"):t.tui.toast(e.message)})).catch((function(t){}))},trigger:function(e){var n=this;0==e.index?t.navigateTo({url:"/package2/index/shopInfo"}):t.showModal({title:"提示",content:"确定退出登录吗?",success:function(e){e.confirm&&n.tui.request("/oauth2/logout","POST",{},!1,!1).then((function(e){200==e.code?(n.tui.toast("退出登录成功"),t.clearStorage(),t.navigateTo({url:"/package2/login/login"})):n.tui.toast(e.message)}))}})},kehuList:function(e,n){t.navigateTo({url:"/package1/index/orderDetail?id="+e+"&shopId="+n})},checkUser:function(t){this.customerId=t,this.$refs.userPopup.close(),1==this.current?this.duizhangdan():this.getList()},change:function(e){var n=this;return(0,u.default)(s.default.mark((function e(){var i;return s.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,n.findByUserId();case 2:return i=e.sent,""==i?t.showToast({title:"暂无人员信息"}):i.length>1?(n.userList=i,n.$refs.userPopup.open()):n.customerId=i[0].id,e.next=6,n.qiehuan();case 6:case"end":return e.stop()}}),e)})))()},customerIdIsExist:function(){var e=this;return(0,u.default)(s.default.mark((function n(){var i,u,r;return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return e,n.next=3,e.findByUserId();case 3:if(i=n.sent,u=!1,""==i){n.next=16;break}for(r=0;r<i.length;r++)i[r].id==e.customerId&&(u=!0);if(0!=u){n.next=14;break}if(!(i.length>=1)){n.next=12;break}e.customerId=i[0].id,n.next=14;break;case 12:return e.customerId="",n.abrupt("return");case 14:n.next=21;break;case 16:e.customerId="",e.duizhangList=[],e.pageNum=1,e.list=[],t.showToast({title:"暂无人员信息"});case 21:return n.next=23,e.qiehuan();case 23:case"end":return n.stop()}}),n)})))()},qiehuan:function(){0==this.current?(this.list=[],this.pageNum=1,this.getList()):1==this.current?(this.duizhangList=[],this.pageNum=1,this.pages=1,this.duizhangdan()):(2==this.current||3==this.current)&&(this.list=[],this.pageNum=1,this.getList())},findByUserId:function(){var e=this;return new Promise(function(){var n=(0,u.default)(s.default.mark((function n(i,u){return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.tui.request("/app/customer/findByUserId","post",{userId:t.getStorageSync("id"),shopId:e.shopId},!1,!0).then((function(t){return i(t.result)}));case 1:case"end":return n.stop()}}),n)})));return function(t,e){return n.apply(this,arguments)}}())},formatDate:function(t,e){var n={"M+":t.getMonth()+1,"D+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var i in/(Y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[i]:("00"+n[i]).substr((""+n[i]).length)));return e}}});e.default=a}).call(this,n("df3c")["default"])},e8c3:function(t,e,n){"use strict";var i=n("8e7f"),s=n.n(i);s.a}},[["3241","common/runtime","common/vendor"]]]);