tb-car-disincle-list.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>入境登记-列表</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
  8. <!-- 所有的 css & js 资源 -->
  9. <link rel="stylesheet" href="../../static/kj/element-ui/theme-chalk/index.css">
  10. <link rel="stylesheet" href="../../static/sa.css">
  11. <script src="../../static/kj/vue.min.js"></script>
  12. <script src="../../static/kj/element-ui/index.js"></script>
  13. <script src="../../static/kj/httpVueLoader.js"></script>
  14. <script src="../../static/kj/jquery.min.js"></script>
  15. <script src="../../static/kj/layer/layer.js"></script>
  16. <script src="../../static/sa.js"></script>
  17. <script src="../../static/kj/upload-util.js"></script>
  18. </head>
  19. <style>
  20. .complete-modal .c-label,
  21. .confirm-in .c-label,
  22. .confirm-info .c-label {
  23. width: 290px;
  24. }
  25. </style>
  26. <body>
  27. <div class="vue-box" style="display: none;" :style="'display: block;'">
  28. <div class="c-panel">
  29. <div style="float: right;right: 20px;margin-top: 10px;">
  30. <label>刷新频率:</label>
  31. <el-select v-model="fresh.value" placeholder="请选择" @change="restartTimmer">
  32. <el-option label="10s" :value="10"></el-option>
  33. <el-option label="20s" :value="20"></el-option>
  34. <el-option label="30s" :value="30"></el-option>
  35. <el-option label="50s" :value="50"></el-option>
  36. <el-option label="60s" :value="60"></el-option>
  37. </el-select>
  38. </div>
  39. <!-- ------------- 检索参数 ------------- -->
  40. <div class="c-title">检索参数</div>
  41. <el-form ref="form" :model='p' @submit.native.prevent>
  42. <sa-item type="text" name="业务单号" placeholder="业务单号" v-model="p.no"></sa-item>
  43. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
  44. <sa-item type="text" name="客户" placeholder="客户" v-model="p.customerName"></sa-item>
  45. <sa-item type="text" name="货主" placeholder="客户" v-model="p.owner"></sa-item>
  46. <div class="c-item">
  47. <label class="c-label">确认状态:</label>
  48. <el-select v-model="p.adminConfirmInput" placeholder="请选择" @change="f5()">
  49. <el-option label="全部" :value="-1"></el-option>
  50. <el-option label="已确认" :value="1"></el-option>
  51. <el-option label="未确认" :value="0"></el-option>
  52. </el-select>
  53. </div>
  54. <div class="c-item">
  55. <label class="c-label">业务项:</label>
  56. <el-select v-model="p.goodsId">
  57. <el-option v-for="good in goodsList" :key="good.id" :label="good.name" :value="good.id">
  58. </el-option>
  59. </el-select>
  60. </div>
  61. <div class="c-item">
  62. <label class="c-label">审核状态:</label>
  63. <el-select v-model="p.confirmJudge">
  64. <el-option label="全部" value=""></el-option>
  65. <el-option label="未审核" :value="0"></el-option>
  66. <el-option label="审核通过" :value="1"></el-option>
  67. <el-option label="审核驳回" :value="2"></el-option>
  68. </el-select>
  69. </div>
  70. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  71. <el-button type="info" icon="el-icon-search"
  72. @click="p.carNo = '';p.adminConfirmInput=-1;p.customerName='';p.owner='';p.no='';p.confirmJudge=''; f5()">重置
  73. </el-button>
  74. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
  75. 新增
  76. </el-button>
  77. <br />
  78. </el-form>
  79. <!-- ------------- 数据列表 ------------- -->
  80. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
  81. <el-table-column type="index" width="50"></el-table-column>
  82. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  83. <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
  84. <sa-td name="货主" prop="owner" width="160"></sa-td>
  85. <sa-td name="业务项" prop="goodsName" width="160"></sa-td>
  86. <el-table-column label="车牌号" width="160">
  87. <template slot-scope="s">
  88. <label>{{s.row.carNoStr}}</label>
  89. </template>
  90. </el-table-column>
  91. <sa-td name="作业时间" prop="operateTime" width="160"></sa-td>
  92. <sa-td name="审核状态" prop="confirmJudge" type="enum" :jv="{0: '未审核', 1:'审核通过',2:'审核驳回'}"></sa-td>
  93. <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
  94. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  95. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  96. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  97. </sa-td>
  98. <el-table-column label="操作" width="415px" fixed="right">
  99. <template slot-scope="s">
  100. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-judge')
  101. &&s.row.confirmJudge!==1&&s.row.payStatus!==3" @click="judgeFn(s.row)">业务审核
  102. </el-button>
  103. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
  104. &&currentCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认
  105. </el-button>
  106. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-business-confirm')
  107. &&currentCustomerId=='1'&&s.row.adminConfirmInput==1" @click="checkConfirmFn(s.row)">查看账单
  108. </el-button>
  109. <el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
  110. <el-button class="c-btn" type="primary"
  111. v-if="currentCustomerId=='1'||(s.row.adminConfirmInput==0&&sa.isAuth('tb-flex-business-edit'))"
  112. @click="update(s.row)">
  113. 修改
  114. </el-button>
  115. <el-button v-if="sa.isAuth('tb-flex-business-edit')" class="c-btn" type="primary"
  116. @click="carFn(s.row)">车辆管理
  117. </el-button>
  118. <el-button class="c-btn" type="primary" v-if="(currentCustomerId=='1'||(sa.isAuth('tb-flex-business-pay')))
  119. &&s.row.payStatus!=3" @click="handlerPay(s.row)">
  120. 线下收费
  121. </el-button>
  122. <el-button v-if="sa.isAuth('tb-business-car-bind')" class="c-btn" type="primary"
  123. @click="businessFn(s.row)">绑定车辆
  124. </el-button>
  125. <el-button v-if="sa.isAuth('tb-business-zx-print')&&zxShow(s.row.goodsName)" class="c-btn"
  126. type="success" @click="zxPrint(s.row.id)">装卸打印
  127. </el-button>
  128. <el-button class="c-btn" type="danger"
  129. v-if="sa.isAuth('tb-flex-business-del')&&s.row.adminConfirmInput==0&&s.row.payMoney==0"
  130. @click="del(s.row)">删除
  131. </el-button>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. <!-- ------------- 分页 ------------- -->
  136. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  137. </sa-item>
  138. </div>
  139. <el-dialog :title="confirm.title" :visible.sync="confirm.visible" width="650px">
  140. <div class="confirm-info">
  141. <el-row>
  142. <sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
  143. <sa-info :name="item.itemName" br v-for="item in confirm.form.items">
  144. {{item.itemPrice}}x{{item.num}}={{item.total}}元
  145. </sa-info>
  146. <sa-info name="创建时间" br>{{confirm.form.createTime}}</sa-info>
  147. <sa-info name="总计费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
  148. </el-row>
  149. </div>
  150. <span slot="footer" class="dialog-footer">
  151. <div v-if="confirm.form.adminConfirmInput==0">
  152. <el-button @click="confirm.visible = false">取 消</el-button>
  153. <el-button type="primary" @click="sureConfirmFn">确 认</el-button>
  154. </div>
  155. <div v-else>
  156. <el-button @click="confirm.visible = false">关闭</el-button>
  157. </div>
  158. </span>
  159. </el-dialog>
  160. </div>
  161. <script>
  162. var app = new Vue({
  163. components: {
  164. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
  165. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  166. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  167. },
  168. el: '.vue-box',
  169. data: {
  170. value: '',
  171. currentCustomerId: '1',
  172. confirm: {
  173. visible: false,
  174. title: '',
  175. form: {
  176. ids: ''
  177. }
  178. },
  179. p: { // 查询参数
  180. adminConfirmInput: -1,
  181. confirmJudge:'',
  182. customerName: '',
  183. supplement: 0,
  184. owner: '',
  185. no: '',
  186. carNo: '', // 车牌号
  187. goodsId: '',
  188. pageNo: 1, // 当前页
  189. pageSize: 20, // 页大小
  190. sortType: 0 // 排序方式
  191. },
  192. dataCount: 0,
  193. dataList: [], // 数据集合
  194. timmer: null,
  195. fresh: {
  196. value: 60
  197. },
  198. goodsList: [],
  199. },
  200. methods: {
  201. judgeFn(data) {
  202. this.stopTimmer();
  203. sa.showIframe('业务审核', 'tb-business-judge.html?id=' + data.id, '1050px', '90%');
  204. },
  205. zxShow(goodsName) {
  206. var flag = goodsName.indexOf("整车");
  207. if (flag > 0 || flag === 0) {
  208. return true;
  209. } else {
  210. return false;
  211. }
  212. },
  213. zxPrint(id) {
  214. this.$confirm(' 点击确定开始打印!', '提示', {
  215. confirmButtonText: '确定',
  216. cancelButtonText: '取消',
  217. }).then(() => {
  218. sa.showIframe('打印装卸业务确认单', 'print-zxbusiness.html?id=' + id, '1000px', '100%');
  219. }).catch(() => {
  220. });;
  221. },
  222. getGoodsList() {
  223. sa.ajax('/TbGoods/getList', function(resp) {
  224. this.goodsList = resp.data;
  225. }.bind(this));
  226. },
  227. stopTimmer() {
  228. if (this.timmer != null) {
  229. clearInterval(this.timmer);
  230. }
  231. },
  232. restartTimmer() {
  233. this.stopTimmer();
  234. let val = this.fresh.value;
  235. this.timmer = setInterval(() => {
  236. this.f5();
  237. }, val * 1000)
  238. },
  239. businessFn(data) {
  240. this.stopTimmer();
  241. sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
  242. businessId: data.id
  243. }, function(resp) {
  244. let list = resp.data;
  245. let str = list.map(car => car.carNo).join('、');
  246. let businessCarIds = list.map(car => car.id).join(',');
  247. sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
  248. '&businessCarId=' + data.businessCarId + '&carNo=' + str +
  249. '&businessCarIds=' + businessCarIds, '90%', "90%");
  250. }.bind(this))
  251. },
  252. carFn(data) {
  253. this.stopTimmer();
  254. sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id + '&payStatus=' + data
  255. .payStatus + '&confirm=' + data.adminConfirmInput, '1050px', '75%');
  256. },
  257. handlerPay(data) {
  258. this.stopTimmer();
  259. sa.showIframe('线下收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '95%');
  260. },
  261. getCurrendCustomer() {
  262. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  263. this.currentCustomerId = resp.data;
  264. }.bind(this));
  265. },
  266. // 查看
  267. get: function(data) {
  268. this.stopTimmer();
  269. sa.showIframe('数据详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
  270. },
  271. add: function(data) {
  272. this.stopTimmer();
  273. sa.showIframe('新增数据', 'tb-car-disincle-add.html?id=-1', '1080px', '90%');
  274. },
  275. update(data) {
  276. sa.showIframe('修改数据', 'tb-car-disincle-edit.html?id=' + data.id, '1080px', '90%');
  277. },
  278. getPcodeByCurrRid() {
  279. this.stopTimmer();
  280. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  281. this.perCode = resp.data;
  282. }.bind(this))
  283. },
  284. confirmFn(data) {
  285. sa.ajax('/TbBusinessItem/getList', {
  286. businessId: data.id
  287. }, function(resp) {
  288. data.items = resp.data;
  289. Object.assign(this.confirm, {
  290. visible: true,
  291. title: '账单确认',
  292. form: data,
  293. })
  294. this.confirm.form.ids = data.id;
  295. }.bind(this));
  296. },
  297. checkConfirmFn(data) {
  298. sa.ajax('/TbBusinessItem/getList', {
  299. businessId: data.id
  300. }, function(resp) {
  301. data.items = resp.data;
  302. Object.assign(this.confirm, {
  303. visible: true,
  304. title: '查看账单',
  305. form: data,
  306. })
  307. }.bind(this));
  308. },
  309. // 删除
  310. del: function(data) {
  311. sa.confirm('是否删除,此操作不可撤销', function() {
  312. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
  313. data.businessCarId,
  314. function(res) {
  315. sa.arrayDelete(this.dataList, data);
  316. sa.ok('删除成功');
  317. sa.f5TableHeight(); // 刷新表格高度
  318. }.bind(this))
  319. }.bind(this));
  320. },
  321. sureConfirmFn() {
  322. sa.ajax('/TbBusiness/confirm', {
  323. ids: this.confirm.form.ids
  324. }, function(resp) {
  325. this.confirm.visible = false;
  326. this.f5();
  327. }.bind(this))
  328. },
  329. // 刷新
  330. f5: function() {
  331. sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.p), function(res) {
  332. this.dataList = res.data; // 数据
  333. this.dataCount = res.dataCount; // 数据总数
  334. sa.f5TableHeight(); // 刷新表格高度
  335. this.restartTimmer();
  336. }.bind(this));
  337. },
  338. },
  339. created: function() {
  340. sa.onInputEnter();
  341. },
  342. mounted() {
  343. this.getCurrendCustomer();
  344. this.getGoodsList();
  345. this.f5();
  346. },
  347. beforeDestroy() {
  348. this.stopTimmer();
  349. }
  350. })
  351. </script>
  352. </body>
  353. </html>