|
|
@@ -151,7 +151,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
QRcodeVisible: false,
|
|
|
- selectQRcode: "",
|
|
|
+ selectQRcode: null,
|
|
|
queryParam: {},
|
|
|
// 分页参数
|
|
|
ipagination: {
|
|
|
@@ -234,9 +234,24 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
QRcode(record){
|
|
|
- console.log(record.qrCode);
|
|
|
- this.selectQRcode = record.qrCode;
|
|
|
- this.QRcodeVisible = true;
|
|
|
+ console.log(record);
|
|
|
+ this.selectQRcode = null;
|
|
|
+ if (record.qrCode) {
|
|
|
+ this.selectQRcode = record.qrCode;
|
|
|
+ this.QRcodeVisible = true;
|
|
|
+ }else{
|
|
|
+ getAction('/pos/posTable/generateQRCode?id=' + record.id).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ if (res.success) {
|
|
|
+ this.selectQRcode = res.result.qrCode;
|
|
|
+ this.QRcodeVisible = true;
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // this.selectQRcode = record.qrCode;
|
|
|
+ // this.QRcodeVisible = true;
|
|
|
},
|
|
|
batchAdd(){
|
|
|
this.$refs.modalFormBatch.add();
|