2 lines
6.8 KiB
Java
2 lines
6.8 KiB
Java
|
|
var R=Object.defineProperty,J=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var N=(t,a,i)=>a in t?R(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,T=(t,a)=>{for(var i in a||(a={}))B.call(a,i)&&N(t,i,a[i]);if(M)for(var i of M(a))E.call(a,i)&&N(t,i,a[i]);return t},S=(t,a)=>J(t,k(a));var _=(t,a,i)=>new Promise((r,s)=>{var c=p=>{try{d(i.next(p))}catch(m){s(m)}},u=p=>{try{d(i.throw(p))}catch(m){s(m)}},d=p=>p.done?r(p.value):Promise.resolve(p.value).then(c,u);d((i=i.apply(t,a)).next())});import{d as W,aC as V,as as F,aF as H,k as D,u as l,aG as G,e as U,f as y}from"./vue-vendor-C7Zq48Yl.js";import{B as j}from"./index-Du0A3ksf.js";import"./index-Di-j2gt4.js";import{e as q,a as z}from"./printTemplate.api-CHChWHTu.js";import{ak as Y}from"./index-BI6CMai0.js";import{B as $}from"./BasicForm-BJnSRkIE.js";import{u as K}from"./useForm-BZtHZyx2.js";const C="print_template_category",Q="print_paper_preset",X=[{label:"条码",value:"barcode"},{label:"标签",value:"label"},{label:"快递面单",value:"waybill"},{label:"吊牌",value:"hangtag"},{label:"物料卡",value:"materialCard"},{label:"箱唛",value:"cartonMark"},{label:"质检单",value:"qc"},{label:"入库单",value:"inbound"},{label:"出库单",value:"outbound"},{label:"工单",value:"workOrder"},{label:"表单套打",value:"form"},{label:"报表",value:"report"}],Z=X.reduce((t,a)=>(t[a.value]=a.label,t),{}),w={A4:{width:210,height:297,orientation:"portrait"},A5:{width:148,height:210,orientation:"portrait"},A6:{width:105,height:148,orientation:"portrait"},B5:{width:176,height:250,orientation:"portrait"},B6:{width:125,height:176,orientation:"portrait"},L_10_12:{width:10,height:12,orientation:"portrait"},L_20_10:{width:20,height:10,orientation:"landscape"},L_25_15:{width:25,height:15,orientation:"landscape"},L_30_20:{width:30,height:20,orientation:"landscape"},L_40_30:{width:40,height:30,orientation:"landscape"},L_50_30:{width:50,height:30,orientation:"landscape"},L_60_40:{width:60,height:40,orientation:"landscape"},L_70_50:{width:70,height:50,orientation:"landscape"},L_80_50:{width:80,height:50,orientation:"landscape"},L_90_60:{width:90,height:60,orientation:"landscape"},L_100_70:{width:100,height:70,orientation:"landscape"},L_100_150:{width:100,height:150,orientation:"portrait"},L_100_180:{width:100,height:180,orientation:"portrait"}},me=[{title:"模板编码",dataIndex:"templateCode",width:140},{title:"模板名称",dataIndex:"templateName",width:180},{title:"分类",dataIndex:"category",width:100,customRender:({text:t})=>Z[t]||t},{title:"纸张(mm)",dataIndex:"paperWidthMm",width:130,customRender:({record:t})=>(t==null?void 0:t.paperWidthMm)!=null&&(t==null?void 0:t.paperHeightMm)!=null?`${t.paperWidthMm}×${t.paperHeightMm}`:"-"},{title:"备注",dataIndex:"remark",ellipsis:!0},{title:"创建时间",dataIndex:"createTime",width:165}],he=[{label:"模板编码",field:"templateCode",component:"Input",colProps:{span:6}},{label:"模板名称",field:"templateName",component:"Input",colProps:{span:6}},{label:"分类",field:"category",component:"JDictSelectTag",componentProps:{dictCode:C,allowClear:!0},colProps:{span:6}}],ee=[{label:"模板编码",field:"templateCode",component:"Input",required:!0,componentProps:{maxlength:64},dynamicDisabled:({values:t})=>!!(t!=null&&t.id)},{label:"模板名称",field:"templateName",component:"Input",required:!0},{label:"分类",field:"category",component:"JDictSelectTag",defaultValue:"form",componentProps:{dictCode:C},required:!0},{label:"纸张规格",field:"paperPreset",component:"JDictSelectTag",defaultValue:"A4",componentProps:({formModel:t})=>({dictCode:Q,allowClear:!0,placeholder:"选择预设规格或自定义",onChange:a=>{const i=w[String(a||"")];i&&(t.paperWidthMm=i.width,t.paperHeightMm=i.height,t.paperOrientation=i.orientation)}})},{label:"纸宽(mm)",field:"paperWidthMm",component:"InputNumber",defaultValue:210,componentProps:{min:10,max:2e3,style:{width:"100%"}}},{label:"纸高(mm)",field:"p
|