|
@@ -11,6 +11,10 @@
|
|
|
:columns="onlineColumns"
|
|
|
:border="border"
|
|
|
>
|
|
|
+ <template slot="is_combind">
|
|
|
+ <el-tag size="mini">{{String(sitem.is_combind) === "1" ? '组合商品' : '非组合商品'}}</el-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="good_name">
|
|
|
<img
|
|
|
v-if="sitem.good_thumb_img"
|
|
@@ -18,8 +22,8 @@
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
:src="sitem.good_thumb_img"
|
|
|
- alt=""
|
|
|
- >
|
|
|
+ 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>
|
|
@@ -29,7 +33,8 @@
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>上线商品编号:</span><span>{{ sitem.skuCode }}</span>
|
|
|
+ <span>上线商品编号:</span>
|
|
|
+ <span>{{ sitem.skuCode }}</span>
|
|
|
</li>
|
|
|
<li
|
|
|
v-if="
|
|
@@ -39,10 +44,12 @@
|
|
|
private_field.some((item) => item == '1')) || isSupertube)
|
|
|
"
|
|
|
>
|
|
|
- <span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
+ <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 slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -56,7 +63,7 @@
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
:src="si"
|
|
|
- >
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="good_info_img">
|
|
|
<img
|
|
@@ -66,14 +73,15 @@
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
:src="si"
|
|
|
- >
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="company">
|
|
|
<span>{{ sitem.companyName }}</span>
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>业务企业编号:</span><span>{{ sitem.companyNo }}</span>
|
|
|
+ <span>业务企业编号:</span>
|
|
|
+ <span>{{ sitem.companyNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -82,7 +90,8 @@
|
|
|
|
|
|
<template slot="exclusive">
|
|
|
<span v-for="(si, sii) in sitem.exclusive" :key="si.id">
|
|
|
- <span v-if="sii !== 0">/</span> <span>{{ si.name }}</span>
|
|
|
+ <span v-if="sii !== 0">/</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="supply_area">
|
|
@@ -117,15 +126,15 @@
|
|
|
>{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span
|
|
|
- v-if="sitem.noble_metal"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ <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.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
+ }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span>
|
|
|
+ }}-{{ sitem.other_config }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
@@ -146,8 +155,8 @@
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
:src="sitem.good_thumb_img"
|
|
|
- alt=""
|
|
|
- >
|
|
|
+ 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>
|
|
@@ -157,7 +166,8 @@
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>商品成本编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
+ <span>商品成本编号:</span>
|
|
|
+ <span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -171,7 +181,7 @@
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
:src="si"
|
|
|
- >
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="good_info_img">
|
|
|
<img
|
|
@@ -181,14 +191,15 @@
|
|
|
class="fl"
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
:src="si"
|
|
|
- >
|
|
|
+ />
|
|
|
</template>
|
|
|
<template slot="company">
|
|
|
<span>{{ sitem.companyName }}</span>
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>业务企业编号:</span><span>{{ sitem.companyNo }}</span>
|
|
|
+ <span>业务企业编号:</span>
|
|
|
+ <span>{{ sitem.companyNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -199,7 +210,8 @@
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>供应商编号:</span><span>{{ sitem.supplierNo }}</span>
|
|
|
+ <span>供应商编号:</span>
|
|
|
+ <span>{{ sitem.supplierNo }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -207,7 +219,8 @@
|
|
|
</template>
|
|
|
<template slot="exclusive">
|
|
|
<span v-for="(si, sii) in sitem.exclusive" :key="si.id">
|
|
|
- <span v-if="sii !== 0">/</span> <span>{{ si.name }}</span>
|
|
|
+ <span v-if="sii !== 0">/</span>
|
|
|
+ <span>{{ si.name }}</span>
|
|
|
</span>
|
|
|
</template>
|
|
|
<template slot="supply_area">
|
|
@@ -252,15 +265,15 @@
|
|
|
>{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span
|
|
|
- v-if="sitem.noble_metal"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ <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.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
sitem.is_gold_price + '' === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
+ }}启用实时金价-{{ sitem.is_diff + '' === "1" ? "有" : "无" }}工差-{{
|
|
|
sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span>
|
|
|
+ }}-{{ sitem.other_config }}
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
@@ -282,7 +295,7 @@
|
|
|
v-if="sitem.good_img"
|
|
|
:src="sitem.good_img"
|
|
|
alt=""
|
|
|
- /> -->
|
|
|
+ />-->
|
|
|
<span>{{ sitem.good_name }}</span>
|
|
|
<span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
|
|
|
<span v-if="i !== 0">-</span>
|
|
@@ -292,7 +305,8 @@
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
+ <span>商品编号:</span>
|
|
|
+ <span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -333,15 +347,15 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span
|
|
|
- v-if="sitem.noble_name"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ <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.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
sitem.is_gold_price === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
+ }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span>
|
|
|
+ }}-{{ sitem.other_config }}
|
|
|
+ </span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
@@ -352,8 +366,8 @@
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
:src="si"
|
|
|
- alt=""
|
|
|
- >
|
|
|
+ alt
|
|
|
+ />
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<show-data-table
|
|
@@ -367,6 +381,10 @@
|
|
|
:columns="coveColumns"
|
|
|
:border="border"
|
|
|
>
|
|
|
+ <template slot="is_combind">
|
|
|
+ <el-tag size="mini">{{String(sitem.is_combind) === "1" ? '组合商品' : '非组合商品'}}</el-tag>
|
|
|
+ </template>
|
|
|
+
|
|
|
<template slot="good_name">
|
|
|
<span>{{ sitem.good_name }}</span>
|
|
|
<span v-for="(si, i) in sitem.specinfo" :key="si.spec_id + i">
|
|
@@ -377,7 +395,8 @@
|
|
|
<el-popover placement="top" width="300" trigger="hover">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>商品编号:</span><span>{{ sitem.spuCode }}</span>
|
|
|
+ <span>商品编号:</span>
|
|
|
+ <span>{{ sitem.spuCode }}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<i slot="reference" class="el-icon-warning-outline fr" />
|
|
@@ -421,15 +440,15 @@
|
|
|
/>
|
|
|
</template>
|
|
|
<template slot="noble">
|
|
|
- <span
|
|
|
- v-if="sitem.noble_name"
|
|
|
- >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
|
|
|
+ <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.gold_price ? sitem.gold_price : "0" }}元/g-{{
|
|
|
sitem.is_gold_price === "0" ? "不" : ""
|
|
|
- }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
+ }}启用实时金价-{{ sitem.is_diff === "1" ? "有" : "无" }}工差-{{
|
|
|
sitem.config
|
|
|
- }}-{{ sitem.other_config }}</span>
|
|
|
+ }}-{{ sitem.other_config }}
|
|
|
+ </span>
|
|
|
<span v-else>--</span>
|
|
|
</template>
|
|
|
<template slot="good_img">
|
|
@@ -440,8 +459,8 @@
|
|
|
style="width: 23px; height: 23px; margin: 0 5px 0 0"
|
|
|
class="fl"
|
|
|
:src="si"
|
|
|
- alt=""
|
|
|
- >
|
|
|
+ alt
|
|
|
+ />
|
|
|
</template>
|
|
|
</show-data-table>
|
|
|
<div v-else>商品编号有误</div>
|
|
@@ -449,8 +468,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import asyncRequest from '@/apis/components/show-goods-data-table'
|
|
|
-import { mapGetters } from 'vuex'
|
|
|
+import asyncRequest from "@/apis/components/show-goods-data-table";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
import {
|
|
|
onlineColumns,
|
|
|
reColumns,
|
|
@@ -468,22 +487,22 @@ import {
|
|
|
options10,
|
|
|
options11,
|
|
|
options12
|
|
|
-} from './ShowDataTableColumns'
|
|
|
+} 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,
|
|
@@ -491,7 +510,7 @@ export default {
|
|
|
},
|
|
|
spucode: {
|
|
|
type: String,
|
|
|
- default: ''
|
|
|
+ default: ""
|
|
|
},
|
|
|
border: {
|
|
|
type: Boolean,
|
|
@@ -518,86 +537,87 @@ export default {
|
|
|
reColumns,
|
|
|
costColumns,
|
|
|
coveColumns
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(['isSupertube'])
|
|
|
+ ...mapGetters(["isSupertube"])
|
|
|
},
|
|
|
watch: {
|
|
|
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 + '' === '0' ||
|
|
|
- this.type + '' === '1' ||
|
|
|
- this.type + '' === '2' ||
|
|
|
- this.type + '' === '5' ||
|
|
|
- this.type + '' === '6'
|
|
|
+ this.type + "" === "0" ||
|
|
|
+ this.type + "" === "1" ||
|
|
|
+ this.type + "" === "2" ||
|
|
|
+ this.type + "" === "5" ||
|
|
|
+ this.type + "" === "6"
|
|
|
) {
|
|
|
if (this.iscgd) {
|
|
|
res = await asyncRequest.cost_detail({
|
|
|
spuCode: this.spucode
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
res = await asyncRequest.online_detail({
|
|
|
skuCode: this.skucode
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
} else {
|
|
|
if (this.iscgd) {
|
|
|
res = await asyncRequest.cove_detail({
|
|
|
spuCode: this.spucode
|
|
|
- })
|
|
|
+ });
|
|
|
} else {
|
|
|
res = await asyncRequest.re_detail({
|
|
|
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>
|