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.

3962 lines
135 KiB

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