|
@@ -26,15 +26,16 @@
|
|
v-model="queryModel.carNum"
|
|
v-model="queryModel.carNum"
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
-
|
|
|
|
- <el-form-item label="商户名称" v-show="!detail.enableCoupon" prop="merchantName">
|
|
|
|
|
|
+
|
|
|
|
+ <el-form-item
|
|
|
|
+ label="商户名称"
|
|
|
|
+ v-show="!detail.enableCoupon"
|
|
|
|
+ prop="merchantName"
|
|
|
|
+ >
|
|
<el-input
|
|
<el-input
|
|
type="text"
|
|
type="text"
|
|
size="mini"
|
|
size="mini"
|
|
v-model="queryModel.merchantName"
|
|
v-model="queryModel.merchantName"
|
|
-
|
|
|
|
-
|
|
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="使用状态" prop="useStatus">
|
|
<el-form-item label="使用状态" prop="useStatus">
|
|
@@ -77,16 +78,16 @@
|
|
</el-form>
|
|
</el-form>
|
|
<el-divider></el-divider>
|
|
<el-divider></el-divider>
|
|
<el-row class="button-group">
|
|
<el-row class="button-group">
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- size="small"
|
|
|
|
- plain
|
|
|
|
- icon="el-icon-circle-plus"
|
|
|
|
- @click="handleAdd"
|
|
|
|
- v-show="detail.enableCoupon"
|
|
|
|
- >录入车辆</el-button
|
|
|
|
- >
|
|
|
|
-
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-circle-plus"
|
|
|
|
+ @click="handleAdd"
|
|
|
|
+ v-show="detail.enableCoupon"
|
|
|
|
+ >录入车辆</el-button
|
|
|
|
+ >
|
|
|
|
+
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
@@ -94,7 +95,8 @@
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
:loading="downloadLoading"
|
|
:loading="downloadLoading"
|
|
@click="downloadXls"
|
|
@click="downloadXls"
|
|
- >导出数据</el-button>
|
|
|
|
|
|
+ >导出数据</el-button
|
|
|
|
+ >
|
|
</el-row>
|
|
</el-row>
|
|
<el-table
|
|
<el-table
|
|
:data="tableData"
|
|
:data="tableData"
|
|
@@ -115,15 +117,14 @@
|
|
label="车牌号码"
|
|
label="车牌号码"
|
|
width="130"
|
|
width="130"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
<el-table-column
|
|
<el-table-column
|
|
- v-if="!detail.enableCoupon"
|
|
|
|
|
|
+ v-if="!detail.enableCoupon"
|
|
prop="merchantName"
|
|
prop="merchantName"
|
|
label="登记商户"
|
|
label="登记商户"
|
|
width="150"
|
|
width="150"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <!--
|
|
|
|
|
|
+ <!--
|
|
<el-table-column prop="useStatus" label="使用状态" width="90">
|
|
<el-table-column prop="useStatus" label="使用状态" width="90">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
<span v-if="row.useStatus">使用</span>
|
|
<span v-if="row.useStatus">使用</span>
|
|
@@ -164,15 +165,13 @@
|
|
@size-change="pageSizeChange"
|
|
@size-change="pageSizeChange"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
></el-pagination>
|
|
></el-pagination>
|
|
-
|
|
|
|
- <parkingCoupon-detail
|
|
|
|
- v-if="showModal"
|
|
|
|
-
|
|
|
|
- :merchantName="merchantName"
|
|
|
|
- :reduce="reduce"
|
|
|
|
- @close="onDetailModalClose"
|
|
|
|
- ></parkingCoupon-detail>
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ <parkingCoupon-detail
|
|
|
|
+ v-if="showModal"
|
|
|
|
+ :merchantName="merchantName"
|
|
|
|
+ :reduce="reduce"
|
|
|
|
+ @close="onDetailModalClose"
|
|
|
|
+ ></parkingCoupon-detail>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -192,7 +191,7 @@ export default {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
return {
|
|
return {
|
|
- detail:{},
|
|
|
|
|
|
+ detail: {},
|
|
queryModel: {
|
|
queryModel: {
|
|
id: "",
|
|
id: "",
|
|
merchantName: "",
|
|
merchantName: "",
|
|
@@ -239,28 +238,26 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
indexMethod(index) {
|
|
indexMethod(index) {
|
|
return (this.pageIndex - 1) * this.pageSize + (index + 1);
|
|
return (this.pageIndex - 1) * this.pageSize + (index + 1);
|
|
},
|
|
},
|
|
- init(){
|
|
|
|
- var self = this;
|
|
|
|
-
|
|
|
|
- //self.loading = true;
|
|
|
|
-
|
|
|
|
- parkingCouponApi
|
|
|
|
- .parkingMemberDetail()
|
|
|
|
- .then(function (response) {
|
|
|
|
- //self.loading = false;
|
|
|
|
-
|
|
|
|
- self.detail = response.data.data;
|
|
|
|
-
|
|
|
|
- })
|
|
|
|
- .catch((error) => {
|
|
|
|
- // self.loading = false;
|
|
|
|
- // self.$message.error(error + "");
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ init() {
|
|
|
|
+ var self = this;
|
|
|
|
+
|
|
|
|
+ //self.loading = true;
|
|
|
|
+
|
|
|
|
+ parkingCouponApi
|
|
|
|
+ .parkingMemberDetail()
|
|
|
|
+ .then(function (response) {
|
|
|
|
+ //self.loading = false;
|
|
|
|
+
|
|
|
|
+ self.detail = response.data.data;
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ // self.loading = false;
|
|
|
|
+ // self.$message.error(error + "");
|
|
|
|
+ });
|
|
|
|
+ },
|
|
changePage(pageIndex) {
|
|
changePage(pageIndex) {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
@@ -338,7 +335,7 @@ export default {
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.modalTitle = "录入车辆";
|
|
this.modalTitle = "录入车辆";
|
|
this.merchantName = this.detail.merchantName;
|
|
this.merchantName = this.detail.merchantName;
|
|
- this.reduce = this.detail.reduce;
|
|
|
|
|
|
+ this.reduce = this.detail.reduce;
|
|
this.showModal = true;
|
|
this.showModal = true;
|
|
},
|
|
},
|
|
handleEdit(record) {
|
|
handleEdit(record) {
|
|
@@ -446,21 +443,20 @@ export default {
|
|
formData.append("direction", this.direction);
|
|
formData.append("direction", this.direction);
|
|
}
|
|
}
|
|
|
|
|
|
- parkingCouponApi.exportXls(formData).then(function(response) {
|
|
|
|
|
|
+ parkingCouponApi.exportXls(formData).then(function (response) {
|
|
var jsonData = response.data;
|
|
var jsonData = response.data;
|
|
self.downloadLoading = false;
|
|
self.downloadLoading = false;
|
|
self.loading = false;
|
|
self.loading = false;
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
- //下载有错误信息提示的报表
|
|
|
|
- self.$message({
|
|
|
|
- showClose: true,
|
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
|
- message: `报表已生成,<a href="${jsonData.data}" target="_blank">点击下载报表</a> `,
|
|
|
|
- duration: 60000,
|
|
|
|
- type: 'success'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
|
|
+ //下载有错误信息提示的报表
|
|
|
|
+ self.$message({
|
|
|
|
+ showClose: true,
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ message: `报表已生成,<a href="${jsonData.data}" target="_blank">点击下载报表</a> `,
|
|
|
|
+ duration: 60000,
|
|
|
|
+ type: "success",
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
self.$message.error(jsonData.message);
|
|
self.$message.error(jsonData.message);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -468,11 +464,10 @@ export default {
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|
|
this.init();
|
|
this.init();
|
|
- this.changePage(1);
|
|
|
|
|
|
+ this.changePage(1);
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
- "el-select-tree": SelectTree,
|
|
|
|
- "parkingCoupon-detail":ParkingCouponDetail,
|
|
|
|
|
|
+ "parkingCoupon-detail": ParkingCouponDetail,
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|