import{C as q,D as K,w as O,F as Q,L as Z,M as z,N as G,O as H}from"./element-plus.91c68cc0.js";import{_ as J}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as X,b as Y}from"./index.27d7bb66.js";import{u as ee}from"./usePaging.f8c888e4.js";import{u as oe}from"./useDictOptions.9fa317eb.js";import{e as te,a as le}from"./supplier.0059fef8.js";import{d as $,r as D,s as ae,Z as ne,ap as ie,o as p,c as ue,U as o,L as t,u as a,R as r,M as f,K as c,a as V,S as x,j as se,Q as re,n as F}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{_ as pe}from"./edit.vue_vue_type_script_setup_true_name_supplierEdit_lang.877602d7.js";import{_ as me}from"./warehouseProduct.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.e0613d1a.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.e9fb0fda.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./warehouse_product.7bdd08e5.js";const de={class:"mt-4"},ce={class:"flex mt-4 justify-end"},_e=$({name:"supplierLists"}),no=$({..._e,setup(fe){const P=D(!1),b=D(null),v=ae(),w=D(!1),m=ne({mer_name:"",phone:""}),h=D([]),S=n=>{h.value=n.map(({id:e})=>e)},g=async(n,e=1)=>{var u,d;P.value=!0,await F(),(u=b.value)==null||u.open(),(d=b.value)==null||d.getDetail(n,e)},{dictData:R}=oe("show_status"),{pager:_,getLists:C,resetParams:L,resetPage:N}=ee({fetchFun:le,params:m}),T=async()=>{var n;w.value=!0,await F(),(n=v.value)==null||n.open("add")},U=async n=>{var e,u;w.value=!0,await F(),(e=v.value)==null||e.open("edit"),(u=v.value)==null||u.setFormData(n)},E=async n=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:n}),C()};return C(),(n,e)=>{const u=q,d=K,s=O,A=Q,B=Z,j=Y,i=z,I=G,M=J,k=ie("perms"),W=H;return p(),ue("div",null,[o(B,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[o(A,{class:"mb-[-16px]",model:a(m),inline:""},{default:t(()=>[o(d,{label:"\u5546\u6237\u540D\u79F0",prop:"mer_name"},{default:t(()=>[o(u,{class:"w-[280px]",modelValue:a(m).mer_name,"onUpdate:modelValue":e[0]||(e[0]=l=>a(m).mer_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(d,{label:"\u5546\u6237\u7535\u8BDD",prop:"phone"},{default:t(()=>[o(u,{class:"w-[280px]",modelValue:a(m).phone,"onUpdate:modelValue":e[1]||(e[1]=l=>a(m).phone=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),o(d,null,{default:t(()=>[o(s,{type:"primary",onClick:a(N)},{default:t(()=>e[5]||(e[5]=[r("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(s,{onClick:a(L)},{default:t(()=>e[6]||(e[6]=[r("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((p(),c(B,{class:"!border-none",shadow:"never"},{default:t(()=>[f((p(),c(s,{type:"primary",onClick:T},{icon:t(()=>[o(j,{name:"el-icon-Plus"})]),default:t(()=>[e[7]||(e[7]=r(" \u65B0\u589E "))]),_:1})),[[k,["supplier.supplier/add"]]]),f((p(),c(s,{disabled:!a(h).length,onClick:e[2]||(e[2]=l=>E(a(h)))},{default:t(()=>e[8]||(e[8]=[r(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[k,["supplier.supplier/delete"]]]),V("div",de,[o(I,{data:a(_).lists,onSelectionChange:S},{default:t(()=>[o(i,{type:"selection",width:"55"}),o(i,{label:"id",prop:"id","show-overflow-tooltip":""}),o(i,{label:"\u5546\u6237\u540D\u79F0",prop:"mer_name","show-overflow-tooltip":""}),o(i,{label:"\u5546\u6237\u7535\u8BDD",prop:"phone","show-overflow-tooltip":""}),o(i,{label:"\u7ED3\u7B97\u5468\u671F",prop:"settle_cycle","show-overflow-tooltip":""}),o(i,{label:"\u5546\u6237\u5730\u5740",prop:"address","show-overflow-tooltip":""}),o(i,{label:"\u5546\u6237\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),o(i,{label:"\u5DF2\u7ED3",prop:"total_completed_amount","min-width":"100","show-overflow-tooltip":""},{default:t(({row:l})=>[o(s,{type:"primary",link:"",onClick:y=>g(l,1)},{default:t(()=>[r(x(l.total_completed_amount||0),1)]),_:2},1032,["onClick"])]),_:1}),o(i,{label:"\u672A\u7ED3",prop:"total_outstanding_amount","min-width":"100","show-overflow-tooltip":""},{default:t(({row:l})=>[o(s,{type:"primary",link:"",onClick:y=>g(l,0)},{default:t(()=>[r(x(l.total_outstanding_amount||0),1)]),_:2},1032,["onClick"])]),_:1}),o(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:l})=>[f((p(),c(s,{type:"primary",link:"",onClick:y=>U(l)},{default:t(()=>e[9]||(e[9]=[r(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[k,["supplier.supplier/edit"]]]),f((p(),c(s,{type:"danger",link:"",onClick:y=>E(l.id)},{default:t(()=>e[10]||(e[10]=[r(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[k,["supplier.supplier/delete"]]])]),_:1})]),_:1},8,["data"])]),V("div",ce,[o(M,{modelValue:a(_),"onUpdate:modelValue":e[3]||(e[3]=l=>se(_)?_.value=l:null),onChange:a(C)},null,8,["modelValue","onChange"])])]),_:1})),[[W,a(_).loading]]),a(w)?(p(),c(pe,{key:0,ref_key:"editRef",ref:v,"dict-data":a(R),onSuccess:a(C),onClose:e[4]||(e[4]=l=>w.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0),o(me,{ref_key:"warehouseProductRef",ref:b},null,512)])}}});export{no as default};