瀏覽代碼

调整BOM清单列表,编辑

damon227 1 年之前
父節點
當前提交
3ecb3d393d
共有 2 個文件被更改,包括 28 次插入1 次删除
  1. 5 0
      src/views/modules/tech/ctafts-add-or-detail.vue
  2. 23 1
      src/views/modules/tech/product-management.vue

+ 5 - 0
src/views/modules/tech/ctafts-add-or-detail.vue

@@ -33,6 +33,7 @@
                 :disabled="display || isEdit"
                 remote
                 placeholder="请选择"
+                style="width:100%"
               >
                 <el-option
                   v-for="item in optionLevel"
@@ -201,6 +202,10 @@ export default {
       await getProduct({ current: 1, size: 20000 }).then(({ data }) => {
         if (data && data.code === '200') {
           this.optionLevel = data.data.records
+          this.optionLevel.forEach(item => {
+            let labelName = item.productName + '-' + item.mapNumber + '-' + (item.techId == null ? '有' : '无')
+            item.productName = labelName
+          })
         }
       })
       if (!id) return

+ 23 - 1
src/views/modules/tech/product-management.vue

@@ -73,6 +73,19 @@
           :show-tooltip-when-overflow="true"
           label="图号">
         </el-table-column>
+        <el-table-column
+          prop="simplePic"
+          header-align="center"
+          align="center"
+          min-width="120"
+          label="简图">
+          <template slot-scope="scope">
+            <el-popover placement="right" title="" trigger="hover">
+              <img :src="scope.row.simplePic" style="height: 400px;width: 500px">
+              <img slot="reference" :src="scope.row.simplePic" :alt="scope.row.simplePic" style="max-height: 50px;max-width: 130px">
+            </el-popover>
+          </template>
+        </el-table-column>
         <el-table-column
           prop="productName"
           header-align="center"
@@ -299,6 +312,7 @@
   import ChangeForm from './product-change'
   import {bomStateOption, writeStateOption} from '@/utils/enums'
   import UploadComponent from '@/views/modules/common/upload-component-v2'
+  import { downloadUrl } from '@/api/file'
 
 export default {
     name: 'product-management',
@@ -379,6 +393,13 @@ export default {
         getProductList(params).then(({data}) => {
           if (data && data.code === '200') {
             this.dataList = data.data.records
+            this.dataList.forEach(item => {
+              if (item.attachList2 && item.attachList2.length > 0) {
+                item.simplePic = downloadUrl + item.attachList2[0].url
+              } else {
+                item.simplePic = ''
+              }
+            })
             this.totalPage = Number(data.data.total)
           } else {
             this.dataList = []
@@ -652,7 +673,8 @@ export default {
         this.$http({
           url: this.$http.adornUrl(`/biz-service/product/importExcel`),
           method: 'POST',
-          data: formData
+          data: formData,
+          timeout: 0
         }).then(({data}) => {
           this.importLoading = false
           if (data && data.code === '200') {