| | |
| | | ></Page> |
| | | </Row> |
| | | </Modal> |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | :loading="codeLoading" |
| | | > |
| | | <vue-qr |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | </Card> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | import { getCardPackData } from '@/api/cardPack' |
| | | import { getOrderList } from '@/api/order' |
| | | import vueQr from "vue-qr"; |
| | | export default { |
| | | name: "CarPack", |
| | | components: { |
| | | "vue-qr": vueQr, |
| | | }, |
| | | data() { |
| | | return { |
| | | modelShow:false, |
| | |
| | | style: { color } |
| | | }, text); |
| | | } |
| | | }, { |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | width: 150, |
| | | fixed: "right", |
| | | render: (h, params) => { |
| | | const buttons = []; |
| | | // // 根据订单状态为'PAID'时显示额外操作按钮 |
| | | console.log('--------------------->',params.row.claimStatus ) |
| | | if (params.row.claimStatus === 'NOT_CLAIM') { |
| | | buttons.push( |
| | | h( |
| | | "Button", |
| | | { |
| | | props: {type: "primary", size: "small"}, |
| | | style: {marginRight: "5px"}, |
| | | on: { |
| | | click: () => { |
| | | this.handlerEditorQrcode(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "生成卡包二维码" |
| | | ) |
| | | ); |
| | | } |
| | | return h('div', buttons); |
| | | } |
| | | } |
| | | |
| | | ], |
| | | QRCodeUrl:'', |
| | | showGeneralQrCode:false, |
| | | codeLoading:false, |
| | | } |
| | | |
| | | }, |
| | | mounted(){ |
| | | //初始化 |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | }, |
| | | handlerEditorQrcode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | this.codeLoading = true; |
| | | |
| | | //获得商品对应的第一个skuid |
| | | this.codeLoading = false; |
| | | this.QRCodeUrl = this.QRcodeBaseUrl+ '/scanpage/claimCoupon'+'?id='+row.id |
| | | console.log(this.QRCodeUrl); |
| | | |
| | | }, |
| | | // 搜索 |
| | | handleSearch() { |
| | | this.searchForm.pageNumber = 1; |