2024-09-05 09:27:56 +08:00

1 line
183 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["g"],{"02b4":function(e,t,a){},"0c5d":function(e,t,a){"use strict";a("614d")},"0f14e":function(e,t,a){},1784:function(e,t,a){"use strict";a("3ae6")},"1a73":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"invoice area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"发票状态",multiple:"","collapse-tags":""},model:{value:e.searchFrom.invoice,callback:function(t){e.$set(e.searchFrom,"invoice",t)},expression:"searchFrom.invoice"}},[t("el-option",{attrs:{label:"未开票",value:0}}),t("el-option",{attrs:{label:"部分开票",value:1}}),t("el-option",{attrs:{label:"已开票",value:2}})],1)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"单据类型",multiple:"","collapse-tags":""},model:{value:e.searchFrom.mold,callback:function(t){e.$set(e.searchFrom,"mold",t)},expression:"searchFrom.mold"}},[t("el-option",{attrs:{label:"采购单",value:"buy"}}),t("el-option",{attrs:{label:"采购退货单",value:"bre"}}),t("el-option",{attrs:{label:"销售单",value:"sell"}}),t("el-option",{attrs:{label:"销售退货单",value:"sre"}})],1)],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[e.$lib.getUserRoot(e.store.root,"invoice","edit")?[t("el-button",{on:{click:e.handle}},[e._v("开票")])]:e._e(),t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],ref:"dataTable",staticClass:"gridTable",attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px"}}),t("el-table-column",{attrs:{prop:"name",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"current.name",label:"往来单位",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"180px"}}),t("el-table-column",{attrs:{prop:"extension.invoice",label:"发票状态",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"actual",label:"单据金额",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"iat",label:"已开票金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"ani",label:"未开票金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"money",label:"开票金额",align:"center",width:"90px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("input",{directives:[{name:"model",rawName:"v-model",value:a.row.money,expression:"scope.row.money"}],attrs:{type:"text",readonly:2==a.row.invoice},domProps:{value:a.row.money},on:{click:function(e){e.stopPropagation()},input:[function(t){t.target.composing||e.$set(a.row,"money",t.target.value)},function(t){return e.moneyChange(a.row)}]}})]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],attrs:{visible:e.dialog.show,title:"发票详情",width:"420px"},on:{"update:visible":function(t){return e.$set(e.dialog,"show",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.dialog.show?[t("el-form",{ref:"form",attrs:{model:e.dialog.form,rules:e.dialog.rules,"label-width":"80px"}},[t("el-form-item",{attrs:{label:"合计金额"}},[t("el-input",{attrs:{readonly:""},model:{value:e.summary,callback:function(t){e.summary=t},expression:"summary"}})],1),t("el-form-item",{attrs:{label:"开票时间",prop:"time"}},[t("el-date-picker",{attrs:{placeholder:"开票时间","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.dialog.form.time,callback:function(t){e.$set(e.dialog.form,"time",t)},expression:"dialog.form.time"}})],1),t("el-form-item",{attrs:{label:"发票号码",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入发票号码",clearable:""},model:{value:e.dialog.form.number,callback:function(t){e.$set(e.dialog.form,"number",t)},expression:"dialog.form.number"}})],1),t("el-form-item",{attrs:{label:"发票抬头",prop:"title"}},[t("el-input",{attrs:{placeholder:"请输入发票号码",clearable:""},model:{value:e.dialog.form.title,callback:function(t){e.$set(e.dialog.form,"title",t)},expression:"dialog.form.title"}})],1),t("el-form-item",{attrs:{label:"发票附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"invoice/upload"},model:{value:e.dialog.form.file,callback:function(t){e.$set(e.dialog.form,"file",t)},expression:"dialog.form.file"}})],1),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.dialog.form.data,callback:function(t){e.$set(e.dialog.form,"data",t)},expression:"dialog.form.data"}})],1)],1)]:e._e()],2),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialog.show=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("开票")])],1)],1)],1)},r=[],o=a("b85c"),i=(a("4de4"),a("c740"),a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("a447")),l=a("5549"),n=a("947e"),c={name:"Invoice",components:{NodList:i["a"],NodUpload:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{supplier:null,customer:null,number:"",invoice:[0,1],startTime:"",endTime:"",mold:[]},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"单据总金额",type:"sum",key:"actual"},{text:"已开票总金额",type:"sum",key:"iat"},{text:"未开票总金额",type:"sum",key:"ani"}]},source:[],dialog:{show:!1,form:{time:"",number:"",title:"",file:[],data:""},rules:{time:{required:!0,message:"请选择开票日期",trigger:"change"},number:{required:!0,message:"请输入发票号码",trigger:"blur"},title:{required:!0,message:"请输入发票抬头",trigger:"blur"}}}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state},summary:function(){var e,t=this.$calc.chain(0),a=Object(o["a"])(this.source);try{for(a.s();!(e=a.n()).done;){var s=e.value;t.add(s.money)}}catch(r){a.e(r)}finally{a.f()}return t.done()}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("invoice/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},handle:function(){var e=this.tableSelection.filter((function(e){return 2!=e.invoice}));if(0==e.length)this.$message({type:"warning",message:"未选中有效发票数据!"});else{this.source=[];var t,a=Object(o["a"])(e);try{for(a.s();!(t=a.n()).done;){var s=t.value;if(!this.$lib.validate("invoice",s.money))return this.$message({type:"warning",message:"单据编号[ "+s.number+" ]开票金额不正确!"}),!1;if(s.money-0>s.ani-0)return this.$message({type:"warning",message:"单据编号[ "+s.number+" ]开票金额不可大于未开票金额!"}),!1;this.source.push({type:s.mold,class:s.id,money:s.money})}}catch(r){a.e(r)}finally{a.f()}this.dialog.form=Object.assign({},this.$options.data().dialog.form),this.dialog.form.time=this.$moment().format("YYYY-MM-DD"),this.dialog.show=!0}},save:function(){var e=this;this.$refs["form"].validate((function(t){if(t){var a,s=[],r=e.dialog.form,i=Object(o["a"])(e.source);try{for(i.s();!(a=i.n()).done;){var l=a.value;s.push({type:l.type,class:l.class,time:r.time,number:r.number,title:r.title,money:l.money,file:r.file,data:r.data})}}catch(n){i.e(n)}finally{i.f()}e.$axios.post("invoice/save",{data:s}).then((function(t){"success"==t.state?(e.record(0),e.dialog.show=!1,e.$message({type:"success",message:"开具发票成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))}}))},exports:function(){var e=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.tableSelection.map((function(e){return{mold:e.mold,id:e.id}})),a=this.$lib.objToParm({parm:t},!0);setTimeout((function(){window.open(e.$base.web+"invoice/exports?"+a)}),1e3)}},moneyChange:function(e){""==e.money||0==e.money?this.$refs.dataTable.toggleRowSelection(e,!1):this.$refs.dataTable.toggleRowSelection(e,!0)},selectionChange:function(e){for(var t=this,a=function(){var a=t.tableData[s],r=e.findIndex((function(e){return e.id==a.id&&e.mold==a.mold}));-1==r?a.money="":""==a.money&&2!=a.invoice&&(a.money=a.ani)},s=0;s<this.tableData.length;s++)a();this.tableSelection=e},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("4ff9"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,"6b1230cc",null);t["default"]=p.exports},"1d6c":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ice bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{attrs:{label:"客户"}},[t("template",{slot:"label"},[t("span",{on:{click:function(t){return e.switchPage("customer")}}},[e._v("客户")])]),t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.form.customer,callback:function(t){e.$set(e.form,"customer",t)},expression:"form.customer"}})],2),t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{addRow:function(t){return e.pushGrid([{}],!0)}}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"单据金额"}},[t("el-input",{attrs:{placeholder:"请输入单据金额",disabled:!0},model:{value:e.form.total,callback:function(t){e.$set(e.form,"total",t)},expression:"form.total"}})],1),t("el-form-item",{attrs:{label:"实际金额",prop:"actual"}},[t("el-input",{attrs:{placeholder:"请输入实际金额",clearable:""},model:{value:e.form.actual,callback:function(t){e.$set(e.form,"actual",t)},expression:"form.actual"}},[t("template",{slot:"suffix"},[t("i",{staticClass:"el-icon-copy-document",on:{click:function(t){e.form.actual=e.form.total}}})])],2)],1),t("el-form-item",{attrs:{label:"实收金额",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入实收金额",clearable:""},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}},[t("template",{slot:"suffix"},[t("i",{staticClass:"el-icon-copy-document",on:{click:function(t){e.form.money=e.form.actual}}})])],2)],1),t("el-form-item",{attrs:{label:"结算账户",prop:"account"}},[t("nodList",{attrs:{placeholder:"请选择结算账户",action:"service/accountRecord",scene:"account"},model:{value:e.form.account,callback:function(t){e.$set(e.form,"account",t)},expression:"form.account"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"ice/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"ice",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"ice","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"ice","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("d9e2"),a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("6bf1"),c=a("df05"),m=a("b786"),u=a("c3e3"),p=a("a447"),d=a("5549"),f=a("5fb4"),h={name:"Ice",components:{AgGridVue:i["AgGridVue"],Status:m["a"],LineFeed:u["a"],NodList:p["a"],NodUpload:d["a"],FieldForm:f["a"]},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,customer:null,time:"",number:"",total:0,actual:"",money:"",account:null,people:null,file:[],data:"",examine:0,more:{}},rules:{time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"},actual:[{required:!0,message:"请输入实际金额",trigger:"blur"},{validator:function(t,a,s){e.$lib.synValidate("money",a)?s():s(new Error("实际金额不正确"))},trigger:"blur"}],money:[{required:!0,message:"请输入实收金额",trigger:"blur"},{validator:function(t,a,s){e.$lib.synValidate("money",a)?s():s(new Error("实收金额不正确"))},trigger:"blur"}]},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),ietId:null,iet:"点击选择",money:"",data:""},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],handle:n["a"],rae:c["a"]},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"ice"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"handle",cellRenderer:"handle",hide:!1,dispose:!1},{headerName:"收入类别",width:120,field:"iet",editable:!0,cellEditor:"rae",cellEditorParams:{dispose:{key:"ietId",text:"iet",type:"in"}},hide:!1,dispose:!0},{headerName:"结算金额",width:120,field:"money",editable:!0,hide:!1,dispose:!0},{headerName:"备注信息",width:120,field:"data",editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"},{text:"总金额",type:"sum",key:"money"}]}}},computed:{store:function(){return this.$store.state}},created:function(){this.init()},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="QTSRD"+this.$moment().format("YYMMDDHHmmssS")):this.$axios.post("ice/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["time","number"]).then((function(){var a=e.handleGrid();1==a?e.$lib.aloneValidate(t,["actual","money"]).then((function(){e.form.actual-0>e.form.total-0?e.$message({type:"warning",message:"实际金额不可大于单据金额!"}):e.form.money-0>e.form.actual-0?e.$message({type:"warning",message:"实收金额不可大于实际金额!"}):0!=e.form.money&&null==e.form.account?e.$message({type:"warning",message:"结算账户不可为空!"}):t.validate((function(t){t?e.$axios.post("ice/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})}))})).catch((function(t){e.$message({type:"warning",message:t})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("ice/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},pushGrid:function(e){var t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=[],r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l={uniqid:this.$lib.getUniqid(),ietId:a?null:i.iet,iet:a?"点击选择":i.ietData.name,money:a?"":i.money,data:a?"":i.data};s.push(l)}}catch(n){r.e(n)}finally{r.f()}a?this.grid.options.api.applyTransaction({add:s}):this.grid.options.api.setRowData(s),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)null!=t[a].ietId?this.$lib.synValidate("numerical",t[a].money)||1==e&&(e="数据表格第"+(a+1)+"行结算金额不正确!"):1==e&&(e="数据表格第"+(a+1)+"行收入类别不可为空!");return 1==e&&(this.$set(this,"info",t.map((function(e){return{iet:e.ietId,money:e.money,data:e.data}}))),this.summary()),e},summary:function(){var e=this.$calc.chain(0);this.info.forEach((function(t){e.add(t.money)})),this.form.total=e.done()},switchPage:function(e){this.$bus.emit("switchPage",e,!0)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},b=h,g=a("2877"),v=Object(g["a"])(b,s,r,!1,null,null,null);t["default"]=v.exports},"1e4d":function(e,t,a){},"212d":function(e,t,a){"use strict";a("6c15")},3371:function(e,t,a){},"3ae6":function(e,t,a){},"3c3b":function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"omyForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销状态",clearable:""},model:{value:e.searchFrom.nucleus,callback:function(t){e.$set(e.searchFrom,"nucleus",t)},expression:"searchFrom.nucleus"}},[t("el-option",{attrs:{label:"未核销",value:1}}),t("el-option",{attrs:{label:"部分核销",value:2}}),t("el-option",{attrs:{label:"已核销",value:3}})],1)],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择结算账户",action:"service/accountRecord",scene:"account"},model:{value:e.searchFrom.account,callback:function(t){e.$set(e.searchFrom,"account",t)},expression:"searchFrom.account"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"omy","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"omy","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"omy","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"supplierData.name",label:"供应商",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"nucleus",label:"核销状态",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[0==a.row.billData.length?[t("span",[e._v(e._s(a.row.extension.nucleus))])]:[t("el-popover",{attrs:{"popper-class":"tablePopover",trigger:"click"}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("span",[e._v(e._s(a.row.extension.nucleus))]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("el-table",{attrs:{data:a.row.billData,height:"120px",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"money",label:"核销金额",align:"center",width:"70px"}})],1)],1)]]}}])}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"omy","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Omy",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{attrs:{label:"导入数据",name:"import"}},[t("ul",{staticClass:"importTip"},[t("li",[e._v("1.该功能适用于Excel导入单据数据。")]),t("li",[e._v("2.录入数据时,请勿修改首行数据标题以及排序。")]),t("li",[e._v("3.字段之间存在关联关系时,将自动进行关联运算。")]),t("li",[e._v("4.请查阅使用文档获取字段格式内容以及相关导入须知。")]),t("li",[e._v("5.点击下方上传模板,选择您编辑好的模板文件即可。")])]),t("el-divider"),t("el-row",{staticStyle:{"text-align":"center"}},[t("el-col",{attrs:{span:12}},[t("el-button",{attrs:{type:"info"},on:{click:e.downTemplate}},[e._v("下载模板")])],1),t("el-col",{attrs:{span:12}},[t("el-upload",{attrs:{action:e.$base.web+"omy/import",headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.importCall}},[t("el-button",{attrs:{type:"primary"}},[e._v("上传模板")])],1)],1)],1)],1),t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("6f41")),l=a("a447"),n=a("947e"),c={name:"OmyForm",components:{Omy:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{supplier:null,number:"",startTime:"",endTime:"",people:null,user:null,examine:"",nucleus:"",account:null,data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总单据金额",type:"sum",key:"total"},{text:"总核销金额",type:"sum",key:"extension.amount"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"import"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("omy/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("omy/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("omy/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},downTemplate:function(){var e=this;this.$message({type:"success",message:"[ 数据模板 ] 下载请求中..."}),setTimeout((function(){window.open(e.store.base.cdnSite+"/erp/batch/付款单导入模板.xlsx")}),1e3)},importCall:function(e,t,a){"success"==e.state?(this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"导入单据成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"omy/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("7b30"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},"416f":function(e,t,a){},"4b08":function(e,t,a){},"4fb3":function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"billForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销类型",clearable:""},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},[t("el-option",{attrs:{label:"预收冲应收",value:1}}),t("el-option",{attrs:{label:"预付冲应付",value:2}}),t("el-option",{attrs:{label:"应收冲应付",value:3}}),t("el-option",{attrs:{label:"销退冲销售",value:4}}),t("el-option",{attrs:{label:"购退冲采购",value:5}})],1)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"bill","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"bill","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"bill","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"customerData.name",label:"客户",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"supplierData.name",label:"供应商",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"extension.type",label:"核销类型",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"pmy",label:"核销金额",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"bill","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Bill",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("d463")),l=a("a447"),n=a("947e"),c={name:"BillForm",components:{Bill:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{customer:null,supplier:null,number:"",type:"",people:null,startTime:"",endTime:"",user:null,examine:"",data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总核销金额",type:"sum",key:"pmy"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"export"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("bill/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("bill/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("bill/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"bill/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("f1cd"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},"4ff9":function(e,t,a){"use strict";a("fd13")},"510e":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"imy bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{attrs:{label:"客户",prop:"customer"}},[t("template",{slot:"label"},[t("span",{on:{click:function(t){return e.switchPage("customer")}}},[e._v("客户")])]),t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.form.customer,callback:function(t){e.$set(e.form,"customer",t)},expression:"form.customer"}})],2),t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{addRow:function(t){return e.pushGrid([{}],!0)}}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"单据金额"}},[t("el-input",{attrs:{placeholder:"请输入单据金额",disabled:!0},model:{value:e.form.total,callback:function(t){e.$set(e.form,"total",t)},expression:"form.total"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"imy/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"imy",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"imy","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"imy","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("6bf1"),c=a("831d"),m=a("b786"),u=a("c3e3"),p=a("a447"),d=a("5549"),f=a("5fb4"),h={name:"Imy",components:{AgGridVue:i["AgGridVue"],Status:m["a"],LineFeed:u["a"],NodList:p["a"],NodUpload:d["a"],FieldForm:f["a"]},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,customer:null,time:"",number:"",total:0,people:null,file:[],data:"",examine:0,more:{}},rules:{customer:{required:!0,message:"请选择客户",trigger:"change"},time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"}},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),accountId:null,account:"点击选择",money:"",settle:"",data:""},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],handle:n["a"],fat:c["a"]},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"imy"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"handle",cellRenderer:"handle",hide:!1,dispose:!1},{headerName:"结算账户",width:120,field:"account",editable:!0,cellEditor:"fat",cellEditorParams:{dispose:{key:"accountId",text:"account"}},hide:!1,dispose:!0},{headerName:"结算金额",width:120,field:"money",editable:!0,hide:!1,dispose:!0},{headerName:"结算号",width:120,field:"settle",editable:!0,hide:!1,dispose:!0},{headerName:"备注信息",width:120,field:"data",editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"},{text:"总金额",type:"sum",key:"money"}]}}},computed:{store:function(){return this.$store.state}},created:function(){this.init()},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="SKD"+this.$moment().format("YYMMDDHHmmssS")):this.$axios.post("imy/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["customer","time","number"]).then((function(){var a=e.handleGrid();1==a?t.validate((function(t){t?e.$axios.post("imy/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("imy/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},pushGrid:function(e){var t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=[],r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l={uniqid:this.$lib.getUniqid(),accountId:a?null:i.account,account:a?"点击选择":i.accountData.name,money:a?"":i.money,settle:a?"":i.settle,data:a?"":i.data};s.push(l)}}catch(n){r.e(n)}finally{r.f()}a?this.grid.options.api.applyTransaction({add:s}):this.grid.options.api.setRowData(s),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)null!=t[a].accountId?this.$lib.synValidate("numerical",t[a].money)||1==e&&(e="数据表格第"+(a+1)+"行结算金额不正确!"):1==e&&(e="数据表格第"+(a+1)+"行结算账户不可为空!");return 1==e&&(this.$set(this,"info",t.map((function(e){return{account:e.accountId,money:e.money,settle:e.settle,data:e.data}}))),this.summary()),e},summary:function(){var e=this.$calc.chain(0);this.info.forEach((function(t){e.add(t.money)})),this.form.total=e.done()},switchPage:function(e){this.$bus.emit("switchPage",e,!0)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},b=h,g=a("2877"),v=Object(g["a"])(b,s,r,!1,null,null,null);t["default"]=v.exports},"614d":function(e,t,a){},"619a":function(e,t,a){},"6afb":function(e,t,a){"use strict";a("82c5")},"6b0c":function(e,t,a){"use strict";a("4b08")},"6bf1":function(e,t,a){"use strict";var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"handle"},[e.firstRow?t("i",{staticClass:"el-icon-circle-plus-outline",on:{click:e.addRow}}):t("i",{staticClass:"el-icon-delete",on:{click:e.delRow}})])},r=[],o=a("2b0e"),i=o["default"].extend({name:"Handle",computed:{firstRow:function(){return this.params.node.firstChild}},methods:{addRow:function(){this.$parent.$emit("addRow",this.params.api.getFocusedCell())},delRow:function(){this.params.api.applyTransaction({remove:[this.params.data]}),this.params.context.runHandleGrid()}}}),l=i,n=a("2877"),c=Object(n["a"])(l,s,r,!1,null,null,null);t["a"]=c.exports},"6c15":function(e,t,a){},"6f41":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"omy bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{attrs:{label:"供应商",prop:"supplier"}},[t("template",{slot:"label"},[t("span",{on:{click:function(t){return e.switchPage("supplier")}}},[e._v("供应商")])]),t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.form.supplier,callback:function(t){e.$set(e.form,"supplier",t)},expression:"form.supplier"}})],2),t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{addRow:function(t){return e.pushGrid([{}],!0)}}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"单据金额"}},[t("el-input",{attrs:{placeholder:"请输入单据金额",disabled:!0},model:{value:e.form.total,callback:function(t){e.$set(e.form,"total",t)},expression:"form.total"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"omy/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"omy",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"omy","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"omy","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("6bf1"),c=a("831d"),m=a("b786"),u=a("c3e3"),p=a("a447"),d=a("5549"),f=a("5fb4"),h={name:"Omy",components:{AgGridVue:i["AgGridVue"],Status:m["a"],LineFeed:u["a"],NodList:p["a"],NodUpload:d["a"],FieldForm:f["a"]},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,supplier:null,time:"",number:"",total:0,people:null,file:[],data:"",examine:0,more:{}},rules:{supplier:{required:!0,message:"请选择供应商",trigger:"change"},time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"}},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),accountId:null,account:"点击选择",money:"",settle:"",data:""},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],handle:n["a"],fat:c["a"]},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"omy"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"handle",cellRenderer:"handle",hide:!1,dispose:!1},{headerName:"结算账户",width:120,field:"account",editable:!0,cellEditor:"fat",cellEditorParams:{dispose:{key:"accountId",text:"account"}},hide:!1,dispose:!0},{headerName:"结算金额",width:120,field:"money",editable:!0,hide:!1,dispose:!0},{headerName:"结算号",width:120,field:"settle",editable:!0,hide:!1,dispose:!0},{headerName:"备注信息",width:120,field:"data",editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"},{text:"总金额",type:"sum",key:"money"}]}}},computed:{store:function(){return this.$store.state}},created:function(){this.init()},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="FKD"+this.$moment().format("YYMMDDHHmmssS")):this.$axios.post("omy/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["supplier","time","number"]).then((function(){var a=e.handleGrid();1==a?t.validate((function(t){t?e.$axios.post("omy/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("omy/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},pushGrid:function(e){var t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=[],r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l={uniqid:this.$lib.getUniqid(),accountId:a?null:i.account,account:a?"点击选择":i.accountData.name,money:a?"":i.money,settle:a?"":i.settle,data:a?"":i.data};s.push(l)}}catch(n){r.e(n)}finally{r.f()}a?this.grid.options.api.applyTransaction({add:s}):this.grid.options.api.setRowData(s),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)null!=t[a].accountId?this.$lib.synValidate("numerical",t[a].money)||1==e&&(e="数据表格第"+(a+1)+"行结算金额不正确!"):1==e&&(e="数据表格第"+(a+1)+"行结算账户不可为空!");return 1==e&&(this.$set(this,"info",t.map((function(e){return{account:e.accountId,money:e.money,settle:e.settle,data:e.data}}))),this.summary()),e},summary:function(){var e=this.$calc.chain(0);this.info.forEach((function(t){e.add(t.money)})),this.form.total=e.done()},switchPage:function(e){this.$bus.emit("switchPage",e,!0)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},b=h,g=a("2877"),v=Object(g["a"])(b,s,r,!1,null,null,null);t["default"]=v.exports},7723:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"oce bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{attrs:{label:"供应商"}},[t("template",{slot:"label"},[t("span",{on:{click:function(t){return e.switchPage("supplier")}}},[e._v("供应商")])]),t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.form.supplier,callback:function(t){e.$set(e.form,"supplier",t)},expression:"form.supplier"}})],2),t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{addRow:function(t){return e.pushGrid([{}],!0)}}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"单据金额"}},[t("el-input",{attrs:{placeholder:"请输入单据金额",disabled:!0},model:{value:e.form.total,callback:function(t){e.$set(e.form,"total",t)},expression:"form.total"}})],1),t("el-form-item",{attrs:{label:"实际金额",prop:"actual"}},[t("el-input",{attrs:{placeholder:"请输入实际金额",clearable:""},model:{value:e.form.actual,callback:function(t){e.$set(e.form,"actual",t)},expression:"form.actual"}},[t("template",{slot:"suffix"},[t("i",{staticClass:"el-icon-copy-document",on:{click:function(t){e.form.actual=e.form.total}}})])],2)],1),t("el-form-item",{attrs:{label:"实付金额",prop:"money"}},[t("el-input",{attrs:{placeholder:"请输入实付金额",clearable:""},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}},[t("template",{slot:"suffix"},[t("i",{staticClass:"el-icon-copy-document",on:{click:function(t){e.form.money=e.form.actual}}})])],2)],1),t("el-form-item",{attrs:{label:"结算账户",prop:"account"}},[t("nodList",{attrs:{placeholder:"请选择结算账户",action:"service/accountRecord",scene:"account"},model:{value:e.form.account,callback:function(t){e.$set(e.form,"account",t)},expression:"form.account"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"oce/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"oce",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"oce","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"oce","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("d9e2"),a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("6bf1"),c=a("df05"),m=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"inputGroup"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.value,expression:"value"}],ref:"input",staticClass:"ag-cell-edit-input",attrs:{type:"text"},domProps:{value:e.value},on:{input:function(t){t.target.composing||(e.value=t.target.value)}}}),e.hasSource?[t("el-popover",{staticClass:"popoverTag",attrs:{"popper-class":"agCpePopover",trigger:"click"},on:{show:e.getCost}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("i",{staticClass:"el-icon-collection-tag"})]),t("el-table",{attrs:{data:e.cost,height:"80px",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"180px"}}),t("el-table-column",{attrs:{prop:"ietData.name",label:"支出名称",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"uat",label:"未结算金额",align:"center",width:"90px"}})],1)],1)]:e._e()],2)},u=[],p=a("2b0e"),d=p["default"].extend({name:"Cpe",data:function(){return{value:"",cost:[]}},created:function(){this.value=this.params.value},computed:{hasSource:function(){return 0!=this.params.node.data.source}},methods:{getCost:function(){var e=this,t=this.params.node.data.source;this.$axios.post("service/getCost",{cost:t}).then((function(t){"success"==t.state?e.cost=[t.info]:"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},getValue:function(){return this.value}},mounted:function(){var e=this;this.$nextTick((function(){e.$refs.input.focus(),e.$refs.input.select()}))}}),f=d,h=(a("212d"),a("f59b"),a("2877")),b=Object(h["a"])(f,m,u,!1,null,"61588dc5",null),g=b.exports,v=a("b786"),y=a("c3e3"),x=a("a447"),$=a("5549"),w=a("5fb4"),k={name:"Oce",components:{AgGridVue:i["AgGridVue"],Status:v["a"],LineFeed:y["a"],NodList:x["a"],NodUpload:$["a"],FieldForm:w["a"]},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,supplier:null,time:"",number:"",total:0,actual:"",money:"",account:null,people:null,file:[],data:"",examine:0,more:{}},rules:{time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"},actual:[{required:!0,message:"请输入实际金额",trigger:"blur"},{validator:function(t,a,s){e.$lib.synValidate("money",a)?s():s(new Error("实际金额不正确"))},trigger:"blur"}],money:[{required:!0,message:"请输入实付金额",trigger:"blur"},{validator:function(t,a,s){e.$lib.synValidate("money",a)?s():s(new Error("实付金额不正确"))},trigger:"blur"}]},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),source:0,ietId:null,iet:"点击选择",money:"",data:""},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],handle:n["a"],rae:c["a"],cpe:g},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"oce"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"handle",cellRenderer:"handle",hide:!1,dispose:!1},{headerName:"支出类别",width:120,field:"iet",editable:!0,cellEditor:"rae",cellEditorParams:{dispose:{key:"ietId",text:"iet",type:"out"}},hide:!1,dispose:!0},{headerName:"结算金额",width:120,field:"money",editable:!0,cellEditor:"cpe",hide:!1,dispose:!0},{headerName:"备注信息",width:120,field:"data",editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"},{text:"总金额",type:"sum",key:"money"}]}}},computed:{store:function(){return this.$store.state}},created:function(){this.init(),this.$bus.on("buildOce",this.buildOce)},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="QTZCD"+this.$moment().format("YYMMDDHHmmssS")):this.$axios.post("oce/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["time","number"]).then((function(){var a=e.handleGrid();1==a?e.$lib.aloneValidate(t,["actual","money"]).then((function(){e.form.actual-0>e.form.total-0?e.$message({type:"warning",message:"实际金额不可大于单据金额!"}):e.form.money-0>e.form.actual-0?e.$message({type:"warning",message:"实付金额不可大于实际金额!"}):0!=e.form.money&&null==e.form.account?e.$message({type:"warning",message:"结算账户不可为空!"}):t.validate((function(t){t?e.$axios.post("oce/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})}))})).catch((function(t){e.$message({type:"warning",message:t})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("oce/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},pushGrid:function(e){var t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=[],r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l={uniqid:this.$lib.getUniqid(),source:i.hasOwnProperty("source")?i.source:0,ietId:a?null:i.iet,iet:a?"点击选择":i.ietData.name,money:a?"":i.money,data:a?"":i.data};s.push(l)}}catch(n){r.e(n)}finally{r.f()}a?this.grid.options.api.applyTransaction({add:s}):this.grid.options.api.setRowData(s),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)null!=t[a].ietId?this.$lib.synValidate("numerical",t[a].money)||1==e&&(e="数据表格第"+(a+1)+"行结算金额不正确!"):1==e&&(e="数据表格第"+(a+1)+"行支出类别不可为空!");return 1==e&&(this.$set(this,"info",t.map((function(e){return{source:e.source,iet:e.ietId,money:e.money,data:e.data}}))),this.summary()),e},summary:function(){var e=this.$calc.chain(0);this.info.forEach((function(t){e.add(t.money)})),this.form.total=e.done()},buildOce:function(e){this.form.number="FYJS"+this.$moment().format("YYMMDDHHmmssS"),this.form.total=e.class.total,this.pushGrid(e.info,!1)},switchPage:function(e){this.$bus.emit("switchPage",e,!0)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}},beforeDestroy:function(){this.$bus.off("buildOce",this.buildOce)}},F=k,_=Object(h["a"])(F,s,r,!1,null,null,null);t["default"]=_.exports},"7b30":function(e,t,a){"use strict";a("c24d")},"7c74":function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"costForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"支出类别",multiple:"","collapse-tags":""},model:{value:e.searchFrom.iet,callback:function(t){e.$set(e.searchFrom,"iet",t)},expression:"searchFrom.iet"}},[e._l(e.store.iet.out,(function(e){return[t("el-option",{attrs:{label:e.name,value:e.id}})]}))],2)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"结算状态",multiple:"","collapse-tags":""},model:{value:e.searchFrom.state,callback:function(t){e.$set(e.searchFrom,"state",t)},expression:"searchFrom.state"}},[t("el-option",{attrs:{label:"部分结算",value:1}}),t("el-option",{attrs:{label:"已结算",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"单据类型",multiple:"","collapse-tags":""},model:{value:e.searchFrom.mold,callback:function(t){e.$set(e.searchFrom,"mold",t)},expression:"searchFrom.mold"}},[t("el-option",{attrs:{label:"采购单",value:"buy"}}),t("el-option",{attrs:{label:"采购退货单",value:"bre"}}),t("el-option",{attrs:{label:"销售单",value:"sell"}}),t("el-option",{attrs:{label:"销售退货单",value:"sre"}}),t("el-option",{attrs:{label:"其它入库单",value:"entry"}}),t("el-option",{attrs:{label:"其它出库单",value:"extry"}})],1)],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],1)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,"tree-props":{children:"node"},"row-key":"key",height:"calc(100% - 90px)",border:""}},[t("el-table-column",{attrs:{align:"center",width:"39px"}}),t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.frameData.name",label:"所属组织",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"current.name",label:"往来单位",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"sourceData.time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"180px"}}),t("el-table-column",{attrs:{prop:"ietData.name",label:"支出类别",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.state",label:"结算状态",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"money",label:"金额",align:"center",width:"90px"}})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}})],1)},r=[],o=a("a447"),i={name:"costForm",components:{NodList:o["a"]},data:function(){return{searchFrom:{supplier:null,customer:null,number:"",iet:[],startTime:"",endTime:"",state:[],mold:[]},tableData:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("cost/form",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},exports:function(){var e=this;this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.$lib.objToParm(this.searchFrom,!0);setTimeout((function(){window.open(e.$base.web+"cost/formExports?"+t)}),1e3)},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},l=i,n=(a("1784"),a("2877")),c=Object(n["a"])(l,s,r,!1,null,"452ea7ac",null);t["default"]=c.exports},"82c5":function(e,t,a){},"831d":function(e,t,a){"use strict";a("b0c0");var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"fat",attrs:{tabindex:"-1"},on:{keydown:function(t){return t.stopPropagation(),t.preventDefault(),e.fatEvent.apply(null,arguments)}}},[t("el-popover",{ref:"popover",attrs:{"popper-class":"agGridSelect",trigger:"manual"}},[t("p",{attrs:{slot:"reference"},slot:"reference"},[e._v(e._s(e.value))]),t("ul",{staticClass:"list"},[e._l(e.list,(function(a,s){return[t("li",{class:{hover:s==e.hover},on:{click:function(t){return e.choice(a)}}},[e._v(e._s(a.name))])]}))],2)])],1)},r=[],o=(a("c740"),a("2b0e")),i=o["default"].extend({name:"Fat",data:function(){return{value:null,list:[],hover:0}},created:function(){var e=this;this.value=this.params.node.data[this.params.dispose.text],this.list=this.store.account;var t=this.list.findIndex((function(t){return t.name==e.value}));-1==t||(this.hover=t)},computed:{store:function(){return this.$store.state}},methods:{choice:function(e){this.value=e.name,this.params.node.data[this.params.dispose.key]=e.id,this.$el.parentNode.focus(),this.params.api.stopEditing()},fatEvent:function(e){var t=e.keyCode;13==t?this.choice(this.list[this.hover]):27==t?(this.$el.parentNode.focus(),this.params.api.stopEditing()):38==t?this.list.hasOwnProperty(this.hover-1)&&this.hover--:40==t&&this.list.hasOwnProperty(this.hover+1)&&this.hover++},getValue:function(){return this.value}},mounted:function(){var e=this;this.$nextTick((function(){e.$el.focus(),e.$refs.popover.showPopper=!0}))}}),l=i,n=(a("9796"),a("2877")),c=Object(n["a"])(l,s,r,!1,null,"7c13ebe1",null);t["a"]=c.exports},"835e":function(e,t,a){},8949:function(e,t,a){},"8b26":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"allot bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{addRow:function(t){return e.pushGrid([{}],!0)}}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"单据金额"}},[t("el-input",{attrs:{placeholder:"请输入单据金额",disabled:!0},model:{value:e.form.total,callback:function(t){e.$set(e.form,"total",t)},expression:"form.total"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"allot/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"allot",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"allot","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"allot","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("d81d"),a("14d9"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("6bf1"),c=a("831d"),m=a("b786"),u=a("c3e3"),p=a("a447"),d=a("5549"),f=a("5fb4"),h={name:"Allot",components:{AgGridVue:i["AgGridVue"],Status:m["a"],LineFeed:u["a"],NodList:p["a"],NodUpload:d["a"],FieldForm:f["a"]},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,time:"",number:"",total:0,people:null,file:[],data:"",examine:0,more:{}},rules:{time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"}},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),accountId:null,account:"点击选择",tatId:null,tat:"点击选择",money:"",settle:"",data:""},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],handle:n["a"],fat:c["a"]},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"allot"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"handle",cellRenderer:"handle",hide:!1,dispose:!1},{headerName:"转出账户",width:120,field:"account",editable:!0,cellEditor:"fat",cellEditorParams:{dispose:{key:"accountId",text:"account"}},hide:!1,dispose:!0},{headerName:"转入账户",width:120,field:"tat",editable:!0,cellEditor:"fat",cellEditorParams:{dispose:{key:"tatId",text:"tat"}},hide:!1,dispose:!0},{headerName:"结算金额",width:120,field:"money",editable:!0,hide:!1,dispose:!0},{headerName:"结算号",width:120,field:"settle",editable:!0,hide:!1,dispose:!0},{headerName:"备注信息",width:120,field:"data",editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"},{text:"总金额",type:"sum",key:"money"}]}}},computed:{store:function(){return this.$store.state}},created:function(){this.init()},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="ZZD"+this.$moment().format("YYMMDDHHmmssS")):this.$axios.post("allot/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["time","number"]).then((function(){var a=e.handleGrid();1==a?t.validate((function(t){t?e.$axios.post("allot/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("allot/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},pushGrid:function(e){var t,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=[],r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l={uniqid:this.$lib.getUniqid(),accountId:a?null:i.account,account:a?"点击选择":i.accountData.name,tatId:a?null:i.tat,tat:a?"点击选择":i.tatData.name,money:a?"":i.money,settle:a?"":i.settle,data:a?"":i.data};s.push(l)}}catch(n){r.e(n)}finally{r.f()}a?this.grid.options.api.applyTransaction({add:s}):this.grid.options.api.setRowData(s),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)null!=t[a].accountId?null!=t[a].tatId?t[a].accountId!=t[a].tatId?this.$lib.synValidate("money",t[a].money)||1==e&&(e="数据表格第"+(a+1)+"行结算金额不正确!"):1==e&&(e="数据表格第"+(a+1)+"行转出账户和转入账户不可相同!"):1==e&&(e="数据表格第"+(a+1)+"行转入账户不可为空!"):1==e&&(e="数据表格第"+(a+1)+"行转出账户不可为空!");return 1==e&&(this.$set(this,"info",t.map((function(e){return{account:e.accountId,tat:e.tatId,money:e.money,settle:e.settle,data:e.data}}))),this.summary()),e},summary:function(){var e=this.$calc.chain(0);this.info.forEach((function(t){e.add(t.money)})),this.form.total=e.done()},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},b=h,g=a("2877"),v=Object(g["a"])(b,s,r,!1,null,null,null);t["default"]=v.exports},9796:function(e,t,a){"use strict";a("3371")},"9e02":function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cost area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"支出类别",multiple:"","collapse-tags":""},model:{value:e.searchFrom.iet,callback:function(t){e.$set(e.searchFrom,"iet",t)},expression:"searchFrom.iet"}},[e._l(e.store.iet.out,(function(e){return[t("el-option",{attrs:{label:e.name,value:e.id}})]}))],2)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"单据结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"结算状态",multiple:"","collapse-tags":""},model:{value:e.searchFrom.state,callback:function(t){e.$set(e.searchFrom,"state",t)},expression:"searchFrom.state"}},[t("el-option",{attrs:{label:"未结算",value:0}}),t("el-option",{attrs:{label:"部分结算",value:1}}),t("el-option",{attrs:{label:"已结算",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"单据类型",multiple:"","collapse-tags":""},model:{value:e.searchFrom.mold,callback:function(t){e.$set(e.searchFrom,"mold",t)},expression:"searchFrom.mold"}},[t("el-option",{attrs:{label:"采购单",value:"buy"}}),t("el-option",{attrs:{label:"采购退货单",value:"bre"}}),t("el-option",{attrs:{label:"销售单",value:"sell"}}),t("el-option",{attrs:{label:"销售退货单",value:"sre"}}),t("el-option",{attrs:{label:"调拨单",value:"swap"}}),t("el-option",{attrs:{label:"其它入库单",value:"entry"}}),t("el-option",{attrs:{label:"其它出库单",value:"extry"}})],1)],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[e.$lib.getUserRoot(e.store.root,"cost","edit")?[t("el-button",{on:{click:e.handle}},[e._v("结算")])]:e._e(),t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],ref:"dataTable",staticClass:"gridTable",attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px"}}),t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.frameData.name",label:"所属组织",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"current.name",label:"往来单位",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"sourceData.time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"180px"}}),t("el-table-column",{attrs:{prop:"ietData.name",label:"支出类别",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.state",label:"结算状态",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"money",label:"金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"settle",label:"已结算金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"uat",label:"未结算金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"csa",label:"结算金额",align:"center",width:"90px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("input",{directives:[{name:"model",rawName:"v-model",value:a.row.csa,expression:"scope.row.csa"}],attrs:{type:"text",readonly:2==a.row.state},domProps:{value:a.row.csa},on:{click:function(e){e.stopPropagation()},input:[function(t){t.target.composing||e.$set(a.row,"csa",t.target.value)},function(t){return e.csaChange(a.row)}]}})]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1)],1)},r=[],o=a("b85c"),i=(a("4de4"),a("c740"),a("d81d"),a("14d9"),a("d3b7"),a("a447")),l=a("947e"),n={name:"Cost",components:{NodList:i["a"],PageStatus:l["a"]},data:function(){return{searchFrom:{supplier:null,customer:null,number:"",iet:[],startTime:"",endTime:"",state:[0,1],mold:[]},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"单据总金额",type:"sum",key:"money"},{text:"已结算总金额",type:"sum",key:"settle"},{text:"未结算总金额",type:"sum",key:"uat"}]}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("cost/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},handle:function(){var e=this,t=this.tableSelection.filter((function(e){return 2!=e.state}));if(0==t.length)this.$message({type:"warning",message:"未选中有效费用数据!"});else{var a,s=[],r=Object(o["a"])(t);try{for(r.s();!(a=r.n()).done;){var i=a.value;if(!this.$lib.validate("plus",i.csa))return this.$message({type:"warning",message:"单据编号[ "+i.sourceData.number+" ]结算金额不正确!"}),!1;if(i.csa-0>i.uat-0)return this.$message({type:"warning",message:"单据编号[ "+i.sourceData.number+" ]结算金额不可大于未结算金额!"}),!1;s.push({id:i.id,csa:i.csa})}}catch(l){r.e(l)}finally{r.f()}this.$axios.post("cost/buildOce",{parm:s}).then((function(t){"success"==t.state?(e.$bus.emit("switchPage","oce",!0),setTimeout((function(){e.$bus.emit("buildOce",t.info)}),600)):"warning"==t.state||"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))}},exports:function(){var e=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.tableSelection.map((function(e){return e.id})),a=this.$lib.objToParm({parm:t},!0);setTimeout((function(){window.open(e.$base.web+"cost/exports?"+a)}),1e3)}},csaChange:function(e){""==e.csa||0==e.csa?this.$refs.dataTable.toggleRowSelection(e,!1):this.$refs.dataTable.toggleRowSelection(e,!0)},selectionChange:function(e){for(var t=this,a=function(){var a=t.tableData[s],r=e.findIndex((function(e){return e.id==a.id}));-1==r?a.csa="":""==a.csa&&2!=a.state&&(a.csa=a.uat)},s=0;s<this.tableData.length;s++)a();this.tableSelection=e},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},c=n,m=(a("6afb"),a("2877")),u=Object(m["a"])(c,s,r,!1,null,"9d3db954",null);t["default"]=u.exports},a129:function(e,t,a){"use strict";a("02b4")},a841:function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"oceForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择资金账户",action:"service/accountRecord",scene:"account"},model:{value:e.searchFrom.account,callback:function(t){e.$set(e.searchFrom,"account",t)},expression:"searchFrom.account"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销状态",clearable:""},model:{value:e.searchFrom.nucleus,callback:function(t){e.$set(e.searchFrom,"nucleus",t)},expression:"searchFrom.nucleus"}},[t("el-option",{attrs:{label:"未核销",value:1}}),t("el-option",{attrs:{label:"部分核销",value:2}}),t("el-option",{attrs:{label:"已核销",value:3}})],1)],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"oce","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"oce","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"oce","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"supplierData.name",label:"供应商",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"actual",label:"实际金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"money",label:"单据付款",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"accountData.name",label:"结算账户",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"nucleus",label:"核销状态",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[0==a.row.billData.length?[t("span",[e._v(e._s(a.row.extension.nucleus))])]:[t("el-popover",{attrs:{"popper-class":"tablePopover",trigger:"click"}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("span",[e._v(e._s(a.row.extension.nucleus))]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("el-table",{attrs:{data:a.row.billData,height:"120px",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"money",label:"核销金额",align:"center",width:"70px"}})],1)],1)]]}}])}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"oce","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Oce",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{attrs:{label:"导入数据",name:"import"}},[t("ul",{staticClass:"importTip"},[t("li",[e._v("1.该功能适用于Excel导入单据数据。")]),t("li",[e._v("2.录入数据时,请勿修改首行数据标题以及排序。")]),t("li",[e._v("3.字段之间存在关联关系时,将自动进行关联运算。")]),t("li",[e._v("4.请查阅使用文档获取字段格式内容以及相关导入须知。")]),t("li",[e._v("5.点击下方上传模板,选择您编辑好的模板文件即可。")])]),t("el-divider"),t("el-row",{staticStyle:{"text-align":"center"}},[t("el-col",{attrs:{span:12}},[t("el-button",{attrs:{type:"info"},on:{click:e.downTemplate}},[e._v("下载模板")])],1),t("el-col",{attrs:{span:12}},[t("el-upload",{attrs:{action:e.$base.web+"oce/import",headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.importCall}},[t("el-button",{attrs:{type:"primary"}},[e._v("上传模板")])],1)],1)],1)],1),t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("7723")),l=a("a447"),n=a("947e"),c={name:"OceForm",components:{Oce:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{supplier:null,number:"",startTime:"",endTime:"",account:null,people:null,user:null,examine:"",nucleus:"",data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总单据金额",type:"sum",key:"total"},{text:"总实际金额",type:"sum",key:"actual"},{text:"总单据付款",type:"sum",key:"money"},{text:"总核销金额",type:"sum",key:"extension.amount"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"import"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("oce/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("oce/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("oce/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},downTemplate:function(){var e=this;this.$message({type:"success",message:"[ 数据模板 ] 下载请求中..."}),setTimeout((function(){window.open(e.store.base.cdnSite+"/erp/batch/其它收入单导入模板.xlsx")}),1e3)},importCall:function(e,t,a){"success"==e.state?(this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"导入单据成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"oce/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("f1e0"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},a93b:function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"iceForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择资金账户",action:"service/accountRecord",scene:"account"},model:{value:e.searchFrom.account,callback:function(t){e.$set(e.searchFrom,"account",t)},expression:"searchFrom.account"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销状态",clearable:""},model:{value:e.searchFrom.nucleus,callback:function(t){e.$set(e.searchFrom,"nucleus",t)},expression:"searchFrom.nucleus"}},[t("el-option",{attrs:{label:"未核销",value:1}}),t("el-option",{attrs:{label:"部分核销",value:2}}),t("el-option",{attrs:{label:"已核销",value:3}})],1)],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"ice","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"ice","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"ice","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"customerData.name",label:"客户",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"actual",label:"实际金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"money",label:"单据收款",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"accountData.name",label:"结算账户",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"nucleus",label:"核销状态",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[0==a.row.billData.length?[t("span",[e._v(e._s(a.row.extension.nucleus))])]:[t("el-popover",{attrs:{"popper-class":"tablePopover",trigger:"click"}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("span",[e._v(e._s(a.row.extension.nucleus))]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("el-table",{attrs:{data:a.row.billData,height:"120px",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"money",label:"核销金额",align:"center",width:"70px"}})],1)],1)]]}}])}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"ice","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Ice",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{attrs:{label:"导入数据",name:"import"}},[t("ul",{staticClass:"importTip"},[t("li",[e._v("1.该功能适用于Excel导入单据数据。")]),t("li",[e._v("2.录入数据时,请勿修改首行数据标题以及排序。")]),t("li",[e._v("3.字段之间存在关联关系时,将自动进行关联运算。")]),t("li",[e._v("4.请查阅使用文档获取字段格式内容以及相关导入须知。")]),t("li",[e._v("5.点击下方上传模板,选择您编辑好的模板文件即可。")])]),t("el-divider"),t("el-row",{staticStyle:{"text-align":"center"}},[t("el-col",{attrs:{span:12}},[t("el-button",{attrs:{type:"info"},on:{click:e.downTemplate}},[e._v("下载模板")])],1),t("el-col",{attrs:{span:12}},[t("el-upload",{attrs:{action:e.$base.web+"ice/import",headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.importCall}},[t("el-button",{attrs:{type:"primary"}},[e._v("上传模板")])],1)],1)],1)],1),t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("1d6c")),l=a("a447"),n=a("947e"),c={name:"IceForm",components:{Ice:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{customer:null,number:"",startTime:"",endTime:"",account:null,people:null,user:null,examine:"",nucleus:"",data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总单据金额",type:"sum",key:"total"},{text:"总实际金额",type:"sum",key:"actual"},{text:"总单据付款",type:"sum",key:"money"},{text:"总核销金额",type:"sum",key:"extension.amount"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"import"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("ice/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("ice/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("ice/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},downTemplate:function(){var e=this;this.$message({type:"success",message:"[ 数据模板 ] 下载请求中..."}),setTimeout((function(){window.open(e.store.base.cdnSite+"/erp/batch/其它收入单导入模板.xlsx")}),1e3)},importCall:function(e,t,a){"success"==e.state?(this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"导入单据成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"ice/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("f0fa"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},a9ac:function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"imyForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销状态",clearable:""},model:{value:e.searchFrom.nucleus,callback:function(t){e.$set(e.searchFrom,"nucleus",t)},expression:"searchFrom.nucleus"}},[t("el-option",{attrs:{label:"未核销",value:1}}),t("el-option",{attrs:{label:"部分核销",value:2}}),t("el-option",{attrs:{label:"已核销",value:3}})],1)],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择结算账户",action:"service/accountRecord",scene:"account"},model:{value:e.searchFrom.account,callback:function(t){e.$set(e.searchFrom,"account",t)},expression:"searchFrom.account"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"imy","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"imy","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"imy","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"customerData.name",label:"客户",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"nucleus",label:"核销状态",align:"center",width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[0==a.row.billData.length?[t("span",[e._v(e._s(a.row.extension.nucleus))])]:[t("el-popover",{attrs:{"popper-class":"tablePopover",trigger:"click"}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("span",[e._v(e._s(a.row.extension.nucleus))]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("el-table",{attrs:{data:a.row.billData,height:"120px",size:"mini",border:""}},[t("el-table-column",{attrs:{prop:"extension.type",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"money",label:"核销金额",align:"center",width:"70px"}})],1)],1)]]}}])}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"imy","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Imy",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{attrs:{label:"导入数据",name:"import"}},[t("ul",{staticClass:"importTip"},[t("li",[e._v("1.该功能适用于Excel导入单据数据。")]),t("li",[e._v("2.录入数据时,请勿修改首行数据标题以及排序。")]),t("li",[e._v("3.字段之间存在关联关系时,将自动进行关联运算。")]),t("li",[e._v("4.请查阅使用文档获取字段格式内容以及相关导入须知。")]),t("li",[e._v("5.点击下方上传模板,选择您编辑好的模板文件即可。")])]),t("el-divider"),t("el-row",{staticStyle:{"text-align":"center"}},[t("el-col",{attrs:{span:12}},[t("el-button",{attrs:{type:"info"},on:{click:e.downTemplate}},[e._v("下载模板")])],1),t("el-col",{attrs:{span:12}},[t("el-upload",{attrs:{action:e.$base.web+"imy/import",headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.importCall}},[t("el-button",{attrs:{type:"primary"}},[e._v("上传模板")])],1)],1)],1)],1),t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("510e")),l=a("a447"),n=a("947e"),c={name:"ImyForm",components:{Imy:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{customer:null,number:"",startTime:"",endTime:"",people:null,user:null,examine:"",nucleus:"",account:null,data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总单据金额",type:"sum",key:"total"},{text:"总核销金额",type:"sum",key:"extension.amount"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"import"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("imy/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("imy/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("imy/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},downTemplate:function(){var e=this;this.$message({type:"success",message:"[ 数据模板 ] 下载请求中..."}),setTimeout((function(){window.open(e.store.base.cdnSite+"/erp/batch/收款单导入模板.xlsx")}),1e3)},importCall:function(e,t,a){"success"==e.state?(this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"导入单据成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"imy/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("0c5d"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},c1a0:function(e,t,a){"use strict";a("e156")},c24d:function(e,t,a){},c977:function(e,t,a){"use strict";a("1e4d")},cadd:function(e,t,a){"use strict";a("416f")},d463:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"bill"},[t("el-form",{ref:"form",staticStyle:{height:"100%"},attrs:{model:e.form,rules:e.rules,inline:!0,"hide-required-asterisk":!0}},[t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:0==e.form.type||2==e.form.type||3==e.form.type,expression:"form.type == 0 || form.type == 2 || form.type == 3"}],attrs:{label:"客户",prop:"customer"}},[t("nodList",{ref:"customer",attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},on:{change:e.clearGrid},model:{value:e.form.customer,callback:function(t){e.$set(e.form,"customer",t)},expression:"form.customer"}})],1),t("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1==e.form.type||2==e.form.type||4==e.form.type,expression:"form.type == 1 || form.type == 2 || form.type == 4"}],attrs:{label:"供应商",prop:"supplier"}},[t("nodList",{ref:"supplier",attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},on:{change:e.clearGrid},model:{value:e.form.supplier,callback:function(t){e.$set(e.form,"supplier",t)},expression:"form.supplier"}})],1),t("el-form-item",{attrs:{label:"单据日期",prop:"time"}},[t("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择单据日期"},model:{value:e.form.time,callback:function(t){e.$set(e.form,"time",t)},expression:"form.time"}})],1),t("el-form-item",{attrs:{label:"单据编号",prop:"number"}},[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.form.number,callback:function(t){e.$set(e.form,"number",t)},expression:"form.number"}})],1),t("el-divider",{staticClass:"fistDivider"}),t("ag-grid-vue",{directives:[{name:"madeAgGrid",rawName:"v-madeAgGrid"}],staticClass:"ag-theme-balham",staticStyle:{height:"calc(100% - 256px)"},attrs:{context:e.grid.context,defaultColDef:e.grid.coldef,gridOptions:e.grid.options,columnDefs:e.grid.column,getRowNodeId:e.grid.getRowNodeId,frameworkComponents:e.grid.components,tabToNextCell:e.$grid.gridTabToNextCell},on:{setter:e.showBill}}),t("Status",{attrs:{config:e.grid.status,source:e.info}},[1==e.form.examine?t("img",{staticClass:"billExamine",attrs:{src:"/static/images/lib/examine.png"}}):e._e()]),t("el-divider"),t("LineFeed",{attrs:{tag:".el-form-item",rule:3}},[t("el-form-item",{attrs:{label:"核销类型",prop:"type"}},[t("el-select",{on:{change:e.typeChange},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[t("el-option",{attrs:{label:"预收冲应收",value:0}}),t("el-option",{attrs:{label:"预付冲应付",value:1}}),t("el-option",{attrs:{label:"应收冲应付",value:2}}),t("el-option",{attrs:{label:"销退冲销售",value:3}}),t("el-option",{attrs:{label:"购退冲采购",value:4}})],1)],1),t("el-form-item",{attrs:{label:"总核金额"}},[t("el-input",{attrs:{disabled:!0},model:{value:e.form.pmy,callback:function(t){e.$set(e.form,"pmy",t)},expression:"form.pmy"}})],1),t("el-form-item",{attrs:{label:"总销金额"}},[t("el-input",{attrs:{disabled:!0},model:{value:e.form.smp,callback:function(t){e.$set(e.form,"smp",t)},expression:"form.smp"}})],1),t("el-form-item",{attrs:{label:"关联人员"}},[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.form.people,callback:function(t){e.$set(e.form,"people",t)},expression:"form.people"}})],1),t("el-form-item",{attrs:{label:"单据附件"}},[t("NodUpload",{attrs:{action:e.$base.web+"bill/upload"},model:{value:e.form.file,callback:function(t){e.$set(e.form,"file",t)},expression:"form.file"}})],1),t("FieldForm",{staticStyle:{display:"initial"},attrs:{rule:"bill",prefix:"more."},model:{value:e.form.more,callback:function(t){e.$set(e.form,"more",t)},expression:"form.more"}}),t("el-form-item",{attrs:{label:"备注信息"}},[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.form.data,callback:function(t){e.$set(e.form,"data",t)},expression:"form.data"}})],1)],1)],1),t("div",{staticClass:"layerBtn"},[t("el-button-group",[0==e.form.id||0==e.form.examine&&e.$lib.getUserRoot(e.store.root,"bill","edit")?[t("el-button",{attrs:{type:"info"},on:{click:e.save}},[e._v("保存")])]:e._e(),0!=e.form.id?[e.$lib.getUserRoot(e.store.root,"bill","examine")?[t("el-button",{attrs:{type:"info"},on:{click:e.examine}},[e._v(e._s(0==e.form.examine?"审核":"反审核"))])]:e._e()]:e._e(),null==e.source?[t("el-button",{attrs:{type:"info"},on:{click:e.reload}},[e._v("刷新")])]:e._e()],2)],1),e.bill.dialog?t("BillList",{attrs:{parm:e.bill.parm},on:{destroy:function(t){e.bill.dialog=!1},choice:e.pushGrid}}):e._e()],1)},r=[],o=a("b85c"),i=(a("c740"),a("d81d"),a("14d9"),a("a434"),a("b0c0"),a("d3b7"),a("159b"),a("401b")),l=a("a389"),n=a("56d9"),c=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"bmy"},[t("div",{staticClass:"title"},[t("span",[e._v("核销金额")]),t("div",{staticClass:"auto",on:{click:e.auto}},[e._v("自动")])])])},m=[],u=a("2b0e"),p=u["default"].extend({name:"Allowance",methods:{auto:function(){for(var e=[[0,0],[0,0]],t=[{imy:0,sell:1,sre:1,ice:1},{omy:0,buy:1,bre:1,oce:1},{sell:0,sre:0,ice:0,buy:1,bre:1,oce:1},{sre:0,sell:1},{bre:0,buy:1}][this.params.dispose.type()],a=this.$grid.getGridData(this.params),s=0;s<a.length;s++)if(null!=a[s].key){var r=t[a[s].moldType],o=a[s].total-0>0?0:1;e[r][o]=this.$calc.chain(e[r][o]).add(a[s].anwo).done()}var i=[[Math.min(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])],[Math.min(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]];for(s=0;s<a.length;s++)if(null!=a[s].key){var l=t[a[s].moldType],n=a[s].total-0>0?0:1,c=i[l][n];0==c?c="":((0==n&&c>a[s].anwo||1==n&&c<a[s].anwo)&&(c=a[s].anwo),i[l][n]=this.$calc.chain(i[l][n]).subtract(c).done()),this.$grid.updateGridData(this.params,a[s].uniqid,"money",c)}this.$message({type:"success",message:"已自动计算核销金额!"}),this.params.context.runHandleGrid()}}}),d=p,f=(a("c1a0"),a("2877")),h=Object(f["a"])(d,c,m,!1,null,"30b18132",null),b=h.exports,g=a("b786"),v=a("c3e3"),y=a("a447"),x=a("5549"),$=a("5fb4"),w=function(){var e=this,t=e._self._c;return t("div",{staticClass:"billList"},[t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],attrs:{visible:e.dialog,title:"单据列表",width:"820px","append-to-body":!0},on:{"update:visible":function(t){e.dialog=t},closed:e.close}},[t("div",{staticClass:"group"},[e._l(e.group.data,(function(a){return[t("div",{staticClass:"item"},[t("p",[e._v(e._s(a.name))]),t("div",{staticClass:"list"},[e._l(a.list,(function(s){return[t("span",{class:{selected:s.type==e.group.mold.type},on:{click:function(t){return e.switchBill(a,s)}}},[e._v(e._s(s.name))])]}))],2)])]}))],2),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],ref:"dataTable",staticClass:"dataTable gridTable",attrs:{height:"300px",data:e.tableData,"row-key":"key",size:"mini",border:""},on:{"row-click":e.rowClick}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"}}),t("el-table-column",{attrs:{prop:"extension.nucleus",label:"核销状态",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.amount",label:"已核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"extension.anwo",label:"未核销金额",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}}),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"top-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择核销状态",clearable:""},model:{value:e.searchFrom.nucleus,callback:function(t){e.$set(e.searchFrom,"nucleus",t)},expression:"searchFrom.nucleus"}},[t("el-option",{attrs:{label:"未核销",value:1}}),t("el-option",{attrs:{label:"部分核销",value:2}})],1)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button",{on:{click:function(t){e.dialog=!1}}},[e._v("关闭")]),t("el-button",{attrs:{type:"primary"},on:{click:e.choice}},[e._v("添加")])],1)],1)],1)},k=[],F={name:"BillList",components:{NodList:y["a"]},props:{parm:{required:!0,type:Object}},data:function(){return{dialog:!0,group:{},tableData:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5},searchFrom:{number:"",nucleus:"",startTime:"",endTime:"",user:null,data:""}}},created:function(){this.init()},computed:{store:function(){return this.$store.state}},methods:{init:function(){var e=[],t=this.parm.type;0==t?e=[{name:"预收",type:"cia",list:[{name:"收款单",type:"imy"}]},{name:"应收",type:"re",list:[{name:"销售单",type:"sell"},{name:"销售退货单",type:"sre"},{name:"其它收入单",type:"ice"}]}]:1==t?e=[{name:"预付",type:"pia",list:[{name:"付款单",type:"omy"}]},{name:"应付",type:"cw",list:[{name:"采购单",type:"buy"},{name:"采购退货单",type:"bre"},{name:"其它支出单",type:"oce"}]}]:2==t?e=[{name:"应收",type:"re",list:[{name:"销售单",type:"sell"},{name:"销售退货单",type:"sre"},{name:"其它收入单",type:"ice"}]},{name:"应付",type:"cw",list:[{name:"采购单",type:"buy"},{name:"采购退货单",type:"bre"},{name:"其它支出单",type:"oce"}]}]:3==t?e=[{name:"销退",type:"sre",list:[{name:"销售退货单",type:"sre"}]},{name:"销售",type:"sell",list:[{name:"销售单",type:"sell"}]}]:4==t&&(e=[{name:"购退",type:"bre",list:[{name:"采购退货单",type:"bre"}]},{name:"采购",type:"buy",list:[{name:"采购单",type:"buy"}]}]),this.group={bill:{name:e[0].name,type:e[0].type},mold:{name:e[0].list[0].name,type:e[0].list[0].type},data:e},this.record(1)},switchBill:function(e,t){this.group.bill.name=e.name,this.group.bill.type=e.type,this.group.mold.name=t.name,this.group.mold.type=t.type,this.record(1)},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom,this.parm,{mold:this.group.mold.type});this.$axios.post("service/billRecord",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},choice:function(){var e=this.$refs.dataTable.selection;if(e.length>0){var t,a=[],s=this.group,r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var i=t.value,l=this.$lib.extend(!0,{},i,{bill:s.bill,mold:s.mold});a.push(l)}}catch(n){r.e(n)}finally{r.f()}this.$message({type:"success",message:"添加成功!"}),this.$emit("choice",a)}else this.$message({type:"warning",message:"您还未选择单据数据!"})},rowClick:function(e){this.$refs.dataTable.toggleRowSelection(e)},close:function(){this.$emit("destroy",!0)}}},_=F,R=(a("c977"),Object(f["a"])(_,w,k,!1,null,"3e0dd031",null)),D=R.exports,C={name:"Bill",components:{AgGridVue:i["AgGridVue"],Status:g["a"],LineFeed:v["a"],NodList:y["a"],NodUpload:x["a"],FieldForm:$["a"],BillList:D},props:{source:{default:null}},data:function(){var e=this;return{form:{id:0,customer:null,supplier:null,time:"",number:"",type:0,pmy:0,smp:0,people:null,file:[],data:"",examine:0,more:{}},rules:{time:{required:!0,message:"请选择单据日期",trigger:"change"},number:{required:!0,message:"请输入单据编号",trigger:"blur"}},info:[],grid:{options:{onGridReady:function(){e.$grid.addGridRow(e.grid.options)},onCellEditingStopped:function(e){e.context.runHandleGrid()}},context:{row:{uniqid:this.$lib.getUniqid(),key:null,sort:5},runHandleGrid:function(){if(null==e.grid.options.api)return!1;e.handleGrid()}},coldef:{suppressMenu:!1,resizable:!0,singleClickEdit:!0,suppressMovable:!0},components:{dispose:l["a"],setter:n["a"],bmy:b},getRowNodeId:function(e){return e.uniqid},column:[{headerName:"序号",width:50,field:"sequence",headerComponent:"dispose",headerComponentParams:{dispose:{key:"ice"}},valueGetter:function(e){return e.node.rowIndex+1},hide:!1,dispose:!1},{headerName:"操作",width:50,field:"setter",cellRenderer:"setter",hide:!1,dispose:!1},{headerName:"排序",width:50,field:"sort",hide:!0},{headerName:"核销类型",width:120,field:"bill",hide:!1,dispose:!0},{headerName:"单据类型",width:120,field:"mold",hide:!1,dispose:!0},{headerName:"单据日期",width:120,field:"time",hide:!1,dispose:!0},{headerName:"单据编号",width:150,field:"number",hide:!1,dispose:!0},{headerName:"单据金额",width:100,field:"total",hide:!1,dispose:!0},{headerName:"已核销",width:100,field:"amount",hide:!1,dispose:!0},{headerName:"未核销",width:100,field:"anwo",hide:!1,dispose:!0},{headerName:"核销金额",width:120,field:"money",headerComponent:"bmy",headerComponentParams:{dispose:{type:function(){return e.form.type}}},editable:!0,hide:!1,dispose:!0}],status:[{text:"总条数",type:"count"}]},bill:{dialog:!1,parm:{}},inited:!0}},computed:{store:function(){return this.$store.state}},created:function(){this.init()},methods:{init:function(){var e=this;null==this.source?(this.form.time=this.$moment().format("YYYY-MM-DD"),this.form.number="HXD"+this.$moment().format("YYMMDDHHmmssS")):(this.inited=!1,this.$axios.post("bill/get",{parm:this.source}).then((function(t){"success"==t.state?(e.form=t.info.class,e.pushGrid(t.info.info,!1),setTimeout((function(){e.inited=!0}),996)):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})))},save:function(){var e=this,t=this.$refs["form"];this.$lib.aloneValidate(t,["time","number"]).then((function(){var a=e.handleGrid();1==a?0==e.info.length?e.$message({type:"warning",message:"核销单据不可为空!"}):e.form.pmy-0!=e.form.smp-0?e.$message({type:"warning",message:"总核销金额不对等!"}):t.validate((function(t){t?e.$axios.post("bill/save",{class:e.form,info:e.info}).then((function(t){"success"==t.state?e.store.sys.fun.examine&&0==e.form.id?(e.form.id=t.info,e.$message({type:"success",message:"审核单据中..."}),setTimeout((function(){e.examine()}),996)):(e.form.id=t.info,e.$message({type:"success",message:"单据保存成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})):e.$message({type:"warning",message:"表单验证错误,请检查并修正!"})})):e.$message({type:"warning",message:a})})).catch((function(t){e.$message({type:"warning",message:t})}))},examine:function(){var e=this;this.$axios.post("bill/examine",{parm:[this.form.id]}).then((function(t){"success"==t.state?(e.form.examine=0==e.form.examine?1:0,e.$message({type:"success",message:(0==e.form.examine?"反审核":"审核")+"单据成功!"})):"error"==t.state?e.$message({type:"warning",message:t.info}):e.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},showBill:function(){var e=this.form.type,t=this.form.customer,a=this.form.supplier;0==e&&null==t?this.$message({type:"warning",message:"客户不可为空!"}):1==e&&null==a?this.$message({type:"warning",message:"供应商不可为空!"}):2!=e||null!=t&&null!=a?3==e&&null==t?this.$message({type:"warning",message:"客户不可为空!"}):4==e&&null==a?this.$message({type:"warning",message:"供应商不可为空!"}):(this.bill.parm={type:e,customer:t,supplier:a},this.bill.dialog=!0):this.$message({type:"warning",message:"客户和供应商不可为空!"})},typeChange:function(){this.inited&&(this.$refs["customer"].init(),this.$refs["supplier"].init(),this.clearGrid())},clearGrid:function(){this.inited&&this.grid.options.api.setRowData([this.grid.context.row])},pushGrid:function(e){var t,a=this,s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=[],i=this.$grid.getGridData(this.grid.options),l=[{imy:0,sell:1,sre:2,ice:3},{omy:0,buy:1,bre:2,oce:3},{sell:0,sre:1,ice:2,buy:3,bre:4,oce:5},{sre:0,sell:1},{bre:0,buy:1}][this.form.type],n=Object(o["a"])(e);try{var c=function(){var e=t.value,o=s?e:e.sourceData,n={uniqid:a.$lib.getUniqid(),key:o.id,billType:s?o.bill.type:e.bill,moldType:s?o.mold.type:e.mold,sort:l[s?o.mold.type:e.mold],bill:s?o.bill.name:e.extension.bill,mold:s?o.mold.name:e.extension.mold,time:o.time,number:o.number,total:o.total,amount:o.extension.amount,anwo:o.extension.anwo,money:s?"":e.money};-1!=[0,1,2].indexOf(a.form.type)&&-1!=["bre","sre"].indexOf(n.moldType)&&(n.total*=-1,n.amount*=-1,n.anwo*=-1),-1==i.findIndex((function(e){return e.key==n.key&&e.moldType==n.moldType}))&&r.push(n)};for(n.s();!(t=n.n()).done;)c()}catch(m){n.e(m)}finally{n.f()}this.$grid.pushGridData(this.grid.options,r),this.grid.options.columnApi.applyColumnState({state:[{colId:"sort",sort:"asc"}]}),this.handleGrid()},handleGrid:function(){for(var e=!0,t=this.$grid.getGridData(this.grid.options),a=0;a<t.length;a++)if(null==t[a].key)t.splice(a,1);else{if(!this.$lib.synValidate("numerical",t[a].money)||t[a].money-0==0){1==e&&(e="数据表格第"+(a+1)+"行核销金额不正确!");continue}if(t[a].total-0>0&&!(t[a].money>0&&t[a].money<=t[a].anwo)){1==e&&(e="数据表格第"+(a+1)+"行核销金额不正确!");continue}if(t[a].total-0<0&&!(t[a].money<0&&t[a].money>=t[a].anwo)){1==e&&(e="数据表格第"+(a+1)+"行核销金额不正确!");continue}}return 1==e&&(this.$set(this,"info",t.map((function(e){return{source:e.key,bill:e.billType,mold:e.moldType,money:e.money}}))),this.summary()),e},summary:function(){var e=this,t=0,a=0,s=[{imy:0,sell:1,sre:1,ice:1},{omy:0,buy:1,bre:1,oce:1},{sell:0,sre:0,ice:0,buy:1,bre:1,oce:1},{sre:0,sell:1},{bre:0,buy:1}][this.form.type];this.info.forEach((function(r){0==s[r.mold]?t=e.$calc.chain(t).add(r.money).done():a=e.$calc.chain(a).add(r.money).done()})),this.form.pmy=t,this.form.smp=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},T=C,S=Object(f["a"])(T,s,r,!1,null,null,null);t["default"]=S.exports},d5e8:function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"invoice area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择供应商",action:"service/supplierRecord",scene:"supplier"},model:{value:e.searchFrom.supplier,callback:function(t){e.$set(e.searchFrom,"supplier",t)},expression:"searchFrom.supplier"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择客户",action:"service/customerRecord",scene:"customer"},model:{value:e.searchFrom.customer,callback:function(t){e.$set(e.searchFrom,"customer",t)},expression:"searchFrom.customer"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"单据类型",multiple:"","collapse-tags":""},model:{value:e.searchFrom.mold,callback:function(t){e.$set(e.searchFrom,"mold",t)},expression:"searchFrom.mold"}},[t("el-option",{attrs:{label:"采购单",value:"buy"}}),t("el-option",{attrs:{label:"采购退货单",value:"bre"}}),t("el-option",{attrs:{label:"销售单",value:"sell"}}),t("el-option",{attrs:{label:"销售退货单",value:"sre"}})],1)],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"开具开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"开具结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入发票号码",clearable:""},model:{value:e.searchFrom.inr,callback:function(t){e.$set(e.searchFrom,"inr",t)},expression:"searchFrom.inr"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入发票抬头",clearable:""},model:{value:e.searchFrom.title,callback:function(t){e.$set(e.searchFrom,"title",t)},expression:"searchFrom.title"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[e.$lib.getUserRoot(e.store.root,"invoice","del")?[0!=e.tableSelection.length?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),t("el-button",{on:{click:e.exports}},[e._v("导出")]),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px"}}),t("el-table-column",{attrs:{prop:"name",label:"单据类型",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"sourceData.frameData.name",label:"所属组织",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"current.name",label:"往来单位",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"sourceData.time",label:"单据时间",align:"center",width:"120px"}}),t("el-table-column",{attrs:{prop:"sourceData.number",label:"单据编号",align:"center",width:"180px"}}),t("el-table-column",{attrs:{prop:"sourceData.actual",label:"单据金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"time",label:"开票时间",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"number",label:"发票号码",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"title",label:"发票抬头",align:"center",width:"160px"}}),t("el-table-column",{attrs:{prop:"money",label:"发票金额",align:"center",width:"90px"}}),t("el-table-column",{attrs:{prop:"file",label:"开票附件",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[0==a.row.file.length?[t("span",[e._v("无附件")])]:[t("el-popover",{attrs:{"popper-class":"listPopover",trigger:"click"}},[t("div",{attrs:{slot:"reference"},slot:"reference"},[t("span",[e._v("查看附件")]),t("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),t("ul",[e._l(a.row.file,(function(a){return[t("li",{on:{click:function(t){return e.down(a)}}},[e._v(e._s(a.name))])]}))],2)])]]}}])}),t("el-table-column",{attrs:{prop:"data",label:"备注信息",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"120px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("a447")),l=a("5549"),n=a("947e"),c={name:"Invoice",components:{NodList:i["a"],NodUpload:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{supplier:null,customer:null,number:"",mold:[],startTime:"",endTime:"",inr:"",title:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"单据总金额",type:"sum",key:"sourceData.actual"},{text:"发票总金额",type:"sum",key:"money"}]}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("invoice/form",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("invoice/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))})).catch((function(){}))},down:function(e){this.$message({type:"success",message:"[ "+e.name+" ] 下载请求中..."}),setTimeout((function(){window.open(e.url)}),1e3)},exports:function(){var e=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var t=this.$lib.objToParm({parm:this.tableSelection},!0);setTimeout((function(){window.open(e.$base.web+"invoice/formExports?"+t)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("a129"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,"9d69c832",null);t["default"]=p.exports},df05:function(e,t,a){"use strict";a("b0c0");var s=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"rae",attrs:{tabindex:"-1"},on:{keydown:function(t){return t.stopPropagation(),t.preventDefault(),e.raeEvent.apply(null,arguments)}}},[t("el-popover",{ref:"popover",attrs:{"popper-class":"agGridSelect",trigger:"manual"}},[t("p",{attrs:{slot:"reference"},slot:"reference"},[e._v(e._s(e.value))]),t("ul",{staticClass:"list"},[e._l(e.list,(function(a,s){return[t("li",{class:{hover:s==e.hover},on:{click:function(t){return e.choice(a)}}},[e._v(e._s(a.name))])]}))],2)])],1)},r=[],o=(a("c740"),a("2b0e")),i=o["default"].extend({name:"Rae",data:function(){return{value:null,list:[],hover:0}},created:function(){var e=this;this.value=this.params.node.data[this.params.dispose.text],this.list=this.store.iet[this.params.dispose.type];var t=this.list.findIndex((function(t){return t.name==e.value}));-1==t||(this.hover=t)},computed:{store:function(){return this.$store.state}},methods:{choice:function(e){this.value=e.name,this.params.node.data[this.params.dispose.key]=e.id,this.$el.parentNode.focus(),this.params.api.stopEditing()},raeEvent:function(e){var t=e.keyCode;13==t?this.choice(this.list[this.hover]):27==t?(this.$el.parentNode.focus(),this.params.api.stopEditing()):38==t?this.list.hasOwnProperty(this.hover-1)&&this.hover--:40==t&&this.list.hasOwnProperty(this.hover+1)&&this.hover++},getValue:function(){return this.value}},mounted:function(){var e=this;this.$nextTick((function(){e.$el.focus(),e.$refs.popover.showPopper=!0}))}}),l=i,n=(a("6b0c"),a("2877")),c=Object(n["a"])(l,s,r,!1,null,"7ec11f78",null);t["a"]=c.exports},e021:function(e,t,a){"use strict";a.r(t);a("b0c0");var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"imyForm area"},[t("div",{staticClass:"layout"},[t("el-popover",{ref:"searchPopover",attrs:{"popper-class":"searchPopover",placement:"bottom-start"}},[t("el-form",{ref:"searchFrom",staticClass:"searchFrom",attrs:{inline:""}},[t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.searchFrom.number,callback:function(t){e.$set(e.searchFrom,"number",t)},expression:"searchFrom.number"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择资金账户",action:"service/accountRecord",scene:"account"},model:{value:e.searchFrom.account,callback:function(t){e.$set(e.searchFrom,"account",t)},expression:"searchFrom.account"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入开始日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.startTime,callback:function(t){e.$set(e.searchFrom,"startTime",t)},expression:"searchFrom.startTime"}})],1),t("el-form-item",[t("el-date-picker",{attrs:{placeholder:"请输入结束日期","value-format":"yyyy-MM-dd",type:"date"},model:{value:e.searchFrom.endTime,callback:function(t){e.$set(e.searchFrom,"endTime",t)},expression:"searchFrom.endTime"}})],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择制单人",action:"service/userRecord",scene:"user"},model:{value:e.searchFrom.user,callback:function(t){e.$set(e.searchFrom,"user",t)},expression:"searchFrom.user"}})],1),t("el-form-item",[t("el-select",{attrs:{placeholder:"请选择审核状态",clearable:""},model:{value:e.searchFrom.examine,callback:function(t){e.$set(e.searchFrom,"examine",t)},expression:"searchFrom.examine"}},[t("el-option",{attrs:{label:"未审核",value:1}}),t("el-option",{attrs:{label:"已审核",value:2}})],1)],1),t("el-form-item",[t("nodList",{attrs:{placeholder:"请选择关联人员",action:"service/peopleRecord",scene:"people"},model:{value:e.searchFrom.people,callback:function(t){e.$set(e.searchFrom,"people",t)},expression:"searchFrom.people"}})],1),t("el-form-item",[t("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.searchFrom.data,callback:function(t){e.$set(e.searchFrom,"data",t)},expression:"searchFrom.data"}})],1),t("el-divider"),t("el-button",{staticClass:"searchBtn",attrs:{icon:"el-icon-search"},on:{click:function(t){return e.record(1)}}})],1),t("el-button",{attrs:{slot:"reference",icon:"el-icon-more"},slot:"reference"})],1),t("el-button-group",[0!=e.tableSelection.length?[e.$lib.getUserRoot(e.store.root,"allot","examine")?[t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"center","popper-class":"blockPopover",trigger:"click"}},[t("el-button",{attrs:{slot:"reference",type:"info"},slot:"reference"},[e._v("操作")]),t("ul",[t("li",{on:{click:function(t){return e.examine(0)}}},[e._v("审核")]),t("li",{on:{click:function(t){return e.examine(1)}}},[e._v("反审核")])])],1)]:e._e(),e.$lib.getUserRoot(e.store.root,"allot","del")?[t("el-button",{attrs:{type:"info"},on:{click:function(t){return e.del(e.tableSelection)}}},[e._v("删除")])]:e._e()]:e._e(),e.$lib.getUserRoot(e.store.root,"allot","batch")?[t("el-button",{on:{click:function(t){e.batch.dialog=!0}}},[e._v("批量")])]:e._e(),t("el-button",{on:{click:e.reload}},[e._v("刷新")])],2)],1),t("el-divider"),t("el-table",{directives:[{name:"madeTable",rawName:"v-madeTable"}],attrs:{data:e.tableData,height:"calc(100% - 90px)",border:""},on:{"selection-change":e.selectionChange}},[t("el-table-column",{attrs:{type:"selection",align:"center",width:"39px",fixed:"left"}}),t("el-table-column",{attrs:{prop:"frameData.name",label:"所属组织",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"time",label:"单据时间",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"number",label:"单据编号",align:"center",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{on:{click:function(t){return e.billShow(a.row.id)}}},[e._v(e._s(a.row.number))])]}}])}),t("el-table-column",{attrs:{prop:"total",label:"单据金额",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"peopleData.name",label:"关联人员",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"extension.examine",label:"审核状态",align:"center",width:"100px"}}),t("el-table-column",{attrs:{prop:"userData.name",label:"制单人",align:"center",width:"150px"}}),t("el-table-column",{attrs:{prop:"data",label:"备注信息 ",align:"center","min-width":"200px"}}),t("el-table-column",{attrs:{prop:"set",label:"相关操作",align:"center",width:"180px",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.billShow(a.row.id)}}},[e._v("详情")]),e.$lib.getUserRoot(e.store.root,"allot","del")?[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.del([a.row.id])}}},[e._v("删除")])]:e._e(),t("el-popover",{staticClass:"btnGroupPopover",attrs:{type:"right","popper-class":"listPopover",trigger:"click",placement:"bottom-end"}},[t("el-button",{staticStyle:{padding:"7px"},attrs:{slot:"reference",icon:"el-icon-arrow-down",size:"mini"},slot:"reference"}),t("ul",[e._l(a.row.recordData,(function(a){return[t("li",[e._v(" "+e._s(a.extension.time)+" - "+e._s(a.userData.name)+" - "+e._s(a.info)+" ")])]}))],2)],1)],2)]}}])})],1),t("el-pagination",{staticClass:"tablePagination",attrs:{"current-page":e.page.current,total:e.page.total,"page-size":e.page.size,"page-sizes":e.page.sizes,"pager-count":e.page.count,layout:"prev,pager,next,jumper,sizes,total,slot"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"update:pageSize":function(t){return e.$set(e.page,"size",t)},"update:page-size":function(t){return e.$set(e.page,"size",t)},"size-change":function(t){return e.record(1)},"current-change":function(t){return e.record(0)}}},[t("PageStatus",{attrs:{config:e.page.status,model:e.tableData}})],1),t("el-dialog",{staticClass:"billDialog",attrs:{visible:e.bill.dialog,title:"单据详情",fullscreen:!0},on:{"update:visible":function(t){return e.$set(e.bill,"dialog",t)},close:e.billDestroy}},[t("transition",{attrs:{name:"el-fade-in"}},[e.bill.dialog?[t("Allot",{attrs:{source:e.bill.source},on:{destroy:function(t){e.bill.dialog=!1}}})]:e._e()],2)],1),t("el-dialog",{directives:[{name:"madeDialog",rawName:"v-madeDialog"}],staticClass:"tabsDialog",attrs:{visible:e.batch.dialog,title:"批量",width:"420px"},on:{"update:visible":function(t){return e.$set(e.batch,"dialog",t)}}},[t("transition",{attrs:{name:"el-fade-in"}},[e.batch.dialog?[t("el-tabs",{model:{value:e.batch.active,callback:function(t){e.$set(e.batch,"active",t)},expression:"batch.active"}},[t("el-tab-pane",{attrs:{label:"导入数据",name:"import"}},[t("ul",{staticClass:"importTip"},[t("li",[e._v("1.该功能适用于Excel导入单据数据。")]),t("li",[e._v("2.录入数据时,请勿修改首行数据标题以及排序。")]),t("li",[e._v("3.字段之间存在关联关系时,将自动进行关联运算。")]),t("li",[e._v("4.请查阅使用文档获取字段格式内容以及相关导入须知。")]),t("li",[e._v("5.点击下方上传模板,选择您编辑好的模板文件即可。")])]),t("el-divider"),t("el-row",{staticStyle:{"text-align":"center"}},[t("el-col",{attrs:{span:12}},[t("el-button",{attrs:{type:"info"},on:{click:e.downTemplate}},[e._v("下载模板")])],1),t("el-col",{attrs:{span:12}},[t("el-upload",{attrs:{action:e.$base.web+"allot/import",headers:{Token:e.$store.state.token},"show-file-list":!1,"on-success":e.importCall}},[t("el-button",{attrs:{type:"primary"}},[e._v("上传模板")])],1)],1)],1)],1),t("el-tab-pane",{staticClass:"exportGroup",attrs:{label:"导出数据",name:"export"}},[t("div",{staticClass:"item",on:{click:function(t){return e.exports("simple")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("简易报表")])]),t("div",{staticClass:"item",on:{click:function(t){return e.exports("detailed")}}},[t("i",{staticClass:"el-icon-download"}),t("p",[e._v("详细报表")])])])],1)]:e._e()],2)],1)],1)},r=[],o=a("b85c"),i=(a("14d9"),a("d3b7"),a("159b"),a("8b26")),l=a("a447"),n=a("947e"),c={name:"ImyForm",components:{Allot:i["default"],NodList:l["a"],PageStatus:n["a"]},data:function(){return{searchFrom:{number:"",startTime:"",endTime:"",people:null,user:null,examine:"",account:null,data:""},tableData:[],tableSelection:[],page:{current:1,total:0,size:30,sizes:[30,60,90,150,300],count:5,status:[{text:"总单据金额",type:"sum",key:"total"}]},bill:{dialog:!1,source:null},batch:{dialog:!1,active:"import"}}},created:function(){this.init(),this.record(1)},computed:{store:function(){return this.$store.state}},methods:{init:function(){this.searchFrom.startTime=this.$moment().subtract(this.store.sys.fun.days,"days").format("YYYY-MM-DD"),this.searchFrom.endTime=this.$moment().format("YYYY-MM-DD")},record:function(e){var t=this;0==e||(this.page.current=e);var a=Object.assign({page:this.page.current,limit:this.page.size},this.searchFrom);this.$axios.post("allot/record",a).then((function(e){"success"==e.state?(t.tableData=e.info,t.page.total=e.count,t.$refs["searchPopover"].showPopper=!1):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},billShow:function(e){this.bill.source=e,this.bill.dialog=!0},billDestroy:function(){this.record(0)},examine:function(e){var t=this,a=[];this.tableData.forEach((function(s){-1!=t.tableSelection.indexOf(s.id)&&(0==s.examine?0==e&&a.push(s.id):1==e&&a.push(s.id))})),0==a.length?this.$message({type:"warning",message:"无可操作单据!"}):this.$axios.post("allot/examine",{parm:a}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"操作单据成功!"})):"error"==e.state?(t.record(0),t.$message({type:"warning",message:e.info})):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})}))},del:function(e){var t=this;this.$confirm("您确定要删除选中数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$axios.post("allot/del",{parm:e}).then((function(e){"success"==e.state?(t.record(0),t.$message({type:"success",message:"删除成功!"})):"error"==e.state?t.$message({type:"warning",message:e.info}):t.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})})).catch((function(){}))}))},downTemplate:function(){var e=this;this.$message({type:"success",message:"[ 数据模板 ] 下载请求中..."}),setTimeout((function(){window.open(e.store.base.cdnSite+"/erp/batch/转账单导入模板.xlsx")}),1e3)},importCall:function(e,t,a){"success"==e.state?(this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"导入单据成功!"})):"error"==e.state?this.$message({type:"warning",message:"[ "+t.name+" ]"+e.info}):this.$message({type:"error",message:"[ ERROR ] 服务器响应超时!"})},exports:function(e){var t=this;if(0==this.tableSelection.length)this.$message({type:"warning",message:"未选择导出数据内容!"});else{this.$message({type:"success",message:"[ 导出数据 ] 请求中..."});var a=this.$lib.objToParm({scene:e,parm:this.tableSelection},!0);setTimeout((function(){window.open(t.$base.web+"allot/exports?"+a)}),1e3)}},selectionChange:function(e){var t,a=[],s=Object(o["a"])(e);try{for(s.s();!(t=s.n()).done;){var r=t.value;a.push(r.id)}}catch(i){s.e(i)}finally{s.f()}this.tableSelection=a},reload:function(){this.$bus.emit("homeReload",this.$options.name),this.$message({type:"success",message:"页面刷新成功!"})}}},m=c,u=(a("cadd"),a("2877")),p=Object(u["a"])(m,s,r,!1,null,null,null);t["default"]=p.exports},e156:function(e,t,a){},f0fa:function(e,t,a){"use strict";a("835e")},f1cd:function(e,t,a){"use strict";a("0f14e")},f1e0:function(e,t,a){"use strict";a("619a")},f59b:function(e,t,a){"use strict";a("8949")},fd13:function(e,t,a){}}]);