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