lilei 3 anni fa
parent
commit
62c279b4ed
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      src/views/salesManagement/priceInquiry/list.vue

+ 10 - 1
src/views/salesManagement/priceInquiry/list.vue

@@ -105,6 +105,10 @@
         <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">
+        <span style="color: #00aaff;cursor: pointer;" @click="handleDetail(record)">{{ record.code }}</span>
+      </template>
     </s-table>
     <!-- 查看车辆信息 -->
     <car-info-modal ref="carInfoModal" :openModal="openCarInfoModal" :infoData="vinInfoData&&vinInfoData.vinInfo" @close="openCarInfoModal=false" />
@@ -184,7 +188,7 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '产品编码', dataIndex: 'code', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', scopedSlots: { customRender: 'detail' }, width: '15%', align: 'center' },
         { title: '产品名称', dataIndex: 'name', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'origCode', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -206,6 +210,11 @@ export default {
     }
   },
   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 => {