index--LUO9gIe.js 8.6 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{c as u,r as p,R as m,b as _}from"./index-DfRAYgIx.js";/* empty css *//* empty css */import{_ as d}from"./FollowDrawer-Cy8tERrN.js";/* empty css *//* empty css *//* empty css */import{_ as c,A as h}from"./index-mQLvQ5nn.js";/* empty css */import{u as f,_ as g}from"./useTable-CBbPBl7x.js";import{_ as v,E as y}from"./FollowDialog.vue_vue_type_script_setup_true_lang-KTR2Oea-.js";import{c as b}from"./canteenApi-BbRaXrbW.js";import{_ as w}from"./user-search.vue_vue_type_script_setup_true_lang-DrPzeDwF.js";import{j,r as V,ac as C,d as x,_ as U,Q as P,G as O,v as k,u as S,i as z,H as I,a6 as R,D as A,a7 as D,X as T,am as q,a4 as F,ai as E,ad as L,ae as B,S as G,Y as Q,W,aj as X,an as Y,E as $,k as H,ao as J,n as N}from"./vendor-C0fQtjEp.js";import{_ as Z}from"./_plugin-vue_export-helper-BCo6x5W8.js";/* empty css *//* empty css */import"./followApi-CqolokoA.js";/* empty css */import"./index-spU0LZei.js";/* empty css *//* empty css */import"./ArtUploadImgs.vue_vue_type_script_setup_true_lang-C4UMC4h8.js";/* empty css */import"./el-form-item-l0sNRNKZ.js";/* empty css *//* empty css *//* empty css */import"./index-RIpwT5tB.js";/* empty css */const K={class:"user-page art-full-height"},M={style:{"font-size":"20px","font-weight":"bold"}};var ee;const le=Z(j((ee=r({},{name:"User"}),l(ee,a({__name:"index",setup(e){const{list:l}=b,a=V(!1),o=V(!1),s=V({name:"",school_id:parseInt(C().query.school_id)||"",company_id:parseInt(C().query.company_id)||"",date:C().query.date||""}),t=V(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=V([]),j=V([]);(()=>{i(this,null,(function*(){yield u.selectList(["school_canteen","company"]).then((e=>{n.value=e.school_canteen||[],j.value=e.company||[]}))}))})();const Z=V(0),ee=()=>i(this,null,(function*(){o.value=!1,Z.value++,setTimeout((()=>{me()}),1e3)})),{columns:le,columnChecks:ae,data:oe,loading:se,pagination:te,getData:ne,searchParams:re,resetSearchParams:ie,handleSizeChange:ue,handleCurrentChange:pe,refreshData:me}=f({core:{apiFn:l,apiParams:r({current:1,size:20},s.value),excludeParams:[],columnsFactory:()=>[{prop:"name",label:"食堂名称",formatter:e=>H(D,{type:"primary",link:!0,onClick:()=>ve(e),style:{"text-decoration":"underline"}},(()=>e.name))},{prop:"school_name",label:"学校"},{prop:"stall_num",label:"档口数量"},{prop:"is_direct",label:"是否直营",formatter:e=>H(J,{type:e.is_direct?"success":"danger"},(()=>e.is_direct?"直营":"非直营"))},{prop:"stall_imgs",label:"档口照片",formatter:e=>e.stall_imgs.length>0?H(X,{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(D,{size:"small",type:"primary",onClick:()=>fe(e)},(()=>"跟进"))},{prop:"operation",label:"操作",width:120,fixed:"right",formatter:e=>H("div",[H(h,{type:"view",onClick:()=>ge(e.id)}),_().checkAuth(130102)&&H(h,{type:"edit",onClick:()=>he(e.id)})])}]}}),_e=V(!1);x((()=>{setTimeout((()=>{_e.value=!0}),1e3)}));const de=e=>{e.row.id&&_e.value&&b.updateAttr({id:e.row.id,attr:e.prop,value:e.row[e.prop]}).then((()=>{$.success(`${y[200]} 修改成功`)}))},ce=e=>{Object.assign(re,r({},e)),ne()},he=e=>{p.push({path:m.CanteenEdit,query:{id:e}})},fe=e=>{t.value=e||{},N((()=>{o.value=!0}))},ge=e=>{p.push({path:m.CanteenInfo,query:{id:e}})},ve=e=>{a.value=!0,t.value=e};return(e,l)=>{const r=v,i=g,u=q,p=c,m=E,_=B,h=L,f=B,y=d,b=Y,V=U("ripple"),C=U("auth");return O(),P("div",K,[k(w,{modelValue:S(s),"onUpdate:modelValue":l[0]||(l[0]=e=>z(s)?s.value=e:null),onSearch:ce,onReset:S(ie),"school-list":S(n),"company-list":S(j)},null,8,["modelValue","onReset","school-list","company-list"]),k(r,{visible:S(o),"onUpdate:visible":l[1]||(l[1]=e=>z(o)?o.value=e:null),"user-data":S(t),type:"canteen",first_id:S(t).school_id,second_id:S(t).id,selectList:S(n),onSubmit:ee},null,8,["visible","user-data","first_id","second_id","selectList"]),k(m,{class:"art-table-card",shadow:"never"},{default:I((()=>[k(i,{columns:S(ae),"onUpdate:columns":l[3]||(l[3]=e=>z(ae)?ae.value=e:null),onRefresh:S(me)},{left:I((()=>[R((O(),A(S(D),{type:"primary",onClick:l[2]||(l[2]=e=>he())},{default:I((()=>l[5]||(l[5]=[T("新增食堂")]))),_:1,__:[5]})),[[V],[C,130101]])])),_:1},8,["columns","onRefresh"]),k(p,{loading:S(se),data:S(oe),columns:S(le),pagination:S(te),"onPagination:sizeChange":S(ue),"onPagination:currentChange":S(pe)},{person_num:I((e=>[k(S(F),{modelValue:e.row.person_num,"onUpdate:modelValue":l=>e.row.person_num=l,placeholder:"scope.row.person_num",onBlur:l=>de(e)},null,8,["modelValue","onUpdate:modelValue","onBlur"])])),is_eleme_in_school:I((e=>[k(u,{modelValue:e.row.is_eleme_in_school,"onUpdate:modelValue":l=>e.row.is_eleme_in_school=l,onChange:l=>de(e),"active-value":1,"inactive-value":0,"before-change":()=>S(_e)},null,8,["modelValue","onUpdate:modelValue","onChange","before-change"])])),is_eleme_out_school:I((e=>[k(u,{modelValue:e.row.is_eleme_out_school,"onUpdate:modelValue":l=>e.row.is_eleme_out_school=l,onChange:l=>de(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),is_meituan_in_school:I((e=>[k(u,{modelValue:e.row.is_meituan_in_school,"onUpdate:modelValue":l=>e.row.is_meituan_in_school=l,onChange:l=>de(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),is_meituan_out_school:I((e=>[k(u,{modelValue:e.row.is_meituan_out_school,"onUpdate:modelValue":l=>e.row.is_meituan_out_school=l,onChange:l=>de(e)},null,8,["modelValue","onUpdate:modelValue","onChange"])])),_:1},8,["loading","data","columns","pagination","onPagination:sizeChange","onPagination:currentChange"])])),_:1}),k(b,{modelValue:S(a),"onUpdate:modelValue":l[4]||(l[4]=e=>z(a)?a.value=e:null),direction:"rtl",size:"60%"},{header:I((()=>[G("span",M,Q(S(t).name),1)])),default:I((()=>[k(h,null,{default:I((()=>[k(f,{sm:8},{default:I((()=>[k(h,{class:"detail"},{default:I((()=>[k(_,null,{default:I((()=>[l[6]||(l[6]=G("label",null,"学校(校区):",-1)),l[7]||(l[7]=T()),G("span",null,Q(S(t).school_name),1)])),_:1,__:[6,7]}),k(_,null,{default:I((()=>[l[8]||(l[8]=G("label",null,"档口数量:",-1)),l[9]||(l[9]=T()),G("span",null,Q(S(t).stall_num),1)])),_:1,__:[8,9]}),k(_,null,{default:I((()=>[l[10]||(l[10]=G("label",null,"是否直营:",-1)),l[11]||(l[11]=T()),G("span",null,Q(S(t).is_direct?"直营":"非直营"),1)])),_:1,__:[10,11]}),k(_,null,{default:I((()=>[l[12]||(l[12]=G("label",null,"餐饮公司:",-1)),l[13]||(l[13]=T()),G("span",null,Q(S(t).company_name),1)])),_:1,__:[12,13]}),k(_,null,{default:I((()=>[l[14]||(l[14]=G("label",null,"食堂经理:",-1)),l[15]||(l[15]=T()),G("span",null,Q(S(t).username),1)])),_:1,__:[14,15]}),k(_,null,{default:I((()=>[l[16]||(l[16]=G("label",null,"手机号:",-1)),l[17]||(l[17]=T()),G("span",null,Q(S(t).phone),1)])),_:1,__:[16,17]}),k(_,null,{default:I((()=>[l[18]||(l[18]=G("label",null,"微信号:",-1)),l[19]||(l[19]=T()),G("span",null,Q(S(t).weixin),1)])),_:1,__:[18,19]}),k(_,null,{default:I((()=>[l[20]||(l[20]=G("label",null,"档口照片:",-1)),S(t).stall_imgs.length?(O(),A(S(X),{key:0,ref:"imageRef",style:{width:"60px",height:"60px"},src:S(t).stall_imgs[0],"show-progress":"","preview-src-list":S(t).stall_imgs,fit:"cover"},null,8,["src","preview-src-list"])):W("",!0)])),_:1,__:[20]})])),_:1})])),_:1}),k(f,{sm:16},{default:I((()=>[k(y,{first_id:S(t).school_id,second_id:S(t).id,type:"canteen",uid:S(Z)},null,8,["first_id","second_id","uid"])])),_:1})])),_:1})])),_:1},8,["modelValue"])])}}})))),[["__scopeId","data-v-8342602f"]]);export{le as default};