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.

3969 lines
136 KiB

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