| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238 | 
							- <!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.businessNo"></sa-item>
 
- 					<sa-item type="text" name="项目名称" v-model="p.itemName"></sa-item>
 
- 					<sa-item type="text" name="越南车" v-model="p.cardNo"></sa-item>
 
- 					<sa-item type="text" name="中国车" v-model="p.chinaCarNo"></sa-item>
 
- 					<sa-item type="text" name="货物" v-model="p.goodsName"></sa-item>
 
- 					<div class="c-item">
 
- 						<label class="c-label">业务项:</label>
 
- 						<el-select v-model="p.goodsId" placeholder="请选择" filterable>
 
- 							<el-option v-for="item in goodsList" :key="item.id" :label="item.name" :value="item.id">
 
- 							</el-option>
 
- 						</el-select>
 
- 					</div>
 
- 					<el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
 
- 					<el-button style="display: inline;" type="info" icon="el-icon-refresh" @click="sa.f5()">刷新
 
- 					</el-button>
 
- 					<el-button type="warning" icon="el-icon-download" @click="exportFn()">导出</el-button>
 
- 					<br>
 
- 				</el-form>
 
- 				<!-- ------------- 快捷按钮 ------------- -->
 
- 				<div class="fast-btn">
 
- 				</div>
 
- 				<!-- ------------- 数据列表 ------------- -->
 
- 				<el-table class="data-table" ref="data-table" :data="dataList">
 
- 					<sa-td name="单号" prop="no" width="160"></sa-td>
 
- 					<sa-td name="业务项" prop="goodsName" width="120"></sa-td>
 
- 					<sa-td name="收费类型" prop="itemTypeName" width="120"></sa-td>
 
- 					<sa-td name="收费项" prop="itemName" width="140"></sa-td>
 
- 					<sa-td name="越南车" prop="cardNo"></sa-td>
 
- 					<sa-td name="中国车" prop="chinaCarNo"></sa-td>
 
- 					<sa-td name="作业公司" prop="pickCustomerName"></sa-td>
 
- 					<sa-td name="计费标准" prop="unit">
 
- 						<template slot-scope="s">
 
- 							{{s.row.itemPrice}}{{s.row.unit}}
 
- 						</template>
 
- 					</sa-td>
 
- 					<!-- 	<sa-td name="状态" prop="status" type="enum" :jv="{0: '未完成', 1: '已完成'}"></sa-td>
 
- 					<sa-td name="作业时间" prop="operateTime"></sa-td> -->
 
- 					<sa-td name="创建时间" prop="createTime" width="160"></sa-td>
 
- 					<sa-td name="接单时间" prop="pickTime" width="160"></sa-td>
 
- 					<sa-td name="确认时间" prop="confirmTime" width="160"></sa-td>
 
- 					<el-table-column label="操作" fixed="right" width="200px" v-if="currentCustomerId=='1'">
 
- 						<template slot-scope="s">
 
- 							<el-button v-if="s.row.pickTime&&!s.row.confirmTime" class="c-btn" type="success"
 
- 								icon="el-icon-edit" @click="confirmFn(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="confirm.visible" width="30%">
 
- 				<span>是否进行接单确认?</span>
 
- 				<span slot="footer" class="dialog-footer">
 
- 					<el-button @click="confirm.visible = false">取 消</el-button>
 
- 					<el-button type="primary" @click="sureConfirm">确 定</el-button>
 
- 				</span>
 
- 			</el-dialog>
 
- 			<el-dialog title="提示" :visible.sync="emodel.visible" width="30%">
 
- 				<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: '', // 主键 
 
- 						itemName: '', // 项目名称
 
- 						cardNo: '',
 
- 						chinaCarNo: '',
 
- 						businessType: '',
 
- 						goodsId: '',
 
- 						goodsName: '',
 
- 						businessNo: '',
 
- 						pageNo: 1, // 当前页
 
- 						pageSize: 10, // 页大小 
 
- 						sortType: 10 // 排序方式
 
- 					},
 
- 					dataCount: 0,
 
- 					dataList: [], // 数据集合 
 
- 					goodsList:[],
 
- 					currentCustomerId: '1',
 
- 					itemTypeList: [],
 
- 					confirm: {
 
- 						visible: false,
 
- 						form: {
 
- 							id: ''
 
- 						}
 
- 					},
 
- 					emodel: {
 
- 						visible: false,
 
- 						form: {
 
- 							beginTime: '',
 
- 							endTime: ''
 
- 						}
 
- 					},
 
- 					dataTime: [],
 
- 				},
 
- 				methods: {
 
- 					getGoods: function() {
 
- 						sa.ajax('/TbGoods/all', sa.removeNull(this.p), function(res) {
 
- 							let list=[{id:'',name:'全部'}];
 
- 							list=list.concat(res.data)
 
- 							this.goodsList =list ; // 数据
 
- 						}.bind(this));
 
- 					},
 
- 					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('/TbBusinessItem/export/items', this.emodel.form, function(resp) {
 
- 							window.open(resp.data);
 
- 							this.emodel.visible = false;
 
- 						}.bind(this));
 
- 					},
 
- 					confirmFn(data) {
 
- 						Object.assign(this.confirm, {
 
- 							visible: true,
 
- 							form: {
 
- 								id: data.id
 
- 							}
 
- 						})
 
- 					},
 
- 					sureConfirm() {
 
- 						sa.ajax('/TbBusinessItem/confirm', {
 
- 							id: this.confirm.form.id
 
- 						}, function(resp) {
 
- 							this.confirm.visible = false;
 
- 							this.f5();
 
- 						}.bind(this));
 
- 					},
 
- 					getCustomer() {
 
- 						sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
 
- 							this.currentCustomerId = resp.data;
 
- 						}.bind(this));
 
- 					},
 
- 					// 刷新
 
- 					f5: function() {
 
- 						sa.ajax('/TbBusinessItem/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-item-info.html?id=' + data.id, '1050px', '90%');
 
- 					},
 
- 					// 查看 - 根据选中的
 
- 					getBySelect: function(data) {
 
- 						var selection = this.$refs['data-table'].selection;
 
- 						if (selection.length == 0) {
 
- 							return sa.msg('请选择一条数据')
 
- 						}
 
- 						this.get(selection[0]);
 
- 					},
 
- 					// 批量删除
 
- 					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('/TbBusinessItem/deleteByIds', {
 
- 								ids: ids.join(',')
 
- 							}, function(res) {
 
- 								sa.arrayDelete(this.dataList, selection);
 
- 								sa.ok('删除成功');
 
- 								sa.f5TableHeight(); // 刷新表格高度 
 
- 							}.bind(this))
 
- 						}.bind(this));
 
- 					},
 
- 				},
 
- 				created: function() {
 
- 					this.getCustomer();
 
- 					this.getGoods();
 
- 					this.f5();
 
- 					sa.onInputEnter();
 
- 				}
 
- 			})
 
- 		</script>
 
- 	</body>
 
- </html>
 
 
  |