You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

1 lines
6.2 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3c79bd8c"],{"04de":function(e,t,r){"use strict";var a=r("9e7c");r.n(a).a},"1a86":function(e,t,r){"use strict";t.a={data:function(){return{isSearch:!1,total:null}},created:function(){},methods:{handleSizeChange:function(e){this.queryInfo.pageSize=e,this.initTable()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.initTable()},searchClick:function(){this.isSearch=!this.isSearch}}}},"5e56":function(e,t,r){"use strict";r.r(t);r("cca6"),r("96cf");var a=r("1da1"),i=r("1a86"),n=r("10bd"),o={name:"ReimbursementForOther",mixins:[i.a],data:function(){return{tableData:[],ReimbursementForOtherDialog:!1,formField:{mainId:"",proxyId:""},userProxyList:[],hasAlreadyProxyList:[],queryInfo:{pageSize:5,pageNo:1,keywords:"",mainUser:localStorage.getItem("username")},type:0,rules:{mainId:[{required:!0,message:"请输入代理人",trigger:"blur"}],proxyId:[{required:!0,message:"请输入被代理人",trigger:"blur"}]}}},mounted:function(){this.initTable()},methods:{searchRes:function(){this.initTable()},reset:function(){this.queryInfo={pageSize:5,pageNo:1,pageNum:1}},remoteMethod:function(e){var t=this;Object(n.e)(e).then((function(e){t.userProxyList=e.result}))},remoteMethod1:function(e){var t=this;Object(n.e)(e).then((function(e){t.hasAlreadyProxyList=e.result}))},deleteById:function(e){var t=this;return Object(a.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.$confirm("是否删除","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 2:"confirm"==r.sent&&Object(n.i)(e.id).then((function(e){200==e.status&&(t.$message.success("删除成功!"),t.initTable())})).catch((function(e){}));case 4:case"end":return r.stop()}}),r)})))()},initTable:function(){var e=this,t=Object.assign({},this.queryInfo);Object(n.H)(t).then((function(t){200==t.status&&(e.tableData=t.result.data,e.total=t.result.pagination.total)}))},comfirmEditOrMake:function(){var e=this,t=Object.assign({},this.formField);this.$refs.ruleForm.validate((function(t){t||e.$message.error("请检查是否存在未填项!")})),0==this.type?Object(n.db)(t).then((function(t){200==t.status&&(e.initTable(),e.ReimbursementForOtherDialog=!1)})):Object(n.ub)(t).then((function(t){200==t.status&&(e.initTable(),e.ReimbursementForOtherDialog=!1)}))},make:function(){this.ReimbursementForOtherDialog=!0},editTableColumnData:function(e){this.userProxyList=[{username:e.mainUser,userId:e.mainId}],this.hasAlreadyProxyList=[{username:e.proxyUser,userId:e.proxyId}],this.ReimbursementForOtherDialog=!0,this.type=1,this.formField=e},dialogCancle:function(){this.ReimbursementForOtherDialog=!1,this.userProxyList=[],this.hasAlreadyProxyList=[],this.formField={mainId:"",proxyId:""}}}},s=(r("04de"),r("2877")),l=Object(s.a)(o,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"ReimbursementForOther"},[r("div",{staticClass:"SupplierInvoice h100 bgfff"},[r("div",{staticClass:"bgc p-left-2"},[r("div",{staticClass:"d-flex a-center m-bottom-1"},[r("FeesInput",{attrs:{santakLabel:"代理人",fieldName:"mainUser",field:"queryInfo","label-width":"100",defaultValue:e.queryInfo.mainUser}}),r("FeesInput",{attrs:{santakLabel:"被代理人",fieldName:"proxyUser",field:"queryInfo","label-width":"100",defaultValue:e.queryInfo.proxyUser}}),r("div",{staticClass:"d-flex"},[r("FeesButton",{attrs:{text:"搜索",icon:"el-icon-search"},on:{buttonClick:e.searchRes}}),r("FeesButton",{attrs:{text:"重置",icon:"el-icon-refresh"},on:{buttonClick:e.reset}})],1)],1)]),r("div",{staticClass:"bg-fff p-x-2 h100",staticStyle:{"min-height":"500px"}},[r("div",{staticClass:"m-bottom-2 p-top-1 d-flex"},[r("FeesButton",{attrs:{text:"添加代理人",icon:"el-icon-circle-plus-outline"},on:{buttonClick:e.make}})],1),r("div",{},[r("el-table",{staticStyle:{width:"60%"},attrs:{data:e.tableData,stripe:"",border:""}},[r("el-table-column",{attrs:{label:"操作",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticClass:"text-color cursor",on:{click:function(r){return e.editTableColumnData(t.row)}}},[e._v(" 编辑 ")]),r("span",{staticClass:"cursor m-left-1 c-red",on:{click:function(r){return e.deleteById(t.row)}}},[e._v(" 删除 ")])]}}])}),r("el-table-column",{attrs:{prop:"mainUser",label:"代理人",align:"center"}}),r("el-table-column",{attrs:{prop:"proxyUser",label:"被代理人",align:"center"}})],1)],1),r("div",{staticClass:"m-y-1"},[r("el-pagination",{attrs:{background:"","current-page":e.queryInfo.pageNo,"page-size":e.queryInfo.pageSize,"page-sizes":[5,10,20,30,50],layout:" prev, pager, next,total, sizes, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange,"update:currentPage":function(t){return e.$set(e.queryInfo,"pageNo",t)},"update:current-page":function(t){return e.$set(e.queryInfo,"pageNo",t)}}})],1),r("el-dialog",{attrs:{title:0==e.type?"新建":"编辑",visible:e.ReimbursementForOtherDialog,"before-close":e.dialogCancle},on:{"update:visible":function(t){e.ReimbursementForOtherDialog=t}}},[r("el-form",{ref:"ruleForm",attrs:{model:e.formField,"label-position":"left","label-width":"80px",rules:e.rules}},[r("el-form-item",{attrs:{label:"代理人",prop:"mainId"}},[r("el-select",{attrs:{filterable:"",remote:"","remote-method":e.remoteMethod},model:{value:e.formField.mainId,callback:function(t){e.$set(e.formField,"mainId",t)},expression:"formField.mainId"}},e._l(e.userProxyList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.username,value:e.userId}})})),1)],1),r("el-form-item",{attrs:{label:"被代理人",prop:"proxyId"}},[r("el-select",{attrs:{filterable:"",remote:"","remote-method":e.remoteMethod1},model:{value:e.formField.proxyId,callback:function(t){e.$set(e.formField,"proxyId",t)},expression:"formField.proxyId"}},e._l(e.hasAlreadyProxyList,(function(e,t){return r("el-option",{key:t,attrs:{label:e.username,value:e.userId}})})),1)],1)],1),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.dialogCancle}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.comfirmEditOrMake}},[e._v("确 定")])],1)],1)],1)])])}),[],!1,null,"2638a652",null);t.default=l.exports},"9e7c":function(e,t,r){}}]);