You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
4.3KB

  1. var U=Object.defineProperty,E=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var V=(l,e,a)=>e in l?U(l,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[e]=a,x=(l,e)=>{for(var a in e||(e={}))G.call(e,a)&&V(l,a,e[a]);if(T)for(var a of T(e))q.call(e,a)&&V(l,a,e[a]);return l},$=(l,e)=>E(l,F(e));var h=(l,e,a)=>new Promise((v,s)=>{var m=i=>{try{_(a.next(i))}catch(r){s(r)}},b=i=>{try{_(a.throw(i))}catch(r){s(r)}},_=i=>i.done?v(i.value):Promise.resolve(i.value).then(m,b);_((a=a.apply(l,e)).next())});import{l as A,a as H}from"./companyManage.919897b5.js";import{u as J}from"./useTreeSelectData.c4e44619.js";import{d as K,r as f,a as Q,o as X,R as Y,f as c,g as Z,c as ee,e as t,w as o,v as ae,b as g,h as D,O as te,i as oe}from"./index.18b48fb5.js";import le from"./companyDialog.cde58eaa.js";const se={class:"companyManage"},ne=D("\u67E5\u8BE2"),ie=D("\u91CD\u7F6E"),re={class:"flex justify-between items-center"},ce=g("span",null,"\u4F01\u4E1A\u5217\u8868",-1),de=D(" \u65B0\u589E\u4F01\u4E1A "),me=["onClick"],pe=["onClick"],ue=K({name:"companyManage"}),ye=Object.assign(ue,{setup(l){const{proxy:e}=oe(),{cascaderProps:a}=J(),v=f([]),s=f({}),m=f(),b=f(0),_=[{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u4F01\u4E1A\u540D\u79F0",key:"companyName",prop:"companyName",minWidth:"180",showOverflowTooltip:!0},{label:"\u6240\u5C5E\u533A\u57DF",key:"regionDisplayName",prop:"regionDisplayName",minWidth:"180",showOverflowTooltip:!0},{label:"\u9879\u76EE\u6570\u91CF",key:"projectCnt",prop:"projectCnt",width:"100"},{label:"\u8054\u7CFB\u4EBA",key:"contacts",render:n=>te("span",`${n.contacts} / ${n.contactsNo}`),minWidth:"220",showOverflowTooltip:!0},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createTime",prop:"createTime",width:"180"},{label:"\u64CD\u4F5C",key:"action",slot:"action",width:"120",fixed:"right"}],i=f([]),r=(...w)=>h(this,[...w],function*(n=m.value.pageParams){var p;const y=yield A($(x(x({},n),s.value),{regionCode:(p=s.value.regionCode)==null?void 0:p.at(-1)}));b.value=y.data.total,i.value=y.data.records}),O=()=>{r()},P=()=>{s.value={},m.value.pageParams.pageNumber=1,m.value.pageParams.pageSize=10,r()},d=Q({visible:!1,rowData:void 0}),j=()=>{d.visible=!0,d.rowData=void 0},B=n=>{d.visible=!0,d.rowData=n},z=n=>{e.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u6570\u636E?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>h(this,null,function*(){yield H({id:n.companyId}),e.$message.success("\u5220\u9664\u6210\u529F\uFF01"),yield r()}))},M=n=>{d.visible=!1,n&&r()};return X(()=>h(this,null,function*(){v.value=(yield Y()).data,yield r()})),(n,w)=>{const y=c("el-input"),p=c("el-form-item"),C=c("el-col"),R=c("el-cascader"),k=c("el-button"),W=c("el-row"),I=c("el-form"),N=c("el-card"),L=c("table-list");return Z(),ee("div",se,[t(N,{shadow:"never",class:"search mb-16"},{default:o(()=>[t(I,{"label-suffix":":",model:s.value,size:"small"},{default:o(()=>[t(W,{gutter:16},{default:o(()=>[t(C,{span:6},{default:o(()=>[t(p,{label:"\u4F01\u4E1A\u540D\u79F0"},{default:o(()=>[t(y,{modelValue:s.value.companyName,"onUpdate:modelValue":w[0]||(w[0]=u=>s.value.companyName=u),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),t(C,{span:10},{default:o(()=>[t(p,{label:"\u6240\u5C5E\u533A\u57DF"},{default:o(()=>[t(R,{modelValue:s.value.regionCode,"onUpdate:modelValue":w[1]||(w[1]=u=>s.value.regionCode=u),props:ae(a),options:v.value,clearable:"",class:"w-full"},null,8,["modelValue","props","options"])]),_:1})]),_:1}),t(C,{span:8},{default:o(()=>[t(p,{class:"btn"},{default:o(()=>[t(k,{type:"primary",onClick:O},{default:o(()=>[ne]),_:1}),t(k,{type:"info",onClick:P},{default:o(()=>[ie]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),t(N,{shadow:"never"},{header:o(()=>[g("div",re,[ce,t(k,{type:"primary",icon:"Plus",size:"small",onClick:j},{default:o(()=>[de]),_:1})])]),default:o(()=>[t(L,{ref_key:"tableListRef",ref:m,column:_,data:i.value,total:b.value,onGetTableData:r},{action:o(({scope:u})=>[g("a",{class:"text-primary",onClick:S=>B(u.row)},"\u7F16\u8F91",8,me),g("a",{class:"text-danger",onClick:S=>z(u.row)},"\u5220\u9664",8,pe)]),_:1},8,["data","total"])]),_:1}),t(le,{visible:d.visible,data:d.rowData,onClose:M},null,8,["visible","data"])])}}});export{ye as default};