1 line
8.0 KiB
JavaScript
1 line
8.0 KiB
JavaScript
webpackJsonp([352],{"737x":function(e,t){},"k+H6":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("Dd8w"),s=a.n(i),n=a("NYxO"),o=(a("t4zo"),a("bzuE")),r={components:{},data:function(){return{total:0,pageSizes:[10,20,50],search_data:{pageno:1,pagesize:10,startTime:"",endTime:"",code:""},config:o.a,tableData:[],otherReceivablesIds:[],inOutTime:"",dialogTitle:"",time:"",selectDeptId:"",formDataTime:"",auditSignList:[],companyList:[],createByList:[],depOptions:[],formData:{},summary:{},btnDelDisabled:!0,btnOtherDisabled:!0,dialogLoading:!1,chooseUserVisible:!1,chooseMaterielVisible:!1,columnSetDialogVisible:!1,advanceQueryDialogVisible:!1,columnSetDialogTitle:"设置显示字段列表",tableId:"produce_stock_table",pictLoading:!1}},computed:s()({},Object(n.c)({userInfo:"user/getUserInfo"})),created:function(){var e=this;document.onkeydown=function(t){"Enter"===t.key&&e.search()}},mounted:function(){this.getList()},methods:{search:function(){this.search_data.pageno=1,this.getList()},getList:function(){var e=this;this.pictLoading=!0,this.$api.otherPayableAPI.list(this.search_data).then(function(t){e.pictLoading=!1,t.data?(e.summary=t.totalAmount,e.total=t.data.totalRows,e.tableData=t.data.datas?t.data.datas:[],e.tableData.forEach(function(e){e.createTime=/\d{4}-\d{1,2}-\d{1,2}/g.exec(e.createTime)})):(e.total=0,e.tableData=[])}).catch(function(e){console.log(e)})},gotoDetail:function(e){this.$router.push({path:"/finance/commutation/otherPayable_add",query:{id:e.id,t:Date.now()}})},goAdd:function(){this.$router.push({path:"/finance/commutation/otherPayable_add",query:{t:Date.now()}})},audit:function(){var e=this,t=this.otherReceivablesIds[0].id;this.$confirm("确认审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.otherPayableAPI.audit({id: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.otherReceivablesIds[0].id;this.$confirm("确认反审核选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.otherPayableAPI.reverseAudit({id: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.otherReceivablesIds.forEach(function(e){t.push(e.id)}),this.$confirm("确认删除选中的项吗?","提示",{type:"warning"}).then(function(){e.$api.otherPayableAPI.batchDelete({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.otherReceivablesIds=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},getSummaries:function(e){var t=this,a=e.columns,i=e.data,s=[];return a.forEach(function(e,a){if(0!==a)if("amount"==e.property){var n=i.map(function(t){return Number(t[e.property])});n.every(function(e){return isNaN(e)})?s[a]="":s[a]=n.reduce(function(e,t){var a=Number(t);return isNaN(a)?e:e+t},0),"amount"!=e.property||s[a]&&(s[a]=t.summary)}else s[a]="";else s[a]="合计"}),s}},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="")},formDataTime:function(e){e?(this.formData.startTime=e[0],this.formData.endTime=e[1]):(this.formData.startTime="",this.formData.endTime="")}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys-box"},[a("div",{staticClass:"sys-operate"},[a("el-button",{directives:[{name:"has",rawName:"v-has",value:"finance:otherPayable:add",expression:"'finance:otherPayable:add'"}],attrs:{type:"primary"},on:{click:function(t){return e.goAdd()}}},[e._v("新增")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"finance:otherPayable:remove",expression:"'finance:otherPayable:remove'"}],attrs:{type:"primary",disabled:e.btnOtherDisabled},on:{click:function(t){return e.remove()}}},[e._v("删除")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"finance:otherPayable:audit",expression:"'finance:otherPayable:audit'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:e.audit}},[e._v("审核")]),e._v(" "),a("el-button",{directives:[{name:"has",rawName:"v-has",value:"finance:otherPayable:disAudit",expression:"'finance:otherPayable:disAudit'"}],attrs:{type:"primary",disabled:e.btnDelDisabled},on:{click:e.disAudit}},[e._v("反审核")])],1),e._v(" "),a("div",{staticClass:"sys-search"},[a("el-form",{staticClass:"form_item_search_out",attrs:{inline:""}},[a("div",{staticClass:"form_item_input_out"},[a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"单据编号"}},[a("el-input",{attrs:{placeholder:"请输入单据编号",clearable:""},model:{value:e.search_data.code,callback:function(t){e.$set(e.search_data,"code",t)},expression:"search_data.code"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"供应商"}},[a("el-input",{attrs:{placeholder:"模糊查询",clearable:""},model:{value:e.search_data.supplierName,callback:function(t){e.$set(e.search_data,"supplierName",t)},expression:"search_data.supplierName"}})],1),e._v(" "),a("el-form-item",{staticClass:"form_item-inline",staticStyle:{width:"33%"},attrs:{label:"时间"}},[a("el-date-picker",{attrs:{type:"daterange",format:"yyyy-MM-dd","value-format":"yyyy-MM-dd HH:mm:ss","range-separator":"—","start-placeholder":"开始时间","end-placeholder":"结束时间"},model:{value:e.time,callback:function(t){e.time=t},expression:"time"}})],1)],1),e._v(" "),a("div",{staticClass:"form_item_btn_out"},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.search()}}},[e._v("查询")])],1)],1)])],1),e._v(" "),a("div",{staticClass:"sys-table"},[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(" "),a("el-table-column",{attrs:{prop:"createTime",align:"center",label:"单据日期","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",align:"center",label:"单据编号","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return a.stopPropagation(),e.gotoDetail(t.row)}}},[e._v(e._s(t.row.code))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"supplierName",align:"center",label:"供应商名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"amount",align:"center",label:"金额(元)","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"digest",align:"center",label:"摘要","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"createByName",align:"center",label:"制单人","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"auditSignName",align:"center",label:"审核状态","show-overflow-tooltip":""}})],1)],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)])},staticRenderFns:[]};var c=a("VU/8")(r,l,!1,function(e){a("737x")},"data-v-66f22eab",null);t.default=c.exports}}); |