Ver código fonte

修改售后,添加订单号,修改没有图片问题

YY 2 anos atrás
pai
commit
e6c449849a

+ 4 - 2
src/views/platmanag/sales/detail.vue

@@ -31,7 +31,8 @@
           <el-col v-if="info.type == '4' || info.type == '5'">
             <el-col :span="24" v-for="(item, index) in list" :key="index">
               <el-col :span="24" class="goods bode">
-                <el-col :span="6"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+                <el-col :span="6" v-if="item.goods.file"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+                <el-col :span="6" v-else-if="item.url"><el-image :src="item.url"></el-image></el-col>
                 <el-col :span="18">
                   <el-col :span="12">
                     <el-col>
@@ -201,7 +202,8 @@ export default {
         else if (res.data.type == '1' || res.data.type == '2' || res.data.type == '3') {
           if (res.data.transport) this.$set(this, `transport`, res.data.transport);
           // 图片
-          this.$set(this, `file`, res.data.goods.goods.file[0].url);
+          if (res.data.goods.goods.file) this.$set(this, `file`, res.data.goods.goods.file[0].url);
+          else this.$set(this, `file`, res.data.goods.url);
           // 商品
           this.$set(this, `goods`, res.data.goods.goods);
           // 规格

+ 2 - 1
src/views/platmanag/sales/index.vue

@@ -42,7 +42,8 @@ export default {
       total: 0,
       opera: [{ label: '审核', method: 'exam' }],
       fields: [
-        { label: '顾客', model: 'customer.name' },
+        { label: '顾客', model: 'customer.name', showTip: false },
+        { label: '订单号', model: 'order_detail.no', showTip: false },
         { label: '商品名称', model: 'goods.goods.name', showTip: false },
         {
           label: '售后类型',

+ 10 - 18
src/views/selfShop/sales/detail.vue

@@ -31,7 +31,8 @@
           <el-col v-if="info.type == '4' || info.type == '5'">
             <el-col :span="24" v-for="(item, index) in list" :key="index">
               <el-col :span="24" class="goods bode">
-                <el-col :span="6"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+                <el-col :span="6" v-if="item.goods.file"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+                <el-col :span="6" v-else-if="item.url"><el-image :src="item.url"></el-image></el-col>
                 <el-col :span="18">
                   <el-col :span="12">
                     <el-col>
@@ -197,13 +198,12 @@ export default {
         if (status) res.data.zhStatus = status.label;
         this.$set(this, `info`, res.data);
         this.$set(this, `shop`, res.data.shop);
-        if (res.data.type == '4' || res.data.type == '5') {
-          // 商品
-          this.$set(this, `list`, res.data.order_detail.goods);
-        } else if (res.data.type == '1' || res.data.type == '2' || res.data.type == '3') {
+        if (res.data.type == '4' || res.data.type == '5') this.$set(this, `list`, res.data.order_detail.goods); // 商品
+        else if (res.data.type == '1' || res.data.type == '2' || res.data.type == '3') {
           if (res.data.transport) this.$set(this, `transport`, res.data.transport);
           // 图片
-          this.$set(this, `file`, res.data.goods.goods.file[0].url);
+          if (res.data.goods.goods.file) this.$set(this, `file`, res.data.goods.goods.file[0].url);
+          else this.$set(this, `file`, res.data.goods.url);
           // 商品
           this.$set(this, `goods`, res.data.goods.goods);
           // 规格
@@ -228,9 +228,7 @@ export default {
         else if (res.data.status == '!5') this.$set(this, `active`, 5);
         else if (res.data.status == '-5') this.$set(this, `active`, 4);
         // 查询物流
-        if (res.data.transport) {
-          this.toLog(res.data.transport);
-        }
+        if (res.data.transport) this.toLog(res.data.transport);
         this.loading = false;
       }
     },
@@ -333,9 +331,7 @@ export default {
     // 远程查询快递公司
     async querySearch(value) {
       let res = await this.dictQuery({ code: 'transport_company', label: value });
-      if (this.$checkRes(res)) {
-        this.$set(this, 'shop_transport_typeList', res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, 'shop_transport_typeList', res.data);
     },
     // 买家快递填写保存
     async customerSubmit(val) {
@@ -378,13 +374,9 @@ export default {
       let res;
       // 类型
       res = await this.dictQuery({ code: 'afterSale_type' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `typeList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `typeList`, res.data);
       res = await this.dictQuery({ code: 'afterSale_status' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `statusList`, res.data);
-      }
+      if (this.$checkRes(res)) this.$set(this, `statusList`, res.data);
     },
     // 返回
     toBack() {

+ 2 - 1
src/views/selfShop/sales/index.vue

@@ -42,7 +42,8 @@ export default {
       total: 0,
       opera: [{ label: '审核', method: 'exam' }],
       fields: [
-        { label: '顾客', model: 'customer.name' },
+        { label: '顾客', model: 'customer.name', showTip: false },
+        { label: '订单号', model: 'order_detail.no', showTip: false },
         { label: '商品名称', model: 'goods.goods.name', showTip: false },
         {
           label: '售后类型',