import{_ as b,d as q,O as j,cc as V,di as O,cm as E,n as C,dL as U,r as f,aw as G,o as v,A as h,y as c,B as I,c as L,h as d,H as _,e as y,i,dF as H,eq as P,a as N,er as z}from"./index.js";import J from"./search-batch-main.d15c05.js";import K from"./search-batch.466ca4.js";import"./columns.88d7303.js";import"./content.config.5ec63a87.js";import"./index.904472d8.js";const Q={class:"flex my-[10px]"},W={class:"w-full mt-[10px] flex justify-end"},X=q({__name:"index",emits:["reload","save-btn-click"],setup(Y,{expose:R,emit:A}){const T=A,{currentCompany:D}=j(),t=V(3),n=V(!1),F=O({success(){E.success("\u6DFB\u52A0\u6210\u529F"),n.value=!1,T("reload")}}),x=C(null),w=C(null),o=C(""),p=U({companyNo:"",platform_type:""});async function S(r,e){n.value=!0,p.companyNo=D.value.companyNo,p.platform_type=""}async function B(r){if(!o.value){E.warning("\u8BF7\u9009\u62E9\u5F00\u7968\u6807\u7B7E");return}let e=[],a=[];if(r)e=r.sourceSequenceNos,a=r.selected;else{const s=await(t.value===2?w:x).value.getResponse();e=s.sourceSequenceNos,a=s.selected}if(e.length!==a.length){const u=t.value===3,s=a.map(m=>u?m.cxCode:m.sequenceNo),l=e.filter(m=>!s.includes(m));E.warning('\u672A\u627E\u5230\u8BA2\u5355:"'+l.join("\u3001"));return}const g={idArr:a.map(({id:u})=>u),tag_id:o.value};F.run(z(g))}function M(){n.value=!1,o.value=""}return R({show:S}),(r,e)=>{const a=f("ElRadio"),k=f("ElRadioGroup"),g=f("ElButton"),u=f("el-dialog"),s=G("loading");return v(),h(u,{top:"5vh",center:"",modelValue:n.value,"onUpdate:modelValue":e[2]||(e[2]=l=>n.value=l),"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":"","destroy-on-close":"",title:"C\u7AEF\u8BA2\u5355\u6279\u91CF\u6DFB\u52A0\u5F00\u7968\u6807\u7B7E",width:"1040px",onClose:M},{default:c(()=>[I((v(),L("div",null,[d(k,{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=l=>t.value=l)},{default:c(()=>[d(a,{label:3},{default:c(()=>e[3]||(e[3]=[_("\u6279\u91CF\u67E5\u627E(\u9500\u552E\u8BA2\u5355\u4E3B\u7F16\u53F7)")])),_:1}),d(a,{label:2},{default:c(()=>e[4]||(e[4]=[_("\u6279\u91CF\u67E5\u627E(\u9500\u552E\u8BA2\u5355\u7F16\u53F7)")])),_:1})]),_:1},8,["modelValue"]),y("div",Q,[y("p",null,[e[5]||(e[5]=y("span",{style:{color:"red"}},"*",-1)),e[6]||(e[6]=_(" \u5F00\u7968\u6807\u7B7E: ")),d(i(H),{modelValue:o.value,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value=l),api:i(P),"request-prop":"tag_name","response-label-prop":"tag_name","response-val-prop":"id","pro-data":()=>({type:"4"}),placeholder:"\u5F00\u7968\u6807\u7B7E"},null,8,["modelValue","api"])])]),t.value===2?(v(),h(K,{key:0,noTag:o.value=="",ref_key:"searchBatchRef",ref:w,payload:i(p),onConfirm:B},null,8,["noTag","payload"])):N("v-if",!0),t.value===3?(v(),h(J,{key:1,noTag:o.value=="",ref_key:"searchBatchMainRef",ref:x,payload:i(p),onConfirm:B},null,8,["noTag","payload"])):N("v-if",!0),y("div",W,[d(g,{type:"primary",onClick:B},{default:c(()=>e[7]||(e[7]=[_("\u4FDD\u5B58")])),_:1})])])),[[s,i(F).loading]])]),_:1},8,["modelValue"])}}});var te=b(X,[["__scopeId","data-v-08a21a88"],["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/sheetOrderPool/components/ClientCTagDialog/index.vue"]]);export{te as default};
