webpackJsonp([290],{PoNX:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),i=a.n(s),o=a("Dd8w"),n=a.n(o),r=a("NYxO"),l=(a("t4zo"),a("bzuE")),c={data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10},search_data1:{pageno:1,pagesize:1e3,usingStart:0},summary:{},config:l.a,accountNumberList:[],settlementTypeList:[],tableData:[],paymentOrderIds:[],prDate:"",dialogTitle:"",time:"",selectDeptId:"",formDataTime:"",auditSignList:[],companyList:[],createByList:[],depOptions:[],formData:{},advanceQueryDialogVisible:!1,btnDelDisabled:!0,btnOtherDisabled:!0,chooseClientrVisible:!1,dialogLoading:!1,chooseUserVisible:!1,chooseMaterielVisible:!1,columnSetDialogVisible:!1,chooseSupplierVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"paymentOrder_table",pictLoading:!1,showTableColumnsDefault:[{title:"单据编号",prop_:"code",select:!0},{title:"付款日期",prop_:"payDate",select:!0},{title:"付款人",prop_:"payerName",select:!0},{title:"供应商",prop_:"supplierName",select:!0},{title:"付款类型",prop_:"paymentTypeName",select:!0},{title:"实付金额(元)",prop_:"totalPayAmount",select:!0},{title:"备注",prop_:"remarks",select:!0},{title:"审核状态",prop_:"auditSignName",select:!0}],showTableColumns:[{title:"单据编号",prop_:"code",select:!0},{title:"付款日期",prop_:"payDate",select:!0},{title:"付款人",prop_:"payerName",select:!0},{title:"供应商",prop_:"supplierName",select:!0},{title:"付款类型",prop_:"paymentTypeName",select:!0},{title:"实付金额(元)",prop_:"totalPayAmount",select:!0},{title:"备注",prop_:"remarks",select:!0},{title:"审核状态",prop_:"auditSignName",select:!0}],showTableColumnsTemp:[],formTableData:[]}},created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},computed:n()({},Object(r.c)({userInfo:"user/getUserInfo"})),mounted:function(){this.showTableColumns=JSON.parse(i()(this.showTableColumns)),this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns)),this.getList(),this.getShowColumns(),this.initData()},methods:{viewDetail:function(e){if("委外合同"===e.sourceTypeName){var t=e.sourceId;this.$router.push({path:"/outsourcing/outsourcing_contract_add",query:{id:t,t:Date.now()}})}else{var a=e.queryId;this.$router.push({path:"/purchase/purchase_contract_add",query:{id:a,t:Date.now()}})}},audit:function(){var e=this,t=this.paymentOrderIds[0].id,a=[];a.push(t),this.$confirm("确认审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.paymentOrderAPI.audit({ids:a}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg,type:"error"})})})},disAudit:function(){var e=this,t=this.paymentOrderIds[0].id,a=[];a.push(t),this.$confirm("确认反审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.paymentOrderAPI.reverseAudit({ids:a}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg,type:"error"})})})},initData:function(){var e=this;this.$api.salesAPI.listContractType({type:"type_of_payment"}).then(function(t){e.accountNumberList=t.datas})},search:function(){this.search_data.pageno=1,this.search_data.pagesize=10,this.getList()},moreSearch:function(){this.advanceQueryDialogVisible=!0},save:function(){for(var e in this.formData)this.search_data[e]=this.formData[e];this.search_data.pageno=1,this.$nextTick(function(){this.advanceQueryDialogVisible=!1,this.getList()})},clear:function(){for(var e in this.formData)this.formData[e]="";this.$forceUpdate()},getList:function(){var e=this;this.pictLoading=!0,this.$api.paymentOrderAPI.listOfReceived(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.summary=t.data,e.total=t.data.pageList.total,e.tableData=t.data.pageList?t.data.pageList.records:[]):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},getSummaries:function(e){var t=this,a=e.columns,s=e.data,i=[];return a.forEach(function(e,a){if(0!==a)if("thisAmount"==e.property){var o=s.map(function(t){return Number(t[e.property])});o.every(function(e){return isNaN(e)})?i[a]="":i[a]=o.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),"thisAmount"!=e.property||i[a]&&(i[a]=t.summary.totalThisAmount)}else i[a]="";else i[a]="合计"}),i},gotoDetail:function(e){this.$router.push({path:"/finance/commutation/paymentOrder_add",query:{id:e.id,t:Date.now()}})},goAdd:function(){this.$router.push({path:"/finance/commutation/paymentOrder_add",query:{t:Date.now()}})},exportExcel:function(){delete this.search_data.pagesize,delete this.search_data.pageno,this.$api.paymentOrderAPI.exportExcel(this.search_data).then(function(e){console.log(e)})},remove:function(){var e=this,t=[];this.paymentOrderIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.paymentOrderAPI.delet({ids:t}).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg?t.msg:"删除失败,请重试",type:"error"})}).catch(function(t){e.$message({message:"删除失败,请重试",type:"error"})})})},handleSelectionChange:function(e){console.log(e),this.paymentOrderIds=e,this.setBtn(e)},handleSizeChange:function(e){this.search_data.pagesize=e,this.getList()},handleCurrentChange:function(e){this.search_data.pageno=e,this.getList()},setBtn:function(e){var t=!0,a=!0;e.length>0?(a=!1,1==e.length&&(t=!1)):(t=!0,a=!0),this.btnOtherDisabled=a,this.btnDelDisabled=t},showColumnSetDialog:function(){this.columnSetDialogVisible=!0,this.showTableColumnsTemp=JSON.parse(i()(this.showTableColumns))},toUp:function(e){if(0==e.$index)return!1;for(var t=void 0,a=0;a0?a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],ref:"tb",attrs:{border:"",id:"out-table","show-summary":"","summary-method":e.getSummaries,data:e.tableData,"header-cell-style":{fontWeight:"normal",textAlign:"center",backgroundColor:"#eceff4",color:"#222"}},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),e._l(e.formTableData,function(t,s){return a("el-table-column",{key:s,attrs:{prop:t.prop_,label:t.title,align:"center","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(s){return[a("div",["sourceCode"==t.prop_?a("div",[a("el-link",{attrs:{type:"primary"},on:{click:function(t){return t.stopPropagation(),e.viewDetail(s.row)}}},[e._v(e._s(s.row.sourceCode))])],1):"code"==t.prop_?a("div",[a("el-link",{attrs:{type:"primary"},on:{click:function(t){return t.stopPropagation(),e.gotoDetail(s.row)}}},[e._v(e._s(s.row.code))])],1):a("div",[a("div",{staticStyle:{overflow:"hidden"}},[e._v(e._s(s.row[t.prop_]))])])])]}}],null,!0)})})],2):e._e()],1),e._v(" "),a("div",{staticClass:"sys-pagination"},[a("el-pagination",{attrs:{"current-page":e.search_data.pageno,"page-sizes":e.pageSizes,"page-size":e.search_data.pagesize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),e._v(" "),a("el-dialog",{attrs:{title:e.columnSetDialogTitle,center:"",visible:e.columnSetDialogVisible,width:"531px","before-close":e.handleClose},on:{"update:visible":function(t){e.columnSetDialogVisible=t}}},[a("el-table",{key:Math.random(),staticStyle:{width:"100%"},attrs:{border:"",data:e.showTableColumns,"max-height":"350"}},[a("el-table-column",{attrs:{prop:"title",label:"列表名称",width:"180",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{prop:"select",label:"是否显示",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{model:{value:t.row.select,callback:function(a){e.$set(t.row,"select",a)},expression:"scope.row.select"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toUp(t)}}},[e._v("前移")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.toDown(t)}}},[e._v("后移")])]}}])})],1),e._v(" "),a("el-row",{staticClass:"row-bg",staticStyle:{"margin-top":"10px"},attrs:{type:"flex",justify:"center"}},[a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:e.saveAndCloseColumnSetDialog}},[e._v("完成")])],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-button",{attrs:{type:"primary",size:"middle"},on:{click:e.toDefault}},[e._v("恢复默认")])],1)],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"高级查询",center:"",visible:e.advanceQueryDialogVisible,width:"670px"},on:{"update:visible":function(t){e.advanceQueryDialogVisible=t}}},[a("el-form",{ref:"form",staticClass:"dialog-form",staticStyle:{width:"620px"},attrs:{inline:!0,"label-width":"80px"}},[a("div",{staticClass:"dialog-line"},[a("el-form-item",{attrs:{label:"供应商"}},[a("el-input",{attrs:{placeholder:"请输入供应商",clearable:""},model:{value:e.formData.cusSupName,callback:function(t){e.$set(e.formData,"cusSupName",t)},expression:"formData.cusSupName"}})],1)],1)]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确定")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.advanceQueryDialogVisible=!1}}},[e._v("关闭")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.clear}},[e._v("清空")])],1)],1)],1)},staticRenderFns:[]};var p=a("VU/8")(c,u,!1,function(e){a("tgR7")},"data-v-a7e9f7b6",null);t.default=p.exports},tgR7:function(e,t){}});