Files
qhmes/deploy-qhmes/frontend/js/MesXslRawMaterialEntryModal-C95wErab.js
2026-05-15 11:34:12 +08:00

2 lines
10 KiB
Java

var T=Object.defineProperty;var f=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var g=(e,l,o)=>l in e?T(e,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[l]=o,b=(e,l)=>{for(var o in l||(l={}))R.call(l,o)&&g(e,o,l[o]);if(f)for(var o of f(l))S.call(l,o)&&g(e,o,l[o]);return e};var w=(e,l,o)=>new Promise((s,r)=>{var d=n=>{try{i(o.next(n))}catch(c){r(c)}},m=n=>{try{i(o.throw(n))}catch(c){r(c)}},i=n=>n.done?s(n.value):Promise.resolve(n.value).then(d,m);i((o=o.apply(e,l)).next())});import{d as v,aC as E,as as X,aF as k,k as C,u as a,aG as F,e as D,f as x}from"./vue-vendor-C7Zq48Yl.js";import{B as N}from"./index-Du0A3ksf.js";import"./index-Di-j2gt4.js";import{f as p,u as J,ak as B,d as O}from"./index-BI6CMai0.js";import{u as Y}from"./useForm-BZtHZyx2.js";import{B as U}from"./BasicForm-BJnSRkIE.js";const Z=[{title:"条码",align:"center",dataIndex:"barcode",width:200},{title:"批次号",align:"center",dataIndex:"batchNo",width:180},{title:"入场时间",align:"center",dataIndex:"entryTime",width:160,customRender:({text:e})=>e?e.length>19?e.substring(0,19):e:""},{title:"榜单号",align:"center",dataIndex:"billNo",width:160},{title:"物料名称",align:"center",dataIndex:"materialName",width:140,ellipsis:!0},{title:"供料客户",align:"center",dataIndex:"supplyCustomer",width:140,ellipsis:!0},{title:"供应商名称",align:"center",dataIndex:"supplierName",width:140,ellipsis:!0},{title:"厂家物料名称",align:"center",dataIndex:"manufacturerMaterialName",width:140,ellipsis:!0},{title:"保质期",align:"center",dataIndex:"shelfLife",width:100},{title:"总重(KG)",align:"center",dataIndex:"totalWeight",width:100},{title:"总份数",align:"center",dataIndex:"totalPortions",width:80},{title:"每份总重(KG)",align:"center",dataIndex:"portionWeight",width:110},{title:"每份包数",align:"center",dataIndex:"portionPackages",width:80},{title:"检测结果",align:"center",dataIndex:"testResult_dictText",width:90},{title:"检测状态",align:"center",dataIndex:"testStatus_dictText",width:90},{title:"打印标记",align:"center",dataIndex:"printFlag_dictText",width:90},{title:"入库结存",align:"center",dataIndex:"stockBalance_dictText",width:90},{title:"库位",align:"center",dataIndex:"warehouseLocation",width:100},{title:"卸货人",align:"center",dataIndex:"unloadOperator",width:90},{title:"是否特采",align:"center",dataIndex:"isSpecialAdoption_dictText",width:80},{title:"特采操作人",align:"center",dataIndex:"specialAdoptionOperator",width:100},{title:"特采时间",align:"center",dataIndex:"specialAdoptionTime",width:160,customRender:({text:e})=>e?e.length>19?e.substring(0,19):e:""},{title:"特采原因",align:"center",dataIndex:"specialAdoptionReason",width:160,ellipsis:!0},{title:"状态",align:"center",dataIndex:"status_dictText",width:80},{title:"备注",align:"center",dataIndex:"remark",width:160,ellipsis:!0},{title:"创建时间",align:"center",dataIndex:"createTime",width:160,customRender:({text:e})=>e?e.length>19?e.substring(0,19):e:""}],ee=[{label:"条码",field:"barcode",component:"JInput",colProps:{span:6}},{label:"批次号",field:"batchNo",component:"JInput",colProps:{span:6}},{label:"榜单号",field:"billNo",component:"JInput",colProps:{span:6}},{label:"物料名称",field:"materialName",component:"JInput",colProps:{span:6}},{label:"供应商名称",field:"supplierName",component:"JInput",colProps:{span:6}},{label:"检测结果",field:"testResult",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_test_result"},colProps:{span:6}},{label:"检测状态",field:"testStatus",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_test_status"},colProps:{span:6}},{label:"是否特采",field:"isSpecialAdoption",component:"JDictSelectTag",componentProps:{dictCode:"yn"},colProps:{span:6}},{label:"状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_entry_status"},colProps:{span:6}},{label:"入场时间",field:"entryTime",component:"RangePicker",componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"},colProps:{span:8}}],G=[{label:"",field:"id",component:"Input",show:!1},{label:"",field:"weightRecordId",component:"Input",show:!1},{label:"",field:"materialId",component:"Input",show:!1},{label:"",field:"supplierId",component:"Input",show:!1},{label:"条码",field:"barcode",component:"Input",componentProps:{placeholder:"请输入条码"}},{label:"批次号",field:"batchNo",component:"Input",componentProps:{placeholder:"请输入批次号"}},{label:"入场时间",field:"entryTime",component:"DatePicker",componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss",placeholder:"请选择入场时间"}},{label:"榜单号",field:"billNo",component:"Input",componentProps:{placeholder:"请输入榜单号"}},{label:"物料名称",field:"materialName",component:"Input",componentProps:{placeholder:"请输入物料名称"}},{label:"供料客户",field:"supplyCustomer",component:"Input",componentProps:{placeholder:"请输入供料客户"}},{label:"供应商名称",field:"supplierName",component:"Input",componentProps:{placeholder:"请输入供应商名称"}},{label:"厂家物料名称",field:"manufacturerMaterialName",component:"Input",componentProps:{placeholder:"请输入厂家物料名称"}},{label:"保质期",field:"shelfLife",component:"Input",componentProps:{placeholder:"请输入保质期"}},{label:"总重(KG)",field:"totalWeight",component:"InputNumber",componentProps:{min:0,precision:2,placeholder:"请输入总重",style:{width:"100%"}}},{label:"总份数",field:"totalPortions",component:"Input",componentProps:{placeholder:"请输入总份数(多行明细用 / 拼接)",style:{width:"100%"}}},{label:"每份总重(KG)",field:"portionWeight",component:"Input",componentProps:{placeholder:"请输入每份总重(多行明细用 / 拼接)",style:{width:"100%"}}},{label:"每份包数",field:"portionPackages",component:"Input",componentProps:{placeholder:"请输入每份包数(多行明细用 / 拼接)",style:{width:"100%"}}},{label:"检测结果",field:"testResult",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_test_result",placeholder:"请选择检测结果"}},{label:"检测状态",field:"testStatus",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_test_status",placeholder:"请选择检测状态"}},{label:"打印标记",field:"printFlag",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_print_flag",placeholder:"请选择"}},{label:"入库结存",field:"stockBalance",component:"JDictSelectTag",componentProps:{dictCode:"yn",placeholder:"请选择"}},{label:"库位",field:"warehouseLocation",component:"Input",componentProps:{placeholder:"请输入库位"}},{label:"卸货人",field:"unloadOperator",component:"Input",componentProps:{placeholder:"请输入卸货人"}},{label:"是否特采",field:"isSpecialAdoption",component:"JDictSelectTag",componentProps:{dictCode:"yn",placeholder:"请选择"}},{label:"特采操作人",field:"specialAdoptionOperator",component:"Input",componentProps:{placeholder:"请输入特采操作人"}},{label:"特采时间",field:"specialAdoptionTime",component:"DatePicker",componentProps:{showTime:!0,valueFormat:"YYYY-MM-DD HH:mm:ss",placeholder:"请选择特采时间"}},{label:"特采原因",field:"specialAdoptionReason",component:"InputTextArea",componentProps:{rows:3,placeholder:"请输入特采原因"},colProps:{span:24}},{label:"状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_entry_status",placeholder:"请选择状态"}},{label:"备注",field:"remark",component:"InputTextArea",componentProps:{rows:3,placeholder:"请输入备注"},colProps:{span:24}}],te={barcode:{title:"条码",order:0,view:"text"},batchNo:{title:"批次号",order:1,view:"text"},entryTime:{title:"入场时间",order:2,view:"datetime"},billNo:{title:"榜单号",order:3,view:"text"},materialName:{title:"物料名称",order:4,view:"text"},supplierName:{title:"供应商名称",order:5,view:"text"},totalWeight:{title:"总重(KG)",order:6,view:"number"},testStatus:{title:"检测状态",order:7,view:"list",dictCode:"xslmes_test_status"},isSpecialAdoption:{title:"是否特采",order:8,view:"list",dictCode:"yn"},status:{title:"状态",order:9,view:"list",dictCode:"xslmes_entry_status"}},{createConfirm:H}=J();const le="/xslmes/mesXslRawMaterialEntry/exportXls",oe="/xslmes/mesXslRawMaterialEntry/importExcel",ne=e=>p.get({url:"/xslmes/mesXslRawMaterialEntry/list",params:e}),ae=(e,l)=>p.delete({url:"/xslmes/mesXslRawMaterialEntry/delete",params:e},{joinParamsToUrl:!0}).then(()=>{l()}),se=(e,l)=>{H({iconType:"warning",title:"确认删除",content:"是否删除选中数据",okText:"确认",cancelText:"取消",onOk:()=>p.delete({url:"/xslmes/mesXslRawMaterialEntry/deleteBatch",data:e},{joinParamsToUrl:!0}).then(()=>{l()})})},re=e=>p.put({url:"/xslmes/mesXslRawMaterialEntry/batchStockIn",params:{ids:e}},{joinParamsToUrl:!0}),L=(e,l)=>{let o=l?"/xslmes/mesXslRawMaterialEntry/edit":"/xslmes/mesXslRawMaterialEntry/add";return p.post({url:o,params:e})},j=v({__name:"MesXslRawMaterialEntryModal",emits:["register","success"],setup(e,{emit:l}){const o=l,s=x(!0),r=x(!1),[d,{setProps:m,resetFields:i,setFieldsValue:n,validate:c,scrollToField:I}]=Y({labelWidth:120,schemas:G,showActionButtonGroup:!1,baseColProps:{span:12}}),[P,{setModalProps:u,closeModal:y}]=B(t=>w(null,null,function*(){yield i(),u({confirmLoading:!1,showCancelBtn:!!(t!=null&&t.showFooter),showOkBtn:!!(t!=null&&t.showFooter)}),s.value=!!(t!=null&&t.isUpdate),r.value=!(t!=null&&t.showFooter),a(s)&&(yield n(b({},t.record))),m({disabled:!(t!=null&&t.showFooter)})})),M=D(()=>a(s)?a(r)?"详情":"编辑":"新增");function _(){return w(this,null,function*(){try{const t=yield c();u({confirmLoading:!0}),yield L(t,a(s)),y(),o("success")}catch(t){if(t!=null&&t.errorFields){const h=t.errorFields[0];h&&I(h.name,{behavior:"smooth",block:"center"})}return Promise.reject(t)}finally{u({confirmLoading:!1})}})}return(t,h)=>(X(),E(a(N),F(t.$attrs,{onRegister:a(P),destroyOnClose:"",title:M.value,width:1100,onOk:_}),{default:k(()=>[C(a(U),{onRegister:a(d),name:"MesXslRawMaterialEntryForm"},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}}),A=O(j,[["__scopeId","data-v-755913fd"]]),ie=Object.freeze(Object.defineProperty({__proto__:null,default:A},Symbol.toStringTag,{value:"Module"}));export{A as M,re as a,se as b,le as c,ee as d,Z as e,ae as f,oe as g,ie as h,ne as l,te as s};