| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340 | 
							- <!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.owner"></sa-item>
 
-             <div class="c-item">
 
-                 <label class="c-label">确认状态:</label>
 
-                 <el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
 
-                     <el-option label="全部" :value="-1"></el-option>
 
-                     <el-option label="已确认" :value="1"></el-option>
 
-                     <el-option label="未确认" :value="0"></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>
 
-             <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.adminConfirmInput=-1;p.customerName='';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>
 
-             <br/>
 
-         </el-form>
 
-         <!-- ------------- 数据列表 ------------- -->
 
-         <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
 
-             <el-table-column type="index" 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="owner" width="160"></sa-td>
 
-             <sa-td name="业务项" prop="goodsName" width="160"></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="operateTime" width="160"></sa-td>
 
-             <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></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="415px" 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="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 class="c-btn" type="primary" v-if="(currentCustomerId=='1'||(sa.isAuth('tb-flex-business-pay')))
 
- 								&&s.row.payStatus!=3" @click="handlerPay(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"
 
-                                @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="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>
 
- </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: {
 
-             value: '',
 
-             currentCustomerId: '1',
 
-             confirm: {
 
-                 visible: false,
 
-                 title: '',
 
-                 form: {
 
-                     ids: ''
 
-                 }
 
-             },
 
-             p: { // 查询参数
 
-                 adminConfirmInput: -1,
 
-                 customerName: '',
 
- 				supplement: 0,
 
-                 owner: '',
 
-                 no: '',
 
-                 carNo: '', // 车牌号
 
-                 goodsId: '',
 
-                 pageNo: 1, // 当前页
 
-                 pageSize: 20, // 页大小
 
-                 sortType: 0 // 排序方式
 
-             },
 
-             dataCount: 0,
 
-             dataList: [], // 数据集合
 
-             timmer: null,
 
-             fresh: {
 
-                 value: 60
 
-             },
 
-             goodsList: [],
 
-         },
 
-         methods: {
 
-             zxShow(goodsName) {
 
-                 var flag = goodsName.indexOf("整车");
 
-                 if (flag > 0 || flag === 0) {
 
-                     return true;
 
-                 } else {
 
-                     return false;
 
-                 }
 
-             },
 
-             zxPrint(id) {
 
-                 this.$confirm('    点击确定开始打印!', '提示', {
 
-                     confirmButtonText: '确定',
 
-                     cancelButtonText: '取消',
 
-                 }).then(() => {
 
-                     sa.showIframe('打印装卸业务确认单', 'print-zxbusiness.html?id=' + id, '1000px', '100%');
 
-                 }).catch(() => {
 
-                 });
 
-                 ;
 
-             },
 
-             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.adminConfirmInput, '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, '1050px', '90%');
 
-             },
 
-             add: function (data) {
 
-                 this.stopTimmer();
 
-                 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() {
 
-                 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) {
 
-                 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 () {
 
-                 sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.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.f5();
 
-         },
 
-         beforeDestroy() {
 
-             this.stopTimmer();
 
-         }
 
-     })
 
- </script>
 
- </body>
 
- </html>
 
 
  |