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