mt-ck-wms-ui/dist/static/js/chunk-e2929524.00031647.js
2022-06-07 10:43:58 +08:00

1 line
5.2 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e2929524"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));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 o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){n()(t,1e3/60)}}();function r(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(),n=t-i,s=20,u=0;e="undefined"===typeof e?500:e;var c=function t(){u+=s;var l=Math.easeInOutQuad(u,i,n,e);r(l),u<e?o(t):a&&"function"===typeof a&&a()};c()}},1:function(t,e){},"15a2":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()}}})],1)},n=[],o=(a("7f7f"),a("a3e3")),r=a.n(o),l=a("3393"),s=a.n(l),u=a("9923"),c=a("6d16"),d=a("bb1e"),m=a("c0ee"),p=a("333d"),b=a("ebe9"),f=a("8975"),h=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"},{type:"detail",btnName:"btn.detail"}],g=[{prop:"createTime",label:u["a"].t("module.basicData.factory.createTime"),filter:f["timeFormatter"],align:"center"},{prop:"name",label:u["a"].t("module.basicData.material.MaterialName"),align:"center"},{prop:"code",label:u["a"].t("module.basicData.material.MaterialCoding"),align:"center"},{prop:"enName",label:u["a"].t("module.basicData.visual.EnglishName"),align:"center"},{prop:"abbr",label:u["a"].t("module.basicData.visual.Abbreviation"),align:"center"},{prop:"category",label:u["a"].t("module.basicData.material.MaterialType"),align:"center"},{prop:"description",label:u["a"].t("module.basicData.visual.Description"),align:"center"},{prop:"remark",label:u["a"].t("module.basicData.visual.Remarks"),align:"center"}],y={name:"Material",components:{Pagination:p["a"],BaseTable:m["a"],MethodBtn:b["a"],HeadForm:d["a"]},filters:{statusFilter:function(t){var e={published:"success",draft:"info",deleted:"danger"};return e[t]}},data:function(){return{keyName:u["a"].t("module.basicData.visual.keyword"),placeholderName:this.$t("module.basicData.material.MaterialName")+this.$t("module.basicData.visual.Or")+this.$t("module.basicData.material.MaterialCoding"),tableBtn:h,trueWidth:240,tableProps:g,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(r()(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(){})):"edit"===t.type?this.addNew(t.data.id):this.addNew(t.data.id,!0)},getList:function(t){var e=this;this.listLoading=!0,this.listQuery.name=t,this.listQuery.code=t,console.log(this.listQuery),Object(c["e"])(this.listQuery).then((function(t){var a;t.data.records?e.list=t.data.records:s()(a=e.list).call(a,0,e.list.length);e.total=t.data.total,e.listLoading=!1}))},addNew:function(t,e){this.$router.push({name:"MaterialAdd",query:{id:t,isdetail:e}})}}},v=y,w=(a("5657"),a("2877")),D=Object(w["a"])(v,i,n,!1,null,"87371a6e",null);e["default"]=D.exports},2:function(t,e){},2053:function(t,e,a){},5657:function(t,e,a){"use strict";a("2053")},"6d16":function(t,e,a){"use strict";a.d(e,"e",(function(){return n})),a.d(e,"d",(function(){return o})),a.d(e,"f",(function(){return r})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return u}));var i=a("b775");function n(t){return Object(i["a"])({url:"/api/wms/material/page",method:"post",data:t})}function o(t){return Object(i["a"])({url:"/api/wms/material/get",method:"post",data:{id:t}})}function r(t){return Object(i["a"])({url:"/api/wms/material/update",method:"post",data:t})}function l(t){return Object(i["a"])({url:"/api/wms/material/add",method:"post",data:t})}function s(){return Object(i["a"])({url:"/api/wms/material/get-code",method:"post"})}function u(t){return Object(i["a"])({url:"/api/wms/material/delete",method:"post",data:{id:t}})}}}]);