mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-29 01:40:16 +00:00
2 lines
5.8 KiB
JavaScript
2 lines
5.8 KiB
JavaScript
/* empty css *//* empty css *//* empty css */import{a as U,E as z}from"./el-form-item-1b16c9fc.js";/* empty css *//* empty css *//* empty css *//* empty css */import{t as a}from"./index-0ca94763.js";import{Y as B,Z as P}from"./tourism-6d4e6397.js";import{u as S,a as k}from"./vue-router-48fdc1e3.js";import{E as D}from"./index-e27c3bb0.js";import{E as N,b as F}from"./index-ba04db70.js";import{E as j}from"./index-9ecd3f93.js";import{E as I}from"./index-c5914bde.js";import{v as O}from"./directive-64fb15dc.js";import{d as A,r as h,O as G,e as V,f as L,g as p,B as s,u as l,y as o,x as e,M,v as T,A as n}from"./plugin-vue_export-helper-85a4d40b.js";import"./index-cf9a2dd7.js";import"./event-f85d77b0.js";import"./index-bcd7a424.js";import"./_baseClone-3dbf39d6.js";import"./index-7eafba5f.js";import"./common-c3be41fd.js";import"./index-e513479b.js";import"./el-main-86eb724f.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./index-b9e5f5cb.js";import"./el-overlay-08181e74.js";import"./index-313cd2ce.js";import"./focus-trap-64c402c5.js";import"./index-1ad115d7.js";import"./index-de1d3b53.js";/* empty css */import"./index-d469ae66.js";import"./index-4d8f36c6.js";import"./index-ebc73046.js";const Y={class:"main-container"},Z={class:"flex ml-[18px] justify-between items-center mt-[20px] mb-[5px]"},$={class:"text-[20px]"},q={class:"panel-title !text-sm"},H={class:"panel-title !text-sm"},J={class:"panel-title !text-sm"},K={class:"fixed-footer-wrap"},Q={class:"fixed-footer"},Fe=A({__name:"setting",setup(W){const v=S();k();const y=v.meta.title,u=h(!0),w=h(),r=G({hotel:{order_close:"",is_allow_refund:"0",refund_rate:""},scenic:{order_close:"",is_allow_refund:"0",refund_rate:""},way:{order_close:"",is_allow_refund:"0",refund_rate:""}}),g=async()=>{const m=await(await B()).data;Object.keys(r).forEach(t=>{m[t]!=null&&(r[t]=m[t])}),u.value=!1},x=async m=>{u.value||!m||await m.validate(async t=>{t&&(u.value=!0,P(r).then(()=>{u.value=!1}).catch(()=>{u.value=!1}))})};return g(),(m,t)=>{const _=D,i=U,f=N,b=F,c=j,R=z,E=I,C=O;return V(),L("div",Y,[p("div",Z,[p("span",$,s(l(y)),1)]),o(c,{class:"box-card !border-none",shadow:"never"},{default:e(()=>[M((V(),T(R,{model:r,"label-width":"150px",ref_key:"formRef",ref:w,rules:m.formRules,class:"page-form"},{default:e(()=>[o(c,{class:"box-card !border-none",shadow:"never"},{default:e(()=>[p("h3",q,s(l(a)("hotelSetting")),1),o(i,{label:l(a)("orderClose")},{default:e(()=>[o(_,{modelValue:r.hotel.order_close,"onUpdate:modelValue":t[0]||(t[0]=d=>r.hotel.order_close=d),placeholder:l(a)("orderClosePlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n(s(l(a)("second")),1)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),o(i,{label:l(a)("isRefund")},{default:e(()=>[o(b,{modelValue:r.hotel.is_allow_refund,"onUpdate:modelValue":t[1]||(t[1]=d=>r.hotel.is_allow_refund=d),class:"ml-4"},{default:e(()=>[o(f,{label:"0",size:"large"},{default:e(()=>[n(s(l(a)("no")),1)]),_:1}),o(f,{label:"1",size:"large"},{default:e(()=>[n(s(l(a)("yes")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l(a)("refundRatio")},{default:e(()=>[o(_,{modelValue:r.hotel.refund_rate,"onUpdate:modelValue":t[2]||(t[2]=d=>r.hotel.refund_rate=d),placeholder:l(a)("refundRatioPlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n("%")]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(c,{class:"box-card !border-none",shadow:"never"},{default:e(()=>[p("h3",H,s(l(a)("scenicSetting")),1),o(i,{label:l(a)("orderClose")},{default:e(()=>[o(_,{modelValue:r.scenic.order_close,"onUpdate:modelValue":t[3]||(t[3]=d=>r.scenic.order_close=d),placeholder:l(a)("orderClosePlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n(s(l(a)("second")),1)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),o(i,{label:l(a)("isRefund")},{default:e(()=>[o(b,{modelValue:r.scenic.is_allow_refund,"onUpdate:modelValue":t[4]||(t[4]=d=>r.scenic.is_allow_refund=d),class:"ml-4"},{default:e(()=>[o(f,{label:"0",size:"large"},{default:e(()=>[n(s(l(a)("no")),1)]),_:1}),o(f,{label:"1",size:"large"},{default:e(()=>[n(s(l(a)("yes")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l(a)("refundRatio")},{default:e(()=>[o(_,{modelValue:r.scenic.refund_rate,"onUpdate:modelValue":t[5]||(t[5]=d=>r.scenic.refund_rate=d),placeholder:l(a)("refundRatioPlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n("%")]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),o(c,{class:"box-card !border-none",shadow:"never"},{default:e(()=>[p("h3",J,s(l(a)("waySetting")),1),o(i,{label:l(a)("orderClose")},{default:e(()=>[o(_,{modelValue:r.way.order_close,"onUpdate:modelValue":t[6]||(t[6]=d=>r.way.order_close=d),placeholder:l(a)("orderClosePlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n(s(l(a)("second")),1)]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),o(i,{label:l(a)("isRefund")},{default:e(()=>[o(b,{modelValue:r.way.is_allow_refund,"onUpdate:modelValue":t[7]||(t[7]=d=>r.way.is_allow_refund=d),class:"ml-4"},{default:e(()=>[o(f,{label:"0",size:"large"},{default:e(()=>[n(s(l(a)("no")),1)]),_:1}),o(f,{label:"1",size:"large"},{default:e(()=>[n(s(l(a)("yes")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o(i,{label:l(a)("refundRatio")},{default:e(()=>[o(_,{modelValue:r.way.refund_rate,"onUpdate:modelValue":t[8]||(t[8]=d=>r.way.refund_rate=d),placeholder:l(a)("refundRatioPlaceholder"),class:"input-width",type:"number"},{append:e(()=>[n("%")]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model","rules"])),[[C,u.value]]),p("div",K,[p("div",Q,[o(E,{type:"primary",loading:u.value,onClick:t[9]||(t[9]=d=>x(w.value))},{default:e(()=>[n(s(l(a)("save")),1)]),_:1},8,["loading"])])])]),_:1})])}}});export{Fe as default};
|