liqianyi 3 년 전
부모
커밋
3a2398db24
1개의 변경된 파일38개의 추가작업 그리고 15개의 파일을 삭제
  1. 38 15
      src/views/modules/sale/outsource-detail.vue

+ 38 - 15
src/views/modules/sale/outsource-detail.vue

@@ -33,14 +33,14 @@
         </e-desc-item>
 
         <e-desc-item label="委外类别">{{dataForm.commissionTypeName}}</e-desc-item>
-        <e-desc-item label="申请人">{{dataForm.purchaseCommission?dataForm.purchaseCommission.applier:''}}</e-desc-item>
-        <e-desc-item label="申请部门">{{dataForm.purchaseCommission?dataForm.purchaseCommission.orgName:''}}</e-desc-item>
+        <e-desc-item label="申请人">{{dataForm.applier}}</e-desc-item>
+        <e-desc-item label="申请部门">{{dataForm.orgName}}</e-desc-item>
 
         <e-desc-item label="备注说明" span="3">{{dataForm.notes}}</e-desc-item>
       </e-desc>
       <e-desc title="委外产品明细">
         <el-table
-          :data="materialDetails"
+          :data="dataForm.purCommissionDetails"
           border
           style="width: 100%;">
           <el-table-column
@@ -55,17 +55,19 @@
             v-if="false">
           </el-table-column>
           <el-table-column
-            prop="name"
+            prop="goodsName"
             header-align="center"
             align="center"
             min-width="120"
+            :show-tooltip-when-overflow="true"
             label="产品名称">
           </el-table-column>
           <el-table-column
-            prop="name"
+            prop="goodsId"
             header-align="center"
             align="center"
             min-width="120"
+            :show-tooltip-when-overflow="true"
             label="产品编号">
           </el-table-column>
           <el-table-column
@@ -73,6 +75,7 @@
             header-align="center"
             align="center"
             min-width="120"
+            :show-tooltip-when-overflow="true"
             label="型号及规格">
           </el-table-column>
           <el-table-column
@@ -88,58 +91,67 @@
             label="单位">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="deadline"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="委外期限">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="batchNumber"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="批次号">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="specificationExplian"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="要求说明">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="arrivedTime"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="到料时间">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="qualifiedCnt"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="合格数量">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="technologyFile"
             header-align="center"
             align="center"
             min-width="140"
+            :show-tooltip-when-overflow="true"
             label="工艺文件">
           </el-table-column>
           <el-table-column
-            prop="specification"
+            prop="attachList"
             header-align="center"
             align="center"
-            min-width="140"
             label="附件">
+            <template slot-scope="scope">
+              <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
+            </template>
           </el-table-column>
           <el-table-column
             prop="price"
             header-align="center"
             align="center"
+            min-width="100"
             label="不含税单价">
           </el-table-column>
           <el-table-column
@@ -167,6 +179,8 @@
             prop="notes"
             header-align="center"
             align="center"
+            min-width="160"
+            :show-tooltip-when-overflow="true"
             label="备注">
           </el-table-column>
         </el-table>
@@ -178,6 +192,7 @@
     <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">返回</el-button>
     </span>
+    <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
   </div>
 </template>
 
@@ -187,17 +202,18 @@
   import { dealStepData, dealStepLogs } from '@/api/util'
   import { getOutsourceDetail } from '@/api/sale'
   import ApproveComponent from '../common/approve-component'
+  import AttachDetail from '../common/attach-detail'
   export default {
     name: 'outsource-detail',
     components: {
-      EDesc, EDescItem, ApproveComponent
+      EDesc, EDescItem, ApproveComponent, AttachDetail
     },
     data () {
       return {
         isFlow: false,
         id: 0,
         dataForm: {},
-        materialDetails: [],
+        attachVisible: false,
         stepList: [],
         logList: [],
         totalAmount: 0,
@@ -282,6 +298,13 @@
       approveFinished () {
         this.onChose()
         this.$emit('approveFinished')
+      },
+      // 附件
+      attachDetails (row) {
+        this.attachVisible = true
+        this.$nextTick(() => {
+          this.$refs.attachDetail.init(row.attachList)
+        })
       }
     }
   }