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

2 lines
4.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
var F=Object.defineProperty;var h=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var I=(s,o,t)=>o in s?F(s,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[o]=t,g=(s,o)=>{for(var t in o||(o={}))M.call(o,t)&&I(s,t,o[t]);if(h)for(var t of h(o))v.call(o,t)&&I(s,t,o[t]);return s};var f=(s,o,t)=>new Promise((i,r)=>{var d=n=>{try{a(t.next(n))}catch(c){r(c)}},p=n=>{try{a(t.throw(n))}catch(c){r(c)}},a=n=>n.done?i(n.value):Promise.resolve(n.value).then(d,p);a((t=t.apply(s,o)).next())});import{d as y,aC as S,as as B,aF as D,k as T,u as l,aG as U,e as k,f as w}from"./vue-vendor-C7Zq48Yl.js";import{B as N}from"./index-Du0A3ksf.js";import"./index-Di-j2gt4.js";import{s as R}from"./MesXslUnit.api-CysRO4V4.js";import{ak as O,d as J}from"./index-BI6CMai0.js";import{u as X}from"./useForm-BZtHZyx2.js";import{B as E}from"./BasicForm-BJnSRkIE.js";const K=[{title:"ID",align:"center",dataIndex:"id",width:280,ellipsis:!0,defaultHidden:!0},{title:"编码",align:"center",dataIndex:"unitCode",width:120},{title:"名称",align:"center",dataIndex:"unitName",width:140},{title:"ERP编码",align:"center",dataIndex:"erpCode",width:120},{title:"所属分类",align:"center",dataIndex:"categoryId_dictText",width:140,ellipsis:!0},{title:"描述",align:"center",dataIndex:"unitDesc",width:200,ellipsis:!0},{title:"状态",align:"center",dataIndex:"status_dictText",width:90},{title:"租户ID",align:"center",dataIndex:"tenantId",width:90,defaultHidden:!0}],Y=[{label:"编码",field:"unitCode",component:"JInput",colProps:{span:6}},{label:"名称",field:"unitName",component:"JInput",colProps:{span:6}},{label:"状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_unit_status"},colProps:{span:6}}],L=[{label:"",field:"id",component:"Input",show:!1},{label:"编码",field:"unitCode",required:!0,component:"Input",componentProps:{placeholder:"请输入编码"}},{label:"名称",field:"unitName",required:!0,component:"Input",componentProps:{placeholder:"请输入名称"}},{label:"ERP编码",field:"erpCode",component:"Input",componentProps:{placeholder:"请输入ERP编码"}},{label:"所属分类",field:"categoryId",required:!0,component:"JCategorySelect",componentProps:{pcode:"XSLMES_UNIT",placeholder:"请选择所属分类(分类字典)"}},{label:"描述",field:"unitDesc",component:"InputTextArea",componentProps:{rows:3,placeholder:"请输入描述"}},{label:"状态",field:"status",component:"JDictSelectTag",componentProps:{dictCode:"xslmes_unit_status",placeholder:"请选择状态"},defaultValue:"0"},{label:"租户ID",field:"tenantId",component:"InputNumber",componentProps:{placeholder:"租户ID可空"}}],Z={unitCode:{title:"编码",order:0,view:"text"},unitName:{title:"名称",order:1,view:"text"},status:{title:"状态",order:2,view:"list",dictCode:"xslmes_unit_status"}},j=y({__name:"MesXslUnitModal",emits:["register","success"],setup(s,{emit:o}){const t=o,i=w(!0),r=w(!1),[d,{setProps:p,resetFields:a,setFieldsValue:n,validate:c,scrollToField:_}]=X({labelWidth:120,schemas:L,showActionButtonGroup:!1,baseColProps:{span:24}}),[b,{setModalProps:u,closeModal:P}]=O(e=>f(null,null,function*(){yield a(),u({confirmLoading:!1,showCancelBtn:!!(e!=null&&e.showFooter),showOkBtn:!!(e!=null&&e.showFooter)}),i.value=!!(e!=null&&e.isUpdate),r.value=!(e!=null&&e.showFooter),l(i)&&(yield n(g({},e.record))),p({disabled:!(e!=null&&e.showFooter)})})),x=k(()=>l(i)?l(r)?"单位详情":"编辑单位":"新增单位");function C(){return f(this,null,function*(){try{const e=yield c();u({confirmLoading:!0}),yield R(e,l(i)),P(),t("success")}catch(e){if(e!=null&&e.errorFields){const m=e.errorFields[0];m&&_(m.name,{behavior:"smooth",block:"center"})}return Promise.reject(e)}finally{u({confirmLoading:!1})}})}return(e,m)=>(B(),S(l(N),U(e.$attrs,{onRegister:l(b),destroyOnClose:"",title:x.value,width:800,onOk:C}),{default:D(()=>[T(l(E),{onRegister:l(d),name:"MesXslUnitForm"},null,8,["onRegister"])]),_:1},16,["onRegister","title"]))}}),q=J(j,[["__scopeId","data-v-c9e3337c"]]),ee=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"}));export{q as M,Y as a,ee as b,K as c,Z as s};