import{u as V}from"./index-BRMw-K5a.js";import{f as B,s as h,a as b}from"./index-Cw8XSEQG.js";import{d as D,A as I,H as O,r as x,J as U,c as _,b as t,u as a,N as $,w as s,K as F,B as m,i as L,D as M,q as g,v as R,y as k,o as C,M as i,I as z,s as A,O as E,h as v,t as G,g as H,l as J,x as K}from"./index-D2DB8E0Q.js";import"./baseUrl-BJird1N8.js";const P={class:"flex flex-col"},j={key:0,class:"fixed bottom-0 left-0 flex w-full my-[10px] bg-[#ffff]"},Q={class:"flex"},ae=D({__name:"seek-detail",setup(W){const r=I(),N=O(),y=[{value:"",label:"全部"},{value:"-1",label:"未到审核节点",type:"warning"},{value:"0",label:"待财务审核",type:"warning"},{value:"1",label:"财务审核后通过",type:"success"},{value:"2",label:"财务审核后驳回",type:"danger"},{value:"3",label:"无需审核",type:"primary"}],l=x({}),d=x(""),o=x(!1);async function p(){g({message:"加载中...",forbidClick:!0});const{code:n,data:e}=await B({bidNo:r.query.id});R(),n==0&&(l.value=e)}async function q(){if(d.value.trim().length===0){o.value=!0,K("请输入驳回原因!");return}g({message:"审核中...",forbidClick:!0});const{code:n}=await b({status:"2",out_tax:"",out_tax_id:"",remark:d.value,bidNo:r.query.id,goodCombind:[]});n==0&&(k("审核成功"),o.value=!1,p())}function S(){h({title:"提示",message:"是否确认通过?"}).then(async()=>{g({message:"审核中...",forbidClick:!0});const{code:n}=await b({status:"1",out_tax:l.value.tax+"%",out_tax_id:l.value.in_info.id,remark:"",bidNo:r.query.id,goodCombind:[]});n==0&&(k("审核成功"),o.value=!1,p())})}return U(p),V("商品列表"),(n,e)=>(C(),_("div",P,[t(a($),{title:"咨询商品详情","left-arrow":"",onClick:e[0]||(e[0]=u=>a(N).push("/home?path=seek"+(a(r).query.status?"&status="+a(r).query.status:"")))}),t(a(F),null,{default:s(()=>{var u,w;return[t(a(i),{title:"商品图片"},{value:s(()=>[t(a(z),{style:{height:"25px",width:"25px"},src:l.value.good_img&&l.value.good_img[0],onClick:e[1]||(e[1]=()=>a(A)(l.value.good_img))},null,8,["src"])]),_:1}),t(a(i),{title:"商品名称",value:l.value.good_name},null,8,["value"]),t(a(i),{title:"商品编码",value:l.value.spuCode},null,8,["value"]),t(a(i),{title:"状态"},{default:s(()=>{var c;return[t(a(E),{class:"mb-[5px]",size:"large",name:l.value.value,type:(c=y.find(({value:f})=>l.value.tax_status==f))==null?void 0:c.type},{default:s(()=>{var f;return[v(G(((f=y.find(({value:T})=>l.value.tax_status==T))==null?void 0:f.label)||"--"),1)]}),_:1},8,["name","type"])]}),_:1}),t(a(i),{title:"进项类目编号",value:(u=l.value.in_info)==null?void 0:u.merge_code},null,8,["value"]),t(a(i),{title:"进项类目名称",value:(w=l.value.in_info)==null?void 0:w.cat_name},null,8,["value"]),t(a(i),{title:"进项税率",value:l.value.tax+"%"},null,8,["value"])]}),_:1}),l.value.tax_status=="0"&&l.value.spuCode.indexOf("SSU")===-1?(C(),_("div",j,[t(a(m),{class:"flex-1 mx-[10px]",type:"warning",plain:"",onClick:e[2]||(e[2]=u=>o.value=!0)},{default:s(()=>e[6]||(e[6]=[v("审核不通过")])),_:1}),t(a(m),{class:"flex-1 mx-[10px]",type:"warning",onClick:S},{default:s(()=>e[7]||(e[7]=[v("审核通过")])),_:1})])):L("",!0),t(a(M),{show:o.value,"onUpdate:show":e[5]||(e[5]=u=>o.value=u),title:"驳回原因"},{footer:s(()=>[H("div",Q,[t(a(m),{class:"flex-1",onClick:e[4]||(e[4]=u=>{o.value=!1,d.value=""})},{default:s(()=>e[8]||(e[8]=[v("取消")])),_:1}),t(a(m),{class:"flex-1",type:"warning",onClick:q},{default:s(()=>e[9]||(e[9]=[v("保存")])),_:1})])]),default:s(()=>[t(a(J),{modelValue:d.value,"onUpdate:modelValue":e[3]||(e[3]=u=>d.value=u),placeholder:"驳回原因",type:"textarea",rows:"3"},null,8,["modelValue"])]),_:1},8,["show"])]))}});export{ae as default};
