123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>-列表</title>
- <meta charset="utf-8">
- <meta name="viewport"
- content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
- <!-- 所有的 css & js 资源 -->
- <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
- <link rel="stylesheet" href="../../static/sa.css">
- <script src="../../static/kj/vue.min.js"></script>
- <script src="../../static/kj/element-ui/index.js"></script>
- <script src="../../static/kj/httpVueLoader.js"></script>
- <script src="../../static/kj/jquery.min.js"></script>
- <script src="../../static/kj/layer/layer.js"></script>
- <script src="../../static/sa.js"></script>
- </head>
- <body>
- <div class="vue-box" style="display: none;" :style="'display: block;'">
- <div class="c-panel">
- <el-form ref="form" :model='p' @submit.native.prevent>
- <sa-item type="text" name="车牌号" v-model="p.carNo"></sa-item>
- <div class="c-item">
- <label class="c-label">支付状态:</label>
- <el-select v-model="p.payType" placeholder="请选择">
- <el-option label="-全部-" value=""></el-option>
- <el-option label="未支付" value="未支付"></el-option>
- <el-option label="已支付" value="已支付"></el-option>
- <el-option label="免费" value="免费"></el-option>
- </el-select>
- </div>
- <div class="c-item" style="width: 120px;">
- <label class="c-label">是否离场:</label>
- <el-select v-model="p.leave" placeholder="请选择">
- <el-option label="-全部-" value="1"></el-option>
- <el-option label="已离场" value="2"></el-option>
- <el-option label="未离场" value="3"></el-option>
- </el-select>
- </div>
- <div class="c-item" style="width: 120px;">
- <label class="c-label">车辆颜色:</label>
- <el-select v-model="p.color" placeholder="请选择">
- <el-option label="-全部-" value=""></el-option>
- <el-option v-for="(item,index) in colorList" :key="index" :label="item.carNoColor"
- :value="item.carNoColor"></el-option>
- </el-select>
- </div>
- </el-form>
- <el-form>
- <div class="c-item">
- <label class="c-label">入场时间:</label>
- <el-date-picker :clearable="false" v-model="inTime" type="datetimerange" range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期">
- </el-date-picker>
- </div>
- <div class="c-item">
- <label class="c-label">离场时间:</label>
- <el-date-picker :clearable="false" v-model="leveTime" type="datetimerange" range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期">
- </el-date-picker>
- </div>
- <div class="c-item" style="width: 120px;">
- <label class="c-label">是否计费:</label>
- <el-select v-model="p.isFree" placeholder="请选择">
- <el-option label="-全部-" value=""></el-option>
- <el-option label="业务车" value="0"></el-option>
- <el-option label="免费车" value="1"></el-option>
- </el-select>
- </div>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <el-button size="mini" type="primary" @click="exportFn" v-if="sa.isAuth('tb-business-car-export')">
- 导出
- </el-button>
- <el-button size="mini" type="info" @click="sa.f5()">重置</el-button>
- <el-button size="mini" type="primary" @click="add()" v-if="sa.isAuth('tb-business-car-add')">
- 入场补录
- </el-button>
- <br />
- <sa-item name="综合排序">
- <el-radio-group v-model="p.sortType" class="s-radio-text">
- <el-radio :label="10">默认</el-radio>
- <el-radio :label="6">入场时间</el-radio>
- <el-radio :label="7">离场时间</el-radio>
- </el-radio-group>
- </sa-item>
- </el-form>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td name="业务单号" prop="no" width=140></sa-td>
- <sa-td name="车牌号" prop="carNo" width=120></sa-td>
- <el-table-column label="车牌颜色">
- <template slot-scope="s">
- <label v-if="!s.row.color">-</label>
- <label v-else>{{s.row.color}}</label>
- </template>
- </el-table-column>
- <!-- <el-table-column label="重量(吨)">
- <template slot-scope="s">
- <label v-if="!s.row.netWeight">未过磅</label>
- <label v-else>{{s.row.netWeight}}</label>
- </template>
- </el-table-column> -->
- <sa-td name="入场通道" prop="inChannel" width="180"></sa-td>
- <sa-td name="离场通道" prop="outChannel" width="180"></sa-td>
- <el-table-column label="入场时间" width=180>
- <template slot-scope="s">
- <span>{{s.row.realInTime}}<span style="color: coral;"
- v-if="s.row.inTimeSupplement===1">(补)</span></span>
- </template>
- </el-table-column>
- <el-table-column label="离场时间" width=180>
- <template slot-scope="s">
- <span>{{s.row.realOutTime}}<span style="color: coral;"
- v-if="s.row.outTimeSupplement===1">(补)</span></span>
- </template>
- </el-table-column>
- <el-table-column label="停车费">
- <template slot-scope="s">
- <label v-if="s.row.payType==='免费'">-</label>
- <label v-else>
- <label v-if="s.row.money">{{s.row.money}}</label>
- <label v-else>-</label>
- </label>
- </template>
- </el-table-column>
- <sa-td name="支付状态" prop="payType"></sa-td>
- <sa-td name="支付时间" prop="payTime" width="140"></sa-td>
- <sa-td name="出场确认说明" prop="outRemark" width="180"></sa-td>
- <sa-td name="备注" prop="remark" width="180"></sa-td>
- <el-table-column label="操作" width="280px" fixed="right">
- <template slot-scope="s">
- <el-button class="c-btn" type="success" @click="get(s.row)">查看
- </el-button>
- <el-button class="c-btn" type="success"
- v-if="sa.isAuth('tb-business-car-out')&&!s.row.realOutTime" @click="outFn(s.row)">手动离场
- </el-button>
- <el-button v-if="sa.isAuth('tb-business-car-edit')" class="c-btn" type="primary"
- icon="el-icon-edit" @click="update(s.row)">修改
- </el-button>
- <el-button v-if="sa.isAuth('tb-business-car-del')&&s.row.money==0" class="c-btn"
- type="danger" icon="el-icon-delete" @click="del(s.row)">删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- ------------- 分页 ------------- -->
- <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
- </sa-item>
- </div>
- <el-dialog :title="out.title" :visible="out.visible" width="400px">
- <div class="c-item">
- <label class="c-label" ><span style="color: red;">*</span>离场时间:</label>
- <el-date-picker type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="out.form.realOutTime">
- </el-date-picker>
- </div>
- <sa-item type="text" name="离场通道" v-model="out.form.outChannel" br need></sa-item>
- <span slot="footer" class="dialog-footer">
- <el-button @click="out.visible=false">取 消</el-button>
- <el-button type="primary" @click="sureOutFn">确 定</el-button>
- </span>
- </el-dialog>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- },
- el: '.vue-box',
- data: {
- out: {
- title: '',
- visible: false,
- form: {
- id: '',
- realOutTime: ''
- }
- },
- leveTime: [],
- inTime: [],
- p: { // 查询参数
- id: '', //
- businessId: sa.p('id', ''), //
- confirmJudge: '',
- color: '',
- carNo: '', //
- leave: '1',
- pay: '',
- payType: '',
- leaveStart: '',
- leaveEnd: '',
- isFree: '',
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 10 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- colorList: []
- },
- methods: {
- outFn(data) {
- this.out = {
- title: '【' + data.carNo + '】手动离场',
- visible: true,
- form: {
- id: data.id,
- realOutTime: '',
- outChannel:''
- }
- }
- },
- sureOutFn() {
- let data=this.out.form;
- if(!data.realOutTime){
- sa.error('请选择离场时间');
- return;
- }
- if(!data.outChannel){
- sa.error('请选输入离场通道');
- return;
- }
- sa.ajax('/TbBusinessCar/handlerOut', this.out.form, function(resp) {
- this.out.visible=false;
- this.f5()
- }.bind(this))
- },
- payChange(value) {
- console.log(e);
- },
- getCarColor() {
- sa.ajax('/TbCarNoColor/getList', {
- pageNo: 1,
- pageSize: 20,
- status: 1
- }, function(resp) {
- this.colorList = resp.data;
- }.bind(this))
- },
- exportFn() {
- this.$confirm('确定导出符合条件的数据?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- sa.ajax('/TbBusinessCar/export', sa.removeNull(this.p), function(resp) {
- window.location.href = resp.data;
- }.bind(this))
- }).catch(() => {
- });
- },
- // 刷新
- f5: function() {
- if (this.inTime && this.inTime.length > 0) {
- this.p.inStart = sa.forDatetime(this.inTime[0]);
- this.p.inEnd = sa.forDatetime(this.inTime[1]);
- } else {
- this.p.inStart = '';
- this.p.inEnd = '';
- }
- if (this.leveTime && this.leveTime.length > 0) {
- this.p.leaveStart = sa.forDatetime(this.leveTime[0]);
- this.p.leaveEnd = sa.forDatetime(this.leveTime[1]);
- } else {
- this.p.leaveStart = '';
- this.p.leaveEnd = '';
- }
- sa.ajax('/TbBusinessCar/getList', sa.removeNull(this.p), function(res) {
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- // 查看
- get: function(data) {
- sa.showIframe('数据详情', 'tb-business-car-info.html?id=' + data.id + '&businessId=' + this.p
- .businessId, '1080px', '90%');
- },
- // 修改
- update: function(data) {
- sa.showIframe('修改数据', 'tb-business-car-edit.html?id=' + data.id + '&businessId=' + this.p
- .businessId, '500px', '80%');
- },
- // 新增
- add: function(data) {
- sa.showIframe('新增数据', 'tb-business-car-add.html?id=-1' + '&businessId=' + this.p.businessId,
- '550px', '90%');
- },
- // 删除
- del: function(data) {
- sa.confirm('是否删除,此操作不可撤销', function() {
- sa.ajax('/TbBusinessCar/deleteRecord?id=' + data.id, function(res) {
- sa.arrayDelete(this.dataList, data);
- sa.ok('删除成功');
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- },
- created: function() {
- this.f5();
- sa.onInputEnter();
- this.getCarColor();
- }
- })
- </script>
- </body>
- </html>
|