(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-87a2d2de"],{"09f4":function(e,t,a){"use strict";a.d(t,"a",(function(){return l})),Math.easeInOutQuad=function(e,t,a,r){return e/=r/2,e<1?a/2*e*e+t:(e--,-a/2*(e*(e-2)-1)+t)};var r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function n(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}function o(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(e,t,a){var l=o(),u=e-l,i=20,s=0;t="undefined"===typeof t?500:t;var c=function e(){s+=i;var o=Math.easeInOutQuad(s,l,u,t);n(o),s1?a("el-button",{attrs:{icon:"el-icon-minus",disabled:!e.isAdd,circle:""},on:{click:function(a){return a.preventDefault(),e.removeGoodsList(t)}}}):e._e(),e._v(" "),a("el-button",{staticStyle:{"margin-left":"5px"},attrs:{icon:"el-icon-plus",disabled:!e.isAdd,circle:""},on:{click:function(t){return t.preventDefault(),e.addGoodsList(t)}}})],1)})),0):e._e(),e._v(" "),a("div",{staticClass:"lookTitle"},[e._v("其它")]),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"memo","label-width":e.formLabelWidth}},[a("el-input",{attrs:{placeholder:"请输入备注",disabled:!e.isAdd,type:"textarea",rows:3},model:{value:e.form.memo,callback:function(t){e.$set(e.form,"memo","string"===typeof t?t.trim():t)},expression:"form.memo"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.routeOrderStatus=!1}}},[e._v("取 消")]),e._v(" "),e.isAdd?a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onOrderSubmit("ruleForm")}}},[e._v("确 定")]):a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.routeOrderStatus=!1}}},[e._v("确 定")])],1)],1)],1)])},n=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("h2",[a("div",{staticClass:"squrt"}),e._v("财务管理\n ")])}],o=(a("ac6a"),a("28a5"),a("386d"),a("333d")),l=a("3de3"),u=a("2543"),i=a("1cc7"),s=a("92e3"),c=a("e3eb"),d=a.n(c),m=a("bc3a"),p=a.n(m),f=a("4328"),b=a.n(f),v=a("5f87"),h=a("3908"),g=a("adb2"),y=function(e,t,a){t?t<0?a(new Error("输入商品数量必须大于0")):t>999?a(new Error("输入商品数量必须小于999")):a():a(new Error("请输入商品数量"))},A={components:{pagination:o["a"]},name:"incomeTwo",data:function(){return{orderStatus:s["r"],dealStatus:s["k"],orderDate:null,searchForm:{search:null,orderStartDate:null,orderEndDate:null,paymentStatus:"SUCCESS",paymentType:null,routingOrganId:null,actualAmount:null,balancePaymentAmount:null,orderNo:null,transNo:null,merNos:null,lessBalancePaymentAmount:null,lessActualAmount:null},tableList:[],organList:[],shopList:[],cooperationList:[],orderServerList:s["q"],pageInfo:{limit:10,page:1,total:0,page_size:[10,20,40,50]},totalUserBalance:0,totalActualAmount:0,totalAdvanceAmount:0,totalRevenueAmount:0,formLabelWidth:"100px",routeOrderStatus:!1,isAdd:!0,form:{routeOrganId:null,transNo:null,type:"OTHER",merNo:null,actualAmount:null,memo:null,payTime:null,serviceAmount:null,saleAmount:null,schoolId:null,goodsList:[{id:null,number:null}],applyType:null,userId:""},validAmount:[{required:!0,validator:y,trigger:"blur"},{type:"number",message:"商品数量必须为数字"}],rules:{organId:[{required:!0,message:"请选择所属分部",trigger:"change"}],actualAmount:[{required:!0,message:"请输入金额",trigger:"blur"}],transNo:[{required:!0,message:"请输入交易流水号",trigger:"blur"}],merNo:[{required:!0,message:"请输入收款账户",trigger:"blur"}],payTime:[{required:!0,message:"选择交易日期",trigger:"change"}],applyType:[{required:!0,message:"请选择收入类型",trigger:"change"}]},headers:{Authorization:Object(v["a"])()}}},mounted:function(){var e=this;Object(i["U"])().then((function(t){200==t.code&&(e.organList=t.data)})),Object(u["i"])({status:1,rows:99999}).then((function(t){200===t.code&&(e.shopList=t.data.rows)}));var t=new Date,a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())).toISOString().slice(0,10),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())).toISOString().slice(0,10);this.orderDate=[],this.orderDate.push(a),this.orderDate.push(r),this.getList()},methods:{onClear:function(e){"paymentType"==e?this.searchForm.paymentType=null:"paymentStatus"==e?this.searchForm.paymentStatus=null:"routingOrganId"==e&&(this.searchForm.routingOrganId=null)},onOrderSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(e){var a=t.form;if(a.saleAmount||a.serviceAmount){a.saleAmount||(a.goodsList=null);var r={};for(var n in a.goodsList)r[a.goodsList[n]["id"]]=a.goodsList[n]["number"];a.goodsJson="SERVICE"==a.applyType?null:JSON.stringify(r),Object(l["p"])(a).then((function(e){200==e.code?(t.$message.success("添加成功"),t.routeOrderStatus=!1,t.getList()):t.$message.error(e.msg)}))}else t.$message.error("请输入销售收入或服务收入")}}))},onFormClose:function(e){this.$refs[e].resetFields()},onOrderExport:function(){var e="/api-web/export/routeOrderList",t=this.searchForm,a={orderType:3,search:t.search,orderNo:t.orderNo,transNo:t.transNo,merNos:t.merNos,actualAmount:t.actualAmount,balancePaymentAmount:t.balancePaymentAmount,paymentStatus:t.paymentStatus,paymentType:t.paymentType,organId:t.organId,lessBalancePaymentAmount:t.lessBalancePaymentAmount,lessActualAmount:t.lessActualAmount};this.orderDate&&this.orderDate.length>0?(a.orderStartDate=this.orderDate[0],a.orderEndDate=this.orderDate[1]):(a.orderStartDate=null,a.orderEndDate=null);var r={method:"POST",headers:{Authorization:Object(v["a"])()},data:b.a.stringify(d()(a)),url:e,responseType:"blob"};this.$confirm("您确定导出报表","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){h["a"].startLoading(),p()(r).then((function(e){var t=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),a=URL.createObjectURL(t),r=document.createElement("a"),n=new Date,o=(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),"报表导出"+(new Date).getTime());r.href=a,r.setAttribute("download",o),document.body.appendChild(r),r.click(),h["a"].endLoading()}))})).catch((function(){}))},onAdaPayExport:function(){var e="/api-web/adapay/exportBill",t={};if(this.orderDate&&this.orderDate.length>0){t.startTime=this.orderDate[0],t.endTime=this.orderDate[1];var a={method:"get",headers:{Authorization:Object(v["a"])()},params:t,url:e,responseType:"blob"};this.$confirm("您确定导出汇付订单","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){h["a"].startLoading(),p()(a).then((function(e){var t=new Blob([e.data],{type:"application/vnd.ms-excel;charset=utf-8"}),a=URL.createObjectURL(t),r=document.createElement("a"),n="汇付订单"+(new Date).getTime();r.href=a,r.setAttribute("download",n),document.body.appendChild(r),r.click(),h["a"].endLoading()}))})).catch((function(){}))}else this.$message.error("请选择开始日期和结束日期")},search:function(){this.pageInfo.page=1,this.getList()},getList:function(){var e=this,t=JSON.parse(JSON.stringify(this.searchForm));t.rows=this.pageInfo.limit,t.page=this.pageInfo.page,t.orderNo=t.orderNo?t.orderNo:null,t.transNo=t.transNo?t.transNo:null,t.merNos=t.merNos?t.merNos:null,t.actualAmount=t.actualAmount?t.actualAmount:null,t.balancePaymentAmount=t.balancePaymentAmount?t.balancePaymentAmount:null,this.orderDate&&this.orderDate.length>0?(t.orderStartDate=this.orderDate[0],t.orderEndDate=this.orderDate[1]):(t.orderStartDate=null,t.orderEndDate=null),Object(l["q"])(d()(t)).then((function(t){var a=t.data;200==t.code&&(e.tableList=a.rows,e.pageInfo.total=a.total,e.totalUserBalance=a.totalUserBalance?a.totalUserBalance:0,e.totalActualAmount=a.totalActualAmount?a.totalActualAmount:0,e.totalAdvanceAmount=a.totalAdvanceAmount?a.totalAdvanceAmount:0,e.totalRevenueAmount=a.totalRevenueAmount?a.totalRevenueAmount:0)}))},searchOrderDate:function(e){e?(this.searchForm.orderStartDate=e[0],this.searchForm.orderEndDate=e[1]):(this.searchForm.orderStartDate=null,this.searchForm.orderEndDate=null)},onReSet:function(){this.orderDate=null,this.searchForm={search:null,orderStartDate:null,orderEndDate:null,paymentStatus:null,paymentType:null,routingOrganId:null,actualAmount:null,balancePaymentAmount:null,orderNo:null,transNo:null,merNos:null,lessBalancePaymentAmount:null,lessActualAmount:null},this.getList()},removeGoodsList:function(e){var t=this.form.goodsList.indexOf(e);-1!==t&&this.form.goodsList.splice(t,1)},addGoodsList:function(){this.form.goodsList.push({id:null,number:null})},changeOrgin:function(e){var t=this;this.$set(this.form,"schoolId",null),e&&Object(i["O"])({rows:9999,organId:e}).then((function(e){200===e.code&&(t.cooperationList=e.data.rows)}))},checkSchool:function(e){},checkgoods:function(e){for(var t=0;t<=this.form.goodsList.length-1;t++)t!=this.form.goodsList.length-1&&this.form.goodsList[t].id===e&&(this.form.goodsList[this.form.goodsList.length-1].id="")},lookOrderInfo:function(e){var t=this;this.isAdd=!1,Object(l["e"])({orderId:e.id}).then((function(e){200===e.code&&t.$nextTick((function(a){var r=e.data.studentPaymentOrder;t.changeOrgin(parseInt(r.organId)),t.form={routeOrganId:r.organId,transNo:r.transNo,userId:r.userId?r.userId:"",type:"OTHER",merNo:r.merNos,actualAmount:r.actualAmount,memo:r.memo,payTime:r.payTime,serviceAmount:e.data.serviceAmount,saleAmount:e.data.goodsAmount,schoolId:parseInt(r.musicGroupId)||" ",applyType:"SELL"},t.$set(t.form,"goodsList",e.data.sellOrders.map((function(e){return{id:e.goodsId,number:e.num}}))),t.routeOrderStatus=!0}))}))},removeOrderInfo:function(e){var t=this;this.$confirm("确定删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(l["j"])({orderId:e.id}).then((function(e){200===e.code&&(t.$message.success("删除成功"),t.getList())}))})).catch()},onDownload:function(){Object(g["a"])(this,{url:"/api-web/import/downloadTemplate",params:{templateType:"ROUTE_ORDER"},fileName:"财务管理导入模板.xlsx"})},beforeUpload:function(e){h["a"].startLoading()},handleSuccess:function(e,t,a){if(h["a"].endLoading(),200==e.code)this.$message.success("导入成功");else if(0==e.code){var r=this.fomatStr(e.msg);this.$alert(r,"导入结果",{confirmButtonText:"确定",dangerouslyUseHTMLString:!0,callback:function(e){}})}else this.$message.error(e.msg)},handleError:function(e,t,a){h["a"].endLoading(),console.log(e,t,a)},fomatStr:function(e){var t=e.split(";"),a="";return t.forEach((function(e){a+="

".concat(e,"

")})),a},changeApplyType:function(e){this.form.serviceAmount=null,this.form.saleAmount=null}}},O=A,_=(a("1ed3"),a("2877")),S=Object(_["a"])(O,r,n,!1,null,"531917c1",null);t["default"]=S.exports},da22:function(e,t,a){}}]);