123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>订单内容</title>
- <link rel="stylesheet" type="text/css" href="./css/api.css" />
- <link rel="stylesheet" type="text/css" href="./css/style1.css" />
- <script type="text/javascript" src="./js/auto-size.js"></script>
- <style>
- ul {
- -webkit-margin-before: 1em;
- -webkit-margin-after: 1em;
- -webkit-margin-start: 0px;
- -webkit-margin-end: 0px;
- -webkit-padding-start: 0px;
- }
- p {
- display: block;
- -webkit-margin-before: 0em;
- -webkit-margin-after: 0em;
- -webkit-margin-start: 0px;
- -webkit-margin-end: 0px;
- }
- li {
- list-style-type: none;
- }
- .empty {
- width: 96%;
- height: auto;
- /*background: rgba(255, 255, 255, 1);*/
- box-shadow: 0px 6px 24px 0px rgba(0, 0, 0, 0.1);
- border-radius: 20px;
- margin: 0 auto;
- margin-top: .2rem;
- }
- .empty>div:nth-child(1) {
- width: 92%;
- margin: 0 auto;
- padding-top: .5rem;
- }
- .empty>div:nth-child(1)>div:nth-child(1) {
- width: .2rem;
- height: .8rem;
- background: rgba(246, 207, 25, 1);
- float: left;
- margin-left: -.41rem;
- }
- .empty>div:nth-child(1)>div:nth-child(2) {
- font-size: .42rem
- }
- .empty>div:nth-child(1)>div:nth-child(3) {
- float: right;
- width: 2.6rem;
- height: .8rem;
- background: rgba(246, 207, 25, 1);
- border-radius: 20px 0px 0px 20px;
- margin-top: -.7rem;
- margin-right: -.41rem;
- text-align: center;
- line-height: .8rem;
- ;
- color: #fff;
- }
- .empty>div:nth-child(2) {
- width: 92%;
- margin: 0 auto;
- padding-top: .2rem;
- border-top: .02rem solid #E7E8EA;
- margin-top: .6rem;
- }
- .empty>div:nth-child(2)>p {
- font-size: .48rem;
- margin-bottom: .2rem;
- }
- .empty>div:nth-child(2)>ul>li {
- font-size: .42rem;
- }
- .empty>div:nth-child(2)>ul>li:nth-child(1) {
- float: left;
- }
- .empty>div:nth-child(2)>ul>li:nth-child(2) {
- float: right;
- }
- .empty>div:nth-child(2)>ul>li:nth-child(3) {
- padding-top: 1rem;
- }
- .empty>div:nth-child(3) {
- width: 92%;
- margin: 0 auto;
- margin-top: .2rem;
- border-top: .02rem solid #E7E8EA;
- padding-top: .4rem;
- }
- .empty>div:nth-child(3) {
- display: flex;
- justify-content: space-between;
- padding-bottom: .2rem;
- }
- .empty>div:nth-child(3)>div:nth-child(1) {
- line-height: .9rem;
- color: #616266;
- }
- .empty>div:nth-child(3)>div:nth-child(2) {
- font-size: .56rem;
- color: #303133;
- }
- .auditBtn {
- display: flex;
- margin-bottom: .1rem;
- }
- .auditBtn div:nth-child(1) {
- background-color: #999;
- color: #FFFFFF;
- font-size: .4rem;
- padding: .2rem .3rem;
- border-radius: .2rem;
- }
- .auditBtn div:nth-child(2) {
- background-color: #0096df;
- color: #FFFFFF;
- font-size: .4rem;
- padding: .2rem .3rem;
- border-radius: .2rem;
- margin-left: .2rem;
- }
- </style>
- </head>
- <body>
- <div id="mescroll" style="position : fixed;height : 100%;overflow-y:scroll;width:98%" >
- <!-- <div id="mescroll"> -->
- <div class="empty" v-for="(order,index) in list" v-on:click="lookOrderInfo(order.id)">
- <div>
- <div></div>
- <div>
- <samp>订单:</samp><samp>{{ order.orderNum }}</samp>
- </div>
- <div>
- <span>{{ order.agentAuditStatus | judgeStatus(order.status) }}</span><img src="" alt="">
- </div>
- </div>
- <div>
- <p>
- {{ order.shopName }}
- </p>
- <ul>
- <li>
- 联系电话:<span>{{ order.bizStoreBasicInfoDto.storePhone }}</span>
- </li>
- <li>
- 条数:<span>{{ order.amount }}</span>条
- </li>
- <li>
- 提交时间:<span>{{ order.createTime }}</span>
- </li>
- </ul>
- </div>
- <div>
- <!-- <div>
- <p>
- 等待中:<span>暂无数据</span>
- </p>
- </div> -->
- <div class="auditBtn" v-show="order.status == 0">
- <div v-on:click.stop="handleOrder(0,order.id,index)">拒绝</div>
- <div v-on:click.stop="handleOrder(1,order.id,index)">同意</div>
- </div>
- </div>
- </div>
- <div v-show="list.length == 0" style="text-align:center">
- <img src="./image/nodata.png" style="margin:2rem auto;width:100%;height :100%" />
- </div>
- <!-- </div> -->
- </div>
- </body>
- <link rel="stylesheet" href="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <script type="text/javascript" src="../script/vue.js"></script>
- <script type="text/javascript" src="../script/api.js"></script>
- <script type="text/javascript" src="../script/httpRequest.js"></script>
- <script type="text/javascript" src="../script/vue_plugins.js"></script>
- <script type="text/javascript">
- apiready = function() {
- new Vue({
- el: '#mescroll',
- data: {
- list: [],
- kunnr: '',
- current: 1,
- size: 10, // 订单状态 0,新创建,1已接单,2,驳回,3完成 经销商审核 0 待审核 1 同意 2 拒绝
- frist : 1,
- },
- filters: {
- judgeStatus: function(auditStatus, status) {
- return ["待接单", "已接单", "已驳回", "已完成"][status];
- }
- },
- mounted: function() {
- this.init();
- },
- methods: {
- init: function() {
- var _this = this;
- this.kunnr = $api.getStorage('kunnr');
- this.getOrderList();
- this.addEvent('refushiew',function(){
- _this.getOrderList();
- })
- },
- configs : function(){
- var _this = this;
- this.frist = 2;
- this.configDownAndPull("mescroll", function(mescroll) {
- _this.current = 1;
- _this.getOrderList(mescroll);
- }, function(mescroll) {
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getOrderList(mescroll, 1);
- } else {
- mescroll.endSuccess(_this.size, false);
- }
- })
- },
- getOrderList: function(mescroll) {
- var params = {
- agentCode: this.kunnr,
- current : this.current,
- size : this.size,
- url: 'json',
- type: 'body'
- },
- _this = this;
- console.log(JSON.stringify(params));
- this.$post('getStoreOrderListUrl', params, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.totalPages = ret.data.pages;
- _this.list = _this.current == 1 ? ret.data.records : _this.list.concat(ret.data.records);
- if (mescroll) {
- mescroll.endSuccess(_this.size, true);
- }
- if(_this.frist == 1){
- _this.$nextTick(function(){
- _this.configs();
- })
- }
- }
- });
- },
- // 处理订单操作handerOrderUrl
- handleOrder: function(type, id, index) {
- var data = {
- "id": id.toString(),
- "agentAuditStatus": type == 0 ? '2' : '1',
- "type": "body",
- "url": "json"
- },
- _this = this;
- this.$post('handerOrderUrl', data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- api.toast({
- msg: ret.msg
- });
- setTimeout(function() {
- _this.$set(_this.list[index], "status", (type == 0 ? '2' : '1'));
- }, 200);
- }
- });
- },
- // 查看订单详情
- lookOrderInfo: function(orderId) {
- this.goWin('orderInfo_win', 'orderInfo_win.html', {
- id: orderId
- });
- }
- }
- })
- }
- </script>
- </html>
|