import{g as q,e as I}from"./config-6561e667.js";import{M as b,B as N,R as O,F as h,I as B,g as F,p as D,h as M,S as P,e as S,b as T}from"./ui-ba7aaa7e.js";import{e as j,l as z,r as E,P as u,a3 as m,a4 as o,f as l,H as V,a9 as s}from"./vue-bf422dc1.js";import"./index-c2dd6a24.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";import"./icons-a8498fb6.js";const $=j({__name:"index",setup(G){const y=[{label:"系统默认",value:0},{label:"用户ID+时间+顺序号机",value:1}],g=[{label:"商品名称",value:0},{label:"订单编号",value:1},{label:"前缀+订单编号",value:2},{label:"自定义",value:3}],x=[{label:"卖家",value:1},{label:"买家",value:2}],e=z({order_trade_no_type:"",order_trade_no_profix:"",order_title_type:"",order_title_profix:"",order_title_str:"",order_auto_close_time:"",order_query_blackcontact:"",complaint_refund:"",transaction_min_fee:"",fee_payer:"",purchase_agreement:""});(async()=>{const{data:n}=await q({field:Object.keys(e)});for(const t in n)e[t]=n[t]})();const v={order_auto_close_time:[{required:!0,message:"请输入订单超时时间"}]},p=E(),f=async()=>{const n=await p.value.validate();if(typeof n!="object"&&n){const t=await I({data:e});t.code===1?b.success("操作成功"):b.error(t.msg)}};return(n,t)=>{const c=N,d=O,r=h,_=B,k=F,i=D,U=M,C=P,w=S,R=T;return u(),m(R,{title:"订单配置",class:"basic-container",bordered:!1},{actions:o(()=>[l(c,{theme:"primary",onClick:f},{default:o(()=>[V("提交")]),_:1})]),default:o(()=>[l(w,{ref_key:"formRef",ref:p,"label-align":"left",data:e,rules:v,"label-width":150,style:{width:"800px"}},{default:o(()=>[l(r,{label:"订单生成方式",name:"order_trade_no_type",help:""},{default:o(()=>[l(d,{modelValue:e.order_trade_no_type,"onUpdate:modelValue":t[0]||(t[0]=a=>e.order_trade_no_type=a),options:y},null,8,["modelValue"])]),_:1}),e.order_trade_no_type=="0"?(u(),m(r,{key:0,label:"订单号前缀",name:"order_trade_no_profix",help:""},{default:o(()=>[l(_,{modelValue:e.order_trade_no_profix,"onUpdate:modelValue":t[1]||(t[1]=a=>e.order_trade_no_profix=a),clearable:"",placeholder:"请输入网站副标题"},null,8,["modelValue"])]),_:1})):s("",!0),l(r,{label:"订单标题",name:"order_title_type",help:""},{default:o(()=>[l(d,{modelValue:e.order_title_type,"onUpdate:modelValue":t[2]||(t[2]=a=>e.order_title_type=a),options:g},null,8,["modelValue"])]),_:1}),e.order_title_type=="2"?(u(),m(r,{key:1,label:"标题前缀",name:"order_title_profix"},{default:o(()=>[l(_,{modelValue:e.order_title_profix,"onUpdate:modelValue":t[3]||(t[3]=a=>e.order_title_profix=a),clearable:"",placeholder:""},null,8,["modelValue"])]),_:1})):s("",!0),e.order_title_type=="3"?(u(),m(r,{key:2,label:"自定义标题",name:"order_title_str"},{default:o(()=>[l(_,{modelValue:e.order_title_str,"onUpdate:modelValue":t[4]||(t[4]=a=>e.order_title_str=a),clearable:"",placeholder:""},null,8,["modelValue"])]),_:1})):s("",!0),l(r,{label:"禁用简单联系方式",name:"order_query_blackcontact"},{default:o(()=>[l(k,{modelValue:e.order_query_blackcontact,"onUpdate:modelValue":t[5]||(t[5]=a=>e.order_query_blackcontact=a),clearable:"",placeholder:"请输入要禁用的简单联系方式",tips:"防止出现简单联系方式，使用“|”分隔",autosize:{minRows:5,maxRows:10}},null,8,["modelValue"])]),_:1}),l(i),l(r,{label:"投诉退款自动退款",name:"complaint_refund",tips:"投诉退款,买家胜诉时是否自动通过购买渠道退款"},{default:o(()=>[l(d,{modelValue:e.complaint_refund,"onUpdate:modelValue":t[6]||(t[6]=a=>e.complaint_refund=a),options:[{label:"开启",value:1},{label:"关闭",value:0}]},null,8,["modelValue"])]),_:1}),l(i),l(r,{label:"手续费承担方",name:"transaction_min_fee",tips:"手续费承担方"},{default:o(()=>[l(d,{modelValue:e.fee_payer,"onUpdate:modelValue":t[7]||(t[7]=a=>e.fee_payer=a),options:x},null,8,["modelValue"])]),_:1}),l(r,{label:"最低交易手续费",name:"transaction_min_fee",tips:"最低交易手续费"},{default:o(()=>[l(U,{modelValue:e.transaction_min_fee,"onUpdate:modelValue":t[8]||(t[8]=a=>e.transaction_min_fee=a),theme:"normal",min:0,clearable:"",placeholder:"请输入最低交易手续费"},null,8,["modelValue"])]),_:1}),l(i),l(r,{label:"购卡协议链接",name:"purchase_agreement",help:""},{default:o(()=>[l(_,{modelValue:e.purchase_agreement,"onUpdate:modelValue":t[9]||(t[9]=a=>e.purchase_agreement=a),clearable:"",placeholder:"请输入购卡协议链接"},null,8,["modelValue"])]),_:1}),l(r,null,{default:o(()=>[l(C,{size:"small"},{default:o(()=>[l(c,{theme:"primary",onClick:f},{default:o(()=>[V("提交")]),_:1})]),_:1})]),_:1})]),_:1},8,["data"])]),_:1})}}});export{$ as default};
