tb-order-list.html 13 KB

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