1 |
- /* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{c as e}from"./index-36356b8e.js";import{f as a}from"./index-32e9a307.js";import{d as l,x as t,m as s,y as r,X as i,o,l as m,w as d,a as n,e as u,b as p,c,F as v,z as f,t as h,a5 as _,a3 as g,a4 as b,D as x,G as y,U as j,Z as C,a0 as V,av as w,aw as k,_ as F}from"./index-31fd0fad.js";/* empty css *//* empty css */import"./http-81caf32c.js";/* empty css */const U=e=>(w("data-v-2d100164"),e=e(),k(),e),q=U((()=>u("div",{class:"flex items-center"},[u("span",{class:"mr-1 text-red-600"},"*"),p("充值模板配置 ")],-1))),J={class:"flex flex-col"},O={class:"flex items-center"},G=U((()=>u("div",{style:{width:"80px","text-align":"end"},class:"mb-3 mr-2"},"首充模板:",-1))),N={class:"flex items-center"},S=U((()=>u("div",{style:{width:"80px","text-align":"end"},class:"mr-2"},"非首充模板:",-1))),z={class:"flex justify-end"},D=F(l({__name:"detailForm",props:{primary:Object},emits:["close"],setup(l,{emit:w}){var k;const F=l,U=t(),D=s(),E=s({});s(!1);const H=s(!1),I=s([]),K=s([]);F.primary&&(F.primary,(null==(k=F.primary)?void 0:k.video_id)&&(E.value=JSON.parse(JSON.stringify(F.primary))));const L=(e,a)=>{switch(a){case"firstCharge":X("firstCharge",{name:e});break;case"notFirstCharge":X("notFirstCharge",{name:e})}},M=()=>{U.push({path:"/chargeManage/charge"})},X=(e,l)=>{switch(e){case"firstCharge":a({limit:999,type:1,...l}).then((e=>{I.value=e.data}));break;case"notFirstCharge":a({limit:999,type:2,...l}).then((e=>{K.value=e.data}))}};return r((()=>{X("firstCharge"),X("notFirstCharge")})),(a,l)=>{const t=g,s=b,r=x,k=y,F=j,X=C,Z=V;return i((o(),m(X,{model:E.value,"label-width":"120px",ref_key:"form",ref:D,class:"pr-4"},{default:d((()=>[n(s,{label:"推广名称",prop:"name",rules:[{required:!0,message:"推广名称必须填写"}]},{default:d((()=>[n(t,{modelValue:E.value.name,"onUpdate:modelValue":l[0]||(l[0]=e=>E.value.name=e),name:"name",clearable:""},null,8,["modelValue"])])),_:1}),n(s,{label:"入口剧集",prop:"series_sequence",rules:[{required:!1,message:"入口剧集必须填写"}]},{default:d((()=>[n(t,{disabled:"",modelValue:E.value.series_name,"onUpdate:modelValue":l[1]||(l[1]=e=>E.value.series_name=e),name:"author",clearable:""},null,8,["modelValue"])])),_:1}),n(s,{label:"充值模板配置"},{label:d((()=>[q])),default:d((()=>[u("div",{class:"items-center w-full withdraw-popup-warn"},[u("div",null,[p("如果没有目标充值模板,请前往"),u("span",{class:"text-lg font-bold text-blue-400 cursor-pointer",onClick:M},"充值管理"),p("进行添加 ")])]),u("div",J,[u("div",O,[G,n(k,{modelValue:E.value.first_charge_template_id,"onUpdate:modelValue":l[2]||(l[2]=e=>E.value.first_charge_template_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{L(e,"firstCharge")},placeholder:"请选择首充模板"},{default:d((()=>[(o(!0),c(v,null,f(I.value,((e,a)=>(o(),m(r,{key:a,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])]),u("div",N,[S,n(k,{modelValue:E.value.not_first_charge_template_id,"onUpdate:modelValue":l[3]||(l[3]=e=>E.value.not_first_charge_template_id=e),filterable:"",remote:"",clearable:"","remote-method":e=>{L(e,"notFirstCharge")},placeholder:"请选择非首充模板"},{default:d((()=>[(o(!0),c(v,null,f(K.value,((e,a)=>(o(),m(r,{key:a,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue","remote-method"])])])])),_:1}),u("div",z,[n(F,{type:"primary",onClick:l[4]||(l[4]=a=>{return l=D.value,E.value.first_charge_template_id?E.value.not_first_charge_template_id?void(l&&l.validate((a=>{a&&e(E.value).then((e=>{_.success(e.message),H.value=!1,w("close"),U.push({path:"/promotion/promotionList",query:{tab:0}})}))})).then((()=>{}))):_.error("请选择非首充模板"):_.error("请选择首充模板");var l})},{default:d((()=>[p(h(a.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[Z,a.loading]])}}}),[["__scopeId","data-v-2d100164"]]);export{D as default};
|