123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <!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>
- <script src="../../static/kj/upload-util.js"></script>
- </head>
- <style>
- .complete-modal .c-label,
- .confirm-in .c-label,
- .confirm-info .c-label {
- width: 290px;
- }
- </style>
- <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="订单号" placeholder="订单号" v-model="p.no"></sa-item>
- <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
- <div class="c-item">
- <label class="c-label">录入日期:</label>
- <el-date-picker :clearable="false" value-format="yyyy-MM-dd" v-model="p.createTime" type="date">
- </el-date-picker>
- </div>
- <el-button size="mini" type="primary" @click="f5()">
- 搜索
- </el-button>
- <el-button type="info" icon="el-icon-search"
- @click="p.cardNo = '';p.no = '';p.createTime = '';p.adminConfirmInput=-1; f5()">重置
- </el-button>
- </el-form>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td type="selection"></sa-td>
- <sa-td name="业务单号" prop="no" width="160"></sa-td>
- <sa-td name="车辆类型" prop="goodsName"></sa-td>
- <sa-td name="业务项" prop="itemTypeName" width="160"></sa-td>
- <el-table-column label="车牌号" width="120px">
- <template slot-scope="s">
- <label v-if="s.row.cardNo">{{s.row.cardNo}}</label>
- <label v-else>{{s.row.chinaCarNo}}</label>
- </template>
- </el-table-column>
- <sa-td name="作业时间" prop="operateTime" width="160"></sa-td>
- <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
- <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
- <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
- </sa-td>
- <el-table-column label="操作" width="120px" fixed="right">
- <template slot-scope="s">
- <el-button class="c-btn" type="primary" @click="sureFn(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>
- </div>
- <script>
- var app = new Vue({
- components: {
- "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
- "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
- "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
- },
- el: '.vue-box',
- data: {
- carNo: sa.p('carNo', ''),
- businessCarId: sa.p('businessCarId', -1),
- p: { // 查询参数
- no: '', // 编号
- businessType: 1,
- carNo: '', // 车牌号
- createTime: '', // 离境时间
- no: '', // 编号
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- },
- methods: {
- getCurrendCustomer() {
- sa.ajax('/TbCostomer/getCurrentCustomerId', function (resp) {
- this.currentCustomerId = resp.data;
- }.bind(this));
- },
- sureFn(data) {
- let carNo = data.cardNo ? data.cardNo : data.chinaCarNo;
- let obj = {
- id: data.id,
- businessCarId: this.businessCarId
- };
- let content = '是否将[' + this.carNo + ']绑定到此业务';
- if (data.businessCarId && data.businessCarId !== this.businessCarId) {
- content = '此业务已绑定车辆【' + carNo + '】,是否覆盖?';
- }
- if (data.businessCarId === this.businessCarId) {
- sa.error('该车已绑定此业务,无需绑定');
- return;
- }
- sa.confirm(content, function () {
- sa.ajax('/TbBusiness/bindCar', obj, function (resp) {
- sa.alert('绑定成功');
- setTimeout(() => {
- sa.closeCurrIframe(); // 关闭本页
- parent.app.f5(); // 刷新父页面列表
- }, 1000)
- }.bind(this))
- }.bind(this));
- },
- // 查看
- get: function (data) {
- sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
- },
- add: function (data) {
- sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '1080px', '90%');
- },
- update(data) {
- sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
- },
- getPcodeByCurrRid() {
- sa.ajax('/SpRolePermission/getPcodeByCurrRid', function (resp) {
- this.perCode = resp.data;
- }.bind(this))
- },
- // 刷新
- f5: function () {
- sa.ajax('/TbBusiness/getList', sa.removeNull(this.p), function (res) {
- let list = res.data;
- this.dataList = list; // 数据
- this.dataCount = res.dataCount; // 数据总数
- let businessCarId = this.businessCarId;
- list.forEach(row => {
- if (businessCarId == row.businessCarId) {
- this.$nextTick(() => {
- this.$refs['data-table'].toggleRowSelection(row,
- true)
- })
- }
- })
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this));
- },
- },
- created: function () {
- sa.onInputEnter();
- },
- mounted() {
- this.getCurrendCustomer();
- this.f5();
- },
- })
- </script>
- </body>
- </html>
|