智慧教务系统
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.
 
 
 
 
 
 

1 lines
7.0 KiB

import{d as Z,v as ee,f as te,l as ae,r,h as c,c as f,e as t,w as s,a as y,t as p,u as e,m as C,i as h,k as a,B as w,J as oe,F as V,W as $,M as ne,E as se,D as ie,G as le,H as re,K as ce,O as ue,P as me,Q as pe,L as de}from"./index-f5d841af.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css */import{u as g}from"./dict-f88a0e26.js";import{d as _e,h as he,g as fe,b as ge}from"./customer_resources-67a8bf8a.js";import{_ as ve}from"./customer-resources-edit.vue_vue_type_style_index_0_lang-8c3d96e8.js";import{_ as ye}from"./fp.vue_vue_type_style_index_0_lang-8f484e4a.js";import{_ as we}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./six_speed-b22ab8bd.js";const be={class:"main-container"},Ce={class:"flex justify-between items-center"},ke={class:"text-lg"},Le={class:"mt-[10px]"},De={key:0},xe={key:0},Ee={class:"mt-[16px] flex justify-end"},Re=Z({__name:"customer_resources",setup(Pe){const D=ee().meta.title,x=te(),b=D=="业绩分配"?"yjfp":"khzy",B=l=>{x.push({path:"/six_speed_modification_log/six_speed_modification_log",query:{id:l}})},N=l=>{x.push({path:"/customer_resource_changes/customer_resource_changes",query:{id:l}})};let o=ae({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{name:"",phone_number:"",type:b}});const E=r();r([]);const R=r([]);(async()=>{R.value=await(await g("source")).data.dictionary})();const T=r([]);(async()=>{T.value=await(await g("SourceChannel")).data.dictionary})();const P=r([]);(async()=>{P.value=await(await g("zy_sex")).data.dictionary})();const j=r([]);(async()=>{j.value=await(await g("customer_purchasing_power")).data.dictionary})();const U=r([]);(async()=>{U.value=await(await g("cognitive_concept")).data.dictionary})();const I=r([]);(async()=>{I.value=await(await g("preliminarycustomerintention")).data.dictionary})();const M=r([]);(async()=>{M.value=await(await g("kh_status")).data.dictionary})();const d=(l=1)=>{o.loading=!0,o.page=l,_e({page:o.page,limit:o.limit,...o.searchParam}).then(i=>{o.loading=!1,o.data=i.data.data,o.total=i.data.total}).catch(()=>{o.loading=!1})};d();const v=r(null),k=r(null),S=()=>{v.value.setFormData(),v.value.showDialog=!0},W=l=>{v.value.setFormData(l),v.value.showDialog=!0},q=l=>{k.value.setFormData(l),k.value.showDialog=!0},G=l=>{ne.confirm(a("customerResourcesDeleteTips"),a("warning"),{confirmButtonText:a("confirm"),cancelButtonText:a("cancel"),type:"warning"}).then(()=>{he(l).then(()=>{d()}).catch(()=>{})})},H=r([]);(async()=>{H.value=await(await fe({})).data})();const J=r([]);(async()=>{J.value=await(await ge({})).data})();const K=l=>{l&&(l.resetFields(),d())};return(l,i)=>{const _=se,F=ie,L=le,O=re,z=ce,m=ue,Q=me,A=pe,X=de;return c(),f("div",be,[t(z,{class:"box-card !border-none",shadow:"never"},{default:s(()=>[y("div",Ce,[y("span",ke,p(e(D)),1),e(b)=="khzy"?(c(),C(_,{key:0,type:"primary",onClick:S},{default:s(()=>[h(p(e(a)("addCustomerResources")),1)]),_:1})):w("",!0)]),t(z,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:s(()=>[t(O,{inline:!0,model:e(o).searchParam,ref_key:"searchFormRef",ref:E},{default:s(()=>[t(L,{label:e(a)("name"),prop:"name"},{default:s(()=>[t(F,{modelValue:e(o).searchParam.name,"onUpdate:modelValue":i[0]||(i[0]=n=>e(o).searchParam.name=n),placeholder:e(a)("namePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(L,{label:e(a)("phoneNumber"),prop:"phone_number"},{default:s(()=>[t(F,{modelValue:e(o).searchParam.phone_number,"onUpdate:modelValue":i[1]||(i[1]=n=>e(o).searchParam.phone_number=n),placeholder:e(a)("phoneNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(L,null,{default:s(()=>[t(_,{type:"primary",onClick:i[2]||(i[2]=n=>d())},{default:s(()=>[h(p(e(a)("search")),1)]),_:1}),t(_,{onClick:i[3]||(i[3]=n=>K(E.value))},{default:s(()=>[h(p(e(a)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),y("div",Le,[oe((c(),C(Q,{data:e(o).data,size:"large"},{empty:s(()=>[y("span",null,p(e(o).loading?"":e(a)("emptyData")),1)]),default:s(()=>[t(m,{label:e(a)("source"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:s(({row:n})=>[(c(!0),f(V,null,$(R.value,(u,Y)=>(c(),f("div",null,[u.value==n.source?(c(),f("div",De,p(u.name),1)):w("",!0)]))),256))]),_:1},8,["label"]),t(m,{prop:"consultant_name",label:e(a)("consultant"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"name",label:e(a)("name"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"age",label:e(a)("age"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{label:e(a)("gender"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:s(({row:n})=>[(c(!0),f(V,null,$(P.value,(u,Y)=>(c(),f("div",null,[u.value==n.gender?(c(),f("div",xe,p(u.name),1)):w("",!0)]))),256))]),_:1},8,["label"]),t(m,{prop:"phone_number",label:e(a)("phoneNumber"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(m,{prop:"decision_maker",label:e(a)("decisionMaker"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),e(b)=="khzy"?(c(),C(m,{key:0,label:e(a)("operation"),fixed:"right","min-width":"200"},{default:s(({row:n})=>[t(_,{type:"primary",link:"",onClick:u=>B(n.id)},{default:s(()=>[h("六要素修改记录")]),_:2},1032,["onClick"]),t(_,{type:"primary",link:"",onClick:u=>N(n.id)},{default:s(()=>[h("客户信息修改记录")]),_:2},1032,["onClick"]),t(_,{type:"primary",link:"",onClick:u=>W(n)},{default:s(()=>[h(p(e(a)("edit")),1)]),_:2},1032,["onClick"]),t(_,{type:"primary",link:"",onClick:u=>G(n.id)},{default:s(()=>[h(p(e(a)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])):w("",!0),e(b)=="yjfp"?(c(),C(m,{key:1,label:e(a)("operation"),fixed:"right","min-width":"200"},{default:s(({row:n})=>[t(_,{type:"primary",link:"",onClick:u=>q(n)},{default:s(()=>[h("分配")]),_:2},1032,["onClick"])]),_:1},8,["label"])):w("",!0)]),_:1},8,["data"])),[[X,e(o).loading]]),y("div",Ee,[t(A,{"current-page":e(o).page,"onUpdate:current-page":i[4]||(i[4]=n=>e(o).page=n),"page-size":e(o).limit,"onUpdate:page-size":i[5]||(i[5]=n=>e(o).limit=n),layout:"total, sizes, prev, pager, next, jumper",total:e(o).total,onSizeChange:i[6]||(i[6]=n=>d()),onCurrentChange:d},null,8,["current-page","page-size","total"])])]),t(ve,{ref_key:"editCustomerResourcesDialog",ref:v,onComplete:d},null,512),t(ye,{ref_key:"fpCustomerResourcesDialog",ref:k,onComplete:d},null,512)]),_:1})])}}});const _t=we(Re,[["__scopeId","data-v-d1fd481c"]]);export{_t as default};