mt-ck-wms-ui/dist/static/js/chunk-3dfa6e6a.f0657ee1.js
2022-06-07 15:13:51 +08:00

1 line
8.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3dfa6e6a"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var i=a("2b0b"),r=a.n(i);Math.easeInOutQuad=function(t,e,a,i){return t/=i/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){r()(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function l(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,a){var i=l(),r=t-i,s=20,d=0;e="undefined"===typeof e?500:e;var c=function t(){d+=s;var l=Math.easeInOutQuad(d,i,r,e);o(l),d<e?n(t):a&&"function"===typeof a&&a()};c()}},"31cb":function(t,e,a){"use strict";a("eab1")},"50ad":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-form",{attrs:{model:t.listQuery,inline:!0,size:"medium","label-width":"100px"}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.materialsType.TypeName"),prop:"typeName"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:t.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeName")]),clearable:""},model:{value:t.listQuery.typeName,callback:function(e){t.$set(t.listQuery,"typeName",e)},expression:"listQuery.typeName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.materialsType.TypeCode"),prop:"typeCode"}},[a("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:t.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeCode")]),clearable:""},model:{value:t.listQuery.typeCode,callback:function(e){t.$set(t.listQuery,"typeCode",e)},expression:"listQuery.typeCode"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getList()}}},[t._v(" "+t._s(t._f("i18nFilter")("btn.search"))+" ")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.addNew()}}},[t._v(" "+t._s(t._f("i18nFilter")("btn.add"))+" ")])],1)],1),t._v(" "),a("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-config":t.tableProps,"table-data":t.list,"is-loading":t.listLoading}},[a("method-btn",{attrs:{slot:"handleBtn",width:t.trueWidth,"method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"})],1),t._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.current,limit:t.listQuery.size},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}}),t._v(" "),t.addOrUpdateVisible?a("dataDictionary-add",{ref:"addOrUpdate",on:{refreshDataList:t.getList}}):t._e()],1)},r=[],n=a("a3e3"),o=a.n(n),l=a("3393"),s=a.n(l),d=a("b775");function c(t){return Object(d["a"])({url:"/api/wms/platform-dict/selectPlatformDictTypeListByPage",method:"post",data:t})}function u(t){return Object(d["a"])({url:"/api/wms/platform-dict/selectDictTypeById",method:"post",data:{id:t}})}function m(t){return Object(d["a"])({url:"/api/wms/platform-dict/updatePlatformDictType",method:"post",data:t})}function p(t){return Object(d["a"])({url:"/api/wms/platform-dict/savePlatformDictType",method:"post",data:t})}function f(t){return Object(d["a"])({url:"/api/wms/platform-dict/deletePlatformDictType",method:"post",data:{id:t}})}var b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-dialog",{attrs:{title:t._f("i18nFilter")(t.dataForm.id?"btn.edit":"btn.add"),visible:t.visible},on:{"update:visible":function(e){t.visible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"100px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.dataFormSubmit()}}},[a("el-form-item",{attrs:{label:t.$t("module.basicData.materialsType.TypeName"),prop:"typeName"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.materialsType.TypeName")]),clearable:""},model:{value:t.dataForm.typeName,callback:function(e){t.$set(t.dataForm,"typeName",e)},expression:"dataForm.typeName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.materialsType.TypeCode"),prop:"typeCode"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.materialsType.TypeCode")]),clearable:""},model:{value:t.dataForm.typeCode,callback:function(e){t.$set(t.dataForm,"typeCode",e)},expression:"dataForm.typeCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Remarks"),prop:"remark"}},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Remarks")]),clearable:""},model:{value:t.dataForm.remark,callback:function(e){t.$set(t.dataForm,"remark",e)},expression:"dataForm.remark"}})],1)],1),t._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.visible=!1}}},[t._v(t._s(t._f("i18nFilter")("btn.cancel")))]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.dataFormSubmit()}}},[t._v(t._s(t._f("i18nFilter")("btn.confirm")))])],1)],1)},y=[],h={data:function(){return{visible:!1,dataForm:{id:0,typeName:"",typeCode:"",remark:""},dataRule:{typeName:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeName")]),trigger:"blur"}],typeCode:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeCode")]),trigger:"blur"}]}}},methods:{init:function(t){var e=this;this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id&&u(e.dataForm.id).then((function(t){e.dataForm=t.data}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var a=t.dataForm;t.dataForm.id?m(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})):p(a).then((function(e){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})}))}}))}}},v=h,$=a("2877"),T=Object($["a"])(v,b,y,!1,null,null,null),F=T.exports,g=a("c0ee"),D=a("333d"),k=a("ebe9"),w=a("9923"),_=[{type:"edit",btnName:"btn.edit"},{type:"list",btnName:w["a"].t("module.basicData.dataDictionary.list")},{type:"delete",btnName:"btn.delete"}],N=[{prop:"typeName",label:w["a"].t("module.basicData.materialsType.TypeName"),align:"center"},{prop:"typeCode",label:w["a"].t("module.basicData.materialsType.TypeCode"),align:"center"},{prop:"remark",label:w["a"].t("module.basicData.visual.Remarks"),align:"center"}],C={name:"Factory",components:{Pagination:D["a"],BaseTable:g["a"],MethodBtn:k["a"],DataDictionaryAdd:F},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{addOrUpdateVisible:!1,tableBtn:_,trueWidth:250,tableProps:N,list:[],total:0,listLoading:!0,listQuery:{current:1,size:10,typeName:"",typeCode:""}}},created:function(){this.getList()},methods:{handleClick:function(t){var e,a=this;"delete"===t.type?this.$confirm(o()(e="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(e,t.data.typeName,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){f(t.data.id).then((function(t){a.$message({message:a.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){a.getList()}})}))}))["catch"]((function(){})):"list"===t.type?this.toList(t.data.id):this.addNew(t.data.id)},getList:function(){var t=this;this.listLoading=!0,c(this.listQuery).then((function(e){var a;e.data.records?t.list=e.data.records:s()(a=t.list).call(a,0,t.list.length);t.total=e.data.total,t.listLoading=!1}))},addNew:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))},toList:function(t){this.$router.push({name:"dataDictionaryData",query:{dictTypeId:t}})}}},x=C,Q=(a("31cb"),Object($["a"])(x,i,r,!1,null,"7afbc726",null));e["default"]=Q.exports},eab1:function(t,e,a){}}]);