(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7546d655","chunk-2d0aa195"],{1022:function(t,e,n){"use strict";n.r(e),e["default"]=[{type:"text",dataIndex:"dictName",label:"字典名称",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"status",label:"状态",placeholder:"请选择",defaultValue:"0",options:[{value:"0",label:"启用"},{value:"1",label:"禁用"}]}]},"433d":function(t,e,n){"use strict";var r=n("c559"),a={ftpUrl:r["a"].ftpUrl,apiBaseURL:r["a"].apiBaseURL};e["a"]=a},"6ec5":function(t,e,n){"use strict";n.d(e,"l",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"c",(function(){return s})),n.d(e,"j",(function(){return u})),n.d(e,"f",(function(){return l})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return f})),n.d(e,"p",(function(){return m})),n.d(e,"n",(function(){return p})),n.d(e,"m",(function(){return h})),n.d(e,"k",(function(){return g})),n.d(e,"s",(function(){return b})),n.d(e,"r",(function(){return y})),n.d(e,"q",(function(){return v})),n.d(e,"o",(function(){return O})),n.d(e,"b",(function(){return j})),n.d(e,"i",(function(){return w})),n.d(e,"h",(function(){return D}));var r=n("b775"),a=n("433d");function i(t){return r["a"].get(a["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function o(t){return Object(r["a"])({url:"/pc/base/category/add",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function d(){return Object(r["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function f(t){return Object(r["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function m(t){return Object(r["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function p(t){return Object(r["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function h(t){return Object(r["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function g(t){return r["a"].get(a["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function b(t){return Object(r["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function y(t){return Object(r["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function v(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function O(t){return Object(r["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function j(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function w(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function D(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}},"6f7e":function(t,e,n){"use strict";function r(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString().replace(/\s/g,"").replace(/-/g,"").replace(/:/g,"");return e}function a(t){return("00"+t).substr(t.length)}function i(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),n=e.slice(0,4),r=e.slice(4,6),a=e.slice(6,8),i=e.slice(8,10),o=e.slice(10,12),c=e.slice(12,14),s=n+"-"+r+"-"+a+" "+i+":"+o+":"+c;return s}function o(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),n=e.slice(0,4),r=e.slice(4,6),a=e.slice(6,8),i=n+"-"+r+"-"+a;return i}function c(t,e){try{t instanceof Date||(t=new Date(t)),void 0!=e&&""!=e||(e="yyyy-MM-dd hh:mm:ss"),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(new RegExp("(".concat(r,")")).test(e)){var i=n[r]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?i:a(i))}return e}catch(o){return"-"}}function s(){var t=new Date,e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),a=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0"),o=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r," ").concat(a,":").concat(i,":").concat(o)}function u(){var t=new Date,e=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(n,"-").concat(r)}function l(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),n=6e4,r=60*n,a=24*r,i=7*a,o=30*a,c=(new Date).getTime(),s=c-e;if(!(s<0)){var u=s/n,l=s/r,d=s/a,f=s/i,m=s/o,p="";if(m>=1&&m<=3)p=" "+parseInt(m)+"月前";else if(f>=1&&f<=3)p=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)p=" "+parseInt(d)+"天前";else if(l>=1&&l<=23)p=" "+parseInt(l)+"小时前";else if(u>=1&&u<=59)p=" "+parseInt(u)+"分钟前";else if(s>=0&&s<=n)p="刚刚";else{var h=new Date;h.setTime(e);var g=h.getFullYear(),b=h.getMonth()+1<10?"0"+(h.getMonth()+1):h.getMonth()+1,y=h.getDate()<10?"0"+h.getDate():h.getDate();h.getHours()<10?h.getHours():h.getHours(),h.getMinutes()<10?h.getMinutes():h.getMinutes(),h.getSeconds()<10?h.getSeconds():h.getSeconds();p=g+"-"+b+"-"+y}return p}}}n.r(e),n.d(e,"DateToLong",(function(){return r})),n.d(e,"LongToDateTime",(function(){return i})),n.d(e,"LongToDate",(function(){return o})),n.d(e,"formatDate",(function(){return c})),n.d(e,"formattedDate",(function(){return s})),n.d(e,"formattedDateDuan",(function(){return u})),n.d(e,"timeago",(function(){return l}))},ed45:function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"g",(function(){return c})),n.d(e,"b",(function(){return s})),n.d(e,"f",(function(){return u})),n.d(e,"e",(function(){return l}));var r=n("b775");function a(t){return Object(r["a"])({url:"/system/dict/type/list",method:"get",params:t})}function i(t){return Object(r["a"])({url:"/system/dict/type/"+t,method:"get"})}function o(t){return Object(r["a"])({url:"/system/dict/type",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/system/dict/type",method:"put",data:t})}function s(t){return Object(r["a"])({url:"/system/dict/type/"+t,method:"delete"})}function u(){return Object(r["a"])({url:"/system/dict/type/refreshCache",method:"delete"})}function l(){return Object(r["a"])({url:"/system/dict/data/optionselect",method:"get"})}},eedf:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("el-container",[n("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[n("div",{staticClass:"filter-container"},[n("my-search",{ref:"searchBar",attrs:{items:t.items},on:{search:t.fifterForm}})],1),t._v(" "),n("el-row",{staticStyle:{"margin-top":"8px"}},[n("el-col",[n("my-table-v2",{ref:"myTable",attrs:{filter:t.queryParams,table:t.table}})],1)],1)],1)],1),t._v(" "),n("el-dialog",{attrs:{title:t.title,visible:t.open,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[n("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"字典名称",prop:"dictName"}},[n("el-input",{attrs:{placeholder:"请输入字典名称"},model:{value:t.form.dictName,callback:function(e){t.$set(t.form,"dictName",e)},expression:"form.dictName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"字典类型",prop:"dictType"}},[n("el-input",{attrs:{placeholder:"请输入字典类型"},model:{value:t.form.dictType,callback:function(e){t.$set(t.form,"dictType",e)},expression:"form.dictType"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"状态",prop:"status"}},[n("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},t._l(t.constants.normalOrDisabled,(function(e){return n("el-radio",{key:e.value,attrs:{label:e.value}},[t._v(t._s(e.label))])})),1)],1),t._v(" "),n("el-form-item",{attrs:{label:"备注",prop:"remark"}},[n("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),t._v(" "),n("el-button",{on:{click:t.cancel}},[t._v("取 消")])],1)],1)],1)},a=[],i=n("befe"),o=n("ed45"),c=n("6f7e"),s=n("80cb"),u=n("433d"),l=n("1022"),d=n("6ec5");function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=b(t,"string");return"symbol"==f(e)?e:e+""}function b(t,e){if("object"!=f(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var y={name:"Dict",components:{MyTableV2:s["a"],myTree:i["a"]},data:function(){var t=this;return{treeDataList:[],constants:this.$constants,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,typeList:[],title:"",open:!1,dateRange:[],queryParams:{dictName:void 0,dictType:void 0,status:0},items:l["default"],table:{showIndex:!0,expand:!1,url:u["a"].apiBaseURL+"/system/dict/type/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"字典编号",field:"dict_id",align:"center",width:"100px"},{title:"字典名称",field:"dict_name",align:"left"},{title:"字典类型",field:"dict_type",align:"left",formatter:function(t){return{value:t.dict_type}}},{title:"状态",field:"status",align:"center",width:"180px",formatter:function(t){return{value:0===t.status?"启用":"禁用"}}},{title:"备注",field:"remark",align:"left",width:"200px"}],operation:{align:"center",show:!1,attr:[{title:"修改",events:function(e){t.handleUpdate(e)}},{title:"删除",events:function(e){t.handleDelete(e)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}},form:{},rules:{dictName:[{required:!0,message:"字典名称不能为空",trigger:"blur"}],dictType:[{required:!0,message:"字典类型不能为空",trigger:"blur"}]}}},created:function(){this.initTreeData()},methods:{initTreeData:function(){var t=this;d["l"]().then((function(e){var n=e||[];t.treeDataList.splice(0,t.treeDataList.length),t.treeDataList=n,t.treeDataList&&t.treeDataList.length>0&&(t.tenantId=t.treeDataList[0].id,t.tenantName=t.treeDataList[0].label,t.tenantCode=t.treeDataList[0].code)}))},nodeClick:function(t){console.log(t,"param"),this.search(1)},fifterForm:function(t){this.queryParams=Object.assign(this.queryParams,t),this.search(1)},search:function(t){void 0!=t?this.$refs.myTable.search({pageNum:t}):this.$refs.myTable.search()},dateTo:function(t){return c["LongToDateTime"](t)},changeSize:function(t){this.queryParams.pageSize=t,this.getList()},changePage:function(t){this.queryParams.pageNum=t,this.getList()},getList:function(){var t=this;this.loading=!0,Object(o["d"])(this.queryParams).then((function(e){t.typeList=e.datas,t.total=e.totalRows,t.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={dictId:void 0,dictName:void 0,dictType:void 0,status:"0",remark:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.open=!0,this.title="添加字典类型"},handleSelectionChange:function(t){this.ids=t.map((function(t){return t.dictId})),this.single=1!=t.length,this.multiple=!t.length},handleUpdate:function(t){var e=this;this.reset();var n=t.dict_id||this.ids;Object(o["c"])(n).then((function(t){e.form=t,e.form.dictName=e.form.dict_name,e.form.dictType=e.form.dict_type,e.open=!0,e.title="修改字典类型"}))},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){e&&(void 0!=t.form.dictId?Object(o["g"])(t.form).then((function(e){t.$modal.msgSuccess("修改成功"),t.open=!1,t.getList()})):Object(o["a"])(t.form).then((function(e){t.$modal.msgSuccess("新增成功"),t.open=!1,t.getList()})))}))},handleDelete:function(t){var e=this,n=t.dictId||this.ids;this.$modal.confirm('是否确认删除字典编号为"'+n+'"的数据项?').then((function(){return Object(o["b"])(n)})).then((function(){e.getList(),e.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/dict/type/export",p({},this.queryParams),"type_".concat((new Date).getTime(),".xlsx"))},handleRefreshCache:function(){var t=this;Object(o["f"])().then((function(){t.$modal.msgSuccess("刷新成功"),t.$store.dispatch("dict/cleanDict")}))}}},v=y,O=n("2877"),j=Object(O["a"])(v,r,a,!1,null,null,null);e["default"]=j.exports}}]);
|