tb-supplement-list.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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. <!-- ------------- 检索参数 ------------- -->
  30. <div class="c-title">检索参数</div>
  31. <el-form ref="form" :model='p' @submit.native.prevent>
  32. <sa-item type="text" name="业务单号" placeholder="业务单号" v-model="p.no"></sa-item>
  33. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="p.carNo"></sa-item>
  34. <sa-item type="text" name="客户" placeholder="客户" v-model="p.customerName"></sa-item>
  35. <sa-item type="text" name="货主" placeholder="客户" v-model="p.owner"></sa-item>
  36. <div class="c-item">
  37. <label class="c-label">审批状态:</label>
  38. <el-select v-model="p.oaResult" placeholder="请选择" @change="f5()">
  39. <el-option label="未审核" value=""></el-option>
  40. <el-option label="审核通过" value="审批通过"></el-option>
  41. <el-option label="不通过" value="审批驳回"></el-option>
  42. </el-select>
  43. </div>
  44. <div class="c-item">
  45. <label class="c-label">业务项:</label>
  46. <el-select v-model="p.goodsId">
  47. <el-option v-for="good in goodsList" :key="good.id" :label="good.name" :value="good.id">
  48. </el-option>
  49. </el-select>
  50. </div>
  51. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  52. <el-button type="info" icon="el-icon-search"
  53. @click="p.carNo = '';p.oaResult='';p.customerName='';p.owner='';p.no=''; f5()">重置
  54. </el-button>
  55. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="add()">
  56. 新增</el-button>
  57. <el-button v-if="sa.isAuth('tb-flex-business-add')" size="mini" type="primary" @click="selectFn">
  58. 选择异常业务单</el-button>
  59. <br />
  60. </el-form>
  61. <!-- ------------- 数据列表 ------------- -->
  62. <el-table class="data-table" ref="data-table" :data="dataList" style="margin-top: 20px;">
  63. <el-table-column type="index" label="序号" width="50"></el-table-column>
  64. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  65. <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
  66. <sa-td name="货主" prop="owner" width="160"></sa-td>
  67. <sa-td name="业务项" prop="goodsName" width="160"></sa-td>
  68. <el-table-column label="车牌号" width="160">
  69. <template slot-scope="s">
  70. <label>{{s.row.carNoStr}}</label>
  71. </template>
  72. </el-table-column>
  73. <sa-td name="作业时间" prop="operateTime" width="140"></sa-td>
  74. <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
  75. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  76. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  77. <sa-td name="微信支付号" prop="transactionId" width="240"></sa-td>
  78. <sa-td name="OA流程" prop="sendOa" type="enum" :jv="{1: '已发起', 0: '未发起'}"></sa-td>
  79. <sa-td name="发起时间" prop="sendTime" width="140"></sa-td>
  80. <sa-td name="发起人" prop="sendBy"></sa-td>
  81. <sa-td name="补录人" prop="supplementBy"></sa-td>
  82. <sa-td name="OA审核" prop="oaResult"></sa-td>
  83. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  84. </sa-td>
  85. <el-table-column label="操作" width="415px" fixed="right">
  86. <template slot-scope="s">
  87. <el-button class="c-btn" type="primary"
  88. v-if="(currentCustomerId=='1'||sa.isAuth('tb-supplement-push'))&&(s.row.sendOa==0||s.row.oaResult==='审批驳回')"
  89. @click="applyFn(s.row)">发起审批</el-button>
  90. <el-button class="c-btn" type="primary" v-if="sa.isAuth('tb-flex-business-confirm')
  91. &&currentCustomerId=='1'&&s.row.adminConfirmInput==0" @click="confirmFn(s.row)">账单确认</el-button>
  92. <el-button class="c-btn" type="primary"
  93. v-if="(currentCustomerId=='1'||sa.isAuth('tb-supplement-edit'))&&(s.row.sendOa==0||s.row.oaResult==='审批驳回')"
  94. @click="update(s.row)">
  95. 修改</el-button>
  96. <el-button class="c-btn" type="success" @click="get(s.row)">查看</el-button>
  97. <el-button v-if="sa.isAuth('tb-flex-business-edit')" class="c-btn" type="primary"
  98. @click="carFn(s.row)">车辆管理
  99. </el-button>
  100. <el-button class="c-btn" type="primary" v-if="(currentCustomerId=='1'||(sa.isAuth('tb-flex-business-pay')))
  101. &&s.row.payStatus!=3" @click="handlerPay(s.row)">
  102. 线下收费</el-button>
  103. <el-button v-if="sa.isAuth('tb-business-car-bind')" class="c-btn" type="primary"
  104. @click="businessFn(s.row)">绑定车辆
  105. </el-button>
  106. <el-button class="c-btn" type="danger"
  107. v-if="(currentCustomerId=='1'||sa.isAuth('tb-supplement-del'))&&s.row.sendOa==0"
  108. @click="del(s.row)">删除
  109. </el-button>
  110. </template>
  111. </el-table-column>
  112. </el-table>
  113. <!-- ------------- 分页 ------------- -->
  114. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount" @change="f5()">
  115. </sa-item>
  116. <el-dialog title="选择异常业务单" :visible.sync="form.visible" width="90%">
  117. <div class="delect-search">
  118. <sa-item type="text" name="业务单号" placeholder="业务单号" v-model="form.p.no"></sa-item>
  119. <sa-item type="text" name="车牌号" placeholder="车牌号" v-model="form.p.carNo"></sa-item>
  120. <el-button type="primary" @click="getErrorList">搜索</el-button>
  121. <el-button type="info" @click="form.p.carNo='';form.p.no='';getErrorList()">重置</el-button>
  122. </div>
  123. <el-card class="box-card" style="margin-top: 20px;">
  124. <div slot="header">
  125. <span>未支付业务列表</span>
  126. </div>
  127. <el-table :data="form.dataList" ref="errorTable" style="height: 450px;">
  128. <el-table-column type="index" label="序号"></el-table-column>
  129. <sa-td name="业务单号" prop="no" width="160"></sa-td>
  130. <sa-td name="客户名称" prop="customerName" width="190"></sa-td>
  131. <sa-td name="货主" prop="owner" width="160"></sa-td>
  132. <sa-td name="业务项" prop="goodsName" width="160"></sa-td>
  133. <el-table-column label="车牌号" width="160">
  134. <template slot-scope="s">
  135. <label>{{s.row.carNoStr}}</label>
  136. </template>
  137. </el-table-column>
  138. <sa-td name="作业时间" prop="operateTime" width="160"></sa-td>
  139. <sa-td name="确认" prop="adminConfirmInput" type="enum" :jv="{1: '已确认', 0: '未确认'}"></sa-td>
  140. <sa-td name="业务费用(元)" prop="itemPrice" width="120"></sa-td>
  141. <sa-td name="已支付(元)" prop="payMoney" width="140"></sa-td>
  142. <sa-td name="支付时间" prop="payTime" width="140"></sa-td>
  143. <sa-td width="160" name="创建时间" prop="createTime"></sa-td>
  144. </sa-td>
  145. <sa-td name="创建人" prop="createBy" width="100"></sa-td>
  146. <el-table-column label="操作" width="100px" fixed="right">
  147. <template slot-scope="s">
  148. <el-button class="c-btn" type="success" @click="doSelect(s.row)">选择</el-button>
  149. </template>
  150. </el-table-column>
  151. </el-table>
  152. <div class="block">
  153. <el-pagination layout="prev, pager, next" @current-change="businessPageChange"
  154. :page-size="form.p.pageSize" :total="form.dataCount" :current-page="form.p.pageNo">
  155. </el-pagination>
  156. </div>
  157. </el-card>
  158. <span slot="footer" class="dialog-footer">
  159. <el-button @click="form.visible = false">取 消</el-button>
  160. <el-button type="primary" @click="form.visible = false">确 定</el-button>
  161. </span>
  162. </el-dialog>
  163. </div>
  164. <el-dialog :title="confirm.title" :visible.sync="confirm.visible" width="650px">
  165. <div class="confirm-info">
  166. <el-row>
  167. <sa-info name="订单号" br>{{confirm.form.no}}</sa-info>
  168. <sa-info :name="item.itemName" br v-for="item in confirm.form.items">
  169. {{item.itemPrice}}x{{item.num}}={{item.total}}元
  170. </sa-info>
  171. <sa-info name="创建时间" br>{{confirm.form.createTime}}</sa-info>
  172. <sa-info name="总计费用" br>{{confirm.form.itemPrice}}(元)</sa-info>
  173. </el-row>
  174. </div>
  175. <span slot="footer" class="dialog-footer">
  176. <div v-if="confirm.form.adminConfirmInput==0">
  177. <el-button @click="confirm.visible = false">取 消</el-button>
  178. <el-button type="primary" @click="sureConfirmFn">确 认</el-button>
  179. </div>
  180. <div v-else>
  181. <el-button @click="confirm.visible = false">关闭</el-button>
  182. </div>
  183. </span>
  184. </el-dialog>
  185. </div>
  186. <script>
  187. var app = new Vue({
  188. components: {
  189. "sa-info": httpVueLoader('../../sa-frame/com/sa-info.vue'),
  190. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  191. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  192. },
  193. el: '.vue-box',
  194. data: {
  195. form: {
  196. visible: false,
  197. dataList: [],
  198. dataCount: 0,
  199. p: {
  200. no: '',
  201. carNo: '',
  202. supplement: 0,
  203. pageSize: 10,
  204. pageNo: 1,
  205. error: 1,
  206. oaResult: ''
  207. }
  208. },
  209. value: '',
  210. currentCustomerId: '1',
  211. confirm: {
  212. visible: false,
  213. title: '',
  214. form: {
  215. ids: ''
  216. }
  217. },
  218. p: { // 查询参数
  219. oaResult: '',
  220. customerName: '',
  221. owner: '',
  222. no: '',
  223. supplement: 1,
  224. carNo: '', // 车牌号
  225. goodsId: '',
  226. pageNo: 1, // 当前页
  227. pageSize: 23, // 页大小
  228. sortType: 0 // 排序方式
  229. },
  230. dataCount: 0,
  231. dataList: [], // 数据集合
  232. timmer: null,
  233. fresh: {
  234. value: 60
  235. },
  236. goodsList: [],
  237. },
  238. methods: {
  239. applyFn(data) {
  240. sa.confirm('是否确认发起OA审批流程?', function() {
  241. sa.ajax('/TbBusiness/applyOA?id=' + data.id, function(res) {
  242. sa.alert('发起成功', this.f5);
  243. }.bind(this))
  244. }.bind(this));
  245. },
  246. selectFn() {
  247. this.form.visible = true;
  248. this.getErrorList()
  249. },
  250. businessPageChange(pageNo) {
  251. this.form.p.pageNo = pageNo;
  252. this.getErrorList();
  253. },
  254. getErrorList() {
  255. sa.ajax('/TbBusiness/getOtherBusiness', sa.removeNull(this.form.p), function(res) {
  256. this.form.dataList = res.data; // 数据
  257. this.form.dataCount = res.dataCount; // 数据总数
  258. }.bind(this));
  259. },
  260. doSelect(data) {
  261. this.form.visible = false;
  262. sa.showIframe('完善补录单', 'tb-car-supplement-select.html?id=' + data.id, '1280px', '90%');
  263. },
  264. businessFn(data) {
  265. sa.ajaxNoLoading('/TbBusinessCar/getOtherBusinessCarByBusinessId', {
  266. businessId: data.id
  267. }, function(resp) {
  268. let list = resp.data;
  269. let str = list.map(car => car.carNo).join('、');
  270. let businessCarIds = list.map(car => car.id).join(',');
  271. sa.showIframe('绑定车辆', 'tb-business-car-business.html?id=' + data.id +
  272. '&businessCarId=' + data.businessCarId + '&carNo=' + str +
  273. '&businessCarIds=' + businessCarIds, '90%', "90%");
  274. }.bind(this))
  275. },
  276. carFn(data) {
  277. sa.showIframe('车辆管理', '../car/tb-business-car-list.html?id=' + data.id + '&payStatus=' + data
  278. .payStatus + '&confirm=' + data.adminConfirmInput, '1050px', '75%');
  279. },
  280. handlerPay(data) {
  281. sa.showIframe('线下收费', 'tb-car-disincle-pay.html?id=' + data.id, '1050px', '95%');
  282. },
  283. getGoodsList() {
  284. sa.ajax('/TbGoods/getList', function(resp) {
  285. this.goodsList = resp.data;
  286. }.bind(this));
  287. },
  288. getCurrendCustomer() {
  289. sa.ajax('/TbCostomer/getCurrentCustomerId', function(resp) {
  290. this.currentCustomerId = resp.data;
  291. }.bind(this));
  292. },
  293. // 查看
  294. get: function(data) {
  295. sa.showIframe('补录单详情', 'tb-car-disincle-info.html?id=' + data.id, '1050px', '90%');
  296. },
  297. add: function(data) {
  298. sa.showIframe('新增补录单', 'tb-supplement-add.html?id=-1', '1280px', '90%');
  299. },
  300. update(data) {
  301. sa.showIframe('修改补录单', 'tb-supplement-edit.html?id=' + data.id, '1280px', '90%');
  302. },
  303. getPcodeByCurrRid() {
  304. sa.ajax('/SpRolePermission/getPcodeByCurrRid', function(resp) {
  305. this.perCode = resp.data;
  306. }.bind(this))
  307. },
  308. confirmFn(data) {
  309. sa.ajax('/TbBusinessItem/getList', {
  310. businessId: data.id
  311. }, function(resp) {
  312. data.items = resp.data;
  313. Object.assign(this.confirm, {
  314. visible: true,
  315. title: '账单确认',
  316. form: data,
  317. })
  318. this.confirm.form.ids = data.id;
  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. del: function(data) {
  331. sa.confirm('是否删除,此操作不可撤销', function() {
  332. sa.ajax('/TbBusiness/deleteOtherBusiness?id=' + data.id + '&businessCarId=' +
  333. data.businessCarId,
  334. function(res) {
  335. sa.arrayDelete(this.dataList, data);
  336. sa.ok('删除成功');
  337. sa.f5TableHeight(); // 刷新表格高度
  338. }.bind(this))
  339. }.bind(this));
  340. },
  341. // 刷新
  342. f5: function() {
  343. sa.ajaxNoLoading('/TbBusiness/getOtherBusiness', sa.removeNull(this.p), function(res) {
  344. this.dataList = res.data; // 数据
  345. this.dataCount = res.dataCount; // 数据总数
  346. sa.f5TableHeight(); // 刷新表格高度
  347. }.bind(this));
  348. },
  349. },
  350. created: function() {
  351. sa.onInputEnter();
  352. },
  353. mounted() {
  354. this.getCurrendCustomer();
  355. this.getGoodsList();
  356. this.f5();
  357. },
  358. })
  359. </script>
  360. </body>
  361. </html>