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.

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