HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/8.2.20
System: Linux 825a8fd6cf8c 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User: apache (48)
PHP: 8.2.20
Disabled: NONE
Upload Files
File: /var/www/html/public/static/js/hookMemberPrice-6fe92525.js
import{getTherapistConfigListWeb as ce,getClinicConfigListWeb as de,AddEditTherapistConfigWeb as me,addEditClinicConfigWeb as le,getOtherConfigListWeb as pe,saveOtherConfigListWeb as _e,DeleteTherapistConfigWeb as ue,deleteClinicConfig as ge}from"./po-4f5ed739.js";import{d as y,u as fe}from"./vue-router-a383d220.js";import{o as A}from"./index-81e4a901.js";import{b7 as n}from"./message-2472a54a.js";import{r as o,A as s,o as be}from"./runtime-core.esm-bundler-6128546f.js";import"./index-74d93170.js";import"./preload-helper-78dc9057.js";import"./vue-i18n.runtime.esm-bundler-6949bcab.js";import"./index-b7f916e1.js";import"./_commonjsHelpers-87174ba5.js";import"./utils-2ab4f76a.js";import"./focus-trap-53f1c6ab.js";import"./error-78e43d3e.js";function Te(){y(),fe(),y();const v=o(),d=o(!1),x=o(!1),l=o(!1),p=o(!1),C=o(!1),P=o(""),f=o([]),b=o([]),w=o([{id:1,text:"First time",value:"first",is_selected:0},{id:2,text:"At a time",value:"time",is_selected:0}]),M=o([{id:1,name:"Therapist"},{id:2,name:"Clinic"},{id:3,name:"Other"}]),r=o([{id:1,month:"",price:""}]),a=s({index:0,month:"",price:"",id:""}),c=s({id:"",person:""}),i=s({Appointment_Reminder_SMS_Fee:"",credit_cart_point:"",no_member_test_days:"",register_member_fixed:"",register_member_point:"",register_member_type:"first",test_invoice_number:"",Daily_login_increases_points:"",Appointment_operation_increases_points:"",Invoice_operation_increases_points:"",Increase_rate_of_purchasing_membership_points:"",Points_redemption_ratio:""}),O=s({}),D=s({tableIndex:0,note:""}),h=s({}),S=s({}),I=s({}),T=s({}),L=s({}),W=s({}),j=s({}),E=s({}),_=s({total:0,pageSize:10,currentPage:1,background:!0,currentPage:1,pageSizes:[10,25,50,100]}),R=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Idx",type:"index",width:70,hide:({checkList:e})=>!e.includes("Idx")},{label:"Member Period (Month)",prop:"month",minWidth:100,hide:({checkList:e})=>!e.includes("Member Period (Month)")},{label:"Price ($)",prop:"price",minWidth:100,hide:({checkList:e})=>!e.includes("Price ($)")},{label:"Action",fixed:"right",width:200,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],B=["Idx","Member Period (Month)","Price ($)","Action"],F=[{type:"selection",width:55,align:"left",hide:({checkList:e})=>!e.includes("勾选列")},{label:"Idx",type:"index",width:70,hide:({checkList:e})=>!e.includes("Idx")},{label:"Persons",prop:"person_show",minWidth:100,hide:({checkList:e})=>!e.includes("Persons")},{label:"Member Price",prop:"price",minWidth:100,slot:"MemberPrice",hide:({checkList:e})=>!e.includes("Member Price")},{label:"Action",fixed:"right",width:200,slot:"operation",hide:({checkList:e})=>!e.includes("Action")}],z=["Idx","Persons","Member Price","Action"];function $(e){_.pageSize=e,m()}function k(e){_.currentPage=e,m()}async function m(){d.value=!0;const{data:e}=await ce(Object.assign(O,{}));f.value=e.data,d.value=!1}async function u(){d.value=!0;const{data:e}=await de(Object.assign(T,{}));b.value=e.data,d.value=!1}const J=(e,t)=>{};function N(e){Object.keys(e).map(t=>{h[t]=e[t]})}async function q(e){const{data:t}=await ue(Object.assign(I,{config_id:e.id}));t.code==1?(m(),n({type:"success",message:t.msg})):n({type:"error",message:t.msg})}const G=e=>{A.confirm("Are you sure you want to delete it",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{q(e)}).catch(()=>{n({type:"info",message:"Canceled"})})};async function H(e){const{data:t}=await ge(Object.assign(W,{config_id:e.id}));t.code==1?(u(),n({type:"success",message:t.msg})):n({type:"error",message:t.msg})}const K=e=>{A.confirm("Are you sure you want to delete it",{confirmButtonText:"confirm",cancelButtonText:"cancel",type:"warning"}).then(()=>{H(e)}).catch(()=>{n({type:"info",message:"Canceled"})})};function Q(){a.id="",a.month="",a.price="",p.value=!0}async function U(e){const{data:t}=await me(Object.assign(S,{id:a.id,month:a.month,price:a.price}));t.code==1?(m(),n({type:"success",message:t.msg}),p.value=!1):n({type:"error",message:t.msg})}function V(e){a.id=e.id,a.month=e.month,a.price=e.price,p.value=!0}function X(){c.id="",c.person="",r.value=[];let e={id:1,month:"",price:""};r.value.push(e),l.value=!0}function Y(e){c.id=e.id,c.person=e.person,r.value=JSON.parse(JSON.stringify(e.member_price)),l.value=!0}async function Z(e){const{data:t}=await le(Object.assign(L,{id:c.id,person:c.person,member_price:r.value}));t.code==1?(u(),n({type:"success",message:t.msg}),l.value=!1):n({type:"error",message:t.msg})}function ee(){let e={id:r.value.length+1,month:"",price:""};r.value.push(e)}function te(e){let t=r.value.findIndex(g=>g.id===e.id);t!==-1&&r.value.splice(t,1),r.value.forEach((g,ae)=>{g.id=ae+1})}function ie(e){i.register_member_type=e.value}async function ne(){const{data:e}=await pe(Object.assign(j,{}));e.code==1?(i.Appointment_Reminder_SMS_Fee=e.data.Appointment_Reminder_SMS_Fee,i.credit_cart_point=e.data.credit_cart_point,i.no_member_test_days=e.data.no_member_test_days,i.register_member_fixed=e.data.register_member_fixed,i.register_member_point=e.data.register_member_point,i.register_member_type=e.data.register_member_type,i.test_invoice_number=e.data.test_invoice_number,i.Daily_login_increases_points=e.data.Daily_login_increases_points,i.Appointment_operation_increases_points=e.data.Appointment_operation_increases_points,i.Invoice_operation_increases_points=e.data.Invoice_operation_increases_points,i.Increase_rate_of_purchasing_membership_points=e.data.Increase_rate_of_purchasing_membership_points,i.Points_redemption_ratio=e.data.Points_redemption_ratio):n({type:"error",message:e.msg})}async function se(){const{data:e}=await _e(Object.assign(E,{config_datas:i}));e.code==1?n({type:"success",message:e.msg}):n({type:"error",message:e.msg})}function oe(){i.register_member_point>100&&(n({type:"error",message:"The maximum limit is 100%"}),i.register_member_point=100)}function re(){i.credit_cart_point>100&&(n({type:"error",message:"The maximum limit is 100%"}),i.credit_cart_point=100)}return be(()=>{m(),u(),ne()}),{loading:d,selectList:B,columns:R,pagination:_,handleSizeChange:$,handleCurrentChange:k,PartList:f,order_date:P,deliverDialog:x,selectClick:J,itemArr:D,addLocationDialog:C,locationArr:h,EditLocation:N,btnDel:G,singleTableRef:v,muneArr:M,TherapistArr:a,AddMemberDialog:p,btnAddForm:Q,onSubmit:U,btnEdit:V,PartList1:b,columns1:F,selectList1:z,AddClinicDialog:l,btnAddClinic:X,clinicArr:c,onSubmitClinic:Z,member_price:r,member_priceDel:te,member_priceAdd:ee,btnEditClinic:Y,btnDelClinic:K,isData:w,selectedTr:ie,otherArr:i,onSubmitOther:se,registerMemberPoint:oe,creditCartPoint:re}}export{Te as useEqu};