BusinessListModal-47d87728.js 4.6 KB

1
  1. import{d as T,r as o,e as j,u as J,Q as W,o as y,v as h,w as a,f as e,m as u,a as l,R as X,x as V,t as Y,O as Z,V as $,A as ee,n as ae,C as te,D as le,G as re,H as se,I as oe,_ as _e,__tla as ne}from"./index-430b3151.js";import{_ as ie,__tla as ue}from"./Dialog-cd42c639.js";import{_ as me,__tla as ce}from"./index-c425c88f.js";import{E as pe,__tla as fe}from"./el-link-2b1921de.js";import{_ as de,__tla as ye}from"./ContentWrap-60842994.js";import{a as he,__tla as ge}from"./index-5193f2d1.js";import ve,{__tla as be}from"./BusinessForm-76bbfee8.js";import{f as we,__tla as xe}from"./formatter-32d3d5ad.js";import{u as ke,__tla as Ce}from"./useMessage-d226ba89.js";import{__tla as Ne}from"./index-555139e7.js";import{__tla as Ve}from"./el-card-dee5b36b.js";import{__tla as Re}from"./DictTag-c94c3188.js";import"./color-6e929987.js";import{__tla as Se}from"./dict-603b6a58.js";import{__tla as ze}from"./index-cc8585fc.js";import{__tla as Ie}from"./index-7f122f86.js";let R,Be=Promise.all([(()=>{try{return ne}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return ce}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ye}catch{}})(),(()=>{try{return ge}catch{}})(),(()=>{try{return be}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ie}catch{}})()]).then(async()=>{R=_e(T({name:"BusinessListModal",__name:"BusinessListModal",props:{customerId:{type:Number,required:!0}},emits:["success"],setup(S,{expose:z,emit:I}){const B=ke(),D=S,_=o(!1),p=o(!0),g=o(0),v=o([]),b=o(),M=o(!1),s=j({pageNo:1,pageSize:10,name:void 0,customerId:D.customerId});z({open:async()=>{_.value=!0,await c()}});const c=async()=>{p.value=!0;try{const n=await he(s);v.value=n.list,g.value=n.total}finally{p.value=!1}},f=()=>{s.pageNo=1,c()},U=()=>{b.value.resetFields(),f()},w=o(),L=I,x=o(),P=async()=>{const n=x.value.getSelectionRows().map(t=>t.id);if(n.length===0)return B.error("\u672A\u9009\u62E9\u5546\u673A");_.value=!1,L("success",n)},{push:q}=J();return(n,t)=>{const F=$,k=ee,d=ae,m=te,H=le,C=de,i=re,A=pe,E=se,G=me,K=ie,O=W("hasPermi"),Q=oe;return y(),h(K,{title:"\u5173\u8054\u5546\u673A",modelValue:l(_),"onUpdate:modelValue":t[5]||(t[5]=r=>Z(_)?_.value=r:null)},{footer:a(()=>[e(m,{onClick:P,type:"primary",disabled:l(M)},{default:a(()=>[u("\u786E \u5B9A")]),_:1},8,["disabled"]),e(m,{onClick:t[4]||(t[4]=r=>_.value=!1)},{default:a(()=>[u("\u53D6 \u6D88")]),_:1})]),default:a(()=>[e(C,null,{default:a(()=>[e(H,{class:"-mb-15px",model:l(s),ref_key:"queryFormRef",ref:b,inline:!0,"label-width":"68px"},{default:a(()=>[e(k,{label:"\u5546\u673A\u540D\u79F0",prop:"name"},{default:a(()=>[e(F,{modelValue:l(s).name,"onUpdate:modelValue":t[0]||(t[0]=r=>l(s).name=r),placeholder:"\u8BF7\u8F93\u5165\u5546\u673A\u540D\u79F0",clearable:"",onKeyup:X(f,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(k,null,{default:a(()=>[e(m,{onClick:f},{default:a(()=>[e(d,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22")]),_:1}),e(m,{onClick:U},{default:a(()=>[e(d,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E")]),_:1}),V((y(),h(m,{type:"primary",onClick:t[1]||(t[1]=r=>{w.value.open("create")})},{default:a(()=>[e(d,{icon:"ep:plus",class:"mr-5px"}),u(" \u65B0\u589E ")]),_:1})),[[O,["crm:business:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(C,{class:"mt-10px"},{default:a(()=>[V((y(),h(E,{ref_key:"businessRef",ref:x,data:l(v),stripe:!0,"show-overflow-tooltip":!0},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u5546\u673A\u540D\u79F0",fixed:"left",align:"center",prop:"name"},{default:a(r=>[e(A,{type:"primary",underline:!1,onClick:De=>{return N=r.row.id,void q({name:"CrmBusinessDetail",params:{id:N}});var N}},{default:a(()=>[u(Y(r.row.name),1)]),_:2},1032,["onClick"])]),_:1}),e(i,{label:"\u5546\u673A\u91D1\u989D",align:"center",prop:"price",formatter:l(we)},null,8,["formatter"]),e(i,{label:"\u5BA2\u6237\u540D\u79F0",align:"center",prop:"customerName"}),e(i,{label:"\u5546\u673A\u7EC4",align:"center",prop:"statusTypeName"}),e(i,{label:"\u5546\u673A\u9636\u6BB5",align:"center",prop:"statusName"})]),_:1},8,["data"])),[[Q,l(p)]]),e(G,{total:l(g),page:l(s).pageNo,"onUpdate:page":t[2]||(t[2]=r=>l(s).pageNo=r),limit:l(s).pageSize,"onUpdate:limit":t[3]||(t[3]=r=>l(s).pageSize=r),onPagination:c},null,8,["total","page","limit"])]),_:1}),e(ve,{ref_key:"formRef",ref:w,onSuccess:c},null,512)]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/crm/business/components/BusinessListModal.vue"]])});export{Be as __tla,R as default};