|
@@ -29,6 +29,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
id: '',
|
|
id: '',
|
|
|
|
+ type: '',
|
|
user: {},
|
|
user: {},
|
|
info: {},
|
|
info: {},
|
|
is_check: '',
|
|
is_check: '',
|
|
@@ -39,6 +40,7 @@
|
|
onLoad: function(e) {
|
|
onLoad: function(e) {
|
|
const that = this;
|
|
const that = this;
|
|
that.$set(that, `id`, e.id || '');
|
|
that.$set(that, `id`, e.id || '');
|
|
|
|
+ that.$set(that, `type`, e.type || '');
|
|
that.watchLogin()
|
|
that.watchLogin()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -56,7 +58,12 @@
|
|
async searchInfo() {
|
|
async searchInfo() {
|
|
const that = this;
|
|
const that = this;
|
|
if (that.id) {
|
|
if (that.id) {
|
|
- let res = await that.$api(`/orderDetail/${that.id}`, 'GET')
|
|
|
|
|
|
+ let res;
|
|
|
|
+ if (that.type == 'integral') {
|
|
|
|
+ res = await that.$api(`/zrOrder/${that.id}`, `GET`, {}, `integral`)
|
|
|
|
+ } else {
|
|
|
|
+ res = await that.$api(`/orderDetail/${that.id}`, 'GET')
|
|
|
|
+ }
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
that.$set(that, `info`, res.data);
|
|
that.$set(that, `info`, res.data);
|
|
that.search();
|
|
that.search();
|
|
@@ -70,14 +77,18 @@
|
|
},
|
|
},
|
|
async search() {
|
|
async search() {
|
|
const that = this;
|
|
const that = this;
|
|
- let res = await that.$api(`/orderDetail/sot/${that.info._id}`);
|
|
|
|
|
|
+ let res;
|
|
|
|
+ if (that.type == 'integral') {
|
|
|
|
+ res = await that.$api(`/zrOrder/sot/${that.info._id}`, `GET`, {}, `integral`);
|
|
|
|
+ } else {
|
|
|
|
+ res = await that.$api(`/orderDetail/sot/${that.info._id}`, `GET`);
|
|
|
|
+ }
|
|
if (res.errcode == '0') {
|
|
if (res.errcode == '0') {
|
|
that.$set(that, `is_check`, res.data.is_check);
|
|
that.$set(that, `is_check`, res.data.is_check);
|
|
let list = res.data.list.map((i) => ({
|
|
let list = res.data.list.map((i) => ({
|
|
desc: i.time,
|
|
desc: i.time,
|
|
title: i.context
|
|
title: i.context
|
|
}))
|
|
}))
|
|
- console.log(list);
|
|
|
|
that.$set(that, `list`, list);
|
|
that.$set(that, `list`, list);
|
|
that.$set(that, `no`, res.data.no);
|
|
that.$set(that, `no`, res.data.no);
|
|
} else {
|
|
} else {
|