drawr.f6c50eaf.js 3.5 KB

1
  1. import{u as E,f as $,r as m,g as o,o as n,h as u,i as p,w as v,m as e,k as i,t as c,l as A,z as B,B as O,j as S,N as d,X as U}from"./vendor.0bc3c1d4.js";import{a as L}from"./applyPurchase.ecdebd68.js";import{a1 as I,ah as T,P as b}from"./index.d15345ba.js";const q={style:{position:"absolute",top:"45px",left:"16px","font-size":"16px"}},F=d("\u7533\u8D2D\u5217\u8868"),M={key:0},W={class:"padding-sm",style:{position:"absolute",top:"60px",left:"0",width:"100%"}},X={key:0},G={border:"1",cellspacing:"0",style:{"text-align":"center"}},H=e("colgroup",{width:"30"},null,-1),J=e("colgroup",{width:"90"},null,-1),K=e("colgroup",{width:"90"},null,-1),Q=e("colgroup",{width:"90"},null,-1),R=e("colgroup",{width:"120"},null,-1),Y=e("colgroup",{width:"90"},null,-1),Z=e("thead",null,[e("tr",null,[e("th",null,"\u5E8F\u53F7"),e("th",null,"IMPA"),e("th",null,"\u63CF\u8FF0"),e("th",null,"\u89C4\u683C"),e("th",null,"\u7533\u8D2D\u6570\u91CF"),e("th",null,"\u64CD\u4F5C")])],-1),ee={class:"text-xs"},te={class:"text-red"},ae=d("\u5220\u9664"),se={class:"flex justify-end margin-top"},le=d("\u6E05 \u7A7A"),oe=e("div",{class:"margin-left-sm"},null,-1),ne=d("\u63D0 \u4EA4"),re={setup(pe,{expose:w}){const{proxy:y}=U(),h=E(),g=$(()=>{let s=0;return Object.values(h.state.data.applyPurchaseDetails).map(a=>{s+=a.applyPurchaseNum}),h.state.data.applyPurchaseDetailsCustomList.map(a=>{s+=a.applyPurchaseNum}),s}),l=m({applyPurchaseExplain:""}),r=m(!1);m(1);function k(){l.value.applyPurchaseExplain="",r.value=!0}function f(){r.value=!1}function C(){if(!l.value.applyPurchaseExplain.length){y.$modal.msgWarning("\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}l.value.applyPurchaseDetailsList=Object.values(h.state.data.applyPurchaseDetails),L(l.value).then(s=>{y.$modal.msgSuccess("\u65B0\u589E\u6210\u529F"),f(),b(!1)})}return w({show:k,handleClose:f}),(s,a)=>{const D=o("van-field"),V=o("van-stepper"),j=o("van-icon"),P=o("van-button"),N=o("van-empty"),z=o("van-popup");return n(),u("div",null,[p(z,{show:r.value,"onUpdate:show":a[1]||(a[1]=t=>r.value=t),position:"right",closeable:!0,style:{width:"100vw",height:"100vh","padding-top":"60px"}},{default:v(()=>[e("div",null,[e("div",q,[F,i(g)!=0?(n(),u("span",M,"("+c(i(g))+")",1)):A("",!0)]),e("div",W,[p(D,{"label-width":"70",rows:"4",modelValue:l.value.applyPurchaseExplain,"onUpdate:modelValue":a[0]||(a[0]=t=>l.value.applyPurchaseExplain=t),required:"",autosize:"",label:"\u7533\u8D2D\u8BF4\u660E",type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u7533\u8D2D\u8BF4\u660E"},null,8,["modelValue"]),Object.keys(s.$store.state.data.applyPurchaseDetails).length>0?(n(),u("div",X,[e("table",G,[H,J,K,Q,R,Y,Z,e("tbody",ee,[(n(!0),u(B,null,O(Object.values(s.$store.state.data.applyPurchaseDetails),(t,x)=>(n(),u("tr",{key:x},[e("td",null,c(x+1),1),e("td",null,c(t.impa),1),e("td",null,c(t.description),1),e("td",null,c(t.specifications),1),e("td",null,[p(V,{integer:!0,"button-size":"18px",modelValue:t.applyPurchaseNum,"onUpdate:modelValue":_=>t.applyPurchaseNum=_,onChange:_=>i(I)(t)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),e("td",te,[p(j,{name:"delete-o",onClick:_=>i(T)(t)},null,8,["onClick"]),ae])]))),128))])]),e("div",se,[p(P,{size:"small",type:"warning",onClick:i(b)},{default:v(()=>[le]),_:1},8,["onClick"]),oe,p(P,{size:"small",type:"primary",onClick:C},{default:v(()=>[ne]),_:1})])])):(n(),S(N,{key:1,image:"https://fastly.jsdelivr.net/npm/@vant/assets/custom-empty-image.png","image-size":"80",description:"\u8FD9\u91CC\u4EC0\u4E48\u90FD\u6CA1\u6709!"}))])])]),_:1},8,["show"])])}}};export{re as default};