|
@@ -50,7 +50,7 @@
|
|
|
:key="item.id">
|
|
|
<view class="h">
|
|
|
<view class="l">创建时间:{{item.createTime||''}}</view>
|
|
|
- <view class="r">{{item.status==='1'?'生产中':(item.status==='2'?'生产失败':'生产完成')}}</view>
|
|
|
+ <view class="r">{{array[parseInt(item.orderStatus)+1].name}}</view>
|
|
|
</view>
|
|
|
<view class="h">
|
|
|
<view class="l">订单编号:{{item.id||''}}</view>
|
|
@@ -62,7 +62,10 @@
|
|
|
<view class="h">
|
|
|
<view class="l">设备名称:{{item.deviceName||''}}</view>
|
|
|
</view>
|
|
|
- <view class="h" v-if="item.errorMsg && item.status==2">
|
|
|
+ <view class="h">
|
|
|
+ <view class="l">产品名称:{{item.orderGoodsName||''}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="h" v-if="item.errorMsg && item.orderStatus==2">
|
|
|
<view class="l">异常原因:{{item.errorMsg}}</view>
|
|
|
</view>
|
|
|
<view class="b" v-if="false">
|
|
@@ -91,6 +94,7 @@
|
|
|
index: 0,
|
|
|
index2: 0,
|
|
|
isToday: true,
|
|
|
+ statusId: 0,
|
|
|
deviceId: '',
|
|
|
deviceList: [{
|
|
|
id: '',
|
|
@@ -99,9 +103,9 @@
|
|
|
orderCount: 2,
|
|
|
orderSum: 0.0,
|
|
|
array: [{
|
|
|
- id: '',
|
|
|
+ id: 0,
|
|
|
name: '全部'
|
|
|
- },{id:1, name: '已支付'},{id:2, name:'生产中'},{id:3, name:'生产完成'}],
|
|
|
+ },{id:1, name: '未支付'},{id:2, name: '已支付'},{id:3, name:'已取消'},{id:4, name:'生产完成'},{id:5, name: '异常'},{id:6, name: '转入退款'},],
|
|
|
orderList: [
|
|
|
/*{
|
|
|
name: '美式咖啡',
|
|
@@ -143,13 +147,20 @@
|
|
|
methods: {
|
|
|
bindPickerChange: function(e) {
|
|
|
this.index = e.detail.value
|
|
|
+ this.statusId = this.array[this.index].id
|
|
|
+ this.orderList = []
|
|
|
+ this.queryParams.current = 1
|
|
|
+ let pages = getCurrentPages();
|
|
|
+ let page = pages[pages.length - 1].$page.fullPath;
|
|
|
+ let oType = page.split('type=')[1]
|
|
|
+ this.getOrderList(oType)
|
|
|
},
|
|
|
bindPickerChange2: function(e) {
|
|
|
this.index2 = e.detail.value;
|
|
|
this.deviceId = this.deviceList[this.index2].id
|
|
|
this.orderList = []
|
|
|
this.queryParams.current = 1
|
|
|
- this.queryParams.model.orderEquId = this.deviceId
|
|
|
+ //this.queryParams.model.orderEquId = this.deviceId
|
|
|
let pages = getCurrentPages();
|
|
|
let page = pages[pages.length - 1].$page.fullPath;
|
|
|
let oType = page.split('type=')[1]
|
|
@@ -176,7 +187,7 @@
|
|
|
let page = pages[pages.length - 1].$page.fullPath;
|
|
|
let oType = page.split('type=')[1]
|
|
|
console.log(oType)
|
|
|
- this.getOrderList(oType)
|
|
|
+ this.getOrderList(oType)
|
|
|
},
|
|
|
onCancel(e) {
|
|
|
this.range = []
|
|
@@ -212,23 +223,24 @@
|
|
|
let that = this;
|
|
|
if(type=="1"){
|
|
|
that.range=[util.getNowDate(0), util.getNowDate(1)];
|
|
|
- that.isToday = true
|
|
|
- }else{
|
|
|
- //异常状态位
|
|
|
- //that.queryParams.model
|
|
|
- that.isToday = false
|
|
|
+ that.isToday = true
|
|
|
+ }else{
|
|
|
+ that.isToday = false
|
|
|
}
|
|
|
if (that.deviceId) {
|
|
|
- that.queryParams.model.orderEquId = that.deviceId;
|
|
|
- } else {
|
|
|
- that.queryParams.model = {}
|
|
|
+ that.queryParams.model.orderEquId = that.deviceId
|
|
|
+ }
|
|
|
+ if(that.statusId>0){
|
|
|
+ that.queryParams.model.orderStatus = that.statusId - 1
|
|
|
+ that.index = that.statusId
|
|
|
+ }else if(type=="2"){
|
|
|
+ that.queryParams.model.orderStatus = '4'
|
|
|
+ that.index = 5
|
|
|
}
|
|
|
console.log(that.range)
|
|
|
if (that.range.length > 0) {
|
|
|
that.queryParams.map.createTime_st = that.range[0];
|
|
|
that.queryParams.map.createTime_ed = that.range[1];
|
|
|
- } else {
|
|
|
- that.queryParams.map = {}
|
|
|
}
|
|
|
util.request(api.OrderList, that.queryParams, 'post', 'application/json').then(function(res) {
|
|
|
if (res.code === 0) {
|