25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2 lines
12 KiB

  1. webpackJsonp([57],{"7NtY":function(t,e,l){var i=l("c+GH");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);l("rjj0")("765d118c",i,!0)},DMBM:function(t,e,l){"use strict";var i=function(){var t=this,e=t.$createElement,l=t._self._c||e;return l("div",{staticClass:"app-container"},[l("el-form",{ref:"listQuery",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.listQuery}},[l("el-form-item",{attrs:{label:"周期",prop:"schedule"}},[l("el-select",{attrs:{placeholder:"周期",name:"billNumber",clearable:""},model:{value:t.listQuery.billNumber,callback:function(e){t.$set(t.listQuery,"billNumber",e)},expression:"listQuery.billNumber"}},t._l(t.schedules,function(t){return l("el-option",{key:t.billNumber,attrs:{label:t.billName,value:t.billNumber}})}))],1),t._v(" "),l("el-form-item",[l("el-button",{attrs:{type:"primary"},on:{click:t.toSettle}},[t._v("结算")]),t._v(" "),l("el-button",{attrs:{type:"success"},on:{click:t.toArchive}},[t._v("归档")]),t._v(" "),l("el-button",{on:{click:t.exportExcel}},[t._v("导出")])],1)],1),t._v(" "),l("el-table",{directives:[{name:"loading",rawName:"v-loading.body",value:t.listLoading,expression:"listLoading",modifiers:{body:!0}},{name:"show",rawName:"v-show",value:0!==t.settleList.length,expression:"settleList.length !==0"}],attrs:{data:t.settleList,"element-loading-text":"拼命加载中",border:"",fit:"",size:"small","highlight-current-row":"","tooltip-effect":"light",stripe:"","header-row-class-name":"headerClz"}},[t._l(t.cols,function(t){return l("el-table-column",{key:t.prop,attrs:{"show-overflow-tooltip":"",prop:t.prop,label:t.label}})}),t._v(" "),l("el-table-column",{attrs:{align:"center",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[l("el-button",{attrs:{size:"small",type:"text"},on:{click:function(l){t.view(e.row.billNumber,e.row.shopId)}}},[t._v("详情")])]}}])})],2),t._v(" "),l("div",{directives:[{name:"show",rawName:"v-show",value:0===t.settleList.length,expression:"settleList.length ===0"}],staticClass:"tip"},[l("p",[t._v("暂无数据,请先选择结算周期进行结算")])]),t._v(" "),l("el-dialog",{attrs:{title:"结算订单详情",visible:t.dialogTableVisible,width:"60%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[l("el-row",[l("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:"","header-row-class-name":"headerClz"}},[l("el-table-column",{attrs:{property:"createdAt",label:"交易时间",formatter:t.timeFmt,width:"160"}}),t._v(" "),l("el-table-column",{attrs:{property:"orderNumber",label:"订单号"}}),t._v(" "),l("el-table-column",{attrs:{property:"orderAmount",label:"订单金额"}}),t._v(" "),l("el-table-column",{attrs:{property:"realPayAmount",label:"实付金额"}}),t._v(" "),l("el-table-column",{attrs:{property:"discountAmount",label:"优惠金额"}}),t._v(" "),l("el-table-column",{attrs:{property:"payTypeName",label:"支付方式"}}),t._v(" "),l("el-table-column",{attrs:{property:"orderTypeName",label:"订单类型"}}),t._v(" "),t._l(t.billSubjectDetailList,function(t){return l("el-table-column",{key:t.label,attrs:{property:t.prop,label:t.label}})})],2)],1),t._v(" "),l("el-row",[l("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(" "),l("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{on:{click:function(e){t.dialogTableVisible=!1}}},[t._v("取 消")]),t._v(" "),l("el-button",{attrs:{type:"primary"},on:{click:t.exportDetailExcel}},[t._v("导 出")])],1)],1)],1)},n=[],a={render:i,staticRenderFns:n};e.a=a},HCGl:function(t,e,l){"use strict";var i=l("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:[],schedules:[],total:0,currPage:1,orderDetailList:[],billSubjectDetailList:[]}},created:function(){this.fetchData()},methods:{fetchData:function(){var t=this;this.listLoading=!0,l.i(i.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,l.i(i.m)(this.listQuery).then(function(e){e.result.exist?t.$confirm('结算信息已存在,是否需要重新结算?"否"显示上次结算内容。',"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.listQuery.rebuild=1,l.i(i.n)(t.listQuery).then(function(e){t.settleList=t.formatSettleData(e.result.billList),t.addCols(e.result.billList),t.listLoading=!1})}).catch(function(){t.listQuery.rebuild=0,l.i(i.n)(t.listQuery).then(function(e){t.settleList=t.formatSettleData(e.result.billList),t.addCols(e.result.billList),t.listLoading=!1})}):(t.listQuery.rebuild=1,l.i(i.n)(t.listQuery).then(function(e){t.settleList=t.formatSettleData(e.result.billList),t.addCols(e.result.billList),t.listLoading=!1}))})},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(){l.i(i.o)(t.listQuery).then(function(){t.$message({type:"success",message:"归档成功!"}),t.settleList=[],t.listQuery.billNumber=null,l.i(i.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:"请先选择周期查询结算数据后再导出"});l.e(85).then(l.bind(null,"zWO4")).then(function(e){var l=[],i=[];t.cols.forEach(function(t){l.push(t.label),i.push(t.prop)});var n=t.formatJson(i,t.settleList);e.export_json_to_excel(l,n,"分润列表")})},exportDetailExcel:function(){var t=this;l.e(85).then(l.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 o=t.timeFmt;l.i(i.h)(n).then(function(l){var i=l.result.paginationExtendBean.rows;i.forEach(function(t){t.createdAt=o({createdAt:t.createdAt},null),t.billSubjectDetailList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount})});var n=t.formatJson(r,i);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;l.i(i.h)(this.detailListQuery).then(function(l){0===e.billSubjectDetailList.length&&l.result.paginationExtendBean.rows[0].billSubjectDetailList.forEach(function(t){e.billSubjectDetailList.push({label:t.subjectName,prop:"profitAmount"+t.subjectName})}),t.orderDetailList=l.result.paginationExtendBean.rows,t.orderDetailList.forEach(function(t){t.billSubjectDetailList.forEach(function(e){t["profitAmount"+e.subjectName]=e.profitAmount})}),t.total=l.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(l){t[e.subjectName+"_amount"+l.payType]=l.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(l){t[0].billSubjectList.forEach(function(t){e.cols.push({prop:t.subjectName+"_amount"+l.payType,label:t.subjectName+l.payTypeName+"分润"})})}))},timeFmt:function(t,e){var l=function(t){return t=t.toString(),t[1]?t:"0"+t};return function(t){var e=t.getFullYear(),i=t.getMonth()+1,n=t.getDate(),a=t.getHours(),r=t.getMinutes(),o=t.getSeconds();return[e,i,n].map(l).join("-")+" "+[a,r,o].map(l).join(":")}(new Date(t.createdAt))}}}},KZqA:function(t,e,l){"use strict";function i(t){l("7NtY")}Object.defineProperty(e,"__esModule",{value:!0});var n=l("HCGl"),a=l("DMBM"),r=l("VU/8"),o=i,s=r(n.a,a.a,o,"data-v-df0d5b92",null);e.default=s.exports},Rn1g:function(t,e,l){"use strict";function i(t){return l.i(v.a)({url:"/service-trade/bill/billExistStatus",method:"get",params:t})}function n(t){return l.i(v.a)({url:"/unionService/bill/noAcceptBills",method:"get",params:t})}function a(t){return l.i(v.a)({url:"/service-trade/bill/billAccept",method:"put",data:t})}function r(t){return l.i(v.a)({url:"/unionService/bill/acceptBills",method:"get",params:t})}function o(t){return l.i(v.a)({url:"/unionService/bill/billDetails",method:"get",params:t})}function s(){return l.i(v.a)({url:"/service-trade/bill/noAcceptBillNumbers",method:"get"})}function u(){return l.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"get"})}function c(t){return l.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"post",data:t})}function d(t){return l.i(v.a)({url:"/service-trade/billSettlementCycle/billSettlementCycle",method:"put",data:t})}function b(t){return l.i(v.a)({url:"/unionService/billSettlementRule/billSettlementRule?ruleId="+t,method:"get"})}function p(t){return l.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule",method:"post",data:t})}function m(t){return l.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule",method:"put",data:t})}function f(){return l.i(v.a)({url:"/unionService/billSettlementRule/billSettlementRules",method:"get"})}function h(t){return l.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRule?ruleId="+t,method:"delete"})}function g(t){return l.i(v.a)({url:"/service-trade/billSettlementRule/billSettlementRuleSort",method:"put",data:t})}e.m=i,e.n=n,e.o=a,e.g=r,e.h=o,e.l=s,e.i=u,e.k=c,e.j=d,e.d=b,e.e=p,e.f=m,e.b=f,e.c=h,e.a=g;var v=l("Vo7i")},"c+GH":function(t,e,l){e=t.exports=l("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}.headerClz th[data-v-df0d5b92]{background-color:#ececec!important}","",{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,AACD,+BACE,kCAAqC,CACtC",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.headerClz th[data-v-df0d5b92] {\n background-color: #ececec !important;\n}\n"],sourceRoot:""}])}});
  2. //# sourceMappingURL=57.40f3faab84911afd4ca2.js.map