|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
- <div class="showGoodsDataTable" v-loading="loading">
|
|
|
+ <div v-loading="loading" class="showGoodsDataTable">
|
|
|
<show-data-table
|
|
|
v-if="
|
|
|
(type + '' === '1' || type + '' === '2' || type + '' === '5' || type + '' === '6') &&
|
|
|
- this.sitem &&
|
|
|
- this.sitem.addtime &&
|
|
|
- !iscgd
|
|
|
+ this.sitem &&
|
|
|
+ this.sitem.addtime &&
|
|
|
+ !iscgd
|
|
|
"
|
|
|
:sitem="sitem"
|
|
|
:columns="onlineColumns"
|
|
@@ -13,13 +13,13 @@
|
|
|
>
|
|
|
<template slot="good_name">
|
|
|
<img
|
|
|
+ v-if="sitem.good_thumb_img"
|
|
|
v-viewer
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
- v-if="sitem.good_thumb_img"
|
|
|
:src="sitem.good_thumb_img"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ >
|
|
|
<span>{{ sitem.good_name }}</span>
|
|
|
<span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
|
|
|
<span v-if="i !== 0">-</span>
|
|
@@ -34,40 +34,39 @@
|
|
|
<li
|
|
|
v-if="
|
|
|
newTime !== '' &&
|
|
|
- private_field &&
|
|
|
- private_field.length > 0 &&
|
|
|
- private_field.some((item) => item == '1')
|
|
|
+ ((private_field &&
|
|
|
+ private_field.length > 0 &&
|
|
|
+ private_field.some((item) => item == '1')) || isSupertube)
|
|
|
"
|
|
|
>
|
|
|
<span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <span>平台商品编码:</span
|
|
|
- ><span>{{ sitem.platform_code_en }}</span>
|
|
|
+ <span>平台商品编码:</span><span>{{ sitem.platform_code_en }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
|
<img
|
|
|
+ v-for="(si, i) in sitem.good_img"
|
|
|
+ :key="si + i"
|
|
|
+ v-viewer
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
- v-viewer
|
|
|
- v-for="(si, i) in sitem.good_img"
|
|
|
:src="si"
|
|
|
- :key="si + i"
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="good_info_img">
|
|
|
<img
|
|
|
+ v-for="(si, i) in sitem.good_info_img"
|
|
|
+ :key="si + i"
|
|
|
+ v-viewer
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
- v-viewer
|
|
|
- v-for="(si, i) in sitem.good_info_img"
|
|
|
:src="si"
|
|
|
- :key="si + i"
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="company">
|
|
|
<span>{{ sitem.company }}</span>
|
|
@@ -77,7 +76,7 @@
|
|
|
<span>业务企业编号:</span><span>{{ sitem.companyNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
|
|
@@ -100,7 +99,7 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options4.find((item) => item.id == sitem.is_stock) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
</template>
|
|
@@ -109,31 +108,32 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options1.find((item) => item.id == sitem.good_type) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
- <span v-if="sitem.good_type + '' === '1'" style="padding: 0 0 0 5px"
|
|
|
- >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.good_type + '' === '1'"
|
|
|
+ style="padding: 0 0 0 5px"
|
|
|
+ >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span v-if="sitem.noble_metal"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
- sitem.noble_name
|
|
|
- }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
- sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
- sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.noble_metal"
|
|
|
+ >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ sitem.noble_name
|
|
|
+ }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
+ sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
+ }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
+ sitem.config
|
|
|
+ }}-{{ sitem.other_config }}</span>
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
|
v-else-if="
|
|
|
(type + '' === '1' || type + '' === '2' || type + '' === '5' || type + '' === '6') &&
|
|
|
- this.sitem &&
|
|
|
- this.sitem.addtime &&
|
|
|
- iscgd
|
|
|
+ this.sitem &&
|
|
|
+ this.sitem.addtime &&
|
|
|
+ iscgd
|
|
|
"
|
|
|
:sitem="sitem"
|
|
|
:columns="costColumns"
|
|
@@ -141,13 +141,13 @@
|
|
|
>
|
|
|
<template slot="good_name">
|
|
|
<img
|
|
|
+ v-if="sitem.good_thumb_img"
|
|
|
v-viewer
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
- v-if="sitem.good_thumb_img"
|
|
|
:src="sitem.good_thumb_img"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ >
|
|
|
<span>{{ sitem.good_name }}</span>
|
|
|
<span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
|
|
|
<span v-if="i !== 0">-</span>
|
|
@@ -160,28 +160,28 @@
|
|
|
<span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
|
<img
|
|
|
+ v-for="(si, i) in sitem.good_img"
|
|
|
+ :key="si + i"
|
|
|
+ v-viewer
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
- v-viewer
|
|
|
- v-for="(si, i) in sitem.good_img"
|
|
|
:src="si"
|
|
|
- :key="si + i"
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="good_info_img">
|
|
|
<img
|
|
|
+ v-for="(si, i) in sitem.good_info_img"
|
|
|
+ :key="si + i"
|
|
|
+ v-viewer
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
- v-viewer
|
|
|
- v-for="(si, i) in sitem.good_info_img"
|
|
|
:src="si"
|
|
|
- :key="si + i"
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
<template slot="company">
|
|
|
<span>{{ sitem.company }}</span>
|
|
@@ -191,7 +191,7 @@
|
|
|
<span>业务企业编号:</span><span>{{ sitem.companyNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="supplierName">
|
|
@@ -202,7 +202,7 @@
|
|
|
<span>供应商编号:</span><span>{{ sitem.supplierNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="exclusive">
|
|
@@ -224,7 +224,7 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options4.find((item) => item.id == sitem.is_stock) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
</template>
|
|
@@ -233,7 +233,7 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options3.find((item) => item.id == sitem.is_auth) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
</template>
|
|
@@ -243,31 +243,32 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options1.find((item) => item.id == sitem.good_type) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
- <span v-if="sitem.good_type + '' === '1'" style="padding: 0 0 0 5px"
|
|
|
- >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.good_type + '' === '1'"
|
|
|
+ style="padding: 0 0 0 5px"
|
|
|
+ >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span v-if="sitem.noble_metal"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
- sitem.noble_name
|
|
|
- }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
- sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
- sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.noble_metal"
|
|
|
+ >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ sitem.noble_name
|
|
|
+ }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
+ sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
+ }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
+ sitem.config
|
|
|
+ }}-{{ sitem.other_config }}</span>
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
|
v-else-if="
|
|
|
(type === '3' || type === '4') &&
|
|
|
- this.sitem &&
|
|
|
- this.sitem.addtime &&
|
|
|
- !iscgd
|
|
|
+ this.sitem &&
|
|
|
+ this.sitem.addtime &&
|
|
|
+ !iscgd
|
|
|
"
|
|
|
:sitem="sitem"
|
|
|
:columns="reColumns"
|
|
@@ -294,7 +295,7 @@
|
|
|
<span>商品编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
<template slot="send_way">
|
|
@@ -305,12 +306,13 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options1.find((item) => item.id == sitem.good_type) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
- <span v-if="sitem.good_type + '' === '1'" style="padding: 0 0 0 5px"
|
|
|
- >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.good_type + '' === '1'"
|
|
|
+ style="padding: 0 0 0 5px"
|
|
|
+ >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="supply_area">
|
|
|
<el-tag
|
|
@@ -319,47 +321,47 @@
|
|
|
(options6.find((item) => item.id + '' === sitem.supply_area + '') || {})
|
|
|
.name || '--'
|
|
|
"
|
|
|
- ></el-tag>
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="pay_way">
|
|
|
<el-tag
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options9.find((item) => item.id + '' == sitem.pay_way + '') || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span v-if="sitem.noble_name"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
- sitem.noble_name
|
|
|
- }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
- sitem.is_gold_price === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
- sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.noble_name"
|
|
|
+ >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ sitem.noble_name
|
|
|
+ }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
+ sitem.is_gold_price === "0" ? "不" : ""
|
|
|
+ }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
+ sitem.config
|
|
|
+ }}-{{ sitem.other_config }}</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
|
<img
|
|
|
+ v-for="(si, sii) in sitem.good_img"
|
|
|
+ :key="si + sii"
|
|
|
v-viewer
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
- v-for="(si, sii) in sitem.good_img"
|
|
|
- :key="si + sii"
|
|
|
:src="si"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
|
v-else-if="
|
|
|
(type === '3' || type === '4') &&
|
|
|
- this.sitem &&
|
|
|
- this.sitem.addtime &&
|
|
|
- iscgd
|
|
|
+ this.sitem &&
|
|
|
+ this.sitem.addtime &&
|
|
|
+ iscgd
|
|
|
"
|
|
|
:sitem="sitem"
|
|
|
:columns="coveColumns"
|
|
@@ -378,7 +380,7 @@
|
|
|
<span>商品编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <i class="el-icon-warning-outline fr" slot="reference"></i>
|
|
|
+ <i slot="reference" class="el-icon-warning-outline fr" />
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
|
|
@@ -391,12 +393,13 @@
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options1.find((item) => item.id == sitem.good_type) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
- <span v-if="sitem.good_type + '' === '1'" style="padding: 0 0 0 5px"
|
|
|
- >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.good_type + '' === '1'"
|
|
|
+ style="padding: 0 0 0 5px"
|
|
|
+ >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="supply_area">
|
|
|
<el-tag
|
|
@@ -405,40 +408,40 @@
|
|
|
(options6.find((item) => item.id === sitem.supply_area) || {})
|
|
|
.name || '--'
|
|
|
"
|
|
|
- ></el-tag>
|
|
|
+ />
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<template slot="pay_way">
|
|
|
<el-tag
|
|
|
:size="'mini'"
|
|
|
v-text="
|
|
|
(options9.find((item) => item.id == sitem.pay_way) || {}).name ||
|
|
|
- '--'
|
|
|
+ '--'
|
|
|
"
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span v-if="sitem.noble_name"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
- sitem.noble_name
|
|
|
- }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
- sitem.is_gold_price === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
- sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span
|
|
|
- >
|
|
|
+ <span
|
|
|
+ v-if="sitem.noble_name"
|
|
|
+ >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ sitem.noble_name
|
|
|
+ }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
+ sitem.is_gold_price === "0" ? "不" : ""
|
|
|
+ }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
+ sitem.config
|
|
|
+ }}-{{ sitem.other_config }}</span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
|
<img
|
|
|
+ v-for="(si, sii) in sitem.good_img"
|
|
|
+ :key="si + sii"
|
|
|
v-viewer
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
- v-for="(si, sii) in sitem.good_img"
|
|
|
- :key="si + sii"
|
|
|
:src="si"
|
|
|
alt=""
|
|
|
- />
|
|
|
+ >
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<div v-else>商品编号有误</div>
|
|
@@ -446,7 +449,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import asyncRequest from "@/apis/components/show-goods-data-table";
|
|
|
+import asyncRequest from '@/apis/components/show-goods-data-table'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
import {
|
|
|
onlineColumns,
|
|
|
reColumns,
|
|
@@ -463,38 +467,37 @@ import {
|
|
|
options9,
|
|
|
options10,
|
|
|
options11,
|
|
|
- options12,
|
|
|
-} from "./ShowDataTableColumns";
|
|
|
+ options12
|
|
|
+} from './ShowDataTableColumns'
|
|
|
export default {
|
|
|
- name: "showGoodsDataTable",
|
|
|
+ name: 'ShowGoodsDataTable',
|
|
|
|
|
|
props: {
|
|
|
newTime: {
|
|
|
type: String,
|
|
|
- default: "",
|
|
|
+ default: ''
|
|
|
},
|
|
|
type: {
|
|
|
type: String,
|
|
|
- default: "",
|
|
|
+ default: ''
|
|
|
},
|
|
|
skucode: {
|
|
|
type: String,
|
|
|
- default: "",
|
|
|
+ default: ''
|
|
|
},
|
|
|
iscgd: {
|
|
|
type: Boolean,
|
|
|
- default: false,
|
|
|
+ default: false
|
|
|
},
|
|
|
spucode: {
|
|
|
type: String,
|
|
|
- default: "",
|
|
|
+ default: ''
|
|
|
},
|
|
|
border: {
|
|
|
type: Boolean,
|
|
|
- default: false,
|
|
|
- },
|
|
|
+ default: false
|
|
|
+ }
|
|
|
},
|
|
|
- computed: {},
|
|
|
data() {
|
|
|
return {
|
|
|
loading: true,
|
|
@@ -514,86 +517,87 @@ export default {
|
|
|
onlineColumns,
|
|
|
reColumns,
|
|
|
costColumns,
|
|
|
- coveColumns,
|
|
|
- };
|
|
|
+ coveColumns
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(['isSupertube'])
|
|
|
},
|
|
|
watch: {
|
|
|
- newTime: function (val) {
|
|
|
+ newTime: function(val) {
|
|
|
if (val) {
|
|
|
- this.initForm();
|
|
|
+ this.initForm()
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.initForm();
|
|
|
+ this.initForm()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
async initForm() {
|
|
|
console.log(
|
|
|
`${this.type}---${this.skucode}---${this.spucode}---${this.iscgd}`
|
|
|
- );
|
|
|
- this.columns = [];
|
|
|
- this.loading = true;
|
|
|
+ )
|
|
|
+ this.columns = []
|
|
|
+ this.loading = true
|
|
|
if (this.type) {
|
|
|
- let res = {};
|
|
|
+ let res = {}
|
|
|
if (
|
|
|
- this.type + '' === "1" ||
|
|
|
- this.type + '' === "2" ||
|
|
|
- this.type + '' === "5" ||
|
|
|
- this.type + '' === "6"
|
|
|
+ this.type + '' === '1' ||
|
|
|
+ this.type + '' === '2' ||
|
|
|
+ this.type + '' === '5' ||
|
|
|
+ this.type + '' === '6'
|
|
|
) {
|
|
|
if (this.iscgd) {
|
|
|
res = await asyncRequest.cost_detail({
|
|
|
- spuCode: this.spucode,
|
|
|
- });
|
|
|
+ spuCode: this.spucode
|
|
|
+ })
|
|
|
} else {
|
|
|
res = await asyncRequest.online_detail({
|
|
|
- skuCode: this.skucode,
|
|
|
- });
|
|
|
+ skuCode: this.skucode
|
|
|
+ })
|
|
|
}
|
|
|
} else {
|
|
|
if (this.iscgd) {
|
|
|
res = await asyncRequest.cove_detail({
|
|
|
- spuCode: this.spucode,
|
|
|
- });
|
|
|
+ spuCode: this.spucode
|
|
|
+ })
|
|
|
} else {
|
|
|
res = await asyncRequest.re_detail({
|
|
|
- spuCode: this.spucode,
|
|
|
- });
|
|
|
+ spuCode: this.spucode
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
- const { code, message, data } = res;
|
|
|
- this.loading = false;
|
|
|
+ const { code, message, data } = res
|
|
|
+ this.loading = false
|
|
|
if (code === 0) {
|
|
|
- this.sitem = JSON.parse(JSON.stringify(data));
|
|
|
- const { cat_info } = this.sitem;
|
|
|
- let cat = "";
|
|
|
+ this.sitem = JSON.parse(JSON.stringify(data))
|
|
|
+ const { cat_info } = this.sitem
|
|
|
+ let cat = ''
|
|
|
if (cat_info && cat_info.length > 0) {
|
|
|
cat_info.forEach((e, i) => {
|
|
|
- cat += i === 0 ? e.name : "_" + e.name;
|
|
|
- });
|
|
|
+ cat += i === 0 ? e.name : '_' + e.name
|
|
|
+ })
|
|
|
}
|
|
|
- this.sitem.cat = cat;
|
|
|
- //线上商品字段转换
|
|
|
+ this.sitem.cat = cat
|
|
|
+ // 线上商品字段转换
|
|
|
if (this.sitem && this.sitem.good_img) {
|
|
|
- this.sitem.good_img = this.sitem.good_img.split(",");
|
|
|
+ this.sitem.good_img = this.sitem.good_img.split(',')
|
|
|
}
|
|
|
if (this.sitem && this.sitem.good_info_img) {
|
|
|
- this.sitem.good_info_img = this.sitem.good_info_img.split(",");
|
|
|
+ this.sitem.good_info_img = this.sitem.good_info_img.split(',')
|
|
|
}
|
|
|
} else if (code >= 100 && code <= 104) {
|
|
|
- await this.logout();
|
|
|
+ await this.logout()
|
|
|
} else {
|
|
|
- this.$message.warning(message);
|
|
|
+ this.$message.warning(message)
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-
|
|
|
-
|
|
|
<style lang="scss" scoped>
|
|
|
</style>
|