8245.0ca2ccb8.js 5.5 KB

12
  1. "use strict";(self["webpackChunkbyte_sailing_mobile"]=self["webpackChunkbyte_sailing_mobile"]||[]).push([[8245],{78892:function(e,t,l){l.r(t),l.d(t,{default:function(){return b}});var a=l(36944),n=(l(83277),l(19545)),o=(l(42332),l(45331)),u=(l(29041),l(63005)),i=(l(35708),l(79264)),r=(l(52196),l(43739)),s=(l(62471),l(39420)),d=(l(12097),l(57658),l(73396)),c=l(44870),m=l(29733),v=l(22483);const p={class:"form",style:{"padding-bottom":"60px"}},f={style:{margin:"16px"}};var h={__name:"add",setup(e){const t=(0,d.FN)().proxy,l=((0,v.yj)(),(0,c.iH)(!1)),h=(0,c.iH)(!1),x=(0,c.iH)({typeName:"",productId:"",productName:"",lineQuantity:"",quantity:""}),y=()=>{k.value=[{text:"原料",value:"1"},{text:"辅料",value:"2"},{text:"配件",value:"3"},{text:"包材",value:"4"},{text:"其他",value:"5"}]},b=e=>{t.post("/productInfo/page",{pageNum:1,pageSize:9999,definition:"2",type:e}).then((e=>{W.value=e.data.rows.map((e=>({text:e.name,value:e.id})))}))},g=(e,l)=>{t.post("/borderOfLine/detail",{id:e}).then((e=>{l&&(null===e.data?x.value.lineQuantity=0:x.value.lineQuantity=e.data.quantity)}))},k=(0,c.iH)([]),W=(0,c.iH)([]),w=({selectedOptions:e})=>{b(e[0].value),x.value.typeName=e[0].text,l.value=!1,x.value.productId="",x.value.productName="",x.value.lineQuantity=""},_=({selectedOptions:e})=>{g(e[0].value,!0),x.value.productName=e[0].text,x.value.productId=e[0].value,h.value=!1},N=()=>history.back(),T=()=>{t.post("/borderOfLine/add",x.value).then((e=>{setTimeout((()=>{(0,m.XA)("添加成功"),t.$router.push("/main/lineSide")}),500)}),(e=>(0,m.LJ)(e.message)))};return(0,d.bv)((()=>{y()})),(e,t)=>{const c=s.l2,m=r.gN,v=i.cW,y=u.GI,b=o.TS,g=n.zx,V=a.l0;return(0,d.wg)(),(0,d.iD)("div",p,[(0,d.Wm)(c,{title:"线边管理","left-text":e.$t("common.back"),"left-arrow":"",onClickLeft:N},null,8,["left-text"]),(0,d.Wm)(V,{onSubmit:T,"label-align":"top",style:{"margin-top":"20px"}},{default:(0,d.w5)((()=>[(0,d.Wm)(b,{inset:""},{default:(0,d.w5)((()=>[(0,d.Wm)(m,{modelValue:x.value.typeName,"onUpdate:modelValue":t[0]||(t[0]=e=>x.value.typeName=e),"is-link":"",readonly:"",label:"物品类型",placeholder:"请选择物品类型",onClick:t[1]||(t[1]=e=>l.value=!0),rules:[{required:!0,message:"物品类型不能为空"}],required:""},null,8,["modelValue"]),(0,d.Wm)(y,{show:l.value,"onUpdate:show":t[3]||(t[3]=e=>l.value=e),round:"",position:"bottom"},{default:(0,d.w5)((()=>[(0,d.Wm)(v,{columns:k.value,onCancel:t[2]||(t[2]=e=>l.value=!1),onConfirm:w},null,8,["columns"])])),_:1},8,["show"]),(0,d.Wm)(m,{modelValue:x.value.productName,"onUpdate:modelValue":t[4]||(t[4]=e=>x.value.productName=e),"is-link":"",readonly:"",label:"物品名称",placeholder:"请选择物品名称",onClick:t[5]||(t[5]=e=>h.value=!0),rules:[{required:!0,message:"物品名称不能为空"}],required:""},null,8,["modelValue"]),(0,d.Wm)(y,{show:h.value,"onUpdate:show":t[8]||(t[8]=e=>h.value=e),round:"",position:"bottom"},{default:(0,d.w5)((()=>[(0,d.Wm)(v,{columns:W.value,onCancel:t[6]||(t[6]=e=>h.value=!1),onConfirm:t[7]||(t[7]=t=>_(t,e.index))},null,8,["columns"])])),_:1},8,["show"]),(0,d.Wm)(m,{modelValue:x.value.lineQuantity,"onUpdate:modelValue":t[9]||(t[9]=e=>x.value.lineQuantity=e),readonly:"",label:"线边数量"},null,8,["modelValue"]),(0,d.Wm)(m,{modelValue:x.value.quantity,"onUpdate:modelValue":t[10]||(t[10]=e=>x.value.quantity=e),label:"添加数量",placeholder:"请输入添加数量",rules:[{required:!0,message:"添加数量不能为空"}],required:""},null,8,["modelValue"])])),_:1}),(0,d._)("div",f,[(0,d.Wm)(g,{round:"",block:"",type:"primary","native-type":"submit"},{default:(0,d.w5)((()=>[(0,d.Uk)(" 提交 ")])),_:1})])])),_:1})])}}},x=l(40089);const y=(0,x.Z)(h,[["__scopeId","data-v-53f28666"]]);var b=y},34373:function(e,t,l){l.d(t,{J:function(){return s}});var a=l(73396),n=l(253),o=l(44870),u=l(47936),i=l(10648);const r=(e,t)=>{const l=(0,o.iH)(),r=()=>{l.value=(0,n.EL)(e).height};return(0,a.bv)((()=>{if((0,a.Y3)(r),t)for(let e=1;e<=3;e++)setTimeout(r,100*e)})),(0,i.h)((()=>(0,a.Y3)(r))),(0,a.YP)([u.bn,u.uK],r),l};function s(e,t){const l=r(e,!0);return e=>(0,a.Wm)("div",{class:t("placeholder"),style:{height:l.value?`${l.value}px`:void 0}},[e()])}},39420:function(e,t,l){l.d(t,{l2:function(){return h}});var a=l(11404),n=l(73396),o=l(44870),u=l(610),i=l(5323),r=l(96048),s=l(25322),d=l(34373),c=l(13649);const[m,v]=(0,u["do"])("nav-bar"),p={title:String,fixed:Boolean,zIndex:i.Or,border:i.J5,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean,clickable:i.J5};var f=(0,n.aZ)({name:m,props:p,emits:["clickLeft","clickRight"],setup(e,{emit:t,slots:l}){const a=(0,o.iH)(),u=(0,d.J)(a,v),i=e=>t("clickLeft",e),m=e=>t("clickRight",e),p=()=>l.left?l.left():[e.leftArrow&&(0,n.Wm)(c.JO,{class:v("arrow"),name:"arrow-left"},null),e.leftText&&(0,n.Wm)("span",{class:v("text")},[e.leftText])],f=()=>l.right?l.right():(0,n.Wm)("span",{class:v("text")},[e.rightText]),h=()=>{const{title:t,fixed:o,border:u,zIndex:d}=e,c=(0,r.As)(d),h=e.leftArrow||e.leftText||l.left,x=e.rightText||l.right;return(0,n.Wm)("div",{ref:a,style:c,class:[v({fixed:o}),{[s.xe]:u,"van-safe-area-top":e.safeAreaInsetTop}]},[(0,n.Wm)("div",{class:v("content")},[h&&(0,n.Wm)("div",{class:[v("left"),e.clickable?s.e9:""],onClick:i},[p()]),(0,n.Wm)("div",{class:[v("title"),"van-ellipsis"]},[l.title?l.title():t]),x&&(0,n.Wm)("div",{class:[v("right"),e.clickable?s.e9:""],onClick:m},[f()])])])};return()=>e.fixed&&e.placeholder?u(h):h()}});const h=(0,a.n)(f)},12097:function(e,t,l){l(31958),l(20368),l(56742)}}]);
  2. //# sourceMappingURL=8245.0ca2ccb8.js.map