2 lines
8.0 KiB
JavaScript
2 lines
8.0 KiB
JavaScript
import{a0 as X,a1 as h,L as ee,M as le,J as te,N as ue,Q as ae,w as ne,B as oe,C as ie}from"./element-plus.2acb577d.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.61cb6e34.js";import{P as me}from"./index.f292cd50.js";import{e as de,f as U,g as re}from"./oa_financial.d5633b25.js";import{d as I,s as pe,r as C,Z as _,o as c,c as fe,U as t,L as e,R as n,S as m,u as a,a as L,K as D,Q as v,i as Y}from"./@vue.821a47ec.js";import{d as _e}from"./index.81df6f20.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.6bfd3540.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const ce={class:"detail-popup"},be={class:"mt-4 mb-4"},De={style:{float:"right"}},ve=I({name:"customdetail"}),ge=I({...ve,emits:["success","close"],setup(Fe,{expose:z,emit:$}){const k=pe(),F=$,b=C(""),f=C(!1),M=_([0,1]),N=_([0,1]),R=_([1]),P=_([0]),S=_([1,2]),u=_({id:0,extends:{}}),T=async o=>{for(const l in o)o[l]!=null&&o[l]!=null&&(u[l]=o[l]);Q()},q=()=>{var o;(o=k.value)==null||o.open()},d=C([{amount:"",enter_time:"",remarks:""}]),Q=async()=>{let o=await await de({invoice_id:u.id});d.value=o||[{}]},B=()=>{d.value.push({amount:"",enter_time:"",remarks:""})},j=o=>{d.value.splice(o,1)},J=async()=>{d.value.length&&await U({invoice_id:u.id,detail:d.value}),F("success")},K=()=>{d.value=[{amount:"",enter_time:"",remarks:""}]},Z=async()=>{let o={invoice_id:u.id,detail:[{amount:u.amount,enter_time:b.value,remarks:""}]};u.is_cash==1&&(d.value.push({amount:+u.amount-+u.enter_amount,enter_time:b.value,remarks:""}),o.detail=d.value),await U({...o}),F("success")},G=async()=>{await re({invoice_id:u.id}),F("success")},H=o=>{if(+d.value[o].amount<0)return d.value[o].amount="";d.value[o].amount=(+d.value[o].amount).toFixed(2)};return z({open:q,setFormData:T}),(o,l)=>{const i=X,y=h,V=ee,r=ne,x=oe,g=le,A=te,O=ue,w=ie,W=ae;return c(),fe("div",ce,[t(me,{ref_key:"popupRef",ref:k,showFootBtn:!1,title:"\u5230\u8D26\u8BE6\u60C5",async:!0,width:"60vw"},{default:e(()=>[t(V,null,{header:e(()=>l[5]||(l[5]=[n("\u53D1\u7968\u4FE1\u606F")])),default:e(()=>[t(y,{column:3,border:""},{default:e(()=>[t(i,{label:"\u53D1\u7968\u91D1\u989D","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).amount),1)]),_:1}),t(i,{label:"\u62AC\u5934\u7C7B\u578B","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).type_text),1)]),_:1}),t(i,{label:"\u53D1\u7968\u4E3B\u4F53","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_subject),1)]),_:1}),t(i,{label:"\u53D1\u7968\u7C7B\u578B","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_type_text),1)]),_:1}),t(i,{label:"\u5F00\u7968\u62AC\u5934","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_title),1)]),_:1}),t(i,{label:"\u7535\u8BDD\u53F7\u7801","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_phone),1)]),_:1}),t(i,{label:"\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_tax),1)]),_:1}),t(i,{label:"\u5F00\u6237\u94F6\u884C","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_bank),1)]),_:1}),t(i,{label:"\u94F6\u884C\u8D26\u53F7","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_account),1)]),_:1}),t(i,{label:"\u94F6\u884C\u8425\u4E1A\u7F51\u70B9","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_banking),1)]),_:1}),t(i,{label:"\u5730\u5740","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).invoice_address),1)]),_:1}),t(i,{label:"\u5F00\u7968\u4EBA","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).open_admin_name),1)]),_:1}),t(i,{label:"\u5907\u6CE8","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).remark),1)]),_:1}),t(i,{label:"\u9644\u4EF6","label-align":"left",align:"left"},{default:e(()=>[t(se,{annex:a(u).annex||[]},null,8,["annex"])]),_:1})]),_:1})]),_:1}),t(V,null,{header:e(()=>l[6]||(l[6]=[n(" \u5230\u8D26\u4FE1\u606F ")])),default:e(()=>[t(y,{column:3,border:""},{default:e(()=>[t(i,{label:"\u5230\u8D26\u72B6\u6001","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).is_cash_text),1)]),_:1}),t(i,{label:"\u672A\u5230\u8D26\u91D1\u989D(\u5143)","label-align":"left",align:"left"},{default:e(()=>[n(m(+a(u).amount-+a(u).enter_amount),1)]),_:1}),t(i,{label:"\u5DF2\u5230\u8D26\u91D1\u989D(\u5143)","label-align":"left",align:"left"},{default:e(()=>[n(m(a(u).enter_amount),1)]),_:1})]),_:1}),t(O,{data:a(d),class:"mt-4"},{empty:e(()=>[l[8]||(l[8]=n(" \u6682\u65E0\u66F4\u591A\u5230\u8D26\u8BB0\u5F55\uFF0C\u70B9\u51FB ")),t(r,{onClick:B},{default:e(()=>l[7]||(l[7]=[n("\u6DFB\u52A0")])),_:1})]),default:e(()=>[t(g,{label:"\u5230\u8D26\u91D1\u989D"},{default:e(({row:s,$index:p})=>[t(x,{modelValue:s.amount,"onUpdate:modelValue":E=>s.amount=E,clearable:"",placeholder:"\u8BF7\u8F93\u5165\u62A5\u9500\u91D1\u989D",type:"number",onChange:E=>H(p)},null,8,["modelValue","onUpdate:modelValue","onChange"])]),_:1}),t(g,{label:"\u5230\u8D26\u65E5\u671F"},{default:e(({row:s})=>[t(A,{class:"flex-1 !flex",modelValue:s.enter_time,"onUpdate:modelValue":p=>s.enter_time=p,clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u5230\u8D26\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(g,{label:"\u5907\u6CE8\u4FE1\u606F"},{default:e(({row:s})=>[t(x,{modelValue:s.remarks,"onUpdate:modelValue":p=>s.remarks=p,clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(g,{label:"\u64CD\u4F5C",prop:"lead_admin_name"},{default:e(({row:s,$index:p})=>[t(r,{onClick:E=>j(p)},{default:e(()=>l[9]||(l[9]=[n("\u5220\u9664")])),_:2},1032,["onClick"]),t(r,{type:"primary",onClick:B},{default:e(()=>l[10]||(l[10]=[n("\u6DFB\u52A0\u9009\u9879")])),_:1})]),_:1})]),_:1},8,["data"]),L("div",be,[L("span",De,[a(M).includes(a(u).is_cash)?(c(),D(r,{key:0,type:"primary",onClick:J},{default:e(()=>l[11]||(l[11]=[n("\u4FDD\u5B58\u5230\u8D26\u8BB0\u5F55")])),_:1})):v("",!0),a(N).includes(a(u).is_cash)?(c(),D(r,{key:1,onClick:K},{default:e(()=>l[12]||(l[12]=[n("\u91CD\u7F6E")])),_:1})):v("",!0),a(R).includes(a(u).is_cash)?(c(),D(r,{key:2,onClick:l[0]||(l[0]=s=>f.value=!0)},{default:e(()=>l[13]||(l[13]=[n("\u5269\u4F59\u90E8\u5206\u5168\u5230\u8D26")])),_:1})):v("",!0),a(P).includes(a(u).is_cash)?(c(),D(r,{key:3,onClick:l[1]||(l[1]=s=>f.value=!0)},{default:e(()=>l[14]||(l[14]=[n("\u5168\u90E8\u5230\u8D26")])),_:1})):v("",!0),a(S).includes(a(u).is_cash)?(c(),D(r,{key:4,onClick:G},{default:e(()=>l[15]||(l[15]=[n("\u5168\u90E8\u53CD\u5230\u8D26")])),_:1})):v("",!0)])])]),_:1}),t(W,{title:"\u9009\u62E9\u5230\u8D26\u65E5\u671F",modelValue:a(f),"onUpdate:modelValue":l[4]||(l[4]=s=>Y(f)?f.value=s:null),width:"550px"},{default:e(()=>[t(w,{label:"\u5230\u8D26\u65E5\u671F",prop:"invoice_phone"},{default:e(()=>[t(A,{class:"flex-1 !flex",modelValue:a(b),"onUpdate:modelValue":l[2]||(l[2]=s=>Y(b)?b.value=s:null),clearable:"",type:"date","value-format":"YYYY-MM-DD",placeholder:"\u9009\u62E9\u5230\u8D26\u65E5\u671F"},null,8,["modelValue"])]),_:1}),t(w,{label:"",prop:"invoice_phone"},{default:e(()=>[t(r,{type:"primary",onClick:Z},{default:e(()=>l[16]||(l[16]=[n("\u786E\u5B9A")])),_:1}),t(r,{onClick:l[3]||(l[3]=s=>f.value=!1)},{default:e(()=>l[17]||(l[17]=[n("\u53D6\u6D88")])),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},512)])}}});const ll=_e(ge,[["__scopeId","data-v-eb630271"]]);export{ll as default};
|