tb-order-list.html 14 KB

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