| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-738e857a","chunk-2d0b2d09","chunk-2d22d835"],{"265d":function(e,t,r){"use strict";r.r(t),r.d(t,"urlPrefix",(function(){return i})),r.d(t,"GetList",(function(){return o})),r.d(t,"AddObj",(function(){return a})),r.d(t,"UpdateObj",(function(){return c})),r.d(t,"DelObj",(function(){return s})),r.d(t,"exportData",(function(){return d}));var n=r("22ce"),i="/api/people/provider/";function o(e){return Object(n["c"])({url:i,method:"get",params:e})}function a(e){return Object(n["c"])({url:i,method:"post",data:e})}function c(e){return Object(n["c"])({url:i+e.id+"/",method:"put",data:e})}function s(e){return Object(n["c"])({url:i+e+"/",method:"delete",data:{id:e}})}function d(e){return Object(n["a"])({url:i+"export/",params:e,method:"post"})}},cc23:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e._self._c;return t("d2-container",{class:{"page-compact":e.crud.pageOptions.compact}},[t("template",{slot:"header"},[e._v("供应商管理")]),t("d2-crud-x",e._g(e._b({directives:[{name:"loading",rawName:"v-loading",value:e.exportLoading,expression:"exportLoading"}],ref:"d2Crud"},"d2-crud-x",e._crudProps,!1),e._crudListeners),[t("div",{attrs:{slot:"header"},slot:"header"},[t("crud-search",{ref:"search",attrs:{options:e.crud.searchOptions},on:{submit:e.handleSearch}}),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addRow}},[t("i",{staticClass:"el-icon-plus"}),e._v("新增 ")]),t("el-button",{directives:[{name:"permission",rawName:"v-permission",value:"Export",expression:"'Export'"}],staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"warning"},on:{click:e.onExport}},[t("i",{staticClass:"el-icon-download"}),e._v("导出 ")]),t("span",{staticStyle:{"margin-left":"10px"}},[t("importExcel",{directives:[{name:"permission",rawName:"v-permission",value:"Import",expression:"'Import'"}],attrs:{importApi:"api/people/provider/import/"}},[e._v("导入 ")])],1),t("crud-toolbar",e._g(e._b({},"crud-toolbar",e._crudToolbarProps,!1),e._crudToolbarListeners))],1)])],2)},i=[],o=(r("d3b7"),r("f88e")),a=r("1fbf"),c=r("265d"),s=r("22ce"),d={data:function(){return{exportLoading:!1}},name:"provider",mixins:[a["d2CrudPlus"].crud],methods:{getCrudOptions:function(){return Object(o["crudOptions"])(this)},pageRequest:function(e){return Object(c["GetList"])(e)},addRequest:function(e){return Object(c["AddObj"])(e)},updateRequest:function(e){return Object(c["UpdateObj"])(e)},delRequest:function(e){return Object(c["DelObj"])(e.id)},onExport:function(){var e=this;this.$confirm("是否确认导出所有数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=e.getSearch().getForm();e.exportLoading=!0;var r="/api/people/provider/export/";Object(s["a"])({url:r,params:t,method:"post"}).finally((function(){e.exportLoading=!1}))})).catch((function(){e.exportLoading=!1}))}}},p=d,l=r("2877"),u=Object(l["a"])(p,n,i,!1,null,null,null);t["default"]=u.exports},f88e:function(e,t,r){"use strict";r.r(t),r.d(t,"crudOptions",(function(){return i}));var n=r("5530"),i=function(e){return{pageOptions:{compact:!0},options:{tableType:"vxe-table",rowKey:!0,rowId:"id",height:"100%",highlightCurrentRow:!0,events:{"sort-change":function(t){var r=t.field,i=t.order,o="desc"===i?"-":"",a=o+r,c=e.getSearch().getForm(),s=Object(n["a"])({ordering:a},c);e.doSearch(s)}}},rowHandle:{fixed:"right",align:"center",width:"170px",view:{thin:!0,text:""},edit:{thin:!0,text:""},remove:{thin:!0,text:""}},indexRow:{title:"序号",align:"center",resizable:!0,fixed:"left",width:90},viewOptions:{componentType:"form"},formOptions:{defaultSpan:24,width:"35%"},columns:[{title:"ID",key:"id",show:!1,disabled:!0,width:70,form:{disabled:!0}},{title:"供应商名称",key:"name",fixed:"left",resizable:!0,minWidth:150,align:"center",search:{width:180,component:{props:{clearable:!0}}},type:"input",form:{rules:[{required:!0,message:"供应商名称必填"},{max:30,message:"最长30个字"}],component:{props:{clearable:!0},placeholder:"请输入供应商名称"},itemProps:{class:{yxtInput:!0}}}},{title:"联系方式",key:"contact",resizable:!0,align:"center",minWidth:150,search:{width:180,component:{props:{clearable:!0}}},type:"input",form:{rules:[{max:30,message:"最长30个字"}],component:{props:{clearable:!0},placeholder:"请输入联系方式"},itemProps:{class:{yxtInput:!0}}}},{title:"联系地址",key:"address",resizable:!0,align:"center",minWidth:200,showOverflowTooltip:!0,search:{width:180,component:{props:{clearable:!0}}},type:"input",form:{rules:[{max:100,message:"最长100个字"}],component:{props:{clearable:!0},placeholder:"请输入联系地址"},itemProps:{class:{yxtInput:!0}}}},{title:"更新时间",key:"update_datetime",minWidth:170,align:"center",show:!0,type:"datetime",sortable:!0,form:{disabled:!0}},{title:"创建时间",key:"create_datetime",align:"center",minWidth:170,search:{disabled:!0},show:!0,type:"datetime",sortable:!0,form:{disabled:!0}}]}}}}]);
|