mt-ck-wms-ui/dist/static/js/chunk-9feea084.ee5d3943.js
2022-06-07 15:13:51 +08:00

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9feea084"],{"09f4":function(t,a,e){"use strict";e.d(a,"a",(function(){return c}));var r=e("2b0b"),n=e.n(r);Math.easeInOutQuad=function(t,a,e,r){return t/=r/2,t<1?e/2*t*t+a:(t--,-e/2*(t*(t-2)-1)+a)};var i=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 c(t,a,e){var r=s(),n=t-r,c=20,l=0;a="undefined"===typeof a?500:a;var d=function t(){l+=c;var s=Math.easeInOutQuad(l,r,n,a);o(s),l<a?i(t):e&&"function"===typeof e&&e()};d()}},3003:function(t,a,e){},"30dd":function(t,a,e){"use strict";e.d(a,"e",(function(){return n})),e.d(a,"d",(function(){return i})),e.d(a,"f",(function(){return o})),e.d(a,"a",(function(){return s})),e.d(a,"b",(function(){return c})),e.d(a,"c",(function(){return l}));var r=e("b775");function n(t){return Object(r["a"])({url:"/api/wms/scrap-type-information/page",method:"post",data:t})}function i(t){var a={id:t};return Object(r["a"])({url:"/api/wms/scrap-type-information/get",method:"post",data:a})}function o(t){return Object(r["a"])({url:"/api/wms/scrap-type-information/update",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/api/wms/scrap-type-information/add",method:"post",data:t})}function c(){return Object(r["a"])({url:"/api/wms/scrap-type-information/get-code",method:"post"})}function l(t){return Object(r["a"])({url:"/api/wms/scrap-type-information/delete",method:"post",data:{id:t}})}},"785a":function(t,a,e){"use strict";e.r(a);var r=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"app-container"},[e("el-form",{attrs:{model:t.listQuery,inline:!0,size:"medium","label-width":"100px"}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.ScrapInfo.cause"),prop:"scrap"}},[e("el-input",{staticStyle:{width:"200px"},attrs:{placeholder:t.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.cause")]),clearable:""},model:{value:t.listQuery.scrap,callback:function(a){t.$set(t.listQuery,"scrap",a)},expression:"listQuery.scrap"}})],1),t._v(" "),e("el-form-item",{attrs:{label:t.$t("module.basicData.ScrapInfo.scrapType"),prop:"scrapId"}},[e("el-select",{attrs:{filterable:"",placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.ScrapInfo.scrapType")]),clearable:""},model:{value:t.listQuery.scrapId,callback:function(a){t.$set(t.listQuery,"scrapId",a)},expression:"listQuery.scrapId"}},t._l(t.scrapTypeArr,(function(t){return e("el-option",{key:t.id,attrs:{label:t.scrapType,value:t.id}})})),1)],1),t._v(" "),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.getList()}}},[t._v(" "+t._s(t._f("i18nFilter")("btn.search"))+" ")]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.addNew()}}},[t._v(" "+t._s(t._f("i18nFilter")("btn.add"))+" ")])],1)],1),t._v(" "),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-config":t.tableProps,"table-data":t.list,"is-loading":t.listLoading}},[e("method-btn",{attrs:{slot:"handleBtn",width:t.trueWidth,"method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"})],1),t._v(" "),e("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(a){return t.$set(t.listQuery,"current",a)},"update:limit":function(a){return t.$set(t.listQuery,"size",a)},pagination:function(a){return t.getList()}}}),t._v(" "),t.addOrUpdateVisible?e("ScrapInfo-add",{ref:"addOrUpdate",on:{refreshDataList:t.getList}}):t._e()],1)},n=[],i=e("a3e3"),o=e.n(i),s=e("3393"),c=e.n(s),l=e("b775");function d(t){return Object(l["a"])({url:"/api/wms/scrap-information/page",method:"post",data:t})}function u(t){var a={id:t};return Object(l["a"])({url:"/api/wms/scrap-information/get",method:"post",data:a})}function p(t){return Object(l["a"])({url:"/api/wms/scrap-information/update",method:"post",data:t})}function m(t){return Object(l["a"])({url:"/api/wms/scrap-information/add",method:"post",data:t})}function f(){return Object(l["a"])({url:"/api/wms/scrap-information/get-code",method:"post"})}function b(t){return Object(l["a"])({url:"/api/wms/scrap-information/delete",method:"post",data:{id:t}})}var h=e("30dd"),y=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("el-dialog",{attrs:{title:t._f("i18nFilter")(t.dataForm.id?"btn.edit":"btn.add"),visible:t.visible},on:{"update:visible":function(a){t.visible=a}}},[e("el-form",{ref:"dataForm",attrs:{model:t.dataForm,rules:t.dataRule,"label-width":"110px"},nativeOn:{keyup:function(a){return!a.type.indexOf("key")&&t._k(a.keyCode,"enter",13,a.key,"Enter")?null:t.dataFormSubmit()}}},[e("el-form-item",{attrs:{label:t.$t("module.basicData.ScrapInfo.cause"),prop:"scrap"}},[e("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.ScrapInfo.cause")]),clearable:""},model:{value:t.dataForm.scrap,callback:function(a){t.$set(t.dataForm,"scrap",a)},expression:"dataForm.scrap"}})],1),t._v(" "),e("el-form-item",{attrs:{label:t.$t("module.basicData.ScrapInfo.causeCode"),prop:"code"}},[e("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.ScrapInfo.causeCode")]),clearable:""},model:{value:t.dataForm.code,callback:function(a){t.$set(t.dataForm,"code",a)},expression:"dataForm.code"}})],1),t._v(" "),e("el-form-item",{attrs:{label:t.$t("module.basicData.ScrapInfo.scrapType"),prop:"scrapTypeInfo"}},[e("el-select",{attrs:{"value-key":"id",filterable:"",placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.ScrapInfo.scrapType")]),clearable:""},on:{change:function(a){return t.$forceUpdate()}},model:{value:t.dataForm.scrapTypeInfo,callback:function(a){t.$set(t.dataForm,"scrapTypeInfo",a)},expression:"dataForm.scrapTypeInfo"}},t._l(t.scrapTypeArr,(function(t){return e("el-option",{key:t.id,attrs:{label:t.scrapType,value:{id:t.id,name:t.scrapType}}})})),1)],1),t._v(" "),e("el-form-item",{attrs:{label:t.$t("module.basicData.visual.Remarks"),prop:"remark"}},[e("el-input",{attrs:{placeholder:t.$i18nForm(["placeholder.input",t.$t("module.basicData.visual.Remarks")]),clearable:""},model:{value:t.dataForm.remark,callback:function(a){t.$set(t.dataForm,"remark",a)},expression:"dataForm.remark"}})],1)],1),t._v(" "),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(a){t.visible=!1}}},[t._v(t._s(t._f("i18nFilter")("btn.cancel")))]),t._v(" "),e("el-button",{attrs:{type:"primary"},on:{click:function(a){return t.dataFormSubmit()}}},[t._v(t._s(t._f("i18nFilter")("btn.confirm")))])],1)],1)},v=[],F=(e("7f7f"),{data:function(){return{visible:!1,scrapTypeArr:[],dataForm:{id:0,scrap:"",code:"",scrapTypeInfo:"",scrapId:"",scrapType:"",remark:""},listQuery:{current:1,size:999},dataRule:{scrap:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.cause")]),trigger:"blur"}],code:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.causeCode")]),trigger:"blur"}],scrapTypeInfo:[{required:!0,message:this.$i18nForm(["placeholder.input",this.$t("module.basicData.ScrapInfo.scrapType")]),trigger:"change"}]}}},methods:{init:function(t){var a=this;Object(h["e"])(this.listQuery).then((function(t){var e;t.data.records?a.scrapTypeArr=t.data.records:c()(e=a.scrapTypeArr).call(e,0,a.list.length)})),this.dataForm.id=t||"",this.visible=!0,this.$nextTick((function(){a.$refs["dataForm"].resetFields(),a.dataForm.id?u(a.dataForm.id).then((function(t){a.dataForm=t.data,a.dataForm.scrapTypeInfo={id:a.dataForm.scrapId,name:a.dataForm.scrapType}})):f().then((function(t){a.dataForm.code=t.data}))}))},dataFormSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(a){if(a){t.dataForm.scrapId=t.dataForm.scrapTypeInfo.id,t.dataForm.scrapType=t.dataForm.scrapTypeInfo.name;var e={scrap:t.dataForm.scrap,code:t.dataForm.code,scrapId:t.dataForm.scrapId,scrapType:t.dataForm.scrapType,remark:t.dataForm.remark,id:t.dataForm.id};t.dataForm.id?p(e).then((function(a){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})})):m(e).then((function(a){t.$message({message:t.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){t.visible=!1,t.$emit("refreshDataList")}})}))}}))},setValue:function(t){console.log(t)}}}),g=F,$=e("2877"),T=Object($["a"])(g,y,v,!1,null,null,null),I=T.exports,k=e("c0ee"),w=e("333d"),_=e("ebe9"),D=e("8975"),O=e("9923"),S=[{type:"edit",btnName:"btn.edit"},{type:"delete",btnName:"btn.delete"}],Q=[{prop:"createTime",label:O["a"].t("module.basicData.factory.createTime"),align:"center",filter:D["timeFormatter"]},{prop:"scrap",label:O["a"].t("module.basicData.ScrapInfo.cause"),align:"center"},{prop:"code",label:O["a"].t("module.basicData.ScrapInfo.causeCode"),align:"center"},{prop:"scrapType",label:O["a"].t("module.basicData.ScrapInfo.scrapType"),align:"center"},{prop:"remark",label:O["a"].t("module.basicData.visual.Remarks"),align:"center"}],x={name:"ScrapInfo",components:{Pagination:w["a"],BaseTable:k["a"],MethodBtn:_["a"],ScrapInfoAdd:I},filters:{statusFilter:function(t){var a={published:"success",draft:"info",deleted:"danger"};return a[t]}},data:function(){return{addOrUpdateVisible:!1,tableBtn:S,trueWidth:200,tableProps:Q,list:[],total:0,listLoading:!0,scrapTypeArr:[],listQuery:{current:1,size:10,scrap:"",scrapId:""}}},created:function(){this.getList()},methods:{handleClick:function(t){var a,e=this;(console.log(t),"delete"===t.type)?this.$confirm(o()(a="".concat(this.$t("module.basicData.visual.TipsBefore"),"[")).call(a,t.data.scrap,"]?"),this.$t("module.basicData.visual.Tips"),{confirmButtonText:this.$t("module.basicData.visual.confirmButtonText"),cancelButtonText:this.$t("module.basicData.visual.cancelButtonText"),type:"warning"}).then((function(){b(t.data.id).then((function(t){e.$message({message:e.$t("module.basicData.visual.success"),type:"success",duration:1500,onClose:function(){e.getList()}})}))}))["catch"]((function(){})):this.addNew(t.data.id)},getList:function(){var t=this;Object(h["e"])(this.listQuery).then((function(a){var e;a.data.records?t.scrapTypeArr=a.data.records:c()(e=t.scrapTypeArr).call(e,0,t.list.length)})),this.listLoading=!0,d(this.listQuery).then((function(a){var e;a.data.records?t.list=a.data.records:c()(e=t.list).call(e,0,t.list.length);t.total=a.data.total,t.listLoading=!1}))},addNew:function(t){var a=this;this.addOrUpdateVisible=!0,this.$nextTick((function(){a.$refs.addOrUpdate.init(t)}))}}},j=x,L=(e("c50b"),Object($["a"])(j,r,n,!1,null,"e8895f3c",null));a["default"]=L.exports},c50b:function(t,a,e){"use strict";e("3003")}}]);