Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

2 строки
14 KiB

  1. webpackJsonp([45],{"7NtY":function(t,e,i){var l=i("c+GH");"string"==typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);i("rjj0")("765d118c",l,!0)},DMBM:function(t,e,i){"use strict";var l=function(){var t=this,e=this,i=e.$createElement,l=e._self._c||i;return l("div",{directives:[{name:"loading",rawName:"v-loading.body",value:e.listLoading,expression:"listLoading",modifiers:{body:!0}}],staticClass:"app-container",attrs:{"element-loading-text":"拼命加载中"}},[l("el-form",{ref:"listQuery",staticClass:"demo-form-inline",attrs:{inline:!0,model:e.listQuery}},[l("el-form-item",{attrs:{label:"周期",prop:"schedule"}},[l("el-select",{attrs:{placeholder:"周期",name:"billNumber",clearable:""},model:{value:e.listQuery.billNumber,callback:function(t){e.$set(e.listQuery,"billNumber",t)},expression:"listQuery.billNumber"}},e._l(e.schedules,function(t){return l("el-option",{key:t.billNumber,attrs:{label:t.billName,value:t.billNumber}})}))],1),e._v(" "),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:e.toSettle}},[e._v("结算")]),e._v(" "),l("el-button",{attrs:{type:"success"},on:{click:e.toArchive}},[e._v("归档")]),e._v(" "),l("el-button",{on:{click:e.exportExcel}},[e._v("导出")])],1)],1),e._v(" "),l("div",{directives:[{name:"show",rawName:"v-show",value:0===e.settleList.length,expression:"settleList.length ===0"}],staticClass:"tip"},[l("p",[e._v("暂无数据,请先选择结算周期进行结算")])]),e._v(" "),l("el-table",{directives:[{name:"show",rawName:"v-show",value:0!==e.settleList.length,expression:"settleList.length !==0"}],attrs:{data:e.settleList4Page,border:"",fit:"",size:"small","highlight-current-row":"","tooltip-effect":"light",stripe:"","header-row-class-name":"headerClz"}},[e._l(e.cols,function(t){return l("el-table-column",{key:t.prop,attrs:{"show-overflow-tooltip":"",prop:t.prop,label:t.label}})}),e._v(" "),l("el-table-column",{attrs:{align:"center",label:"操作",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[l("el-button",{attrs:{size:"small",type:"text"},on:{click:function(i){e.view(t.row.billNumber,t.row.shopId)}}},[e._v("详情")])]}}])})],2),e._v(" "),l("el-row",[l("el-pagination",{directives:[{name:"show",rawName:"v-show",value:0!==e.settleList.length,expression:"settleList.length !==0"}],staticClass:"pagination",attrs:{"current-page":e.currPage4Sum,"page-sizes":[10,30,50,100],"page-size":e.listQuery.limit,layout:"total, sizes, prev, pager, next",total:e.total4Sum},on:{"size-change":function(e){return t.listQuery.limit=e},"current-change":function(e){return t.currPage4Sum=e}}})],1),e._v(" "),l("el-dialog",{attrs:{title:"结算订单详情",visible:e.dialogTableVisible,width:"60%"},on:{"update:visible":function(t){e.dialogTableVisible=t}}},[l("el-row",{directives:[{name:"loading",rawName:"v-loading.body",value:e.dialogTableListLoading,expression:"dialogTableListLoading",modifiers:{body:!0}}],attrs:{"element-loading-text":"拼命加载中"}},[l("el-table",{attrs:{data:e.orderDetailList,"header-row-class-name":"headerClz","tooltip-effect":"light",stripe:"",border:"",fit:""}},[l("el-table-column",{attrs:{property:"createdAt",label:"交易时间",formatter:e.timeFmt,width:"160"}}),e._v(" "),l("el-table-column",{attrs:{property:"orderNumber",label:"订单号"}}),e._v(" "),l("el-table-column",{attrs:{property:"orderAmount",label:"订单金额"}}),e._v(" "),l("el-table-column",{attrs:{property:"realPayAmount",label:"实付金额"}}),e._v(" "),l("el-table-column",{attrs:{property:"discountAmount",label:"优惠金额"}}),e._v(" "),l("el-table-column",{attrs:{property:"payTypeName",label:"支付方式"}}),e._v(" "),l("el-table-column",{attrs:{property:"orderTypeName",label:"订单类型"}}),e._v(" "),e._l(e.billSubjectDetailList,function(t){return l("el-table-column",{key:t.label,attrs:{property:t.prop,label:t.label}})})],2)],1),e._v(" "),l("el-row",[l("el-pagination",{staticClass:"pagination",attrs:{"current-page":e.currPage,"page-sizes":[10,30,50,100],"page-size":e.detailListQuery.limit,layout:"total, sizes, prev, pager, next",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{on:{click:function(t){e.dialogTableVisible=!1}}},[e._v("取 消")]),e._v(" "),l("el-button",{attrs:{type:"primary"},on:{click:e.exportDetailExcel}},[e._v("导 出")])],1)],1)],1)},n=[],a={render:l,staticRenderFns:n};e.a=a},HCGl:function(t,e,i){"use strict";var l=i("Rn1g");e.a={name:"doSettle",data:function(){return{listQuery:{schedule:"",billNumber:null,rebuild:0,orgId:this.$store.getters.orgId,isPage:!1,limit:10,offset:0,settleId:null},cols:[],detailListQuery:{billNumber:null,shopId:null,isPage:!0,limit:10,offset:0},dialogTableVisible:!1,listLoading:!0,dialogTableListLoading:!0,settleList:[],settleList4Page:[],schedules:[],total:0,currPage4Sum:1,total4Sum:0,currPage:1,orderDetailList:[],billSubjectDetailList:[]}},created:function(){this.fetchData()},watch:{settleList:function(t){this.total4Sum=t.length,this.settleList4Page=t.length<this.listQuery.limit?t:t.slice(0,this.listQuery.limit)},"listQuery.limit":function(t){this.settleList4Page=this.settleList<t?this.settleList:this.settleList.slice(0,t)},currPage4Sum:function(t){this.settleList4Page=this.settleList.slice((t-1)*this.listQuery.limit,t*this.listQuery.limit)}},methods:{fetchData:function(){var t=this;this.listLoading=!0,i.i(l.l)().then(function(e){t.schedules=e.result.billCycleList,t.listLoading=!1})},toSettle:function(){var t=this;if(null===this.listQuery.billNumber)return void this.$message({type:"warning",message:"周期必须选择"});this.listLoading=!0;var e=this,n=function(){i.i(l.m)(e.listQuery).then(function(t){"2"===t.result.taskStatus?(e.settleList=e.formatSettleData(t.result.billList),e.addCols(t.result.billList)):"1"===t.result.taskStatus?e.$message({type:"info",message:"结算数据计算中,请稍后查看."}):"3"===t.result.taskStatus&&e.$message({type:"warning",message:"结算数据计算失败,请重新结算."}),e.listLoading=!1})};i.i(l.n)(this.listQuery).then(function(e){e.result.exist?t.$confirm('结算信息已存在,是否需要重新结算?"取消"显示上次结算内容。',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.listQuery.rebuild=1,n()}).catch(function(){t.listQuery.rebuild=0,n()}):(t.listQuery.rebuild=1,n())})},toArchive:function(){var t=this;if(null===this.listQuery.billNumber)return void this.$message({type:"warning",message:"周期必须选择"});this.$confirm("是否确认归档?请注意归档后结算内容将不可更改。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){i.i(l.o)(t.listQuery).then(function(){t.$message({type:"success",message:"归档成功!"}),t.settleList=[],t.listQuery.billNumber=null,i.i(l.l)().then(function(e){t.schedules=e.result.billCycleList})})})},exportExcel:function(){var t=this;if(0===this.settleList.length)return void this.$message({type:"warning",message:"请先选择周期查询结算数据后再导出"});i.e(91).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 n=t.formatJson(l,t.settleList);e.export_json_to_excel(i,n,"分润列表")})},exportDetailExcel:function(){var t=this;i.e(91).then(i.bind(null,"zWO4")).then(function(e){var n={billNumber:t.detailListQuery.billNumber,shopId:t.detailListQuery.shopId,isPage:!1},a=["交易时间","订单号","订单金额","实付金额","优惠金额","支付方式","订单类型"],r=["createdAt","orderNumber","orderAmount","realPayAmount","discountAmount","payTypeName","orderTypeName"];t.billSubjectDetailList.forEach(function(t){a.push(t.label),r.push(t.prop)});var s=t.timeFmt;i.i(l.h)(n).then(function(i){var l=i.result.paginationExtendBean.rows;l.forEach(function(t){t.createdAt=s({createdAt:t.createdAt},null),t.billSubjectDetailList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount})});var n=t.formatJson(r,l);e.export_json_to_excel(a,n,"订单分润列表")})})},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(l.h)(this.detailListQuery).then(function(i){0===e.billSubjectDetailList.length&&i.result.paginationExtendBean.rows.length>0&&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()},formatSettleData:function(t){return t.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){this.cols=[];var e=this;this.cols.push({prop:"shopName",label:"门店名称"}),this.cols.push({prop:"billAmount",label:"总帐"}),t.length>0&&t[0].billSubjectList.length>0&&(t[0].billSubjectList.forEach(function(t){e.cols.push({prop:"profitAmount"+t.subjectName,label:t.subjectName+"分润"})}),null!==t[0].billSubjectList[0].billPayTypeList&&0!==t[0].billSubjectList[0].billPayTypeList.length&&t[0].billSubjectList[0].billPayTypeList.forEach(function(i){t[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,n=t.getDate(),a=t.getHours(),r=t.getMinutes(),s=t.getSeconds();return[e,l,n].map(i).join("-")+" "+[a,r,s].map(i).join(":")}(new Date(t.createdAt))}}}},JsPE:function(t,e,i){var l=i("P6eo");"string"==typeof l&&(l=[[t.i,l,""]]),l.locals&&(t.exports=l.locals);i("rjj0")("bec7b5d8",l,!0)},KZqA:function(t,e,i){"use strict";function l(t){i("7NtY"),i("JsPE")}Object.defineProperty(e,"__esModule",{value:!0});var n=i("HCGl"),a=i("DMBM"),r=i("VU/8"),s=l,o=r(n.a,a.a,s,"data-v-df0d5b92",null);e.default=o.exports},P6eo:function(t,e,i){e=t.exports=i("FZ+f")(!0),e.push([t.i,".headerClz th{background-color:#ececec!important}","",{version:3,sources:["D:/projects/gitLab/wxpos/posadmin/src/views/transaction/settle/doSettle.vue"],names:[],mappings:"AACA,cACE,kCAAqC,CACtC",file:"doSettle.vue",sourcesContent:["\n.headerClz th {\n background-color: #ececec !important;\n}\n"],sourceRoot:""}])},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 n(t){return i.i(v.a)({url:"/unionService/bill/noAcceptBills",method:"get",params:t})}function a(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 s(t){return i.i(v.a)({url:"/unionService/bill/billDetails",method:"get",params:t})}function o(){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 b(t){return i.i(v.a)({url:"/unionService/billSettlementRule/billSettlementRule?ruleId="+t,method:"get"})}function p(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 h(){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.n=l,e.m=n,e.o=a,e.g=r,e.h=s,e.l=o,e.i=u,e.k=c,e.j=d,e.d=b,e.e=p,e.f=m,e.b=h,e.c=f,e.a=g;var v=i("Vo7i")},"c+GH":function(t,e,i){e=t.exports=i("FZ+f")(!0),e.push([t.i,".tip[data-v-df0d5b92]{padding:8px 16px;background-color:#ecf8ff;border-radius:4px;border-left:5px solid #50bfff;margin:20px 0}.tip p[data-v-df0d5b92]{font-size:14px;color:#5e6d82;line-height:1.5em}","",{version:3,sources:["D:/projects/gitLab/wxpos/posadmin/src/views/transaction/settle/doSettle.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:"doSettle.vue",sourcesContent:["\n.tip[data-v-df0d5b92] {\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-df0d5b92] {\n font-size: 14px;\n color: #5e6d82;\n line-height: 1.5em;\n}\n"],sourceRoot:""}])}});
  2. //# sourceMappingURL=45.468b29bc791c5a89db02.js.map