1 |
- import{v as s,c as a,e,f as t,w as l,j as d,z as o,u as c,p as u,t as i,g as r,s as n,Q as f,y as p,i as y}from"./index-9880b451.js";import{f as _}from"./useGoods.bdd1c2ea.js";import{_ as m}from"./_plugin-vue_export-helper.1b428a4d.js";const b=m({__name:"s-coupon-list",props:{data:{type:Object,default:{}},disabled:{type:Boolean,default:!1},type:{type:String,default:"coupon"}},setup(m){const b=m;s({});const x=a((()=>"coupon"!==b.type&&1!==b.data.status));return(s,a)=>{const b=y;return e(),t(b,{class:"ss-m-20",style:p({opacity:m.disabled?"0.5":"1"})},{default:l((()=>[d(b,{class:"content"},{default:l((()=>[d(b,{class:o(["tag ss-flex ss-row-center",c(x)?"disabled-bg-color":"info-bg-color"])},{default:l((()=>[u(i(1===m.data.discountType?"满减券":"折扣券"),1)])),_:1},8,["class"]),d(b,{class:"title ss-m-x-30 ss-p-t-18"},{default:l((()=>[d(b,{class:"ss-flex ss-row-between"},{default:l((()=>[d(b,{class:o(["value-text ss-flex-1 ss-m-r-10",c(x)?"disabled-color":"info-color"])},{default:l((()=>[u(i(m.data.name),1)])),_:1},8,["class"]),d(b,null,{default:l((()=>[d(b,{class:o(["ss-flex ss-col-bottom",c(x)?"disabled-color":"price-text"])},{default:l((()=>[1===m.data.discountType?(e(),t(b,{key:0,class:"value-reduce ss-m-b-10"},{default:l((()=>[u("¥")])),_:1})):r("",!0),d(b,{class:"value-price"},{default:l((()=>[u(i(1===m.data.discountType?c(_)(m.data.discountPrice):m.data.discountPercent/10),1)])),_:1}),2===m.data.discountType?(e(),t(b,{key:1,class:"value-discount ss-m-b-10 ss-m-l-4"},{default:l((()=>[u("折")])),_:1})):r("",!0)])),_:1},8,["class"])])),_:1})])),_:1}),d(b,{class:"ss-flex ss-row-between ss-m-t-16"},{default:l((()=>[2===m.data.validityType?(e(),t(b,{key:0,class:o(["sellby-text",c(x)?"disabled-color":"subtitle-color"])},{default:l((()=>[u(" 有效期:领取后 "+i(m.data.fixedEndTerm)+" 天内可用 ",1)])),_:1},8,["class"])):(e(),t(b,{key:1,class:o(["sellby-text",c(x)?"disabled-color":"subtitle-color"])},{default:l((()=>[u(" 有效期: "+i(c(n).$helper.timeFormat(m.data.validStartTime,"yyyy-mm-dd"))+" 至 "+i(c(n).$helper.timeFormat(m.data.validEndTime,"yyyy-mm-dd")),1)])),_:1},8,["class"])),d(b,{class:o(["value-enough",c(x)?"disabled-color":"subtitle-color"])},{default:l((()=>[u(" 满 "+i(c(_)(m.data.usePrice))+" 可用 ",1)])),_:1},8,["class"])])),_:1})])),_:1})])),_:1}),d(b,{class:"desc ss-flex ss-row-between"},{default:l((()=>[d(b,null,{default:l((()=>[d(b,{class:"desc-title"},{default:l((()=>[u(i(m.data.description),1)])),_:1}),d(b,null,{default:l((()=>[f(s.$slots,"reason",{},void 0,!0)])),_:3})])),_:3}),d(b,null,{default:l((()=>[f(s.$slots,"default",{},void 0,!0)])),_:3})])),_:3})])),_:3},8,["style"])}}},[["__scopeId","data-v-d18bc974"]]);export{b as _};
|