tft-fe/dist/js/3385.f4dbd292.js

1 line
9.9 KiB
JavaScript
Raw Normal View History

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[3385],{8027:function(t,e,a){a.d(e,{Z:function(){return l}});var i=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)},n=[],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()}}},s=r,o=a(1001),u=(0,o.Z)(s,i,n,!1,null,null,null),l=u.exports},3385:function(t,e,a){a.r(e),a.d(e,{default:function(){return Z}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-box"},[e("search-bar",{ref:"searchBarForm",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:120,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("consumables-add",{ref:"consumablesAdd",on:{successSubmit:t.successSubmit}})],1)],1)},n=[],r=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"100px",model:t.form}},[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",{attrs:{label:"耗材规格",prop:"spec"}},[e("el-input",{attrs:{placeholder:"耗材规格"},model:{value:t.form.spec,callback:function(e){t.$set(t.form,"spec",e)},expression:"form.spec"}})],1),e("el-form-item",{attrs:{label:"耗材单位",prop:"unit"}},[e("el-input",{attrs:{placeholder:"耗材单位"},model:{value:t.form.unit,callback:function(e){t.$set(t.form,"unit",e)},expression:"form.unit"}})],1),e("el-form-item",{attrs:{label:"基础消耗量",prop:"basicConsume"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:999999999,precision:2,step:1},model:{value:t.form.basicConsume,callback:function(e){t.$set(t.form,"basicConsume",e)},expression:"form.basicConsume"}})],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,a){return e("el-option",{key:a,attrs:{label:t.dataName,value:t.dataCode}})})),1)],1)],1)},s=[],o=a(910),u={name:"ConsumablesAdd",data(){return{form:{id:"",name:"",spec:"",unit:"",basicConsume:"",enabled:1},rules:{name:[{required:!0,message:"请输入耗材名称",trigger:"blur"}],spec:[{required:!0,message:"请输入耗材规格",trigger:"blur"}]},stateList:JSON.parse(localStorage.getItem("publicList")).enabledVoList,isEdit:!1}},methods:{init(t){t?(this.form.id=t.id,(0,o.b8)({id:t.id}).then((e=>{0===e.code&&(console.log(e),this.form.name=e.data.name,this.form.spec="copy"===t.type?"":e.data.spec,this.form.unit=e.data.unit,this.form.basicConsume=e.data.basicConsume,this.form.enabled=e.data.enabled)})),"edit"===t.type?this.isEdit=!0:(this.isEdit=!1,this.form.id="")):(this.isEdit=!1,this.form.id="")},submitForm()