123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447 |
- <!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">
- <div style="float: right;right: 20px;margin-top: 10px;">
- <label>刷新频率:</label>
- <el-select v-model="fresh.value" placeholder="请选择" @change="restartTimmer">
- <el-option label="10s" :value="10"></el-option>
- <el-option label="20s" :value="20"></el-option>
- <el-option label="30s" :value="30"></el-option>
- <el-option label="50s" :value="50"></el-option>
- <el-option label="60s" :value="60"></el-option>
- </el-select>
- </div>
- <!-- ------------- 检索参数 ------------- -->
- <div class="c-title">检索参数</div>
- <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>
- <sa-item type="text" name="客户" placeholder="客户" v-model="p.customerName"></sa-item>
- <sa-item type="text" name="合作伙伴" placeholder="合作伙伴" v-model="p.pickCustomerName"></sa-item>
-
- <div class="c-item">
- <label class="c-label">状态:</label>
- <el-select v-model="p.hasError" placeholder="请选择" @change="f5()">
- <el-option label="全部" :value="-1"></el-option>
- <el-option label="正常" :value="0"></el-option>
- <el-option label="异常" :value="1"></el-option>
- </el-select>
- </div>
- <div class="c-item">
- <label class="c-label">业务项:</label>
- <el-select v-model="p.goodsId">
- <el-option v-for="good in goodsList" :key="good.id" :label="good.name" :value="good.id">
- </el-option>
- </el-select>
- </div>
- <div class="c-item">
- <label class="c-label">审核状态:</label>
- <el-select v-model="p.confirmJudge">
- <el-option label="全部" value=""></el-option>
- <el-option label="未审核" :value="0"></el-option>
- <el-option label="审核通过" :value="1"></el-option>
- <el-option label="审核驳回" :value="2"></el-option>
- </el-select>
- </div>
- <div class="c-item">
- <label class="c-label">日期范围:</label>
- <el-date-picker size="mini" v-model="selectDay" type="daterange" unlink-panels="false"
- range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
- format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="f5">
- </el-date-picker>
- </div>
- <div>
- <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
- <el-button type="info" icon="el-icon-search"
- @click="p.carNo = '';p.confirmJudge='';p.customerName='';p.pickCustomerName='';p.owner='';p.no=''; f5()">
- 重置
- </el-button>
- <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
- 新增
- </el-button>
- </div>
- </el-form>
- <!-- ------------- 数据列表 ------------- -->
- <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
- <el-table-column type="index" name="序号" width="50"></el-table-column>
- <sa-td name="业务单号" prop="no" width="160"></sa-td>
- <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
- <sa-td name="合作伙伴" prop="pickCustomerName" width="190"></sa-td>
- <sa-td name="货物名称" prop="businessGoodsName" width="160"></sa-td>
- <sa-td name="业务项" prop="goodsName" width="180"></sa-td>
- <el-table-column label="车牌号" width="160">
- <template slot-scope="s">
- <label>{{s.row.carNoStr}}</label>
- </template>
- </el-table-column>
- <sa-td name="审核状态" prop="confirmJudge" type="enum" :jv="{0: '未审核', 1:'审核通过',2:'审核驳回'}">
- </sa-td>
- <sa-td name="审核时间" prop="confirmJudgeTime" width="160"></sa-td>
- <!-- <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td> -->
- <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
- <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
- <sa-td name="支付时间" prop="payTime" width="160"></sa-td>
- <sa-td name="业务状态" prop="hasError" type="enum" :jv="{1: '异常[#ff0000]', 0: '正常[#005500]'}"></sa-td>
- <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
- </sa-td>
- <el-table-column label="操作" width="260px" fixed="right">
- <template slot-scope="s">
- <!-- <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
- &¤tCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认
- </el-button> -->
- <!-- <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
- &¤tCustomerId=='1'&&s.row.adminConfirmInput==1" @click="checkConfirmFn(s.row)">查看账单
- </el-button> -->
- <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-flex-business-judge')&&s.row.confirmJudge!=1"
- @click="pass(s.row)">审核</el-button>
- <el-button class="c-btn" type="warning"
- v-if="sa.isAuth('tb-flex-business-judge')&&s.row.confirmJudge==1"
- @click="callback(s.row)">驳回</el-button>
- <el-button class="c-btn" type="primary"
- v-if="currentCustomerId=='1'||(s.row.adminConfirmInput==0&&sa.isAuth('tb-flex-business-edit'))"
- @click="update(s.row)">
- 修改
- </el-button>
- <el-button v-if="sa.isAuth('tb-flex-business-edit')" class="c-btn" type="primary"
- @click="carFn(s.row)">业务车辆
- </el-button>
- <!--
- <el-button v-if="sa.isAuth('tb-business-car-bind')" class="c-btn" type="primary"
- @click="businessFn(s.row)">绑定车辆
- </el-button> -->
- <el-button v-if="sa.isAuth('tb-business-zx-print')&&zxShow(s.row.goodsName)" class="c-btn"
- type="success" @click="zxPrint(s.row.id)">装卸打印
- </el-button>
- <el-button class="c-btn" type="danger"
- v-if="sa.isAuth('tb-flex-business-del')&&s.row.adminConfirmInput==0&&s.row.payMoney==0&&s.row.confirmJudge!=1"
- @click="del(s.row)">删除
- </el-button>
- <el-button class="c-btn" type="warning" v-if="s.row.hasError==1" @click="addErrorFn(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="confirm.title" :visible.sync="confirm.visible" width="650px">
- <div class="confirm-info">
- <el-row>
- <sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
- <sa-info :name="item.itemName" br v-for="item in confirm.form.items">
- {{item.itemPrice}}x{{item.num}}={{item.total}}元
- </sa-info>
- <sa-info name="创建时间" br>{{confirm.form.createTime}}</sa-info>
- <sa-info name="总计费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
- </el-row>
- </div>
- <span slot="footer" class="dialog-footer">
- <div v-if="confirm.form.adminConfirmInput==0">
- <el-button @click="confirm.visible = false">取 消</el-button>
- <el-button type="primary" @click="sureConfirmFn">确 认</el-button>
- </div>
- <div v-else>
- <el-button @click="confirm.visible = false">关闭</el-button>
- </div>
- </span>
- </el-dialog>
- <el-dialog title="补录异常单" :visible.sync="error.visible" width="500px">
- <div class="confirm-info">
- <el-form label-position="left">
- <sa-info name="订单号" br>{{error.form.no}}</sa-info>
- <div class="c-item">
- <label class="c-label"><span style="color: red;">*</span>补录业务:</label>
- <el-select v-model="error.form.itemId" placeholder="请选择" filterable>
- <el-option v-for="item in itemList" :key="item.id" :label="item.itemName"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <div>
- <el-button @click="error.visible = false">取 消</el-button>
- <el-button type="primary" @click="sureAddFn">保 存</el-button>
- </div>
- </span>
- </el-dialog>
- </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: {
- selectDay:[],
- value: '',
- currentCustomerId: '1',
- error: {
- visible: false,
- form: {
- }
- },
- confirm: {
- visible: false,
- title: '',
- form: {
- ids: ''
- }
- },
- p: { // 查询参数
- hasError: -1,
- adminConfirmInput: -1,
- pickCustomerName: '',
- confirmJudge: '',
- customerName: '',
- supplement: 0,
- owner: '',
- no: '',
- carNo: '', // 车牌号
- goodsId: '',
- pageNo: 1, // 当前页
- pageSize: 20, // 页大小
- sortType: 0 // 排序方式
- },
- dataCount: 0,
- itemList: [],
- dataList: [], // 数据集合
- timmer: null,
- fresh: {
- value: 60
- },
- goodsList: [],
- },
- methods: {
- pass(data) {
- this.stopTimmer();
- sa.showIframe('审核业务', 'tb-car-disincle-judge.html?id=' + data.id, '1150px', '90%');
- },
- callback(data) {
- let that = this;
- console.log(data);
- layer.prompt({
- title: '填写驳回原因'
- }, function(content, index) {
- layer.close(index);
- sa.ajax('/TbBusiness/callback', {
- id: data.id,
- judgeContent: content
- }, function(res) {
- sa.alert('已驳回', that.f5);
- })
- });
- },
- sureAddFn() {
- },
- addErrorFn(data) {
- sa.showIframe('补录单', 'tb-business-item-supplement.html?id=' + data.id, '600px', '60%');
- },
- getItemList() {
- sa.ajax('/TbItem/getList', function(resp) {
- this.itemList = resp.data;
- }.bind(this));
- },
- judgeFn(data) {
- this.stopTimmer();
- sa.showIframe('业务审核', 'tb-business-judge.html?id=' + data.id, '1050px', '90%');
- },
- zxShow(goodsName) {
- var flag = goodsName.indexOf("整车");
- if (flag > 0 || flag === 0) {
- return true;
- } else {
- return false;
- }
- },
- zxPrint(id) {
- sa.showIframe('打印装卸业务确认单', 'print-zxbusiness.html?id=' + id, '1000px', '100%');
- },
- getGoodsList() {
- sa.ajax('/TbGoods/getList', function(resp) {
- this.goodsList = resp.data;
- }.bind(this));
- },
- stopTimmer() {
- if (this.timmer != null) {
- clearInterval(this.timmer);
- }
- },
- restartTimmer() {
- this.stopTimmer();
- let val = this.fresh.value;
- this.timmer = setInterval(() => {
- this.f5();
- }, val * 1000)
- },
- businessFn(data) {
- this.stopTimmer();
- sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
- businessId: data.id
- }, function(resp) {
- let list = resp.data;
- let str = list.map(car => car.carNo).join('、');
- let businessCarIds = list.map(car => car.id).join(',');
- sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
- '&businessCarId=' + data.businessCarId + '&carNo=' + str +
- '&businessCarIds=' + businessCarIds, '90%', "90%");
- }.bind(this))
- },
- carFn(data) {
- this.stopTimmer();
- sa.showIframe('业务车辆管理', '../car/tb-business-car-list.html?id=' + data.id + '&payStatus=' + data
- .payStatus + '&confirm=' + data.confirmJudge, '1050px', '75%');
- },
- handlerPay(data) {
- this.stopTimmer();
- sa.showIframe('线下收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '95%');
- },
- getCurrendCustomer() {
- sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
- this.currentCustomerId = resp.data;
- }.bind(this));
- },
- // 查看
- get: function(data) {
- this.stopTimmer();
- sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1150px', '90%');
- },
- add: function(data) {
- this.stopTimmer();
- sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '90%', '90%');
- },
- update(data) {
- if (data.confirmJudge == 1) {
- sa.error('业务已审核,请驳回后修改')
- return;
- }
- this.stopTimmer();
- sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '90%', '90%');
- },
- getPcodeByCurrRid() {
- this.stopTimmer();
- sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
- this.perCode = resp.data;
- }.bind(this))
- },
- confirmFn(data) {
- sa.ajax('/TbBusinessItem/getList', {
- businessId: data.id
- }, function(resp) {
- data.items = resp.data;
- Object.assign(this.confirm, {
- visible: true,
- title: '账单确认',
- form: data,
- })
- this.confirm.form.ids = data.id;
- }.bind(this));
- },
- checkConfirmFn(data) {
- sa.ajax('/TbBusinessItem/getList', {
- businessId: data.id
- }, function(resp) {
- data.items = resp.data;
- Object.assign(this.confirm, {
- visible: true,
- title: '查看账单',
- form: data,
- })
- }.bind(this));
- },
- // 删除
- del: function(data) {
- if (data.confirmJudge == 1) {
- sa.error('业务已审核,无法删除')
- return;
- }
- sa.confirm('是否删除,此操作不可撤销', function() {
- sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
- data.businessCarId,
- function(res) {
- sa.arrayDelete(this.dataList, data);
- sa.ok('删除成功');
- sa.f5TableHeight(); // 刷新表格高度
- }.bind(this))
- }.bind(this));
- },
- sureConfirmFn() {
- sa.ajax('/TbBusiness/confirm', {
- ids: this.confirm.form.ids
- }, function(resp) {
- this.confirm.visible = false;
- this.f5();
- }.bind(this))
- },
- // 刷新
- f5: function() {
- let days = this.selectDay;
- let p = this.p;
- if (days.length == 2) {
- p.startDay = sa.forDate(days[0]);
- p.endDay = sa.forDate(days[1]);
- }else{
- p.startDay = '';
- p.endDay = '';
- }
- sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(p), function(res) {
- this.dataList = res.data; // 数据
- this.dataCount = res.dataCount; // 数据总数
- sa.f5TableHeight(); // 刷新表格高度
- this.restartTimmer();
- }.bind(this));
- },
- },
- created: function() {
- sa.onInputEnter();
- },
- mounted() {
- this.getCurrendCustomer();
- this.getGoodsList();
- this.getItemList();
- this.f5();
- },
- beforeDestroy() {
- this.stopTimmer();
- }
- })
- </script>
- </body>
- </html>
|