plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3657 lines
134 KiB

​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
3 years ago
​
​
​
3 years ago
​
​
​
3 years ago
​
3 years ago
​
3 years ago
​
​
​
​
2 years ago
3 years ago
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
2 years ago
​
3 years ago
​
​
​
3 years ago
​
​
3 years ago
​
3 years ago
​
​
​
3 years ago
​
3 years ago
​
​
​
3 years ago
​
3 years ago
3 years ago
​
​
​
3 years ago
​
​
​
​
2 years ago
​
​
​
3 years ago
3 years ago
3 years ago
​
​
3 years ago
3 years ago
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
3 years ago
3 years ago
​
​
3 years ago
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
2 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
3 years ago
3 years ago
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
3 years ago
​
​
3 years ago
3 years ago
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
3 years ago
3 years ago
​
​
​
​
​
​
​
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
3 years ago
​
3 years ago
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
​
3 years ago
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'客户编码'">
  6. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户名称'">
  9. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'Artwork'">
  12. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'项目料号'">
  15. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'产品名称'">
  18. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'要求交付日期'">
  21. <el-date-picker
  22. style="width: 120px"
  23. v-model="searchData.startDate"
  24. type="date"
  25. value-format="yyyy-MM-dd"
  26. placeholder="选择日期">
  27. </el-date-picker>
  28. </el-form-item>
  29. <el-form-item label=" ">
  30. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  31. </el-form-item>
  32. <el-form-item :label="' '">
  33. <el-date-picker
  34. style="width: 120px"
  35. v-model="searchData.endDate"
  36. type="date"
  37. value-format="yyyy-MM-dd"
  38. placeholder="选择日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. </el-form>
  42. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  43. <el-form-item :label="'项目编码'">
  44. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  45. </el-form-item>
  46. <el-form-item :label="'项目名称'">
  47. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'TP工程师'">
  50. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'优先等级'">
  53. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"/>
  54. </el-form-item>
  55. <el-form-item :label="'状态'" v-if="false">
  56. <el-select v-model="searchData.testResultStatus" style="width: 120px">
  57. <el-option label="全部" value=""></el-option>
  58. <el-option label="草稿" value="B"></el-option>
  59. <el-option label="已下达" value="C"></el-option>
  60. <el-option label="已完成测试" value="E"></el-option>
  61. <el-option label="已提交测试" value="S"></el-option>
  62. <el-option label="客户已反馈" value="R"></el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item :label="'状态'">
  66. <el-select v-model="searchData.testStatus" style="width: 120px">
  67. <el-option label="全部" value=""></el-option>
  68. <el-option label="草稿" value="草稿"></el-option>
  69. <el-option label="下达" value="下达"></el-option>
  70. </el-select>
  71. </el-form-item>
  72. <el-form-item :label="' '">
  73. <el-button @click="getDataList()">查询</el-button>
  74. <el-button type="primary" @click="addModal()">新增</el-button>
  75. <el-button type="primary" @click="delModal()">删除</el-button>
  76. <download-excel
  77. :fields="fields()"
  78. :data="exportData"
  79. type="xls"
  80. :name="exportName"
  81. :header="exportHeader"
  82. :footer="exportFooter"
  83. :fetch="createExportData"
  84. :before-generate="startDownload"
  85. :before-finish="finishDownload"
  86. worksheet="导出信息"
  87. class="el-button el-button--primary el-button--medium">
  88. {{ "导出" }}
  89. </download-excel>
  90. </el-form-item>
  91. </el-form>
  92. <!-- 测试列表 -->
  93. <el-table
  94. :height="height"
  95. :data="dataList"
  96. border
  97. :row-style="rowStyle"
  98. ref="testTable"
  99. @row-click="testClickRow"
  100. @selection-change="selectionTest"
  101. @current-change="changeCurrentRow"
  102. v-loading="dataListLoading"
  103. style="width: 100%;">
  104. <el-table-column
  105. type="selection"
  106. header-align="center"
  107. align="center"
  108. :selectable="selectFlag"
  109. width="50">
  110. </el-table-column>
  111. <el-table-column
  112. v-for="(item,index) in columnList" :key="index"
  113. :sortable="item.columnSortable"
  114. :prop="item.columnProp"
  115. :header-align="item.headerAlign"
  116. :show-overflow-tooltip="item.showOverflowTooltip"
  117. :align="item.align"
  118. :fixed="item.fixed === ''?false:item.fixed"
  119. :min-width="item.columnWidth"
  120. :label="item.columnLabel">
  121. <template slot-scope="scope">
  122. <div v-if="item.columnProp === 'testResultStatus'">
  123. <span v-if="!item.columnHidden">
  124. <span v-show="scope.row.testResultStatus === 'B'">草稿</span>
  125. <span v-show="scope.row.testResultStatus === 'C'">已下达</span>
  126. <span v-show="scope.row.testResultStatus === 'E'">已完成测试</span>
  127. <span v-show="scope.row.testResultStatus === 'S'">已提交测试</span>
  128. <span v-show="scope.row.testResultStatus === 'R'">客户已反馈</span>
  129. </span>
  130. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  131. </div>
  132. <div v-else>
  133. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  134. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  135. </div>
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. fixed="right"
  140. header-align="center"
  141. align="center"
  142. width="100"
  143. label="操作">
  144. <template slot-scope="scope">
  145. <a type="text" size="small" style="cursor:pointer;" @click="updateModal(scope.row)">编辑</a>
  146. <a type="text" size="small" style="cursor:pointer;" v-if="scope.row.testResultStatus === 'B'" @click="updateModalStatus(scope.row,'C')">下达</a>
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. <selectDiv ref="selectDiv"></selectDiv>
  151. <!-- 分页插件 -->
  152. <el-pagination style="margin-top: 0px"
  153. @size-change="sizeChangeHandle"
  154. @current-change="currentChangeHandle"
  155. :current-page="pageIndex"
  156. :page-sizes="[20, 50, 100, 200, 500]"
  157. :page-size="pageSize"
  158. :total="totalPage"
  159. layout="total, sizes, prev, pager, next, jumper">
  160. </el-pagination>
  161. <!-- 测试模态框 -->
  162. <el-dialog :title="modalData.title" @close="closeModalDiaLog" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" top="10vh" width="60%">
  163. <el-form label-position="top" ref="modalForm" :model="modalData" :rules="rules">
  164. <el-row :gutter="15">
  165. <el-col :span="8">
  166. <el-row :gutter="10">
  167. <el-col :span="10">
  168. <el-form-item prop="customerNo" label="客户编码">
  169. <span slot="label" v-if="modalData.flag === '1'" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  170. <el-input :disabled="modalData.flag !== '1'" v-model="modalData.customerNo"></el-input>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="14">
  174. <el-form-item label=" ">
  175. <el-input disabled v-model="modalData.customerDesc"></el-input>
  176. </el-form-item>
  177. </el-col>
  178. </el-row>
  179. </el-col>
  180. <el-col :span="4">
  181. <el-form-item label="测试数量" prop="testNumber">
  182. <div class="right">
  183. <el-input type="number" class="inlineNumber" :disabled="testInformationFlag('testNumber') === 'N' && modalData.flag === '2'"
  184. v-model="modalData.testNumber" @input="modalData.testNumber = modalData.testNumber.replace(/^(0+)|[^\d]+/g, '')"></el-input>
  185. </div>
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="4">
  189. <el-form-item label="优先等级" >
  190. <dict-data-select v-if="modalFlag" :disabled="testInformationFlag('priorityLevel') === 'N' && modalData.flag === '2'"
  191. v-model="modalData.priorityLevel" dict-type="priority_Level"></dict-data-select>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="4">
  195. <el-form-item label="要求交付日期" prop="requiredDeliveryDate">
  196. <el-date-picker v-model="modalData.requiredDeliveryDate" :disabled="testInformationFlag('requiredDeliveryDate') === 'N' && modalData.flag === '2'"
  197. style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="4">
  201. <el-form-item label="印刷方式" prop="printType">
  202. <dict-data-select v-if="modalFlag" :disabled="testInformationFlag('printType') === 'N' && modalData.flag === '2'"
  203. clearable v-model="modalData.printType" dict-type="print_type"></dict-data-select>
  204. </el-form-item>
  205. </el-col>
  206. </el-row>
  207. <el-row :gutter="15">
  208. <el-col :span="8">
  209. <el-row :gutter="10">
  210. <el-col :span="10">
  211. <el-form-item prop="projectId" label="项目编码">
  212. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
  213. <el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" v-model="modalData.projectId"></el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="14">
  217. <el-form-item label=" ">
  218. <el-input disabled v-model="modalData.projectName"></el-input>
  219. </el-form-item>
  220. </el-col>
  221. </el-row>
  222. </el-col>
  223. <el-col :span="4" v-if="false">
  224. <el-form-item>
  225. <span slot="label" @click="getCustomerContactList"><a>收货人</a></span>
  226. <el-input v-model="modalData.consignee"></el-input>
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="4" v-if="false">
  230. <el-form-item label="收货人联系方式">
  231. <el-input v-model="modalData.consigneeContact"></el-input>
  232. </el-form-item>
  233. </el-col>
  234. <el-col :span="4" v-if="false">
  235. <el-form-item label=" ">
  236. <el-checkbox v-model="modalData.isNeedToSendSamples" true-label="Y">是否需要送样</el-checkbox>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="8">
  240. <el-form-item label="标签名称" prop="productName">
  241. <el-input :disabled="testInformationFlag('productName') === 'N' && modalData.flag === '2'" v-model="modalData.productName"></el-input>
  242. </el-form-item>
  243. </el-col>
  244. </el-row>
  245. <el-row :gutter="15">
  246. <el-col :span="8">
  247. <el-row :gutter="10">
  248. <el-col :span="10">
  249. <el-form-item prop="testPartNo" label="物料编码">
  250. <span slot="label" v-if="modalData.projectId && modalData.flag === '1'" @click="projectPartModelFlag = true"><a herf="#">物料编码</a></span>
  251. <el-input :disabled="!modalData.projectId || modalData.flag !== '1'" v-model="modalData.testPartNo"></el-input>
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="14">
  255. <el-form-item label=" ">
  256. <el-input disabled v-model="modalData.partName"></el-input>
  257. </el-form-item>
  258. </el-col>
  259. </el-row>
  260. </el-col>
  261. <el-col :span="4">
  262. <el-form-item prop="trackerName">
  263. <!-- <span slot="label" @click="getBaseList(103,1)"><a herf="#">Artwork</a></span>-->
  264. <span v-if="testInformationFlag('tracker') === 'N' && modalData.flag === '2'" slot="label">Artwork</span>
  265. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2041)"><a herf="#">Artwork</a></span>
  266. <el-input :disabled="testInformationFlag('tracker') === 'N' && modalData.flag === '2'" v-model="modalData.trackerName" readonly></el-input>
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="4">
  270. <el-form-item prop="engineerName">
  271. <!-- <span slot="label" @click="getBaseList(103,2)"><a herf="#">TP工程师</a></span>-->
  272. <span v-if="testInformationFlag('engineer') === 'N' && modalData.flag === '2'" slot="label">TP工程师</span>
  273. <span v-else slot="label" @click="getBaseList(2042)"><a herf="#">TP工程师</a></span>
  274. <el-input :disabled="testInformationFlag('engineer') === 'N' && modalData.flag === '2'" v-model="modalData.engineerName" readonly></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="4">
  278. <el-form-item label="CQC">
  279. <span v-if="testInformationFlag('artwork') === 'N' && modalData.flag === '2'" slot="label">CQC</span>
  280. <span v-else slot="label"><a herf="#" @click="getBaseList(2007)">CQC</a></span>
  281. <el-input :disabled="testInformationFlag('artwork') === 'N' && modalData.flag === '2'" v-model="modalData.artworkName"></el-input>
  282. </el-form-item>
  283. </el-col>
  284. <el-col :span="4">
  285. <el-form-item label="FAI">
  286. <span v-if="testInformationFlag('planner') === 'N' && modalData.flag === '2'" slot="label">FAI</span>
  287. <span v-else slot="label"><a herf="#" @click="getBaseList(2008)">FAI</a></span>
  288. <el-input :disabled="testInformationFlag('planner') === 'N' && modalData.flag === '2'" v-model="modalData.plannerName"></el-input>
  289. </el-form-item>
  290. </el-col>
  291. </el-row>
  292. <el-row :gutter="15">
  293. <el-col :span="12" v-if="false">
  294. <el-form-item style="height: 90px">
  295. <span slot="label" @click="getCustomerAddressList"><a>送样地址</a></span>
  296. <el-input type="textarea" v-model="modalData.sendSamplesAddress" :rows="3" resize='none'></el-input>
  297. </el-form-item>
  298. </el-col>
  299. <el-col :span="12" v-if="false">
  300. <el-form-item label="备注" style="height: 90px">
  301. <el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none'></el-input>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="24">
  305. <el-form-item label="备注" style="height: 90px">
  306. <el-input type="textarea" :disabled="testInformationFlag('technicalConsiderations') === 'N' && modalData.flag === '2'"
  307. v-model="modalData.technicalConsiderations" :rows="3" resize='none' show-word-limit></el-input>
  308. </el-form-item>
  309. </el-col>
  310. </el-row>
  311. </el-form>
  312. <div class="rq">
  313. <el-button v-if="!modalData.testNo" @click="saveData" plain type="primary" style="position:absolute;margin-top: 10px;margin-right: 10px;right: 0;z-index: 1">下一步</el-button>
  314. <el-tabs v-model="activeTab" @tab-click="dialogTabClick">
  315. <el-tab-pane label="基本信息" :disabled="!activeTabList.includes('attribute')" name="attribute" v-if="modalData.testNo">
  316. <test-properties v-if="modalFlag" v-model:data-list="testPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
  317. </el-tab-pane>
  318. <el-tab-pane label="基本信息" :disabled="!activeTabList.includes('attribute')" name="attribute" v-else>
  319. <test-properties v-if="modalFlag" v-model:data-list="copyTestPropertiesList" ref="dialogTestAttribute" :test-no="modalData.testNo"></test-properties>
  320. </el-tab-pane>
  321. <el-tab-pane label="物料属性" :disabled="!activeTabList.includes('partAttribute')" name="partAttribute">
  322. <el-table
  323. :data="partItemList1"
  324. :height="secondHeight - 10"
  325. border
  326. style="width: 100%;">
  327. <el-table-column
  328. v-for="(item,index) in columnItemList" :key="index"
  329. :sortable="item.columnSortable"
  330. :prop="item.columnProp"
  331. :header-align="item.headerAlign"
  332. :show-overflow-tooltip="item.showOverflowTooltip"
  333. :align="item.align"
  334. :fixed="item.fixed==''?false:item.fixed"
  335. :min-width="item.columnWidth"
  336. :label="item.columnLabel">
  337. <template slot-scope="scope">
  338. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  339. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  340. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  341. </div>
  342. <div v-else>
  343. {{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
  344. </div>
  345. </template>
  346. </el-table-column>
  347. </el-table>
  348. </el-tab-pane>
  349. <el-tab-pane label="物料信息" name="part" v-if="false">
  350. <el-form label-position="top" :model="projectPartData">
  351. <el-row :gutter="20">
  352. <el-col :span="4">
  353. <el-form-item label="产品编码">
  354. <el-input v-model="projectPartData.testPartNo" clearable></el-input>
  355. </el-form-item>
  356. </el-col>
  357. <el-col :span="4">
  358. <el-form-item label="产品名称">
  359. <el-input v-model="projectPartData.partName" clearable></el-input>
  360. </el-form-item>
  361. </el-col>
  362. <el-col :span="4">
  363. <el-form-item label=" ">
  364. <el-button type="primary" @click="getProjectPartList()">查询</el-button>
  365. </el-form-item>
  366. </el-col>
  367. <el-col :span="4" :offset="8">
  368. <el-form-item label=" ">
  369. <el-button v-if="this.modalData.flag === '1' && this.activeTabList.length === 1" type="primary" style="float: right;margin-right: 8px" @click="saveData">下一步</el-button>
  370. </el-form-item>
  371. </el-col>
  372. </el-row>
  373. </el-form>
  374. <el-table
  375. :height="300"
  376. :data="projectPartList"
  377. ref="projectPartTable"
  378. @row-click="projectPartClickRow"
  379. @selection-change="selectionProjectPart"
  380. :row-key="getRowKeys"
  381. @select="selectTestPart"
  382. @select-all="selectAllTestPart"
  383. header-cell-class-name="cellClass"
  384. border
  385. v-loading="dataListLoading"
  386. style="width: 100%;">
  387. <el-table-column
  388. type="selection"
  389. header-align="center"
  390. align="center"
  391. :selectable="checkSelectable"
  392. :reserve-selection="true"
  393. width="50">
  394. </el-table-column>
  395. <el-table-column
  396. v-for="(item,index) in projectPartDetailList" :key="index"
  397. :sortable="item.columnSortable"
  398. :prop="item.columnProp"
  399. :header-align="item.headerAlign"
  400. :show-overflow-tooltip="item.showOverflowTooltip"
  401. :align="item.align"
  402. :fixed="item.fixed===''?false:item.fixed"
  403. :min-width="item.columnWidth"
  404. :label="item.columnLabel">
  405. <template slot-scope="scope">
  406. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  407. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  408. </template>
  409. </el-table-column>
  410. </el-table>
  411. </el-tab-pane>
  412. <el-tab-pane label="材料信息" :disabled="!activeTabList.includes('product')" name="product">
  413. <test-table v-if="clickTestRow" :test-number="modalData.testNumber" ref="dialogSoBom" v-model:data-list="testSoBomList" :test-no="modalData.testNo"></test-table>
  414. </el-tab-pane>
  415. <el-tab-pane label="制程信息" :disabled="!activeTabList.includes('process')" name="process">
  416. <test-routing-table v-if="clickTestRow" ref="dialogSoRouting" v-model:data-list="testSoRoutingList" :test-no="modalData.testNo"></test-routing-table>
  417. </el-tab-pane>
  418. <el-tab-pane label="附件信息" :disabled="!activeTabList.includes('file')" name="file">
  419. <test-file v-if="modalFlag" :column-list="fileColumnList" v-model:data-list="testFileList" ref="dialogTestFile" :test-no="modalData.testNo"></test-file>
  420. </el-tab-pane>
  421. </el-tabs>
  422. </div>
  423. <el-footer style="height:30px;text-align:center;margin-top: 8px">
  424. <el-button type="primary" @click="saveData()" v-if="modalData.flag !== '1'">保存</el-button>
  425. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  426. <el-button v-if="modalData.testStatus === '审批中'" type="primary" @click="agreeSubmit">同意</el-button>
  427. <el-button v-if="modalData.testStatus === '审批中' && modalData.isReject === 'Y'" type="primary" @click="rejectSubmit">驳回</el-button>
  428. </el-footer>
  429. </el-dialog>
  430. <el-dialog title="物料信息" :visible.sync="projectPartModelFlag">
  431. <el-form label-position="top" :model="projectPartData">
  432. <el-row :gutter="20">
  433. <el-col :span="4">
  434. <el-form-item label="产品编码">
  435. <el-input v-model="projectPartData.testPartNo" clearable></el-input>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="4">
  439. <el-form-item label="产品名称">
  440. <el-input v-model="projectPartData.partName" clearable></el-input>
  441. </el-form-item>
  442. </el-col>
  443. <el-col :span="4">
  444. <el-form-item label=" ">
  445. <el-button type="primary" @click="getProjectPartList()">查询</el-button>
  446. </el-form-item>
  447. </el-col>
  448. </el-row>
  449. </el-form>
  450. <el-table
  451. :height="300"
  452. :data="projectPartList"
  453. ref="projectPartTable"
  454. @row-dblclick="partClickRow"
  455. header-cell-class-name="cellClass"
  456. border
  457. v-loading="dataListLoading"
  458. style="width: 100%;">
  459. <el-table-column
  460. v-for="(item,index) in projectPartDetailList" :key="index"
  461. :sortable="item.columnSortable"
  462. :prop="item.columnProp"
  463. :header-align="item.headerAlign"
  464. :show-overflow-tooltip="item.showOverflowTooltip"
  465. :align="item.align"
  466. :fixed="item.fixed===''?false:item.fixed"
  467. :min-width="item.columnWidth"
  468. :label="item.columnLabel">
  469. <template slot-scope="scope">
  470. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  471. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  472. </template>
  473. </el-table-column>
  474. </el-table>
  475. </el-dialog>
  476. <!-- 录入测试结果模态框 -->
  477. <el-dialog title="录入测试结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag" width="785px">
  478. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left: 0px;margin-top: 10px;">
  479. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  480. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  481. </el-form-item>
  482. </el-form>
  483. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left:0px;margin-top: 5px;">
  484. <el-form-item label="测试结果信息" prop="testResultInformation" :rules="enterResultRules.testResultInformation">
  485. <el-input type="textarea" v-model="enterResultData.testResultInformation" :rows="3" resize='none' show-word-limit style="width: 500px;height: 30px"></el-input>
  486. </el-form-item>
  487. </el-form>
  488. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  489. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  490. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  491. </el-form>
  492. <el-table
  493. :height="200"
  494. :data="fileContentList"
  495. border
  496. v-loading="dataListLoading"
  497. style="width: 100%">
  498. <el-table-column
  499. v-for="(item,index) in fileColumnList" :key="index"
  500. :sortable="item.columnSortable"
  501. :prop="item.columnProp"
  502. :header-align="item.headerAlign"
  503. :show-overflow-tooltip="item.showOverflowTooltip"
  504. :align="item.align"
  505. :fixed="item.fixed===''?false:item.fixed"
  506. :min-width="item.columnWidth"
  507. :label="item.columnLabel">
  508. <template slot-scope="scope">
  509. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  510. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  511. </template>
  512. </el-table-column>
  513. <el-table-column
  514. fixed="right"
  515. header-align="center"
  516. align="center"
  517. width="100"
  518. label="操作">
  519. <template slot-scope="scope">
  520. <a @click="deleteFile(scope.row)">删除</a>
  521. </template>
  522. </el-table-column>
  523. </el-table>
  524. </el-form>
  525. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  526. <el-button type="primary" @click="saveTestResult()">保存</el-button>
  527. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  528. </el-footer>
  529. </el-dialog>
  530. <!-- 录入送样信息模态框 -->
  531. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag" width="620px">
  532. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules" style="margin-left: 0px;margin-top: 10px;">
  533. <el-form-item label="实际送样日期" prop="actualitySendSamplesDate" :rules="submitResultRules.actualitySendSamplesDate">
  534. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  535. </el-form-item>
  536. <el-form-item label="送样方式" prop="sendSamplesMethod" :rules="submitResultRules.sendSamplesMethod">
  537. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  538. <el-option label="客户自提" value="客户自提"></el-option>
  539. <el-option label="人员带货" value="人员带货"></el-option>
  540. <el-option label="其它" value="其它"></el-option>
  541. </el-select>
  542. </el-form-item>
  543. <el-form-item label="送货信息">
  544. <el-input v-model="submitResultData.deliverGoodsInformation" style="width: 221px"></el-input>
  545. </el-form-item>
  546. </el-form>
  547. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  548. <el-form-item label="送货备注">
  549. <el-input type="textarea" v-model="submitResultData.deliverGoodsRemark" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  550. </el-form-item>
  551. </el-form>
  552. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  553. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  554. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  555. </el-footer>
  556. </el-dialog>
  557. <!-- 客户回复模态框 -->
  558. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag" width="620px">
  559. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules" style="margin-left: 0px;margin-top: 10px;">
  560. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  561. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 185px"></el-date-picker>
  562. </el-form-item>
  563. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  564. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  565. <el-option label="接受" value="接受"></el-option>
  566. <el-option label="不接受" value="不接受"></el-option>
  567. </el-select>
  568. </el-form-item>
  569. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  570. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  571. </el-form-item>
  572. </el-form>
  573. <el-form :inline="true" label-position="top" :model="customerResponseData" style="margin-left:0px;margin-top: 5px;">
  574. <el-form-item label="客户回复信息">
  575. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none' show-word-limit style="width: 595px;height: 30px"></el-input>
  576. </el-form-item>
  577. </el-form>
  578. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  579. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  580. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  581. </el-footer>
  582. </el-dialog>
  583. <!--选择项目模态框-->
  584. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList" :visible.sync="chooseProjectListFlag" width="35%">
  585. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  586. <el-row :gutter="10">
  587. <el-col :span="6">
  588. <el-form-item label="项目编码">
  589. <el-input v-model="searchProjectData.projectId"></el-input>
  590. </el-form-item>
  591. </el-col>
  592. <el-col :span="6">
  593. <el-form-item label="项目名称">
  594. <el-input v-model="searchProjectData.projectName"></el-input>
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="6">
  598. <el-form-item label=" ">
  599. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  600. </el-form-item>
  601. </el-col>
  602. </el-row>
  603. <el-table :height="223"
  604. :data="projectList"
  605. border
  606. @row-click="projectClickRow">
  607. <el-table-column label="项目编码" prop="projectId"/>
  608. <el-table-column label="项目名称" prop="projectName"/>
  609. </el-table>
  610. </el-form>
  611. </el-dialog>
  612. <!-- 页签 -->
  613. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 500px;" type="border-card" @tab-click="tabClick" class="customer-tab">
  614. <!-- 测试详细信息页签 -->
  615. <el-tab-pane label="测试详细信息" name="test_detail_information" v-if="false">
  616. <el-form :inline="true" label-position="top" :model="testDetailData" style="margin-left: 10px;margin-top: 10px;">
  617. <el-form-item label="备注">
  618. <el-input type="textarea" v-model="testDetailData.technicalConsiderations" readonly :rows="3" resize='none' show-word-limit style="width: 600px;height: 30px"></el-input>
  619. </el-form-item>
  620. </el-form>
  621. <el-form :inline="true" label-position="top" :model="testDetailData" style="margin-left: 10px;margin-top: 46px;">
  622. <el-form-item label="是否需要送样">
  623. <input type="checkbox" v-if="testDetailData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  624. <input type="checkbox" v-if="testDetailData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  625. </el-form-item>
  626. <el-form-item label="送样地址">
  627. <el-input v-model="testDetailData.sendSamplesAddress" readonly style="width: 295px"></el-input>
  628. </el-form-item>
  629. </el-form>
  630. <el-form :inline="true" label-position="top" :model="testDetailData" style="margin-left: 10px;margin-top: 46px;">
  631. <el-form-item label="收货人">
  632. <el-input v-model="testDetailData.consignee" readonly style="width: 295px"></el-input>
  633. </el-form-item>
  634. <el-form-item label="收货人联系方式">
  635. <el-input v-model="testDetailData.consigneeContact" readonly style="width: 295px"></el-input>
  636. </el-form-item>
  637. </el-form>
  638. </el-tab-pane>
  639. <!-- 测试结果页签 -->
  640. <el-tab-pane label="测试结果" name="test_result" v-if="false">
  641. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: 5px;">
  642. <el-button v-if="testResultData.testResultStatus === 'C'" type="primary" @click="testResultModal()">录入测试结果</el-button>
  643. <el-button v-if="testResultData.testResultStatus === 'E'" type="primary" @click="submitTestModal()">录入送样信息</el-button>
  644. <el-button v-if="testResultData.testResultStatus === 'S'" type="primary" @click="customerResponseModal()">客户回复</el-button>
  645. </el-form>
  646. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: 2px;">
  647. <el-form-item label="实际交付日期">
  648. <el-date-picker v-model="testResultData.actualityDeliveryDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  649. </el-form-item>
  650. <el-form-item label="是否需要送样">
  651. <input type="checkbox" v-if="testResultData.isNeedToSendSamples == 'Y'" checked onclick="return false"/>
  652. <input type="checkbox" v-if="testResultData.isNeedToSendSamples != 'Y'" onclick="return false"/>
  653. </el-form-item>
  654. <el-form-item label="是否送样">
  655. <input type="checkbox" v-if="testResultData.testResultStatus == 'S' || testResultData.testResultStatus == 'R'" checked onclick="return false"/>
  656. <input type="checkbox" v-if="testResultData.testResultStatus != 'S' && testResultData.testResultStatus != 'R'" onclick="return false"/>
  657. </el-form-item>
  658. </el-form>
  659. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: -1px;">
  660. <el-form-item label="测试结果信息">
  661. <el-input type="textarea" v-model="testResultData.testResultInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  662. </el-form-item>
  663. </el-form>
  664. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: 26px;">
  665. <el-form-item label="附件清单">
  666. <el-table
  667. :height="90"
  668. :data="fileContentList"
  669. border
  670. v-loading="dataListLoading"
  671. style="width: 100%">
  672. <el-table-column
  673. v-for="(item,index) in fileColumnList" :key="index"
  674. :sortable="item.columnSortable"
  675. :prop="item.columnProp"
  676. :header-align="item.headerAlign"
  677. :show-overflow-tooltip="item.showOverflowTooltip"
  678. :align="item.align"
  679. :fixed="item.fixed===''?false:item.fixed"
  680. :min-width="item.columnWidth"
  681. :label="item.columnLabel">
  682. <template slot-scope="scope">
  683. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  684. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  685. </template>
  686. </el-table-column>
  687. <el-table-column
  688. fixed="right"
  689. header-align="center"
  690. align="center"
  691. width="100"
  692. label="操作">
  693. <template slot-scope="scope">
  694. <a @click="downloadFile(scope.row)">下载</a>
  695. </template>
  696. </el-table-column>
  697. </el-table>
  698. </el-form-item>
  699. </el-form>
  700. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: 69px;">
  701. <el-form-item label="实际送样日期">
  702. <el-date-picker v-model="testResultData.actualitySendSamplesDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  703. </el-form-item>
  704. <el-form-item label="送样方式">
  705. <el-input v-model="testResultData.sendSamplesMethod" readonly style="width: 240px"></el-input>
  706. </el-form-item>
  707. <el-form-item label="送货信息">
  708. <el-input v-model="testResultData.deliverGoodsInformation" readonly style="width: 240px"></el-input>
  709. </el-form-item>
  710. </el-form>
  711. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: -2px;">
  712. <el-form-item label="送货备注">
  713. <el-input type="textarea" v-model="testResultData.deliverGoodsRemark" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  714. </el-form-item>
  715. </el-form>
  716. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: 26px;">
  717. <el-form-item label="客户是否回复">
  718. <input type="checkbox" v-if="testResultData.testResultStatus == 'R'" checked onclick="return false"/>
  719. <input type="checkbox" v-if="testResultData.testResultStatus != 'R'" onclick="return false"/>
  720. </el-form-item>
  721. <el-form-item label="客户确认结果">
  722. <el-input v-model="testResultData.confirmResults" readonly style="width: 205px"></el-input>
  723. </el-form-item>
  724. <el-form-item label="实际回复日期">
  725. <el-date-picker v-model="testResultData.actualityReplyDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  726. </el-form-item>
  727. <el-form-item label="客户确认人">
  728. <el-input v-model="testResultData.confirmBy" readonly style="width: 205px"></el-input>
  729. </el-form-item>
  730. </el-form>
  731. <el-form :inline="true" label-position="top" :model="testResultData" style="margin-left: 10px;margin-top: -2px;">
  732. <el-form-item label="客户回复信息">
  733. <el-input type="textarea" v-model="testResultData.confirmInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  734. </el-form-item>
  735. </el-form>
  736. </el-tab-pane>
  737. <el-tab-pane label="基本信息" name="attribute">
  738. <test-properties ref="tabProperties" v-model:data-list="testPropertiesList" :test-no="testCurrentRow.testNo" :height="500"></test-properties>
  739. </el-tab-pane>
  740. <el-tab-pane label="物料属性" name="test_attribute" style="padding: 5px">
  741. <el-table
  742. :data="partItemList2"
  743. :height="500"
  744. border
  745. style="width: 100%;">
  746. <el-table-column
  747. v-for="(item,index) in columnItemList" :key="index"
  748. :sortable="item.columnSortable"
  749. :prop="item.columnProp"
  750. :header-align="item.headerAlign"
  751. :show-overflow-tooltip="item.showOverflowTooltip"
  752. :align="item.align"
  753. :fixed="item.fixed==''?false:item.fixed"
  754. :min-width="item.columnWidth"
  755. :label="item.columnLabel">
  756. <template slot-scope="scope">
  757. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  758. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  759. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  760. </div>
  761. <div v-else>
  762. {{scope.row.textValue?scope.row.textValue:scope.row.numValue}}
  763. </div>
  764. </template>
  765. </el-table-column>
  766. </el-table>
  767. </el-tab-pane>
  768. <el-tab-pane label="材料信息" name="test_so_bom" style="padding: 5px">
  769. <test-table ref="tabSoBom" :test-number="testCurrentRow.testNumber" :test-no="testCurrentRow.testNo" :height="500" v-model:data-list="testSoBomList"></test-table>
  770. </el-tab-pane>
  771. <el-tab-pane label="制程信息" name="test_so_routing" style="padding: 5px">
  772. <test-routing-table ref="tabSoBom" :test-no="testCurrentRow.testNo" v-model:data-list="testSoRoutingList" :height="500" ></test-routing-table>
  773. </el-tab-pane>
  774. <el-tab-pane label="附件信息" name="file">
  775. <test-file ref="tabFile" :column-list="fileColumnList" v-model:data-list="testFileList" :test-no="testCurrentRow.testNo" :height="500"></test-file>
  776. </el-tab-pane>
  777. <!-- 项目信息页签 -->
  778. <el-tab-pane label="项目信息" name="project_information">
  779. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  780. <el-row :gutter="20">
  781. <el-col :span="8">
  782. <div class="grid-content bg-purple">
  783. <el-form-item label="项目号">
  784. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  785. </el-form-item>
  786. </div>
  787. </el-col>
  788. <el-col :span="8">
  789. <div class="grid-content bg-purple">
  790. <el-form-item label="项目名称">
  791. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  792. </el-form-item>
  793. </div>
  794. </el-col>
  795. <el-col :span="8">
  796. <div class="grid-content bg-purple">
  797. <el-form-item label="项目类型">
  798. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  799. </el-form-item>
  800. </div>
  801. </el-col>
  802. </el-row>
  803. <el-row :gutter="20">
  804. <el-col :span="8">
  805. <div class="grid-content bg-purple">
  806. <el-form-item label="客户来源">
  807. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  808. </el-form-item>
  809. </div>
  810. </el-col>
  811. <el-col :span="8">
  812. <div class="grid-content bg-purple">
  813. <el-form-item label="优先级">
  814. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  815. </el-form-item>
  816. </div>
  817. </el-col>
  818. <el-col :span="8">
  819. <div class="grid-content bg-purple">
  820. <el-form-item label="项目状态">
  821. <el-input v-model="projectInformationData.status" readonly></el-input>
  822. </el-form-item>
  823. </div>
  824. </el-col>
  825. </el-row>
  826. <el-row :gutter="20">
  827. <el-col :span="8">
  828. <div class="grid-content bg-purple">
  829. <el-form-item label="项目经理">
  830. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  831. </el-form-item>
  832. </div>
  833. </el-col>
  834. <el-col :span="8">
  835. <div class="grid-content bg-purple">
  836. <el-form-item label="项目负责人">
  837. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  838. </el-form-item>
  839. </div>
  840. </el-col>
  841. <el-col :span="8">
  842. <div class="grid-content bg-purple">
  843. <el-form-item label="项目权限">
  844. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  845. </el-form-item>
  846. </div>
  847. </el-col>
  848. </el-row>
  849. <el-row :gutter="20">
  850. <el-col :span="6">
  851. <div class="grid-content bg-purple">
  852. <el-form-item label="创建时间">
  853. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  854. </el-form-item>
  855. </div>
  856. </el-col>
  857. <el-col :span="6">
  858. <div class="grid-content bg-purple">
  859. <el-form-item label="创建人">
  860. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  861. </el-form-item>
  862. </div>
  863. </el-col>
  864. <el-col :span="6">
  865. <div class="grid-content bg-purple">
  866. <el-form-item label="更新时间">
  867. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  868. </el-form-item>
  869. </div>
  870. </el-col>
  871. <el-col :span="6">
  872. <div class="grid-content bg-purple">
  873. <el-form-item label="更新人">
  874. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  875. </el-form-item>
  876. </div>
  877. </el-col>
  878. </el-row>
  879. <el-row :gutter="20">
  880. <el-col :span="24">
  881. <div class="grid-content bg-purple">
  882. <el-form-item label="项目描述">
  883. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  884. </el-form-item>
  885. </div>
  886. </el-col>
  887. </el-row>
  888. <el-row :gutter="20">
  889. <el-col :span="24">
  890. <div class="grid-content bg-purple">
  891. <el-form-item label="其它特殊要求">
  892. <el-input v-model="projectInformationData.remark" readonly></el-input>
  893. </el-form-item>
  894. </div>
  895. </el-col>
  896. </el-row>
  897. </el-form>
  898. </el-tab-pane>
  899. <!-- 客户信息页签 -->
  900. <el-tab-pane label="客户信息" name="customer_information">
  901. <el-form label-position="top" :model="customerInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  902. <el-row :gutter="20">
  903. <el-col :span="8">
  904. <div class="grid-content bg-purple">
  905. <el-form-item label="客户代码">
  906. <el-input v-model="customerInformationData.customerNo" readonly></el-input>
  907. </el-form-item>
  908. </div>
  909. </el-col>
  910. <el-col :span="8">
  911. <div class="grid-content bg-purple">
  912. <el-form-item label="客户名称">
  913. <el-input v-model="customerInformationData.customerDesc" readonly></el-input>
  914. </el-form-item>
  915. </div>
  916. </el-col>
  917. <el-col :span="8">
  918. <div class="grid-content bg-purple">
  919. <el-form-item label="重要程度">
  920. <el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
  921. </el-form-item>
  922. </div>
  923. </el-col>
  924. </el-row>
  925. <el-row :gutter="20">
  926. <el-col :span="8">
  927. <div class="grid-content bg-purple">
  928. <el-form-item label="客户币种">
  929. <el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
  930. </el-form-item>
  931. </div>
  932. </el-col>
  933. <el-col :span="8">
  934. <div class="grid-content bg-purple">
  935. <el-form-item label="年营业额">
  936. <el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
  937. </el-form-item>
  938. </div>
  939. </el-col>
  940. <el-col :span="8">
  941. <div class="grid-content bg-purple">
  942. <el-form-item label="年潜在投入">
  943. <el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
  944. </el-form-item>
  945. </div>
  946. </el-col>
  947. </el-row>
  948. <el-row :gutter="20">
  949. <el-col :span="8">
  950. <div class="grid-content bg-purple">
  951. <el-form-item label="客户状态">
  952. <el-input v-model="customerInformationData.customerStatus" readonly></el-input>
  953. </el-form-item>
  954. </div>
  955. </el-col>
  956. <el-col :span="8">
  957. <div class="grid-content bg-purple">
  958. <el-form-item label="行业">
  959. <el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
  960. </el-form-item>
  961. </div>
  962. </el-col>
  963. <el-col :span="8">
  964. <div class="grid-content bg-purple">
  965. <el-form-item label="公司名称">
  966. <el-input v-model="customerInformationData.companyName" readonly></el-input>
  967. </el-form-item>
  968. </div>
  969. </el-col>
  970. </el-row>
  971. <el-row :gutter="20">
  972. <el-col :span="8">
  973. <div class="grid-content bg-purple">
  974. <el-form-item label="客户联系人">
  975. <el-input v-model="customerInformationData.contactName" readonly></el-input>
  976. </el-form-item>
  977. </div>
  978. </el-col>
  979. <el-col :span="8">
  980. <div class="grid-content bg-purple">
  981. <el-form-item label="联系人电话">
  982. <el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
  983. </el-form-item>
  984. </div>
  985. </el-col>
  986. <el-col :span="8">
  987. <div class="grid-content bg-purple">
  988. <el-form-item label="联系人职务">
  989. <el-input v-model="customerInformationData.position" readonly></el-input>
  990. </el-form-item>
  991. </div>
  992. </el-col>
  993. </el-row>
  994. <el-row :gutter="20">
  995. <el-col :span="12">
  996. <div class="grid-content bg-purple">
  997. <el-form-item label="客户描述">
  998. <el-input v-model="customerInformationData.customerDescription" readonly></el-input>
  999. </el-form-item>
  1000. </div>
  1001. </el-col>
  1002. <el-col :span="12">
  1003. <div class="grid-content bg-purple">
  1004. <el-form-item label="客户联系地址">
  1005. <el-input v-model="customerInformationData.addressName" readonly></el-input>
  1006. </el-form-item>
  1007. </div>
  1008. </el-col>
  1009. <el-col :span="12">
  1010. <div class="grid-content bg-purple">
  1011. <el-form-item label="地址类型">
  1012. <el-input v-model="customerInformationData.addressType" readonly></el-input>
  1013. </el-form-item>
  1014. </div>
  1015. </el-col>
  1016. </el-row>
  1017. <el-row :gutter="20">
  1018. <el-col :span="6">
  1019. <div class="grid-content bg-purple">
  1020. <el-form-item label="创建时间">
  1021. <el-input v-model="customerInformationData.createDate" readonly></el-input>
  1022. </el-form-item>
  1023. </div>
  1024. </el-col>
  1025. <el-col :span="6">
  1026. <div class="grid-content bg-purple">
  1027. <el-form-item label="创建人">
  1028. <el-input v-model="customerInformationData.createBy" readonly></el-input>
  1029. </el-form-item>
  1030. </div>
  1031. </el-col>
  1032. <el-col :span="6">
  1033. <div class="grid-content bg-purple">
  1034. <el-form-item label="更新时间">
  1035. <el-input v-model="customerInformationData.updateDate" readonly></el-input>
  1036. </el-form-item>
  1037. </div>
  1038. </el-col>
  1039. <el-col :span="6">
  1040. <div class="grid-content bg-purple">
  1041. <el-form-item label="更新人">
  1042. <el-input v-model="customerInformationData.updateBy" readonly></el-input>
  1043. </el-form-item>
  1044. </div>
  1045. </el-col>
  1046. </el-row>
  1047. </el-form>
  1048. </el-tab-pane>
  1049. </el-tabs>
  1050. <!-- chooseList模态框 -->
  1051. <choose-list ref="baseList" @getBaseData="getBaseData"></choose-list>
  1052. <!-- 客户地址 -->
  1053. <el-dialog title="联系地址清单" :close-on-click-modal="false" v-drag :visible.sync="addressModelFlag" width="520px">
  1054. <el-table
  1055. :height="300"
  1056. :data="addressList"
  1057. @row-dblclick="getAddressData"
  1058. border
  1059. style="width: 100%;">
  1060. <el-table-column
  1061. v-for="(item,index) in columnAddressList" :key="index"
  1062. :sortable="item.columnSortable"
  1063. :prop="item.columnProp"
  1064. :header-align="item.headerAlign"
  1065. :show-overflow-tooltip="item.showOverflowTooltip"
  1066. :align="item.align"
  1067. :fixed="item.fixed==''?false:item.fixed"
  1068. :min-width="item.columnWidth"
  1069. :label="item.columnLabel">
  1070. <template slot-scope="scope">
  1071. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1072. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1073. </template>
  1074. </el-table-column>
  1075. </el-table>
  1076. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1077. <el-button type="primary" @click="addressModelFlag=false">关闭</el-button>
  1078. </el-footer>
  1079. </el-dialog>
  1080. <!-- 联系人 -->
  1081. <el-dialog title="收货人清单" :close-on-click-modal="false" v-drag :visible.sync="contactModelFlag" width="520px">
  1082. <el-table
  1083. :height="300"
  1084. :data="contactList"
  1085. @row-dblclick="getContactData"
  1086. border
  1087. style="width: 100%;">
  1088. <el-table-column
  1089. v-for="(item,index) in columnContactList" :key="index"
  1090. :sortable="item.columnSortable"
  1091. :prop="item.columnProp"
  1092. :header-align="item.headerAlign"
  1093. :show-overflow-tooltip="item.showOverflowTooltip"
  1094. :align="item.align"
  1095. :fixed="item.fixed==''?false:item.fixed"
  1096. :min-width="item.columnWidth"
  1097. :label="item.columnLabel">
  1098. <template slot-scope="scope">
  1099. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1100. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1101. </template>
  1102. </el-table-column>
  1103. </el-table>
  1104. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1105. <el-button type="primary" @click="contactModelFlag=false">关闭</el-button>
  1106. </el-footer>
  1107. </el-dialog>
  1108. <!-- 上传文件的modal -->
  1109. <test-upload-file ref="testUploadFile" @refreshPageTables="getFileContentData()" v-drag></test-upload-file>
  1110. </div>
  1111. </template>
  1112. <script>
  1113. import {
  1114. testInformationSearch, // 测试信息列表查询
  1115. testInformationSave, // 测试信息新增
  1116. testInformationEdit, // 测试信息编辑
  1117. testInformationDelete, // 测试信息删除
  1118. getFileContentList, // 获取测试单附件列表
  1119. testResultSearch, // 获取测试结果对象
  1120. deleteTestFile, // 文件删除
  1121. saveTestResult, // 保存测试结果
  1122. saveSubmitResult, // 保存送样结果
  1123. saveCustomerResponse, // 保存客户回复
  1124. getProjectPartList, // 获取产品列表
  1125. getProjectInformation, // 获取项目信息
  1126. getCustomerInformation, // 获取客户信息
  1127. submitChange, // 提交
  1128. testInformationEditStatus, // 下达
  1129. } from '@/api/test/testInformation.js'
  1130. import {
  1131. getNodeAuthority, // 获取节点权限
  1132. } from '@/api/changeManagement/changeManagement.js'
  1133. import {
  1134. downLoadQuotationFile, // 文件下载
  1135. searchProjectInfoList
  1136. } from '@/api/quotation/quotationInformation.js'
  1137. import {
  1138. customerAddressSearch, // 客户联系地址列表查询
  1139. } from '@/api/customer/customerAddress.js'
  1140. import {
  1141. customerContactSearch, // 客户联系人列表查询
  1142. } from '@/api/customer/customerContact.js'
  1143. import ChooseList from '@/views/modules/common/Chooselist'
  1144. import TestUploadFile from "./test_upload_file"
  1145. import DictDataSelect from "../sys/dict-data-select.vue";
  1146. import {selectTestSoBom,} from "../../../api/test/testSoBom";
  1147. import TestTable from "./testSoBom/testTable.vue";
  1148. import TestRoutingTable from "./testSoRouting/testRoutingTable.vue";
  1149. import {selectTestSoRoutingList} from "../../../api/test/testSoRouting";
  1150. import TestAttribute from "./testSoAttribute/testAttribute.vue";
  1151. import {partPropertiesList,getPartItemWithPartNo} from "@/api/base/properties.js";
  1152. import TestProperties from "./testAttribute/testProperties.vue";
  1153. import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties";
  1154. import TestFile from "./file/testFile.vue";
  1155. export default {
  1156. computed: {
  1157. testInformationFlag () {
  1158. return (value) => {
  1159. if (!this.plmTestInformationArr){
  1160. return 'N'
  1161. }
  1162. let arr = this.plmTestInformationArr.filter(a => a.fieldId === value)
  1163. if (arr.length > 0) {
  1164. return arr[0].updateFlag
  1165. }
  1166. return 'N'
  1167. }
  1168. },
  1169. },
  1170. name:"test",
  1171. components: {
  1172. TestFile,
  1173. TestProperties,
  1174. TestAttribute,
  1175. TestRoutingTable,
  1176. TestTable,
  1177. DictDataSelect,
  1178. ChooseList,
  1179. TestUploadFile
  1180. },
  1181. watch: {
  1182. searchData: {
  1183. deep: true,
  1184. handler: function (newV, oldV) {
  1185. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1186. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  1187. }
  1188. },
  1189. modalData: {
  1190. deep: true,
  1191. handler: function (newV, oldV) {
  1192. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  1193. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  1194. this.modalData.testNo = this.modalData.testNo.toUpperCase()
  1195. }
  1196. },
  1197. 'modalData.customerNo'(newV, oldV){
  1198. if (oldV) {
  1199. if (!newV){
  1200. this.modalData.customerDesc = ''
  1201. }
  1202. this.modalData.projectId = ''
  1203. this.modalData.consignee =''
  1204. this.modalData.consigneeContact =''
  1205. this.modalData.sendSamplesAddress =''
  1206. }
  1207. },
  1208. 'modalData.projectId'(newV, oldV){
  1209. if (oldV) {
  1210. if (!newV){
  1211. this.modalData.projectName = ''
  1212. }
  1213. this.modalData.testPartNo =''
  1214. }
  1215. },
  1216. 'modalData.testPartNo'(newV, oldV){
  1217. if (oldV) {
  1218. if (!newV){
  1219. this.modalData.partName =''
  1220. this.dialogProperties = [];
  1221. }
  1222. }
  1223. },
  1224. },
  1225. data () {
  1226. return {
  1227. partItemList1:[],
  1228. partItemList2:[],
  1229. testFileList:[],
  1230. dialogProperties:[],
  1231. attributeList:[],
  1232. testSoRoutingList:[],
  1233. testSoBomList:[],
  1234. testPropertiesList:[],
  1235. copyTestPropertiesList:[],
  1236. activeTab:'attribute',
  1237. activeTabList:['attribute'],
  1238. clickTestRow:false,
  1239. // 导出
  1240. exportData: [],
  1241. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  1242. exportHeader: ['设备分类'],
  1243. exportFooter: [],
  1244. resultList: [],
  1245. // ======== 行高 ========
  1246. height: 200,
  1247. secondHeight: 200,
  1248. // ======== 分页 ========
  1249. pageIndex: 1,
  1250. pageSize: 50,
  1251. totalPage: 0,
  1252. selectedDataNum: 0,
  1253. // 条件查询
  1254. searchData: {
  1255. site: this.$store.state.user.site,
  1256. customerNo: '',
  1257. customerDesc: '',
  1258. trackerName: '',
  1259. testPartNo: '',
  1260. partName: '',
  1261. testStatus: '',
  1262. startDate: '',
  1263. endDate: '',
  1264. projectId: '',
  1265. projectName: '',
  1266. engineerName: '',
  1267. priorityLevel: '',
  1268. page: 1,
  1269. limit: 10,
  1270. menuId: this.$route.meta.menuId,
  1271. testNo: ''
  1272. },
  1273. // 其它
  1274. dataListLoading: false,
  1275. // 初始页签
  1276. activeTable: 'attribute',
  1277. // ======== 数据对象 ========
  1278. modalData: {
  1279. flag: '1',
  1280. title: '测试申请',
  1281. site: this.$store.state.user.site,
  1282. testNo: '',
  1283. customerNo: '',
  1284. customerDesc: '',
  1285. projectId: '',
  1286. projectName: '',
  1287. tracker: '',
  1288. trackerName: '',
  1289. testPartNo: '',
  1290. partName: '',
  1291. engineer: '',
  1292. engineerName: '',
  1293. priorityLevel: '',
  1294. testNumber: 1,
  1295. doesNeedArtwork:'',
  1296. artwork:'',
  1297. artworkName:'',
  1298. doesNeedPlanner:'',
  1299. planner:'',
  1300. plannerName:'',
  1301. requiredDeliveryDate: '',
  1302. remark: '',
  1303. technicalConsiderations: '',
  1304. isNeedToSendSamples: '',
  1305. sendSamplesAddress: '',
  1306. consignee: '',
  1307. consigneeContact: '',
  1308. actualityDeliveryDate: '',
  1309. testResultInformation: '',
  1310. actualitySendSamplesDate: '',
  1311. sendSamplesMethod: '',
  1312. deliverGoodsInformation: '',
  1313. deliverGoodsRemark: '',
  1314. actualityReplyDate: '',
  1315. confirmResults: '',
  1316. confirmBy: '',
  1317. confirmInformation: '',
  1318. testStatus: '草稿',
  1319. testResultStatus: 'B',
  1320. nextToDo: '',
  1321. createDate: '',
  1322. createBy: this.$store.state.user.name,
  1323. updateDate: '',
  1324. updateBy: '',
  1325. printType:'',
  1326. productName:'',
  1327. nodeConclusion: '',
  1328. stepId: '',
  1329. rejectFlag: '',
  1330. rejectStepId: '',
  1331. isReject: ''
  1332. },
  1333. testDetailData: {
  1334. technicalConsiderations: '',
  1335. isNeedToSendSamples: '',
  1336. sendSamplesAddress: '',
  1337. consignee: '',
  1338. consigneeContact: ''
  1339. },
  1340. testResultData: {
  1341. testResultStatus: '',
  1342. actualityDeliveryDate: '',
  1343. isNeedToSendSamples: '',
  1344. testResultInformation: '',
  1345. actualitySendSamplesDate: '',
  1346. sendSamplesMethod: '',
  1347. deliverGoodsInformation: '',
  1348. deliverGoodsRemark: '',
  1349. confirmResults: '',
  1350. actualityReplyDate: '',
  1351. confirmBy: '',
  1352. confirmInformation: ''
  1353. },
  1354. enterResultData: {
  1355. site: this.$store.state.user.site,
  1356. testNo: '',
  1357. actualityDeliveryDate: '',
  1358. testResultInformation: '',
  1359. updateBy: this.$store.state.user.name,
  1360. testResultStatus: '',
  1361. fileContentList: []
  1362. },
  1363. submitResultData: {
  1364. site: this.$store.state.user.site,
  1365. testNo: '',
  1366. actualitySendSamplesDate: '',
  1367. sendSamplesMethod: '',
  1368. deliverGoodsInformation: '',
  1369. deliverGoodsRemark: '',
  1370. updateBy: this.$store.state.user.name,
  1371. testResultStatus: ''
  1372. },
  1373. customerResponseData: {
  1374. site: this.$store.state.user.site,
  1375. testNo: '',
  1376. actualityReplyDate: '',
  1377. confirmResults: '',
  1378. confirmBy: '',
  1379. confirmInformation: '',
  1380. updateBy: this.$store.state.user.name,
  1381. testResultStatus: ''
  1382. },
  1383. projectPartData: {
  1384. site: this.$store.state.user.site,
  1385. testPartNo: '',
  1386. partName: ''
  1387. },
  1388. projectInformationData: {
  1389. projectId: '',
  1390. projectName: '',
  1391. projectType: '',
  1392. projectSourceDesc: '',
  1393. priorityDesc: '',
  1394. status: '',
  1395. projectDesc: '',
  1396. projectManagerName: '',
  1397. projectOwnerName: '',
  1398. userRoleName: '',
  1399. remark: ''
  1400. },
  1401. customerInformationData: {
  1402. customerNo: '',
  1403. customerDesc: '',
  1404. importantCustomer: '',
  1405. customerCurrency: '',
  1406. turnoverOfYear: '',
  1407. potentialRevenueOfYear: '',
  1408. customerStatus: '',
  1409. customerIndustry: '',
  1410. companyName: '',
  1411. jobDescription: '',
  1412. customerDescription: '',
  1413. contactName: '',
  1414. contactPhoneNumber1: '',
  1415. position: '',
  1416. addressName: '',
  1417. addressType: '',
  1418. createDate: '',
  1419. createBy: '',
  1420. updateDate: '',
  1421. updateBy: ''
  1422. },
  1423. // ======== 数据列表 ========
  1424. dataList: [],
  1425. fileContentList: [],
  1426. projectPartList: [],
  1427. addressList: [],
  1428. contactList: [],
  1429. plmTestInformationArr: [],
  1430. // ======== 列表表头 ========
  1431. columnList: [
  1432. {
  1433. userId: this.$store.state.user.name,
  1434. functionId: 103001,
  1435. serialNumber: '103001Table1TestNo',
  1436. tableId: '103001Table1',
  1437. tableName: '测试信息表',
  1438. columnProp: 'testNo',
  1439. headerAlign: 'center',
  1440. align: 'center',
  1441. columnLabel: '测试单号',
  1442. columnHidden: false,
  1443. columnImage: false,
  1444. columnSortable: false,
  1445. sortLv: 0,
  1446. status: true,
  1447. fixed: '',
  1448. columnWidth: 120
  1449. },
  1450. {
  1451. userId: this.$store.state.user.name,
  1452. functionId: 103001,
  1453. serialNumber: '103001Table1CustomerNo',
  1454. tableId: '103001Table1',
  1455. tableName: '测试信息表',
  1456. columnProp: 'customerNo',
  1457. headerAlign: 'center',
  1458. align: 'center',
  1459. columnLabel: '客户编码',
  1460. columnHidden: false,
  1461. columnImage: false,
  1462. columnSortable: false,
  1463. sortLv: 0,
  1464. status: true,
  1465. fixed: '',
  1466. columnWidth: 100
  1467. },
  1468. {
  1469. userId: this.$store.state.user.name,
  1470. functionId: 103001,
  1471. serialNumber: '103001Table1CustomerDesc',
  1472. tableId: '103001Table1',
  1473. tableName: '测试信息表',
  1474. columnProp: 'customerDesc',
  1475. headerAlign: 'center',
  1476. align: 'left',
  1477. columnLabel: '客户名称',
  1478. columnHidden: false,
  1479. columnImage: false,
  1480. columnSortable: false,
  1481. sortLv: 0,
  1482. status: true,
  1483. fixed: '',
  1484. columnWidth: 120
  1485. },
  1486. {
  1487. userId: this.$store.state.user.name,
  1488. functionId: 103001,
  1489. serialNumber: '103001Table1ProjectId',
  1490. tableId: '103001Table1',
  1491. tableName: '测试信息表',
  1492. columnProp: 'projectId',
  1493. headerAlign: 'center',
  1494. align: 'left',
  1495. columnLabel: '项目编码',
  1496. columnHidden: false,
  1497. columnImage: false,
  1498. columnSortable: false,
  1499. sortLv: 0,
  1500. status: true,
  1501. fixed: '',
  1502. columnWidth: 110
  1503. },
  1504. {
  1505. userId: this.$store.state.user.name,
  1506. functionId: 103001,
  1507. serialNumber: '103001Table1ProjectName',
  1508. tableId: '103001Table1',
  1509. tableName: '测试信息表',
  1510. columnProp: 'projectName',
  1511. headerAlign: 'center',
  1512. align: 'left',
  1513. columnLabel: '项目名称',
  1514. columnHidden: false,
  1515. columnImage: false,
  1516. columnSortable: false,
  1517. sortLv: 0,
  1518. status: true,
  1519. fixed: '',
  1520. columnWidth: 120
  1521. },
  1522. {
  1523. userId: this.$store.state.user.name,
  1524. functionId: 103001,
  1525. serialNumber: '103001Table1TrackerName',
  1526. tableId: '103001Table1',
  1527. tableName: '测试信息表',
  1528. columnProp: 'trackerName',
  1529. headerAlign: 'center',
  1530. align: 'center',
  1531. columnLabel: 'Artwork',
  1532. columnHidden: false,
  1533. columnImage: false,
  1534. columnSortable: false,
  1535. sortLv: 0,
  1536. status: true,
  1537. fixed: '',
  1538. columnWidth: 80
  1539. },
  1540. {
  1541. userId: this.$store.state.user.name,
  1542. functionId: 103001,
  1543. serialNumber: '103001Table1EngineerName',
  1544. tableId: '103001Table1',
  1545. tableName: '测试信息表',
  1546. columnProp: 'engineerName',
  1547. headerAlign: 'center',
  1548. align: 'center',
  1549. columnLabel: 'TP工程师',
  1550. columnHidden: false,
  1551. columnImage: false,
  1552. columnSortable: false,
  1553. sortLv: 0,
  1554. status: true,
  1555. fixed: '',
  1556. columnWidth: 80
  1557. },
  1558. {
  1559. userId: this.$store.state.user.name,
  1560. functionId: 103001,
  1561. serialNumber: '103001Table1TestPartNo',
  1562. tableId: '103001Table1',
  1563. tableName: '测试信息表',
  1564. columnProp: 'testPartNo',
  1565. headerAlign: 'center',
  1566. align: 'left',
  1567. columnLabel: '项目料号',
  1568. columnHidden: false,
  1569. columnImage: false,
  1570. columnSortable: false,
  1571. sortLv: 0,
  1572. status: true,
  1573. fixed: '',
  1574. columnWidth: 150
  1575. },
  1576. {
  1577. userId: this.$store.state.user.name,
  1578. functionId: 103001,
  1579. serialNumber: '103001Table1PartName',
  1580. tableId: '103001Table1',
  1581. tableName: '测试信息表',
  1582. columnProp: 'partName',
  1583. headerAlign: 'center',
  1584. align: 'left',
  1585. columnLabel: '物料名称',
  1586. columnHidden: false,
  1587. columnImage: false,
  1588. columnSortable: false,
  1589. sortLv: 0,
  1590. status: true,
  1591. fixed: '',
  1592. columnWidth: 100
  1593. },
  1594. {
  1595. userId: this.$store.state.user.name,
  1596. functionId: 103001,
  1597. serialNumber: '103001Table1PriorityLevel',
  1598. tableId: '103001Table1',
  1599. tableName: '测试信息表',
  1600. columnProp: 'priorityLevel',
  1601. headerAlign: 'center',
  1602. align: 'center',
  1603. columnLabel: '优先等级',
  1604. columnHidden: false,
  1605. columnImage: false,
  1606. columnSortable: false,
  1607. sortLv: 0,
  1608. status: true,
  1609. fixed: '',
  1610. columnWidth: 80
  1611. },
  1612. {
  1613. userId: this.$store.state.user.name,
  1614. functionId: 103001,
  1615. serialNumber: '103001Table1TestNumber',
  1616. tableId: '103001Table1',
  1617. tableName: '测试信息表',
  1618. columnProp: 'testNumber',
  1619. headerAlign: 'center',
  1620. align: 'right',
  1621. columnLabel: '测试数量',
  1622. columnHidden: false,
  1623. columnImage: false,
  1624. columnSortable: false,
  1625. sortLv: 0,
  1626. status: true,
  1627. fixed: '',
  1628. columnWidth: 80
  1629. },
  1630. {
  1631. userId: this.$store.state.user.name,
  1632. functionId: 103001,
  1633. serialNumber: '103001Table1RequiredDeliveryDate',
  1634. tableId: '103001Table1',
  1635. tableName: '测试信息表',
  1636. columnProp: 'requiredDeliveryDate',
  1637. headerAlign: 'center',
  1638. align: 'center',
  1639. columnLabel: '要求交付日期',
  1640. columnHidden: false,
  1641. columnImage: false,
  1642. columnSortable: false,
  1643. sortLv: 0,
  1644. status: true,
  1645. fixed: '',
  1646. columnWidth: 160
  1647. },
  1648. {
  1649. userId: this.$store.state.user.name,
  1650. functionId: 103001,
  1651. serialNumber: '103001Table1TestStatus',
  1652. tableId: '103001Table1',
  1653. tableName: '测试信息表',
  1654. columnProp: 'testStatus',
  1655. headerAlign: 'center',
  1656. align: 'center',
  1657. columnLabel: '状态',
  1658. columnHidden: false,
  1659. columnImage: false,
  1660. columnSortable: false,
  1661. sortLv: 0,
  1662. status: true,
  1663. fixed: '',
  1664. columnWidth: 80
  1665. },
  1666. {
  1667. userId: this.$store.state.user.name,
  1668. functionId: 103001,
  1669. serialNumber: '103001Table1NodeName',
  1670. tableId: '103001Table1',
  1671. tableName: '测试信息表',
  1672. columnProp: 'nodeName',
  1673. headerAlign: 'center',
  1674. align: 'center',
  1675. columnLabel: '当前节点',
  1676. columnHidden: false,
  1677. columnImage: false,
  1678. columnSortable: false,
  1679. sortLv: 0,
  1680. status: true,
  1681. fixed: '',
  1682. columnWidth: 150
  1683. },
  1684. {
  1685. userId: this.$store.state.user.name,
  1686. functionId: 103001,
  1687. serialNumber: '103001Table1CreateDate',
  1688. tableId: '103001Table1',
  1689. tableName: '测试信息表',
  1690. columnProp: 'createDate',
  1691. headerAlign: 'center',
  1692. align: 'center',
  1693. columnLabel: '创建时间',
  1694. columnHidden: false,
  1695. columnImage: false,
  1696. columnSortable: false,
  1697. sortLv: 0,
  1698. status: true,
  1699. fixed: '',
  1700. columnWidth: 160
  1701. },
  1702. {
  1703. userId: this.$store.state.user.name,
  1704. functionId: 103001,
  1705. serialNumber: '103001Table1CreateBy',
  1706. tableId: '103001Table1',
  1707. tableName: '测试信息表',
  1708. columnProp: 'createBy',
  1709. headerAlign: 'center',
  1710. align: 'center',
  1711. columnLabel: '创建人',
  1712. columnHidden: false,
  1713. columnImage: false,
  1714. columnSortable: false,
  1715. sortLv: 0,
  1716. status: true,
  1717. fixed: '',
  1718. columnWidth: 80
  1719. },
  1720. {
  1721. userId: this.$store.state.user.name,
  1722. functionId: 103001,
  1723. serialNumber: '103001Table1UpdateDate',
  1724. tableId: '103001Table1',
  1725. tableName: '测试信息表',
  1726. columnProp: 'updateDate',
  1727. headerAlign: 'center',
  1728. align: 'center',
  1729. columnLabel: '更新时间',
  1730. columnHidden: false,
  1731. columnImage: false,
  1732. columnSortable: false,
  1733. sortLv: 0,
  1734. status: true,
  1735. fixed: '',
  1736. columnWidth: 160
  1737. },
  1738. {
  1739. userId: this.$store.state.user.name,
  1740. functionId: 103001,
  1741. serialNumber: '103001Table1UpdateBy',
  1742. tableId: '103001Table1',
  1743. tableName: '测试信息表',
  1744. columnProp: 'updateBy',
  1745. headerAlign: 'center',
  1746. align: 'center',
  1747. columnLabel: '更新人',
  1748. columnHidden: false,
  1749. columnImage: false,
  1750. columnSortable: false,
  1751. sortLv: 0,
  1752. status: true,
  1753. fixed: '',
  1754. columnWidth: 80
  1755. }
  1756. ],
  1757. fileColumnList: [
  1758. {
  1759. userId: this.$store.state.user.name,
  1760. functionId: 103001,
  1761. serialNumber: '103001Table2FileName',
  1762. tableId: '103001Table2',
  1763. tableName: '文件信息表',
  1764. columnProp: 'fileName',
  1765. headerAlign: 'center',
  1766. align: 'center',
  1767. columnLabel: '文件名称',
  1768. columnHidden: false,
  1769. columnImage: false,
  1770. columnSortable: false,
  1771. sortLv: 0,
  1772. status: true,
  1773. fixed: '',
  1774. columnWidth: 140
  1775. },
  1776. {
  1777. userId: this.$store.state.user.name,
  1778. functionId: 103001,
  1779. serialNumber: '103001Table2FileRemark',
  1780. tableId: '103001Table2',
  1781. tableName: '文件信息表',
  1782. columnProp: 'fileRemark',
  1783. headerAlign: 'center',
  1784. align: 'center',
  1785. columnLabel: '备注',
  1786. columnHidden: false,
  1787. columnImage: false,
  1788. columnSortable: false,
  1789. sortLv: 0,
  1790. status: true,
  1791. fixed: '',
  1792. columnWidth: 240
  1793. },
  1794. // {
  1795. // userId: this.$store.state.user.name,
  1796. // functionId: 103001,
  1797. // serialNumber: '103001Table2OrderRef3',
  1798. // tableId: '103001Table2',
  1799. // tableName: '文件信息表',
  1800. // columnProp: 'orderRef3',
  1801. // headerAlign: 'center',
  1802. // align: 'center',
  1803. // columnLabel: '文件描述',
  1804. // columnHidden: false,
  1805. // columnImage: false,
  1806. // columnSortable: false,
  1807. // sortLv: 0,
  1808. // status: true,
  1809. // fixed: '',
  1810. // columnWidth: 120
  1811. // },
  1812. {
  1813. userId: this.$store.state.user.name,
  1814. functionId: 103001,
  1815. serialNumber: '103001Table2CreateDate',
  1816. tableId: '103001Table2',
  1817. tableName: '文件信息表',
  1818. columnProp: 'createDate',
  1819. headerAlign: 'center',
  1820. align: 'center',
  1821. columnLabel: '上传时间',
  1822. columnHidden: false,
  1823. columnImage: false,
  1824. columnSortable: false,
  1825. sortLv: 0,
  1826. status: true,
  1827. fixed: '',
  1828. columnWidth: 140
  1829. },
  1830. {
  1831. userId: this.$store.state.user.name,
  1832. functionId: 103001,
  1833. serialNumber: '103001Table2CreatedBy',
  1834. tableId: '103001Table2',
  1835. tableName: '文件信息表',
  1836. columnProp: 'createBy',
  1837. headerAlign: 'center',
  1838. align: 'center',
  1839. columnLabel: '上传人',
  1840. columnHidden: false,
  1841. columnImage: false,
  1842. columnSortable: false,
  1843. sortLv: 0,
  1844. status: true,
  1845. fixed: '',
  1846. columnWidth: 140
  1847. }
  1848. ],
  1849. projectPartDetailList: [
  1850. {
  1851. userId: this.$store.state.user.name,
  1852. functionId: 103001,
  1853. serialNumber: '103001Table3TestPartNo',
  1854. tableId: '103001Table3',
  1855. tableName: '项目物料表',
  1856. columnProp: 'testPartNo',
  1857. headerAlign: 'center',
  1858. align: 'center',
  1859. columnLabel: '物料编码',
  1860. columnHidden: false,
  1861. columnImage: false,
  1862. columnSortable: false,
  1863. sortLv: 0,
  1864. status: true,
  1865. fixed: '',
  1866. columnWidth: 120
  1867. },
  1868. {
  1869. userId: this.$store.state.user.name,
  1870. functionId: 103001,
  1871. serialNumber: '103001Table3PartDesc',
  1872. tableId: '103001Table3',
  1873. tableName: '项目物料表',
  1874. columnProp: 'partDesc',
  1875. headerAlign: 'center',
  1876. align: 'left',
  1877. columnLabel: '物料名称',
  1878. columnHidden: false,
  1879. columnImage: false,
  1880. columnSortable: false,
  1881. sortLv: 0,
  1882. status: true,
  1883. fixed: '',
  1884. columnWidth: 200
  1885. },{
  1886. userId: this.$store.state.user.name,
  1887. functionId: 103001,
  1888. serialNumber: '103001Table3PartSpec',
  1889. tableId: '103001Table3',
  1890. tableName: '项目物料表',
  1891. columnProp: 'partSpec',
  1892. headerAlign: 'center',
  1893. align: 'center',
  1894. columnLabel: '物料规格',
  1895. columnHidden: false,
  1896. columnImage: false,
  1897. columnSortable: false,
  1898. sortLv: 0,
  1899. status: true,
  1900. fixed: '',
  1901. columnWidth: 120
  1902. },{
  1903. userId: this.$store.state.user.name,
  1904. functionId: 103001,
  1905. serialNumber: '103001Table3PartTypeDesc',
  1906. tableId: '103001Table3',
  1907. tableName: '项目物料表',
  1908. columnProp: 'partTypeDesc',
  1909. headerAlign: 'center',
  1910. align: 'center',
  1911. columnLabel: '物料类型',
  1912. columnHidden: false,
  1913. columnImage: false,
  1914. columnSortable: false,
  1915. sortLv: 0,
  1916. status: true,
  1917. fixed: '',
  1918. columnWidth: 140
  1919. },
  1920. {
  1921. userId: this.$store.state.user.name,
  1922. functionId: 102001,
  1923. serialNumber: '102001Table3Type',
  1924. tableId: '102001Table3',
  1925. tableName: '项目物料表',
  1926. columnProp: 'type',
  1927. headerAlign: 'center',
  1928. align: 'center',
  1929. columnLabel: '制造类型',
  1930. columnHidden: false,
  1931. columnImage: false,
  1932. columnSortable: false,
  1933. sortLv: 0,
  1934. status: true,
  1935. fixed: '',
  1936. columnWidth: 120
  1937. },
  1938. {
  1939. userId: this.$store.state.user.name,
  1940. functionId: 102001,
  1941. serialNumber: '102001Table3UmId',
  1942. tableId: '102001Table3',
  1943. tableName: '项目物料表',
  1944. columnProp: 'umId',
  1945. headerAlign: 'center',
  1946. align: 'center',
  1947. columnLabel: '单位',
  1948. columnHidden: false,
  1949. columnImage: false,
  1950. columnSortable: false,
  1951. sortLv: 0,
  1952. status: true,
  1953. fixed: '',
  1954. columnWidth: 100
  1955. },
  1956. {
  1957. userId: this.$store.state.user.name,
  1958. functionId: 103001,
  1959. serialNumber: '103001Table3CodeNo',
  1960. tableId: '103001Table3',
  1961. tableName: '项目物料表',
  1962. columnProp: 'codeNo',
  1963. headerAlign: 'center',
  1964. align: 'center',
  1965. columnLabel: '模板编码',
  1966. columnHidden: false,
  1967. columnImage: false,
  1968. columnSortable: false,
  1969. sortLv: 0,
  1970. status: true,
  1971. fixed: '',
  1972. columnWidth: 120
  1973. },{
  1974. userId: this.$store.state.user.name,
  1975. functionId: 103001,
  1976. serialNumber: '103001Table3CodeDesc',
  1977. tableId: '103001Table3',
  1978. tableName: '项目物料表',
  1979. columnProp: 'codeDesc',
  1980. headerAlign: 'center',
  1981. align: 'left',
  1982. columnLabel: '模板名称',
  1983. columnHidden: false,
  1984. columnImage: false,
  1985. columnSortable: false,
  1986. sortLv: 0,
  1987. status: true,
  1988. fixed: '',
  1989. columnWidth: 120
  1990. }
  1991. ],
  1992. columnAddressList: [
  1993. {
  1994. userId: this.$store.state.user.name,
  1995. functionId: 103001,
  1996. serialNumber: '103001Table4AddressName',
  1997. tableId: '103001Table4',
  1998. tableName: '联系地址表',
  1999. columnProp: 'addressName',
  2000. headerAlign: 'center',
  2001. align: 'center',
  2002. columnLabel: '联系地址',
  2003. columnHidden: false,
  2004. columnImage: false,
  2005. status: true,
  2006. fixed: '',
  2007. },
  2008. {
  2009. userId: this.$store.state.user.name,
  2010. functionId: 103001,
  2011. serialNumber: '103001Table4ContactStatus',
  2012. tableId: '103001Table4',
  2013. tableName: '联系地址表',
  2014. columnProp: 'addressStatus',
  2015. headerAlign: 'center',
  2016. align: 'center',
  2017. columnLabel: '地址状态',
  2018. columnHidden: false,
  2019. columnImage: false,
  2020. status: true,
  2021. fixed: '',
  2022. },
  2023. ],
  2024. columnContactList: [
  2025. {
  2026. userId: this.$store.state.user.name,
  2027. functionId: 103001,
  2028. serialNumber: '103001Table5ContactName',
  2029. tableId: '103001Table5',
  2030. tableName: '客户联系人表',
  2031. columnProp: 'contactName',
  2032. headerAlign: 'center',
  2033. align: 'center',
  2034. columnLabel: '客户负责人',
  2035. columnHidden: false,
  2036. columnImage: false,
  2037. status: true,
  2038. fixed: '',
  2039. },
  2040. {
  2041. userId: this.$store.state.user.name,
  2042. functionId: 103001,
  2043. serialNumber: '103001Table5ContactPhoneNumber1',
  2044. tableId: '103001Table5',
  2045. tableName: '客户联系人表',
  2046. columnProp: 'contactPhoneNumber1',
  2047. headerAlign: 'center',
  2048. align: 'center',
  2049. columnLabel: '联系方式',
  2050. columnHidden: false,
  2051. columnImage: false,
  2052. status: true,
  2053. fixed: '',
  2054. },
  2055. {
  2056. userId: this.$store.state.user.name,
  2057. functionId: 103001,
  2058. serialNumber: '103001Table5PrimaryContact',
  2059. tableId: '103001Table5',
  2060. tableName: '客户联系人表',
  2061. columnProp: 'primaryContact',
  2062. headerAlign: 'center',
  2063. align: 'center',
  2064. columnLabel: '默认联系人',
  2065. columnHidden: false,
  2066. columnImage: false,
  2067. status: true,
  2068. fixed: '',
  2069. },
  2070. {
  2071. userId: this.$store.state.user.name,
  2072. functionId: 103001,
  2073. serialNumber: '103001Table5ContactStatus',
  2074. tableId: '103001Table5',
  2075. tableName: '客户联系人表',
  2076. columnProp: 'contactStatus',
  2077. headerAlign: 'center',
  2078. align: 'center',
  2079. columnLabel: '人员状态',
  2080. columnHidden: false,
  2081. columnImage: false,
  2082. status: true,
  2083. fixed: '',
  2084. },
  2085. ],
  2086. // ======== 必填规则 ========
  2087. rules: {
  2088. customerNo: [
  2089. {
  2090. required: true,
  2091. message: ' ',
  2092. trigger: ['change','blur']
  2093. }
  2094. ],
  2095. trackerName: [
  2096. {
  2097. required: true,
  2098. message: ' ',
  2099. trigger: ['change','blur']
  2100. }
  2101. ],
  2102. testNumber: [
  2103. {
  2104. required: true,
  2105. message: ' ',
  2106. trigger: ['change','blur']
  2107. }
  2108. ],
  2109. projectId: [
  2110. {
  2111. required: true,
  2112. message: ' ',
  2113. trigger: ['change','blur']
  2114. }
  2115. ],
  2116. engineerName: [
  2117. {
  2118. required: true,
  2119. message: ' ',
  2120. trigger: ['change','blur']
  2121. }
  2122. ],
  2123. partName: [
  2124. {
  2125. required: true,
  2126. message: ' ',
  2127. trigger: ['change','blur']
  2128. }
  2129. ],
  2130. priorityLevel: [
  2131. {
  2132. required: true,
  2133. message: ' ',
  2134. trigger: ['change','blur']
  2135. }
  2136. ],
  2137. requiredDeliveryDate: [
  2138. {
  2139. required: true,
  2140. message: ' ',
  2141. trigger: ['change','blur']
  2142. }
  2143. ],
  2144. testPartNo: [
  2145. {
  2146. required: true,
  2147. message: ' ',
  2148. trigger: ['change','blur']
  2149. }
  2150. ]
  2151. },
  2152. enterResultRules: {
  2153. actualityDeliveryDate: [
  2154. {
  2155. required: true,
  2156. message: ' ',
  2157. trigger: 'change'
  2158. }
  2159. ],
  2160. testResultInformation: [
  2161. {
  2162. required: true,
  2163. message: ' ',
  2164. trigger: 'change'
  2165. }
  2166. ]
  2167. },
  2168. submitResultRules: {
  2169. actualitySendSamplesDate: [
  2170. {
  2171. required: true,
  2172. message: ' ',
  2173. trigger: 'change'
  2174. }
  2175. ],
  2176. sendSamplesMethod: [
  2177. {
  2178. required: true,
  2179. message: ' ',
  2180. trigger: 'change'
  2181. }
  2182. ]
  2183. },
  2184. customerResponseRules: {
  2185. actualityReplyDate: [
  2186. {
  2187. required: true,
  2188. message: ' ',
  2189. trigger: 'change'
  2190. }
  2191. ],
  2192. confirmResults: [
  2193. {
  2194. required: true,
  2195. message: ' ',
  2196. trigger: 'change'
  2197. }
  2198. ],
  2199. confirmBy: [
  2200. {
  2201. required: true,
  2202. message: ' ',
  2203. trigger: 'change'
  2204. }
  2205. ]
  2206. },
  2207. // ======== 复选数据集 ========
  2208. testSelections: [],
  2209. projectPartListSelections: [],
  2210. // ======== 选中的当前行数据 ========
  2211. testCurrentRow: {},
  2212. // ======== 模态框开关控制 ========
  2213. modalFlag: false,
  2214. modalDisableFlag: false,
  2215. enterResultModalFlag: false,
  2216. submitResultModalFlag: false,
  2217. customerResponseModalFlag: false,
  2218. projectPartModelFlag: false,
  2219. // 选择项目弹框开关
  2220. chooseProjectListFlag: false,
  2221. //项目搜索条件
  2222. searchProjectData:{
  2223. site:this.$store.state.user.site,
  2224. projectId:undefined,
  2225. projectName:undefined,
  2226. customerId:undefined,
  2227. },
  2228. // 项目集合
  2229. projectList:[],
  2230. addressModelFlag: false,
  2231. contactModelFlag: false,
  2232. columnItemList: [
  2233. {
  2234. userId: this.$store.state.user.name,
  2235. functionId: 103001,
  2236. serialNumber: '103001Table2PropertiesItemID',
  2237. tableId: "103001Table2",
  2238. tableName: "物料属性表",
  2239. columnProp: 'propertiesItemNo',
  2240. headerAlign: "center",
  2241. align: "center",
  2242. columnLabel: '属性编码',
  2243. columnHidden: false,
  2244. columnImage: false,
  2245. status: true,
  2246. fixed: '',
  2247. columnWidth: 100,
  2248. },
  2249. {
  2250. userId: this.$store.state.user.name,
  2251. functionId: 103001,
  2252. serialNumber: '103001Table2PropertiesItemDesc',
  2253. tableId: "103001Table2",
  2254. tableName: "物料属性表",
  2255. columnProp: 'itemDesc',
  2256. headerAlign: "center",
  2257. align: "left",
  2258. columnLabel: '属性名称',
  2259. columnHidden: false,
  2260. columnImage: false,
  2261. status: true,
  2262. fixed: '',
  2263. columnWidth: 120,
  2264. },
  2265. {
  2266. userId: this.$store.state.user.name,
  2267. functionId: 103001,
  2268. serialNumber: '103001Table2ValueType',
  2269. tableId: "103001Table2",
  2270. tableName: "物料属性表",
  2271. columnProp: 'valueType',
  2272. headerAlign: "center",
  2273. align: "center",
  2274. columnLabel: '属性类型',
  2275. columnHidden: false,
  2276. columnImage: false,
  2277. status: true,
  2278. fixed: '',
  2279. columnWidth: 100,
  2280. },
  2281. {
  2282. userId: this.$store.state.user.name,
  2283. functionId: 103001,
  2284. serialNumber: '103001Table2ValueChooseFlag',
  2285. tableId: "103001Table2",
  2286. tableName: "物料属性表",
  2287. columnProp: 'textValue',
  2288. headerAlign: "center",
  2289. align: "left",
  2290. columnLabel: '实测值',
  2291. columnHidden: false,
  2292. columnImage: false,
  2293. status: true,
  2294. fixed: '',
  2295. columnWidth: 100,
  2296. },
  2297. // {
  2298. // userId: this.$store.state.user.name,
  2299. // functionId: 103001,
  2300. // serialNumber: '103001Table2ValueChooseFlag',
  2301. // tableId: "103001Table2",
  2302. // tableName: "物料属性表",
  2303. // columnProp: 'numValue',
  2304. // headerAlign: "center",
  2305. // align: "center",
  2306. // columnLabel: '数字值',
  2307. // columnHidden: false,
  2308. // columnImage: false,
  2309. // status: true,
  2310. // fixed: '',
  2311. // columnWidth: 70,
  2312. // },
  2313. ],
  2314. }
  2315. },
  2316. mounted () {
  2317. this.$nextTick(() => {
  2318. this.height = window.innerHeight / 2 - 240;
  2319. /*第二个表格高度的动态调整*/
  2320. this.secondHeight = window.innerHeight / 2 - 206;
  2321. })
  2322. },
  2323. created () {
  2324. this.getDataList()
  2325. },
  2326. activated () {
  2327. if (this.$route.params.type === 'tokenLogin') {
  2328. if (this.$route.params.docNo) {
  2329. this.searchData.testNo = this.$route.params.docNo
  2330. }
  2331. this.searchData.limit = this.pageSize
  2332. this.searchData.page = this.pageIndex
  2333. testInformationSearch(this.searchData).then(({data}) => {
  2334. if (data.code === 0) {
  2335. this.dataList = data.page.list
  2336. this.pageIndex = data.page.currPage
  2337. this.pageSize = data.page.pageSize
  2338. this.totalPage = data.page.totalCount
  2339. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  2340. // 判断是否全部存在数据
  2341. if (this.totalPage > 0) {
  2342. //设置选中行
  2343. this.$refs.testTable.setCurrentRow(this.dataList[0])
  2344. // 加载当前的页签的table
  2345. this.refreshCurrentTabTable()
  2346. this.testClickRow(this.dataList[0])
  2347. this.updateModal(this.dataList[0])
  2348. } else {
  2349. //设置选中行
  2350. this.$refs.testTable.setCurrentRow({})
  2351. // 加载当前的页签的table
  2352. this.refreshCurrentTabTable()
  2353. this.testClickRow({})
  2354. }
  2355. }
  2356. })
  2357. }else {
  2358. if (this.$route.params.testNo){
  2359. this.searchData.testNo = this.$route.params.testNo
  2360. this.getDataList()
  2361. setTimeout(()=>{
  2362. this.searchData.testNo = ''
  2363. },200)
  2364. }
  2365. }
  2366. },
  2367. methods: {
  2368. searchTestPropertiesItem(){
  2369. let params={
  2370. site:this.$store.state.user.site,
  2371. }
  2372. this.copyTestPropertiesList = [];
  2373. searchTestPropertiesItem(params).then(({data}) => {
  2374. if (data && data.code === 0){
  2375. this.copyTestPropertiesList = data.rows;
  2376. }else {
  2377. this.$message.warning(data.msg)
  2378. }
  2379. }).catch((error)=>{
  2380. this.$message.error(error)
  2381. })
  2382. },
  2383. // ======== 分页相关方法 ========
  2384. /**
  2385. * 每页数
  2386. * @param val
  2387. */
  2388. sizeChangeHandle (val) {
  2389. this.pageSize = val
  2390. this.pageIndex = 1
  2391. this.getDataList()
  2392. },
  2393. /**
  2394. * 当前页
  2395. * @param val
  2396. */
  2397. currentChangeHandle (val) {
  2398. this.pageIndex = val
  2399. this.getDataList()
  2400. },
  2401. // ======== 复选框操作相关方法 ========
  2402. /**
  2403. * 选中一行
  2404. * @param row
  2405. */
  2406. projectPartClickRow (row) {
  2407. if (this.modalData.flag === '1' && this.activeTabList.length === 1){
  2408. this.$refs.projectPartTable.clearSelection();
  2409. this.$refs.projectPartTable.toggleRowSelection(row);
  2410. this.confirmProjectPart();
  2411. }
  2412. },
  2413. /**
  2414. * 多选
  2415. * @param val
  2416. */
  2417. selectionProjectPart (val) {
  2418. this.projectPartListSelections = val
  2419. },
  2420. /**
  2421. * 获取唯一值,一般都为 id
  2422. * @param row
  2423. * @returns {*}
  2424. */
  2425. getRowKeys (row) {
  2426. return row.testPartNo;
  2427. },
  2428. // 勾选多选框
  2429. selectTestPart(selection,row){
  2430. this.$refs.projectPartTable.clearSelection();
  2431. this.$refs.projectPartTable.toggleRowSelection(row,true)
  2432. },
  2433. selectAllTestPart(selection){
  2434. this.$refs.projectPartTable.clearSelection();
  2435. },
  2436. /**
  2437. * 未知
  2438. * @returns {boolean}
  2439. */
  2440. selectFlag () {
  2441. return true
  2442. },
  2443. // ======== 页签切换相关方法 ========
  2444. /**
  2445. * 列表表格选择替换
  2446. * @param tab
  2447. * @param event
  2448. */
  2449. tabClick (tab, event) {
  2450. // 刷新列表数据
  2451. this.refreshCurrentTabTable()
  2452. },
  2453. dialogTabClick(){
  2454. if (this.activeTab === 'partAttribute') {
  2455. this.getPartItem(this.modalData.site,this.modalData.testPartNo,1);
  2456. }
  2457. },
  2458. /**
  2459. * 当前值发生变化的时候修改
  2460. * @param row
  2461. * @param oldRow
  2462. */
  2463. changeCurrentRow (row, oldRow) {
  2464. // 判断是否是获取焦点的事件
  2465. if (row) {
  2466. this.testCurrentRow = JSON.parse(JSON.stringify(row))
  2467. // 刷新当前页表
  2468. this.refreshCurrentTabTable()
  2469. }
  2470. },
  2471. getFileContentList(){
  2472. let params = {
  2473. orderRef1:this.$store.state.user.site,
  2474. orderRef2:this.testCurrentRow.testNo
  2475. }
  2476. getFileContentList(params).then(({data})=>{
  2477. if (data && data.code === 0){
  2478. this.testFileList = data.rows;
  2479. }else {
  2480. this.$message.warning(data.msg)
  2481. }
  2482. }).catch((error)=>{
  2483. this.$message.error(error)
  2484. })
  2485. },
  2486. /**
  2487. * 刷新页签的table数据
  2488. */
  2489. refreshCurrentTabTable () {
  2490. if (this.activeTable === 'test_result') {
  2491. this.getTestResult()
  2492. } else if (this.activeTable === 'project_information') {
  2493. this.getProjectInformation()
  2494. } else if (this.activeTable === 'customer_information') {
  2495. this.getCustomerInformation()
  2496. }else if (this.activeTable === 'test_attribute') {
  2497. console.log(this.testCurrentRow)
  2498. this.getPartItem(this.testCurrentRow.site,this.testCurrentRow.testPartNo,2);
  2499. }
  2500. },
  2501. // ======== 列表数据刷新方法 ========
  2502. /**
  2503. * 获取数据列表
  2504. */
  2505. getDataList () {
  2506. this.searchData.limit = this.pageSize
  2507. this.searchData.page = this.pageIndex
  2508. testInformationSearch(this.searchData).then(({data}) => {
  2509. if (data.code === 0) {
  2510. this.dataList = data.page.list
  2511. this.pageIndex = data.page.currPage
  2512. this.pageSize = data.page.pageSize
  2513. this.totalPage = data.page.totalCount
  2514. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  2515. // 判断是否全部存在数据
  2516. if (this.totalPage > 0) {
  2517. //设置选中行
  2518. this.$refs.testTable.setCurrentRow(this.dataList[0])
  2519. // 加载当前的页签的table
  2520. this.refreshCurrentTabTable()
  2521. this.testClickRow(this.dataList[0])
  2522. } else {
  2523. //设置选中行
  2524. this.$refs.testTable.setCurrentRow({})
  2525. // 加载当前的页签的table
  2526. this.refreshCurrentTabTable()
  2527. this.testClickRow({})
  2528. }
  2529. }
  2530. this.dataListLoading = false
  2531. })
  2532. },
  2533. /**
  2534. * 获取测试结果列表
  2535. */
  2536. getTestResult () {
  2537. let tempData = {
  2538. site: this.$store.state.user.site,
  2539. testNo: this.testCurrentRow.testNo
  2540. }
  2541. // 测试结果对象
  2542. testResultSearch(tempData).then(({data}) => {
  2543. if (data && data.code === 0) {
  2544. this.testResultData = data.rows[0]
  2545. } else {
  2546. this.testResultData = {}
  2547. }
  2548. })
  2549. // 附件列表
  2550. this.getFileContentData()
  2551. },
  2552. /**
  2553. * 获取项目信息
  2554. */
  2555. getProjectInformation () {
  2556. let tempData = {
  2557. site: this.$store.state.user.site,
  2558. projectId: this.testCurrentRow.projectId
  2559. }
  2560. // 报价结果对象
  2561. getProjectInformation(tempData).then(({data}) => {
  2562. if (data && data.code === 0) {
  2563. this.projectInformationData = data.rows[0]
  2564. } else {
  2565. this.projectInformationData = {}
  2566. }
  2567. })
  2568. },
  2569. /**
  2570. * 获取客户信息
  2571. */
  2572. getCustomerInformation () {
  2573. let tempData = {
  2574. site: this.$store.state.user.site,
  2575. customerNo: this.testCurrentRow.customerNo
  2576. }
  2577. // 报价结果对象
  2578. getCustomerInformation(tempData).then(({data}) => {
  2579. if (data && data.code === 0) {
  2580. this.customerInformationData = data.rows[0]
  2581. } else {
  2582. this.customerInformationData = {}
  2583. }
  2584. })
  2585. },
  2586. // ======== 新增/编辑模态框 ========
  2587. /**
  2588. * 报价信息新增模态框
  2589. */
  2590. addModal () {
  2591. this.searchTestPropertiesItem();
  2592. this.modalDisableFlag = false
  2593. this.modalFlag = true
  2594. },
  2595. /**
  2596. * 报价信息编辑模态框
  2597. * @param row
  2598. */
  2599. async updateModal (row) {
  2600. await this.getNodeAuthority(row)
  2601. this.modalData = {
  2602. flag: '2',
  2603. title: '测试申请-'+row.testNo,
  2604. site: row.site,
  2605. testNo: row.testNo,
  2606. customerNo: row.customerNo,
  2607. customerDesc: row.customerDesc,
  2608. projectId: row.projectId,
  2609. projectName: row.projectName,
  2610. tracker: row.tracker,
  2611. doesNeedArtwork:row.doesNeedArtwork,
  2612. artwork:row.artwork,
  2613. artworkName:row.artworkName,
  2614. doesNeedPlanner:row.doesNeedPlanner,
  2615. planner: row.planner,
  2616. plannerName: row.plannerName,
  2617. trackerName: row.trackerName,
  2618. testPartNo: row.testPartNo,
  2619. partName: row.partName,
  2620. engineer: row.engineer,
  2621. printType:row.printType,
  2622. productName:row.productName,
  2623. engineerName: row.engineerName,
  2624. priorityLevel: row.priorityLevel,
  2625. testNumber: row.testNumber,
  2626. requiredDeliveryDate: row.requiredDeliveryDate,
  2627. remark: row.remark,
  2628. technicalConsiderations: row.technicalConsiderations,
  2629. isNeedToSendSamples: row.isNeedToSendSamples,
  2630. sendSamplesAddress: row.sendSamplesAddress,
  2631. consignee: row.consignee,
  2632. consigneeContact: row.consigneeContact,
  2633. actualityDeliveryDate: row.actualityDeliveryDate,
  2634. testResultInformation: row.testResultInformation,
  2635. actualitySendSamplesDate: row.actualitySendSamplesDate,
  2636. sendSamplesMethod: row.sendSamplesMethod,
  2637. deliverGoodsInformation: row.deliverGoodsInformation,
  2638. deliverGoodsRemark: row.deliverGoodsRemark,
  2639. actualityReplyDate: row.actualityReplyDate,
  2640. confirmResults: row.confirmResults,
  2641. confirmBy: row.confirmBy,
  2642. confirmInformation: row.confirmInformation,
  2643. testStatus: row.testStatus,
  2644. testResultStatus: row.testResultStatus,
  2645. nextToDo: row.nextToDo,
  2646. updateBy: this.$store.state.user.name,
  2647. nodeConclusion: '',
  2648. stepId: row.stepId,
  2649. rejectFlag: row.rejectFlag,
  2650. rejectStepId: row.rejectStepId,
  2651. isReject: row.isReject
  2652. }
  2653. this.activeTabList = ['product','process','attribute','partAttribute','file']
  2654. // this.$nextTick(()=>{
  2655. // this.$refs.dialogSoBom.clearTable();
  2656. // })
  2657. this.modalDisableFlag = true
  2658. this.modalFlag = true
  2659. },
  2660. // ======== 新增/编辑/删除方法 ========
  2661. /**
  2662. * 获取项目物料列表
  2663. */
  2664. getProjectPartList () {
  2665. if (!this.modalData.projectId){
  2666. this.projectPartList = [];
  2667. return
  2668. }
  2669. // 先清空缓存选中
  2670. // this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2671. // 拿到选中的产品编号
  2672. let projectPartList = this.modalData.testPartNo.split(';')
  2673. this.projectPartData.projectId = this.modalData.projectId;
  2674. // 查询所有项目物料
  2675. getProjectPartList(this.projectPartData).then(({data}) => {
  2676. if (data && data.code === 0) {
  2677. this.projectPartList = data.rows
  2678. this.projectPartList.forEach (val => {
  2679. // 回显选中的项目物料
  2680. if (projectPartList.includes(val.testPartNo)) {
  2681. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2682. }
  2683. })
  2684. // this.projectPartModelFlag = true
  2685. }else {
  2686. this.$alert(data.msg, '错误', {
  2687. confirmButtonText: '确定'
  2688. })
  2689. }
  2690. })
  2691. },
  2692. /**
  2693. * 确认多选项目物料
  2694. */
  2695. confirmProjectPart () {
  2696. this.modalData.testPartNo = ''
  2697. this.modalData.partName = ''
  2698. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2699. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2700. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2701. }
  2702. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2703. this.modalData.partName = this.modalData.partName.substring(1)
  2704. this.projectPartModelFlag = false
  2705. },
  2706. /**
  2707. * 客户信息新增/编辑
  2708. */
  2709. saveData () {
  2710. this.$refs.modalForm.validate((valid) => {
  2711. if (!valid) {
  2712. this.validateDataValue()
  2713. }else {
  2714. // if (this.projectPartListSelections.length <= 0){
  2715. // this.$message.warning('请选择项目料号')
  2716. // return
  2717. // }
  2718. // this.confirmProjectPart();
  2719. if (this.modalData.flag === '1'){
  2720. this.testSoRoutingList = []
  2721. this.testSoBomList = []
  2722. this.testFileList = [];
  2723. this.testPropertiesList = [];
  2724. this.saveTest()
  2725. }else {
  2726. this.updateTest()
  2727. }
  2728. }
  2729. })
  2730. },
  2731. validateDataValue(){
  2732. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2733. this.$message.warning('请选择客户编码!')
  2734. return
  2735. }
  2736. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2737. this.$message.warning('请选择客户名称!')
  2738. return
  2739. }
  2740. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  2741. this.$message.warning('请选择跟单员编码!')
  2742. return
  2743. }
  2744. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2745. this.$message.warning('请选择跟单员名称!')
  2746. return
  2747. }
  2748. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2749. this.$message.warning('请选择项目编码!')
  2750. return
  2751. }
  2752. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2753. this.$message.warning('请选择项目名称!')
  2754. return
  2755. }
  2756. if (this.modalData.engineer === '' || this.modalData.engineer == null) {
  2757. this.$message.warning('请选择工程师编码!')
  2758. return
  2759. }
  2760. if (this.modalData.engineerName === '' || this.modalData.engineerName == null) {
  2761. this.$message.warning('请选择工程师名称!')
  2762. return
  2763. }
  2764. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  2765. this.$message.warning('请选择项目料号!')
  2766. return
  2767. }
  2768. if (this.modalData.partName === '' || this.modalData.partName == null) {
  2769. this.$message.warning('请选择物料名称!')
  2770. return
  2771. }
  2772. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2773. this.$message.warning('请选择优先等级!')
  2774. return
  2775. }
  2776. if (!this.modalData.testNumber) {
  2777. this.$message.warning('请输入正确的测试数量!')
  2778. return
  2779. }
  2780. if (this.modalData.requiredDeliveryDate === '' || this.modalData.requiredDeliveryDate == null) {
  2781. this.$message.warning('请输入要求交付日期!')
  2782. return
  2783. }
  2784. },
  2785. saveTest(){
  2786. testInformationSave(this.modalData).then(({data}) => {
  2787. if (data && data.code === 0) {
  2788. this.getDataList();
  2789. this.activeTabList = ['product','process','attribute','partAttribute','file']
  2790. this.activeTab = 'attribute'
  2791. this.modalData.testNo = data.row;
  2792. // this.modalFlag = false
  2793. this.getTestProperties();
  2794. this.$message.success("操作成功")
  2795. } else {
  2796. this.$alert(data.msg, '错误', {
  2797. confirmButtonText: '确定'
  2798. })
  2799. }
  2800. })
  2801. },
  2802. updateTest(){
  2803. testInformationEdit(this.modalData).then(({data}) => {
  2804. if (data && data.code === 0) {
  2805. this.getDataList()
  2806. this.modalFlag = false
  2807. this.$message({
  2808. message: '操作成功',
  2809. type: 'success',
  2810. duration: 1500,
  2811. onClose: () => {}
  2812. })
  2813. } else {
  2814. this.$alert(data.msg, '错误', {
  2815. confirmButtonText: '确定'
  2816. })
  2817. }
  2818. })
  2819. },
  2820. /**
  2821. * 测试信息删除
  2822. */
  2823. delModal () {
  2824. if(this.testSelections.length === 0){
  2825. this.$message.warning('请勾选要删除的测试信息!')
  2826. return
  2827. }
  2828. this.$confirm(`是否删除这 `+ this.testSelections.length +` 条测试信息?`, '提示', {
  2829. confirmButtonText: '确定',
  2830. cancelButtonText: '取消',
  2831. type: 'warning'
  2832. }).then(() => {
  2833. let tempData = {
  2834. informationList: this.testSelections
  2835. }
  2836. testInformationDelete(tempData).then(({data}) => {
  2837. if (data && data.code === 0) {
  2838. this.getDataList()
  2839. this.testSelections = []
  2840. this.$message({
  2841. message: '操作成功',
  2842. type: 'success',
  2843. duration: 1500,
  2844. onClose: () => {}
  2845. })
  2846. } else {
  2847. this.$alert(data.msg, '错误', {
  2848. confirmButtonText: '确定'
  2849. })
  2850. }
  2851. })
  2852. }).catch(() => {
  2853. })
  2854. },
  2855. // ======== 列表操作方法 ========
  2856. /**
  2857. * 单机选中测试信息
  2858. * @param row
  2859. */
  2860. testClickRow (row) {
  2861. // this.$refs.testTable.toggleRowSelection(row)
  2862. this.testCurrentRow = JSON.parse(JSON.stringify(row))
  2863. this.testDetailData = JSON.parse(JSON.stringify(row))
  2864. // 刷新组件
  2865. this.clickTestRow = false;
  2866. this.clickTestRow = true;
  2867. if (row){
  2868. this.selectTestSoBom()
  2869. this.selectTestSoRoutingList()
  2870. this.getPartPropertiesList();
  2871. this.getTestProperties();
  2872. this.getFileContentList()
  2873. }
  2874. },
  2875. /**
  2876. * 复选报价信息
  2877. * @param val
  2878. */
  2879. selectionTest (val) {
  2880. this.testSelections = val
  2881. this.$refs.selectDiv.setLengthselected(this.testSelections.length)
  2882. },
  2883. // ======== 报价结果相关方法 ========
  2884. /**
  2885. * 封装录入方法
  2886. */
  2887. packTestResultModal () {
  2888. // 重置对象
  2889. this.enterResultData = {
  2890. site: this.$store.state.user.site,
  2891. testNo: '',
  2892. actualityDeliveryDate: new Date(),
  2893. testResultInformation: '',
  2894. testResultStatus: 'E',
  2895. fileContentList: [],
  2896. updateBy: this.$store.state.user.name
  2897. }
  2898. this.enterResultData.testNo = this.testCurrentRow.testNo
  2899. // // 获得这些测试号的全部附件
  2900. // this.getFileContentList()
  2901. this.enterResultModalFlag = true
  2902. },
  2903. /**
  2904. * 录入测试结果
  2905. */
  2906. testResultModal () {
  2907. this.packTestResultModal()
  2908. },
  2909. /**
  2910. * 保存测试结果
  2911. */
  2912. saveTestResult () {
  2913. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  2914. this.$message.warning('请选择实际交付日期!')
  2915. return
  2916. }
  2917. if (this.enterResultData.testResultInformation === '' || this.enterResultData.testResultInformation == null) {
  2918. this.$message.warning('请填写测试结果信息!')
  2919. return
  2920. }
  2921. saveTestResult(this.enterResultData).then(({data}) => {
  2922. if (data && data.code === 0) {
  2923. this.getDataList()
  2924. this.enterResultModalFlag = false
  2925. this.$message({
  2926. message: '操作成功',
  2927. type: 'success',
  2928. duration: 1500,
  2929. onClose: () => {}
  2930. })
  2931. } else {
  2932. this.$alert(data.msg, '错误', {
  2933. confirmButtonText: '确定'
  2934. })
  2935. }
  2936. })
  2937. },
  2938. /**
  2939. * 封装送样方法
  2940. */
  2941. packSubmitTestModal () {
  2942. this.submitResultData = {
  2943. site: this.$store.state.user.site,
  2944. testNo: '',
  2945. actualitySendSamplesDate: new Date(),
  2946. sendSamplesMethod: '',
  2947. deliverGoodsInformation: '',
  2948. deliverGoodsRemark: '',
  2949. testResultStatus: 'S',
  2950. updateBy: this.$store.state.user.name,
  2951. }
  2952. // 获得选中的测试号
  2953. this.submitResultData.testNo = this.testCurrentRow.testNo
  2954. this.submitResultModalFlag = true
  2955. },
  2956. /**
  2957. * 提交送样信息
  2958. */
  2959. submitTestModal () {
  2960. this.packSubmitTestModal()
  2961. },
  2962. /**
  2963. * 保存送样结果
  2964. */
  2965. saveSubmitResult () {
  2966. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  2967. this.$message.warning('请选择实际送样日期!')
  2968. return
  2969. }
  2970. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  2971. this.$message.warning('请选择送样方式!')
  2972. return
  2973. }
  2974. saveSubmitResult(this.submitResultData).then(({data}) => {
  2975. if (data && data.code === 0) {
  2976. this.getDataList()
  2977. this.submitResultModalFlag = false
  2978. this.$message({
  2979. message: '操作成功',
  2980. type: 'success',
  2981. duration: 1500,
  2982. onClose: () => {}
  2983. })
  2984. } else {
  2985. this.$alert(data.msg, '错误', {
  2986. confirmButtonText: '确定'
  2987. })
  2988. }
  2989. })
  2990. },
  2991. /**
  2992. * 封装回复方法
  2993. */
  2994. packCustomerResponseModal () {
  2995. this.customerResponseData = {
  2996. site: this.$store.state.user.site,
  2997. testNo: '',
  2998. actualityReplyDate: new Date(),
  2999. confirmResults: '接受',
  3000. confirmBy: '',
  3001. confirmInformation: '',
  3002. testResultStatus: 'R',
  3003. updateBy: this.$store.state.user.name
  3004. }
  3005. // 获得选中的测试号
  3006. this.customerResponseData.testNo = this.testCurrentRow.testNo
  3007. this.customerResponseModalFlag = true
  3008. },
  3009. /**
  3010. * 客户回复
  3011. */
  3012. customerResponseModal () {
  3013. this.packCustomerResponseModal()
  3014. },
  3015. /**
  3016. * 保存客户回复
  3017. */
  3018. saveCustomerResponse () {
  3019. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  3020. this.$message.warning('请选择实际回复日期!')
  3021. return
  3022. }
  3023. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3024. this.$message.warning('请选择客户确认结果!')
  3025. return
  3026. }
  3027. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3028. this.$message.warning('请填写客户确认人!')
  3029. return
  3030. }
  3031. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3032. if (data && data.code === 0) {
  3033. this.getDataList()
  3034. this.customerResponseModalFlag = false
  3035. this.$message({
  3036. message: '操作成功',
  3037. type: 'success',
  3038. duration: 1500,
  3039. onClose: () => {}
  3040. })
  3041. } else {
  3042. this.$alert(data.msg, '错误', {
  3043. confirmButtonText: '确定'
  3044. })
  3045. }
  3046. })
  3047. },
  3048. // ======== 报价单附件的相关方法 ========
  3049. /**
  3050. * 获取报价单附件列表
  3051. */
  3052. getFileContentData () {
  3053. let currentData = {
  3054. orderRef1: this.$store.state.user.site,
  3055. orderRef2: this.testCurrentRow.testNo
  3056. }
  3057. getFileContentList(currentData).then(({data}) => {
  3058. if (data && data.code === 0) {
  3059. this.fileContentList = data.rows
  3060. } else {
  3061. this.fileContentList = []
  3062. }
  3063. })
  3064. },
  3065. /**
  3066. * 上传文件
  3067. */
  3068. uploadFile () {
  3069. let currentData = {
  3070. titleCon: '测试附件上传',
  3071. site: this.$store.state.user.site,
  3072. createBy: this.$store.state.user.name,
  3073. testNo: this.enterResultData.testNo,
  3074. fileRemark: '',
  3075. folder: 'testFile'
  3076. }
  3077. //打开组件 去做新增业务
  3078. this.$nextTick(() => {
  3079. this.$refs.testUploadFile.init(currentData)
  3080. })
  3081. },
  3082. /**
  3083. * 文件删除
  3084. * @param row
  3085. */
  3086. deleteFile (row) {
  3087. this.$confirm('确定要删除此文件?', '提示', {
  3088. confirmButtonText: '确定',
  3089. cancelButtonText: '取消',
  3090. type: 'warning'
  3091. }).then(() => {
  3092. deleteTestFile(row).then(({data}) => {
  3093. if (data && data.code === 0) {
  3094. this.getFileContentList()
  3095. this.$message({
  3096. message: '操作成功',
  3097. type: 'success',
  3098. duration: 1500,
  3099. onClose: () => {}
  3100. })
  3101. } else {
  3102. this.$alert(data.msg, '错误', {
  3103. confirmButtonText: '确定'
  3104. })
  3105. }
  3106. })
  3107. }).catch(() => {
  3108. })
  3109. },
  3110. /**
  3111. * 文件下载
  3112. * @param row
  3113. */
  3114. downloadFile (row) {
  3115. downLoadQuotationFile(row).then(({data}) => {
  3116. // 不限制文件下载类型
  3117. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3118. // 下载文件名称
  3119. const fileName = row.fileName
  3120. // a标签下载
  3121. const linkNode = document.createElement('a')
  3122. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3123. linkNode.style.display = 'none'
  3124. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3125. document.body.appendChild(linkNode)
  3126. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3127. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3128. document.body.removeChild(linkNode)
  3129. })
  3130. },
  3131. /**
  3132. * 获取该客户的客户地址
  3133. */
  3134. getCustomerAddressList () {
  3135. let tempData = {
  3136. site: this.$store.state.user.site,
  3137. customerNo: this.modalData.customerNo,
  3138. addressType: 'A'
  3139. }
  3140. customerAddressSearch(tempData).then(({data}) => {
  3141. if (data && data.code === 0) {
  3142. this.addressList = data.rows
  3143. this.addressModelFlag = true
  3144. } else {
  3145. this.addressList = []
  3146. }
  3147. })
  3148. },
  3149. // 双击选择负责人
  3150. getAddressData (row) {
  3151. this.modalData.sendSamplesAddress = row.addressName
  3152. this.addressModelFlag = false
  3153. },
  3154. /**
  3155. * 获取该客户的客户负责人
  3156. */
  3157. getCustomerContactList () {
  3158. let tempData = {
  3159. site: this.$store.state.user.site,
  3160. customerNo: this.modalData.customerNo
  3161. }
  3162. customerContactSearch(tempData).then(({data}) => {
  3163. if (data && data.code === 0) {
  3164. this.contactList = data.rows
  3165. this.contactModelFlag = true
  3166. } else {
  3167. this.contactList = []
  3168. }
  3169. })
  3170. },
  3171. // 双击选择负责人
  3172. getContactData (row) {
  3173. this.modalData.consignee = row.contactName
  3174. this.modalData.consigneeContact = row.contactPhoneNumber1
  3175. this.contactModelFlag = false
  3176. },
  3177. // ======== chooseList相关方法 ========
  3178. /**
  3179. * 获取基础数据列表S
  3180. * @param val
  3181. * @param type
  3182. */
  3183. getBaseList (val, type) {
  3184. this.tagNo = val
  3185. this.tagNo1 = type
  3186. this.$nextTick(() => {
  3187. let strVal = ''
  3188. let conSql = ''
  3189. if (val === 102) {
  3190. if(type === 1) {
  3191. strVal = this.modalData.customerNo
  3192. }
  3193. }
  3194. // if (val === 103) {
  3195. // if(type === 1) {
  3196. // strVal = this.modalData.tracker
  3197. // }
  3198. // if(type === 2) {
  3199. // strVal = this.modalData.engineer
  3200. // }
  3201. // }
  3202. if (val === 104) {
  3203. if(type === 1) {
  3204. strVal = this.modalData.projectId
  3205. }
  3206. }
  3207. if (val === 2041) {
  3208. strVal = this.modalData.trackerName
  3209. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3210. }
  3211. if (val === 2042) {
  3212. strVal = this.modalData.engineerName
  3213. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3214. }
  3215. if (val === 2007) {
  3216. strVal = this.modalData.artworkName
  3217. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3218. }
  3219. if (val === 2008) {
  3220. strVal = this.modalData.plannerName
  3221. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3222. }
  3223. this.$refs.baseList.init(val, strVal, conSql)
  3224. })
  3225. },
  3226. /**
  3227. * 列表方法的回调
  3228. * @param val
  3229. */
  3230. getBaseData (val) {
  3231. if (this.tagNo === 102) {
  3232. if(this.tagNo1 === 1) {
  3233. if (val.Customer_no === this.modalData.customerNo) {
  3234. return
  3235. }
  3236. this.modalData.customerNo = val.Customer_no
  3237. this.modalData.customerDesc = val.Customer_desc
  3238. this.modalData.projectId = ''
  3239. this.modalData.projectName = ''
  3240. this.projectPartList = [];
  3241. }
  3242. }
  3243. // if (this.tagNo === 103) {
  3244. // if(this.tagNo1 === 1) {
  3245. // this.modalData.tracker = val.username
  3246. // this.modalData.trackerName = val.user_display
  3247. // }
  3248. // if(this.tagNo1 === 2) {
  3249. // this.modalData.engineer = val.username
  3250. // this.modalData.engineerName = val.user_display
  3251. // }
  3252. // }
  3253. if (this.tagNo === 104) {
  3254. if(this.tagNo1 === 1) {
  3255. this.modalData.projectId = val.project_id
  3256. this.modalData.projectName = val.project_name
  3257. this.getProjectPartList();
  3258. }
  3259. }
  3260. if (this.tagNo === 2041) {
  3261. this.modalData.tracker = val.username
  3262. this.modalData.trackerName = val.user_display
  3263. }
  3264. if (this.tagNo === 2042) {
  3265. this.modalData.engineer = val.username
  3266. this.modalData.engineerName = val.user_display
  3267. }
  3268. if (this.tagNo === 2007){
  3269. this.modalData.artwork = val.username;
  3270. this.modalData.artworkName = val.user_display;
  3271. }
  3272. if (this.tagNo === 2008){
  3273. this.modalData.planner = val.username;
  3274. this.modalData.plannerName = val.user_display;
  3275. }
  3276. },
  3277. // ======== 导出相关方法 ========
  3278. /**
  3279. * 导出excel
  3280. */
  3281. async createExportData () {
  3282. this.searchData.limit = -1
  3283. this.searchData.page = 1
  3284. await testInformationSearch(this.searchData).then(({data}) => {
  3285. this.resultList = data.page.list
  3286. })
  3287. return this.resultList
  3288. },
  3289. startDownload () {
  3290. },
  3291. finishDownload () {
  3292. },
  3293. fields () {
  3294. let json = '{'
  3295. this.columnList.forEach((item, index) => {
  3296. if (index == this.columnList.length - 1) {
  3297. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3298. } else {
  3299. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3300. }
  3301. })
  3302. json += '}'
  3303. let s = eval('(' + json + ')')
  3304. return s
  3305. },
  3306. closeModalDiaLog () {
  3307. this.$refs.modalForm.resetFields();
  3308. this.modalData = {
  3309. flag: '1',
  3310. title: '测试申请',
  3311. site: this.$store.state.user.site,
  3312. testNo: '',
  3313. customerNo: '',
  3314. customerDesc: '',
  3315. projectId: '',
  3316. doesNeedArtwork:'',
  3317. artwork:'',
  3318. artworkName:'',
  3319. doesNeedPlanner:'',
  3320. planner: '',
  3321. plannerName: '',
  3322. projectName: '',
  3323. tracker: '',
  3324. trackerName: '',
  3325. testPartNo: '',
  3326. partName: '',
  3327. engineer: '',
  3328. engineerName: '',
  3329. printType:'',
  3330. productName:'',
  3331. priorityLevel: '',
  3332. testNumber: 1,
  3333. requiredDeliveryDate: '',
  3334. remark: '',
  3335. technicalConsiderations: '',
  3336. isNeedToSendSamples: '',
  3337. sendSamplesAddress: '',
  3338. consignee: '',
  3339. consigneeContact: '',
  3340. actualityDeliveryDate: '',
  3341. testResultInformation: '',
  3342. actualitySendSamplesDate: '',
  3343. sendSamplesMethod: '',
  3344. deliverGoodsInformation: '',
  3345. deliverGoodsRemark: '',
  3346. actualityReplyDate: '',
  3347. confirmResults: '',
  3348. confirmBy: '',
  3349. confirmInformation: '',
  3350. testStatus: '草稿',
  3351. testResultStatus: 'B',
  3352. nextToDo: '',
  3353. createDate: '',
  3354. createBy: this.$store.state.user.name,
  3355. updateDate: '',
  3356. updateBy: ''
  3357. }
  3358. this.activeTab = 'attribute';
  3359. this.activeTabList = ['attribute']
  3360. this.dialogProperties = [];
  3361. // this.testPropertiesList = this.copyTestPropertiesList;
  3362. this.copyTestPropertiesList = [];
  3363. },
  3364. checkSelectable(row,index){
  3365. if (this.modalData.flag === '1' && this.activeTabList.length === 1){
  3366. return true
  3367. }else {
  3368. return false
  3369. }
  3370. },
  3371. projectClickRow(row){
  3372. this.modalData.projectId = row.projectId
  3373. this.modalData.projectName = row.projectName
  3374. this.getProjectPartList()
  3375. this.chooseProjectListFlag = false
  3376. },
  3377. // 查询searchProjectInfoList
  3378. searchProjectInfoList(){
  3379. this.projectList = [];
  3380. this.searchProjectData.customerId = this.modalData.customerNo
  3381. searchProjectInfoList(this.searchProjectData).then(({data})=>{
  3382. if (data && data.code === 0) {
  3383. this.projectList = data.rows
  3384. } else {
  3385. this.projectList = []
  3386. }
  3387. }).catch((error)=>{
  3388. this.$message.error('查询项目信息失败')
  3389. })
  3390. },
  3391. closeProjectInfoDialog(){
  3392. this.$refs.closeProjectInfoForm.resetFields();
  3393. this.searchProjectData={
  3394. site:this.$store.state.user.site,
  3395. projectId:undefined,
  3396. projectName:undefined,
  3397. customerId:undefined,
  3398. }
  3399. },
  3400. rowStyle({row}){
  3401. if (this.testCurrentRow.testNo === row.testNo) {
  3402. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  3403. }
  3404. },
  3405. selectTestSoBom(){
  3406. let params = {
  3407. testNo:this.modalData.testNo?this.modalData.testNo:this.testCurrentRow.testNo,
  3408. site:this.$store.state.user.site
  3409. }
  3410. selectTestSoBom(params).then(({data})=>{
  3411. if (data && data.code === 0 ){
  3412. this.testSoBomList = data.rows
  3413. }
  3414. })
  3415. },
  3416. selectTestSoRoutingList(){
  3417. let params = {
  3418. site:this.$store.state.user.site,
  3419. testNo:this.modalData.testNo?this.modalData.testNo:this.testCurrentRow.testNo,
  3420. }
  3421. selectTestSoRoutingList(params).then(({data})=>{
  3422. if (data && data.code === 0){
  3423. this.testSoRoutingList = data.rows
  3424. }
  3425. })
  3426. },
  3427. getTestProperties(){
  3428. let params = {
  3429. site:this.$store.state.user.site,
  3430. testNo: this.testCurrentRow.testNo
  3431. }
  3432. getTestPropertiesList(params).then(({data})=>{
  3433. if (data && data.code === 0){
  3434. this.testPropertiesList = data.rows;
  3435. if (this.modalFlag){
  3436. this.copyTestPropertiesList = data.rows;
  3437. }
  3438. }else {
  3439. this.$message.warning(data.msg)
  3440. }
  3441. }).catch((error)=>{
  3442. this.$message.error(error)
  3443. })
  3444. },
  3445. getPartPropertiesList(){
  3446. let params = {
  3447. site:this.$store.state.user.site,
  3448. testPartNo: this.testCurrentRow.testPartNo
  3449. }
  3450. this.dialogProperties = [];
  3451. partPropertiesList(params).then(({data})=>{
  3452. if (data && data.code === 0){
  3453. if (this.modalData.flag !== '1'){
  3454. this.dialogProperties = data.rows
  3455. }
  3456. this.attributeList = data.rows
  3457. }else {
  3458. this.$message.warning(data.msg)
  3459. }
  3460. }).catch((error)=>{
  3461. this.$message.error(error)
  3462. })
  3463. },
  3464. updateModalStatus(row,status){
  3465. this.$confirm(`是否确认下达?`, '提示', {
  3466. confirmButtonText: '确定',
  3467. cancelButtonText: '取消',
  3468. type: 'warning'
  3469. }).then(() => {
  3470. let params = JSON.parse(JSON.stringify(row))
  3471. params.testResultStatus = status
  3472. params.testStatus = '下达'
  3473. params.userName = this.$store.state.user.name
  3474. params.menuId = this.$route.meta.menuId
  3475. testInformationEditStatus(params).then(({data}) => {
  3476. if (data && data.code === 0) {
  3477. this.getDataList()
  3478. this.$message.success('测试单已下达')
  3479. } else {
  3480. this.$alert(data.msg, '错误', {
  3481. confirmButtonText: '确定'
  3482. })
  3483. }
  3484. })
  3485. })
  3486. },
  3487. partClickRow(row){
  3488. this.modalData.testPartNo = row.testPartNo
  3489. this.modalData.partName = row.partDesc
  3490. this.dialogProperties = [];
  3491. let params = {
  3492. site:this.$store.state.user.site,
  3493. testPartNo:this.modalData.testPartNo
  3494. }
  3495. partPropertiesList(params).then(({data})=>{
  3496. if (data && data.code === 0){
  3497. this.dialogProperties = data.rows
  3498. }else {
  3499. this.$message.warning(data.msg)
  3500. }
  3501. }).catch((error)=>{
  3502. this.$message.error(error)
  3503. })
  3504. this.projectPartModelFlag = false
  3505. },
  3506. // 同意提交
  3507. agreeSubmit () {
  3508. this.$confirm(`是否确认提交?`, '提示', {
  3509. confirmButtonText: '确定',
  3510. cancelButtonText: '取消',
  3511. type: 'warning'
  3512. }).then(() => {
  3513. this.modalData.nodeConclusion = 'Y'
  3514. this.submitData()
  3515. })
  3516. },
  3517. // 驳回提交
  3518. rejectSubmit () {
  3519. this.$confirm(`是否确认驳回?`, '提示', {
  3520. confirmButtonText: '确定',
  3521. cancelButtonText: '取消',
  3522. type: 'warning'
  3523. }).then(() => {
  3524. this.modalData.nodeConclusion = 'N'
  3525. this.submitData()
  3526. })
  3527. },
  3528. // 提交
  3529. submitData () {
  3530. if (this.plmTestInformationArr) {
  3531. for (let i = 0; i < this.plmTestInformationArr.length; i++) {
  3532. if (!this.modalData[this.plmTestInformationArr[i].fieldId] && this.plmTestInformationArr[i].required === 'Y') {
  3533. this.$message.warning(this.plmTestInformationArr[i].fieldName + '不能为空!')
  3534. return
  3535. }
  3536. }
  3537. }
  3538. this.modalData.userName = this.$store.state.user.name
  3539. this.modalData.menuId = this.$route.meta.menuId
  3540. submitChange(this.modalData).then(({data}) => {
  3541. if (data && data.code === 0) {
  3542. this.getDataList()
  3543. this.$message({message: '操作成功', type: 'success'})
  3544. this.submitModalFlag = false
  3545. this.modalFlag = false
  3546. } else {
  3547. this.$alert(data.msg, '错误', {
  3548. confirmButtonText: '确定'
  3549. })
  3550. }
  3551. })
  3552. },
  3553. // 获取流程的配置权限
  3554. async getNodeAuthority (row) {
  3555. let tempData = {
  3556. site: row.site,
  3557. stepId: row.stepId,
  3558. menuId: this.$route.meta.menuId
  3559. }
  3560. await getNodeAuthority(tempData).then(({data}) => {
  3561. if (data && data.code === 0) {
  3562. this.plmTestInformationArr = data.rows.plm_test_information
  3563. }
  3564. })
  3565. },
  3566. getPartItem(site,partNo,type) {
  3567. let tempData = {
  3568. site: site,
  3569. partNo: partNo,
  3570. recordType: 'IP'
  3571. }
  3572. getPartItemWithPartNo(tempData).then(({data}) => {
  3573. if (data && data.code === 0) {
  3574. if(type==1){
  3575. this.partItemList1 = data.rows
  3576. }else {
  3577. this.partItemList2 = data.rows
  3578. }
  3579. } else {
  3580. if(type==1){
  3581. this.partItemList1 = []
  3582. }else {
  3583. this.partItemList2 = []
  3584. }
  3585. }
  3586. })
  3587. },
  3588. }
  3589. }
  3590. </script>
  3591. <style scoped lang="scss">
  3592. /deep/ .customer-tab .el-tabs__content {
  3593. padding: 0px !important;
  3594. height: 459px;
  3595. }
  3596. .right /deep/ .el-input__inner{
  3597. text-align: right;
  3598. }
  3599. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3600. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3601. -webkit-appearance: none;
  3602. }
  3603. /deep/ .inlineNumber input[type="number"]{
  3604. -moz-appearance: textfield;
  3605. padding-right: 5px !important;
  3606. }
  3607. /deep/ .el-table .cellClass .cell .el-checkbox__inner{
  3608. display: none;
  3609. position: relative;
  3610. }
  3611. /deep/ .el-table .cellClass .cell:before{
  3612. content: "";
  3613. position: absolute;
  3614. }
  3615. </style>