import{az as h,d as z,b as V,c as i,e as s,f as r,h as a,i as l,u as c,F as m,j as g,k as f,g as v,m as u,t as B,E as I,_ as M}from"./index.0308b213.js";const T=()=>h.get("addon/alipayRelationship.web.alipay_relationship_detail/getSetting"),G=F=>h.post("addon/alipayRelationship.web.alipay_relationship_detail/setSetting",F),H=()=>h.get("addon/alipayRelationship.web.alipay_relationship_detail/getAgentList"),J=()=>h.get("addon/alipayRelationship.web.alipay_relationship_detail/getStoreAreaList"),K={class:"setting-form"},O={style:{display:"flex",width:"100%"}},P=u("\u5220\u9664"),Q=u("\u6DFB\u52A0\u4EE3\u7406\u8D26\u53F7"),W={style:{display:"flex",width:"100%"}},X=u("\u5220\u9664"),Y=u("\u6DFB\u52A0\u5546\u5708\u8D26\u53F7"),Z={class:"operation-btn"},ee=u("\u63D0\u4EA4"),te=z({setup(F){const o=V({is_open:0,username:"",password:"",dev_code:"",dev_key:"",channelid:"",order_dinner_url:"",movie_ticket_url:"",slow_put_ticket_increase:0,fast_put_ticket_increase:0,total_increase:0,cinema_show_discount:0,buy_limit_percent:0,order_dinner_unit_price_percent:0,order_dinner_total_price_percent:0}),w=V({list:[]}),x=V({list:[]}),C=()=>{G(o).then(e=>{console.log(e),I.success("\u8BBE\u7F6E\u6210\u529F")})},D=()=>{T().then(e=>{console.log(e),o.platform_account=e.data.platform_account,o.agent_details=e.data.agent_details,o.circle_details=e.data.circle_details,console.log("setting",o)})},U=()=>{H().then(e=>{console.log(e),w.list=e})};(()=>{J().then(e=>{console.log(e),x.list=e})})(),U(),D();const L=()=>{o.agent_details.push({agentid:"",account:""})},S=e=>{o.agent_details.splice(e,1)},R=()=>{o.circle_details.push({store_areaid:"",account:""})},$=e=>{o.circle_details.splice(e,1)};return(e,d)=>{const y=i("el-input"),_=i("el-form-item"),E=i("el-option"),A=i("el-select"),p=i("el-link"),N=i("el-form"),k=i("el-card"),j=i("el-button");return s(),r("div",K,[a(k,{shadow:"always",style:{"margin-top":"20px"}},{default:l(()=>[a(N,{"label-width":"170px"},{default:l(()=>[a(_,{label:"\u5E73\u53F0\u8D26\u53F7"},{default:l(()=>[a(y,{modelValue:c(o).platform_account,"onUpdate:modelValue":d[0]||(d[0]=n=>c(o).platform_account=n)},null,8,["modelValue"])]),_:1}),(s(!0),r(m,null,g(c(o).agent_details,(n,b)=>(s(),f(_,{label:"\u4EE3\u7406\u8BBE\u7F6E",prop:"agent_details"},{default:l(()=>[v("view",O,[a(A,{class:"tn-el-form-item--item",modelValue:n.agentid,"onUpdate:modelValue":t=>n.agentid=t,placeholder:"\u8BF7\u9009\u62E9\u4EE3\u7406",filterable:"",clearable:""},{default:l(()=>[(s(!0),r(m,null,g(c(w).list,(t,q)=>(s(),f(E,{value:t.id,label:t.title},{default:l(()=>[u(B(t.title),1)]),_:2},1032,["value","label"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]),a(y,{modelValue:n.account,"onUpdate:modelValue":t=>n.account=t,placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",style:{"margin-left":"10px",width:"100px"}},null,8,["modelValue","onUpdate:modelValue"]),a(p,{type:"danger",onClick:t=>S(b),style:{"margin-left":"10px"}},{default:l(()=>[P]),_:2},1032,["onClick"])])]),_:2},1024))),256)),a(_,{label:""},{default:l(()=>[a(p,{type:"primary",onClick:d[1]||(d[1]=n=>L())},{default:l(()=>[Q]),_:1})]),_:1}),(s(!0),r(m,null,g(c(o).circle_details,(n,b)=>(s(),f(_,{label:"\u5546\u5708\u8BBE\u7F6E",prop:"circle_details"},{default:l(()=>[v("view",W,[a(A,{class:"tn-el-form-item--item",modelValue:n.store_areaid,"onUpdate:modelValue":t=>n.store_areaid=t,placeholder:"\u8BF7\u9009\u62E9\u5546\u5708",filterable:"",clearable:""},{default:l(()=>[(s(!0),r(m,null,g(c(x).list,(t,q)=>(s(),f(E,{value:t.id,label:t.title},{default:l(()=>[u(B(t.title),1)]),_:2},1032,["value","label"]))),256))]),_:2},1032,["modelValue","onUpdate:modelValue"]),a(y,{modelValue:n.account,"onUpdate:modelValue":t=>n.account=t,placeholder:"\u8BF7\u8F93\u5165\u8D26\u53F7",style:{"margin-left":"10px",width:"100px"}},null,8,["modelValue","onUpdate:modelValue"]),a(p,{type:"danger",onClick:t=>$(b),style:{"margin-left":"10px"}},{default:l(()=>[X]),_:2},1032,["onClick"])])]),_:2},1024))),256)),a(_,{label:""},{default:l(()=>[a(p,{type:"primary",onClick:d[2]||(d[2]=n=>R())},{default:l(()=>[Y]),_:1})]),_:1})]),_:1})]),_:1}),a(k,{shadow:"always",style:{"margin-top":"20px"}},{default:l(()=>[v("div",Z,[a(j,{type:"primary",onClick:C},{default:l(()=>[ee]),_:1})])]),_:1})])}}});const oe=M(te,[["__scopeId","data-v-1a1b3f45"]]);export{oe as default};
