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
8.6 KiB
1 lines
8.6 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-9b6c2eac"],{"07e2":function(e,t,a){},"1a86":function(e,t,a){"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}}}},"34de":function(e,t,a){"use strict";var o=a("07e2");a.n(o).a},"6dbd":function(e,t,a){"use strict";a.r(t);a("cca6"),a("96cf");var o=a("1da1"),i=a("10bd"),l={name:"RuleSet",mixins:[a("1a86").a],data:function(){return{dataIndex:"",tableData:[],RuleSetDialog:!1,formField:{expenseTypeId:"",ticketTypeCode:"",kind:"",content:"",active:1,type:0},queryInfo:{pageSize:10,pageNo:1,pageNum:1},type:0,rules:{city:[{required:!0,message:"city不可为空",trigger:"change"}],code:[{required:!0,message:"code不可为空",trigger:"blur"}]}}},mounted:function(){this.initTable()},watch:{},methods:{searchRes:function(){this.initTable()},reset:function(){this.queryInfo={pageSize:10,pageNo:1,pageNum:1}},deleteById:function(e){var t=this;return Object(o.a)(regeneratorRuntime.mark((function a(){return regeneratorRuntime.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,t.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:"confirm"==a.sent&&Object(i.p)(e.id).then((function(e){200==e.status&&(t.$message.success("删除成功!"),t.initTable())})).catch((function(e){})),a.next=9;break;case 7:a.prev=7,a.t0=a.catch(0);case 9:case"end":return a.stop()}}),a,null,[[0,7]])})))()},initTable:function(){var e=this,t=Object.assign({},this.queryInfo);Object(i.z)(t).then((function(t){200==t.status?(e.tableData=t.result.data,e.total=t.result.pagination.total):e.$message.error(t.message)})).catch((function(e){}))},importHandle:function(){this.$refs.upload.click()},uploadAvater:function(e){var t=this,a=e.target.files[0],o=new FormData;o.append("file",a),this.$file.uploadFile(o,"api/manager/city/upload").then((function(a){200==a.status&&(e.target.value=[],t.$message.success("导入文件成功!"),t.initTable())})).catch((function(e){t.$message.error(e.message)}))},exportHandle:function(){var e={city:this.queryInfo.city,code:this.queryInfo.code};this.$file.downloadFile("api/manager/city/export",e,"filename")},comfirmEditOrMake:function(){var e=this,t=Object.assign({},this.formField);this.$refs.ruleForm.validate((function(a){a?0==e.type?Object(i.V)(t).then((function(t){200==t.status?(e.$message.success("添加成功!"),e.dialogCancle(),e.initTable()):e.$message.error(t.message)})).catch((function(e){})):(delete t.ruleInfo,Object(i.kb)(t).then((function(t){200==t.status?(e.$message.success("修改成功!"),e.dialogCancle(),e.initTable()):e.$message.error(t.message)})).catch((function(e){}))):e.$message.error("请检查是否存在未填项!")}))},make:function(){this.RuleSetDialog=!0,this.type=0},editTableColumnData:function(e){this.RuleSetDialog=!0,this.type=1,this.formField=e},dialogCancle:function(){this.RuleSetDialog=!1,this.formField={expenseTypeId:"",ticketTypeCode:"",kind:"",content:"",active:1,type:0}}}},n=(a("34de"),a("2877")),r=Object(n.a)(l,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"RuleSet"},[a("div",{staticClass:"SupplierInvoice h100 bgfff"},[a("div",{staticClass:"bgc p-left-2"},[a("div",{staticClass:"d-flex a-center m-bottom-1"},[a("FeesInput",{attrs:{santakLabel:"city",fieldName:"city",field:"queryInfo","label-width":"100",defaultValue:e.queryInfo.city}}),a("FeesInput",{attrs:{santakLabel:"code",fieldName:"code",field:"queryInfo","label-width":"100",defaultValue:e.queryInfo.code}}),a("div",{staticClass:"d-flex"},[a("FeesButton",{attrs:{text:"搜索",icon:"el-icon-search"},on:{buttonClick:e.searchRes}}),a("FeesButton",{attrs:{text:"重置",icon:"el-icon-refresh"},on:{buttonClick:e.reset}})],1)],1)]),a("div",{staticClass:"bg-fff p-x-2 h100",staticStyle:{"min-height":"500px"}},[a("div",{staticClass:"buttons"},[a("el-button",{attrs:{type:"success",plain:"",icon:"el-icon-plus"},on:{click:e.make}},[e._v("新建")]),a("input",{ref:"upload",staticStyle:{display:"none"},attrs:{type:"file",name:"",multiple:""},on:{change:function(t){return e.uploadAvater(t)}}}),a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus"},on:{click:e.importHandle}},[e._v("导入")]),a("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-edit-outline"},on:{click:e.exportHandle}},[e._v("导出")])],1),a("div",{},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,stripe:"",border:""}},[a("el-table-column",{attrs:{label:"操作",width:"120",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"text-color cursor",on:{click:function(a){return e.editTableColumnData(t.row)}}},[e._v(" 编辑 ")]),a("span",{staticClass:"cursor m-left-1 c-red",on:{click:function(a){return e.deleteById(t.row)}}},[e._v(" 删除 ")])]}}])}),a("el-table-column",{attrs:{prop:"city",label:"city",align:"center"}}),a("el-table-column",{attrs:{prop:"code",label:"code",align:"center"}}),a("el-table-column",{attrs:{prop:"staType",label:"staType",align:"center"}}),a("el-table-column",{attrs:{prop:"staName",label:"staName",align:"center"}}),a("el-table-column",{attrs:{prop:"customer1",label:"customer1",align:"center"}}),a("el-table-column",{attrs:{prop:"customer2",label:"地区",align:"center"}}),a("el-table-column",{attrs:{prop:"customer3",label:"美团餐城市",align:"center"}}),a("el-table-column",{attrs:{prop:"customer4",label:"customer4",align:"center"}})],1)],1),a("div",{staticClass:"m-y-1"},[a("el-pagination",{attrs:{background:"","current-page":e.queryInfo.pageNo,"page-size":e.queryInfo.pageSize,"page-sizes":[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),a("el-dialog",{attrs:{title:0==e.type?"新建":"编辑",visible:e.RuleSetDialog,"before-close":e.dialogCancle},on:{"update:visible":function(t){e.RuleSetDialog=t}}},[a("el-form",{ref:"ruleForm",attrs:{model:e.formField,"label-position":"120px","label-width":"100px",rules:e.rules}},[a("el-form-item",{attrs:{prop:"city",label:"city"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.city,callback:function(t){e.$set(e.formField,"city",t)},expression:"formField.city"}})],1),a("el-form-item",{attrs:{prop:"code",label:"code"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.code,callback:function(t){e.$set(e.formField,"code",t)},expression:"formField.code"}})],1),a("el-form-item",{attrs:{prop:"staType",label:"staType"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.staType,callback:function(t){e.$set(e.formField,"staType",t)},expression:"formField.staType"}})],1),a("el-form-item",{attrs:{prop:"staName",label:"staName"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.staName,callback:function(t){e.$set(e.formField,"staName",t)},expression:"formField.staName"}})],1),a("el-form-item",{attrs:{prop:"customer1",label:"customer1"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.customer1,callback:function(t){e.$set(e.formField,"customer1",t)},expression:"formField.customer1"}})],1),a("el-form-item",{attrs:{prop:"customer2",label:"地区"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.customer2,callback:function(t){e.$set(e.formField,"customer2",t)},expression:"formField.customer2"}})],1),a("el-form-item",{attrs:{prop:"customer3",label:"美团餐城市"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.customer3,callback:function(t){e.$set(e.formField,"customer3",t)},expression:"formField.customer3"}})],1),a("el-form-item",{attrs:{prop:"customer4",label:"customer4"}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.formField.customer4,callback:function(t){e.$set(e.formField,"customer4",t)},expression:"formField.customer4"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("div",{staticClass:"d-flex j-fe"},[a("FeesButton",{attrs:{text:"取 消",icon:"el-icon-circle-close"},on:{buttonClick:e.dialogCancle}}),a("FeesButton",{directives:[{name:"debounce",rawName:"v-debounce",value:{time:500,methods:e.comfirmEditOrMake},expression:"{ time: 500, methods: comfirmEditOrMake }"}],attrs:{text:"确 定",icon:"el-icon-circle-check",isActive:!0}})],1)])],1)],1)])])}),[],!1,null,"46a3ceb0",null);t.default=r.exports}}]);
|