import{_ as e,r as a,b as r,cK as t,d as l,e as o,f as d,h as i,w as s,g as m,j as p,k as c,i as n,n as u,E as f,q as _,t as b,v}from"./index.286e9b79.js";import{v as g}from"./loading.c49775a6.js";import{E as h,a as j}from"./form.ad10dcd5.js";import{E as x,a as V}from"./tab-pane.1cc0f769.js";import"./form-item.9355e6dc.js";import{E as w}from"./input.31de1b37.js";import{_ as y}from"./page-header.29890ed0.js";import{g as q,p as E}from"./http.f588794f.js";import"./_initCloneObject.fb8fbaea.js";import"./strings.8c60bfae.js";import"./event.776e7e11.js";import"./index.ed3ed02e.js";import"./divider.948c4b18.js";const U=e=>(b("data-v-677fbea1"),e=e(),v(),e),k={class:"editor-card"},M={class:"editor-card-box"},C=U((()=>i("div",{class:"form-item-tips"},"未付款订单取消的时间间隔，单位为天",-1))),F=U((()=>i("div",{class:"form-item-tips"},"已付款的订单完成的时间间隔，单位为天",-1))),I=U((()=>i("div",{class:"form-item-tips"},"发货后的订单自动确认收货时间，单位为天",-1))),K={class:"tool"},O={class:"tool-box"},R=e({__name:"setting",setup(e){let b=a(!1),v=a(!1),U=a("0"),R=a(),z=r({order:{cancel_time:1,complete_time:15,confirm_time:10}});const A=r({cancel_time:[{required:!0,message:"请输入取消时间",trigger:"blur"}],complete_time:[{required:!0,message:"请输入完成时间",trigger:"blur"}],confirm_time:[{required:!0,message:"请输入收货时间",trigger:"blur"}]});v.value=!0,q("order.index/setting").then((e=>{v.value=!1,e.code&&!t(e.data)&&(z.order=e.data)}));const B=async()=>{R.value&&await R.value.validate(((e,a)=>{v.value=!1,e?(v.value=!0,E("order.index/setting",z).then((e=>{v.value=!1,e.code?f.success("操作成功"):f.error(e.msg)})).catch((e=>{f.error(e)}))):f.error("请完善内容")}))};return(e,a)=>{const r=y,t=w,f=h,q=x,E=V,D=j,G=_,H=g;return l(),o("div",null,[d(r,{title:"订单设置"}),i("div",k,[s((l(),p(D,{model:m(z).order,rules:m(A),ref_key:"ruleFormRef",ref:R},{default:c((()=>[i("div",M,[d(E,{modelValue:m(U),"onUpdate:modelValue":a[3]||(a[3]=e=>n(U)?U.value=e:U=e)},{default:c((()=>[d(q,{label:"基本信息",name:"0"},{default:c((()=>[d(f,{label:"取消时间",prop:"cancel_time","label-width":"100px"},{default:c((()=>[d(t,{modelValue:m(z).order.cancel_time,"onUpdate:modelValue":a[0]||(a[0]=e=>m(z).order.cancel_time=e),modelModifiers:{number:!0},placeholder:"请输入取消时间",style:{width:"500px"}},{append:c((()=>[u("天")])),_:1},8,["modelValue"]),C])),_:1}),d(f,{label:"完成时间",prop:"complete_time","label-width":"100px"},{default:c((()=>[d(t,{modelValue:m(z).order.complete_time,"onUpdate:modelValue":a[1]||(a[1]=e=>m(z).order.complete_time=e),modelModifiers:{number:!0},placeholder:"请输入完成时间",style:{width:"500px"}},{append:c((()=>[u("天")])),_:1},8,["modelValue"]),F])),_:1}),d(f,{label:"收货时间",prop:"confirm_time","label-width":"100px"},{default:c((()=>[d(t,{modelValue:m(z).order.confirm_time,"onUpdate:modelValue":a[2]||(a[2]=e=>m(z).order.confirm_time=e),modelModifiers:{number:!0},placeholder:"请输入收货时间",style:{width:"500px"}},{append:c((()=>[u("天")])),_:1},8,["modelValue"]),I])),_:1})])),_:1})])),_:1},8,["modelValue"])])])),_:1},8,["model","rules"])),[[H,m(b)]])]),i("div",K,[i("div",O,[d(G,{type:"primary",loading:m(v),onClick:B},{default:c((()=>[u("保存")])),_:1},8,["loading"])])])])}}},[["__scopeId","data-v-677fbea1"]]);export{R as default};
