BusinessListModal-369fbc68.js 4.6 KB

1
  1. import{d as G,r as o,g as H,u as O,T as Q,o as y,k as h,w as a,i as e,l as u,a as l,U as W,D as R,t as X,R as Z,Y as $,I as ee,n as ae,s as te,J as le,K as re,L as se,M as oe,_ as _e,__tla as ne}from"./index-2f799233.js";import{_ as ie,__tla as ue}from"./Dialog-6fd39e06.js";import{_ as ce,__tla as me}from"./index-e6cd813f.js";import{E as pe,__tla as fe}from"./el-link-23decf79.js";import{_ as de,__tla as ye}from"./ContentWrap-9da801df.js";import{a as he,__tla as ge}from"./index-85c1764d.js";import ve,{__tla as be}from"./BusinessForm-00e049e8.js";import{f as we,__tla as xe}from"./formatter-4606ca53.js";import{u as ke,__tla as Ce}from"./useMessage-e567ad40.js";import{__tla as Ne}from"./index-1c180a16.js";import{__tla as Re}from"./el-card-c64c83d1.js";import{__tla as Se}from"./DictTag-ea4c6cc2.js";import"./color-6e929987.js";import{__tla as Ve}from"./dict-20c916e2.js";import{__tla as ze}from"./index-6c9b722b.js";import{__tla as Be}from"./index-2774892b.js";let S,Me=Promise.all([(()=>{try{return ne}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return me}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 Re}catch{}})(),(()=>{try{return Se}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Be}catch{}})()]).then(async()=>{S=_e(G({name:"BusinessListModal",__name:"BusinessListModal",props:{customerId:{type:Number,required:!0}},emits:["success"],setup(V,{expose:z,emit:B}){const M=ke(),U=V,_=o(!1),p=o(!0),g=o(0),v=o([]),b=o(),D=o(!1),s=H({pageNo:1,pageSize:10,name:void 0,customerId:U.customerId});z({open:async()=>{_.value=!0,await m()}});const m=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,m()},I=()=>{b.value.resetFields(),f()},w=o(),L=B,x=o(),P=async()=>{const n=x.value.getSelectionRows().map(t=>t.id);if(n.length===0)return M.error("\u672A\u9009\u62E9\u5546\u673A");_.value=!1,L("success",n)},{push:q}=O();return(n,t)=>{const F=$,k=ee,d=ae,c=te,K=le,C=de,i=re,T=pe,A=se,E=ce,J=ie,Y=Q("hasPermi"),j=oe;return y(),h(J,{title:"\u5173\u8054\u5546\u673A",modelValue:l(_),"onUpdate:modelValue":t[5]||(t[5]=r=>Z(_)?_.value=r:null)},{footer:a(()=>[e(c,{onClick:P,type:"primary",disabled:l(D)},{default:a(()=>[u("\u786E \u5B9A")]),_:1},8,["disabled"]),e(c,{onClick:t[4]||(t[4]=r=>_.value=!1)},{default:a(()=>[u("\u53D6 \u6D88")]),_:1})]),default:a(()=>[e(C,null,{default:a(()=>[e(K,{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:W(f,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(k,null,{default:a(()=>[e(c,{onClick:f},{default:a(()=>[e(d,{icon:"ep:search",class:"mr-5px"}),u(" \u641C\u7D22")]),_:1}),e(c,{onClick:I},{default:a(()=>[e(d,{icon:"ep:refresh",class:"mr-5px"}),u(" \u91CD\u7F6E")]),_:1}),R((y(),h(c,{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})),[[Y,["crm:business:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(C,{class:"mt-10px"},{default:a(()=>[R((y(),h(A,{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(T,{type:"primary",underline:!1,onClick:Ue=>{return N=r.row.id,void q({name:"CrmBusinessDetail",params:{id:N}});var N}},{default:a(()=>[u(X(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"])),[[j,l(p)]]),e(E,{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:m},null,8,["total","page","limit"])]),_:1}),e(ve,{ref_key:"formRef",ref:w,onSuccess:m},null,512)]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/crm/business/components/BusinessListModal.vue"]])});export{Me as __tla,S as default};