webpackJsonp([317],{KKCQ:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),o=a.n(s),l=a("bzuE"),i={data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,startTime:"",endTime:"",clientName:""},showTableColumnsDefault:[{title:"开票日期",prop_:"invoiceDate",select:!0},{title:"费用发票号码",prop_:"invoiceNum",select:!0},{title:"客户",prop_:"clientName",select:!0},{title:"费用代码",prop_:"expenseCode",select:!0},{title:"费用名称",prop_:"expenseName",select:!0},{title:"单位",prop_:"unitName",select:!0},{title:"数量",prop_:"count",select:!0},{title:"不含税单价(元)",prop_:"unitPrice",select:!0},{title:"含税单价(元)",prop_:"taxUnitPrice",select:!0},{title:"税率(%)",prop_:"taxRate",select:!0},{title:"不含税金额(元)",prop_:"amount",select:!0},{title:"税额(元)",prop_:"taxes",select:!0},{title:"价税合计(元)",prop_:"taxAmount",select:!0},{title:"审核状态",prop_:"auditSignName",select:!0}],showTableColumns:[{title:"开票日期",prop_:"invoiceDate",select:!0},{title:"费用发票号码",prop_:"invoiceNum",select:!0},{title:"客户",prop_:"clientName",select:!0},{title:"费用代码",prop_:"expenseCode",select:!0},{title:"费用名称",prop_:"expenseName",select:!0},{title:"单位",prop_:"unitName",select:!0},{title:"数量",prop_:"count",select:!0},{title:"不含税单价(元)",prop_:"unitPrice",select:!0},{title:"含税单价(元)",prop_:"taxUnitPrice",select:!0},{title:"税率(%)",prop_:"taxRate",select:!0},{title:"不含税金额(元)",prop_:"amount",select:!0},{title:"税额(元)",prop_:"taxes",select:!0},{title:"价税合计(元)",prop_:"taxAmount",select:!0},{title:"审核状态",prop_:"auditSignName",select:!0}],config:l.a,tableData:[],tableId:"sales_Bill_table",salesBillIds:[],time:"",summary:{},invoiceDate:"",showTableColumnsTemp:[],formTableData:[],btnDelDisabled:!0,btnOtherDisabled:!0,columnSetDialogVisible:!1,columnSetDialogTitle:"设置显示字段列表",pictLoading:!1}},created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},mounted:function(){this.showTableColumns=JSON.parse(o()(this.showTableColumns)),this.showTableColumnsTemp=JSON.parse(o()(this.showTableColumns)),this.getList(),this.getShowColumns()},watch:{time:function(e){e?(this.search_data.startTime=e[0],this.search_data.endTime=e[1]):(this.search_data.startTime="",this.search_data.endTime="")}},methods:{viewDetail:function(e){var t=e.queryId;this.$router.push({path:"/sales/salesContract_add",query:{id:t,t:Date.now()}})},gotoDetail:function(e){this.$router.push({path:"/sales/salesCost_add",query:{id:e.id,t:Date.now()}})},goAdd:function(){this.$router.push({path:"/sales/salesCost_add",query:{t:Date.now()}})},exportExcel:function(){this.$api.salesCostAPI.export(this.search_data).then(function(e){console.log(e)})},audit:function(){var e=this,t=[];this.salesBillIds.forEach(function(e){t.push(e.id)}),console.log(t),this.$confirm("确认审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.salesCostAPI.audit(t).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.salesBillIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认反审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.salesCostAPI.backAudit(t).then(function(t){0===t.code?(e.$message({message:t.msg,type:"success"}),e.getList()):e.$message({message:t.msg,type:"error"})})})},remove:function(){var e=this,t=[];this.salesBillIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.salesCostAPI.remove(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"})})})},getList:function(){var e=this;this.pictLoading=!0,this.$api.salesCostAPI.getList(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.summary.totalAmount=t.data.totalAmount,e.summary.totalCount=t.data.totalCount,e.summary.totalTaxAmount=t.data.totalTaxAmount,e.summary.totalTaxes=t.data.totalTaxes,e.total=t.data.pageList.total,e.tableData=t.data.pageList.records?t.data.pageList.records:[],e.tableData.forEach(function(e){e.invoiceDate=/\d{4}-\d{1,2}-\d{1,2}/g.exec(e.invoiceDate)[0]})):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},search:function(){this.search_data.pageno=1,this.search_data.pagesize=10,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(o()(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):"invoiceNum"==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.invoiceNum))])],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)],1)},staticRenderFns:[]};var r=a("VU/8")(i,n,!1,function(e){a("tvBx")},"data-v-7eb44aa6",null);t.default=r.exports},tvBx:function(e,t){}});