OrderDeliveryForm-60d6bcc7.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,C as c,A as l,B as w,k as I,a,f as i,c as j,F as E,R as G,D as v,a2 as M,W as T,S as H,U as K,V as Q,a9 as X,J as Y,Z as $,_ as aa,__tla as ea}from"./index-286756b9.js";import{_ as ta,__tla as la}from"./Dialog-4c2de357.js";import{g as ra,__tla as sa}from"./index-c052d10f.js";import{d as ia,__tla as oa}from"./index-c6443726.js";import _a,{__tla as ua}from"./OrderBaseInfo-b63ed52f.js";import da,{__tla as ca}from"./OrderProduct-871687c2.js";import{u as ma,__tla as na}from"./useMessage-084b1e70.js";import{__tla as fa}from"./SPuUploadImg-895192f9.js";import{__tla as pa}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-6643271d.js";import{__tla as ya}from"./index-5a40c383.js";import{__tla as va}from"./el-image-viewer-e0e5d3be.js";import{__tla as ha}from"./formatTime-83e416ef.js";import{__tla as ga}from"./dict-82dca549.js";import{__tla as xa}from"./el-descriptions-item-63e151c1.js";import{__tla as ba}from"./DictTag-f72b04ca.js";import"./color-6e929987.js";let N,Va=Promise.all([(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return na}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=aa(P({name:"OrderDeliveryForm",__name:"OrderDeliveryForm",emits:["success"],setup(wa,{expose:D,emit:k}){const m=ma(),_=o(!1),u=o(!1),C=o("express"),e=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(t=>t.name.toLowerCase().includes(n.value.toLowerCase())):f.value),U=t=>{n.value=t};D({open:async(t,r)=>{z(),e.value.id=r,_.value=!0}});const O=k,q=async()=>{u.value=!0;try{if(e.value.logisticsId===null)return m.error("\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8"),!1;if(e.value.logisticsNo==="")return m.error("\u8BF7\u8F93\u5165\u7269\u6D41\u5355\u53F7"),!1;const t=a(e);C.value==="none"&&(t.logisticsId=0,t.logisticsNo=""),await ia(t),m.success("\u53D1\u8D27\u6210\u529F"),_.value=!1,O("success",!0)}finally{u.value=!1}},z=()=>{var t;e.value={id:0,logisticsId:null,logisticsNo:""},(t=x.value)==null||t.resetFields()},f=o([]);return Z(async()=>{f.value=await ra()}),(t,r)=>{const b=T,L=H,A=K,p=Q,B=X,y=Y,J=ta,V=$;return d(),c(J,{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(e),"label-width":"80px",style:{display:"flex"},rules:a(F)},{default:l(()=>[i(p,{label:"\u7269\u6D41\u516C\u53F8",prop:"logisticsId"},{default:l(()=>[i(A,{modelValue:a(e).logisticsId,"onUpdate:modelValue":r[0]||(r[0]=s=>a(e).logisticsId=s),placeholder:"\u8BF7\u9009\u62E9",filterable:"","filter-method":U},{default:l(()=>[(d(!0),j(E,null,G(a(R),s=>(d(),c(L,{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(B,{modelValue:a(e).logisticsNo,"onUpdate:modelValue":r[1]||(r[1]=s=>a(e).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(_a,{ref:"infoRef","is-detail":!0,isDelivery:!0,id:a(e).id,style:{"margin-bottom":"30px"}},null,8,["id"]),i(da,{ref:"infoRef",isDelivery:!0,id:a(e).id},null,8,["id"])]),_:1})),[[V,a(u)]])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-acdf8a20"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/trade/order/form/OrderDeliveryForm.vue"]])});export{Va as __tla,N as default};