123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464 |
- <!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" />
- <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.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: .88rem;
- 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;
- }
- /*头部带查询样式*/
- /*.pageView.filterpage {
- background: #00a0ea;
- }*/
- .flex {
- display: flex !important;
- display: -webkit-flex !important;
- }
- .flex.a-center {
- align-items: center;
- }
- .flex.a-end {
- align-items: flex-end;
- }
- .flex.j-center {
- justify-content: center;
- }
- .flex.j-end {
- justify-content: flex-end;
- }
- .flex.jlr {
- justify-content: space-between;
- }
- .flex.col {
- flex-direction: column;
- }
- .flex.wrap {
- flex-wrap: wrap;
- }
- .flex .fx1 {
- flex: 1;
- }
- .pageView.filterpage .search {
- width: 100%;
- background: #00a0ea;
- height: 1.1rem;
- padding-left: 0.36rem;
- padding-right: 0.36rem;
- position: relative;
- box-sizing: border-box;
- /*left: 0;
- top: 0.86rem; */
- }
- .pageView.filterpage .search .searchbox {
- width: 100%;
- height: 0.94rem;
- background: #fff;
- border-radius: 5px;
- }
- .pageView.filterpage .search .searchbox input {
- width: 100%;
- font-size: 0.42rem;
- display: block;
- color: #999;
- height: 100%;
- position: relative;
- padding-left: 15%;
- padding-right: 5%;
- background: none;
- border: 0;
- outline: none;
- }
- .pageView.filterpage .search .searchbox svg {
- position: absolute;
- left: 10%;
- top: 50%;
- transform: translateY(-50%);
- }
- .pageView.filterpage .zhuceTimer {
- width: 100%;
- margin-bottom: 0.2rem;
- background: #fff;
- padding: 0.25rem 0.3rem;
- color: #00a0ea;
- font-size: .42rem;
- background-color: #00a0ea;
- color: #fff;
- box-sizing: border-box;
- }
- .pageView.filterpage .zhuceTimer h4 {
- font-size: .42rem;
- }
- </style>
- </head>
- <body>
- <div id="app" style="position : fixed;height : 100%;width:100%;background-color:#fff" v-cloak>
- <div class="pageView filterpage">
- <div class="searchSpec">
- <div class="search flex a-center">
- <div class="searchbox">
- <svg t="1589079341958" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5394" width="22" height="22">
- <path d="M883.626667 823.04l-145.066667-144.64A337.92 337.92 0 0 0 810.666667 469.333333a341.333333 341.333333 0 1 0-341.333334 341.333334 337.92 337.92 0 0 0 209.066667-72.106667l144.64 145.066667a42.666667 42.666667 0 0 0 60.586667 0 42.666667 42.666667 0 0 0 0-60.586667zM213.333333 469.333333a256 256 0 1 1 256 256 256 256 0 0 1-256-256z" p-id="5395" fill="#bfbfbf"></path>
- </svg>
- <input type="search" placeholder="请输入轮胎胎号" v-model="keyword">
- </div>
- </div>
- </div>
- <van-popup position="bottom" v-model="timeShow">
- <mycalendar title="选择日期" @comfirm="comfirm" @close="timeShow = false"></mycalendar>
- </van-popup>
- <div class="zhuceTimer flex a-center jlr">
- <div class="flex a-center" v-on:click="getTimes">
- <h4>获得时间:</h4>
- <p v-on:click="getTimes(0)">{{ startTime }}</p> ~
- <p v-on:click="getTimes(1)">{{ endTime }}</p>
- </div>
- </div>
- </div>
- <div id="mescroll" class="mescroll-touch-y mescroll">
- <div class="empty" v-for="(order,index) in list">
- <div>
- <div></div>
- <div>
- <samp>获得奖励:</samp><samp>{{ order.bonus }}元</samp>
- </div>
- <!-- <div>
- <span>{{ order.status | judgeStatus }}</span>
- </div> -->
- </div>
- <div>
- <p style="font-size:0.3rem">
- 物料:{{ order.matnr }}
- </p>
- <ul>
- <li>
- 品牌:<span>{{ order.brand }}</span>
- </li>
- <li>
- 规格:<span>{{ order.spec }}</span>
- </li>
- <li>
- 获得时间:<span>{{ order.createTime }}</span>
- </li>
- </ul>
- </div>
- <div>
- <div>
- <p>
- 扫码胎号:<span>{{ order.tirenumber }}</span>
- </p>
- </div>
- </div>
- </div>
- <div v-show="list.length == 0" style="text-align:center;width:100%;overflow: auto;">
- <img src="./image/noData.png" style="margin:1rem auto;width:100%;height : 100%" />
- </div>
- <div style="width: 1rem;height: 1rem;"></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 src="js/vant-ui.js"></script>
- <script type="text/javascript">
- apiready = function() {
- new Vue({
- el: '#app',
- data: {
- list: [],
- userid: '',
- current: 1,
- size: 10, // 订单状态 0,新创建,1已接单,2,驳回,3完成 经销商审核 0 待审核 1 同意 2 拒绝
- frist: 1,
- totalPages: 1,
- hasOther: false,
- mescroll: '',
- // 添加查询
- timeShow: false,
- keyword: '',
- startTime: '开始时间',
- endTime: '结束时间'
- },
- filters: {
- judgeStatus: function(auditStatus, status) {
- return ["待接单", "已接单", "已驳回", "已完成"][status];
- }
- },
- mounted: function() {
- this.init();
- },
- watch: {
- keyword: function(nw, od) {
- this.current = 1;
- this.getOrderList();
- }
- },
- methods: {
- // 查询数据
- // 选择筛选条件
- comfirm: function(v) {
- this.timeShow = false
- },
- //选择时间
- getTimes: function(type) {
- var _this = this;
- this.getTime(function(time) {
- if (type == 0) {
- _this.startTime = time;
- } else {
- _this.endTime = time;
- }
- _this.getOrderList();
- })
- },
- init: function() {
- this.userid = $api.getStorage('userid');
- this.getOrderList();
- },
- configs: function() {
- var _this = this;
- this.frist = 2;
- this.configDownAndPull("mescroll", function(mescroll) {
- _this.mescroll = 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);
- }
- })
- },
- addMore: function() {
- var _this = this;
- if (_this.current < _this.totalPages) {
- _this.current = _this.current + 1;
- _this.getCouponList(_this.mescroll, 1);
- } else {
- _this.hasOther = true;
- }
- },
- //获取列表
- getOrderList: function(mescroll) {
- var params = {
- "storeId": this.userid,
- "size": this.size,
- "current": this.current,
- url: 'json',
- type: 'body',
- "tirenumber": this.keyword,
- "startTime": this.startTime == '开始时间' ? '' : this.startTime + ' 00:00:00',
- "endTime": this.endTime == '结束时间' ? '' : this.endTime + ' 23:59:59',
- },
- _this = this;
- this.$post('lookUserTotalU', params, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.totalPages = ret.page.pages;
- _this.list = _this.current == 1 ? ret.page.records : _this.list.concat(ret.page.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>
|