tb-order-list.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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. </head>
  18. <body>
  19. <div class="vue-box" style="display: none;" :style="'display: block;'">
  20. <div class="c-panel">
  21. <!-- ------------- 检索参数 ------------- -->
  22. <div class="c-title">检索参数</div>
  23. <el-form ref="form" :model='p' @submit.native.prevent>
  24. <sa-item type="text" name="车牌号" v-model="p.veNo" width="80px"></sa-item>
  25. <sa-item type="text" name="订单号" v-model="p.tradeNo" width="80px"></sa-item>
  26. <sa-item type="text" name="边民" v-model="p.buyUserName" width="80px"></sa-item>
  27. <sa-item name="扣款状态">
  28. <el-select v-model="p.Sxb010Status">
  29. <el-option label="全部" value=""></el-option>
  30. <el-option label="未扣款" value="0"></el-option>
  31. <el-option label="扣款失败" value="2"></el-option>
  32. <el-option label="已扣款" value="1"></el-option>
  33. </el-select>
  34. </sa-item>
  35. <el-button type="primary" icon="el-icon-search" @click="p.pageNo = 1; f5()">查询</el-button>
  36. <el-button type="info" icon="el-icon-refresh" @click="sa.f5()">重置</el-button>
  37. </el-form>
  38. <!-- ------------- 数据列表 ------------- -->
  39. <el-table class="data-table" ref="data-table" :data="dataList">
  40. <sa-td type="index" width="30px"></sa-td>
  41. <sa-td name="车牌号" prop="veNo"></sa-td>
  42. <sa-td name="订单号" prop="tradeNo" width="180"></sa-td>
  43. <sa-td name="买家" prop="buyUserName"></sa-td>
  44. <sa-td name="商家名称" prop="enterpriseName" width="280px"></sa-td>
  45. <sa-td name="商品名称" prop="goodsNames" width="200px"></sa-td>
  46. <sa-td name="净重(kg)" prop="netWt"></sa-td>
  47. <sa-td name="总金额" prop="totalPrice"></sa-td>
  48. <sa-td name="上架金额(元)" prop="upPrice"></sa-td>
  49. <sa-td name="订单状态" prop="upStatus">
  50. <template slot-scope="s">
  51. <div v-if="s.row.upStatus===2">已上架</div>
  52. <div v-else>未上架</div>
  53. </template>
  54. </sa-td>
  55. <sa-td name="过卡状态" prop="finishStatus">
  56. <template slot-scope="s">
  57. <div v-if="s.row.finishStatus===1">已过卡3</div>
  58. <div v-else>未过卡3</div>
  59. </template>
  60. </sa-td>
  61. <!--(一级市场)订单扣款回执状态[0=初始值 1=扣款成功 2=扣款失败]-->
  62. <sa-td name="扣款状态" prop="sxb010Status">
  63. <template slot-scope="s">
  64. <div v-if="s.row.sxb010Status===0">未扣款</div>
  65. <div v-if="s.row.sxb010Status===1">扣款成功</div>
  66. <div v-else-if="s.row.sxb010Status===2">扣款失败</div>
  67. </template>
  68. </sa-td>
  69. <sa-td name="补扣次数" prop="deductionCount">
  70. <template slot-scope="s">
  71. <div v-if="s.row.deductionCount==0">0</div>
  72. <div v-else>{{s.row.deductionCount}}</div>
  73. </template>
  74. </sa-td>
  75. <sa-td name="补扣时间" prop="deductionTime" width="140px"></sa-td>
  76. <sa-td name="创建时间" prop="createTime" width="140px"></sa-td>
  77. <sa-td type="enum" name="交易确认" prop="peopleConfirmStatus"
  78. :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}"></sa-td>
  79. <sa-td type="enum" name="委托确认" prop="cooperEntrustStatus"
  80. :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}"></sa-td>
  81. <sa-td type="enum" name="进口确认" prop="applyConfirmStatus"
  82. :jv="{1: '已确认[green]', 0: '未确认[#ff910a]'}"></sa-td>
  83. <el-table-column label="操作" fixed="right" width="210px">
  84. <template slot-scope="s">
  85. <el-button class="c-btn" type="success" icon="el-icon-view"
  86. @click="get(s.row)">查看</el-button>
  87. <el-button class="c-btn" type="primary" icon="el-icon-info"
  88. @click="getBank(s.row)">银行回执</el-button>
  89. <span>
  90. <el-button v-if="s.row.sxb010Status!=1
  91. &&s.row.peopleConfirmStatus===1 && s.row.applyConfirmStatus===1
  92. &&sa.isAuth('tb-order-deduction')" class="c-btn" type="warning" @click="deductionHandle(s.row)">订单扣款</el-button>
  93. <el-button v-else :disabled="true" class="c-btn" type="warning">订单扣款</el-button>
  94. </span>
  95. <span>
  96. <el-button v-if="s.row.finishStatus!=1
  97. &&sa.isAuth('tb-order-sendCXB001')" class="c-btn" type="warning"
  98. @click="sendCXB001Handle(s.row)">推送结关</el-button>
  99. <el-button v-else :disabled="true" class="c-btn" type="warning">推送结关</el-button>
  100. </span>
  101. <el-button v-if="sa.isAuth('tb-order-send009')" class="c-btn" type="danger"
  102. @click="send009ToHt(s.row)">补推009</el-button>
  103. <!--<el-button v-if="s.row.upStatus==2&&s.row.resaleStatus==0&&sa.isAuth('tb-order-edit-price')"
  104. class="c-btn" type="warning" icon="el-icon-view" @click="editPrice(s.row)">修改上架金额</el-button>-->
  105. </template>
  106. </el-table-column>
  107. </el-table>
  108. <!-- ------------- 分页 ------------- -->
  109. <sa-item type="page" :curr.sync="p.pageNo" :size.sync="p.pageSize" :total="dataCount"
  110. @change="f5()"></sa-item>
  111. </div>
  112. <el-dialog :title="model.title" :visible.sync="model.visible" width="500px">
  113. <div>
  114. 当前价格(元):{{model.form.upPrice}}
  115. </div>
  116. <sa-item type="num" name="金额" v-model="model.form.selPrice" placeholder="确认金额" br></sa-item>
  117. <span slot="footer" class="dialog-footer">
  118. <el-button @click="model.visible = false">取 消</el-button>
  119. <el-button type="primary" @click="save">保存</el-button>
  120. <el-button type="primary" @click="sel">转售二级</el-button>
  121. </span>
  122. </el-dialog>
  123. <el-dialog :title="deduction.title" :visible.sync="deduction.visible" width="500px">
  124. <sa-item name="车牌号" v-model="deduction.veNo" placeholder="车牌号" br></sa-item>
  125. <span slot="footer" class="dialog-footer">
  126. <el-button @click="deduction.visible = false">取 消</el-button>
  127. <el-button type="primary" @click="ToDeductionByVeNo">确定</el-button>
  128. </span>
  129. </el-dialog>
  130. <el-dialog :title="sendCXB001.title" :visible.sync="sendCXB001.visible" width="500px">
  131. <sa-item name="车牌号" v-model="sendCXB001.veNo" placeholder="车牌号" br></sa-item>
  132. <span slot="footer" class="dialog-footer">
  133. <el-button @click="sendCXB001.visible = false">取 消</el-button>
  134. <el-button type="primary" @click="ToSendCXB001ByVeNo">确定</el-button>
  135. </span>
  136. </el-dialog>
  137. </div>
  138. <script>
  139. var app = new Vue({
  140. components: {
  141. "sa-item": httpVueLoader('../../sa-frame/com/sa-item.vue'),
  142. "sa-td": httpVueLoader('../../sa-frame/com/sa-td.vue'),
  143. },
  144. el: '.vue-box',
  145. data: {
  146. model: {
  147. title: '修改价格',
  148. visible: false,
  149. form: {
  150. id: '',
  151. upPrice: '',
  152. selPrice: 0
  153. }
  154. },
  155. deduction: {
  156. title: '按车补扣款',
  157. visible: false,
  158. veNo: ''
  159. },
  160. sendCXB001: {
  161. title: '按车推结关',
  162. visible: false,
  163. veNo: ''
  164. },
  165. p: { // 查询参数
  166. tradeNo: '', // 订单号
  167. buyUserName: '', // 买家
  168. sxb010Status: '', // 商家名称
  169. returns: 0,
  170. chargebacks: 0,
  171. pageNo: 1, // 当前页
  172. pageSize: 10, // 页大小
  173. sortType: 0 // 排序方式
  174. },
  175. dataCount: 0,
  176. dataList: [], // 数据集合
  177. },
  178. methods: {
  179. editPrice(item) {
  180. this.model = {
  181. title: '修改订单【' + item.tradeNo + '】价格',
  182. visible: true,
  183. form: item
  184. }
  185. },
  186. save() {
  187. let price = this.model.form.selPrice;
  188. if (!price) {
  189. sa.error('请输入金额')
  190. return;
  191. }
  192. sa.ajax('/level-one-server/TbOrder/editUpPrice', {
  193. id: this.model.form.id,
  194. price: price
  195. }, function(res) {
  196. this.f5();
  197. this.model.visible = false;
  198. }.bind(this));
  199. },
  200. sel() {
  201. let price = this.model.form.selPrice;
  202. if (!price) {
  203. sa.error('请输入金额')
  204. return;
  205. }
  206. sa.ajax('/level-two-server/TbOrders/addOrderByResale', {
  207. id: this.model.form.id,
  208. price: price
  209. }, function(res) {
  210. this.f5();
  211. this.model.visible = false;
  212. }.bind(this));
  213. },
  214. deductionHandle(data) {
  215. sa.confirm('是否执行订单扣款操作', function() {
  216. sa.ajax('/level-one-server/TbOrder/deduction?id=' + data.id, function(res) {
  217. sa.ok('操作成功');
  218. sa.f5TableHeight(); // 刷新表格高度
  219. }.bind(this))
  220. }.bind(this));
  221. },
  222. deductionByVeNo() {
  223. this.deduction.visible = true
  224. },
  225. ToDeductionByVeNo() {
  226. let veNo = this.deduction.veNo;
  227. if (!veNo) {
  228. sa.error('请输入车牌号')
  229. return;
  230. }
  231. sa.showIframe('按车补扣款【' + veNo + '】', 'tb-order-deductionByVeNo.html?veNo=' + veNo, '1660px',
  232. '97%');
  233. },
  234. sendCXB001Handle(data) {
  235. sa.confirm('是否执行推送结关信息操作', function() {
  236. sa.ajax('/level-one-server/TbOrder/sendCXB001?id=' + data.id, function(res) {
  237. sa.ok('操作成功');
  238. sa.f5TableHeight(); // 刷新表格高度
  239. }.bind(this))
  240. }.bind(this));
  241. },
  242. sendCXB001ByVeNo() {
  243. this.sendCXB001.visible = true
  244. },
  245. ToSendCXB001ByVeNo() {
  246. let veNo = this.sendCXB001.veNo;
  247. if (!veNo) {
  248. sa.error('请输入车牌号')
  249. return;
  250. }
  251. sa.showIframe('按车推结关【' + veNo + '】', 'tb-order-sendCXB001ByVeNo.html?veNo=' + veNo, '1660px',
  252. '97%');
  253. },
  254. send009ToHt(data) {
  255. sa.confirm('是否执行推送009报文操作', function() {
  256. sa.ajax('/level-one-server/TbOrder/send009ToHt?id=' + data.id, function(res) {
  257. sa.ok('操作成功');
  258. sa.f5TableHeight(); // 刷新表格高度
  259. }.bind(this))
  260. }.bind(this));
  261. },
  262. // 刷新
  263. f5: function() {
  264. this.deduction.veNo = '';
  265. this.deduction.visible = false;
  266. this.sendCXB001.veNo = '';
  267. this.sendCXB001.visible = false;
  268. sa.ajax('/level-one-server/TbOrder/getList', sa.removeNull(this.p), function(res) {
  269. this.dataList = res.data; // 数据
  270. this.dataCount = res.dataCount; // 数据总数
  271. sa.f5TableHeight(); // 刷新表格高度
  272. }.bind(this));
  273. },
  274. // 查看
  275. get: function(data) {
  276. sa.showIframe('数据详情', 'tb-order-info.html?id=' + data.id, '1050px', '70%');
  277. },
  278. // 查看银行回执
  279. getBank: function(data) {
  280. sa.showIframe('银行回执', 'tb-order-bank-list.html?tradeNo=' + data.tradeNo, '1300px', '90%');
  281. },
  282. // 修改
  283. update: function(data) {
  284. sa.showIframe('修改数据', 'tb-order-add.html?id=' + data.id, '1000px', '90%');
  285. },
  286. // 新增
  287. add: function(data) {
  288. sa.showIframe('新增数据', 'tb-order-add.html?id=-1', '1000px', '90%');
  289. },
  290. // 删除
  291. del: function(data) {
  292. sa.confirm('是否删除,此操作不可撤销', function() {
  293. sa.ajax('/level-one-server/TbOrder/delete?id=' + data.id, function(res) {
  294. sa.arrayDelete(this.dataList, data);
  295. sa.ok('删除成功');
  296. sa.f5TableHeight(); // 刷新表格高度
  297. }.bind(this))
  298. }.bind(this));
  299. },
  300. // 批量删除
  301. deleteByIds: function() {
  302. // 获取选中元素的id列表
  303. let selection = this.$refs['data-table'].selection;
  304. let ids = sa.getArrayField(selection, 'id');
  305. if (selection.length == 0) {
  306. return sa.msg('请至少选择一条数据')
  307. }
  308. // 提交删除
  309. sa.confirm('是否批量删除选中数据?此操作不可撤销', function() {
  310. sa.ajax('/level-one-server/TbOrder/deleteByIds', {
  311. ids: ids.join(',')
  312. }, function(res) {
  313. sa.arrayDelete(this.dataList, selection);
  314. sa.ok('删除成功');
  315. sa.f5TableHeight(); // 刷新表格高度
  316. }.bind(this))
  317. }.bind(this));
  318. },
  319. },
  320. created: function() {
  321. this.f5();
  322. sa.onInputEnter();
  323. }
  324. })
  325. </script>
  326. </body>
  327. </html>