import{d as U,g as P,h as H,j as J,E as C,l as m,o,a as r,x as l,y as i,Q as T,R as S,e as _,u as k,S as B,b as v,K as p,p as h,q as w,B as A,C as W,D as X,f as Y,_ as Z}from"./index.21f0b453.js";import{g as ee,a as ue,b as ae}from"./index.a8f83fcd.js";import le from"./TobeInvoicedDetail.614dd5d9.js";import te from"./ApplyDialog.a010d95f.js";import"./InvoiceHeaderDialog.67aefc22.js";import"./api.40f01e5e.js";import"./invoiceHeaderDialog.8935775b.js";const oe=D=>(W("data-v-6c3e1841"),D=D(),X(),D),ie={class:"tobeInvoiced"},ne={key:0,class:"form-table"},se={class:"fapiao-status-list"},re=["onClick"],pe={class:"total"},de={class:"total-value"},ce=oe(()=>_("span",{class:"total-line"},"\u4E28",-1)),fe={class:"total-value"},me={style:{"text-align":"center"}},Fe=["onClick"],ge={key:1,class:"table-operate",style:{margin:"0 10px"}},_e=["onClick"],ve={class:"footer"},be={key:1},ye={key:2},he=U({name:"targetData"}),we=U({...he,setup(D){const E=P(null),I=P(null),R={children:"childList",label:"name",value:"id",multiple:!1,emitPath:!1},e=H({showPage:1,list:[],limit:10,page:1,total:0,fapiaoTime:"\u5168\u90E8",sourceTime:"\u5168\u90E8",fapiaoStatus:"\u5168\u90E8",sourceType:0,sourceNo:"",writer:"",productInfo:"",categoryId:"",fapiaoNo:"",fapiaoTimeList:[{label:"\u5168\u90E8",value:""},{label:"\u4ECA\u5929",value:"today"},{label:"\u6628\u5929",value:"yesterday"},{label:"\u8FD17\u5929",value:"lately7"},{label:"\u8FD130\u5929",value:"lately30"},{label:"\u672C\u6708",value:"month"},{label:"\u672C\u5E74",value:"year"}],sourceTimeList:[{label:"\u5168\u90E8",value:""},{label:"\u4ECA\u5929",value:"today"},{label:"\u6628\u5929",value:"yesterday"},{label:"\u8FD17\u5929",value:"lately7"},{label:"\u8FD130\u5929",value:"lately30"},{label:"\u672C\u6708",value:"month"},{label:"\u672C\u5E74",value:"year"}],fapiaoStatusList:[{label:"\u5168\u90E8",value:""},{label:"\u672A\u7533\u8BF7",value:0},{label:"\u5F85\u5F00\u7968",value:2},{label:"\u5DF2\u5F00\u7968",value:1},{label:"\u62D2\u7EDD\u5F00\u7968",value:3}],sourceTypeList:[{label:"\u5546\u54C1\u8D2D\u4E70",value:0},{label:"\u5E73\u53F0\u670D\u52A1\u8D39",value:1},{label:"\u6E20\u9053\u670D\u52A1\u8D39",value:2},{label:"\u5206\u9500\u670D\u52A1\u8D39",value:3}],selectSourceNo:"",selectIds:"",categoryOptions:[],totalCount:"",totalPrice:"",showApplyDialog:!1});J(()=>{$(),d()});const d=()=>{let t=e.fapiaoTimeList.findIndex(s=>e.fapiaoTime===s.label),a=e.sourceTimeList.findIndex(s=>e.sourceTime===s.label),f=e.fapiaoStatusList.findIndex(s=>e.fapiaoStatus===s.label),c={fapiaoTime:e.fapiaoTimeList[t].value,sourceTime:e.sourceTimeList[a].value,fapiaoStatus:e.fapiaoStatusList[f].value,sourceType:e.sourceType,sourceNo:e.sourceNo,writer:e.writer,productInfo:e.productInfo,categoryId:e.categoryId,fapiaoNo:e.fapiaoNo};ee(c,e.page,e.limit).then(s=>{let{code:b,message:F,data:y}=s;if(b!==200){C.error(F);return}let{list:x,limit:n,page:V,total:L}=y;e.list=x,e.limit=n,e.page=V,e.total=L,j(c)})},j=t=>{ue(t).then(a=>{let{code:f,message:c,data:s}=a;if(f!==200){C.error(c);return}let{totalCount:b,totalPrice:F}=s;e.totalCount=b,e.totalPrice=F})},$=()=>{ae().then(t=>{let{code:a,message:f,data:c}=t;if(a!==200){C.error(f);return}e.categoryOptions=N(c)})},N=t=>{if(t.length>0)for(var a=0;a{e.sourceType=t,d()},z=t=>{t.sourceNo?(e.showApplyDialog=!0,A(()=>{E.value.openDialog(t.sourceNo,t.id)})):e.selectSourceNo?(e.showApplyDialog=!0,A(()=>{E.value.openDialog(e.selectSourceNo,e.selectIds)})):C.warning("\u8BF7\u5148\u9009\u62E9\u4F60\u8981\u5408\u5E76\u7684\u53D1\u7968!")},q=t=>{e.showPage=2,A(()=>{I.value.init(t)})},M=t=>t.fapiaoStatus===0||t.fapiaoStatus===3||!t.fapiaoStatus,K=t=>{let a=[],f=[];t.forEach(c=>{a.push(c.sourceNo),f.push(c.id)}),e.selectSourceNo=a.join(","),e.selectIds=f.join(",")},Q=t=>{e.page=1,e.limit=t,d()},G=t=>{e.page=t,d()};return(t,a)=>{const f=m("el-radio-button"),c=m("el-radio-group"),s=m("el-form-item"),b=m("el-form"),F=m("el-button"),y=m("el-input"),x=m("el-cascader"),n=m("el-table-column"),V=m("el-table"),L=m("el-pagination");return o(),r("div",ie,[e.showPage===1?(o(),r("div",ne,[l(b,{size:"default"},{default:i(()=>[l(s,{label:"\u5F00\u7968\u65F6\u95F4\uFF1A"},{default:i(()=>[l(c,{modelValue:e.fapiaoTime,"onUpdate:modelValue":a[0]||(a[0]=u=>e.fapiaoTime=u),size:"default",onChange:d},{default:i(()=>[(o(!0),r(T,null,S(e.fapiaoTimeList,(u,g)=>(o(),r("div",{key:"fapiaoTimeList"+g},[l(f,{label:u.label,value:u.value},null,8,["label","value"])]))),128))]),_:1},8,["modelValue"])]),_:1}),l(s,{label:"\u751F\u6210\u65F6\u95F4\uFF1A"},{default:i(()=>[l(c,{modelValue:e.sourceTime,"onUpdate:modelValue":a[1]||(a[1]=u=>e.sourceTime=u),size:"default",onChange:d},{default:i(()=>[(o(!0),r(T,null,S(e.sourceTimeList,(u,g)=>(o(),r("div",{key:"sourceTimeList"+g},[l(f,{label:u.label,value:u.value},null,8,["label","value"])]))),128))]),_:1},8,["modelValue"])]),_:1}),l(s,{label:"\u53D1\u7968\u72B6\u6001\uFF1A"},{default:i(()=>[l(c,{modelValue:e.fapiaoStatus,"onUpdate:modelValue":a[2]||(a[2]=u=>e.fapiaoStatus=u),size:"default",onChange:d},{default:i(()=>[(o(!0),r(T,null,S(e.fapiaoStatusList,(u,g)=>(o(),r("div",{key:"fapiaoStatusList"+g},[l(f,{label:u.label,value:u.value},null,8,["label","value"])]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1}),_("div",se,[(o(!0),r(T,null,S(e.sourceTypeList,(u,g)=>(o(),r("div",{class:"list",key:"sourceTypeList"+g},[_("div",{class:"label",onClick:De=>O(u.value)},w(u.label),9,re),_("div",{class:Y(e.sourceType===u.value?"line":"")},null,2)]))),128))]),l(b,{inline:!0,size:"default"},{default:i(()=>[l(s,{label:"\u5355\u53F7\uFF1A"},{default:i(()=>[l(y,{modelValue:e.sourceNo,"onUpdate:modelValue":a[3]||(a[3]=u=>e.sourceNo=u),placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7",style:{width:"210px"}},{append:i(()=>[l(F,{icon:k(B),onClick:d},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1}),l(s,{label:"\u5F00\u7968\u65B9\u540D\u79F0\uFF1A"},{default:i(()=>[l(y,{modelValue:e.writer,"onUpdate:modelValue":a[4]||(a[4]=u=>e.writer=u),placeholder:"\u8BF7\u8F93\u5165\u5F00\u7968\u65B9\u540D\u79F0",style:{width:"210px"}},{append:i(()=>[l(F,{icon:k(B),onClick:d},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1}),e.sourceType===0?(o(),v(s,{key:0,label:"\u5546\u54C1\u540D\u79F0\uFF1A"},{default:i(()=>[l(y,{modelValue:e.productInfo,"onUpdate:modelValue":a[5]||(a[5]=u=>e.productInfo=u),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",style:{width:"210px"}},{append:i(()=>[l(F,{icon:k(B),onClick:d},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1})):p("v-if",!0),e.sourceType===0?(o(),v(s,{key:1,label:"\u5546\u54C1\u7C7B\u578B\uFF1A"},{default:i(()=>[l(x,{modelValue:e.categoryId,"onUpdate:modelValue":a[6]||(a[6]=u=>e.categoryId=u),options:e.categoryOptions,props:R,filterable:"",clearable:"","show-all-levels":!1,style:{width:"210px"},onChange:d},null,8,["modelValue","options"])]),_:1})):p("v-if",!0),l(s,{label:"\u53D1\u7968\u53F7\uFF1A"},{default:i(()=>[l(y,{modelValue:e.fapiaoNo,"onUpdate:modelValue":a[7]||(a[7]=u=>e.fapiaoNo=u),placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u53F7",style:{width:"210px"}},{append:i(()=>[l(F,{icon:k(B),onClick:d},null,8,["icon"])]),_:1},8,["modelValue"])]),_:1}),l(s,null,{default:i(()=>[l(F,{class:"form-button",onClick:z},{default:i(()=>[h("\u5408\u5E76\u5F00\u7968")]),_:1})]),_:1})]),_:1}),_("div",pe,[h("\u53D1\u7968\u603B\u6570\uFF1A"),_("span",de,w(e.totalCount),1),h(),ce,h(" \u603B\u5F00\u7968\u91D1\u989D\uFF1A"),_("span",fe,w(e.totalPrice)+"\u5143",1)]),l(V,{data:e.list,onSelectionChange:K},{default:i(()=>[l(n,{type:"selection",selectable:M,align:"center",width:"60"}),l(n,{label:"\u5E8F\u53F7",type:"index",align:"center",width:"60"}),l(n,{label:"\u5355\u53F7",prop:"sourceNo",align:"center","min-width":"220"}),l(n,{label:"\u5F00\u7968\u65B9",prop:"writer",align:"center","min-width":"220"}),l(n,{label:"\u6536\u7968\u65B9",prop:"receiver",align:"center","min-width":"220"}),l(n,{label:"\u53D1\u7968\u53F7",prop:"fapiaoNo",align:"center","min-width":"180"}),l(n,{label:"\u7533\u8BF7\u5355\u53F7",prop:"applyNo",align:"center","min-width":"220"}),l(n,{label:"\u5546\u54C1\u540D\u79F0",prop:"productInfo",align:"center","min-width":"180"}),e.sourceType===0?(o(),v(n,{key:0,label:"\u4ED8\u6B3E\u65F6\u95F4",prop:"createTime",align:"center","min-width":"180"})):p("v-if",!0),e.sourceType===1||e.sourceType===2||e.sourceType===3?(o(),v(n,{key:1,label:"\u751F\u6210\u65F6\u95F4",prop:"sourceTime",align:"center","min-width":"180"})):p("v-if",!0),e.sourceType===0?(o(),v(n,{key:2,label:"\u6570\u91CF",prop:"quantity",align:"center","min-width":"120"})):p("v-if",!0),e.sourceType===0?(o(),v(n,{key:3,label:"\u5355\u4EF7",prop:"price",align:"center","min-width":"120"})):p("v-if",!0),e.sourceType===0||e.sourceType===1?(o(),v(n,{key:4,label:"\u91D1\u989D\uFF08\u5143\uFF09",prop:"amount",align:"center","min-width":"180"})):p("v-if",!0),e.sourceType===2||e.sourceType===3?(o(),v(n,{key:5,label:"\u603B\u91D1\u989D\uFF08\u5143\uFF09",prop:"amount",align:"center","min-width":"180"})):p("v-if",!0),l(n,{label:"\u5F00\u7968\u91D1\u989D\uFF08\u5143\uFF09",prop:"fapiaoAmount",align:"center","min-width":"180"}),l(n,{label:"\u5F00\u7968\u65F6\u95F4",prop:"writeTime",align:"center","min-width":"180"}),l(n,{label:"\u72B6\u6001",align:"center","min-width":"120"},{default:i(u=>[h(w(u.row.fapiaoStatus===0?"\u672A\u7533\u8BF7":u.row.fapiaoStatus===2?"\u5F85\u5F00\u7968":u.row.fapiaoStatus===1?"\u5DF2\u5F00\u7968":u.row.fapiaoStatus===3?"\u62D2\u7EDD\u5F00\u7968":""),1)]),_:1}),l(n,{label:"\u53D1\u7968\u7C7B\u578B",align:"center","min-width":"180"},{default:i(u=>[h(w(u.row.fapiaoType===0?"\u666E\u901A\u53D1\u7968":u.row.fapiaoType===1?"\u4E13\u7528\u53D1\u7968":""),1)]),_:1}),l(n,{label:"\u64CD\u4F5C",fixed:"right",align:"center",width:"180px"},{default:i(u=>[_("div",me,[u.row.fapiaoStatus===0||!u.row.fapiaoStatus?(o(),r("span",{key:0,class:"table-operate cursor",onClick:g=>z(u.row)},"\u7533\u8BF7\u5F00\u7968",8,Fe)):p("v-if",!0),(u.row.fapiaoStatus===0||!u.row.fapiaoStatus)&&u.row.fapiaoStatus!==0&&u.row.fapiaoStatus?(o(),r("span",ge,"|")):p("v-if",!0),u.row.fapiaoStatus!==0&&u.row.fapiaoStatus?(o(),r("span",{key:2,class:"table-operate cursor",onClick:g=>q(u.row)},"\u8BE6\u60C5",8,_e)):p("v-if",!0)])]),_:1})]),_:1},8,["data"]),_("div",ve,[l(L,{class:"page-container","current-page":e.page,"onUpdate:current-page":a[8]||(a[8]=u=>e.page=u),"page-size":e.limit,"onUpdate:page-size":a[9]||(a[9]=u=>e.limit=u),"page-sizes":[10,25,50],background:"",layout:"total, sizes, prev, pager, next, jumper",total:e.total,onSizeChange:Q,onCurrentChange:G},null,8,["current-page","page-size","total"])])])):p("v-if",!0),e.showPage===2?(o(),r("div",be,[l(le,{ref_key:"tdRef",ref:I,onBack:a[10]||(a[10]=u=>e.showPage=1)},null,512)])):p("v-if",!0),e.showApplyDialog?(o(),r("div",ye,[l(te,{ref_key:"adRef",ref:E,onRefreshList:d,onCancel:a[11]||(a[11]=u=>e.showApplyDialog=!1)},null,512)])):p("v-if",!0)])}}});const Ve=Z(we,[["__scopeId","data-v-6c3e1841"],["__file","/data/jenkins/workspace/pay.ws.baibaodun.com.cn/src/views/tobeInvoiced/index.vue"]]);export{Ve as default};