1 |
- import{d as ae,r as u,N as le,u as te,f as re,e as oe,z as se,A as ie,D as A,a as e,o as n,j as _,w as t,k,i as r,ax as de,c as ue,C as ce,F as ne,l as V,m as g,a0 as B,R as S,B as me,ay as _e,G as ye,H as fe,I as pe,X as ve,J as ge,q as he,az as be,M as Ve,__tla as we}from"./index-1e808f2e.js";import{_ as ke,__tla as Ne}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{E as De,__tla as Ie}from"./el-tree-select-e8e05888.js";import{_ as xe,__tla as Ae}from"./SPuUploadImg-f0bd750f.js";import{g as Be,__tla as Ce}from"./index-57a3dfbf.js";import{d as Te,g as Re,u as Ue,a as Ee,__tla as Me}from"./index-b776b94b.js";import qe,{__tla as Se}from"./OrderBaseInfo-2d922922.js";import ze,{__tla as He}from"./OrderProduct-23a794a7.js";import{d as je}from"./tree-fd3a041e.js";import{g as Fe,__tla as Le}from"./index-f40ed4f7.js";import{u as Oe,__tla as Ge}from"./useMessage-5f9e8917.js";import{_ as Je}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Pe}from"./el-card-03b3588b.js";import{__tla as We}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3df4382.js";import{__tla as Xe}from"./index-b59955b6.js";import{__tla as Ye}from"./el-image-viewer-dddb6285.js";import{__tla as Ke}from"./formatTime-a348c3be.js";import{__tla as Qe}from"./dict-a31cb4ba.js";import{__tla as Ze}from"./el-descriptions-item-8d4be2e8.js";import{__tla as $e}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import"./color-6e929987.js";let z,ea=Promise.all([(()=>{try{return we}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Ge}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return $e}catch{}})()]).then(async()=>{let C,T;C={class:"bottom"},T={class:"dialog-footer"},z=Je(ae({__name:"OrderMobileDeliveryForm",emits:["success"],setup(aa,{emit:H}){const R=u([]),c=u(),U=le(),{push:j}=te(),{t:w}=me(),p=Oe(),F=re({logisticsId:[{required:!0,message:"\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8"}],logisticsNo:[{required:!0,message:"\u8BF7\u8F93\u5165\u5FEB\u9012\u5355\u53F7"}],attachment:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u53D1\u8D27\u9644\u4EF6"}]}),y=u(null),o=u({id:0,logisticsId:null,logisticsNo:"",deliveryRemark:"",attachment:""}),N=u(""),L=oe(()=>N.value?D.value.filter(i=>i.name.toLowerCase().includes(N.value.toLowerCase())):D.value),O=i=>{N.value=i},G=window.innerHeight||document.documentElement.clientHeight,d=u(!1),h=u(0),E=u(""),D=u([]);h.value=U.params.id,c.value=U.params.spuType;const M=()=>{j({name:"Order"})},I=H,J=async()=>{d.value=!0;try{if(c.value!="0"){if(o.value.logisticsId===null)return p.error("\u8BF7\u9009\u62E9\u7269\u6D41\u516C\u53F8"),!1;if(o.value.logisticsNo==="")return p.error("\u8BF7\u8F93\u5165\u7269\u6D41\u5355\u53F7"),!1}else if(!o.value.attachment)return p.error("\u8BF7\u4E0A\u4F20\u53D1\u8D27\u9644\u4EF6"),!1;const i=e(o);await Te(i),p.success("\u53D1\u8D27\u6210\u529F"),I("success",!0),M()}finally{d.value=!1}},P=async()=>{const{value:i}=await _e.prompt("\u8BF7\u8F93\u5165\u5907\u6CE8","\u5907\u6CE8",{inputValue:E,confirmButtonText:w("common.ok"),cancelButtonText:w("common.cancel")});try{await Ue({id:o.value.id,remark:i}),p.success(w("common.updateSuccess")),y.value.getDetail(),I("success",!0)}finally{d.value=!1}};let m=u(!1);const s=u({id:0,receiverName:"",receiverMobile:"",receiverAreaId:null,receiverDetailAddress:""}),W=async()=>{m.value=!0,s.value.id=y.value.formData.id,s.value.receiverName=y.value.formData.receiverName,s.value.receiverMobile=y.value.formData.receiverMobile,s.value.receiverAreaId=y.value.formData.receiverAreaId,s.value.receiverDetailAddress=y.value.formData.receiverDetailAddress},X=async()=>{d.value=!0;try{const i=e(s);await Ee(i),p.success(w("common.updateSuccess")),m.value=!1,y.value.getDetail(),I("success",!0)}finally{d.value=!1}};return se(async()=>{o.value.id=h.value,s.value.id=h.value,await(async i=>{if(i){const a=await Re(i);a||(p.error("\u4EA4\u6613\u8BA2\u5355\u4E0D\u5B58\u5728"),close()),E.value=a.remark}})(o.value.id),D.value=await Be(),R.value=await Fe(),document.getElementsByTagName("section")[1].style.padding="0px",document.getElementsByTagName("section")[1].style.width="100%",document.getElementsByTagName("section")[1].style.background="#f5f7f9",document.getElementsByTagName("section")[1].querySelector("div").style.border="none"}),ie(()=>{document.getElementsByTagName("section")[1].style.width="auto",document.getElementsByTagName("section")[1].style.padding="20px",document.getElementsByTagName("section")[1].style.background="var(--el-color-white)"}),(i,a)=>{const Y=ye,K=fe,f=pe,b=ve,Q=xe,q=ge,v=he,Z=De,$=be,ee=ke,x=Ve;return A((n(),_(ee,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:t(()=>[k("div",{class:"top",style:de([{height:e(G)-230+"px"},{"overflow-y":"auto"}])},[r(qe,{ref_key:"baseInfoRef",ref:y,"is-detail":!1,id:e(h)},null,8,["id"]),r(ze,{ref:"infoRef",id:e(h)},null,8,["id"])],4),k("div",C,[A((n(),_(q,{ref:"formRef",model:e(o),"label-width":"140px",style:{},rules:e(F)},{default:t(()=>[e(c)!="0"?(n(),_(f,{key:0,label:"\u7269\u6D41\u516C\u53F8",prop:"logisticsId",style:{border:"none"}},{default:t(()=>[r(K,{modelValue:e(o).logisticsId,"onUpdate:modelValue":a[0]||(a[0]=l=>e(o).logisticsId=l),style:{width:"90%"},placeholder:"\u8BF7\u9009\u62E9",filterable:"","filter-method":O},{default:t(()=>[(n(!0),ue(ne,null,ce(e(L),l=>(n(),_(Y,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):V("",!0),e(c)!="0"?(n(),_(f,{key:1,label:"\u7269\u6D41\u5355\u53F7",prop:"logisticsNo",style:{border:"none"}},{default:t(()=>[r(b,{modelValue:e(o).logisticsNo,"onUpdate:modelValue":a[1]||(a[1]=l=>e(o).logisticsNo=l),style:{width:"90%"},placeholder:"\u8BF7\u5F55\u5165\u5FEB\u9012\u5355\u53F7"},null,8,["modelValue"])]),_:1})):V("",!0),e(c)=="0"?(n(),_(f,{key:2,label:"\u53D1\u8D27\u5907\u6CE8",prop:"deliveryRemark",style:{border:"none"}},{default:t(()=>[r(b,{modelValue:e(o).deliveryRemark,"onUpdate:modelValue":a[2]||(a[2]=l=>e(o).deliveryRemark=l)},null,8,["modelValue"])]),_:1})):V("",!0),e(c)=="0"?(n(),_(f,{key:3,label:"\u9644\u4EF6",prop:"attachment",style:{border:"none",display:"flex","align-items":"center"}},{default:t(()=>[r(Q,{modelValue:e(o).attachment,"onUpdate:modelValue":a[3]||(a[3]=l=>e(o).attachment=l),fileSize:1},null,8,["modelValue"])]),_:1})):V("",!0)]),_:1},8,["model","rules"])),[[x,e(d)]]),k("div",null,[r(v,{onClick:M,class:B({"w-31":e(c)=="0"})},{default:t(()=>[g("\u8FD4 \u56DE")]),_:1},8,["class"]),r(v,{disabled:e(d),type:"primary",onClick:P,class:B({"w-31":e(c)=="0"})},{default:t(()=>[g("\u5546\u5BB6\u5907\u6CE8")]),_:1},8,["disabled","class"]),e(c)!="0"?(n(),_(v,{key:0,disabled:e(d),type:"primary",onClick:W},{default:t(()=>[g("\u4FEE\u6539\u5730\u5740")]),_:1},8,["disabled"])):V("",!0),r(v,{disabled:e(d),type:"primary",onClick:J,class:B({"w-31":e(c)=="0"})},{default:t(()=>[g("\u53D1 \u8D27")]),_:1},8,["disabled","class"])])]),r($,{modelValue:e(m),"onUpdate:modelValue":a[9]||(a[9]=l=>S(m)?m.value=l:m=l),title:"\u4FEE\u6539\u5730\u5740",width:"90%"},{footer:t(()=>[k("div",T,[r(v,{onClick:a[8]||(a[8]=l=>S(m)?m.value=!1:m=!1)},{default:t(()=>[g("\u53D6\u6D88")]),_:1}),r(v,{type:"primary",onClick:X},{default:t(()=>[g(" \u786E\u8BA4 ")]),_:1})])]),default:t(()=>[A((n(),_(q,{ref:"formRef",model:e(s),"label-width":"80"},{default:t(()=>[r(f,{label:"\u6536\u4EF6\u4EBA",style:{border:"none"}},{default:t(()=>[r(b,{modelValue:e(s).receiverName,"onUpdate:modelValue":a[4]||(a[4]=l=>e(s).receiverName=l),placeholder:"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u540D\u79F0"},null,8,["modelValue"])]),_:1}),r(f,{label:"\u624B\u673A\u53F7",style:{border:"none"}},{default:t(()=>[r(b,{modelValue:e(s).receiverMobile,"onUpdate:modelValue":a[5]||(a[5]=l=>e(s).receiverMobile=l),placeholder:"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u624B\u673A\u53F7"},null,8,["modelValue"])]),_:1}),r(f,{label:"\u6240\u5728\u5730",style:{border:"none"}},{default:t(()=>[r(Z,{modelValue:e(s).receiverAreaId,"onUpdate:modelValue":a[6]||(a[6]=l=>e(s).receiverAreaId=l),data:e(R),props:e(je),"render-after-expand":!0},null,8,["modelValue","data","props"])]),_:1}),r(f,{label:"\u8BE6\u7EC6\u5730\u5740",style:{border:"none"}},{default:t(()=>[r(b,{modelValue:e(s).receiverDetailAddress,"onUpdate:modelValue":a[7]||(a[7]=l=>e(s).receiverDetailAddress=l),rows:3,placeholder:"\u8BF7\u8F93\u5165\u6536\u4EF6\u4EBA\u8BE6\u7EC6\u5730\u5740",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[x,e(d)]])]),_:1},8,["modelValue"])]),_:1})),[[x,e(d)]])}}}),[["__scopeId","data-v-4a1f7e13"]])});export{ea as __tla,z as default};
|