123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <template>
- <div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
- <el-form-item label="班次号" prop="classesNo">
- <el-input
- v-model="queryParams.likeClassesNo"
- placeholder="请输入班次号"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="班结时间" prop="endDate">
- <el-date-picker style="width: 350px"
- v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
- type="datetimerange"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="油站名称" prop="stationId">
- <el-select
- v-model="queryParams.stationId"
- placeholder="请选择油站"
- clearable
- size="small"
- >
- <el-option
- v-for="item in stationOptions"
- :key="item.stationId"
- :label="item.stationName"
- :value="item.stationId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="班结人" prop="classesMan">
- <el-input
- v-model="queryParams.classesMan"
- placeholder="请输入班结人"
- clearable
- size="small"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item>
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
- </el-form-item>
- </el-form>
- <el-table v-loading="loading" :data="summaryList" >
- <el-table-column label="班结主键id" align="center" prop="id" v-if="false" />
- <el-table-column label="班次号" align="center" prop="classesNo" />
- <el-table-column label="班次开始时间" align="center" prop="startDate" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="班次结束时间" align="center" prop="endDate" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="油站id" align="center" prop="stationId" v-if="false" />
- <el-table-column label="油站名称" align="center" prop="stationName" />
- <el-table-column label="订单数" align="center" prop="orderNum" />
- <el-table-column label="小票数量" align="center" prop="printNum" />
- <el-table-column label="销量L" align="center" prop="saleLiters" />
- <el-table-column label="应收金额" align="center" prop="saleAmt" />
- <el-table-column label="实收金额" align="center" prop="amt" />
- <el-table-column label="优惠金额" align="center" prop="discountAmt" />
- <el-table-column label="微信支付金额" align="center" prop="wxAmt" />
- <el-table-column label="支付支付金额" align="center" prop="zfbAmt" v-if="false" />
- <el-table-column label="电子卡支付金额" align="center" prop="dzkAmt" v-if="false"/>
- <el-table-column label="班结人" align="center" prop="classesMan" />
- <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-plus"
- @click="handlelook(scope.row)"
- >查看</el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-download"
- @click="handleExport(scope.row)"
- v-hasPermi="['station:structure:export']"
- >下载</el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- </div>
- </template>
- <script>
- import { listSummary } from "@/api/station/summary";
- import { exportStructure } from "@/api/station/structure";
- import { stationinfo } from "@/api/station/gun";
- export default {
- name: "Summary",
- data() {
- return {
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: true,
- // 总条数
- total: 0,
- // 【请填写功能名称】表格数据
- summaryList: [],
- stationOptions: [],
- dateRangeCreatedDate: [],
- // 弹出层标题
- title: "",
- // 是否显示弹出层
- open: false,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- classesNo: null,
- startDate: null,
- endDate: null,
- stationId: null,
- stationName: null,
- orderNum: null,
- printNum: null,
- saleLiters: null,
- saleAmt: null,
- wxAmt: null,
- zfbAmt: null,
- dzkAmt: null,
- classesMan: null,
- likeClassesNo:null
- },
- // 查询参数
- queryParam: {
- orderNo: null,
- stationId: null,
- stationName: null,
- oilGun: null,
- oilName: null,
- oilPirce: null,
- oilType: null,
- consumerId: null,
- consumer: null,
- amt: null,
- orderLiters: null,
- payType: null,
- payWay: null,
- payDate: null,
- oilPersonnel: null,
- orderType: null,
- printNum: null,
- classStructureNo: null,
- classStartDate: null,
- classStructureDate: null,
- classStructureMan: null,
- oils: null,
- receivableAmt: null,
- receivedAmt: null,
- discountAmt: null,
- discountCouponAmt: null,
- discountCoupon: null,
- wxAmt: null,
- zfbAmt: null,
- posAmt: null,
- xjAmt: null,
- didiAppAmt: null,
- tyAppAmt: null,
- otherAmt: null,
- dzkAmt: null,
- score: null,
- memberNo: null,
- memberAmt: null,
- carNo: null,
- customerPhone: null,
- customerGrade: null
- },
- // 表单参数
- form: {},
- // 表单校验
- rules: {
- }
- };
- },
- created() {
- this.getList();
- stationinfo().then(response => {
- this.stationOptions = response.rows;
- });
- },
- methods: {
- /** 查询【请填写功能名称】列表 */
- getList() {
- this.loading = true;
- listSummary(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
- this.summaryList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- classesNo: null,
- startDate: null,
- endDate: null,
- stationId: null,
- stationName: null,
- orderNum: null,
- printNum: null,
- saleLiters: null,
- saleAmt: null,
- wxAmt: null,
- zfbAmt: null,
- dzkAmt: null,
- classesMan: null
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- this.queryParams.pageNum = 1;
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.dateRangeCreatedDate =[];
- this.handleQuery();
- },
- handlelook(row){
- this.$router.push({path:'/station/structure',query:{classesNo:row.classesNo,stationId:row.stationId,name:row.classesMan}});
- },
- /** 导出按钮操作 */
- handleExport(row) {
- const classesNo = row.classesNo;
- this.queryParam.classStructureNo=classesNo;
- const queryParams = this.queryParam;
- this.$confirm('是否确认导出所有班结数据项?', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function() {
- return exportStructure(queryParams);
- }).then(response => {
- this.download(response.msg);
- })
- }
- }
- };
- </script>
|