| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="å¥é¤è¯¦æ
" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close" |
| | | @confirm="close"> |
| | | <div class="detail_header"> |
| | | <div class="sp_bew"> |
| | | <div class="left"> |
| | | <el-image v-if="detail.fullImgurl" :src="detail.fullImgurl" class="img" /> |
| | | <div class="title_wrap"> |
| | | <div> |
| | | <span class="title">{{ detail.name }}</span> |
| | | <span class="status">{{ detail.status == '0' ? 'å·²å¯ç¨' : 'ç¦ç¨' }}</span> |
| | | </div> |
| | | <div class="placeholder9 mt10">æ¯æ¥éå®ééï¼{{ detail.saleDayLimit || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="item"> |
| | | <div class="key">æ»åæ¾æ°é</div> |
| | | <div class="value">{{ detail.saleLimit || '-' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="key">å·²é宿°é</div> |
| | | <div class="value">{{ detail.saleNum }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="key">å©ä½æ°é</div> |
| | | <div v-if="detail.saleLimit" class="value">{{ detail.saleLimit - detail.saleNum }}</div> |
| | | <div v-else class="value">-</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="createTime_wrap"> |
| | | <span class="item">å建æ¶é´ï¼{{ detail.createDate }}</span> |
| | | <span class="item">å建人ï¼{{ detail.creatorName }}</span> |
| | | <span class="item">æåæ´æ°æ¶é´ï¼{{ detail.editDate }}</span> |
| | | <span class="item">æ´æ°äººï¼{{ detail.editorName }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="separate" /> |
| | | <div class="property-title">å¥é¤å±æ§</div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤åç§°ï¼</div> |
| | | <div class="value">{{ detail.name }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤ç±»åï¼</div> |
| | | <div v-if="detail.type == '0'" class="value">æéå¡</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ¯æ¥éªè¡éå¶ï¼</div> |
| | | <div class="value"> |
| | | <span>{{ detail.limitType == 0 ? 'ä¸éå¶' : detail.limitTime + 'åé' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤ç®ä»ï¼</div> |
| | | <div class="value"> |
| | | <div>{{ detail.descs }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="property-title">éç¨è§å</div> |
| | | <div class="line"> |
| | | <div class="key">é宿¶é´æ®µï¼</div> |
| | | <div class="value">{{ detail.startDate }} è³ {{ detail.endDate }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">ä½¿ç¨æ¶é´ï¼</div> |
| | | <div class="value" v-if="detail.useType == 0">{{ detail.useStartDate }} è³ {{ detail.useEndDate }}å
ææ</div> |
| | | <div class="value" v-if="detail.useType == 1">è´ä¹°åç«å³çæï¼æææ{{ detail.useDays }}天</div> |
| | | <div class="value" v-if="detail.useType == 2">èª{{ detail.useStartDate }}èµ·{{ detail.useDays }}天å
ææ</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨èå´ï¼</div> |
| | | <div class="value">{{ detail.useWorkday == 1 ? '工使¥' : ''}} {{ detail.useWorkday && detail.useHoliday ? '|' : '' }} {{ detail.useHoliday == 1 ? 'è忥' : '' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨é¡¹ç®ï¼</div> |
| | | <div class="value">{{ detail.isbike == 1 ? 'èªè¡è½¦' : '' }} {{ detail.isbike && detail.iselecbike ? '|' : '' }} {{ detail.iselecbike == 1 ? 'çµå¨è½¦' :'' }}</div> |
| | | |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ»éé¢ï¼</div> |
| | | <div class="value">{{ detail.saleLimit || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ¯æ¥éé¢ï¼</div> |
| | | <div class="value">{{ detail.saleDayLimit || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | <script> |
| | | import { comboDetailPost } from '@/api/business/combo.js' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: 'ComboDetail', |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowModal: false, |
| | | isLoading: false, |
| | | activeTab: '0', |
| | | detail: {}, |
| | | pagination: { |
| | | page: 1, |
| | | rows: 10 |
| | | }, |
| | | totalCount: 0, |
| | | dataList: [], |
| | | tableLoading: false |
| | | } |
| | | }, |
| | | created() { |
| | | // this.detail = this.$route.query |
| | | // this.comboDetail() |
| | | }, |
| | | methods: { |
| | | mealsCancelUseBtn(businessId, mealsMemberId) { |
| | | const that = this |
| | | this.$alert('ç¡®å®è¦æ¤é使ç¨ï¼', 'æ¤é使ç¨', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | callback: action => { |
| | | if (action === 'confirm') { |
| | | mealsCancelUse({ |
| | | param: { |
| | | businessId, mealsMemberId |
| | | } |
| | | }).then((res) => { |
| | | if (res.errorCode === '000000') { |
| | | that.$message.success('æ¤éä½¿ç¨æå') |
| | | that.comboDetail() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getDetail(id) { |
| | | comboDetailPost(id).then(res => { |
| | | console.log('res', res) |
| | | |
| | | this.detail = res |
| | | }, () => { |
| | | |
| | | }) |
| | | }, |
| | | tabClick(val) { |
| | | this.comboDetail(this.detail) |
| | | }, |
| | | goBack() { |
| | | this.$router.replace(`/combo/salesRecord`) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | currentPageChange(val) { |
| | | this.pagination.page = val |
| | | this.comboDetail() |
| | | }, |
| | | pageSizeChange(val) { |
| | | this.pagination.rows = val |
| | | this.comboDetail() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/variables.scss"; |
| | | |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | font-size: 14px; |
| | | |
| | | // padding-left: 16px; |
| | | .key { |
| | | color: #666666; |
| | | width: 100px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .value { |
| | | color: #222222; |
| | | } |
| | | } |
| | | |
| | | .detail_header { |
| | | font-size: 14px; |
| | | |
| | | .sp_bew { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .left { |
| | | display: flex; |
| | | |
| | | .img { |
| | | width: 50px; |
| | | height: 50px; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #222222; |
| | | } |
| | | |
| | | .status { |
| | | border-radius: 2px; |
| | | border: 1px solid $primaryColor; |
| | | color: $primaryColor; |
| | | margin-left: 10px; |
| | | padding: 0 4px; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | display: flex; |
| | | background-color: #F4F7FC; |
| | | border-radius: 2px; |
| | | |
| | | .item { |
| | | padding: 14px 20px; |
| | | |
| | | .key { |
| | | font-size: 12px; |
| | | color: #666666; |
| | | } |
| | | |
| | | .value { |
| | | margin-top: 8px; |
| | | color: #222222; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .createTime_wrap { |
| | | display: flex; |
| | | /* justify-content: flex-end; */ |
| | | margin: 16px 0; |
| | | |
| | | .item { |
| | | margin-right: 30px; |
| | | color: #999999; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .separate { |
| | | height: 1px; |
| | | margin: 20px -20px; |
| | | padding: 0 20px; |
| | | background-color: #DFE2E8; |
| | | } |
| | | |
| | | .tip { |
| | | font-size: 14px; |
| | | line-height: 1.5; |
| | | color: #333; |
| | | } |
| | | |
| | | .property-title { |
| | | margin-bottom: 16px; |
| | | color: $primaryColor; |
| | | } |
| | | |
| | | .device-uploader { |
| | | width: 80px; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background-color: #fff; |
| | | cursor: pointer; |
| | | border: 1px dashed #ccc; |
| | | border-radius: 8px; |
| | | transition: all 0.3s; |
| | | margin-right: 20px; |
| | | |
| | | &:hover { |
| | | border-color: $primaryColor; |
| | | |
| | | .uploader-icon { |
| | | color: $primaryColor; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-upload { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: relative; |
| | | |
| | | .file { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | background-size: contain; |
| | | background-position: center; |
| | | background-repeat: no-repeat; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .delete { |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | display: none; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .icon { |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | &:hover { |
| | | .delete { |
| | | display: flex; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uploader-icon { |
| | | color: #aaaaaa; |
| | | font-size: 22px; |
| | | transition: all 0.3s; |
| | | } |
| | | } |
| | | |
| | | .count-style { |
| | | display: inline-block; |
| | | width: 45%; |
| | | height: 60px; |
| | | } |
| | | |
| | | .division-line { |
| | | text-align: center; |
| | | display: inline-block; |
| | | color: #999; |
| | | width: 50px; |
| | | } |
| | | |
| | | .clock { |
| | | display: inline-block; |
| | | } |
| | | |
| | | .upload-style { |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | // width: 60px; |
| | | // height: 60px; |
| | | border: none; |
| | | } |
| | | |
| | | .img-style { |
| | | margin: auto; |
| | | background-color: #eee; |
| | | width: 90px; |
| | | height: 60px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 60px; |
| | | height: 60px; |
| | | display: block; |
| | | } |
| | | |
| | | .line-style { |
| | | background-color: #dfe2e8; |
| | | height: 1px; |
| | | // width: 80%; |
| | | // margin: 0 auto; |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |