Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

1 ligne
18 KiB

  1. "use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[8865],{8865:function(t,e,a){a.r(e),a.d(e,{default:function(){return x}});var r=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,"select-changed":t.selectChanged}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH,"row-class-name":t.tableRowClassName}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:120,label:"操作",fixed:"right","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:t.getList}}),e("base-dialog",{attrs:{dialogTitle:t.addAndEdit,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("in-and-out-management-add",{ref:"inAndOutManagementAdd",on:{successSubmit:t.successSubmit}})],1)],1)},i=[],n=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"110px",model:t.form}},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"产线",prop:"proLineId"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"产线",disabled:t.showEdit||t.showOutput},on:{change:t.getSideLibaryList},model:{value:t.form.proLineId,callback:function(e){t.$set(t.form,"proLineId",e)},expression:"form.proLineId"}},t._l(t.proLineIdList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"所属线边库",prop:"sideLibaryId"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"所属线边库",disabled:t.showEdit||t.showOutput},model:{value:t.form.sideLibaryId,callback:function(e){t.$set(t.form,"sideLibaryId",e)},expression:"form.sideLibaryId"}},t._l(t.sideLibaryIdList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.name,value:t.sideLibaryId}})})),1)],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"耗材名称",prop:"name"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",placeholder:"耗材名称",disabled:t.showEdit||t.showOutput},on:{change:t.selectMeta},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}},t._l(t.consumablesNameList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.name,value:t.name}})})),1)],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"规格",prop:"spec"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"规格",disabled:t.showEdit||t.showOutput},model:{value:t.form.spec,callback:function(e){t.$set(t.form,"spec",e)},expression:"form.spec"}},t._l(t.consumablesSpecList,(function(t,a){return e("el-option",{key:a,attrs:{label:t.spec,value:t.spec}})})),1)],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[t.showEdit?t._e():e("el-form-item",{attrs:{label:"批次编码",prop:"batchCode"}},[t.showOutput?t._e():e("el-input",{attrs:{disabled:t.showEdit,placeholder:"批次编码"},model:{value:t.form.batchCode,callback:function(e){t.$set(t.form,"batchCode",e)},expression:"form.batchCode"}}),t.showOutput?e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"批次编码"},on:{change:t.toggleSupplier},model:{value:t.form.batchCode,callback:function(e){t.$set(t.form,"batchCode",e)},expression:"form.batchCode"}},t._l(t.batchCodeList,(function(t){return e("el-option",{key:t.batchCode,attrs:{label:t.batchCode,value:t.batchCode}})})),1):t._e()],1)],1),e("el-col",{attrs:{span:12}},[t.showEdit?t._e():e("el-form-item",{attrs:{label:t.showOutput?"出库数量":"入库数量",prop:"num"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:999999999,disabled:t.showEdit},model:{value:t.form.num,callback:function(e){t.$set(t.form,"num",e)},expression:"form.num"}})],1)],1)],1),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[t.showEdit?t._e():e("el-form-item",{attrs:{label:"供应商",prop:"supplier"}},[e("el-input",{attrs:{disabled:t.showEdit||t.showOutput,placeholder:"供应商"},model:{value:t.form.supplier,callback:function(e){t.$set(t.form,"supplier",e)},expression:"form.supplier"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"单位",prop:"unit"}},[e("el-input",{attrs:{placeholder:"单位",disabled:""},model:{value:t.form.unit,callback:function(e){t.$set(t.form,"unit",e)},expression:"form.unit"}})],1)],1)],1),t.showEdit?e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"最低安全库存",prop:"minNum"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:999999999},model:{value:t.form.minNum,callback:function(e){t.$set(t.form,"minNum",e)},expression:"form.minNum"}})],1)],1),e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"最高安全库存",prop:"maxNum"}},[e("el-input-number",{staticStyle:{width:"100%"},attrs:{min:0,max:9999999999},model:{value:t.form.maxNum,callback:function(e){t.$set(t.form,"maxNum",e)},expression:"form.maxNum"}})],1)],1)],1):t._e(),t.showOutput?e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("el-form-item",{attrs:{label:"领取人",prop:"recipient"}},[e("el-input",{attrs:{placeholder:"领取人"},model:{value:t.form.recipient,callback:function(e){t.$set(t.form,"recipient",e)},expression:"form.recipient"}})],1)],1)],1):t._e(),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:24}},[e("el-form-item",{attrs:{label:"备注",prop:"remark"}},[e("el-input",{attrs:{placeholder:"备注"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)],1)],1)],1)},o=[],s=a(4770),l=a(910),u={name:"inAndOutManagementAdd",data(){return{form:{id:"",proLineId:"",sideLibaryId:"",name:"",spec:"",batchCode:"",num:"",supplier:"",unit:"",remark:"",minNum:"",maxNum:"",recipient:""},rules:{proLineId:[{required:!0,message:"请选择产线",trigger:"change"}],sideLibaryId:[{required:!0,message:"请选择所属线边库",trigger:"change"}],name:[{required:!0,message:"请选择耗材名称",trigger:"change"}],spec:[{required:!0,message:"请选择规格",trigger:"change"}],batchCode:[{required:!0,message:"请输入批次编码",trigger:"blur"}],num:[{required:!0,message:"请输入入库数量",trigger:"blur"}],minNum:[{required:!0,message:"请输入最低安全库存",trigger:"blur"}],maxNum:[{required:!0,message:"请输入最高安全库存",trigger:"blur"}]},proLineIdList:JSON.parse(localStorage.getItem("publicList")).proLineVoList,sideLibaryIdList:[],consumablesNameList:[],consumablesSpecList:[],showEdit:!1,showOutput:!1,batchCodeList:[]}},methods:{init(t){this.getMaterialList(),t?(this.form.id=t.id,(0,s.qw)({id:this.form.id}).then((t=>{this.form.proLineId="1",this.getSideLibaryList(this.form.proLineId),this.form.sideLibaryId=t.data.sideLibaryId,this.form.name=t.data.materialName,this.selectMeta(this.form.name),this.form.spec=t.data.spec,this.form.minNum=t.data.minNum?t.data.minNum:0,this.form.maxNum=t.data.maxNum?t.data.maxNum:0,this.form.remark=t.data.remark,this.form.recipient=this.$store.getters.username?this.$store.getters.username:""})),"edit"===t.type?(this.showEdit=!0,this.showOutput=!1,console.log("编辑")):(this.showOutput=!0,this.showEdit=!1,this.getBatch(this.form.id),console.log("出库"))):this.form.id=""},getSideLibaryList(t){this.form.sideLibaryId="",(0,l.A0)({id:t}).then((t=>{0===t.code&&(this.sideLibaryIdList=t.data)}))},getMaterialList(){(0,l._1)().then((t=>{0===t.code&&(this.consumablesNameList=t.data)}))},selectMeta(t){this.consumablesNameList&&this.consumablesNameList.map((e=>{e.name===t&&(this.form.unit=e.unit)})),(0,l.gz)({name:t}).then((t=>{console.log(t),0===t.code&&(this.consumablesSpecList=t.data,this.showEdit||this.showOutput||(this.form.spec=""))}))},getBatch(t){(0,s.MX)({id:t}).then((t=>{0===t.code&&(this.batchCodeList=t.data)}))},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;this.form.id?this.showEdit?(0,s.VJ)({id:this.form.id,minNum:this.form.minNum,maxNum:this.form.maxNum,remark:this.form.remark}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))})):(0,s.ql)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))})):(0,s.Gn)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))}))}))},formClear(){this.showEdit=!1,this.showOutput=!1,this.batchCodeList=[],this.$refs.form.resetFields()},toggleSupplier(t){this.batchCodeList&&this.batchCodeList.map((e=>{t===e.batchCode&&(this.form.supplier=e.supplier)}))}}},d=u,c=a(1001),m=(0,c.Z)(d,n,o,!1,null,null,null),p=m.exports,h=function(){var t=this,e=t._self._c;return e("el-popover",{attrs:{placement:"right",width:"500",trigger:"click"}},[e("el-table",{attrs:{data:t.tableData}},[e("el-table-column",{attrs:{prop:"batchCode",label:"批次编码",width:"160"}}),e("el-table-column",{attrs:{prop:"supplier",label:"供应商",width:"220"}}),e("el-table-column",{attrs:{prop:"num",label:"当前库存"}})],1),e("el-button",{staticClass:"tableInnerButton",attrs:{slot:"reference",type:"text"},on:{click:function(e){return t.showInnerTable(t.injectData)}},slot:"reference"},[t._v("详情")])],1)},f=[],b={name:"InnerTable",props:{injectData:{type:Object,default:()=>({})},itemProp:{type:String}},data(){return{list:this.injectData,tableData:[]}},methods:{showInnerTable(t){(0,s.MX)({id:t.id}).then((t=>{0===t.code&&(this.tableData=t.data)}))}}},g=b,y=(0,c.Z)(g,h,f,!1,null,null,null),L=y.exports,C=a(475);const w=[{prop:"line",label:"产线",minWidth:120},{prop:"sideLibraryName",label:"所属线边库",minWidth:150},{prop:"materialName",label:"耗材名称",minWidth:150},{prop:"spec",label:"规格",minWidth:150},{prop:"unit",label:"单位",minWidth:150},{prop:"stockNum",label:"库存数量/个",sortable:!0,minWidth:150},{prop:"details",label:"库存详情",minWidth:100,subcomponent:L},{prop:"minNum",label:"最低安全库存",width:150},{prop:"maxNum",label:"最高安全库存",width:150},{prop:"remark",label:"备注",minWidth:150}],N=[{type:"edit",btnName:"编辑"},{type:"output",btnName:"出库"}];var k={name:"InAndOutManagement",components:{InAndOutManagementAdd:p},data(){return{formConfig:[{type:"select",label:"产线",selectOptions:JSON.parse(localStorage.getItem("publicList")).proLineVoList,param:"lineName",labelField:"dataName",valueField:"dataName",defaultSelect:"",onchange:!0,width:150},{type:"select",label:"线边库名称",selectOptions:[],param:"libraryName",labelField:"name",valueField:"name",defaultSelect:"",width:200},{type:"select",label:"耗材名称",selectOptions:[],param:"materialName",labelField:"name",valueField:"name",defaultSelect:"",width:150},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"入库",name:"add",color:"primary",plain:!0},{type:"button",btnName:"导出",name:"export",color:"primary",plain:!0}],tableProps:w,tableData:[],tableBtn:N,tableH:(0,C.NC)(275),total:0,listQuery:{current:1,size:20},addAndEdit:"",centervisible:!1}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,C.NC)(275)})),this.getMaterialList(),this.getList()},methods:{getList(){(0,s.p0)({...this.listQuery}).then((t=>{console.log(t),0===t.code&&(this.total=t.data.total,this.tableData=t.data.records)}))},selectChanged(t){if(console.log(t),t.value){let e=null,a=JSON.parse(localStorage.getItem("publicList")).proLineVoList;a&&a.map((a=>{a.dataName===t.value&&(e=a.dataCode)})),(0,l.A0)({id:e}).then((t=>{0===t.code&&(this.formConfig[1].selectOptions=t.data,this.formConfig[1].defaultSelect=null)}))}},getMaterialList(){(0,l._1)().then((t=>{console.log(t),0===t.code&&(this.formConfig[2].selectOptions=t.data)}))},handleClick(t){if(console.log(t),"edit"===t.type){this.centervisible=!0,this.addAndEdit="编辑";const e={id:t.data.id,type:"edit"};this.$nextTick((()=>{this.$refs.inAndOutManagementAdd.init(e)}))}else if("output"===t.type){this.centervisible=!0,this.addAndEdit="出库";const e={id:t.data.id,type:"output"};this.$nextTick((()=>{this.$refs.inAndOutManagementAdd.init(e)}))}},buttonClick(t){switch(console.log(t),t.btnName){case"search":this.listQuery.lineName=t.lineName,this.listQuery.libraryName=t.libraryName,this.listQuery.materialName=t.materialName,this.listQuery.current=1,this.getList();break;case"add":this.centervisible=!0,this.addAndEdit="入库",this.$nextTick((()=>{this.$refs.inAndOutManagementAdd.init()}));break;default:(0,s.vN)({...this.listQuery}).then((t=>{console.log(t);let e="";const a=t.headers["content-disposition"];a&&(e=decodeURIComponent(a.slice(a.indexOf("filename=")+9)));const r=new Blob([t.data]),i=new FileReader;i.readAsDataURL(r),i.onload=t=>{const a=document.createElement("a");a.download=e,a.href=t.target.result,document.body.appendChild(a),a.click(),document.body.removeChild(a)}}))}},tableRowClassName({row:t}){return t.flag&&t.flag>0?"danger-row":""},handleCancel(){this.$refs.inAndOutManagementAdd.formClear(),this.addAndEdit="",this.centervisible=!1},handleConfirm(){this.$refs.inAndOutManagementAdd.submitForm()},successSubmit(){this.handleCancel(),this.getList()}}},v=k,Z=(0,c.Z)(v,r,i,!1,null,null,null),x=Z.exports},910:function(t,e,a){a.d(e,{$0:function(){return Z},A0:function(){return v},D0:function(){return o},ER:function(){return I},Kl:function(){return k},ME:function(){return d},Or:function(){return g},P4:function(){return u},Py:function(){return c},Qj:function(){return w},Sc:function(){return f},WZ:function(){return h},Wj:function(){return l},Zs:function(){return i},_:function(){return O},_1:function(){return y},ag:function(){return x},b8:function(){return b},dN:function(){return m},fZ:function(){return p},gz:function(){return L},jF:function(){return n},oW:function(){return S},qT:function(){return C},sU:function(){return s},tb:function(){return N},xf:function(){return M}});var r=a(8859);function i(t){return(0,r.Z)({url:"/basic/account/page",method:"post",data:t})}function n(t){return(0,r.Z)({url:"/basic/account/add",method:"post",data:t})}function o(t){return(0,r.Z)({url:"/basic/account/get",method:"post",data:t})}function s(t){return(0,r.Z)({url:"/basic/account/update",method:"post",data:t})}function l(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/page",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/add",method:"post",data:t})}function d(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/get",method:"post",data:t})}function c(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/update",method:"post",data:t})}function m(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/getNameList",method:"post",data:t})}function p(t){return(0,r.Z)({url:"/basic/sparePartsConfiguration/getModelList",method:"post",data:t})}function h(t){return(0,r.Z)({url:"/basic/consumableConfiguration/page",method:"post",data:t})}function f(t){return(0,r.Z)({url:"/basic/consumableConfiguration/add",method:"post",data:t})}function b(t){return(0,r.Z)({url:"/basic/consumableConfiguration/get",method:"post",data:t})}function g(t){return(0,r.Z)({url:"/basic/consumableConfiguration/update",method:"post",data:t})}function y(t){return(0,r.Z)({url:"/basic/consumableConfiguration/materialAndUnit",method:"post",data:t})}function L(t){return(0,r.Z)({url:"/basic/consumableConfiguration/specList",method:"post",data:t})}function C(t){return(0,r.Z)({url:"/basic/sideLibraryConfiguration/page",method:"post",data:t})}function w(t){return(0,r.Z)({url:"/basic/sideLibraryConfiguration/add",method:"post",data:t})}function N(t){return(0,r.Z)({url:"/basic/sideLibraryConfiguration/get",method:"post",data:t})}function k(t){return(0,r.Z)({url:"/basic/sideLibraryConfiguration/update",method:"post",data:t})}function v(t){return(0,r.Z)({url:"/basic/sideLibraryConfiguration/list",method:"post",data:t})}function Z(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/page",method:"post",data:t})}function x(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/add",method:"post",data:t})}function M(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/get",method:"post",data:t})}function S(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/update",method:"post",data:t})}function O(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/getUnitList",method:"post",formState:!0,data:t})}function I(t){return(0,r.Z)({url:"/basic/equipmentConfiguration/getEqCode",method:"post",data:t})}},4770:function(t,e,a){a.d(e,{Gn:function(){return d},MX:function(){return n},VJ:function(){return u},jp:function(){return o},nK:function(){return h},oR:function(){return m},oz:function(){return p},p0:function(){return i},ql:function(){return c},qw:function(){return l},vN:function(){return s}});var r=a(8859);function i(t){return(0,r.Z)({url:"/material/MaterialManage/selectAll",method:"post",data:t})}function n(t){return(0,r.Z)({url:"/material/MaterialManage/detail",method:"post",data:t})}function o(t){return(0,r.Z)({url:"/material/OutInRecord/record",method:"post",data:t})}function s(t){return(0,r.Z)({url:"/material/MaterialManage/export",method:"post",responseType:"blob",data:t,timeout:6e4})}function l(t){return(0,r.Z)({url:"/material/MaterialManage/updateGet",method:"post",data:t})}function u(t){return(0,r.Z)({url:"/material/MaterialManage/update",method:"post",data:t})}function d(t){return(0,r.Z)({url:"/material/MaterialManage/insert",method:"post",data:t})}function c(t){return(0,r.Z)({url:"/material/MaterialManage/delete",method:"post",data:t})}function m(t){return(0,r.Z)({url:"/material/MaterialManage/SetAlarmValueGet",method:"post",data:t})}function p(t){return(0,r.Z)({url:"/material/MaterialManage/SetAlarmValue",method:"post",data:t})}function h(t){return(0,r.Z)({url:"/material/MaterialManage/onlineMaterialTrackSelect",method:"post",data:t})}}}]);