tft-fe/dist/js/9546.478d0389.js

1 line
9.1 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[9546],{8027:function(t,e,i){i.d(e,{Z:function(){return l}});var n=function(){var t=this,e=t._self._c;return e("div",[e("el-tag",{attrs:{size:"medium",type:t.tagType}},[t._v(t._s(t.showName))])],1)},a=[],r={name:"statusTag",props:{injectData:{type:Object,default:()=>({})}},data(){return{tagType:"",showName:"",list:JSON.parse(localStorage.getItem("publicList")).enabledVoList}},mounted(){this.init()},methods:{init(){1===this.injectData.enabled?this.tagType="":this.tagType="warning",this.list&&this.list.map((t=>{t.dataCode===this.injectData.enabled&&(this.showName=t.dataName)}))}},watch:{injectData(t,e){e.enabled!==t.enabled&&this.init()}}},o=r,s=i(1001),u=(0,s.Z)(o,n,a,!1,null,null,null),l=u.exports},9546:function(t,e,i){i.r(e),i.d(e,{default:function(){return y}});var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-box"},[e("search-bar",{attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:80,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},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()}}}),e("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("line-side-library-add",{ref:"lineSideLibraryAdd",on:{successSubmit:t.successSubmit}})],1)],1)},a=[],r=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"80px",model:t.form}},[e("el-form-item",{attrs:{label:"产线",prop:"proLineId"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"产线"},model:{value:t.form.proLineId,callback:function(e){t.$set(t.form,"proLineId",e)},expression:"form.proLineId"}},t._l(t.productionLineList,(function(t,i){return e("el-option",{key:i,attrs:{label:t.name,value:t.id}})})),1)],1),e("el-form-item",{attrs:{label:"线边库",prop:"name"}},[e("el-input",{attrs:{placeholder:"线边库"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{directives:[{name:"show",rawName:"v-show",value:t.isEdit,expression:"isEdit"}],attrs:{label:"状态",prop:"enabled"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"状态"},model:{value:t.form.enabled,callback:function(e){t.$set(t.form,"enabled",e)},expression:"form.enabled"}},t._l(t.stateList,(function(t,i){return e("el-option",{key:i,attrs:{label:t.dataName,value:t.dataCode}})})),1)],1)],1)},o=[],s=i(910),u={name:"LineSideLibraryConfigAdd",data(){return{form:{id:"",proLineId:"",name:"",enabled:1},productionLineList:JSON.parse(localStorage.getItem("publicList")).proLineVoList,stateList:JSON.parse(localStorage.getItem("publicList")).enabledVoList,rules:{proLineId:[{required:!0,message:"请选择产线",trigger:"change"}],name:[{required:!0,message:"请输入线边库",trigger:"blur"}]},isEdit:!1}},methods:{init(t){t?(this.isEdit=!0,this.form.id=t,(0,s.tb)({id:t}).then((t=>{0===t.code&&(this.form.proLineId=t.data.proLineId,this.form.name=t.data.name,this.form.enabled=t.data.enabled)}))):(this.isEdit=!1,this.form.id="")},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;this.isEdit?(0,s.Kl)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))})):(0,s.Qj)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))}))}))},formClear(){this.$refs.form.resetFields(),this.isEdit=!1}}},l=u,d=i(1001),c=(0,d.Z)(l,r,o,!1,null,null,null),f=c.exports,m=i(475),p=i(8027);const b=[{prop:"proLineId",filter:(0,m.fW)("proLineVoList"),label:"产线"},{prop:"name",label:"线边库"},{prop:"enabled",label:"状态",width:120,subcomponent:p.Z}],h=[{type:"edit",btnName:"编辑"}];var g={name:"LineSideLibraryConfig",components:{LineSideLibraryAdd:f},data(){return{formConfig:[{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,param:"proLineId",defaultSelect:"",width:120},{type:"input",label:"线边库",placeholder:"线边库",param:"name"},{type:"select",label:"状态",selectOptions:JSON.parse(localStorage.getItem("publicList")).enabledVoList,labelField:"dataName",valueField:"dataCode",param:"enabled",defaultSelect:"",width:120},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:b,tableData:[],tableBtn:h,tableH:(0,m.NC)(265),total:0,listQuery:{current:1,size:20},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,m.NC)(265)})),this.getList()},methods:{getList(){(0,s.qT)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&(this.total=t.data.total,this.tableData=t.data.records)}))},buttonClick(t){switch(console.log(t),t.btnName){case"search":this.listQuery.proLineId=t.proLineId,this.listQuery.name=t.name,this.listQuery.enabled=t.enabled,this.listQuery.current=1,this.getList();break;default:this.addOrEditTitle="新增",this.centervisible=!0,this.$nextTick((()=>{this.$refs.lineSideLibraryAdd.init()}))}},handleClick(t){this.addOrEditTitle="编辑",this.$nextTick((()=>{this.$refs.lineSideLibraryAdd.init(t.data.id)})),this.centervisible=!0},handleCancel(){this.$refs.lineSideLibraryAdd.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.lineSideLibraryAdd.submitForm()},successSubmit(){this.handleCancel(),this.getList()}}},L=g,C=(0,d.Z)(L,n,a,!1,null,null,null),y=C.exports},910:function(t,e,i){i.d(e,{$0:function(){return N},A0:function(){return w},D0:function(){return o},ER:function(){return T},Kl:function(){return v},ME:function(){return d},Or:function(){return g},P4:function(){return l},Py:function(){return c},Qj:function(){return Z},Sc:function(){return b},Sl:function(){return L},WZ:function(){return p},Wj:function(){return u},Zs:function(){return a},_:function(){return E},_1:function(){return C},ag:function(){return k},b8:function(){return h},dN:function(){return f},fZ:function(){return m},jF:function(){return r},oW:function(){return I},qT:function(){return y},sU:function(){return s},tb:function(){return S},xf:function(){return $}});var n=i(8859);function a(t){return(0,n.Z)({url:"/basic/account/page",method:"post",data:t})}function r(t){return(0,n.Z)({url:"/basic/account/add",method:"post",data:t})}function o(t){return(0,n.Z)({url:"/basic/account/get",method:"post",data:t})}function s(t){return(0,n.Z)({url:"/basic/account/update",method:"post",data:t})}function u(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/page",method:"post",data:t})}function l(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/add",method:"post",data:t})}function d(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/get",method:"post",data:t})}function c(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/update",method:"post",data:t})}function f(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/getNameList",method:"post",data:t})}function m(t){return(0,n.Z)({url:"/basic/sparePartsConfiguration/getModelList",method:"post",data:t})}function p(t){return(0,n.Z)({url:"/basic/consumableConfiguration/page",method:"post",data:t})}function b(t){return(0,n.Z)({url:"/basic/consumableConfiguration/add",method:"post",data:t})}function h(t){return(0,n.Z)({url:"/basic/consumableConfiguration/get",method:"post",data:t})}function g(t){return(0,n.Z)({url:"/basic/consumableConfiguration/update",method:"post",data:t})}function L(t){return(0,n.Z)({url:"/basic/consumableConfiguration/getMaterialList",method:"post",data:t})}function C(t){return(0,n.Z)({url:"/basic/consumableConfiguration/materialList",method:"post",data:t})}function y(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/page",method:"post",data:t})}function Z(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/add",method:"post",data:t})}function S(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/get",method:"post",data:t})}function v(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/update",method:"post",data:t})}function w(t){return(0,n.Z)({url:"/basic/sideLibraryConfiguration/list",method:"post",data:t})}function N(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/page",method:"post",data:t})}function k(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/add",method:"post",data:t})}function $(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/get",method:"post",data:t})}function I(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/update",method:"post",data:t})}function E(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/getUnitList",method:"post",formState:!0,data:t})}function T(t){return(0,n.Z)({url:"/basic/equipmentConfiguration/getEqCode",method:"post",data:t})}}}]);