mt-ck-wms-ui/dist/static/js/chunk-041e834e.30c65e7d.js
2022-06-07 15:13:51 +08:00

1 line
8.0 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-041e834e"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var i=a("2b0b"),n=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 r=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){n()(t,1e3/60)}}();function o(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function s(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function l(t,e,a){var i=s(),n=t-i,l=20,d=0;e="undefined"===typeof e?500:e;var c=function t(){d+=l;var s=Math.easeInOutQuad(d,i,n,e);o(s),d<e?r(t):a&&"function"===typeof a&&a()};c()}},1:function(t,e){},2:function(t,e){},"9b6d":function(t,e,a){},"9ca2":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("head-form",{attrs:{"placeholder-name":t.placeholderName,"key-name":t.keyName},on:{getDataList:t.getList,add:t.addNew}}),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("materialsType-add",{ref:"addOrUpdate",on:{refreshDataList:t.getList}}):t._e()],1)},n=[],r=(a("7f7f"),a("a3e3")),o=a.n(r),s=a("3393"),l=a.n(s),d=a("9923"),c=a("addf"),u=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:"name"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.materialsType.TypeName")]),clearable:""},model:{value:t.dataForm.name,callback:function(e){t.$set(t.dataForm,"name",e)},expression:"dataForm.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.materialsType.TypeCode"),prop:"code"}},[a("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.materialsType.TypeCode")]),clearable:""},model:{value:t.dataForm.code,callback:function(e){t.$set(t.dataForm,"code",e)},expression:"dataForm.code"}})],1),t._v(" "),a("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Remarks"),prop:"remark"}},[a("el-input",{attrs:{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)},m=[],p={data:function(){return{visible:!1,dataForm:{id:0,name:"",code:"",remark:""},dataRule:{name:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeName")]),trigger:"blur"}],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.materialsType.TypeCode")]),trigger:"blur"}]}}},methods:{init:function(t){var e=this;Object(c["b"])().then((function(t){e.dataForm.code=t.data})),this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){e.$refs["dataForm"].resetFields(),e.dataForm.id&&Object(c["d"])(e.dataForm.id).then((function(t){e.dataForm.name=t.data.name,e.dataForm.code=t.data.code,e.dataForm.remark=t.data.remark}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){var a={name:t.dataForm.name,code:t.dataForm.code,remark:t.dataForm.remark,id:t.dataForm.id};t.dataForm.id?Object(c["f"])(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")}})})):Object(c["a"])(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")}})}))}}))}}},f=p,b=a("2877"),h=Object(b["a"])(f,u,m,!1,null,null,null),y=h.exports,v=a("bb1e"),F=a("c0ee"),g=a("333d"),$=a("ebe9"),T=a("8975"),k=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],w=[{prop:"createTime",label:d["a"].t("module.basicData.factory.createTime"),filter:T["timeFormatter"],align:"center"},{prop:"name",label:d["a"].t("module.basicData.materialsType.TypeName"),align:"center"},{prop:"code",label:d["a"].t("module.basicData.materialsType.TypeCode"),align:"center"},{prop:"remark",label:d["a"].t("module.basicData.visual.Remarks"),align:"center"}],D={name:"MaterialsType",components:{Pagination:g["a"],BaseTable:F["a"],MethodBtn:$["a"],materialsTypeAdd:y,HeadForm:v["a"]},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{keyName:d["a"].t("module.basicData.visual.keyword"),placeholderName:this.$t("module.basicData.materialsType.TypeName"),addOrUpdateVisible:!1,tableBtn:k,trueWidth:200,tableProps:w,list:[],total:0,listLoading:!0,listQuery:{current:1,size:10}}},created:function(){this.getList()},methods:{handleClick:function(t){var e,a=this;(console.log(t),"delete"===t.type)?this.$confirm(o()(e="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(e,t.data.name,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){Object(c["c"])(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(){})):this.addNew(t.data.id)},getList:function(t){var e=this;this.listLoading=!0,this.listQuery.name=t,Object(c["e"])(this.listQuery).then((function(t){var a;t.data.records?e.list=t.data.records:l()(a=e.list).call(a,0,e.list.length);e.total=t.data.total,e.listLoading=!1}))},addNew:function(t){var e=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){e.$refs.addOrUpdate.init(t)}))}}},O=D,_=(a("df74"),Object(b["a"])(O,i,n,!1,null,"49ebac60",null));e["default"]=_.exports},addf:function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"f",(function(){return o})),a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"c",(function(){return d}));var i=a("b775");function n(t){return Object(i["a"])({url:"/api/wms/material-type/page",method:"post",data:t})}function r(t){return Object(i["a"])({url:"/api/wms/material-type/get",method:"post",data:{id:t}})}function o(t){return Object(i["a"])({url:"/api/wms/material-type/update",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/api/wms/material-type/add",method:"post",data:t})}function l(){return Object(i["a"])({url:"/api/wms/material-type/get-code",method:"post"})}function d(t){return Object(i["a"])({url:"/api/wms/material-type/delete",method:"post",data:{id:t}})}},df74:function(t,e,a){"use strict";a("9b6d")}}]);