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.
 
 
 
 
 
 

2 lines
13 KiB

  1. webpackJsonp([46],{"1pgJ":function(t,e,i){"use strict";var l=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading.body",value:t.listLoading,expression:"listLoading",modifiers:{body:!0}}],staticClass:"app-container",attrs:{"element-loading-text":"拼命加载中"}},[i("el-form",{ref:"listQuery",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.listQuery}},[i("el-form-item",{attrs:{label:"门店",prop:"shopIdsArr"}},[i("el-select",{attrs:{multiple:"",filterable:"",clearable:"",placeholder:"请选择"},model:{value:t.listQuery.shopIdsArr,callback:function(e){t.$set(t.listQuery,"shopIdsArr",e)},expression:"listQuery.shopIdsArr"}},t._l(t.shopList,function(t){return i("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"周期",prop:"schedule"}},[i("el-date-picker",{attrs:{type:"daterange","range-separator":"-","unlink-panels":"","value-format":"yyyy-MM",format:"yyyy-MM","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.dateOption},on:{change:t.dateChange},model:{value:t.schDate,callback:function(e){t.schDate=e},expression:"schDate"}})],1),t._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary"},on:{click:t.searchSettled}},[t._v("查询")]),t._v(" "),i("el-button",{on:{click:t.exportExcel}},[t._v("导出")])],1)],1),t._v(" "),i("el-tabs",{attrs:{type:"card"},model:{value:t.tabName,callback:function(e){t.tabName=e},expression:"tabName"}},t._l(t.periodList,function(e){return i("el-tab-pane",{key:e.monthName,attrs:{label:e.monthName,name:e.monthName}},[i("el-table",{attrs:{data:e.billList,border:"",fit:"",size:"small","highlight-current-row":"","tooltip-effect":"light",stripe:"","header-row-class-name":"headerClz"}},[t._l(t.cols,function(t){return i("el-table-column",{attrs:{"show-overflow-tooltip":"",prop:t.prop,label:t.label}})}),t._v(" "),i("el-table-column",{attrs:{align:"center",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"small",type:"text"},on:{click:function(i){t.view(e.row.billNumber,e.row.shopId)}}},[t._v("详情")])]}}])})],2)],1)})),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:0===t.periodList.length,expression:"periodList.length ===0"}],staticClass:"tip"},[i("p",[t._v("暂无数据,请先选择结算周期进行结算")])]),t._v(" "),i("el-dialog",{attrs:{title:"结算订单详情",visible:t.dialogTableVisible,width:"60%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[i("el-row",[i("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:t.dialogTableListLoading,expression:"dialogTableListLoading",modifiers:{body:!0}}],attrs:{data:t.orderDetailList,"element-loading-text":"拼命加载中",border:"",fit:"","tooltip-effect":"light",stripe:""}},[i("el-table-column",{attrs:{property:"createdAt",label:"交易时间",formatter:t.timeFmt,width:"160"}}),t._v(" "),i("el-table-column",{attrs:{property:"orderNumber",label:"订单号"}}),t._v(" "),i("el-table-column",{attrs:{property:"orderAmount",label:"订单金额"}}),t._v(" "),i("el-table-column",{attrs:{property:"realPayAmount",label:"实付金额"}}),t._v(" "),i("el-table-column",{attrs:{property:"discountAmount",label:"优惠金额"}}),t._v(" "),i("el-table-column",{attrs:{property:"payTypeName",label:"支付方式"}}),t._v(" "),i("el-table-column",{attrs:{property:"orderTypeName",label:"订单类型"}}),t._v(" "),t._l(t.billSubjectDetailList,function(t){return i("el-table-column",{key:t.label,attrs:{property:t.prop,label:t.label}})})],2)],1),t._v(" "),i("el-row",[i("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.currPage,"page-sizes":[10,30,50,100],"page-size":t.detailListQuery.limit,layout:"total, sizes, prev, pager, next",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogTableVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.exportDetailExcel}},[t._v("导 出")])],1)],1)],1)},a=[],n={render:l,staticRenderFns:a};e.a=n},"8dW8":function(t,e,i){"use strict";var l=i("g45I"),a=i("Rn1g");e.a={name:"doSettle",data:function(){return{listQuery:{schedule:"",orgId:this.$store.getters.orgId,isPage:!1,shopIds:"",shopIdsArr:[],startTime:"",endTime:""},cols:[],detailListQuery:{billNumber:null,shopId:null,isPage:!0,limit:10,offset:0},billSubjectDetailList:[],tabName:"",periodList:[],orderDetailList:[],listLoading:!0,dialogTableListLoading:!0,dialogTableVisible:!1,shopList:[],payChannelList:[],schDate:[],total:0,currPage:1,dateOption:{shortcuts:[{text:"最近一个月",onClick:function(t){var e=new Date,i=new Date;i.setTime(i.getTime()-2592e6),t.$emit("pick",[i,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,i=new Date;i.setTime(i.getTime()-7776e6),t.$emit("pick",[i,e])}},{text:"最近六个月",onClick:function(t){var e=new Date,i=new Date;i.setTime(i.getTime()-15552e6),t.$emit("pick",[i,e])}}]}}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.listLoading=!0,i.i(l.a)().then(function(e){t.shopList=e.result.rows,t.listLoading=!1})},searchSettled:function(){var t=this;if(""===this.listQuery.startTime||""===this.listQuery.endTime)return void this.$message({type:"warning",message:"周期必须选择"});this.listLoading=!0,this.listQuery.shopIds=this.listQuery.shopIdsArr.join(","),i.i(a.g)(this.listQuery).then(function(e){t.periodList=e.result.billMonthList,0!==t.periodList.length&&(t.tabName=t.periodList[0].monthName,t.periodList=t.formatSettleData(e.result.billMonthList),t.addCols(e.result.billMonthList)),t.listLoading=!1})},exportExcel:function(){var t=this;if(0===this.periodList.length)return void this.$message({type:"warning",message:"请先选择周期查询归档数据后再导出"});i.e(85).then(i.bind(null,"zWO4")).then(function(e){var i=[],l=[];t.cols.forEach(function(t){i.push(t.label),l.push(t.prop)});var a=[],n=t.formatJson;t.periodList.forEach(function(t){a.push({sheetName:t.monthName,sheetData:n(l,t.billList)})}),e.export_json_to_excel(i,a,"分润列表")})},exportDetailExcel:function(){var t=this;i.e(85).then(i.bind(null,"zWO4")).then(function(e){var l={billNumber:t.detailListQuery.billNumber,shopId:t.detailListQuery.shopId,isPage:!1},n=["交易时间","订单号","订单金额","实付金额","优惠金额","支付方式","订单类型"],r=["createdAt","orderNumber","orderAmount","realPayAmount","discountAmount","payTypeName","orderTypeName"];t.billSubjectDetailList.forEach(function(t){n.push(t.label),r.push(t.prop)});var o=t.timeFmt;i.i(a.h)(l).then(function(i){var l=i.result.paginationExtendBean.rows;l.forEach(function(t){t.createdAt=o({createdAt:t.createdAt},null),t.billSubjectDetailList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount})});var a=t.formatJson(r,l);e.export_json_to_excel(n,a,"订单分润列表")})})},formatJson:function(t,e){return e.map(function(e){return t.map(function(t){return e[t]})})},view:function(t,e){this.detailListQuery.billNumber=t,this.detailListQuery.shopId=e,this.detailListQuery.offset=0,this.detailListQuery.limit=10,this.detailPage(),this.dialogTableVisible=!0},detailPage:function(){var t=this;this.dialogTableListLoading=!0;var e=this;i.i(a.h)(this.detailListQuery).then(function(i){0===e.billSubjectDetailList.length&&i.result.paginationExtendBean.rows[0].billSubjectDetailList.forEach(function(t){e.billSubjectDetailList.push({label:t.subjectName,prop:"profitAmount"+t.subjectName})}),t.orderDetailList=i.result.paginationExtendBean.rows,t.orderDetailList.forEach(function(t){t.billSubjectDetailList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount})}),t.total=i.result.paginationExtendBean.total,t.dialogTableListLoading=!1})},handleSizeChange:function(t){this.detailListQuery.limit=t,this.detailListQuery.offset=(this.currPage-1)*t,this.detailPage()},handleCurrentChange:function(t){this.currPage=t,this.detailListQuery.offset=this.detailListQuery.limit*(t-1),this.detailPage()},dateChange:function(){null==this.schDate||0===this.schDate.length?(this.listQuery.startTime="",this.listQuery.endTime=""):(this.listQuery.startTime=this.schDate[0],this.listQuery.endTime=this.schDate[1])},formatSettleData:function(t){return t.forEach(function(t){t.billList.forEach(function(t){null!==t.billSubjectList&&0!==t.billSubjectList.length&&t.billSubjectList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount,null!==e.billPayTypeList&&0!==e.billPayTypeList.length&&e.billPayTypeList.forEach(function(i){t[e.subjectName+"_amount"+i.payType]=i.profitAmount})})})}),t},addCols:function(t){var e=this;this.cols.push({prop:"shopName",label:"门店名称"}),this.cols.push({prop:"billAmount",label:"总帐"}),t.length>0&&t.forEach(function(t){if(t.billList.length>0)return t.billList[0].billSubjectList.forEach(function(t){e.cols.push({prop:"profitAmount"+t.subjectName,label:t.subjectName+"分润"})}),void(null!==t.billList[0].billSubjectList[0].billPayTypeList&&0!==t.billList[0].billSubjectList[0].billPayTypeList.length&&t.billList[0].billSubjectList[0].billPayTypeList.forEach(function(i){t.billList[0].billSubjectList.forEach(function(t){e.cols.push({prop:t.subjectName+"_amount"+i.payType,label:t.subjectName+i.payTypeName+"分润"})})}))})},timeFmt:function(t,e){var i=function(t){return t=t.toString(),t[1]?t:"0"+t};return function(t){var e=t.getFullYear(),l=t.getMonth()+1,a=t.getDate(),n=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return[e,l,a].map(i).join("-")+" "+[n,r,o].map(i).join(":")}(new Date(t.createdAt))}}}},Jluc:function(t,e,i){"use strict";function l(t){i("PJeO")}Object.defineProperty(e,"__esModule",{value:!0});var a=i("8dW8"),n=i("1pgJ"),r=i("VU/8"),o=l,s=r(a.a,n.a,o,"data-v-3144f088",null);e.default=s.exports},PJeO:function(t,e,i){var l=i("fRm0");"string"==typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);i("rjj0")("3c295052",l,!0)},Rn1g:function(t,e,i){"use strict";function l(t){return i.i(v.a)({url:"/service-trade/bill/billExistStatus",method:"get",params:t})}function a(t){return i.i(v.a)({url:"/unionService/bill/noAcceptBills",method:"get",params:t})}function n(t){return i.i(v.a)({url:"/service-trade/bill/billAccept",method:"put",data:t})}function r(t){return i.i(v.a)({url:"/unionService/bill/acceptBills",method:"get",params:t})}function o(t){return i.i(v.a)({url:"/unionService/bill/billDetails",method:"get",params:t})}function s(){return i.i(v.a)({url:"/service-trade/bill/noAcceptBillNumbers",method:"get"})}function u(){return i.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"get"})}function c(t){return i.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"post",data:t})}function d(t){return i.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"put",data:t})}function p(t){return i.i(v.a)({url:"/unionService/billSettlementRule/billSettlementRule?ruleId="+t,method:"get"})}function h(t){return i.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule",method:"post",data:t})}function m(t){return i.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule",method:"put",data:t})}function b(){return i.i(v.a)({url:"/unionService/billSettlementRule/billSettlementRules",method:"get"})}function f(t){return i.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule?ruleId="+t,method:"delete"})}function g(t){return i.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRuleSort",method:"put",data:t})}e.m=l,e.n=a,e.o=n,e.g=r,e.h=o,e.l=s,e.i=u,e.k=c,e.j=d,e.d=p,e.e=h,e.f=m,e.b=b,e.c=f,e.a=g;var v=i("Vo7i")},fRm0:function(t,e,i){e=t.exports=i("FZ+f")(!0),e.push([t.i,".tip[data-v-3144f088]{padding:8px 16px;background-color:#ecf8ff;border-radius:4px;border-left:5px solid #50bfff;margin:20px 0}.tip p[data-v-3144f088]{font-size:14px;color:#5e6d82;line-height:1.5em}","",{version:3,sources:["D:/projects/gitLab/wxpos/posadmin/src/views/transaction/settle/settled.vue"],names:[],mappings:"AACA,sBACE,iBAAkB,AAClB,yBAA0B,AAC1B,kBAAmB,AACnB,8BAA+B,AAC/B,aAAe,CAChB,AACD,wBACE,eAAgB,AAChB,cAAe,AACf,iBAAmB,CACpB",file:"settled.vue",sourcesContent:["\n.tip[data-v-3144f088] {\n padding: 8px 16px;\n background-color: #ecf8ff;\n border-radius: 4px;\n border-left: 5px solid #50bfff;\n margin: 20px 0;\n}\n.tip p[data-v-3144f088] {\n font-size: 14px;\n color: #5e6d82;\n line-height: 1.5em;\n}\n"],sourceRoot:""}])},g45I:function(t,e,i){"use strict";function l(t){return i.i(u.a)({url:"/service-org/shop/list",method:"get",params:t})}function a(t){return i.i(u.a)({url:"/unionService/shop/shop",method:"post",data:t})}function n(t){return i.i(u.a)({url:"/service-org/shop/detail?shopId="+t,method:"get"})}function r(t){return i.i(u.a)({url:"/unionService/shop/shop",method:"put",data:t})}function o(t){return i.i(u.a)({url:"/unionService/device/store",method:"put",data:t})}function s(t){return i.i(u.a)({url:"/service-org/shop/delete?shopId="+t,method:"DELETE"})}e.a=l,e.f=a,e.b=n,e.c=r,e.d=o,e.e=s;var u=i("Vo7i")}});
  2. //# sourceMappingURL=46.d91dd2155a6ca0e803f3.js.map