Files
qhmes/deploy-qhmes/frontend/js/MesMixerMaterial.api-BHQgTY2s.js
2026-05-15 11:34:12 +08:00

2 lines
4.5 KiB
Java

import{aP as l,f as a}from"./index-BI6CMai0.js";import{M as i}from"./antd-vue-vendor-BPnV8VqP.js";function r(e){return e===1?"在投管":e===0?"未投管":"-"}function n(e){return e===1?"使用中":e===0?"停用":"-"}const c=[{title:"物料编码",align:"center",width:120,dataIndex:"materialCode"},{title:"物料名称",align:"center",width:160,dataIndex:"materialName"},{title:"ERP编号",align:"center",width:120,dataIndex:"erpCode"},{title:"物料大类",align:"center",width:120,dataIndex:"majorCategoryId_dictText"},{title:"物料小类",align:"center",width:120,dataIndex:"minorCategoryId_dictText"},{title:"物料描述",align:"center",width:180,ellipsis:!0,dataIndex:"materialDesc"},{title:"物料别名",align:"center",width:120,dataIndex:"aliasName"},{title:"投罐状态",align:"center",width:100,dataIndex:"feedManageStatus",customRender:({text:e})=>r(e)},{title:"使用状态",align:"center",width:100,dataIndex:"useStatus",customRender:({text:e})=>n(e)},{title:"比重",align:"center",width:90,dataIndex:"specificGravity"},{title:"保质期(天)",align:"center",width:100,dataIndex:"shelfLifeDays"},{title:"最短烘胶(分)",align:"center",width:110,dataIndex:"minBakeMinutes"},{title:"总安全库存KG",align:"center",width:120,dataIndex:"totalSafetyStockKg"},{title:"合格品安全库存KG",align:"center",width:130,dataIndex:"qualifiedSafetyStockKg"},{title:"创建时间",align:"center",width:160,dataIndex:"createTime"}],p=[{label:"物料编码",field:"materialCode",component:"Input",colProps:{span:6}},{label:"物料名称",field:"materialName",component:"Input",colProps:{span:6}},{label:"ERP编号",field:"erpCode",component:"Input",colProps:{span:6}},{label:"物料大类",field:"majorCategoryId",component:"ApiSelect",componentProps:{api:l,params:{pcode:"XSLMES_MATERIAL"},resultField:"",labelField:"title",valueField:"key",placeholder:"请选择物料大类"},colProps:{span:6}},{label:"物料小类",field:"minorCategoryId",component:"ApiSelect",componentProps:({formModel:e})=>{const t=e!=null&&e.majorCategoryId?String(e.majorCategoryId):"";return{api:l,params:t?{pid:t}:{pid:"-1"},resultField:"",labelField:"title",valueField:"key",placeholder:t?"请选择物料小类":"请先选择物料大类",disabled:!t}},colProps:{span:6}}],o=[{label:"在投管",value:1},{label:"未投管",value:0}],d=[{label:"使用中",value:1},{label:"停用",value:0}],u=[{label:"",field:"id",component:"Input",show:!1},{label:"物料编码",field:"materialCode",component:"Input",required:!0},{label:"物料名称",field:"materialName",component:"Input",required:!0},{label:"ERP编号",field:"erpCode",component:"Input"},{label:"物料大类",field:"majorCategoryId",required:!0,component:"Input",slot:"majorCategoryIdField"},{label:"物料小类",field:"minorCategoryId",required:!0,component:"Input",slot:"minorCategoryIdField"},{label:"物料描述",field:"materialDesc",component:"InputTextArea"},{label:"物料别名",field:"aliasName",component:"Input"},{label:"投罐状态",field:"feedManageStatus",component:"Select",defaultValue:1,componentProps:{options:o}},{label:"使用状态",field:"useStatus",component:"Select",defaultValue:1,componentProps:{options:d}},{label:"比重",field:"specificGravity",component:"InputNumber",componentProps:{min:0,step:.001,precision:6}},{label:"保质期(天)",field:"shelfLifeDays",component:"InputNumber",componentProps:{min:0,precision:0}},{label:"最短烘胶时间(分钟)",field:"minBakeMinutes",component:"InputNumber",componentProps:{min:0,precision:0}},{label:"总安全库存KG",field:"totalSafetyStockKg",component:"InputNumber",componentProps:{min:0,step:1e-4,precision:4}},{label:"合格品安全库存KG",field:"qualifiedSafetyStockKg",component:"InputNumber",componentProps:{min:0,step:1e-4,precision:4}},{label:"备注",field:"remark",component:"InputTextArea"}];const I="/mes/material/mixerMaterial/exportXls",f="/mes/material/mixerMaterial/importExcel",x=e=>a.get({url:"/mes/material/mixerMaterial/list",params:e}),g=e=>a.get({url:"/mes/material/mixerMaterial/queryById",params:e}),b=(e,t)=>a.delete({url:"/mes/material/mixerMaterial/delete",params:e},{joinParamsToUrl:!0}).then(()=>t()),h=(e,t)=>{i.confirm({title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>a.delete({url:"/mes/material/mixerMaterial/deleteBatch",data:e},{joinParamsToUrl:!0}).then(()=>t())})},y=(e,t)=>a.post({url:t?"/mes/material/mixerMaterial/edit":"/mes/material/mixerMaterial/add",params:e});export{I as a,h as b,c,b as d,y as e,u as f,f as g,x as l,g as q,p as s};