5741.357eab56.js 5.1 KB

12
  1. "use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[5741],{70452:function(e,t,a){a.r(t),a.d(t,{default:function(){return m}});var l=a(39420),i=(a(12097),a(57658),a(73396)),r=a(44870),n=a(29733),o=a(22483),s=a(51836),c=a(99080);const d={class:"form"};var p={__name:"add",setup(e){const t=(0,i.FN)().proxy,a=(0,o.yj)(),p=((0,r.iH)(!1),(0,r.iH)(!1),(0,r.iH)(!1),(0,r.iH)([]),(0,r.qj)({data:{id:null,definition:"2",productClassifyId:null,productClassifyName:null,code:null,customCode:null,type:null,typeName:null,name:null,spec:null,unit:null,remark:null,fileList:[]}})),u=(0,r.iH)(null),m=(0,r.qj)({readonly:!1,disabled:!1,labelAlign:"top",scroll:!0,labelWidth:"62pk"}),f=(0,r.qj)([{type:"cascader",label:t.t("library.materialClassification"),prop:"productClassifyId",itemType:"common",showPicker:!1,data:[],fieldNames:{text:"label",value:"id",children:"children"}},{type:"picker",label:t.t("library.materialType"),prop:"type",itemType:"onePicker",showPicker:!1,fieldNames:{text:"text",value:"value"},data:[{text:t.t("library.rawMaterial"),value:"1"},{text:t.t("library.accessory"),value:"2"},{text:t.t("library.fittings"),value:"3"},{text:t.t("library.packaging"),value:"4"},{text:t.t("library.other"),value:"5"}]},{type:"input",itemType:"text",label:t.t("library.materialName"),prop:"name",clearable:!0},{type:"input",itemType:"text",label:t.t("library.specificationModel"),prop:"spec",clearable:!0},{type:"picker",label:t.t("library.unit"),prop:"unit",itemType:"onePicker",showPicker:!1,fieldNames:{text:"dictValue",value:"dictKey"},data:[]},{type:"upload",label:t.t("library.fileUpload"),prop:"fileList"},{type:"input",itemType:"textarea",label:t.t("library.remark"),prop:"remark"}]),y={productClassifyId:[{required:!0,message:t.t("library.productClassificationCanNotBeEmpty")}],type:[{required:!0,message:t.t("library.productTypeCanNotBeEmpty")}],name:[{required:!0,message:t.t("library.productNameCanNotBeEmpty")}],spec:[{required:!0,message:t.t("library.specificationModelCanNotBeEmpty")}],unit:[{required:!0,message:t.t("library.unitCanNotBeEmpty")}],select:[{required:!0,message:t.t("library.pleaseSelect")}],date:[{required:!0,message:t.t("library.pleaseSelectTime")}],common:[{required:!0,message:t.t("library.pleaseSelectCascader")}]},b=((0,r.iH)([]),()=>{t.post("/dictTenantData/page",{pageNum:1,pageSize:999,tenantId:(0,s.bG)().tenantId,dictCode:"unit"}).then((e=>{f[4].data=e.data.rows}))});b();(0,r.iH)([]);const h=()=>history.back(),g=()=>{console.log(p),t.post("/productInfo/"+a.query.type,p.data).then((()=>{(0,n.XA)(t.t("common.addSuccess")),setTimeout((()=>{history.back()}),500)}))},x=e=>{let t=[],a=e=>{e.forEach((e=>{t.push(e),e.children&&e.children.length>0&&a(e.children)}))};return a(e),t};return(0,i.bv)((()=>{t.post("/productClassify/tree",{parentId:"",name:"",definition:"2"}).then((e=>{f[0].data=e.data;x(e.data);a.query.id&&t.post("/productInfo/detail",{id:a.query.id}).then((e=>{p.data=e.data}))}))})),(e,t)=>{const a=l.l2;return(0,i.wg)(),(0,i.iD)("div",d,[(0,i.Wm)(a,{title:e.$t("library.name"),"left-text":e.$t("common.back"),"left-arrow":"",onClickLeft:h},null,8,["title","left-text"]),(0,i.Wm)(c.Z,{modelValue:p.data,"onUpdate:modelValue":t[0]||(t[0]=e=>p.data=e),formOption:m,formConfig:f,rules:y,onOnSubmit:g,ref_key:"formDom",ref:u},null,8,["modelValue","formOption","formConfig"])])}}};const u=p;var m=u},34373:function(e,t,a){a.d(t,{J:function(){return c}});var l=a(73396),i=a(253),r=a(44870),n=a(47936),o=a(10648);const s=(e,t)=>{const a=(0,r.iH)(),s=()=>{a.value=(0,i.EL)(e).height};return(0,l.bv)((()=>{if((0,l.Y3)(s),t)for(let e=1;e<=3;e++)setTimeout(s,100*e)})),(0,o.h)((()=>(0,l.Y3)(s))),(0,l.YP)([n.bn,n.uK],s),a};function c(e,t){const a=s(e,!0);return e=>(0,l.Wm)("div",{class:t("placeholder"),style:{height:a.value?`${a.value}px`:void 0}},[e()])}},39420:function(e,t,a){a.d(t,{l2:function(){return b}});var l=a(11404),i=a(73396),r=a(44870),n=a(610),o=a(5323),s=a(96048),c=a(25322),d=a(34373),p=a(13649);const[u,m]=(0,n["do"])("nav-bar"),f={title:String,fixed:Boolean,zIndex:o.Or,border:o.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:o.J5};var y=(0,i.aZ)({name:u,props:f,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:a}){const l=(0,r.iH)(),n=(0,d.J)(l,m),o=e=>t("clickLeft",e),u=e=>t("clickRight",e),f=()=>a.left?a.left():[e.leftArrow&&(0,i.Wm)(p.JO,{class:m("arrow"),name:"arrow-left"},null),e.leftText&&(0,i.Wm)("span",{class:m("text")},[e.leftText])],y=()=>a.right?a.right():(0,i.Wm)("span",{class:m("text")},[e.rightText]),b=()=>{const{title:t,fixed:r,border:n,zIndex:d}=e,p=(0,s.As)(d),b=e.leftArrow||e.leftText||a.left,h=e.rightText||a.right;return(0,i.Wm)("div",{ref:l,style:p,class:[m({fixed:r}),{[c.xe]:n,"van-safe-area-top":e.safeAreaInsetTop}]},[(0,i.Wm)("div",{class:m("content")},[b&&(0,i.Wm)("div",{class:[m("left"),e.clickable?c.e9:""],onClick:o},[f()]),(0,i.Wm)("div",{class:[m("title"),"van-ellipsis"]},[a.title?a.title():t]),h&&(0,i.Wm)("div",{class:[m("right"),e.clickable?c.e9:""],onClick:u},[y()])])])};return()=>e.fixed&&e.placeholder?n(b):b()}});const b=(0,l.n)(y)},12097:function(e,t,a){a(31958),a(20368),a(56742)}}]);
  2. //# sourceMappingURL=5741.357eab56.js.map