import{aa as k,d as T,a6 as P,r as G,b as V,c as i,e as _,k as p,i as u,u as l,h as o,f as y,j as C,m as n,t as A,F as x,A as b,g as D,E as O}from"./index.0308b213.js";import{g as j}from"./batch_setting.432aac7b.js";const M=c=>k.request({url:"agent/plugin.thirdDelivery.uu_pt/getConfig",method:"GET",params:c}),H=c=>k.request({url:"agent/plugin.thirdDelivery.uu_pt/setConfig",method:"POST",data:c}),I=()=>k.request({url:"agent/plugin.thirdDelivery.uu_pt/getStoreList",method:"GET"}),J=n("\u5F00\u542F"),K=n("\u5173\u95ED"),Q=n("\u5F00\u542F"),R=n("\u5173\u95ED"),W=D("div",{class:"tn-form-item__tips"},"\u5F00\u542F\u6B64\u9879\u8BBE\u7F6E\u540E\uFF0C\u5916\u5356\u8BA2\u5355\u5728\u901A\u77E5\u9A91\u624B\u540E\u4F1A\u81EA\u52A8\u63A8\u9001\u5230uu\u8DD1\u817F",-1),X=D("div",{class:"tn-form-item__tips"},'\u6709"\u5E02"\u5FC5\u987B\u5E26"\u5E02"',-1),Y=n("\u540C\u6B65\u5230\u6240\u6709\u5546\u6237"),Z=n("\u540C\u6B65\u5230\u6307\u5B9A\u5546\u6237"),$=n("\u540C\u6B65\u5230\u6240\u6709\u5546\u5708"),ee=n("\u540C\u6B65\u5230\u6307\u5B9A\u5546\u5708"),te=n("\u63D0\u4EA4"),ue={key:1},ae=T({setup(c){const{OpPlatform:f}=P();G(window.location.protocol+"//"+window.location.host);const U=V({area_id:""}),e=V({is_open:0,is_auto_push:0,app_id:"",app_key:"",open_id:"",city:"",extra_sync:1,sids_string:""}),v=()=>{f.value==="agent"&&H(e).then(s=>{O.success("\u8BBE\u7F6E\u6210\u529F"),F()})},F=()=>{f.value==="agent"&&(w(),S(),M(U).then(s=>{console.log("res",s),e.is_open=s.is_open,e.is_auto_push=s.is_auto_push,e.app_id=s.app_id,e.app_key=s.app_key,e.open_id=s.open_id,e.city=s.city,e.sids_string=s.sids_string}))},g=V({stores:[],areas:[]}),w=()=>{j().then(s=>{console.log("res",s),g.stores=s.stores,g.areas=s.areas})},L=V({list:[]}),S=()=>{I().then(s=>{console.log("res",s),L.list=s})};return F(),(s,a)=>{const r=i("el-radio"),E=i("el-radio-group"),d=i("el-form-item"),m=i("el-input"),h=i("el-checkbox"),B=i("el-checkbox-group"),q=i("el-button"),z=i("el-form"),N=i("el-card");return _(),p(N,{shadow:"always",style:{"margin-top":"20px"}},{default:u(()=>[l(f)=="agent"?(_(),p(z,{key:0,"label-width":"120px"},{default:u(()=>[o(d,{label:"uu\u8DD1\u817F\u5BF9\u63A5"},{default:u(()=>[o(E,{modelValue:l(e).is_open,"onUpdate:modelValue":a[0]||(a[0]=t=>l(e).is_open=t)},{default:u(()=>[o(r,{label:1},{default:u(()=>[J]),_:1}),o(r,{label:0},{default:u(()=>[K]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(d,{label:"\u81EA\u52A8\u63A8\u9001\u8BA2\u5355"},{default:u(()=>[o(E,{modelValue:l(e).is_auto_push,"onUpdate:modelValue":a[1]||(a[1]=t=>l(e).is_auto_push=t)},{default:u(()=>[o(r,{label:1},{default:u(()=>[Q]),_:1}),o(r,{label:0},{default:u(()=>[R]),_:1})]),_:1},8,["modelValue"]),W]),_:1}),o(d,{label:"app_id"},{default:u(()=>[o(m,{modelValue:l(e).app_id,"onUpdate:modelValue":a[2]||(a[2]=t=>l(e).app_id=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"app_key"},{default:u(()=>[o(m,{modelValue:l(e).app_key,"onUpdate:modelValue":a[3]||(a[3]=t=>l(e).app_key=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"open_id"},{default:u(()=>[o(m,{modelValue:l(e).open_id,"onUpdate:modelValue":a[4]||(a[4]=t=>l(e).open_id=t)},null,8,["modelValue"])]),_:1}),o(d,{label:"\u57CE\u5E02"},{default:u(()=>[o(m,{modelValue:l(e).city,"onUpdate:modelValue":a[5]||(a[5]=t=>l(e).city=t)},null,8,["modelValue"]),X]),_:1}),o(d,{label:"\u53C2\u4E0E\u7684\u7528\u6237"},{default:u(()=>[o(m,{modelValue:l(e).sids_string,"onUpdate:modelValue":a[6]||(a[6]=t=>l(e).sids_string=t),type:"textarea",rows:7,disabled:!0},null,8,["modelValue"])]),_:1}),o(d,{label:"\u53C2\u4E0E\u7684\u5546\u6237"},{default:u(()=>[o(E,{modelValue:l(e).extra_sync,"onUpdate:modelValue":a[7]||(a[7]=t=>l(e).extra_sync=t)},{default:u(()=>[o(r,{label:1,size:"large"},{default:u(()=>[Y]),_:1}),o(r,{label:2,size:"large"},{default:u(()=>[Z]),_:1}),o(r,{label:3,size:"large"},{default:u(()=>[$]),_:1}),o(r,{label:4,size:"large"},{default:u(()=>[ee]),_:1})]),_:1},8,["modelValue"]),l(e).extra_sync===2?(_(),p(B,{key:0,modelValue:l(e).store_ids,"onUpdate:modelValue":a[8]||(a[8]=t=>l(e).store_ids=t)},{default:u(()=>[(_(!0),y(x,null,C(l(g).stores,t=>(_(),p(h,{key:t.id,label:t.id},{default:u(()=>[n(A(t.title),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])):b("",!0),l(e).extra_sync===4?(_(),p(B,{key:1,modelValue:l(e).area_ids,"onUpdate:modelValue":a[9]||(a[9]=t=>l(e).area_ids=t)},{default:u(()=>[(_(!0),y(x,null,C(l(g).areas,t=>(_(),p(h,{key:t.id,label:t.id},{default:u(()=>[n(A(t.title),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])):b("",!0)]),_:1}),o(d,{label:"",class:"continer-item"},{default:u(()=>[o(q,{type:"primary",onClick:v},{default:u(()=>[te]),_:1})]),_:1})]),_:1})):b("",!0),l(f)=="shangpu"?(_(),y("span",ue,"\u8BF7\u5728\u4EE3\u7406\u540E\u53F0\u914D\u7F6E")):b("",!0)]),_:1})}}});export{ae as default};
