index-DILrLTQw.js 8.5 KB

12
  1. var e=Object.defineProperty,l=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable,n=(l,a,o)=>a in l?e(l,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):l[a]=o,r=(e,l)=>{for(var a in l||(l={}))s.call(l,a)&&n(e,a,l[a]);if(o)for(var a of o(l))t.call(l,a)&&n(e,a,l[a]);return e},i=(e,l,a)=>new Promise(((o,s)=>{var t=e=>{try{r(a.next(e))}catch(l){s(l)}},n=e=>{try{r(a.throw(e))}catch(l){s(l)}},r=e=>e.done?o(e.value):Promise.resolve(e.value).then(t,n);r((a=a.apply(e,l)).next())}));import{r as u,R as p,b as m}from"./index-C6YR97YM.js";/* empty css *//* empty css */import{_}from"./FollowDrawer-CTeZvCkD.js";/* empty css *//* empty css *//* empty css */import{_ as d}from"./index-CyrdNoo1.js";/* empty css */import{u as c,_ as h}from"./useTable-D1BPUR4h.js";import{_ as f,E as g}from"./FollowDialog.vue_vue_type_script_setup_true_lang-TAT_o3cZ.js";import{A as v}from"./index-CpvE8YAk.js";import{c as b}from"./canteenApi-SCqsEorY.js";import{_ as w}from"./user-search.vue_vue_type_script_setup_true_lang-Oh0U-3UZ.js";import{j as y,r as j,ac as V,d as x,_ as C,Q as P,G as U,v as k,u as O,i as z,H as S,a6 as A,D,a7 as I,X as R,am as q,a4 as E,ai as F,ad as L,ae as T,S as B,Y as Q,W as X,aj as Y,an as $,E as G,k as H,ao as M,n as N}from"./vendor-B2KqeU87.js";import{_ as W}from"./_plugin-vue_export-helper-BCo6x5W8.js";/* empty css *//* empty css */import"./followApi-BYHdrhua.js";/* empty css */import"./index-CeIx2olA.js";/* empty css *//* empty css */import"./ArtUploadImgs.vue_vue_type_script_setup_true_lang-BKcwv_fr.js";/* empty css *//* empty css */import"./el-form-item-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import"./index-BmC2l1bB.js";/* empty css */const Z={class:"user-page art-full-height"},J={style:{"font-size":"20px","font-weight":"bold"}};var K;const ee=W(y((K=r({},{name:"User"}),l(K,a({__name:"index",setup(e){const{list:l}=b,a=j(!1),o=j(!1),s=j({name:"",school_id:parseInt(V().query.school_id)||"",company_id:parseInt(V().query.company_id)||""}),t=j(r({},{id:0,school_id:0,school_name:"",company_id:0,company_name:"",name:"",stall_num:0,is_direct:0,stall_imgs:[],username:"",phone:"",weixin:"",memo:"",last_user_id:0,last_user_name:"",last_date:""})),n=j([]);(()=>{i(this,null,(function*(){yield b.selectList().then((e=>{n.value=e}))}))})();const y=j(0),W=()=>i(this,null,(function*(){o.value=!1,y.value++})),{columns:K,columnChecks:ee,data:le,loading:ae,pagination:oe,getData:se,searchParams:te,resetSearchParams:ne,handleSizeChange:re,handleCurrentChange:ie,refreshData:ue}=c({core:{apiFn:l,apiParams:r({current:1,size:20},s.value),excludeParams:[],columnsFactory:()=>[{prop:"name",label:"食堂名称",formatter:e=>H(I,{type:"primary",link:!0,onClick:()=>fe(e),style:{"text-decoration":"underline"}},(()=>e.name))},{prop:"school_name",label:"学校"},{prop:"stall_num",label:"档口数量"},{prop:"is_direct",label:"是否直营",formatter:e=>H(M,{type:e.is_direct?"success":"danger"},(()=>e.is_direct?"直营":"非直营"))},{prop:"stall_imgs",label:"档口照片",formatter:e=>e.stall_imgs.length>0?H(Y,{src:e.stall_imgs[0],previewSrcList:e.stall_imgs,showProgress:!0,fit:"cover",title:"点击预览全部图片",style:{"max-width":"50px","max-height":"50px"},previewTeleported:!0}):""},{prop:"username",label:"食堂经理"},{prop:"phone",label:"手机号"},{prop:"weixin",label:"微信号"},{prop:"memo",label:"备注",showOverflowTooltip:!0},{prop:"last_user_name",label:"最后一次跟进人"},{prop:"last_date",label:"最后一次跟进时间"},{prop:"",label:"跟进记录",formatter:e=>H(I,{size:"small",type:"primary",onClick:()=>ce(e)},(()=>"跟进"))},{prop:"operation",label:"操作",width:120,fixed:"right",formatter:e=>H("div",[H(v,{type:"view",onClick:()=>he(e.id)}),m().checkAuth(130102)&&H(v,{type:"edit",onClick:()=>de(e.id)})])}]}}),pe=j(!1);x((()=>{setTimeout((()=>{pe.value=!0}),1e3)}));const me=e=>{e.row.id&&pe.value&&b.updateAttr({id:e.row.id,attr:e.prop,value:e.row[e.prop]}).then((()=>{G.success(`${g[200]} 修改成功`)}))},_e=e=>{Object.assign(te,r({},e)),se()},de=e=>{u.push({path:p.CanteenEdit,query:{id:e}})},ce=e=>{t.value=e||{},N((()=>{o.value=!0}))},he=e=>{u.push({path:p.CanteenInfo,query:{id:e}})},fe=e=>{a.value=!0,t.value=e};return(e,l)=>{const r=f,i=h,u=q,p=d,m=F,c=T,g=L,v=T,b=_,j=$,V=C("ripple"),x=C("auth");return U(),P("div",Z,[k(w,{modelValue:O(s),"onUpdate:modelValue":l[0]||(l[0]=e=>z(s)?s.value=e:null),onSearch:_e,onReset:O(ne),"school-list":O(n),"company-list":[]},null,8,["modelValue","onReset","school-list"]),k(r,{visible:O(o),"onUpdate:visible":l[1]||(l[1]=e=>z(o)?o.value=e:null),"user-data":O(t),type:"canteen",first_id:O(t).school_id,second_id:O(t).id,selectList:O(n),onSubmit:W},null,8,["visible","user-data","first_id","second_id","selectList"]),k(m,{class:"art-table-card",shadow:"never"},{default:S((()=>[k(i,{columns:O(ee),"onUpdate:columns":l[3]||(l[3]=e=>z(ee)?ee.value=e:null),onRefresh:O(ue)},{left:S((()=>[A((U(),D(O(I),{type:"primary",onClick:l[2]||(l[2]=e=>de())},{default:S((()=>l[5]||(l[5]=[R("新增食堂")]))),_:1,__:[5]})),[[V],[x,130101]])])),_:1},8,["columns","onRefresh"]),k(p,{loading:O(ae),data:O(le),columns:O(K),pagination:O(oe),"onPagination:sizeChange":O(re),"onPagination:currentChange":O(ie)},{person_num:S((e=>[k(O(E),{modelValue:e.row.person_num,"onUpdate:modelValue":l=>e.row.person_num=l,placeholder:"scope.row.person_num",onBlur:l=>me(e)},null,8,["modelValue","onUpdate:modelValue","onBlur"])])),is_eleme_in_school:S((e=>[k(u,{modelValue:e.row.is_eleme_in_school,"onUpdate:modelValue":l=>e.row.is_eleme_in_school=l,onChange:l=>me(e),"active-value":1,"inactive-value":0,"before-change":()=>O(pe)},null,8,["modelValue","onUpdate:modelValue","onChange","before-change"])])),is_eleme_out_school:S((e=>[k(u,{modelValue:e.row.is_eleme_out_school,"onUpdate:modelValue":l=>e.row.is_eleme_out_school=l,onChange:l=>me(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),is_meituan_in_school:S((e=>[k(u,{modelValue:e.row.is_meituan_in_school,"onUpdate:modelValue":l=>e.row.is_meituan_in_school=l,onChange:l=>me(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),is_meituan_out_school:S((e=>[k(u,{modelValue:e.row.is_meituan_out_school,"onUpdate:modelValue":l=>e.row.is_meituan_out_school=l,onChange:l=>me(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:1},8,["loading","data","columns","pagination","onPagination:sizeChange","onPagination:currentChange"])])),_:1}),k(j,{modelValue:O(a),"onUpdate:modelValue":l[4]||(l[4]=e=>z(a)?a.value=e:null),direction:"rtl",size:"60%"},{header:S((()=>[B("span",J,Q(O(t).name),1)])),default:S((()=>[k(g,null,{default:S((()=>[k(v,{sm:8},{default:S((()=>[k(g,{class:"detail"},{default:S((()=>[k(c,null,{default:S((()=>[l[6]||(l[6]=B("label",null,"学校(校区):",-1)),l[7]||(l[7]=R()),B("span",null,Q(O(t).school_name),1)])),_:1,__:[6,7]}),k(c,null,{default:S((()=>[l[8]||(l[8]=B("label",null,"档口数量:",-1)),l[9]||(l[9]=R()),B("span",null,Q(O(t).stall_num),1)])),_:1,__:[8,9]}),k(c,null,{default:S((()=>[l[10]||(l[10]=B("label",null,"是否直营:",-1)),l[11]||(l[11]=R()),B("span",null,Q(O(t).is_direct?"直营":"非直营"),1)])),_:1,__:[10,11]}),k(c,null,{default:S((()=>[l[12]||(l[12]=B("label",null,"餐饮公司:",-1)),l[13]||(l[13]=R()),B("span",null,Q(O(t).company_name),1)])),_:1,__:[12,13]}),k(c,null,{default:S((()=>[l[14]||(l[14]=B("label",null,"食堂经理:",-1)),l[15]||(l[15]=R()),B("span",null,Q(O(t).username),1)])),_:1,__:[14,15]}),k(c,null,{default:S((()=>[l[16]||(l[16]=B("label",null,"手机号:",-1)),l[17]||(l[17]=R()),B("span",null,Q(O(t).phone),1)])),_:1,__:[16,17]}),k(c,null,{default:S((()=>[l[18]||(l[18]=B("label",null,"微信号:",-1)),l[19]||(l[19]=R()),B("span",null,Q(O(t).weixin),1)])),_:1,__:[18,19]}),k(c,null,{default:S((()=>[l[20]||(l[20]=B("label",null,"档口照片:",-1)),O(t).stall_imgs.length?(U(),D(O(Y),{key:0,ref:"imageRef",style:{width:"60px",height:"60px"},src:O(t).stall_imgs[0],"show-progress":"","preview-src-list":O(t).stall_imgs,fit:"cover"},null,8,["src","preview-src-list"])):X("",!0)])),_:1,__:[20]})])),_:1})])),_:1}),k(v,{sm:16},{default:S((()=>[k(b,{first_id:O(t).school_id,second_id:O(t).id,type:"canteen",uid:O(y)},null,8,["first_id","second_id","uid"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])}}})))),[["__scopeId","data-v-22f18dcf"]]);export{ee as default};