|
@@ -24,48 +24,48 @@
|
|
|
</el-form>
|
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="primary"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-plus"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- @click="handleAdd"-->
|
|
|
-<!-- v-hasPermi="['system:data:add']"-->
|
|
|
-<!-- >新增</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="success"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-edit"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="single"-->
|
|
|
-<!-- @click="handleUpdate"-->
|
|
|
-<!-- v-hasPermi="['system:data:edit']"-->
|
|
|
-<!-- >修改</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="danger"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-delete"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- :disabled="multiple"-->
|
|
|
-<!-- @click="handleDelete"-->
|
|
|
-<!-- v-hasPermi="['system:data:remove']"-->
|
|
|
-<!-- >删除</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
-<!-- <el-col :span="1.5">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- type="warning"-->
|
|
|
-<!-- plain-->
|
|
|
-<!-- icon="el-icon-download"-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- @click="handleExport"-->
|
|
|
-<!-- v-hasPermi="['system:data:export']"-->
|
|
|
-<!-- >导出</el-button>-->
|
|
|
-<!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="primary"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- icon="el-icon-plus"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- @click="handleAdd"-->
|
|
|
+ <!-- v-hasPermi="['system:data:add']"-->
|
|
|
+ <!-- >新增</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="success"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- icon="el-icon-edit"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="single"-->
|
|
|
+ <!-- @click="handleUpdate"-->
|
|
|
+ <!-- v-hasPermi="['system:data:edit']"-->
|
|
|
+ <!-- >修改</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="danger"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- icon="el-icon-delete"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- :disabled="multiple"-->
|
|
|
+ <!-- @click="handleDelete"-->
|
|
|
+ <!-- v-hasPermi="['system:data:remove']"-->
|
|
|
+ <!-- >删除</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
+ <!-- <el-col :span="1.5">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- type="warning"-->
|
|
|
+ <!-- plain-->
|
|
|
+ <!-- icon="el-icon-download"-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- @click="handleExport"-->
|
|
|
+ <!-- v-hasPermi="['system:data:export']"-->
|
|
|
+ <!-- >导出</el-button>-->
|
|
|
+ <!-- </el-col>-->
|
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
|
v-hasPermi="['system:data:import']"
|
|
@@ -93,33 +93,33 @@
|
|
|
</el-row>
|
|
|
|
|
|
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="票种名" align="center" prop="ticketName" />
|
|
|
- <el-table-column label="张数" align="center" prop="number" />
|
|
|
- <el-table-column label="金额" align="center" prop="money" />
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
+ <el-table-column label="票种名" align="center" prop="ticketName"/>
|
|
|
+ <el-table-column label="张数" align="center" prop="number"/>
|
|
|
+ <el-table-column label="金额" align="center" prop="money"/>
|
|
|
<el-table-column label="支付类型" align="center" prop="payType">
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag :options="dict.type.pay_type" :value="scope.row.payType"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
|
-<!-- <template slot-scope="scope">-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- type="text"-->
|
|
|
-<!-- icon="el-icon-edit"-->
|
|
|
-<!-- @click="handleUpdate(scope.row)"-->
|
|
|
-<!-- v-hasPermi="['system:data:edit']"-->
|
|
|
-<!-- >修改</el-button>-->
|
|
|
-<!-- <el-button-->
|
|
|
-<!-- size="mini"-->
|
|
|
-<!-- type="text"-->
|
|
|
-<!-- icon="el-icon-delete"-->
|
|
|
-<!-- @click="handleDelete(scope.row)"-->
|
|
|
-<!-- v-hasPermi="['system:data:remove']"-->
|
|
|
-<!-- >删除</el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
|
+ <!-- <template slot-scope="scope">-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- icon="el-icon-edit"-->
|
|
|
+ <!-- @click="handleUpdate(scope.row)"-->
|
|
|
+ <!-- v-hasPermi="['system:data:edit']"-->
|
|
|
+ <!-- >修改</el-button>-->
|
|
|
+ <!-- <el-button-->
|
|
|
+ <!-- size="mini"-->
|
|
|
+ <!-- type="text"-->
|
|
|
+ <!-- icon="el-icon-delete"-->
|
|
|
+ <!-- @click="handleDelete(scope.row)"-->
|
|
|
+ <!-- v-hasPermi="['system:data:remove']"-->
|
|
|
+ <!-- >删除</el-button>-->
|
|
|
+ <!-- </template>-->
|
|
|
+ <!-- </el-table-column>-->
|
|
|
</el-table>
|
|
|
|
|
|
<pagination
|
|
@@ -134,10 +134,10 @@
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="张数" prop="number">
|
|
|
- <el-input v-model="form.number" placeholder="请输入张数" />
|
|
|
+ <el-input v-model="form.number" placeholder="请输入张数"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="金额" prop="money">
|
|
|
- <el-input v-model="form.money" placeholder="请输入金额" />
|
|
|
+ <el-input v-model="form.money" placeholder="请输入金额"/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-form-item label="支付类型" prop="payType">
|
|
@@ -173,9 +173,9 @@
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
<div slot="tip" class="el-upload__tip text-center">
|
|
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|
|
-<!-- <el-link :underline="false" style="font-size:12px;vertical-align: baseline;" type="primary"-->
|
|
|
-<!-- @click="importTemplate">下载模板-->
|
|
|
-<!-- </el-link>-->
|
|
|
+ <!-- <el-link :underline="false" style="font-size:12px;vertical-align: baseline;" type="primary"-->
|
|
|
+ <!-- @click="importTemplate">下载模板-->
|
|
|
+ <!-- </el-link>-->
|
|
|
</div>
|
|
|
<div v-if="upload.showProgressMessage" class="progress-message">
|
|
|
<el-alert
|
|
@@ -196,7 +196,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listData, getData, delData, addData, updateData } from "@/api/system/data";
|
|
|
+import {listData, getData, delData, addData, updateData} from "@/api/system/data";
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
|
export default {
|
|
@@ -251,8 +251,7 @@ export default {
|
|
|
url: process.env.VUE_APP_BASE_API + "/system/data/importTicket"
|
|
|
},
|
|
|
// 表单校验
|
|
|
- rules: {
|
|
|
- }
|
|
|
+ rules: {}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -299,7 +298,7 @@ export default {
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
|
this.ids = selection.map(item => item.id)
|
|
|
- this.single = selection.length!==1
|
|
|
+ this.single = selection.length !== 1
|
|
|
this.multiple = !selection.length
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
@@ -341,18 +340,34 @@ export default {
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
- this.$modal.confirm('是否确认删除原始数据导入编号为"' + ids + '"的数据项?').then(function() {
|
|
|
+ this.$modal.confirm('是否确认删除原始数据导入编号为"' + ids + '"的数据项?').then(function () {
|
|
|
return delData(ids);
|
|
|
}).then(() => {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
this.download('system/data/export', {
|
|
|
...this.queryParams
|
|
|
- }, `data_${new Date().getTime()}.xlsx`)
|
|
|
+ }, `销售汇总表统计${this.getDatetimeValue()}.xlsx`)
|
|
|
+ },
|
|
|
+ // 获取当前时间
|
|
|
+ getDatetimeValue() {
|
|
|
+ // 获取当前时间
|
|
|
+ const now = new Date();
|
|
|
+ // 格式化时间
|
|
|
+ const year = now.getFullYear();
|
|
|
+ const month = now.getMonth() + 1;
|
|
|
+ const day = now.getDate();
|
|
|
+ const hour = now.getHours();
|
|
|
+ const minute = now.getMinutes();
|
|
|
+ const second = now.getSeconds();
|
|
|
+ const currentTime = `${year}${month >= 10 ? month : '0' + month}${day >= 10 ? day : '0' + day}${hour >= 10 ? hour : '0' + hour}${minute >= 10 ? minute : '0' + minute}${second >= 10 ? second : '0' + second}`;
|
|
|
+ // 将格式化后的时间存入 data 中
|
|
|
+ return currentTime;
|
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|