123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554 |
- <template>
- <div class="goodsOnlineDetail">
- <div class="goodsOnlineDetail-main" v-if="powers.some((i) => i == '007')">
- <el-tabs v-model="activeTabs">
- <el-tab-pane label="商品上线详情" name="1" v-if="queryType !== 'add'">
- <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
- <el-collapse-item title="商品上线详情" name="0">
- <show-data-table
- :newTime="newTime"
- v-if="newTime !== ''"
- :sitem="sitem"
- :columns="public_listCol"
- >
- <template slot="proof_id">
- <el-popover
- placement="top"
- width="300"
- trigger="hover"
- v-if="sitem.proof.proof_type === '1'"
- >
- <video width="275" controls class="fl">
- <source :src="sitem.proof.proof_url" type="video/mp4" />
- <source :src="sitem.proof.proof_url" type="video/avi" />您的浏览器不支持Video标签。
- </video>
- <i
- class="el-icon-video-camera-solid hover"
- style="font-size: 18px"
- slot="reference"
- ></i>
- </el-popover>
- <img
- v-else-if="sitem.proof.proof_type + '' === '2'"
- style="width: 23px; height: 23px"
- :src="sitem.proof.proof_url"
- class="avatar fl hover"
- v-viewer
- />
- <a
- v-else-if="sitem.proof.proof_type + '' === '3'"
- :href="sitem.proof.proof_url"
- download="凭证文件"
- >点击下载</a>
- <span v-else>暂无凭证</span>
- </template>
- <template slot="is_combind">{{String(sitem.is_combind) === '1' ? '组合商品' : '非组合商品'}}</template>
- <tempalte slot="is_fixed">{{String(sitem.is_fixed) === "0" ? '实时金价' : '一口价'}}</tempalte>
- <template slot="good_name">
- <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>
- <span v-else>_</span>
- <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
- </span>
- <el-popover placement="top" width="300" trigger="hover">
- <ul>
- <li>
- <span>上线商品编号:</span>
- <span>{{ sitem.skuCode }}</span>
- </li>
- <li
- v-if="
- newTime !== '' &&
- private_field &&
- private_field.length > 0 &&
- private_field.some((item) => item == '1')
- "
- >
- <span>成本商品编号:</span>
- <span>{{ sitem.spuCode }}</span>
- </li>
- <li>
- <span>平台商品编码:</span>
- <span>{{ sitem.plat_code }}</span>
- </li>
- </ul>
- <i class="el-icon-warning-outline fr" slot="reference"></i>
- </el-popover>
- </template>
- <template slot="company">
- <span>{{ sitem.company }}</span>
- <el-popover placement="top" width="300" trigger="hover">
- <ul>
- <li>
- <span>业务企业编号:</span>
- <span>{{ sitem.companyNo }}</span>
- </li>
- </ul>
- <i class="el-icon-warning-outline fr" slot="reference"></i>
- </el-popover>
- </template>
- <template slot="good_img">
- <img
- 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="market_url">
- <el-button type="text" size="mini" @click="openMarkletUrl"> {{sitem.market_url}}</el-button>
- </template>
- <template slot="good_info_img">
- <img
- 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="exclusive">
- <span v-for="(si, sii) in sitem.exclusive" :key="si.id">
- <span v-if="sii !== 0">/</span>
- <span>{{ si.name }}</span>
- </span>
- </template>
- <template slot="supply_area">
- <el-tag
- :size="'mini'"
- v-text="
- (options6.find((item) => item.id == sitem.supply_area) || {})
- .name || '--'
- "
- />
- </template>
- <template slot="create_source">
- <el-tag size="mini" :type="sitem.create_source === '1' ? 'warning' : ''">
- {{ sitem.create_source === "1" ? "咨询成交商品" : "手动创建商品" }}
- </el-tag> <span v-if="Number(sitem.create_source) === 1">,咨询销售价 {{ sitem.sale_price }}</span>
- </template>
- <template slot="is_stock">
- <el-tag
- :size="'mini'"
- v-text="
- (options4.find((item) => item.id == sitem.is_stock) || {}).name ||
- '--'
- "
- />
- </template>
- <template slot="exam_status">
- <el-tag
- :size="'mini'"
- :type="
- (options8.find((item) => item.id == sitem.exam_status) || {})
- .type || ''
- "
- v-text="
- (options8.find((item) => item.id == sitem.exam_status) || {})
- .name || '--'
- "
- />
- </template>
- <template slot="good_type">
- <el-tag
- :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>
- </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>
- </template>
- </show-data-table>
- <show-data-table
- :newTime="newTime"
- v-if="
- // newTime !== '' &&
- // private_field &&
- // private_field.length > 0 &&
- // private_field.some((item) => item == '1')
- isDisplayPrivateField('1')
- "
- :sitem="sitem"
- :columns="purchase_listCol"
- >
- <template slot="supplierName">
- <span>{{ sitem.supplierName }}</span>
- <el-popover placement="top" width="300" trigger="hover">
- <ul>
- <li>
- <span>供应商编号:</span>
- <span>{{ sitem.supplierNo }}</span>
- </li>
- </ul>
- <i class="el-icon-warning-outline fr" slot="reference"></i>
- </el-popover>
- </template>
- <template slot="is_auth">
- <el-tag
- :size="'mini'"
- v-text="
- (options3.find((item) => item.id == sitem.is_auth) || {}).name ||
- '--'
- "
- />
- </template>
- <template slot="is_step">
- <el-tag
- :size="'mini'"
- v-text="
- (options7.find((item) => item.id == sitem.is_step) || {}).name ||
- '--'
- "
- />
- </template>
- <template slot="nakelist">
- <div v-if="nakelist">
- <el-table
- :data="nakelist"
- :size="'mini'"
- border
- stripe
- style="width: 99%; margin: 10px 10px 10px 0"
- >
- <el-table-column prop="min_num" label="起订量(>=)" />
- <el-table-column prop="nake_fee" label="成本单价" />
- <el-table-column prop="cost_fee" label="工艺费" />
- <el-table-column prop="delivery_fee" label="物流费" />
- <el-table-column prop="cert_fee" label="证书费" />
- <el-table-column prop="mark_fee" label="加标费" />
- <el-table-column prop="package_fee" label="包装费" />
- <el-table-column prop="other_fee" label="其他费用" />
- <el-table-column prop="nake_total" label="成本合计" />
- </el-table>
- </div>
- <div v-else>--</div>
- </template>
- </show-data-table>
- <show-data-table
- :newTime="newTime"
- v-if="
- newTime !== '' &&
- private_field &&
- private_field.length > 0 &&
- private_field.some((item) => item == '2') &&
- ladderlist &&
- ladderlist.length > 0
- "
- :sitem="sitem"
- :columns="sale_listCol"
- >
- <template slot="ladderlist">
- <el-table
- :data="ladderlist"
- :size="'mini'"
- border
- stripe
- style="width: 99%; margin: 10px 10px 10px 0"
- >
- <el-table-column prop="min_num" label="起订量(>=)" />
- <el-table-column prop="sale_price" label="售价" />
- <el-table-column prop="cost_fee" label="工艺费" />
- <el-table-column prop="market_price" label="市场价" />
- <el-table-column prop="market_platform" label="对比平台" />
- <el-table-column prop="status" label="状态">
- <template slot-scope="scope">
- {{
- scope.row.status + "" === "1" ? "启用" : "禁用"
- }}
- </template>
- </el-table-column>
- </el-table>
- </template>
- </show-data-table>
- </el-collapse-item>
- <!-- -->
- <el-collapse-item
- title="待产品审核"
- name="1"
- v-if="status == '2' && ppowers.some((i) => i == '2') && !isSupertube"
- >
- <FixedPriceForm
- :newTime="newTime"
- :id="queryId"
- :spuCode="spuCode"
- v-if="newTime !== ''"
- :sitem="sitem"
- :isFixed="sitem.is_fixed"
- :disabled="false"
- :isMust="false"
- @resSuccess="initForm"
- @searchChange="examForm1"
- @rejectRes="examForm2"
- />
- </el-collapse-item>
- </el-collapse>
- </el-tab-pane>
- <el-tab-pane label="审批记录" name="2">
- <process-time-line
- v-if="newTime !== ''"
- :newTime="newTime"
- :type="'SPSX'"
- :orderCode="queryId"
- />
- </el-tab-pane>
- <el-tab-pane label="审批备注" name="3">
- <process-remark-time-line v-if="newTime !== ''" :newTime="newTime" :skuCode="queryId" />
- </el-tab-pane>
- <el-tab-pane label="流程图" name="4">
- <flow-chart process_id="16" type="SPSX" :orderCode="queryId" />
- </el-tab-pane>
- </el-tabs>
- </div>
- <div v-else>
- <no-auth></no-auth>
- </div>
- </div>
- </template>
- <script>
- import asyncRequest from "@/apis/service/goodStore/goodsOnline";
- import resToken from "@/mixins/resToken";
- import { mapGetters } from "vuex";
- import processRemarkTimeLine from "./components/process-remark-time-line";
- import { isArray } from "@/utils/validate";
- import onlineForm from "./components/online-form";
- import FixedPriceForm from "./components/fixed-price-form.vue";
- import privateField from "@/mixins/privateField";
- import {
- purchase_listCol,
- public_listCol,
- sale_listCol
- } from "./ShowDataTableColumns";
- import {
- options1,
- options2,
- options3,
- options4,
- options5,
- options6,
- options7,
- options8
- } from "./columns";
- export default {
- name: "goodsOnlineDetail",
- mixins: [resToken, privateField],
- components: {
- onlineForm,
- processRemarkTimeLine,
- FixedPriceForm
- },
- computed: {
- ...mapGetters([
- "tablebtnSize",
- "searchSize",
- "size",
- "private_field",
- "isSupertube"
- ]),
- powers() {
- const tran =
- this.$store.getters.btnList.find(
- item => item.menu_route == "goodsOnlineDetail"
- ) || {};
- const { action } = tran ?? {};
- return action ?? [];
- },
- ppowers() {
- const tran =
- this.$store.getters.roleProcess.find(i => i.process_type === "SPSX") ||
- {};
- const { action } = tran ?? {};
- return action ?? [];
- }
- },
- data() {
- return {
- public_listCol: public_listCol,
- purchase_listCol: purchase_listCol,
- sale_listCol: sale_listCol,
- options1: options1,
- options2: options2,
- options3: options3,
- options4: options4,
- options5: options5,
- options6: options6,
- options7: options7,
- options8: options8,
- ladderlist: [],
- nakelist: [],
- spuCode: "",
- size: "small",
- activeTabs: "1",
- activeNames: ["0", "1", "2", "3", "4", "5", "6", "7"],
- newTime: "",
- loading: false,
- queryType: "",
- queryId: "",
- status: "",
- sitem: null
- };
- },
- mounted() {
- this.initForm();
- },
- methods: {
- openMarkletUrl(){
- window.open(this.sitem.market_url)
- },
- async initForm() {
- const { id, type } = this.$route.query;
- this.queryId = id;
- this.queryType = type;
- this.activeTabs = type === "add" ? "0" : "1";
- this.loading = true;
- if (this.queryType === "add") {
- this.sitem = {};
- this.getNewTime();
- } else {
- await this.initData();
- }
- this.loading = false;
- },
- refresh(e) {
- const { spuCode } = e;
- let model = {
- id: this.queryType === "add" ? spuCode : this.queryId,
- type: "view"
- };
- this.routeReGoto("goodsOnlineDetail", model);
- },
- async initData() {
- this.loading = true;
- const { code, message, data } = await asyncRequest.detail({
- skuCode: this.queryId
- });
- this.loading = false;
- if (code === 0) {
- this.sitem = JSON.parse(JSON.stringify(data));
- const {
- exam_status,
- cat_info,
- ladderlist,
- nakelist,
- spuCode
- } = this.sitem;
- this.spuCode = spuCode;
- this.ladderlist = JSON.parse(JSON.stringify(ladderlist));
- console.log(ladderlist);
- this.nakelist = JSON.parse(JSON.stringify(nakelist));
- let cat = "";
- if (cat_info && cat_info.length > 0) {
- cat_info.forEach((e, i) => {
- cat += i === 0 ? e.name : "/" + e.name;
- });
- }
- this.sitem.cat = cat;
- if (!isArray(this.sitem.good_info_img)) {
- this.sitem.good_info_img = this.sitem.good_info_img.split(",");
- }
- if (!isArray(this.sitem.good_img)) {
- this.sitem.good_img = this.sitem.good_img.split(",");
- }
- this.status = exam_status;
- console.log(this.status);
- this.getNewTime();
- } else if (code >= 100 && code <= 104) {
- await this.logout();
- } else {
- this.$message.warning(message);
- }
- },
- getNewTime() {
- this.newTime = new Date().valueOf();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .goodsOnlineDetail {
- width: 100%;
- box-sizing: border-box;
- .goodsOnlineDetail-main {
- padding: 10px;
- width: 100%;
- }
- .goodsOnlineDetail-title {
- border-top: 1px solid #ebeef5;
- span {
- height: 50px;
- line-height: 50px;
- font-family: "微软雅黑", sans-serif;
- font-weight: 400;
- font-style: normal;
- font-size: 16fpx;
- text-align: left;
- }
- }
- /deep/ .ddiv {
- border-top: 1px solid #dcdfe6;
- }
- /deep/ .dtitle {
- width: 40px;
- text-align: center;
- height: 100%;
- min-height: 100%;
- ul {
- padding: 12px 0 0 0;
- }
- }
- /deep/ .dmain {
- padding: 20px 0 0 0;
- width: calc(100% - 40px);
- border-left: 1px solid #dcdfe6;
- }
- }
- </style>
|