2025-03-20 10:46:42 +08:00

2 lines
4.8 KiB
JavaScript

import{L as I,M,N as j,O as q,B as K,C as O,w as Q,D as Z}from"./element-plus.2acb577d.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as G,b as H}from"./index.81df6f20.js";import{u as J}from"./usePaging.23706826.js";import{u as W}from"./useDictOptions.4fbfb4d7.js";import{e as X,a as Y}from"./supplier.62efcbb1.js";import"./lodash.6bfd3540.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_supplierEdit_lang.a705c15d.js";import{d as B,r as b,s as oe,Z as te,am as le,o as i,c as ae,U as o,L as l,u as t,R as p,M as f,K as m,a as g,i as ne,Q as se,n as y}from"./@vue.821a47ec.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./index.f292cd50.js";const ie={class:"mt-4"},ue={class:"flex mt-4 justify-end"},re=B({name:"supplierLists"}),Ge=B({...re,setup(pe){b(!1),b(null);const _=oe(),v=b(!1),u=te({mer_name:"",phone:""}),D=b([]),h=n=>{D.value=n.map(({id:e})=>e)},{dictData:V}=W("show_status"),{pager:d,getLists:w,resetParams:x,resetPage:$}=J({fetchFun:Y,params:u}),L=async()=>{var n;v.value=!0,await y(),(n=_.value)==null||n.open("add")},S=async n=>{var e,c;v.value=!0,await y(),(e=_.value)==null||e.open("edit"),(c=_.value)==null||c.setFormData(n)},F=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),w()};return w(),(n,e)=>{const c=K,k=O,r=Q,N=Z,E=I,P=H,s=M,R=j,T=z,C=le("perms"),U=q;return i(),ae("div",null,[o(E,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(N,{class:"mb-[-16px]",model:t(u),inline:""},{default:l(()=>[o(k,{label:"\u5546\u6237\u540D\u79F0",prop:"mer_name"},{default:l(()=>[o(c,{class:"w-[280px]",modelValue:t(u).mer_name,"onUpdate:modelValue":e[0]||(e[0]=a=>t(u).mer_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(k,{label:"\u5546\u6237\u7535\u8BDD",prop:"phone"},{default:l(()=>[o(c,{class:"w-[280px]",modelValue:t(u).phone,"onUpdate:modelValue":e[1]||(e[1]=a=>t(u).phone=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u6237\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),o(k,null,{default:l(()=>[o(r,{type:"primary",onClick:t($)},{default:l(()=>e[5]||(e[5]=[p("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(r,{onClick:t(x)},{default:l(()=>e[6]||(e[6]=[p("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),m(E,{class:"!border-none",shadow:"never"},{default:l(()=>[f((i(),m(r,{type:"primary",onClick:L},{icon:l(()=>[o(P,{name:"el-icon-Plus"})]),default:l(()=>[e[7]||(e[7]=p(" \u65B0\u589E "))]),_:1})),[[C,["supplier.supplier/add"]]]),f((i(),m(r,{disabled:!t(D).length,onClick:e[2]||(e[2]=a=>F(t(D)))},{default:l(()=>e[8]||(e[8]=[p(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[C,["supplier.supplier/delete"]]]),g("div",ie,[o(R,{data:t(d).lists,onSelectionChange:h},{default:l(()=>[o(s,{type:"selection",width:"55"}),o(s,{label:"id",prop:"id","show-overflow-tooltip":""}),o(s,{label:"\u5546\u6237\u540D\u79F0",prop:"mer_name","show-overflow-tooltip":""}),o(s,{label:"\u5546\u6237\u7535\u8BDD",prop:"phone","show-overflow-tooltip":""}),o(s,{label:"\u7ED3\u7B97\u5468\u671F",prop:"settle_cycle","show-overflow-tooltip":""}),o(s,{label:"\u5546\u6237\u5730\u5740",prop:"address","show-overflow-tooltip":""}),o(s,{label:"\u5546\u6237\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),o(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[f((i(),m(r,{type:"primary",link:"",onClick:A=>S(a)},{default:l(()=>e[9]||(e[9]=[p(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[C,["supplier.supplier/edit"]]]),f((i(),m(r,{type:"danger",link:"",onClick:A=>F(a.id)},{default:l(()=>e[10]||(e[10]=[p(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[C,["supplier.supplier/delete"]]])]),_:1})]),_:1},8,["data"])]),g("div",ue,[o(T,{modelValue:t(d),"onUpdate:modelValue":e[3]||(e[3]=a=>ne(d)?d.value=a:null),onChange:t(w)},null,8,["modelValue","onChange"])])]),_:1})),[[U,t(d).loading]]),t(v)?(i(),m(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":t(V),onSuccess:t(w),onClose:e[4]||(e[4]=a=>v.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{Ge as default};