瀏覽代碼

价格查询

lilei 10 小時之前
父節點
當前提交
7c9155d7cb

+ 26 - 5
src/config/router.config.js

@@ -136,15 +136,36 @@ export const asyncMobileRouterMap = [
            permission: 'B_inventoryQuery_rkDetail'
          }
        },
+       // {
+       //   path: '/productPricing',
+       //   name: 'productPricing',
+       //   component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/productManagement/productPricing/list.vue'),
+       //   meta: {
+       //     title: '产品定价',
+       //     icon: 'transaction',
+       //     permission: 'M_productPricingList'
+       //   }
+       // },
        {
-         path: '/productPricing',
-         name: 'productPricing',
-         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/productManagement/productPricing/list.vue'),
+         path: '/priceInquiry',
+         name: 'priceInquiry',
+         component: () => import(/* webpackChunkName: "mobileRouter" */ '@/mobile/priceInquiry/list.vue'),
          meta: {
-           title: '产品定价',
+           title: '价格查询',
            icon: 'transaction',
-           permission: 'M_productPricingList'
+           permission: 'M_priceInquiryList'
          }
+       },
+       // 产品详情
+       {
+         path: '/viewProduct/:sn',
+         name: 'viewProduct',
+         component: () => import(/* webpackChunkName: "home" */ '@/mobile/productManagement/newProduct/detail'),
+         meta: {
+           title: '产品详情',
+           icon: 'home'
+         },
+         hidden: true
        }
     ]
   },

+ 5 - 1
src/mobile/Home.vue

@@ -4,9 +4,13 @@
       <a-icon type="search" />
       <div>库存查询</div>
     </div>
-    <div class="nav-items col-2" @click="toPage('productPricing')" v-if="$hasPermissions('M_productPricingList')">
+    <!-- <div class="nav-items col-2" @click="toPage('productPricing')" v-if="$hasPermissions('M_productPricingList')">
       <a-icon type="euro" />
       <div>产品定价</div>
+    </div> -->
+    <div class="nav-items col-2" @click="toPage('priceInquiry')" v-if="$hasPermissions('M_priceInquiryList')">
+      <a-icon type="euro" />
+      <div>价格查询</div>
     </div>
   </div>
 </template>

+ 119 - 0
src/mobile/priceInquiry/carInfoModal.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-modal
+    centered
+    class="carInfoDetail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div>
+      <div class="head-info-con">
+        <p class="head-info-title">车型信息</p>
+        <a-divider style="margin: 12px 0;" />
+      </div>
+      <a-descriptions bordered :column="2" size="small" class="head-info-main">
+        <a-descriptions-item label="车型信息:">{{ infoData&&infoData.text || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="品牌:">{{ infoData&&infoData.brand_name || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车型:">{{ infoData&&infoData.model_name || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="品牌LOGO:">
+          <img :src="infoData&&infoData.icon?infoData.icon:defImg" width="30" height="30" style="border-radius: 50%;" />
+        </a-descriptions-item>
+        <a-descriptions-item label="排量:">{{ infoData&&infoData.sub_name || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="年款:">{{ infoData&&infoData.year || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="车型图:">
+          <div v-if="infoData&&infoData.images.length>0">
+            <img :src="infoData.images[0] || defImg" width="30" height="30" class="imageUrl" @click="inited(infoData.images)" />
+          </div>
+          <span v-else>--</span>
+        </a-descriptions-item>
+        <a-descriptions-item label="车系:">{{ infoData&&infoData.series_name || '--' }}</a-descriptions-item>
+      </a-descriptions>
+      <div class="head-info-con" v-if="infoData&&infoData.params">
+        <p class="head-info-title">配置信息</p>
+        <a-divider style="margin: 12px 0;" />
+      </div>
+      <a-descriptions bordered :column="2" size="small" v-if="infoData&&infoData.params" class="head-info-main">
+        <a-descriptions-item v-for="item in infoData.params" :label="item.type_name+':'">{{ item.value || '--' }}</a-descriptions-item>
+      </a-descriptions>
+      <div class="btn-cont"><a-button id="carInfoDetail-modal-back" @click="isShow = false">返回</a-button></div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import defImg from '@/assets/def_img@2x.png'
+export default {
+  name: 'CarInfoDetailModal',
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    infoData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      defImg
+    }
+  },
+  methods: {
+    inited (viewer) {
+      if (viewer) {
+        const imageUrl = []
+        viewer.map(item => {
+          imageUrl.push(item)
+        })
+        this.$viewerApi({
+          images: imageUrl
+        })
+      }
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .carInfoDetail-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .ant-descriptions-item-label.ant-descriptions-item-colon{
+      width: 117px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+    .head-info-con{
+      .head-info-title{
+        font-size: 16px;
+        margin: 0;
+      }
+    }
+    .head-info-main{
+      margin-bottom: 20px;
+    }
+    .imageUrl{
+      cursor: pointer;
+    }
+  }
+</style>

+ 356 - 0
src/mobile/priceInquiry/list.vue

@@ -0,0 +1,356 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form-model
+          ref="ruleForm"
+          class="form-model-con"
+          layout="inline"
+          :rules="rules"
+          :model="queryParam"
+          @keyup.enter.native="$refs.table.refresh(true)" >
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="车架号(VIN)" prop="vinCode">
+                <a-input id="priceInquiryList-vinCode" v-model.trim="queryParam.vinCode" allowClear placeholder="请输入车架号(VIN)">
+                  <a-icon @click="uploadFun" :type="vinLoading?'loading':'camera'" slot="addonAfter" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
+                </a-input>
+                <input type="file" id="filed" accept="image/jpeg,image/png" hidden="" @change="filePreview">
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品编码">
+                <a-input id="priceInquiryList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="产品名称">
+                <a-input id="priceInquiryList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+              </a-form-model-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品分类">
+                  <ProductType v-model="productType" id="priceInquiryList-productType" @change="changeProductType" placeholder="请选择产品分类"></ProductType>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品品牌">
+                  <ProductBrand id="priceInquiryList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品状态">
+                  <v-select code="PRODUCT_ONOFFLINE_STATUS" id="priceInquiryList-state" v-model="queryParam.state" allowClear placeholder="请选择状态"></v-select>
+                </a-form-model-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24" style="text-align:center;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="priceInquiryList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="priceInquiryList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form-model>
+      </div>
+    </a-card>
+
+    <a-card size="small" :bordered="false" class="priceInquiryList-wrap" style="margin-top:10px;">
+      <div ref="vinInfo" v-if="vinInfoData">
+        <a-alert type="error" style="margin-bottom: 10px;" v-if="vinInfoData&&!vinInfoData.vinInfo">
+          <template slot="message"><a-icon type="exclamation-circle" theme="filled" :style="{ color: '#E70012', fontSize: '15px', verticalAlign: 'sub', marginRight: '3px' }" />抱歉!暂未找到匹配VIN码的车型!</template>
+        </a-alert>
+        <a-alert type="warning" style="margin-bottom: 10px;cursor: pointer;" v-if="vinInfoData&&vinInfoData.vinInfo" @click="openCarInfoModal=true">
+          <template slot="message">
+            <div style="display: flex;justify-content: space-between;align-items: center;" @click="openCarInfoModal=true">
+              <div>
+                <img :src="vinInfoData.vinInfo && vinInfoData.vinInfo.icon?(vinInfoData.vinInfo.icon+'?x-oss-process=image/resize,h_30,m_lfit'):defImg" width="30" height="30" class="imageUrl" style="border-radius: 50%;vertical-align: middle;margin-right: 3px;" />
+                <span style="vertical-align: middle;">{{ vinInfoData.vinInfo.text }}</span>
+              </div>
+              <div style="color: #f90;">
+                <span>查看更多</span> >
+              </div>
+            </div>
+          </template>
+        </a-alert>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :pageSize="15"
+        :defaultLoadData="false"
+      >
+        <!-- 产品分类 -->
+        <template slot="productType" slot-scope="text, record">
+          <span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
+          <span v-else>--</span>
+        </template>
+        <!-- 产品编码 可点击查看详情 -->
+        <template slot="detail" slot-scope="text, record">
+          <div style="display: flex;">
+            <div style="width: 60px;height: 60px;margin:6px 10px 6px 6px;">
+              <img
+                :src="record.productPicList && record.productPicList.length>0 ? record.productPicList[0].imageUrl+'?x-oss-process=image/resize,h_60,m_lfit' : defImg"
+                width="60"
+                height="60"
+                class="imageUrl"
+                @click="inited(record.productPicList)" />
+            </div>
+            <div style="flex-grow: 1;padding:6px;">
+              <h3>{{ record.name }}</h3>
+              <h4>产品编码:<span class="link-bule" @click="handleDetail(record)">{{ record.code }}</span></h4>
+              <h4>原厂编码:<span>{{ record.origCode||'--' }}</span></h4>
+              <h4>产品状态:<span>{{ record.stateDictValue }}</span></h4>
+              <div style="display: flex;flex-wrap: wrap;">
+                <div style="width:33%">省级价:<span style="color:red" v-if="$hasPermissions('M_priceInquiryList_provincePrice')">{{ toThousands(record.provincePrice) }}</span></div>
+                <div style="width:33%">市级价:<span style="color:red" v-if="$hasPermissions('M_priceInquiryList_cityPrice')">{{ toThousands(record.cityPrice) }}</span></div>
+                <div style="width:33%">特约价:<span style="color:red" v-if="$hasPermissions('M_priceInquiryList_specialPrice')">{{ toThousands(record.specialPrice) }}</span></div>
+                <div style="width:33%">终端价:<span style="color:red" >{{ toThousands(record.terminalPrice) }}</span></div>
+                <div style="width:33%">车主价:<span style="color:red" >{{ toThousands(record.carOwnersPrice) }}</span></div>
+              </div>
+            </div>
+          </div>
+        </template>
+      </s-table>
+      <!-- 查看车辆信息 -->
+      <car-info-modal v-drag ref="carInfoModal" :openModal="openCarInfoModal" :infoData="vinInfoData&&vinInfoData.vinInfo" @close="openCarInfoModal=false" />
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import carInfoModal from './carInfoModal.vue'
+import ProductType from '@/views/common/productType.js'
+import ProductBrand from '@/views/common/productBrand.js'
+import { productPriceList } from '@/api/product'
+import { supperCodeByVin, vinCodeParse } from '@/api/sales'
+import defImg from '@/assets/def_img@2x.png'
+export default {
+  name: 'PriceInquiryList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, ProductBrand, carInfoModal, ProductType },
+  data () {
+    return {
+      advanced: false, // 高级搜索 展开/关闭
+      vinLoading: false,
+      tableHeight: 0,
+      productType: [],
+      defImg,
+      queryParam: { //  查询条件
+        code: '', //  产品编码
+        name: '', //  产品名称
+        vinCode: '',
+        codeList: undefined, //  车架号
+        productBrandSn: undefined, //  产品品牌
+        productTypeSn1: '', //  产品一级分类
+        productTypeSn2: '', //  产品二级分类
+        productTypeSn3: '', //  产品三级分类
+        state: 'ONLINE' //  产品状态
+      },
+      rules: {
+        vinCode: [ { len: 17, message: '请输入正确的车架号(VIN)', trigger: 'change' } ]
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const _this = this
+        const params = Object.assign(parameter, _this.queryParam)
+        if (_this.queryParam.vinCode && _this.queryParam.vinCode.length == 17 && !this.onlyList) { //  输入vin,查出vin码信息后请求列表数据
+          _this.disabled = true
+          return supperCodeByVin({ vin: _this.queryParam.vinCode }).then(res => {
+            if (res.status == 200) {
+              _this.vinInfoData = res.data
+              params.codeList = res.data.partCodeList || []
+              return _this.getList(params)
+            } else {
+              _this.vinInfoData = null
+              _this.$refs.table.localLoading = false
+              _this.$refs.table.clearTable()
+            }
+          })
+        } else if (_this.queryParam.vinCode && _this.queryParam.vinCode.length < 17 && !this.onlyList) { // 输入vin,但vin码不符合标准,不查vin码信息,不请求列表数据
+          _this.$refs.table.localLoading = false
+          _this.$refs.table.clearTable()
+        } else if (this.onlyList) {
+          _this.disabled = true
+          if (_this.queryParam.vinCode && _this.vinInfoData) {
+            return _this.getList(Object.assign(params, { codeList: _this.vinInfoData.partCodeList }))
+          } else {
+            return _this.getList(params)
+          }
+        } else { //  未输入vin码信息,只查列表数据
+          _this.disabled = true
+          return _this.getList(params)
+        }
+      },
+      vinInfoData: null,
+      openCarInfoModal: false,
+      onlyList: false
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '产品列表', scopedSlots: { customRender: 'detail' }, width: '100%' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  详情
+    handleDetail (row) {
+      this.itemId = row.productSn
+      this.$router.push({ name: 'viewProduct', params: { sn: row.productSn } })
+    },
+    getList (params) {
+      const _this = this
+      return productPriceList(params).then(res => {
+        let data
+        this.onlyList = false
+        if (res.status == 200) {
+          data = res.data
+          data.list = data.list.filter(item => item != null)
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          if (!params.vinCode) {
+            _this.vinInfoData = null
+          }
+        } else {
+          data = {
+            list: [],
+            pageNo: 1,
+            pageSize: 10
+          }
+        }
+        _this.disabled = false
+        return data
+      })
+    },
+    inited (viewer) {
+      if (viewer) {
+        const imageUrl = []
+        viewer.map(item => {
+          imageUrl.push(item.imageUrl)
+        })
+        this.$viewerApi({
+          images: imageUrl
+        })
+      }
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.code = ''
+      this.queryParam.name = ''
+      this.queryParam.productBrandSn = undefined
+      this.queryParam.productTypeSn1 = ''
+      this.queryParam.productTypeSn2 = ''
+      this.queryParam.productTypeSn3 = ''
+      this.queryParam.state = 'ONLINE'
+      this.queryParam.codeList = undefined
+      this.productType = []
+      this.$refs.ruleForm.resetFields()
+      this.$refs.table.refresh(true)
+      this.vinInfoData = null
+    },
+    uploadFun () {
+      document.getElementById('filed').click()
+    },
+    filePreview (e) {
+      const _this = this
+      var files = e.target.files[0]
+      const formData = new FormData()
+      formData.append('savePathType', 'local')
+      formData.append('file', files)
+      this.vinLoading = true
+      vinCodeParse(formData).then(res => {
+        if (res.type == 'application/json') {
+          var reader = new FileReader()
+          reader.addEventListener('loadend', function () {
+            const obj = JSON.parse(reader.result)
+            if (obj.status == 200) {
+              _this.queryParam.vinCode = obj.data || ''
+              // 移除表单项的校验结果
+              _this.$refs.ruleForm.clearValidate('vinCode')
+            } else {
+              _this.$notification.error({
+                message: '提示',
+                description: obj.message
+              })
+            }
+            _this.vinLoading = false
+            document.getElementById('filed').value = ''
+          })
+          reader.readAsText(res)
+        } else {
+          _this.vinLoading = false
+        }
+      })
+    },
+    //  产品分类  change
+    changeProductType (val, opt) {
+      this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
+      this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
+      this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 200
+      if (this.vinInfoData) {
+        const vinInfoH = this.$refs.vinInfo.offsetHeight
+        this.tableHeight = this.tableHeight - vinInfoH
+      }
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      this.pageInit()
+    },
+    vinInfoData () {
+      this.pageInit()
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.pageInit()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 217 - 0
src/mobile/productManagement/newProduct/detail.vue

@@ -0,0 +1,217 @@
+<template>
+  <div>
+    <div class="newProductDetail-modal">
+      <!-- 产品详情 -->
+      <h4>{{ (detailsData && detailsData.name) || '--' }}</h4>
+      <div class="productHead">
+        <div class="productInfo">
+          <a-descriptions bordered :column="2" size="small">
+            <a-descriptions-item label="产品品牌:">{{ (detailsData && detailsData.productBrandName) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="产品编码:">{{ (detailsData && detailsData.code) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="原厂编码:">{{ (detailsData && detailsData.origCode) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="商品尺寸:">{{ (detailsData && detailsData.size) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="重量:">{{ (detailsData && detailsData.weight) || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="计量单位:">{{ (detailsData && detailsData.unit) || '--' }}</a-descriptions-item>
+          </a-descriptions>
+          <div class="productDetail">
+            <h4>产品介绍</h4>
+            <div class="productDesc">
+              <div v-if="detailsData && detailsData.description" v-html="detailsData.description"></div>
+              <span v-else>暂无产品介绍</span>
+            </div>
+          </div>
+        </div>
+        <div class="productImg" v-if="detailsData && detailsData.productPicList && detailsData.productPicList.length>0">
+          <a-carousel arrows dots-class="slick-dots slick-thumb">
+            <a slot="customPaging" slot-scope="props">
+              <img :src="detailsData.productPicList[props.i].imageUrl" />
+            </a>
+            <div slot="prevArrow" slot-scope="props" class="custom-slick-arrow" style="left: 10px;zIndex: 1"><a-icon type="left-circle" style="color: #314659;" /></div>
+            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px"><a-icon type="right-circle" style="color: #314659;" /></div>
+            <div v-for="(item, index) in detailsData.productPicList" :key="index">
+              <img-zoom :src="item.imageUrl" width="100%" height="100%" :bigsrc="item.imageUrl" :configs="configs"></img-zoom>
+            </div>
+          </a-carousel>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import imgZoom from 'vue2.0-zoom'
+// 接口
+import { productSnDetail } from '@/api/product.js'
+export default {
+  name: 'ViewProduct',
+  mixins: [commonMixin],
+  components: { imgZoom },
+  computed: {
+    productTypeName () {
+      const productTypeName1 = this.detailsData && this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
+      const productTypeName2 = this.detailsData && this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''
+      const productTypeName3 = this.detailsData && this.detailsData.productTypeName3 ? ' > ' + this.detailsData.productTypeName3 : ''
+      return productTypeName1 + productTypeName2 + productTypeName3
+    }
+  },
+  data () {
+    return {
+      itemId: null,
+      detailsData: null, //  详情数据
+      prevPageInfo: null,
+      configs: {
+        width: 600,
+        height: 350,
+        maskWidth: 80,
+        maskHeight: 80,
+        maskColor: 'red',
+        maskOpacity: 0.2
+      }
+    }
+  },
+  methods: {
+    //  获取详情
+    getDetail () {
+      this.detailsData = null
+      productSnDetail({ sn: this.itemId }).then(res => {
+        if (res.status == 200) {
+          this.detailsData = res.data
+        } else {
+          this.detailsData = null
+        }
+      })
+    },
+    // 返回
+    goBack () {
+      this.$router.push({ path: this.prevPageInfo && this.prevPageInfo.path, query: { closeLastOldTab: true } })
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.itemId = this.$route.params.sn
+      this.getDetail()
+    }
+  },
+  activated () {
+    this.itemId = this.$route.params.sn
+    this.getDetail()
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.prevPageInfo = from
+    })
+  }
+}
+</script>
+
+<style lang="less">
+#_magnifier_layer{
+  left: 500px!important;
+}
+/* For demo */
+.ant-carousel .slick-slide {
+  text-align: center;
+  overflow: hidden;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.ant-carousel .custom-slick-arrow {
+  width: 25px;
+  height: 25px;
+  font-size: 25px;
+  color: #fff;
+  opacity: 0.3;
+}
+.ant-carousel .custom-slick-arrow:before {
+  display: none;
+}
+.ant-carousel .custom-slick-arrow:hover {
+  opacity: 0.5;
+}
+.ant-carousel .slick-slide img {
+  width: 100%;
+  max-height: 100%;
+}
+
+.ant-carousel{
+  border: 1px solid #e8e8e8;
+}
+.ant-carousel .slick-dots {
+  height: auto;
+}
+.ant-carousel .slick-slide img {
+  border: 5px solid #fff;
+  display: block;
+  margin: auto;
+  max-width: 90%;
+}
+.ant-carousel .slick-thumb {
+  bottom: -40px;
+}
+.ant-carousel .slick-thumb li {
+  width: 40px;
+  height: 35px;
+}
+.ant-carousel .slick-thumb li img {
+  width: 100%;
+  height: 100%;
+  filter: grayscale(100%);
+}
+.ant-carousel .slick-thumb li.slick-active img {
+  filter: grayscale(0%);
+}
+.newProductDetail-back {
+  margin-bottom: 10px;
+}
+.newProductDetail-modal {
+  background-color: #fff;
+  padding: 15px 15px 55px;
+  h4 {
+    font-size: 18px;
+  }
+  .productHead {
+    display: flex;
+    .productImg {
+      width: 240px;
+    }
+    .productInfo {
+      flex-grow: 1;
+      margin-right: 10px;
+    }
+    .sycxImg {
+      margin-top: 10px;
+      p {
+        font-size: 14px;
+        padding: 5px 10px;
+        background-color: #dcf1ff;
+      }
+      img {
+        width: 100px;
+      }
+    }
+  }
+  .productDetail {
+    border: 1px solid #eee;
+    margin-top: 10px;
+    h4 {
+      font-size: 14px;
+      padding: 5px 10px;
+      background-color: #dcf1ff;
+    }
+    .productDesc {
+      padding: 15px;
+      overflow: auto;
+    }
+  }
+  .ant-descriptions-item-label.ant-descriptions-item-colon {
+    width: 120px;
+  }
+  .btn-cont {
+    text-align: center;
+    margin: 35px 0 10px;
+  }
+}
+</style>