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.

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