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
10 KiB
1 lines
10 KiB
import{d as se,v as ce,f as ue,l as de,r as c,h as u,c as h,e as t,w as l,a as v,t as _,u as e,m as k,i as m,k as n,B as b,J as me,F as Y,O as $,S as pe,E as _e,D as fe,G as he,_ as ge,$ as ye,a0 as ve,H as be,K as we,a1 as ke,ab as Ce,a2 as De,a3 as Le,L as xe}from"./index-4c331f20.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 *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{u as y}from"./dict-6dd77593.js";import{d as Pe,h as Ve,g as Ee,b as Re}from"./customer_resources-3f871f4c.js";import{_ as Ye}from"./customer-resources-edit.vue_vue_type_style_index_0_lang-0715d8cc.js";import{_ as $e}from"./fp.vue_vue_type_style_index_0_lang-5fcca730.js";import{_ as Fe}from"./order-table-edit.vue_vue_type_style_index_0_lang-cb88af40.js";import Me from"./tc_dialog-13cbdff0.js";import{g as Te}from"./member-9eadae64.js";import{_ as ze}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./six_speed-43e91b99.js";import"./physical_test-ee073749.js";import"./physical-test-edit.vue_vue_type_style_index_0_lang-9f19e288.js";const Be={class:"main-container"},Ne={class:"flex justify-between items-center"},Ue={class:"text-lg"},Se={class:"mt-[10px]"},je={key:0},Oe={key:0},qe={class:"flex flex-col items-center"},Ae={class:"mt-[16px] flex justify-end"},Ie=se({__name:"customer_resources",setup(We){const C=ce().meta.title,D=ue();let a=de({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{name:"",age:"",gender:"",phone_number:"",member_label:"",type:"",created_at:"",updated_at:""}});C=="业绩分配"?a.searchParam.type="yjfp":C=="客户资源列表"?a.searchParam.type="khzy":C=="资源列表"&&(a.searchParam.type="zylb");const U=c([]);(async()=>{U.value=await(await Te()).data})();const S=i=>{D.push({path:"/six_speed_modification_log/six_speed_modification_log",query:{id:i}})},j=i=>{D.push({path:"/customer_resource_changes/customer_resource_changes",query:{id:i}})},L=c(null),O=i=>{console.log(i),L.value.setFormData(i),L.value.showDialog=!0},x=c(null),q=i=>{x.value.setFormData(i),x.value.showDialog=!0},A=i=>{D.push({path:"/order_table/order_table",query:{resource_id:i}})},F=c();c([]);const M=c([]);(async()=>{M.value=await(await y("source")).data.dictionary})();const I=c([]);(async()=>{I.value=await(await y("SourceChannel")).data.dictionary})();const T=c([]);(async()=>{T.value=await(await y("zy_sex")).data.dictionary})();const W=c([]);(async()=>{W.value=await(await y("customer_purchasing_power")).data.dictionary})();const G=c([]);(async()=>{G.value=await(await y("cognitive_concept")).data.dictionary})();const H=c([]);(async()=>{H.value=await(await y("preliminarycustomerintention")).data.dictionary})();const J=c([]);(async()=>{J.value=await(await y("kh_status")).data.dictionary})();const f=(i=1)=>{a.loading=!0,a.page=i,Pe({page:a.page,limit:a.limit,...a.searchParam}).then(r=>{a.loading=!1,a.data=r.data.data,a.total=r.data.total}).catch(()=>{a.loading=!1})};f();const w=c(null),P=c(null),K=()=>{w.value.setFormData(),w.value.showDialog=!0},z=i=>{w.value.setFormData(i),w.value.showDialog=!0},Q=i=>{P.value.setFormData(i),P.value.showDialog=!0},X=i=>{pe.confirm(n("customerResourcesDeleteTips"),n("warning"),{confirmButtonText:n("confirm"),cancelButtonText:n("cancel"),type:"warning"}).then(()=>{Ve(i).then(()=>{f()}).catch(()=>{})})},Z=c([]);(async()=>{Z.value=await(await Ee({})).data})();const ee=c([]);(async()=>{ee.value=await(await Re({})).data})();const te=i=>{i&&(i.resetFields(),f())};return(i,r)=>{const p=_e,V=fe,g=he,E=ge,ae=ye,B=ve,oe=be,N=we,d=ke,le=Ce,re=De,ne=Le,ie=xe;return u(),h("div",Be,[t(N,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[v("div",Ne,[v("span",Ue,_(e(C)),1),e(a).searchParam.type=="khzy"?(u(),k(p,{key:0,type:"primary",onClick:K},{default:l(()=>[m(_(e(n)("addCustomerResources")),1)]),_:1})):b("",!0)]),t(N,{class:"box-card !border-none my-[10px] table-search-wrap",shadow:"never"},{default:l(()=>[t(oe,{inline:!0,model:e(a).searchParam,ref_key:"searchFormRef",ref:F},{default:l(()=>[t(g,{label:e(n)("name"),prop:"name"},{default:l(()=>[t(V,{modelValue:e(a).searchParam.name,"onUpdate:modelValue":r[0]||(r[0]=o=>e(a).searchParam.name=o),placeholder:e(n)("namePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(g,{label:"年龄",prop:"age"},{default:l(()=>[t(V,{modelValue:e(a).searchParam.age,"onUpdate:modelValue":r[1]||(r[1]=o=>e(a).searchParam.age=o),placeholder:"请输入年龄"},null,8,["modelValue"])]),_:1}),t(g,{label:"性别",prop:"gender"},{default:l(()=>[t(ae,{modelValue:e(a).searchParam.gender,"onUpdate:modelValue":r[2]||(r[2]=o=>e(a).searchParam.gender=o),placeholder:"请选择性别"},{default:l(()=>[t(E,{label:"男性",value:"male"}),t(E,{label:"女性",value:"female"}),t(E,{label:"其他",value:"other"})]),_:1},8,["modelValue"])]),_:1}),t(g,{label:e(n)("phoneNumber"),prop:"phone_number"},{default:l(()=>[t(V,{modelValue:e(a).searchParam.phone_number,"onUpdate:modelValue":r[3]||(r[3]=o=>e(a).searchParam.phone_number=o),placeholder:e(n)("phoneNumberPlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(g,{label:"创建时间"},{default:l(()=>[t(B,{modelValue:e(a).searchParam.created_at,"onUpdate:modelValue":r[4]||(r[4]=o=>e(a).searchParam.created_at=o),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),t(g,{label:"更新时间"},{default:l(()=>[t(B,{modelValue:e(a).searchParam.updated_at,"onUpdate:modelValue":r[5]||(r[5]=o=>e(a).searchParam.updated_at=o),type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期",format:"YYYY-MM-DD","value-format":"YYYY-MM-DD"},null,8,["modelValue"])]),_:1}),t(g,null,{default:l(()=>[t(p,{type:"primary",onClick:r[6]||(r[6]=o=>f())},{default:l(()=>[m(_(e(n)("search")),1)]),_:1}),t(p,{onClick:r[7]||(r[7]=o=>te(F.value))},{default:l(()=>[m(_(e(n)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),v("div",Se,[me((u(),k(re,{data:e(a).data,size:"large"},{empty:l(()=>[v("span",null,_(e(a).loading?"":e(n)("emptyData")),1)]),default:l(()=>[t(d,{label:e(n)("source"),"min-width":"180",align:"center","show-overflow-tooltip":!0},{default:l(({row:o})=>[(u(!0),h(Y,null,$(M.value,(s,R)=>(u(),h("div",null,[s.value==o.source?(u(),h("div",je,_(s.name),1)):b("",!0)]))),256))]),_:1},8,["label"]),t(d,{prop:"consultant_name",label:e(n)("consultant"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(d,{prop:"name",label:e(n)("name"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(d,{prop:"age",label:e(n)("age"),"min-width":"50","show-overflow-tooltip":!0},null,8,["label"]),t(d,{label:e(n)("gender"),"min-width":"60",align:"center","show-overflow-tooltip":!0},{default:l(({row:o})=>[(u(!0),h(Y,null,$(T.value,(s,R)=>(u(),h("div",null,[s.value==o.gender?(u(),h("div",Oe,_(s.name),1)):b("",!0)]))),256))]),_:1},8,["label"]),t(d,{prop:"phone_number",label:e(n)("phoneNumber"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(d,{prop:"decision_maker",label:e(n)("decisionMaker"),"min-width":"120","show-overflow-tooltip":!0},null,8,["label"]),t(d,{prop:"member_label",label:"会员标签","min-width":"120",align:"center"},{default:l(({row:o})=>[v("div",qe,[(u(!0),h(Y,null,$(o.member_label_array,(s,R)=>(u(),h("div",{class:"my-[3px]",key:R},[t(le,{type:"info"},{default:l(()=>[m(_(s.label_name),1)]),_:2},1024)]))),128))])]),_:1}),t(d,{prop:"created_at",label:"添加时间","min-width":"120","show-overflow-tooltip":!0}),t(d,{prop:"updated_at",label:"修改时间","min-width":"120","show-overflow-tooltip":!0}),e(a).searchParam.type=="khzy"?(u(),k(d,{key:0,label:e(n)("operation"),fixed:"right","min-width":"200"},{default:l(({row:o})=>[t(p,{type:"primary",link:"",onClick:s=>S(o.id)},{default:l(()=>[m("六要素修改记录")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>j(o.id)},{default:l(()=>[m("客户信息修改记录")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>z(o)},{default:l(()=>[m(_(e(n)("edit")),1)]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>X(o.id)},{default:l(()=>[m(_(e(n)("delete")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])):b("",!0),e(a).searchParam.type=="yjfp"?(u(),k(d,{key:1,label:e(n)("operation"),fixed:"right","min-width":"200"},{default:l(({row:o})=>[t(p,{type:"primary",link:"",onClick:s=>Q(o)},{default:l(()=>[m("分配")]),_:2},1032,["onClick"])]),_:1},8,["label"])):b("",!0),e(a).searchParam.type=="zylb"?(u(),k(d,{key:2,label:e(n)("operation"),fixed:"right","min-width":"300"},{default:l(({row:o})=>[t(p,{type:"primary",link:"",onClick:s=>z(o)},{default:l(()=>[m(_(e(n)("edit")),1)]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>A(o.id)},{default:l(()=>[m("订单列表")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>O({resource_id:o.id})},{default:l(()=>[m("添加订单")]),_:2},1032,["onClick"]),t(p,{type:"primary",link:"",onClick:s=>q({resource_id:o.id})},{default:l(()=>[m("体测")]),_:2},1032,["onClick"])]),_:1},8,["label"])):b("",!0)]),_:1},8,["data"])),[[ie,e(a).loading]]),v("div",Ae,[t(ne,{"current-page":e(a).page,"onUpdate:current-page":r[8]||(r[8]=o=>e(a).page=o),"page-size":e(a).limit,"onUpdate:page-size":r[9]||(r[9]=o=>e(a).limit=o),layout:"total, sizes, prev, pager, next, jumper",total:e(a).total,onSizeChange:r[10]||(r[10]=o=>f()),onCurrentChange:f},null,8,["current-page","page-size","total"])])]),t(Ye,{ref_key:"editCustomerResourcesDialog",ref:w,onComplete:f},null,512),t($e,{ref_key:"fpCustomerResourcesDialog",ref:P,onComplete:f},null,512),t(Fe,{ref_key:"editOrderTableDialog",ref:L,onComplete:f},null,512),t(Me,{ref_key:"TcCustomerResourcesDialog",ref:x,onComplete:f},null,512)]),_:1})])}}});const Bt=ze(Ie,[["__scopeId","data-v-d8e67329"]]);export{Bt as default};
|
|
|