123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <!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">
- <!-- ------------- 检索参数 ------------- -->
- <div class="c-title">检索参数</div>
- <el-form ref="form" :model='p' @submit.native.prevent>
- <sa-item type="text" name="中国车车牌" v-model="p.chinaCarNo"></sa-item>
- <sa-item type="text" name="越南车车牌" v-model="p.carNo"></sa-item>
- <sa-item type="text" name="申报单位" v-model="p.applyUnit"></sa-item>
- <sa-item type="text" name="发货人" v-model="p.sendPeople"></sa-item>
- <sa-item type="text" name="收货人" v-model="p.receivePeople"></sa-item>
- <!-- <sa-item type="text" name="申请人联系号码" v-model="p.applyPhone"></sa-item>-->
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <br/>
- </el-form>
- <!-- ------------- 快捷按钮 ------------- -->
- <div class="fast-btn">
- <!-- <el-button size="mini" type="primary" @click="add()">新增</el-button>-->
- <el-button size="mini" type="info" @click="sa.f5()">刷新</el-button>
- <el-button type="warning" icon="el-icon-download" @click="exportFn()">导出</el-button>
- </div>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList">
- <sa-td type="selection"></sa-td>
- <!-- <sa-td name="发货人" prop="sendPeople" ></sa-td>-->
- <!-- <sa-td name="收货人" prop="receivePeople" ></sa-td>-->
- <sa-td name="品名" prop="goodsName"></sa-td>
- <!-- <sa-td name="产地" prop="origin" ></sa-td>-->
- <sa-td name="数量" prop="num" type="num"></sa-td>
- <sa-td name="重量(kg)" prop="grossWeight"></sa-td>
- <!-- <sa-td name="规格" prop="unit" ></sa-td>-->
- <!-- <sa-td name="包装" prop="pack" ></sa-td>-->
- <!-- <sa-td name="标记" prop="flag" ></sa-td>-->
- <!-- <sa-td name="号码" prop="phone" ></sa-td>-->
- <!-- <sa-td name="启运地" prop="sourceAddress" ></sa-td>-->
- <!-- <sa-td name="到达口岸" prop="arrivePart" ></sa-td>-->
- <sa-td name="运输工具" prop="carName"></sa-td>
- <sa-td name="运输工具号码" prop="carNo"></sa-td>
- <sa-td name="国内运输工具" prop="chinaCarName"></sa-td>
- <sa-td name="运输工具号码" prop="chinaCarNo"></sa-td>
- <!-- <sa-td name="备注" prop="remark" ></sa-td>-->
- <sa-td name="申请单位" prop="applyUnit"></sa-td>
- <sa-td name="申请人" prop="declarePeople"></sa-td>
- <sa-td name="申请人联系号码" prop="declarePhone"></sa-td>
- <sa-td name="申请时间" prop="applyTime" width="100px" min-width="100px"></sa-td>
- <sa-td name="受理人" prop="acceptPeople"></sa-td>
- <sa-td name="受理时间" prop="acceptTime" width="100px" min-width="100px"></sa-td>
- <!-- <sa-td name="计费(分)" prop="money" ></sa-td>-->
- <el-table-column label="操作" width="320px">
- <template slot-scope="s">
- <el-button v-if="sa.isAuth('tb-disinfect-print')" class="c-btn" type="success" icon="el-icon"
- @click="print(s.row)">打印
- </el-button>
- <el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>
- <el-button v-if="sa.isAuth('tb-disinfect-edit')" class="c-btn" type="primary" icon="el-icon-edit"
- @click="update(s.row)">修改
- </el-button>
- <el-button v-if="sa.isAuth('tb-disinfect-del')" 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="提示" :visible.sync="emodel.visible" width="36%">
- <span>日期范围:</span>
- <el-form size="mini">
- <div class="c-item">
- <el-date-picker size="mini" v-model="dataTime" type="daterange" unlink-panels="false"
- range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
- format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd">
- </el-date-picker>
- </div>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="emodel.visible = false">取 消</el-button>
- <el-button type="primary" @click="sureExport">确 定</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: {
- p: { // 查询参数
- id: '', // 主键
- sendPeople: '', // 发货人
- receivePeople: '', // 收货人
- goodsName: '', // 品名
- origin: '', // 产地
- num: '', // 数量
- grossWeight: '', // 重量
- unit: '', // 规格
- pack: '', // 包装
- flag: '', // 标记
- phone: '', // 号码
- sourceAddress: '', // 启运地
- arrivePart: '', // 到达口岸
- carName: '', // 运输工具
- carNo: '', // 运输工具号码
- chinaCarName: '', // 中国运输工具
- chinaCarNo: '', // 中国运输号码
- remark: '', // 备注
- applyUnit: '', // 申请单位
- declarePeople: '', // 申请人
- declarePhone: '', // 申请人联系号码
- applyTime: '', // 申请时间
- acceptPeople: '', // 受理人
- acceptTime: '', // 受理时间
- money: '', // 计费(分)
- pageNo: 1, // 当前页
- pageSize: 10, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- dataList: [], // 数据集合
- emodel: {
- visible: false,
- form: {
- beginTime: '',
- endTime: ''
- }
- },
- dataTime: [],
- },
- methods: {
- exportFn() {
- Object.assign(this.emodel, {
- visible: true,
- })
- },
- sureExport() {
- if (this.dataTime.length != 0) {
- this.emodel.form.beginTime = this.dataTime[0];
- this.emodel.form.endTime = this.dataTime[1];
- } else {
- sa.msg("请选择日期范围");
- return;
- }
- sa.ajax('/TbDisinfect/export/disinfect', this.emodel.form, function (resp) {
- window.open(resp.data);
- this.emodel.visible = false;
- }.bind(this));
- },
- // 刷新
- f5: function () {
- sa.ajax('/TbDisinfect/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-disinfect-info.html?id=' + data.id, '900px', '90%');
- },
- // 查看 - 根据选中的
- getBySelect: function (data) {
- var selection = this.$refs['data-table'].selection;
- if (selection.length == 0) {
- return sa.msg('请选择一条数据')
- }
- this.get(selection[0]);
- },
- // 修改
- print: function (data) {
- sa.showIframe('消毒申请单打印', 'print.html?id=' + data.id, '1000px', '100%');
- },
- // 修改
- update: function (data) {
- sa.showIframe('修改数据', 'tb-disinfect-add.html?id=' + data.id, '600px', '90%');
- },
- // 新增
- add: function (data) {
- sa.showIframe('新增数据', 'tb-disinfect-add.html?id=-1', '1000px', '90%');
- },
- // 删除
- del: function (data) {
- sa.confirm('是否删除,此操作不可撤销', function () {
- sa.ajax('/TbDisinfect/delete?id=' + data.id, function (res) {
- sa.arrayDelete(this.dataList, data);
- sa.ok('删除成功');
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- // 批量删除
- deleteByIds: function () {
- // 获取选中元素的id列表
- let selection = this.$refs['data-table'].selection;
- let ids = sa.getArrayField(selection, 'id');
- if (selection.length == 0) {
- return sa.msg('请至少选择一条数据')
- }
- // 提交删除
- sa.confirm('是否批量删除选中数据?此操作不可撤销', function () {
- sa.ajax('/TbDisinfect/deleteByIds', {ids: ids.join(',')}, function (res) {
- sa.arrayDelete(this.dataList, selection);
- sa.ok('删除成功');
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- },
- created: function () {
- this.f5();
- sa.onInputEnter();
- }
- })
- </script>
- </body>
- </html>
|