OrderDeliveryForm-a420c2a7.js 4.3 KB

1
  1. import{d as P,r as o,x as S,e as W,b as Z,o as d,A as c,B as l,C as w,k as I,a,f as i,c as j,R as z,F as G,E as v,a2 as M,W as T,S as H,U as J,V as Q,a8 as X,K as Y,Z as $,__tla as aa}from"./index-f91c0cdb.js";import{_ as ta,__tla as ea}from"./Dialog-2f0ad01f.js";import{g as la,__tla as ra}from"./index-e139f656.js";import{d as sa,__tla as ia}from"./index-d9a58080.js";import oa,{__tla as _a}from"./OrderBaseInfo-ba4e00f9.js";import ua,{__tla as da}from"./OrderProduct-3b37b257.js";import{u as ca,__tla as ma}from"./useMessage-a907428f.js";import{_ as na}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as fa}from"./SPuUploadImg-2cd66754.js";import{__tla as pa}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-219b25d6.js";import{__tla as ya}from"./index-a792cef0.js";import{__tla as va}from"./el-image-viewer-a810ea39.js";import{__tla as ha}from"./formatTime-9b5323f0.js";import{__tla as ga}from"./dict-5ff19fa9.js";import{__tla as xa}from"./el-descriptions-item-08e7724d.js";import{__tla as ba}from"./DictTag.vue_vue_type_script_lang-58330850.js";import"./color-6e929987.js";let N,Va=Promise.all([(()=>{try{return aa}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return ba}catch{}})()]).then(async()=>{let h,g;h={style:{"text-align":"left",display:"flex"}},g={style:{"text-align":"right"}},N=na(P({name:"OrderDeliveryForm",__name:"OrderDeliveryForm",emits:["success"],setup(wa,{expose:k,emit:C}){const m=ca(),_=o(!1),u=o(!1),D=o("express"),t=o({id:0,logisticsId:null,logisticsNo:""}),x=o(),F=S({logisticsId:[{required:!0}],logisticsNo:[{required:!0}]}),n=o(""),R=W(()=>n.value?f.value.filter(e=>e.name.toLowerCase().includes(n.value.toLowerCase())):f.value),U=e=>{n.value=e};k({open:async(e,r)=>{L(),t.value.id=r,_.value=!0}});const O=C,q=async()=>{u.value=!0;try{if(t.value.logisticsId===null)return m.error("\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8"),!1;if(t.value.logisticsNo==="")return m.error("\u8BF7\u8F93\u5165\u7269\u6D41\u5355\u53F7"),!1;const e=a(t);D.value==="none"&&(e.logisticsId=0,e.logisticsNo=""),await sa(e),m.success("\u53D1\u8D27\u6210\u529F"),_.value=!1,O("success",!0)}finally{u.value=!1}},L=()=>{var e;t.value={id:0,logisticsId:null,logisticsNo:""},(e=x.value)==null||e.resetFields()},f=o([]);return Z(async()=>{f.value=await la()}),(e,r)=>{const b=T,A=H,B=J,p=Q,E=X,y=Y,K=ta,V=$;return d(),c(K,{modelValue:a(_),"onUpdate:modelValue":r[3]||(r[3]=s=>M(_)?_.value=s:null),title:"\u8BA2\u5355\u53D1\u8D27",width:"60%"},{footer:l(()=>[w("div",h,[I((d(),c(b,{ref_key:"formRef",ref:x,model:a(t),"label-width":"80px",style:{display:"flex"},rules:a(F)},{default:l(()=>[i(p,{label:"\u7269\u6D41\u516C\u53F8",prop:"logisticsId"},{default:l(()=>[i(B,{modelValue:a(t).logisticsId,"onUpdate:modelValue":r[0]||(r[0]=s=>a(t).logisticsId=s),placeholder:"\u8BF7\u9009\u62E9",filterable:"","filter-method":U},{default:l(()=>[(d(!0),j(G,null,z(a(R),s=>(d(),c(A,{key:s.id,label:s.name,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),i(p,{label:"\u7269\u6D41\u5355\u53F7",prop:"logisticsNo"},{default:l(()=>[i(E,{modelValue:a(t).logisticsNo,"onUpdate:modelValue":r[1]||(r[1]=s=>a(t).logisticsNo=s),placeholder:"\u8BF7\u5F55\u5165\u5FEB\u9012\u5355\u53F7",style:{width:"300px"}},null,8,["modelValue"])]),_:1}),i(p,null,{default:l(()=>[i(y,{type:"primary",plain:""},{default:l(()=>[v("\u626B\u4E00\u626B")]),_:1})]),_:1})]),_:1},8,["model","rules"])),[[V,a(u)]])]),w("div",g,[i(y,{disabled:a(u),type:"primary",onClick:q},{default:l(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),i(y,{onClick:r[2]||(r[2]=s=>_.value=!1)},{default:l(()=>[v("\u53D6 \u6D88")]),_:1})])]),default:l(()=>[I((d(),c(b,{"label-width":"80px",style:{padding:"10px"}},{default:l(()=>[i(oa,{ref:"infoRef","is-detail":!0,isDelivery:!0,id:a(t).id,style:{"margin-bottom":"30px"}},null,8,["id"]),i(ua,{ref:"infoRef",isDelivery:!0,id:a(t).id},null,8,["id"])]),_:1})),[[V,a(u)]])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-8538a07c"]])});export{Va as __tla,N as default};