1 |
- "use strict";const t=require("../common/vendor.js"),l=require("../api/order.js"),h={data(){return{status:"",orderList:[],tabList:[{name:"全部",status:""},{name:"待支付",status:"1"},{name:"待发货",status:"2"},{name:"待收货",status:"3"},{name:"已完成",status:"5"}]}},mounted(){this.getliveOrderList(this.status)},methods:{confirmReceipt(e){var o=this;t.index.showModal({title:"提示",content:"确认收到货了吗",success:function(a){if(a.confirm){var d={orderId:e.orderId};l.finishOrder(d).then(u=>{u.code==200?(t.index.showToast({icon:"success",title:"操作成功"}),o.getliveOrderList(o.status)):t.index.showToast({icon:"none",title:u.msg})})}else a.cancel}})},cancel(e){var o=this;t.index.showModal({title:"提示",content:"确定取消订单吗",success:function(a){if(a.confirm){var d={orderId:e.orderId};l.cancelOrder(d).then(u=>{u.code==200?(t.index.showToast({icon:"success",title:"操作成功"}),o.getliveOrderList(o.status)):t.index.showToast({icon:"none",title:u.msg})})}else a.cancel}})},refund(e){t.index.navigateTo({url:"./refundOrderProduct?orderId="+e.orderId})},tabsClick(e){this.getliveOrderList(e.status),this.status=e.status},getliveOrderList(e){let o={pageSize:10,page:1,status:e};l.liveOrderList(o).then(a=>{a.code==200?(console.log("订单列表数据>>>>",a),this.orderList=a.rows):t.index.showToast({title:a.msg,icon:"none"})},a=>{console.log("rej:"+JSON.stringify(a))})},showDelivery(e){t.index.navigateTo({url:"./storeOrderDelivery?orderId="+e.orderId})}}};Array||t.resolveComponent("u-tabs")();const f=()=>"../uni_modules/uview-plus/components/u-tabs/u-tabs.js";Math||f();function v(e,o,a,d,u,c){return{a:t.o(c.tabsClick),b:t.p({itemStyle:"width:33%;height:100rpx;",list:u.tabList,lineColor:"#FF5C03"}),c:t.f(u.orderList,(s,n,_)=>t.e({a:t.t(s.orderCode),b:s.status==-1},s.status==-1?{}:s.status==-2?{}:s.status==1?{}:s.status==2?{}:s.status==3?{}:s.status==5?{}:s.status==-3?{}:{},{c:s.status==-2,d:s.status==1,e:s.status==2,f:s.status==3,g:s.status==5,h:s.status==-3,i:t.f(s.orderItemList,(r,i,b)=>({a:r.imgUrl,b:t.t(r.productName),c:t.t(r.sales),d:t.t(r.num),e:i})),j:t.t(s.totalPrice),k:s.status==1},s.status==1?{l:t.o(r=>c.cancel(s),n)}:{},{m:s.status!==-1&&s.status!==-3},s.status!==-1&&s.status!==-3?{n:t.o(r=>c.refund(s),n)}:{},{o:s.status==3||s.status==5},s.status==3||s.status==5?{p:t.o(r=>c.showDelivery(s),n)}:{},{q:s.status==1},s.status==1?{r:t.o(r=>e.pay(s),n)}:{},{s:s.status==3},s.status==3?{t:t.o(r=>c.confirmReceipt(s),n)}:{},{v:s.status==4},s.status==4?{w:t.o(r=>e.evaluate(s),n)}:{},{x:n}))}}const g=t._export_sfc(h,[["render",v],["__scopeId","data-v-11bfd2e6"]]);wx.createPage(g);
|