1 line
9.1 KiB
JavaScript
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
|