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.

5613 lines
192 KiB

1 year ago
7 months ago
7 months ago
7 months ago
3 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
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
8 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
3 months ago
1 year ago
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
7 months ago
1 year ago
7 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
7 months ago
7 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
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
7 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
8 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
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
9 months ago
9 months ago
1 year ago
1 year ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-card :class="['search-card', { 'collapsed': !searchExpanded }]" shadow="hover">
  5. <div slot="header" class="search-header">
  6. <div class="header-left">
  7. <i class="el-icon-search"></i>
  8. <span class="header-title">Search</span>
  9. </div>
  10. <div class="header-right">
  11. <el-button
  12. type="text"
  13. size="small"
  14. @click="toggleSearchExpand"
  15. class="collapse-btn">
  16. <span>{{ searchExpanded ? '收起' : '展开' }}</span>
  17. <i :class="searchExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
  18. </el-button>
  19. </div>
  20. </div>
  21. <el-form
  22. :inline="true"
  23. label-position="top"
  24. :model="searchData"
  25. class="search-form"
  26. @keyup.enter.native="getDataList">
  27. <!-- 所有查询条件 - 可展开/收起 -->
  28. <template v-if="searchExpanded">
  29. <!-- 第一行基础单据信息 -->
  30. <el-row :gutter="16">
  31. <el-col :span="5">
  32. <el-form-item label="BU">
  33. <el-select v-model="searchData.buNo" placeholder="请选择" clearable>
  34. <el-option
  35. v-for="i in buList"
  36. :key="i.buNo"
  37. :label="i.buDesc"
  38. :value="i.buNo">
  39. </el-option>
  40. </el-select>
  41. </el-form-item>
  42. </el-col>
  43. <el-col :span="5">
  44. <el-form-item label="检验单号">
  45. <el-input v-model="searchData.inspectionNo" placeholder="请输入检验单号" clearable></el-input>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="5">
  49. <el-form-item label="通知单号">
  50. <el-input v-model="searchData.documentNo" placeholder="请输入通知单号" clearable></el-input>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="5">
  54. <el-form-item label="工单号">
  55. <el-input v-model="searchData.orderNo" placeholder="请输入工单号" clearable></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="4">
  59. <el-form-item label="派工单号">
  60. <el-input v-model="searchData.seqNo" placeholder="请输入派工单号" clearable></el-input>
  61. </el-form-item>
  62. </el-col>
  63. </el-row>
  64. <!-- 第二行物料信息 -->
  65. <el-row :gutter="16">
  66. <el-col :span="5">
  67. <el-form-item label="物料编码">
  68. <el-input v-model="searchData.partNo" placeholder="请输入物料编码" clearable></el-input>
  69. </el-form-item>
  70. </el-col>
  71. <el-col :span="5">
  72. <el-form-item label="物料名称">
  73. <el-input v-model="searchData.partDesc" placeholder="请输入物料名称" clearable></el-input>
  74. </el-form-item>
  75. </el-col>
  76. <el-col :span="5">
  77. <el-form-item label="规格型号">
  78. <el-input v-model="searchData.spec" placeholder="请输入规格型号" clearable></el-input>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :span="5">
  82. <el-form-item label="工序">
  83. <el-select v-model="searchData.operationDesc" clearable filterable placeholder="请选择工序">
  84. <el-option v-for="item in operationDescList" :key="item" :label="item" :value="item"></el-option>
  85. </el-select>
  86. </el-form-item>
  87. </el-col>
  88. </el-row>
  89. <!-- 第三行检验相关信息 -->
  90. <el-row :gutter="16">
  91. <el-col :span="5">
  92. <el-form-item label="检验结论">
  93. <el-select v-model="searchData.inspectionResult" clearable placeholder="请选择检验结论">
  94. <el-option label="合格" value="合格">
  95. <i class="el-icon-success" style="color: #67C23A;"></i> 合格
  96. </el-option>
  97. <el-option label="不合格" value="不合格">
  98. <i class="el-icon-error" style="color: #F56C6C;"></i> 不合格
  99. </el-option>
  100. </el-select>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="5">
  104. <el-form-item label="处置措施">
  105. <el-select v-model="searchData.disposalMeasures" clearable placeholder="请选择处置措施">
  106. <el-option
  107. v-for="i in disposalMeasuresOptions"
  108. :key="i.id"
  109. :label="i.disposalMeasures"
  110. :value="i.disposalMeasures">
  111. </el-option>
  112. </el-select>
  113. </el-form-item>
  114. </el-col>
  115. <el-col :span="5">
  116. <el-form-item label="状态">
  117. <el-select v-model="searchData.states" multiple collapse-tags placeholder="请选择状态" class="status-select">
  118. <el-option label="未开始" value="未开始"></el-option>
  119. <el-option label="待检验" value="待检验"></el-option>
  120. <el-option label="待审核" value="待审核"></el-option>
  121. <el-option label="已完成" value="已完成"></el-option>
  122. </el-select>
  123. </el-form-item>
  124. </el-col>
  125. <el-col :span="5">
  126. <el-form-item label="质检员">
  127. <el-input v-model="searchData.inspectorName" placeholder="请输入质检员姓名" clearable></el-input>
  128. </el-form-item>
  129. </el-col>
  130. </el-row>
  131. <!-- 第四行日期信息 -->
  132. <el-row :gutter="16">
  133. <el-col :span="7">
  134. <el-form-item label="送检日期">
  135. <el-date-picker
  136. v-model="searchData.startDate2"
  137. type="datetime"
  138. value-format='yyyy-MM-dd HH:mm:ss'
  139. format='yyyy-MM-dd HH:mm:ss'
  140. placeholder="开始日期"
  141. style="width: 44%">
  142. </el-date-picker>
  143. <span style="margin: 0 6px; color: #DCDFE6;">~</span>
  144. <el-date-picker
  145. v-model="searchData.endDate2"
  146. type="datetime"
  147. value-format='yyyy-MM-dd HH:mm:ss'
  148. format='yyyy-MM-dd HH:mm:ss'
  149. placeholder="结束日期"
  150. style="width: 44%">
  151. </el-date-picker>
  152. </el-form-item>
  153. </el-col>
  154. <el-col :span="8">
  155. <el-form-item label="检验时间">
  156. <el-date-picker
  157. v-model="searchData.startDate"
  158. type="datetime"
  159. value-format='yyyy-MM-dd HH:mm:ss'
  160. format='yyyy-MM-dd HH:mm:ss'
  161. placeholder="开始日期"
  162. style="width: 44%">
  163. </el-date-picker>
  164. <span style="margin: 0 6px; color: #DCDFE6;">~</span>
  165. <el-date-picker
  166. v-model="searchData.endDate"
  167. type="datetime"
  168. value-format='yyyy-MM-dd HH:mm:ss'
  169. format='yyyy-MM-dd HH:mm:ss'
  170. placeholder="结束日期"
  171. style="width: 44%">
  172. </el-date-picker>
  173. </el-form-item>
  174. </el-col>
  175. </el-row>
  176. </template>
  177. <!-- 操作按钮区域 -->
  178. <el-row :gutter="16">
  179. <el-col :span="24">
  180. <div class="search-actions">
  181. <div class="action-left">
  182. <el-button
  183. v-if="!authSearch"
  184. type="primary"
  185. icon="el-icon-search"
  186. :loading="searchLoading"
  187. @click="getDataList">
  188. 查询
  189. </el-button>
  190. <el-button
  191. icon="el-icon-refresh"
  192. @click="resetSearch">
  193. 重置
  194. </el-button>
  195. </div>
  196. <div class="action-right">
  197. <el-button
  198. v-if="!authSave"
  199. type="success"
  200. icon="el-icon-plus"
  201. @click="addModal">
  202. 新增
  203. </el-button>
  204. <el-button
  205. v-if="!authCheck"
  206. type="success"
  207. icon="el-icon-check"
  208. @click="submitResult">
  209. 审核
  210. </el-button>
  211. <el-button
  212. v-if="!authCancelCheck"
  213. type="warning"
  214. icon="el-icon-close"
  215. @click="cancelApproval">
  216. 取消审核
  217. </el-button>
  218. <el-button
  219. v-if="!authDelete"
  220. type="danger"
  221. icon="el-icon-delete"
  222. @click="deleteModal">
  223. 删除
  224. </el-button>
  225. <el-button
  226. icon="el-icon-printer"
  227. @click="printList">
  228. 打印
  229. </el-button>
  230. <download-excel
  231. :fields="exportFields"
  232. :fetch="createExportData"
  233. :before-generate="startDownload"
  234. :before-finish="finishDownload"
  235. type="xls"
  236. :name="exportName"
  237. worksheet="导出信息"
  238. class="el-button el-button--medium">
  239. <i class="el-icon-download"></i>
  240. 导出
  241. </download-excel>
  242. </div>
  243. </div>
  244. </el-col>
  245. </el-row>
  246. </el-form>
  247. </el-card>
  248. <!-- 检验记录展示列表 -->
  249. <el-table
  250. :height="height"
  251. :data="dataList"
  252. border
  253. ref="FAITable"
  254. highlight-current-row
  255. @row-click="FAIClickRow"
  256. @selection-change="selectionFAI"
  257. style="width: 100%;">
  258. <el-table-column
  259. type="selection"
  260. header-align="center"
  261. align="center"
  262. :selectable="selectFlag"
  263. width="50">
  264. </el-table-column>
  265. <el-table-column
  266. prop="state"
  267. header-align="center"
  268. align="center"
  269. label="状态">
  270. <template slot-scope="scope">
  271. <div :style="{fontWeight:'bold', color: scope.row.state === '待检验' ? 'red' : scope.row.state === '待审核' ? '#ffa500e0' : scope.row.state === '已完成' ? '#3ac252' : ''}">
  272. {{scope.row.state}}
  273. </div>
  274. </template>
  275. </el-table-column>
  276. <el-table-column
  277. v-for="(item,index) in columnList1" :key="index"
  278. :sortable="item.columnSortable"
  279. :prop="item.columnProp"
  280. :header-align="item.headerAlign"
  281. :show-overflow-tooltip="item.showOverflowTooltip"
  282. :align="item.align"
  283. :fixed="item.fixed === '' ? false : item.fixed"
  284. :min-width="item.columnWidth"
  285. :label="item.columnLabel">
  286. <template slot-scope="scope">
  287. <span v-if="!item.columnHidden">{{ formatMainListCellValue(scope.row, item) }}</span>
  288. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  289. </template>
  290. </el-table-column>
  291. <el-table-column
  292. fixed="right"
  293. header-align="center"
  294. align="center"
  295. width="180"
  296. label="操作">
  297. <template slot-scope="scope">
  298. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  299. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  300. <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
  301. <el-link style="cursor: pointer" v-if="!authExceptionModify && scope.row.state === '已完成'" @click="abnormalModifyModal(scope.row)">异常修改</el-link>
  302. </template>
  303. </el-table-column>
  304. </el-table>
  305. <!-- 分页-->
  306. <el-pagination
  307. style="margin-top: 0px"
  308. @size-change="sizeChangeHandle"
  309. @current-change="currentChangeHandle"
  310. :current-page="pageIndex"
  311. :page-sizes="[20, 50, 100, 200, 500]"
  312. :page-size="pageSize"
  313. :total="totalPage"
  314. layout="total, sizes, prev, pager, next, jumper">
  315. </el-pagination>
  316. <!-- 新增检验记录 -->
  317. <el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
  318. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  319. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  320. <el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">
  321. <el-option
  322. v-for = "i in userBuList"
  323. :key = "i.buNo"
  324. :label = "i.sitename"
  325. :value = "i.buNo">
  326. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  327. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  328. {{ i.buDesc }}
  329. </span>
  330. </el-option>
  331. </el-select>
  332. </el-form-item>
  333. <el-form-item label="标签号">
  334. <el-input v-if="this.modalData.specialTaskFlag === 'Y'" disabled v-model="modalData.rollNo" style="width: 221px"></el-input>
  335. <el-input v-else v-model="modalData.rollNo" @keyup.native.enter="rollNoEnter" clearable style="width: 221px"></el-input>
  336. </el-form-item>
  337. </el-form>
  338. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  339. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && (this.modalData.rollNo === '' || this.modalData.rollNo == null)" prop="orderNo" :rules="rules.seqNoType">
  340. <span style="cursor: pointer" slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span>
  341. <el-input v-model="modalData.seqNo" style="width: 221px"></el-input>
  342. </el-form-item>
  343. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && this.modalData.rollNo !== '' && this.modalData.rollNo != null" prop="orderNo" :rules="rules.seqNoType">
  344. <span slot="label">派工单号</span>
  345. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  346. </el-form-item>
  347. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType">
  348. <span slot="label">派工单号</span>
  349. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  350. </el-form-item>
  351. <el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
  352. <el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input>
  353. </el-form-item>
  354. </el-form>
  355. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  356. <el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
  357. <el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px">
  358. <el-option
  359. v-for = "i in operationList"
  360. :key = "i.operationNo"
  361. :label = "i.operationDesc"
  362. :value = "i.operationDesc">
  363. </el-option>
  364. </el-select>
  365. </el-form-item>
  366. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'">
  367. <span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
  368. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  369. </el-form-item>
  370. <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">
  371. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  372. </el-form-item>
  373. </el-form>
  374. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  375. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData">
  376. <span style="cursor: pointer" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  377. <el-input v-model="modalData.partNo" style="width: 221px"></el-input>
  378. </el-form-item>
  379. <el-form-item v-else label="物料编码" prop="partNo" :rules="rules.partNoType">
  380. <el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
  381. </el-form-item>
  382. <el-form-item label="物料名称">
  383. <el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input>
  384. </el-form-item>
  385. </el-form>
  386. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  387. <el-form-item label="物料类别">
  388. <el-input v-model="modalData.invdefinetype" readonly style="width: 221px"></el-input>
  389. </el-form-item>
  390. <el-form-item label="SKU">
  391. <el-input v-model="modalData.sku" readonly style="width: 221px"></el-input>
  392. </el-form-item>
  393. </el-form>
  394. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  395. <el-form-item prop="templateId" :rules="rules.templateId">
  396. <span style="cursor: pointer" v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList"><a>检验模板</a></span>
  397. <span v-else slot="label">检验模板</span>
  398. <el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input>
  399. </el-form-item>
  400. <el-form-item label="送检数量:" prop="rollQty" :rules="rules.rollQtyType">
  401. <el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
  402. </el-form-item>
  403. <el-form-item label="单位" prop="umId" :rules="rules.umIdType">
  404. <el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
  405. <el-option
  406. v-for = "i in umList"
  407. :key = "i.umId"
  408. :label = "i.umName"
  409. :value = "i.umId">
  410. </el-option>
  411. </el-select>
  412. </el-form-item>
  413. </el-form>
  414. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  415. <el-form-item label="老卷号">
  416. <el-input v-model="modalData.batchRollNo" style="width: 221px"></el-input>
  417. </el-form-item>
  418. <el-form-item label="送检总数">
  419. <el-input v-model="modalData.sjzs" disabled style="width: 120px"></el-input>
  420. </el-form-item>
  421. <el-form-item label=" ">
  422. <input type="checkbox" id="specialTask" name="specialTask" v-model="checked" @click="changeSpecialTask"/> <label for="specialTask">无工单检验</label>
  423. </el-form-item>
  424. </el-form>
  425. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  426. <el-form-item label="特殊要求">
  427. <el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  428. </el-form-item>
  429. </el-form>
  430. <el-footer style="height:40px;margin-top: 55px;text-align:center">
  431. <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
  432. <el-button @click="modalFlag = false">关闭</el-button>
  433. </el-footer>
  434. </el-dialog>
  435. <!-- 检验单详情页 -->
  436. <el-dialog
  437. :title="'检验明细清单-' + (detailData.inspectionNo || '')"
  438. :close-on-click-modal="false"
  439. v-drag
  440. :visible.sync="detailInformationFlag"
  441. @close="closeDetailDialog"
  442. width="1200px"
  443. top="2vh"
  444. custom-class="fqc-inspection-dialog">
  445. <!-- 单据信息卡片 -->
  446. <div class="inspection-info-card">
  447. <div class="info-section">
  448. <div class="section-title">
  449. <i class="el-icon-document"></i>
  450. <span>检验单信息</span>
  451. </div>
  452. <!-- 第一行物料信息 + 人员信息 -->
  453. <el-row :gutter="12" class="info-row">
  454. <el-col :span="3">
  455. <div class="info-item">
  456. <label>物料编码</label>
  457. <el-input v-model="detailData.partNo" disabled size="small"></el-input>
  458. </div>
  459. </el-col>
  460. <el-col :span="3">
  461. <div class="info-item">
  462. <label>物料类别</label>
  463. <el-input v-model="detailData.invdefinetype" readonly size="small"></el-input>
  464. </div>
  465. </el-col>
  466. <el-col :span="6">
  467. <div class="info-item">
  468. <label>物料名称</label>
  469. <el-input v-model="detailData.partDesc" disabled size="small"></el-input>
  470. </div>
  471. </el-col>
  472. <el-col :span="3">
  473. <div class="info-item">
  474. <label>规格型号</label>
  475. <el-input v-model="detailData.spec" disabled size="small"></el-input>
  476. </div>
  477. </el-col>
  478. <el-col :span="2">
  479. <div class="info-item">
  480. <label>单位</label>
  481. <el-input v-model="detailData.umName" disabled size="small"></el-input>
  482. </div>
  483. </el-col>
  484. <el-col :span="3">
  485. <div class="info-item">
  486. <label>
  487. <span v-if="isDetailReadonly">协同人员</span>
  488. <a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a>
  489. </label>
  490. <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
  491. </div>
  492. </el-col>
  493. <el-col :span="4">
  494. <div class="info-item">
  495. <label>
  496. <span v-if="isDetailReadonly">责任人</span>
  497. <a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a>
  498. </label>
  499. <el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input>
  500. </div>
  501. </el-col>
  502. </el-row>
  503. <!-- 第二行数量信息 -->
  504. <el-row :gutter="12" class="info-row" style="margin-top: 12px">
  505. <el-col :span="4">
  506. <div class="info-item">
  507. <label>送检数量</label>
  508. <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" size="small" style="width: 100%"></el-input-number>
  509. </div>
  510. </el-col>
  511. <el-col :span="4">
  512. <div class="info-item">
  513. <label>抽样数量</label>
  514. <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" size="small" style="width: 100%"></el-input-number>
  515. </div>
  516. </el-col>
  517. <el-col :span="4">
  518. <div class="info-item">
  519. <label>合格数量</label>
  520. <el-input-number :controls="false" :step="0" min="0" v-if="isDetailReadonly" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
  521. <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
  522. </div>
  523. </el-col>
  524. <el-col :span="4">
  525. <div class="info-item">
  526. <label>不合格数量</label>
  527. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.notPassQty" disabled size="small" style="width: 100%"></el-input-number>
  528. </div>
  529. </el-col>
  530. <el-col :span="4">
  531. <div class="info-item">
  532. <label>不合格项目数量</label>
  533. <el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
  534. <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
  535. </div>
  536. </el-col>
  537. <el-col :span="4">
  538. <div class="info-item">
  539. <label>批次合格数</label>
  540. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.batchQualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
  541. </div>
  542. </el-col>
  543. </el-row>
  544. </div>
  545. <div class="info-section" style="margin-top: 10px">
  546. <div class="section-title">
  547. <i class="el-icon-finished"></i>
  548. <span>检验结论</span>
  549. </div>
  550. <el-row :gutter="12" class="info-row">
  551. <el-col :span="3">
  552. <div class="info-item">
  553. <label>检验结论</label>
  554. <el-select v-if="isInspectionResultReadonly" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
  555. <el-option label="合格" value="合格"></el-option>
  556. <el-option label="不合格" value="不合格"></el-option>
  557. </el-select>
  558. <el-select v-else v-model="detailData.inspectionResult" size="small" placeholder="请选择" style="width: 100%">
  559. <el-option label="合格" value="合格"></el-option>
  560. <el-option label="不合格" value="不合格"></el-option>
  561. </el-select>
  562. </div>
  563. </el-col>
  564. <el-col :span="7">
  565. <div class="info-item">
  566. <label>质检备注</label>
  567. <el-input v-if="isDetailReadonly" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
  568. <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
  569. </div>
  570. </el-col>
  571. <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
  572. <div class="info-item">
  573. <label>处置措施</label>
  574. <el-select v-if="isDetailReadonly" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
  575. <el-option
  576. v-for = "i in disposalMeasuresOptions"
  577. :key = "i.id"
  578. :label = "i.disposalMeasures"
  579. :value = "i.disposalMeasures">
  580. </el-option>
  581. </el-select>
  582. <el-select v-else clearable v-model="detailData.disposalMeasures" size="small" style="width: 100%">
  583. <el-option
  584. v-for = "i in disposalMeasuresOptions"
  585. :key = "i.id"
  586. :label = "i.disposalMeasures"
  587. :value = "i.disposalMeasures">
  588. </el-option>
  589. </el-select>
  590. </div>
  591. </el-col>
  592. <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
  593. <div class="info-item">
  594. <label>处置说明</label>
  595. <el-input v-if="isDetailReadonly" v-model="detailData.disposalRemark" disabled size="small"></el-input>
  596. <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
  597. </div>
  598. </el-col>
  599. </el-row>
  600. </div>
  601. <!-- 操作按钮区域 -->
  602. <div class="action-buttons">
  603. <div class="left-actions">
  604. <el-button v-if="!isDetailReadonly" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
  605. 数据采集
  606. </el-button>
  607. <el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
  608. 文件清单
  609. </el-button>
  610. <el-button type="warning" size="small" @click="subDetailUpload" icon="el-icon-upload2">
  611. 子明细导入
  612. </el-button>
  613. </div>
  614. <div class="right-actions">
  615. <el-button type="success" size="small" @click="openItemOperationDialog" icon="el-icon-setting">
  616. 项目导入
  617. </el-button>
  618. <el-button type="primary" size="small" @click="openTemplateImportDialog" icon="el-icon-download">
  619. 模板导入
  620. </el-button>
  621. </div>
  622. </div>
  623. </div>
  624. <!-- 检验项目列表 -->
  625. <div class="inspection-table-wrapper">
  626. <div class="table-header">
  627. <span class="table-title">
  628. <i class="el-icon-tickets"></i>
  629. 检验内容
  630. </span>
  631. </div>
  632. <el-table
  633. :height="435"
  634. :data="detailList"
  635. border
  636. stripe
  637. style="width: 100%;"
  638. highlight-current-row
  639. class="inspection-table">
  640. <el-table-column
  641. prop=""
  642. header-align="center"
  643. align="center"
  644. width="110"
  645. label="操作">
  646. <template slot-scope="scope">
  647. <el-button icon="el-icon-picture" :type="scope.row.detailImageNum > 0 ? 'success' : 'primary'" size="mini" @click="uploadImageModal(scope.row)" title="上传图片"></el-button>
  648. <el-button icon="el-icon-edit-outline" type="primary" size="mini" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)" title="数据采集"></el-button>
  649. <!-- <el-button style="margin-left: 2px" icon="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button>-->
  650. </template>
  651. </el-table-column>
  652. <el-table-column
  653. v-for="(item,index) in detailColumnList" :key="index"
  654. :sortable="item.columnSortable"
  655. :prop="item.columnProp"
  656. :header-align="item.headerAlign"
  657. :show-overflow-tooltip="item.showOverflowTooltip"
  658. :align="item.align"
  659. :fixed="item.fixed === ''?false:item.fixed"
  660. :min-width="item.columnWidth"
  661. :label="item.columnLabel">
  662. <template slot-scope="scope">
  663. <!-- 标准值上限值下限值可编辑 -->
  664. <template v-if="item.columnProp === 'defaultValue' || item.columnProp === 'minValue' || item.columnProp === 'maxValue'">
  665. <el-input v-model="scope.row[item.columnProp]" style="height: 11px; width: 98%"></el-input>
  666. </template>
  667. <template v-else>
  668. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  669. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  670. </template>
  671. </template>
  672. </el-table-column>
  673. <el-table-column
  674. prop=""
  675. header-align="center"
  676. align="right"
  677. min-width="80"
  678. label="实测值">
  679. <template slot-scope="scope">
  680. <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" @change="updateItemResult(scope.row)" style="height: 11px; width: 98%"></el-input>
  681. <el-input :ref="`textValue${scope.$index}`" v-else v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px; width: 98%"></el-input>
  682. </template>
  683. </el-table-column>
  684. <el-table-column
  685. prop=""
  686. header-align="center"
  687. align="center"
  688. min-width="80"
  689. label="检验明细">
  690. <template slot-scope="scope">
  691. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button>
  692. <el-button v-else type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button>
  693. </template>
  694. </el-table-column>
  695. <el-table-column
  696. prop=""
  697. header-align="center"
  698. align="right"
  699. min-width="80"
  700. label="抽样数量">
  701. <template slot-scope="scope">
  702. <el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
  703. <el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number>
  704. </template>
  705. </el-table-column>
  706. <el-table-column
  707. prop=""
  708. header-align="center"
  709. align="right"
  710. min-width="80"
  711. label="不合格数量">
  712. <template slot-scope="scope">
  713. <el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
  714. <el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
  715. </template>
  716. </el-table-column>
  717. <el-table-column
  718. prop=""
  719. header-align="center"
  720. align="right"
  721. min-width="75"
  722. label="项目检验结论">
  723. <template slot-scope="scope">
  724. <el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="isItemResultReadonly" v-model="scope.row.itemResult" disabled style="height: 11px" >
  725. <el-option label="合格" value="Y" style="color: green"></el-option>
  726. <el-option label="不合格" value="N" style="color: red"></el-option>
  727. </el-select>
  728. <el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-else v-model="scope.row.itemResult" style="height: 11px" placeholder="合格">
  729. <el-option label="合格" value="Y" style="color: green"></el-option>
  730. <el-option label="不合格" value="N" style="color: red"></el-option>
  731. </el-select>
  732. </template>
  733. </el-table-column>
  734. </el-table>
  735. </div>
  736. <!-- 底部操作按钮 -->
  737. <div class="dialog-footer">
  738. <el-button v-if="detailData.state === '待检验' && !exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
  739. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核' || exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
  740. <el-button @click="detailInformationFlag=false">关闭</el-button>
  741. </div>
  742. </el-dialog>
  743. <!-- 子明细信息 -->
  744. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="1102px">
  745. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  746. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  747. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  748. <div class="rq ">
  749. <el-table
  750. :height="400"
  751. :data="templateTableData"
  752. border
  753. v-loading="subDetailLoading"
  754. element-loading-text="拼命加载中"
  755. :row-class-name="rowClassName"
  756. @selection-change="handleDetailSelectionChange"
  757. style="width: 100%;">
  758. <el-table-column type="selection" align="center" width="40"></el-table-column>
  759. <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
  760. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
  761. <template slot-scope="{row}">
  762. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  763. <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
  764. </template>
  765. </el-table-column>
  766. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
  767. <template slot-scope="{row}">
  768. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  769. <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
  770. </template>
  771. </el-table-column>
  772. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
  773. <template slot-scope="{row}">
  774. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
  775. <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
  776. </template>
  777. </el-table-column>
  778. <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
  779. <template slot-scope="{row}">
  780. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
  781. <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
  782. </template>
  783. </el-table-column>
  784. <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
  785. <template slot-scope="{row}">
  786. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
  787. <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
  788. </template>
  789. </el-table-column>
  790. <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
  791. <template slot-scope="{row}">
  792. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
  793. <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
  794. </template>
  795. </el-table-column>
  796. <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
  797. <template slot-scope="{row}">
  798. <el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
  799. <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
  800. </template>
  801. </el-table-column>
  802. </el-table>
  803. <!-- 分页-->
  804. <el-pagination
  805. @size-change="sizeChangeHandle2"
  806. @current-change="currentChangeHandle2"
  807. :current-page="pageIndex2"
  808. :page-sizes="[20, 50, 100, 200, 500]"
  809. :page-size="pageSize2"
  810. :total="tableData.length"
  811. layout="total, sizes, prev, pager, next, jumper">
  812. </el-pagination>
  813. </div>
  814. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  815. <el-button v-if="!isDetailReadonly" type="primary" @click="saveSubDetailResult">保存</el-button>
  816. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  817. </el-footer>
  818. </el-dialog>
  819. <!-- 批量新增子明细操作-->
  820. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  821. <el-form :inline="true" label-position="top">
  822. <el-form-item :label="'默认抽样位置A'">
  823. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  824. </el-form-item>
  825. <el-form-item :label="'默认抽样位置B'">
  826. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  827. </el-form-item>
  828. <el-form-item :label="'抽样数量'">
  829. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  830. </el-form-item>
  831. </el-form>
  832. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  833. <el-button type="primary" @click="batchHandleAddModal">保存</el-button>
  834. <el-button type="primary" @click="batchHandleAddModalFlag=false">关闭</el-button>
  835. </el-footer>
  836. </el-dialog>
  837. <!-- 检验模板 -->
  838. <el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px">
  839. <div class="rq">
  840. <el-form :inline="true" label-position="top" :model="templateData">
  841. <el-form-item :label="'模板编码'">
  842. <el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
  843. </el-form-item>
  844. <el-form-item :label="'模板名称'">
  845. <el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
  846. </el-form-item>
  847. <el-form-item :label="' '">
  848. <el-button type="primary" @click="queryTemplateList">查询</el-button>
  849. </el-form-item>
  850. </el-form>
  851. <el-table
  852. :height="300"
  853. :data="templateList"
  854. @row-dblclick="getRowData"
  855. border
  856. style="width: 100%;">
  857. <el-table-column
  858. v-for="(item,index) in templateDetailList" :key="index"
  859. :sortable="item.columnSortable"
  860. :prop="item.columnProp"
  861. :header-align="item.headerAlign"
  862. :show-overflow-tooltip="item.showOverflowTooltip"
  863. :align="item.align"
  864. :fixed="item.fixed==''?false:item.fixed"
  865. :min-width="item.columnWidth"
  866. :label="item.columnLabel">
  867. <template slot-scope="scope">
  868. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  869. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  870. </template>
  871. </el-table-column>
  872. </el-table>
  873. </div>
  874. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  875. <el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
  876. </el-footer>
  877. </el-dialog>
  878. <!-- 物料 -->
  879. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="520px">
  880. <div class="rq">
  881. <el-form :inline="true" label-position="top" :model="partData">
  882. <el-form-item :label="'物料编码'">
  883. <el-input v-model="partData.partNo" clearable style="width: 115px"></el-input>
  884. </el-form-item>
  885. <el-form-item :label="'物料名称'">
  886. <el-input v-model="partData.partDesc" clearable style="width: 115px"></el-input>
  887. </el-form-item>
  888. <el-form-item :label="'SKU'">
  889. <el-input v-model="partData.sku" clearable style="width: 79px"></el-input>
  890. </el-form-item>
  891. <el-form-item :label="'PN'">
  892. <el-input v-model="partData.cinvSourceCode" clearable style="width: 79px"></el-input>
  893. </el-form-item>
  894. <el-form-item :label="' '">
  895. <el-button type="primary" @click="queryPartList">查询</el-button>
  896. </el-form-item>
  897. </el-form>
  898. <el-table
  899. :height="300"
  900. :data="partList"
  901. @row-dblclick="getRowData2"
  902. border
  903. style="width: 100%;">
  904. <el-table-column
  905. v-for="(item,index) in partDetailList" :key="index"
  906. :sortable="item.columnSortable"
  907. :prop="item.columnProp"
  908. :header-align="item.headerAlign"
  909. :show-overflow-tooltip="item.showOverflowTooltip"
  910. :align="item.align"
  911. :fixed="item.fixed==''?false:item.fixed"
  912. :min-width="item.columnWidth"
  913. :label="item.columnLabel">
  914. <template slot-scope="scope">
  915. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  916. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  917. </template>
  918. </el-table-column>
  919. </el-table>
  920. </div>
  921. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  922. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  923. </el-footer>
  924. </el-dialog>
  925. <!-- 文件清单 -->
  926. <el-dialog :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="900px">
  927. <span slot="title" class="file-dialog-title">
  928. <span>文件清单</span>
  929. <a class="file-dialog-link" href="#" @click.prevent="openFileExternalLink">外部链接</a>
  930. </span>
  931. <el-tabs v-model="fileActiveTab" type="border-card">
  932. <el-tab-pane label="QC检验文件" name="qcFile">
  933. <el-form :inline="true" label-position="top" style="margin-bottom: 10px;">
  934. <el-form-item v-if="detailInformationFlag">
  935. <el-button type="primary" size="small" @click="addUploadFileModal">上传文件</el-button>
  936. </el-form-item>
  937. </el-form>
  938. <iqc-file-table :columns="fileColumnList" :data-list="fileContentList" :query-loading="fileLoading" @refreshFileList="getFileContentData(currentFileRow)"></iqc-file-table>
  939. </el-tab-pane>
  940. <el-tab-pane label="SOP文件" name="sopFile">
  941. <el-table :data="sopFileList" border v-loading="sopFileLoading" height="350" style="width: 100%;">
  942. <el-table-column prop="sopName" header-align="center" align="left" label="文件名称" min-width="200" show-overflow-tooltip></el-table-column>
  943. <el-table-column prop="fileType" header-align="center" align="center" label="文件类型" width="100"></el-table-column>
  944. <el-table-column prop="version" header-align="center" align="center" label="版本号" width="80"></el-table-column>
  945. <el-table-column prop="createdBy" header-align="center" align="center" label="上传人" width="100"></el-table-column>
  946. <el-table-column prop="creationDate" header-align="center" align="center" label="上传时间" width="150"></el-table-column>
  947. <el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
  948. <template slot-scope="scope">
  949. <el-link type="primary" @click="previewSopFile(scope.row)">预览</el-link>
  950. </template>
  951. </el-table-column>
  952. </el-table>
  953. </el-tab-pane>
  954. </el-tabs>
  955. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  956. <el-button type="primary" @click="fileFlag = false">关闭</el-button>
  957. </el-footer>
  958. </el-dialog>
  959. <!-- 派工单号 -->
  960. <el-dialog title="派工单号" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="seqDetailFlag" width="952px" height="273px">
  961. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  962. <el-form-item label="工单号">
  963. <el-input v-model="seqDetailData.orderNo" clearable style="width: 150px"></el-input>
  964. </el-form-item>
  965. <el-form-item label="派工单号">
  966. <el-input v-model="seqDetailData.seqNo" clearable style="width: 150px"></el-input>
  967. </el-form-item>
  968. <el-form-item label="SKU">
  969. <el-input v-model="seqDetailData.sku" clearable style="width: 150px"></el-input>
  970. </el-form-item>
  971. <el-form-item label="状态">
  972. <el-select v-model="seqDetailData.status" style="width: 100px" placeholder="请选择">
  973. <el-option label="下达" value="下达"></el-option>
  974. <el-option label="关闭" value="关闭"></el-option>
  975. </el-select>
  976. </el-form-item>
  977. </el-form>
  978. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  979. <el-form-item label="物料编码">
  980. <el-input v-model="seqDetailData.partNo" clearable style="width: 150px"></el-input>
  981. </el-form-item>
  982. <el-form-item label="物料名称">
  983. <el-input v-model="seqDetailData.partDesc" clearable style="width: 315px"></el-input>
  984. </el-form-item>
  985. <el-form-item label="工序">
  986. <el-input v-model="seqDetailData.operationDesc" clearable style="width: 150px"></el-input>
  987. </el-form-item>
  988. <el-form-item>
  989. <el-button type="primary" @click="searchSeqInfo" style="margin-top: 24px">查询</el-button>
  990. </el-form-item>
  991. </el-form>
  992. <el-table
  993. :height="400"
  994. :data="seqInfoList"
  995. @row-dblclick="getRowData1"
  996. border
  997. style="width: 100%;">
  998. <el-table-column
  999. v-for="(item,index) in seqDetailColumnList" :key="index"
  1000. :sortable="item.columnSortable"
  1001. :prop="item.columnProp"
  1002. :header-align="item.headerAlign"
  1003. :show-overflow-tooltip="item.showOverflowTooltip"
  1004. :align="item.align"
  1005. :fixed="item.fixed==''?false:item.fixed"
  1006. :min-width="item.columnWidth"
  1007. :label="item.columnLabel">
  1008. </el-table-column>
  1009. </el-table>
  1010. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  1011. <el-button type="primary" @click="seqDetailFlag = false">关闭</el-button>
  1012. </el-footer>
  1013. </el-dialog>
  1014. <!-- 机修人员清单 -->
  1015. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  1016. <div class="rq">
  1017. <el-form :inline="true" label-position="top" :model="operatorData">
  1018. <el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
  1019. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
  1020. <el-option
  1021. v-for = "i in roleList"
  1022. :key = "i.roleId"
  1023. :label = "i.roleName"
  1024. :value = "i.roleId">
  1025. </el-option>
  1026. </el-select>
  1027. </el-form-item>
  1028. <el-form-item :label="'用户编码'">
  1029. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  1030. </el-form-item>
  1031. <el-form-item :label="'用户姓名'">
  1032. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  1033. </el-form-item>
  1034. <el-form-item :label="' '">
  1035. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  1036. </el-form-item>
  1037. </el-form>
  1038. <el-table
  1039. :height="300"
  1040. :data="operatorList"
  1041. ref="operatorTable"
  1042. @row-click="operatorClickRow"
  1043. @selection-change="selectionChangeHandle2"
  1044. border
  1045. style="width: 100%;">
  1046. <el-table-column
  1047. type="selection"
  1048. header-align="center"
  1049. align="center"
  1050. width="50">
  1051. </el-table-column>
  1052. <el-table-column
  1053. v-for="(item,index) in operatorDetailList" :key="index"
  1054. :sortable="item.columnSortable"
  1055. :prop="item.columnProp"
  1056. :header-align="item.headerAlign"
  1057. :show-overflow-tooltip="item.showOverflowTooltip"
  1058. :align="item.align"
  1059. :fixed="item.fixed==''?false:item.fixed"
  1060. :min-width="item.columnWidth"
  1061. :label="item.columnLabel">
  1062. <template slot-scope="scope">
  1063. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1064. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1065. </template>
  1066. </el-table-column>
  1067. </el-table>
  1068. </div>
  1069. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1070. <el-button type="primary" @click="confirmOperator">确认</el-button>
  1071. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  1072. </el-footer>
  1073. </el-dialog>
  1074. <!-- 配置项目设备 -->
  1075. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
  1076. <div class="rq">
  1077. <el-table
  1078. :height="350"
  1079. :data="itemObjectList"
  1080. border
  1081. style="width: 100%">
  1082. <el-table-column
  1083. v-for="(item,index) in itemObjectColumnList" :key="index"
  1084. :sortable="item.columnSortable"
  1085. :prop="item.columnProp"
  1086. :header-align="item.headerAlign"
  1087. :show-overflow-tooltip="item.showOverflowTooltip"
  1088. :align="item.align"
  1089. :fixed="item.fixed===''?false:item.fixed"
  1090. :min-width="item.columnWidth"
  1091. :label="item.columnLabel">
  1092. <template slot-scope="scope">
  1093. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1094. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1095. </template>
  1096. </el-table-column>
  1097. <el-table-column
  1098. header-align="center"
  1099. align="center"
  1100. min-width="100"
  1101. label="设备">
  1102. <template slot-scope="scope">
  1103. <el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
  1104. <el-option
  1105. v-for = "i in scope.row.objectList"
  1106. :key = "i.objectID"
  1107. :label = "i.objectDesc"
  1108. :value = "i.objectID">
  1109. </el-option>
  1110. </el-select>
  1111. </template>
  1112. </el-table-column>
  1113. </el-table>
  1114. </div>
  1115. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  1116. <el-button type="primary" @click="actionModal2">保存</el-button>
  1117. <el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
  1118. </el-footer>
  1119. </el-dialog>
  1120. <!-- chooseList模态框 -->
  1121. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1122. <!-- 上传文件的modal -->
  1123. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile>
  1124. <!-- 上传文件的modal -->
  1125. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  1126. <!-- 子明细导入 -->
  1127. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  1128. <!-- 打印标签 -->
  1129. <qr-code ref="qrCode"></qr-code>
  1130. <!-- 项目操作对话框 -->
  1131. <el-dialog
  1132. title="检验项目操作"
  1133. @close="refreshInspectionDetailList"
  1134. :close-on-click-modal="false"
  1135. v-drag
  1136. :visible.sync="itemOperationDialogFlag"
  1137. width="1200px"
  1138. custom-class="item-operation-dialog">
  1139. <div class="search-container">
  1140. <el-form :inline="true" size="small">
  1141. <el-form-item label="项目编码">
  1142. <el-input v-model="itemOperationQuery.itemNo" placeholder="请输入项目编码" clearable prefix-icon="el-icon-search" style="width: 160px"></el-input>
  1143. </el-form-item>
  1144. <el-form-item label="项目名称">
  1145. <el-input v-model="itemOperationQuery.itemDesc" placeholder="请输入项目名称" clearable prefix-icon="el-icon-search" style="width: 200px"></el-input>
  1146. </el-form-item>
  1147. <el-button type="primary" icon="el-icon-search" size="small" @click="searchFQCItems">查询</el-button>
  1148. <el-button icon="el-icon-refresh" size="small" @click="resetItemQuery">重置</el-button>
  1149. </el-form>
  1150. </div>
  1151. <div class="item-operation-content">
  1152. <div class="item-panel available-panel">
  1153. <div class="panel-header">
  1154. <i class="el-icon-menu"></i>
  1155. <span class="panel-title">可选项目列表</span>
  1156. <span class="item-count">{{ availableItemList.length }}</span>
  1157. </div>
  1158. <el-table ref="availableItemTable" :data="availableItemList" @row-click="availableItemClickRow" @selection-change="availableItemSelectionChange" highlight-current-row class="operation-table" height="400" border>
  1159. <el-table-column type="selection" width="45" align="center"></el-table-column>
  1160. <el-table-column prop="itemNo" label="项目编码" min-width="120"></el-table-column>
  1161. <el-table-column prop="itemDesc" label="项目名称" min-width="180" show-overflow-tooltip></el-table-column>
  1162. </el-table>
  1163. </div>
  1164. <div class="operation-buttons">
  1165. <el-tooltip content="添加选中项目" placement="left">
  1166. <el-button type="primary" icon="el-icon-d-arrow-right" circle @click="addInspectionItems" :disabled="!availableItemSelections || availableItemSelections.length === 0"></el-button>
  1167. </el-tooltip>
  1168. <el-tooltip content="移除选中项目" placement="right">
  1169. <el-button type="danger" icon="el-icon-d-arrow-left" circle @click="deleteInspectionItems" :disabled="!selectedItemSelections || selectedItemSelections.length === 0"></el-button>
  1170. </el-tooltip>
  1171. </div>
  1172. <div class="item-panel selected-panel">
  1173. <div class="panel-header">
  1174. <i class="el-icon-tickets"></i>
  1175. <span class="panel-title">已有项目列表</span>
  1176. <span class="item-count">{{ selectedItemList.length }}</span>
  1177. </div>
  1178. <el-table ref="selectedItemTable" :data="selectedItemList" @row-click="selectedItemClickRow" @selection-change="selectedItemSelectionChange" highlight-current-row class="operation-table" height="400" border>
  1179. <el-table-column type="selection" width="45" align="center"></el-table-column>
  1180. <el-table-column prop="itemNo" label="项目编码" min-width="120"></el-table-column>
  1181. <el-table-column prop="itemDesc" label="项目名称" min-width="180" show-overflow-tooltip></el-table-column>
  1182. </el-table>
  1183. </div>
  1184. </div>
  1185. <div slot="footer" class="dialog-footer">
  1186. <el-button @click="itemOperationDialogFlag = false" size="small" style="width: 80px;">关闭</el-button>
  1187. </div>
  1188. </el-dialog>
  1189. <!-- 模板导入对话框 -->
  1190. <el-dialog
  1191. title="模板导入"
  1192. :close-on-click-modal="false"
  1193. v-drag
  1194. :visible.sync="templateImportDialogFlag"
  1195. width="900px"
  1196. custom-class="template-import-dialog">
  1197. <div class="search-container">
  1198. <el-form :inline="true" size="small">
  1199. <el-form-item label="模板编码">
  1200. <el-input v-model="templateQuery.templateId" placeholder="请输入模板编码" clearable prefix-icon="el-icon-search" style="width: 160px"></el-input>
  1201. </el-form-item>
  1202. <el-form-item label="模板名称">
  1203. <el-input v-model="templateQuery.templateDesc" placeholder="请输入模板名称" clearable prefix-icon="el-icon-search" style="width: 200px"></el-input>
  1204. </el-form-item>
  1205. <el-button type="primary" icon="el-icon-search" size="small" @click="searchFQCTemplates">查询</el-button>
  1206. <el-button icon="el-icon-refresh" size="small" @click="resetTemplateQuery">重置</el-button>
  1207. </el-form>
  1208. </div>
  1209. <div class="template-list-container">
  1210. <div class="panel-header">
  1211. <i class="el-icon-s-grid"></i>
  1212. <span class="panel-title">FQC检验模板</span>
  1213. <span class="item-count">({{ templateList.length }})</span>
  1214. </div>
  1215. <el-table ref="templateTable" :data="templateList" @row-click="templateClickRow" @selection-change="templateSelectionChange" highlight-current-row class="template-table" height="450" :header-cell-style="{background: '#f5f7fa', color: '#606266', fontWeight: '500'}">
  1216. <el-table-column type="selection" width="50" align="center"></el-table-column>
  1217. <el-table-column prop="templateId" label="模板编码" align="center" width="120"></el-table-column>
  1218. <el-table-column prop="templateName" label="模板名称" align="left" min-width="200" show-overflow-tooltip></el-table-column>
  1219. <el-table-column prop="itemCount" label="项目数量" align="center" width="100"></el-table-column>
  1220. </el-table>
  1221. </div>
  1222. <div slot="footer" class="dialog-footer">
  1223. <el-button type="primary" icon="el-icon-download" @click="confirmImportTemplate" :disabled="!templateSelections || templateSelections.length === 0" :loading="importLoading" size="small">导入选中模板</el-button>
  1224. <el-button @click="templateImportDialogFlag = false" size="small" style="width: 80px;">关闭</el-button>
  1225. </div>
  1226. </el-dialog>
  1227. </div>
  1228. </template>
  1229. <script>
  1230. import {
  1231. qcFQCInspectionSearch, // 查询FAI的检验记录
  1232. fqcDetailSearch, // 查询FAI的检验明细
  1233. fqcRecordDelete, // 删除检验记录
  1234. saveFQCDetailedRecord, // 新增明细信息
  1235. saveFQCSubmitResult, // 审核
  1236. saveFQCSubDetailed, // 新增子明细信息
  1237. selectFQCSubDetailedRecord, // 子明细记录信息查询
  1238. checkFQCIsSubmit, // 检查是否已提交
  1239. getResourceList, // 查询机台列表
  1240. getOperationList, // 查询工序列表
  1241. getPartList, // 查询物料列表
  1242. saveFQCInspection, // 新增FQC检验
  1243. queryController, // 检查动控
  1244. queryTemplateList, // 获取检验模板列表
  1245. getPartInformation, // 获取物料信息
  1246. getSpecialOperationList, // 获取特殊工序列表
  1247. inspectionTypeSearch, // 搜索所有检验类型
  1248. disposalMeasuresSearch, // 获取处置措施列表
  1249. getRollNo, // 模糊查询标签号
  1250. rollNoEnter, // 标签号回车事件
  1251. queryPartList, // 查询物料集合
  1252. umSearch, // 查询单位列表
  1253. getSiteAndBuByUserName,
  1254. getSiteAndBuByUserName2,
  1255. searchSeqInfo, // 查询派工单号
  1256. actionFQCInspection, // 开始检验
  1257. dataAcquisition, // 数据采集
  1258. getResponsibleOperatorList, // 获取责任人列表
  1259. getFQCItemObjectList, // 查询项目设备
  1260. dataAcquisitionByItem, // 根据项目数据采集
  1261. cancelApproval2, // 取消审核
  1262. getUserRoleList, // 获取用户角色列表
  1263. getOperatorList,
  1264. // FQC检验项目操作和模板导入
  1265. getFQCItemList,
  1266. addFQCItemDetails,
  1267. deleteFQCItemDetails,
  1268. getFQCTemplateList,
  1269. importFQCTemplateItems
  1270. } from "@/api/qc/qc.js"
  1271. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  1272. import Chooselist from '@/views/modules/common/Chooselist_eam'
  1273. import {getInspectionFile} from '@/api/eam/eam_object_list.js'
  1274. import { searchQcSopFileList, downloadSopFile, getAllOperationDescList } from '@/api/qc/qc.js'
  1275. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  1276. import {qcPrint} from '@/api/qc/qcPrint.js'
  1277. import excel from "@/utils/excel-util.js"
  1278. import qcFAIUploadFile from "./qc_FAI_upload_file"
  1279. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  1280. import subDetailUpload from "./sub_detail_upload"
  1281. import QrCode from "../common/QrCode.vue";
  1282. import IqcFileTable from "./IQCFileTable.vue";
  1283. /*上传文件的組件*/
  1284. export default {
  1285. components: {
  1286. IqcFileTable,
  1287. QrCode,
  1288. Chooselist,
  1289. qcFAIUploadFile,
  1290. comQcItemImageUploadFile,
  1291. subDetailUpload
  1292. },
  1293. computed: {
  1294. templateTableData () {
  1295. let start = (this.pageIndex2 - 1) * this.pageSize2
  1296. let end = start + this.pageSize2
  1297. if (end > this.tableData.length){
  1298. end = this.tableData.length
  1299. }
  1300. return this.tableData.slice(start,end)
  1301. },
  1302. isDetailReadonly () {
  1303. return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
  1304. },
  1305. isInspectionResultReadonly () {
  1306. return this.isDetailReadonly || this.exceptionModifyMode
  1307. },
  1308. isItemResultReadonly () {
  1309. return this.isDetailReadonly || this.exceptionModifyMode
  1310. },
  1311. // 导出字段映射
  1312. exportFields () {
  1313. let fields = {}
  1314. // 添加固定的状态列
  1315. fields['状态'] = 'state'
  1316. // 添加动态列
  1317. this.columnList1.forEach(item => {
  1318. fields[item.columnLabel] = item.columnProp
  1319. })
  1320. return fields
  1321. }
  1322. },
  1323. watch: {
  1324. detailData: {
  1325. deep: true,
  1326. handler: function (newV, oldV) {
  1327. this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
  1328. if (this.detailData.inspectionResult === '不合格') {
  1329. if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
  1330. this.detailData.batchQualifiedQty = this.detailData.rollQty
  1331. } else if (this.detailData.disposalMeasures === '挑选使用') {
  1332. this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty
  1333. } else {
  1334. this.detailData.batchQualifiedQty = 0
  1335. }
  1336. } else {
  1337. this.detailData.batchQualifiedQty = this.detailData.rollQty
  1338. }
  1339. }
  1340. },
  1341. detailList: {
  1342. deep: true,
  1343. handler: function (newV, oldV) {
  1344. let num2 = 0
  1345. for (let i = 0; i < this.detailList.length; i++) {
  1346. if (this.detailList[i].itemResult === 'N') {
  1347. num2++
  1348. }
  1349. }
  1350. this.detailData.unqualifiedQty = num2
  1351. }
  1352. },
  1353. },
  1354. data () {
  1355. return {
  1356. searchExpanded: false,
  1357. loadFlag: false,
  1358. transferLoadFlag: false,
  1359. inspectionNo: '',
  1360. fileFlag: false,
  1361. fileContentList: [],
  1362. fileActiveTab: 'qcFile',
  1363. sopFileList: [],
  1364. sopFileLoading: false,
  1365. currentFileRow: null,
  1366. operationDescList: [], // 工序下拉列表
  1367. // 是否收藏
  1368. favorite: false,
  1369. // 导出 start
  1370. exportData: [],
  1371. exportName: "FAI检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  1372. exportHeader: ["FAI检验录入"],
  1373. exportFooter: [],
  1374. exportList: [],
  1375. // 导出 end
  1376. checkCompletedData: {
  1377. inspectionNo: ''
  1378. },
  1379. submitData: {
  1380. site: '',
  1381. inspectionNo: '',
  1382. submit_flag: '',
  1383. inspectionResult: '',
  1384. submitList: [],
  1385. updateBy: this.$store.state.user.name,
  1386. type: 'fqc'
  1387. },
  1388. tagNo: '',
  1389. searchData: {
  1390. site: '',
  1391. userName: this.$store.state.user.name,
  1392. inspectionNo: '',
  1393. state: '',
  1394. inspectionResult: '',
  1395. orderNo: '',
  1396. operationDesc: '',
  1397. buNo: '',
  1398. startDate: '',
  1399. endDate: '',
  1400. partNo: '',
  1401. startDate2: '',
  1402. endDate2: '',
  1403. partDesc: '',
  1404. cinvSourceCode: '',
  1405. sku: '',
  1406. disposalMeasures: '',
  1407. page: 1,
  1408. limit: 10,
  1409. seqNo: '',
  1410. states: ['未开始','待检验'],
  1411. documentNo: ''
  1412. },
  1413. pageIndex: 1,
  1414. pageSize: 20,
  1415. totalPage: 0,
  1416. pageIndex2: 1,
  1417. pageSize2: 20,
  1418. totalPage2: 0,
  1419. height: 200,
  1420. dataList: [],
  1421. dataListSelections: [],
  1422. modalData: {
  1423. flag: '',
  1424. site: '',
  1425. bu: '',
  1426. inspectionNo: '',
  1427. partNo: '',
  1428. partDesc: '',
  1429. inspectionTypeNo: '107',
  1430. inspectionTypeName: '',
  1431. inspectorNo: '',
  1432. inspectorName: '',
  1433. submit_flag: '',
  1434. seqNo: '',
  1435. batchRollNo: '',
  1436. invdefinetype: '',
  1437. sku: '',
  1438. qtyrequired: '',
  1439. lotsize:'',
  1440. operationDesc:'',
  1441. specialRequirements: '',
  1442. templateId: '',
  1443. templateName: '',
  1444. specialTaskFlag: '',
  1445. workCenterNo: '',
  1446. rollNo: '',
  1447. umId: '',
  1448. umName: '',
  1449. sjzs: ''
  1450. },
  1451. // 展示列集
  1452. columnList1: [
  1453. {
  1454. userId: this.$store.state.user.name,
  1455. functionId: 301015,
  1456. serialNumber: '301015Table1BuDesc',
  1457. tableId: "301015Table1",
  1458. tableName: "FQC检验记录表",
  1459. columnProp: 'buDesc',
  1460. headerAlign: "center",
  1461. align: "center",
  1462. columnLabel: 'BU',
  1463. columnHidden: false,
  1464. columnImage: false,
  1465. columnSortable: false,
  1466. sortLv: 0,
  1467. status: true,
  1468. fixed: '',
  1469. columnWidth: 100,
  1470. },
  1471. {
  1472. userId: this.$store.state.user.name,
  1473. functionId: 301015,
  1474. serialNumber: '301015Table1InspectionNo',
  1475. tableId: "301015Table1",
  1476. tableName: "FQC检验记录表",
  1477. columnProp: 'inspectionNo',
  1478. headerAlign: "center",
  1479. align: "center",
  1480. columnLabel: '检验单号',
  1481. columnHidden: false,
  1482. columnImage: false,
  1483. columnSortable: false,
  1484. sortLv: 0,
  1485. status: true,
  1486. fixed: '',
  1487. columnWidth: 120,
  1488. },
  1489. {
  1490. userId: this.$store.state.user.name,
  1491. functionId: 301015,
  1492. serialNumber: '301015Table1BatchRollNo',
  1493. tableId: "301015Table1",
  1494. tableName: "FQC检验记录表",
  1495. columnProp: 'batchRollNo',
  1496. headerAlign: "center",
  1497. align: "center",
  1498. columnLabel: '老卷号',
  1499. columnHidden: false,
  1500. columnImage: false,
  1501. columnSortable: false,
  1502. sortLv: 0,
  1503. status: true,
  1504. fixed: '',
  1505. columnWidth: 150,
  1506. },
  1507. {
  1508. userId: this.$store.state.user.name,
  1509. functionId: 301015,
  1510. serialNumber: '301015Table1RollNo',
  1511. tableId: "301015Table1",
  1512. tableName: "FQC检验记录表",
  1513. columnProp: 'rollNo',
  1514. headerAlign: "center",
  1515. align: "center",
  1516. columnLabel: '标签条码',
  1517. columnHidden: false,
  1518. columnImage: false,
  1519. columnSortable: false,
  1520. sortLv: 0,
  1521. status: true,
  1522. fixed: '',
  1523. columnWidth: 150,
  1524. },
  1525. {
  1526. userId: this.$store.state.user.name,
  1527. functionId: 301015,
  1528. serialNumber: '301015Table1InspectionResult',
  1529. tableId: "301015Table1",
  1530. tableName: "FQC检验记录表",
  1531. columnProp: 'inspectionResult',
  1532. headerAlign: "center",
  1533. align: "center",
  1534. columnLabel: '检验结论',
  1535. columnHidden: false,
  1536. columnImage: false,
  1537. columnSortable: false,
  1538. sortLv: 0,
  1539. status: true,
  1540. fixed: '',
  1541. columnWidth: 100,
  1542. },
  1543. {
  1544. userId: this.$store.state.user.name,
  1545. functionId: 301015,
  1546. serialNumber: '301015Table1DisposalMeasures',
  1547. tableId: "301015Table1",
  1548. tableName: "FQC检验记录表",
  1549. columnProp: 'disposalMeasures',
  1550. headerAlign: "center",
  1551. align: "center",
  1552. columnLabel: '处置措施',
  1553. columnHidden: false,
  1554. columnImage: false,
  1555. columnSortable: false,
  1556. sortLv: 0,
  1557. status: true,
  1558. fixed: '',
  1559. columnWidth: 100,
  1560. },
  1561. {
  1562. userId: this.$store.state.user.name,
  1563. functionId: 301015,
  1564. serialNumber: '301015Table1TaskDate',
  1565. tableId: "301015Table1",
  1566. tableName: "FQC检验记录表",
  1567. columnProp: 'taskDate',
  1568. headerAlign: "center",
  1569. align: "center",
  1570. columnLabel: '送检日期',
  1571. columnHidden: false,
  1572. columnImage: false,
  1573. columnSortable: false,
  1574. sortLv: 0,
  1575. status: true,
  1576. fixed: '',
  1577. columnWidth: 130,
  1578. },
  1579. {
  1580. userId: this.$store.state.user.name,
  1581. functionId: 301015,
  1582. serialNumber: '301015Table1InspectionCycle',
  1583. tableId: "301015Table1",
  1584. tableName: "FQC检验记录表",
  1585. columnProp: 'inspectionCycle',
  1586. headerAlign: "center",
  1587. align: "right",
  1588. columnLabel: '检验周期(h)',
  1589. columnHidden: false,
  1590. columnImage: false,
  1591. columnSortable: false,
  1592. sortLv: 0,
  1593. status: true,
  1594. fixed: '',
  1595. columnWidth: 100,
  1596. },
  1597. {
  1598. userId: this.$store.state.user.name,
  1599. functionId: 301015,
  1600. serialNumber: '301015Table1DocumentNo',
  1601. tableId: "301015Table1",
  1602. tableName: "FQC检验记录表",
  1603. columnProp: 'documentNo',
  1604. headerAlign: "center",
  1605. align: "left",
  1606. columnLabel: '通知单号',
  1607. columnHidden: false,
  1608. columnImage: false,
  1609. columnSortable: false,
  1610. sortLv: 0,
  1611. status: true,
  1612. fixed: '',
  1613. columnWidth: 150,
  1614. },
  1615. {
  1616. userId: this.$store.state.user.name,
  1617. functionId: 301015,
  1618. serialNumber: '301015Table1OrderNo',
  1619. tableId: "301015Table1",
  1620. tableName: "FQC检验记录表",
  1621. columnProp: 'orderNo',
  1622. headerAlign: "center",
  1623. align: "left",
  1624. columnLabel: '工单号',
  1625. columnHidden: false,
  1626. columnImage: false,
  1627. columnSortable: false,
  1628. sortLv: 0,
  1629. status: true,
  1630. fixed: '',
  1631. columnWidth: 150,
  1632. },
  1633. {
  1634. userId: this.$store.state.user.name,
  1635. functionId: 301015,
  1636. serialNumber: '301015Table1SeqNo',
  1637. tableId: "301015Table1",
  1638. tableName: "FQC检验记录表",
  1639. columnProp: 'seqNo',
  1640. headerAlign: "center",
  1641. align: "left",
  1642. columnLabel: '派工单号',
  1643. columnHidden: false,
  1644. columnImage: false,
  1645. columnSortable: false,
  1646. sortLv: 0,
  1647. status: true,
  1648. fixed: '',
  1649. columnWidth: 150,
  1650. },
  1651. {
  1652. userId: this.$store.state.user.name,
  1653. functionId: 301015,
  1654. serialNumber: '301015Table1OperationDesc',
  1655. tableId: "301015Table1",
  1656. tableName: "FQC检验记录表",
  1657. columnProp: 'operationDesc',
  1658. headerAlign: "center",
  1659. align: "left",
  1660. columnLabel: '工序',
  1661. columnHidden: false,
  1662. columnImage: false,
  1663. columnSortable: false,
  1664. sortLv: 0,
  1665. status: true,
  1666. fixed: '',
  1667. columnWidth: 120,
  1668. },
  1669. {
  1670. userId: this.$store.state.user.name,
  1671. functionId: 301015,
  1672. serialNumber: '301015Table1ResourceDesc',
  1673. tableId: "301015Table1",
  1674. tableName: "FQC检验记录表",
  1675. columnProp: 'resourceDesc',
  1676. headerAlign: "center",
  1677. align: "left",
  1678. columnLabel: '机台',
  1679. columnHidden: false,
  1680. columnImage: false,
  1681. columnSortable: false,
  1682. sortLv: 0,
  1683. status: true,
  1684. fixed: '',
  1685. columnWidth: 120,
  1686. },
  1687. {
  1688. userId: this.$store.state.user.name,
  1689. functionId: 301015,
  1690. serialNumber: '301015Table1PartNo',
  1691. tableId: "301015Table1",
  1692. tableName: "FQC检验记录表",
  1693. columnProp: 'partNo',
  1694. headerAlign: "center",
  1695. align: "center",
  1696. columnLabel: '物料编码',
  1697. columnHidden: false,
  1698. columnImage: false,
  1699. columnSortable: false,
  1700. sortLv: 0,
  1701. status: true,
  1702. fixed: '',
  1703. columnWidth: 120,
  1704. },
  1705. {
  1706. userId: this.$store.state.user.name,
  1707. functionId: 301015,
  1708. serialNumber: '301015Table1PartDesc',
  1709. tableId: "301015Table1",
  1710. tableName: "FQC检验记录表",
  1711. columnProp: 'partDesc',
  1712. headerAlign: "center",
  1713. align: "left",
  1714. columnLabel: '物料名称',
  1715. columnHidden: false,
  1716. columnImage: false,
  1717. columnSortable: false,
  1718. sortLv: 0,
  1719. status: true,
  1720. fixed: '',
  1721. columnWidth: 300,
  1722. },
  1723. {
  1724. userId: this.$store.state.user.name,
  1725. functionId: 301015,
  1726. serialNumber: '301015Table1Spec',
  1727. tableId: "301015Table1",
  1728. tableName: "FQC检验记录表",
  1729. columnProp: 'spec',
  1730. headerAlign: "center",
  1731. align: "left",
  1732. columnLabel: '规格型号',
  1733. columnHidden: false,
  1734. columnImage: false,
  1735. columnSortable: false,
  1736. sortLv: 0,
  1737. status: true,
  1738. fixed: '',
  1739. columnWidth: 120,
  1740. },
  1741. {
  1742. userId: this.$store.state.user.name,
  1743. functionId: 301015,
  1744. serialNumber: '301015Table1Invdefinetype',
  1745. tableId: "301015Table1",
  1746. tableName: "FQC检验记录表",
  1747. columnProp: 'invdefinetype',
  1748. headerAlign: "center",
  1749. align: "left",
  1750. columnLabel: '物料类别',
  1751. columnHidden: false,
  1752. columnImage: false,
  1753. columnSortable: false,
  1754. sortLv: 0,
  1755. status: true,
  1756. fixed: '',
  1757. columnWidth: 120,
  1758. },
  1759. {
  1760. userId: this.$store.state.user.name,
  1761. functionId: 301015,
  1762. serialNumber: '301015Table1RollQty',
  1763. tableId: "301015Table1",
  1764. tableName: "FQC检验记录表",
  1765. columnProp: 'rollQty',
  1766. headerAlign: "center",
  1767. align: "right",
  1768. columnLabel: '送检数量',
  1769. columnHidden: false,
  1770. columnImage: false,
  1771. columnSortable: false,
  1772. sortLv: 0,
  1773. status: true,
  1774. fixed: '',
  1775. columnWidth: 100,
  1776. },
  1777. {
  1778. userId: this.$store.state.user.name,
  1779. functionId: 301015,
  1780. serialNumber: '301015Table1SamplingQty',
  1781. tableId: "301015Table1",
  1782. tableName: "FQC检验记录表",
  1783. columnProp: 'samplingQty',
  1784. headerAlign: "center",
  1785. align: "right",
  1786. columnLabel: '抽样数量',
  1787. columnHidden: false,
  1788. columnImage: false,
  1789. columnSortable: false,
  1790. sortLv: 0,
  1791. status: true,
  1792. fixed: '',
  1793. columnWidth: 100,
  1794. },
  1795. {
  1796. userId: this.$store.state.user.name,
  1797. functionId: 301015,
  1798. serialNumber: '301015Table1UmName',
  1799. tableId: "301015Table1",
  1800. tableName: "FQC检验记录表",
  1801. columnProp: 'umName',
  1802. headerAlign: "center",
  1803. align: "center",
  1804. columnLabel: '单位',
  1805. columnHidden: false,
  1806. columnImage: false,
  1807. columnSortable: false,
  1808. sortLv: 0,
  1809. status: true,
  1810. fixed: '',
  1811. columnWidth: 100,
  1812. },
  1813. {
  1814. userId: this.$store.state.user.name,
  1815. functionId: 301015,
  1816. serialNumber: '301015Table1InspectionRemark',
  1817. tableId: "301015Table1",
  1818. tableName: "FQC检验记录表",
  1819. columnProp: 'inspectionRemark',
  1820. headerAlign: "center",
  1821. align: "left",
  1822. columnLabel: '质检备注',
  1823. columnHidden: false,
  1824. columnImage: false,
  1825. columnSortable: false,
  1826. sortLv: 0,
  1827. status: true,
  1828. fixed: '',
  1829. columnWidth: 200,
  1830. },
  1831. {
  1832. userId: this.$store.state.user.name,
  1833. functionId: 301015,
  1834. serialNumber: '301015Table1DisposalRemark',
  1835. tableId: "301015Table1",
  1836. tableName: "FQC检验记录表",
  1837. columnProp: 'disposalRemark',
  1838. headerAlign: "center",
  1839. align: "left",
  1840. columnLabel: '处置说明',
  1841. columnHidden: false,
  1842. columnImage: false,
  1843. columnSortable: false,
  1844. sortLv: 0,
  1845. status: true,
  1846. fixed: '',
  1847. columnWidth: 200,
  1848. },
  1849. {
  1850. userId: this.$store.state.user.name,
  1851. functionId: 301015,
  1852. serialNumber: '301015Table1ActionDate',
  1853. tableId: "301015Table1",
  1854. tableName: "FQC检验记录表",
  1855. columnProp: 'actionDate',
  1856. headerAlign: "center",
  1857. align: "center",
  1858. columnLabel: '开始检验时间',
  1859. columnHidden: false,
  1860. columnImage: false,
  1861. columnSortable: false,
  1862. sortLv: 0,
  1863. status: true,
  1864. fixed: '',
  1865. columnWidth: 170,
  1866. },
  1867. {
  1868. userId: this.$store.state.user.name,
  1869. functionId: 301015,
  1870. serialNumber: '301015Table1InspectorDate',
  1871. tableId: "301015Table1",
  1872. tableName: "FQC检验记录表",
  1873. columnProp: 'inspectorDate',
  1874. headerAlign: "center",
  1875. align: "center",
  1876. columnLabel: '检验时间',
  1877. columnHidden: false,
  1878. columnImage: false,
  1879. columnSortable: false,
  1880. sortLv: 0,
  1881. status: true,
  1882. fixed: '',
  1883. columnWidth: 170,
  1884. },
  1885. {
  1886. userId: this.$store.state.user.name,
  1887. functionId: 301015,
  1888. serialNumber: '301015Table1SubmitDate',
  1889. tableId: "301015Table1",
  1890. tableName: "FQC检验记录表",
  1891. columnProp: 'submitDate',
  1892. headerAlign: "center",
  1893. align: "center",
  1894. columnLabel: '审核时间',
  1895. columnHidden: false,
  1896. columnImage: false,
  1897. columnSortable: false,
  1898. sortLv: 0,
  1899. status: true,
  1900. fixed: '',
  1901. columnWidth: 170,
  1902. },
  1903. {
  1904. userId: this.$store.state.user.name,
  1905. functionId: 301015,
  1906. serialNumber: '301015Table1InspectorName',
  1907. tableId: "301015Table1",
  1908. tableName: "FQC检验记录表",
  1909. columnProp: 'inspectorName',
  1910. headerAlign: "center",
  1911. align: "center",
  1912. columnLabel: '质检员',
  1913. columnHidden: false,
  1914. columnImage: false,
  1915. columnSortable: false,
  1916. sortLv: 0,
  1917. status: true,
  1918. fixed: '',
  1919. columnWidth: 100,
  1920. },
  1921. {
  1922. userId: this.$store.state.user.name,
  1923. functionId: 301015,
  1924. serialNumber: '301015Table1SpecialRequirements',
  1925. tableId: "301015Table1",
  1926. tableName: "FQC检验记录表",
  1927. columnProp: 'specialRequirements',
  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: 200,
  1938. },
  1939. ],
  1940. //项目清单
  1941. detailData: {
  1942. site: '',
  1943. buNo: '',
  1944. inspectionNo:'',
  1945. partNo:'',
  1946. partDesc:'',
  1947. rollQty:'',
  1948. samplingQty: '',
  1949. unqualifiedQty: 0,
  1950. unqualifiedQuantity:'',
  1951. disposalMeasures:'',
  1952. disposalRemark: '',
  1953. inspectionResult: '',
  1954. inspectorNo: '',
  1955. inspectorName: '',
  1956. inspectionRemark: '',
  1957. submitFlag: '',
  1958. cinvSourceCode: '',
  1959. sku: '',
  1960. invdefinetype: '',
  1961. umId: '',
  1962. umName: '',
  1963. operator: '',
  1964. operatorName: '',
  1965. responsiblePerson: '',
  1966. responsiblePersonName: '',
  1967. state: '',
  1968. passQty: '',
  1969. notPassQty: '',
  1970. batchQualifiedQty: '',
  1971. spec: ''
  1972. },
  1973. detailInformationFlag: false,
  1974. detailList: [],
  1975. saveInformationData: {
  1976. site: '',
  1977. buNo: '',
  1978. inspectionNo:'',
  1979. disposalMeasures: '',
  1980. disposalRemark: '',
  1981. inspectorNo: '',
  1982. inspectionRemark: '',
  1983. samplingQty: '',
  1984. rollQty: '',
  1985. itemList:[],
  1986. unqualifiedQty: '',
  1987. partNo: '',
  1988. partDesc: '',
  1989. operator: '',
  1990. operatorName: '',
  1991. responsiblePerson: '',
  1992. responsiblePersonName: '',
  1993. subDetailList: [],
  1994. type: '',
  1995. passQty: '',
  1996. notPassQty: '',
  1997. batchQualifiedQty: ''
  1998. },
  1999. detailColumnList: [
  2000. {
  2001. userId: this.$store.state.user.name,
  2002. functionId: 301015,
  2003. serialNumber: '301015Table2ItemNo',
  2004. tableId: "301015Table2",
  2005. tableName: "检验单明细表",
  2006. columnProp: 'itemNo',
  2007. headerAlign: "center",
  2008. align: "center",
  2009. columnLabel: '检验项目编码',
  2010. columnHidden: false,
  2011. columnImage: false,
  2012. columnSortable: false,
  2013. sortLv: 0,
  2014. status: true,
  2015. fixed: '',
  2016. columnWidth: 120,
  2017. },
  2018. {
  2019. userId: this.$store.state.user.name,
  2020. functionId: 301015,
  2021. serialNumber: '301015Table2ItemDesc',
  2022. tableId: "301015Table2",
  2023. tableName: "检验单明细表",
  2024. columnProp: 'itemDesc',
  2025. headerAlign: "center",
  2026. align: "left",
  2027. columnLabel: '检验项目',
  2028. columnHidden: false,
  2029. columnImage: false,
  2030. columnSortable: false,
  2031. sortLv: 0,
  2032. status: true,
  2033. fixed: '',
  2034. columnWidth: 150,
  2035. },
  2036. {
  2037. userId: this.$store.state.user.name,
  2038. functionId: 301015,
  2039. serialNumber: '301015Table2SamplingLevelDesc',
  2040. tableId: "301015Table2",
  2041. tableName: "检验单明细表",
  2042. columnProp: 'samplingLevelDesc',
  2043. headerAlign: "center",
  2044. align: "left",
  2045. columnLabel: '检验水平',
  2046. columnHidden: false,
  2047. columnImage: false,
  2048. columnSortable: false,
  2049. sortLv: 0,
  2050. status: true,
  2051. fixed: '',
  2052. columnWidth: 120,
  2053. },
  2054. {
  2055. userId: this.$store.state.user.name,
  2056. functionId: 301015,
  2057. serialNumber: '301015Table2SamplingProgrammeDesc',
  2058. tableId: "301015Table2",
  2059. tableName: "检验单明细表",
  2060. columnProp: 'samplingProgrammeDesc',
  2061. headerAlign: "center",
  2062. align: "left",
  2063. columnLabel: '检验方案',
  2064. columnHidden: false,
  2065. columnImage: false,
  2066. columnSortable: false,
  2067. sortLv: 0,
  2068. status: true,
  2069. fixed: '',
  2070. columnWidth: 120,
  2071. },
  2072. {
  2073. userId: this.$store.state.user.name,
  2074. functionId: 301015,
  2075. serialNumber: '301015Table2MethodName',
  2076. tableId: "301015Table2",
  2077. tableName: "检验单明细表",
  2078. columnProp: 'methodName',
  2079. headerAlign: "center",
  2080. align: "left",
  2081. columnLabel: '检验方法',
  2082. columnHidden: false,
  2083. columnImage: false,
  2084. columnSortable: false,
  2085. sortLv: 0,
  2086. status: true,
  2087. fixed: '',
  2088. columnWidth: 120,
  2089. },
  2090. {
  2091. userId: this.$store.state.user.name,
  2092. functionId: 301015,
  2093. serialNumber: '301015Table2MethodRemark',
  2094. tableId: "301015Table2",
  2095. tableName: "检验单明细表",
  2096. columnProp: 'methodRemark',
  2097. headerAlign: "center",
  2098. align: "left",
  2099. columnLabel: '检验方法说明',
  2100. columnHidden: false,
  2101. columnImage: false,
  2102. columnSortable: false,
  2103. sortLv: 0,
  2104. status: true,
  2105. fixed: '',
  2106. columnWidth: 200,
  2107. },
  2108. {
  2109. userId: this.$store.state.user.name,
  2110. functionId: 301015,
  2111. serialNumber: '301015Table2ObjectDesc',
  2112. tableId: "301015Table2",
  2113. tableName: "检验单明细表",
  2114. columnProp: 'objectDesc',
  2115. headerAlign: "center",
  2116. align: "center",
  2117. columnLabel: '检测仪器',
  2118. columnHidden: false,
  2119. columnImage: false,
  2120. columnSortable: false,
  2121. sortLv: 0,
  2122. status: true,
  2123. fixed: '',
  2124. columnWidth: 120,
  2125. },
  2126. {
  2127. userId: this.$store.state.user.name,
  2128. functionId: 301015,
  2129. serialNumber: '301015Table2Aql',
  2130. tableId: "301015Table2",
  2131. tableName: "检验单明细表",
  2132. columnProp: 'aql',
  2133. headerAlign: "center",
  2134. align: "right",
  2135. columnLabel: 'AQL',
  2136. columnHidden: false,
  2137. columnImage: false,
  2138. columnSortable: false,
  2139. sortLv: 0,
  2140. status: true,
  2141. fixed: '',
  2142. columnWidth: 100,
  2143. },
  2144. {
  2145. userId: this.$store.state.user.name,
  2146. functionId: 301015,
  2147. serialNumber: '301015Table2Ac',
  2148. tableId: "301015Table2",
  2149. tableName: "检验单明细表",
  2150. columnProp: 'ac',
  2151. headerAlign: "center",
  2152. align: "right",
  2153. columnLabel: 'AC',
  2154. columnHidden: false,
  2155. columnImage: false,
  2156. columnSortable: false,
  2157. sortLv: 0,
  2158. status: true,
  2159. fixed: '',
  2160. columnWidth: 100,
  2161. },
  2162. {
  2163. userId: this.$store.state.user.name,
  2164. functionId: 301015,
  2165. serialNumber: '301015Table2Re',
  2166. tableId: "301015Table2",
  2167. tableName: "检验单明细表",
  2168. columnProp: 're',
  2169. headerAlign: "center",
  2170. align: "right",
  2171. columnLabel: 'RE',
  2172. columnHidden: false,
  2173. columnImage: false,
  2174. columnSortable: false,
  2175. sortLv: 0,
  2176. status: true,
  2177. fixed: '',
  2178. columnWidth: 100,
  2179. },
  2180. {
  2181. userId: this.$store.state.user.name,
  2182. functionId: 301015,
  2183. serialNumber: '301015Table2DefaultValue',
  2184. tableId: "301015Table2",
  2185. tableName: "检验单明细表",
  2186. columnProp: 'defaultValue',
  2187. headerAlign: "center",
  2188. align: "center",
  2189. columnLabel: '标准值',
  2190. columnHidden: false,
  2191. columnImage: false,
  2192. columnSortable: false,
  2193. sortLv: 0,
  2194. status: true,
  2195. fixed: '',
  2196. columnWidth: 100,
  2197. },
  2198. {
  2199. userId: this.$store.state.user.name,
  2200. functionId: 301015,
  2201. serialNumber: '301015Table2MaxValue',
  2202. tableId: "301015Table2",
  2203. tableName: "检验单明细表",
  2204. columnProp: 'maxValue',
  2205. headerAlign: "center",
  2206. align: "right",
  2207. columnLabel: '上限值',
  2208. columnHidden: false,
  2209. columnImage: false,
  2210. columnSortable: false,
  2211. sortLv: 0,
  2212. status: true,
  2213. fixed: '',
  2214. columnWidth: 100,
  2215. },
  2216. {
  2217. userId: this.$store.state.user.name,
  2218. functionId: 301015,
  2219. serialNumber: '301015Table2MinValue',
  2220. tableId: "301015Table2",
  2221. tableName: "检验单明细表",
  2222. columnProp: 'minValue',
  2223. headerAlign: "center",
  2224. align: "right",
  2225. columnLabel: '下限值',
  2226. columnHidden: false,
  2227. columnImage: false,
  2228. columnSortable: false,
  2229. sortLv: 0,
  2230. status: true,
  2231. fixed: '',
  2232. columnWidth: 100,
  2233. },
  2234. {
  2235. userId: this.$store.state.user.name,
  2236. functionId: 301015,
  2237. serialNumber: '301015Table2ValueType',
  2238. tableId: "301015Table2",
  2239. tableName: "检验单明细表",
  2240. columnProp: 'valueType',
  2241. headerAlign: "center",
  2242. align: "center",
  2243. columnLabel: '检测值类型',
  2244. columnHidden: false,
  2245. columnImage: false,
  2246. columnSortable: false,
  2247. sortLv: 0,
  2248. status: true,
  2249. fixed: '',
  2250. columnWidth: 100,
  2251. },
  2252. ],
  2253. fileColumnList: [
  2254. {
  2255. columnProp: 'fileName',
  2256. headerAlign: "center",
  2257. align: "center",
  2258. columnLabel: '文件名称',
  2259. columnHidden: false,
  2260. columnImage: false,
  2261. columnSortable: false,
  2262. sortLv: 0,
  2263. status: true,
  2264. fixed: '',
  2265. },
  2266. {
  2267. columnProp: 'createdBy',
  2268. headerAlign: "center",
  2269. align: 'center',
  2270. columnLabel: '上传人',
  2271. columnHidden: false,
  2272. columnImage: false,
  2273. columnSortable: true,
  2274. sortLv: 0,
  2275. status: true,
  2276. fixed: false
  2277. },
  2278. {
  2279. columnProp: 'createDate',
  2280. headerAlign: "center",
  2281. align: 'center',
  2282. columnLabel: '上传时间',
  2283. columnHidden: false,
  2284. columnImage: false,
  2285. columnSortable: true,
  2286. sortLv: 0,
  2287. status: true,
  2288. fixed: false
  2289. },
  2290. {
  2291. columnProp: 'orderRef3',
  2292. headerAlign: "center",
  2293. align: 'center',
  2294. columnLabel: '备注',
  2295. columnHidden: false,
  2296. columnImage: false,
  2297. columnSortable: true,
  2298. sortLv: 0,
  2299. status: true,
  2300. fixed: false
  2301. },
  2302. ],
  2303. // 派工单号
  2304. seqInfoList: [],
  2305. seqDetailFlag: false,
  2306. seqDetailData: {
  2307. orderNo: '',
  2308. seqNo: '',
  2309. sku: '',
  2310. partNo: '',
  2311. partDesc: '',
  2312. operationDesc: '',
  2313. qtyrequired: '',
  2314. lotsize: '',
  2315. status: '下达'
  2316. },
  2317. seqDetailColumnList: [
  2318. {
  2319. userId: this.$store.state.user.name,
  2320. functionId: 301015,
  2321. serialNumber: '301015Table3OrderNo',
  2322. tableId: "301015Table3",
  2323. tableName: "任务新增-派工单",
  2324. fixed: '',
  2325. columnWidth: 80,
  2326. columnProp: 'orderNo',
  2327. headerAlign: "center",
  2328. align: "center",
  2329. columnLabel: '工单号',
  2330. columnHidden: false,
  2331. columnImage: false,
  2332. columnSortable: false,
  2333. sortLv: 0,
  2334. status: true,
  2335. },
  2336. {
  2337. userId: this.$store.state.user.name,
  2338. functionId: 301015,
  2339. serialNumber: '301015Table3SeqNo',
  2340. tableId: "301015Table3",
  2341. tableName: "任务新增-派工单",
  2342. fixed: '',
  2343. columnWidth: 80,
  2344. columnProp: 'seqNo',
  2345. headerAlign: "center",
  2346. align: "center",
  2347. columnLabel: '派工单号',
  2348. columnHidden: false,
  2349. columnImage: false,
  2350. columnSortable: false,
  2351. sortLv: 0,
  2352. status: true,
  2353. },
  2354. {
  2355. userId: this.$store.state.user.name,
  2356. functionId: 301015,
  2357. serialNumber: '301015Table3Sku',
  2358. tableId: "301015Table3",
  2359. tableName: "任务新增-派工单",
  2360. fixed: '',
  2361. columnWidth: 80,
  2362. columnProp: 'sku',
  2363. headerAlign: "center",
  2364. align: "center",
  2365. columnLabel: 'SKU',
  2366. columnHidden: false,
  2367. columnImage: false,
  2368. columnSortable: false,
  2369. sortLv: 0,
  2370. status: true,
  2371. },
  2372. {
  2373. userId: this.$store.state.user.name,
  2374. functionId: 301015,
  2375. serialNumber: '301015Table3PartNo',
  2376. tableId: "301015Table3",
  2377. tableName: "任务新增-派工单",
  2378. fixed: '',
  2379. columnWidth: 80,
  2380. columnProp: 'partNo',
  2381. headerAlign: "center",
  2382. align: "center",
  2383. columnLabel: '物料编码',
  2384. columnHidden: false,
  2385. columnImage: false,
  2386. columnSortable: false,
  2387. sortLv: 0,
  2388. status: true,
  2389. },
  2390. {
  2391. userId: this.$store.state.user.name,
  2392. functionId: 301015,
  2393. serialNumber: '301015Table3PartDesc',
  2394. tableId: "301015Table3",
  2395. tableName: "任务新增-派工单",
  2396. fixed: '',
  2397. columnWidth: 80,
  2398. columnProp: 'partDesc',
  2399. headerAlign: "center",
  2400. align: "center",
  2401. columnLabel: '物料名称',
  2402. columnHidden: false,
  2403. columnImage: false,
  2404. columnSortable: false,
  2405. sortLv: 0,
  2406. status: true,
  2407. },
  2408. {
  2409. userId: this.$store.state.user.name,
  2410. functionId: 301015,
  2411. serialNumber: '301015Table3Lotsize',
  2412. tableId: "301015Table3",
  2413. tableName: "任务新增-派工单",
  2414. fixed: '',
  2415. columnWidth: 80,
  2416. columnProp: 'lotsize',
  2417. headerAlign: "center",
  2418. align: "center",
  2419. columnLabel: '工单数量',
  2420. columnHidden: false,
  2421. columnImage: false,
  2422. columnSortable: false,
  2423. sortLv: 0,
  2424. status: true,
  2425. },
  2426. {
  2427. userId: this.$store.state.user.name,
  2428. functionId: 301015,
  2429. serialNumber: '301015Table3Qtyrequired',
  2430. tableId: "301015Table3",
  2431. tableName: "任务新增-派工单",
  2432. fixed: '',
  2433. columnWidth: 80,
  2434. columnProp: 'qtyrequired',
  2435. headerAlign: "center",
  2436. align: "center",
  2437. columnLabel: '派工数量',
  2438. columnHidden: false,
  2439. columnImage: false,
  2440. columnSortable: false,
  2441. sortLv: 0,
  2442. status: true,
  2443. },
  2444. {
  2445. userId: this.$store.state.user.name,
  2446. functionId: 301015,
  2447. serialNumber: '301015Table3OperationDesc',
  2448. tableId: "301015Table3",
  2449. tableName: "任务新增-派工单",
  2450. fixed: '',
  2451. columnWidth: 80,
  2452. columnProp: 'operationDesc',
  2453. headerAlign: "center",
  2454. align: "center",
  2455. columnLabel: '工序',
  2456. columnHidden: false,
  2457. columnImage: false,
  2458. columnSortable: false,
  2459. sortLv: 0,
  2460. status: true,
  2461. }
  2462. ],
  2463. // 子明细数据对象
  2464. tableData: [],
  2465. checkedDetail: [],
  2466. subDetailFlag: false,
  2467. subDetailData: {
  2468. site: '',
  2469. buNo: '',
  2470. inspectionNo: '',
  2471. itemNo: '',
  2472. itemDesc: '',
  2473. defaultValue: '',
  2474. maxValue: '',
  2475. minValue: '',
  2476. valueTypeDb: '',
  2477. subDetailValues:[],
  2478. page: 1,
  2479. limit: 10,
  2480. },
  2481. options: [],
  2482. FAISelections: [],
  2483. modalFlag: false,
  2484. rules: {
  2485. orderNoType:[
  2486. {
  2487. required: true,
  2488. message: ' ',
  2489. trigger: ['blur','change']
  2490. }
  2491. ],
  2492. operationDescType:[
  2493. {
  2494. required: true,
  2495. message: ' ',
  2496. trigger: ['blur','change']
  2497. }
  2498. ],
  2499. resourceIdType:[
  2500. {
  2501. required: true,
  2502. message: ' ',
  2503. trigger: ['blur','change']
  2504. }
  2505. ],
  2506. rollQtyType:[
  2507. {
  2508. required: true,
  2509. message: ' ',
  2510. trigger: ['blur','change']
  2511. }
  2512. ],
  2513. seqNoType: [
  2514. {
  2515. required: true,
  2516. message: ' ',
  2517. trigger: ['blur','change']
  2518. }
  2519. ],
  2520. partNoType: [
  2521. {
  2522. required: true,
  2523. message: ' ',
  2524. trigger: ['blur','change']
  2525. }
  2526. ],
  2527. umIdType: [
  2528. {
  2529. required: true,
  2530. message: ' ',
  2531. trigger: ['blur','change']
  2532. }
  2533. ],
  2534. templateId: [
  2535. {
  2536. required: true,
  2537. message: ' ',
  2538. trigger: ['blur','change']
  2539. }
  2540. ],
  2541. bu:[
  2542. {
  2543. required: true,
  2544. message: ' ',
  2545. trigger: ['blur','change']
  2546. }
  2547. ]
  2548. },
  2549. resourceList: [],
  2550. operationList: [],
  2551. partList: [],
  2552. batchHandleAddModalFlag: false,
  2553. batchAddData: {
  2554. samplingLocation: '',
  2555. samplingLocationB: '',
  2556. samplingNumber: ''
  2557. },
  2558. controlData: {},
  2559. templateData: {
  2560. site: '',
  2561. bu: '',
  2562. templateId: '',
  2563. templateName: '',
  2564. inspectionTypeNo: '',
  2565. inspectionTypeName: ''
  2566. },
  2567. templateModelFlag: false,
  2568. templateDetailList: [
  2569. {
  2570. columnProp: 'templateId',
  2571. headerAlign: "center",
  2572. align: "center",
  2573. columnLabel: '模板编码',
  2574. columnHidden: false,
  2575. columnImage: false,
  2576. columnSortable: false,
  2577. sortLv: 0,
  2578. status: true,
  2579. fixed: '',
  2580. },
  2581. {
  2582. columnProp: 'templateName',
  2583. headerAlign: "center",
  2584. align: "center",
  2585. columnLabel: '模板名称',
  2586. columnHidden: false,
  2587. columnImage: false,
  2588. columnSortable: false,
  2589. sortLv: 0,
  2590. status: true,
  2591. fixed: '',
  2592. },
  2593. {
  2594. columnProp: 'inspectionTypeName',
  2595. headerAlign: "center",
  2596. align: "center",
  2597. columnLabel: '检验类型',
  2598. columnHidden: false,
  2599. columnImage: false,
  2600. columnSortable: false,
  2601. sortLv: 0,
  2602. status: true,
  2603. fixed: '',
  2604. },
  2605. ],
  2606. checked: false,
  2607. typeOptions: [],
  2608. disposalMeasuresOptions: [],
  2609. timeout: null,
  2610. partData: {
  2611. site: '',
  2612. bu: '',
  2613. partNo: '',
  2614. partDesc: '',
  2615. sku: '',
  2616. cinvSourceCode: ''
  2617. },
  2618. partDetailList: [
  2619. {
  2620. columnProp: 'partNo',
  2621. headerAlign: "center",
  2622. align: "center",
  2623. columnLabel: '物料编码',
  2624. columnHidden: false,
  2625. columnImage: false,
  2626. columnSortable: false,
  2627. sortLv: 0,
  2628. status: true,
  2629. fixed: '',
  2630. },
  2631. {
  2632. columnProp: 'partDesc',
  2633. headerAlign: "center",
  2634. align: "center",
  2635. columnLabel: '物料名称',
  2636. columnHidden: false,
  2637. columnImage: false,
  2638. columnSortable: false,
  2639. sortLv: 0,
  2640. status: true,
  2641. fixed: '',
  2642. },
  2643. {
  2644. columnProp: 'sku',
  2645. headerAlign: "center",
  2646. align: "center",
  2647. columnLabel: 'SKU',
  2648. columnHidden: false,
  2649. columnImage: false,
  2650. columnSortable: false,
  2651. sortLv: 0,
  2652. status: true,
  2653. fixed: '',
  2654. },
  2655. {
  2656. columnProp: 'cinvSourceCode',
  2657. headerAlign: "center",
  2658. align: "center",
  2659. columnLabel: 'PN',
  2660. columnHidden: false,
  2661. columnImage: false,
  2662. columnSortable: false,
  2663. sortLv: 0,
  2664. status: true,
  2665. fixed: '',
  2666. },
  2667. ],
  2668. partModelFlag: false,
  2669. umList: [],
  2670. userBuList: [],
  2671. buList: [],
  2672. authSearch: false,
  2673. authSave: false,
  2674. authCheck: false,
  2675. authCancelCheck: false,
  2676. authDelete: false,
  2677. authDetail: false,
  2678. authFile: false,
  2679. authExceptionModify: false,
  2680. exceptionModifyMode: false,
  2681. exceptionModifyInspectionResult: '',
  2682. exceptionModifyItemResultMap: {},
  2683. menuId: this.$route.meta.menuId,
  2684. roleList: [],
  2685. operatorList: [],
  2686. operatorData: {
  2687. flag: '',
  2688. site: '',
  2689. bu: '',
  2690. adminID: '',
  2691. adminName: '',
  2692. roleName: '',
  2693. roleId: '',
  2694. userName: this.$store.state.user.name
  2695. },
  2696. operatorModelFlag: false,
  2697. dataListSelections2: [],
  2698. operatorDetailList: [
  2699. {
  2700. columnProp: 'adminID',
  2701. headerAlign: "center",
  2702. align: "center",
  2703. columnLabel: '用户账号',
  2704. columnHidden: false,
  2705. columnImage: false,
  2706. columnSortable: false,
  2707. sortLv: 0,
  2708. status: true,
  2709. fixed: '',
  2710. },
  2711. {
  2712. columnProp: 'adminName',
  2713. headerAlign: "center",
  2714. align: "center",
  2715. columnLabel: '用户名称',
  2716. columnHidden: false,
  2717. columnImage: false,
  2718. columnSortable: false,
  2719. sortLv: 0,
  2720. status: true,
  2721. fixed: '',
  2722. },
  2723. {
  2724. columnProp: 'email',
  2725. headerAlign: "center",
  2726. align: "center",
  2727. columnLabel: '邮箱',
  2728. columnHidden: false,
  2729. columnImage: false,
  2730. columnSortable: false,
  2731. sortLv: 0,
  2732. status: true,
  2733. fixed: '',
  2734. },
  2735. {
  2736. columnProp: 'phone',
  2737. headerAlign: "center",
  2738. align: "center",
  2739. columnLabel: '手机号',
  2740. columnHidden: false,
  2741. columnImage: false,
  2742. columnSortable: false,
  2743. sortLv: 0,
  2744. status: true,
  2745. fixed: '',
  2746. },
  2747. ],
  2748. acquisitionList: [],
  2749. ItemObjectModelFlag: false,
  2750. itemObjectList: [],
  2751. itemObjectColumnList: [
  2752. {
  2753. columnProp: 'itemNo',
  2754. headerAlign: "center",
  2755. align: "center",
  2756. columnLabel: '项目编码',
  2757. columnHidden: false,
  2758. columnImage: false,
  2759. status: true,
  2760. columnWidth: 120,
  2761. },
  2762. {
  2763. columnProp: 'itemDesc',
  2764. headerAlign: "center",
  2765. align: "left",
  2766. columnLabel: '项目名称',
  2767. columnHidden: false,
  2768. columnImage: false,
  2769. status: true,
  2770. columnWidth: 200,
  2771. },
  2772. ],
  2773. actionData: {
  2774. site: '',
  2775. buNo: '',
  2776. inspectionNo: ''
  2777. },
  2778. fileLoading: false,
  2779. subDetailLoading: false,
  2780. saveLoading: false,
  2781. searchLoading: false,
  2782. // FQC项目操作相关
  2783. itemOperationDialogFlag: false,
  2784. itemOperationQuery: {
  2785. itemNo: '',
  2786. itemDesc: '',
  2787. },
  2788. availableItemList: [],
  2789. selectedItemList: [],
  2790. availableItemSelections: [],
  2791. selectedItemSelections: [],
  2792. // FQC模板导入相关
  2793. templateImportDialogFlag: false,
  2794. templateQuery: {
  2795. templateId: '',
  2796. templateDesc: '',
  2797. },
  2798. templateList: [],
  2799. templateSelections: [],
  2800. importLoading: false
  2801. }
  2802. },
  2803. mounted () {
  2804. this.calculateTableHeight();
  2805. window.addEventListener('resize', this.calculateTableHeight);
  2806. },
  2807. beforeDestroy() {
  2808. window.removeEventListener('resize', this.calculateTableHeight);
  2809. },
  2810. created () {
  2811. // 按钮控制
  2812. this.getButtonAuthData()
  2813. // 获取用户的 site 和 bu
  2814. this.getSiteAndBuByUserName()
  2815. // 获取用户的 site 和 bu
  2816. this.getSiteAndBuByUserName2()
  2817. // 收藏
  2818. this.favoriteIsOk()
  2819. // 检验类型
  2820. this.inspectionTypeSearch()
  2821. // 处置措施
  2822. this.disposalMeasuresSearch()
  2823. // 单位
  2824. this.umSearch()
  2825. // 查看 质量任务生成规则控制 动控是否开启
  2826. this.queryController()
  2827. // 动态列
  2828. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2829. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2830. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2831. if (!this.authSearch) {
  2832. // 获取数据列表
  2833. this.getDataList()
  2834. }
  2835. // 获取用户角色
  2836. this.getUserRoleList()
  2837. // 加载工序下拉列表
  2838. this.loadOperationDescList()
  2839. },
  2840. methods: {
  2841. // 加载工序下拉列表
  2842. loadOperationDescList() {
  2843. const params = {
  2844. userName: this.$store.state.user.name
  2845. }
  2846. getAllOperationDescList(params).then(({data}) => {
  2847. if (data && data.code === 0) {
  2848. this.operationDescList = data.rows || []
  2849. }
  2850. })
  2851. },
  2852. // 切换搜索框展开/收起
  2853. toggleSearchExpand() {
  2854. this.searchExpanded = !this.searchExpanded;
  2855. this.calculateTableHeight();
  2856. },
  2857. // 计算表格高度
  2858. calculateTableHeight() {
  2859. this.$nextTick(() => {
  2860. const windowHeight = window.innerHeight;
  2861. const headerHeight = this.searchExpanded ? 412 : 186;
  2862. this.height = windowHeight - headerHeight - 65;
  2863. });
  2864. },
  2865. formatMainListCellValue (row, column) {
  2866. if (!row || !column) {
  2867. return ''
  2868. }
  2869. const value = row[column.columnProp]
  2870. if ((column.columnProp === 'taskDate' || column.columnProp === 'task_date') && value) {
  2871. const formattedValue = this.dayjs(value).format('YYYY-MM-DD HH:mm:ss')
  2872. return formattedValue === 'Invalid Date' ? value : formattedValue
  2873. }
  2874. return value
  2875. },
  2876. // 重置搜索条件
  2877. resetSearch() {
  2878. this.searchData = {
  2879. site: '',
  2880. userName: this.$store.state.user.name,
  2881. inspectionNo: '',
  2882. inspectionTypeNo: '',
  2883. isQualified: '',
  2884. buNo: '',
  2885. startDate: '',
  2886. endDate: '',
  2887. startDate2: '',
  2888. endDate2: '',
  2889. partNo:'',
  2890. partDesc:'',
  2891. cinvSourceCode:'',
  2892. sku:'',
  2893. state: '',
  2894. inspectionResult: '',
  2895. disposalMeasures: '',
  2896. page: 1,
  2897. limit: 10,
  2898. states: ['未开始','待检验'],
  2899. orderNo: '',
  2900. seqNo: '',
  2901. operationDesc: '',
  2902. documentNo: ''
  2903. }
  2904. },
  2905. // 获取用户的bu
  2906. getSiteAndBuByUserName2 () {
  2907. let tempData = {
  2908. username: this.$store.state.user.name,
  2909. }
  2910. getSiteAndBuByUserName2(tempData).then(({data}) => {
  2911. if (data.code === 0) {
  2912. this.buList = data.rows
  2913. }
  2914. })
  2915. },
  2916. // 批量打印标签
  2917. printList () {
  2918. if (this.FAISelections.length === 0) {
  2919. this.$message.warning('请勾选要打印的检验单!')
  2920. return
  2921. }
  2922. const inspectionNos = this.$refs.qrCode.init(this.FAISelections.map(item => item.inspectionNo))
  2923. for (let i = 0; i < inspectionNos.length; i++) {
  2924. this.FAISelections[i].qrCode = inspectionNos[i]
  2925. }
  2926. qcPrint(this.FAISelections)
  2927. },
  2928. // 数据采集
  2929. dataAcquisition () {
  2930. this.loadFlag = true
  2931. let tempDate = {
  2932. site: this.detailData.site,
  2933. buNo: this.detailData.buNo,
  2934. inspectionNo: this.detailData.inspectionNo,
  2935. flag: 'fqc'
  2936. }
  2937. dataAcquisition(tempDate).then(({data}) => {
  2938. if (data.code === 0) {
  2939. this.changeMyString(data.rows)
  2940. this.$message.success('数据采集成功')
  2941. } else {
  2942. this.$message.error(data.msg)
  2943. }
  2944. this.loadFlag = false
  2945. })
  2946. },
  2947. // 根据项目数据采集
  2948. dataAcquisitionByItem (row) {
  2949. this.loadFlag = true
  2950. let tempDate = {
  2951. site: row.site,
  2952. buNo: row.buNo,
  2953. inspectionNo: row.inspectionNo,
  2954. templateId: row.templateId,
  2955. itemNo: row.itemNo,
  2956. flag: 'fqc'
  2957. }
  2958. dataAcquisitionByItem(tempDate).then(({data}) => {
  2959. if (data.code === 0) {
  2960. this.changeMyString(data.rows)
  2961. this.$message.success('数据采集成功')
  2962. } else {
  2963. this.$message.error(data.msg)
  2964. }
  2965. this.loadFlag = false
  2966. })
  2967. },
  2968. // 获取用户角色
  2969. getUserRoleList () {
  2970. getUserRoleList().then(({data}) => {
  2971. if (data.code === 0) {
  2972. this.roleList = data.rows
  2973. } else {
  2974. this.roleList = []
  2975. }
  2976. })
  2977. },
  2978. // 获取协同人员列表
  2979. getOperatorList () {
  2980. this.operatorData.flag = '1'
  2981. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2982. if (this.roleList.length > 0) {
  2983. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2984. if (filterList.length > 0) {
  2985. this.operatorData.roleId = filterList[0].roleId
  2986. } else {
  2987. this.operatorData.roleId = this.roleList[0].roleId
  2988. }
  2989. } else {
  2990. this.operatorData.roleId = ''
  2991. }
  2992. // 先清空缓存选中
  2993. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2994. // 拿到选中的人员编号
  2995. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2996. getOperatorList(this.operatorData).then(({data}) => {
  2997. if (data && data.code === 0) {
  2998. this.operatorList = data.rows
  2999. this.operatorList.forEach(val => {
  3000. // 回显选中
  3001. if (tempDataList.includes(val.adminID)) {
  3002. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3003. }
  3004. })
  3005. this.operatorModelFlag = true
  3006. } else {
  3007. this.$message.error(data.msg)
  3008. }
  3009. })
  3010. },
  3011. // 获取责任人员列表
  3012. getResponsiblePersonList () {
  3013. this.operatorData.flag = '2'
  3014. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  3015. // 先清空缓存选中
  3016. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  3017. // 拿到选中的人员编号
  3018. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  3019. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  3020. if (data && data.code === 0) {
  3021. this.operatorList = data.rows
  3022. this.operatorList.forEach(val => {
  3023. // 回显选中
  3024. if (tempDataList.includes(val.adminID)) {
  3025. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3026. }
  3027. })
  3028. this.operatorModelFlag = true
  3029. } else {
  3030. this.$message.error(data.msg)
  3031. }
  3032. })
  3033. },
  3034. // 查询机修人员列表
  3035. getOperatorList2 () {
  3036. if (this.operatorData.flag === '1') {
  3037. // 拿到选中的人员编号
  3038. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  3039. getOperatorList(this.operatorData).then(({data}) => {
  3040. if (data && data.code === 0) {
  3041. this.operatorList = data.rows
  3042. this.operatorList.forEach(val => {
  3043. // 回显选中的部门
  3044. if (tempDataList.includes(val.adminID)) {
  3045. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3046. }
  3047. })
  3048. } else {
  3049. this.operatorList = []
  3050. }
  3051. })
  3052. } else {
  3053. // 拿到选中的人员编号
  3054. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  3055. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  3056. if (data && data.code === 0) {
  3057. this.operatorList = data.rows
  3058. this.operatorList.forEach(val => {
  3059. // 回显选中的部门
  3060. if (tempDataList.includes(val.adminID)) {
  3061. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3062. }
  3063. })
  3064. } else {
  3065. this.operatorList = []
  3066. }
  3067. })
  3068. }
  3069. },
  3070. // 点击行选中复选框
  3071. operatorClickRow (row) {
  3072. this.$refs.operatorTable.toggleRowSelection(row)
  3073. },
  3074. // 多选
  3075. selectionChangeHandle2 (val) {
  3076. this.dataListSelections2 = val
  3077. },
  3078. // 确认多选协同人员
  3079. confirmOperator () {
  3080. if (this.dataListSelections2.length === 0) {
  3081. this.$message.warning('请勾选人员!')
  3082. return
  3083. }
  3084. if (this.operatorData.flag === '1') {
  3085. for (let i = 0; i < this.dataListSelections2.length; i++) {
  3086. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  3087. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  3088. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  3089. }
  3090. }
  3091. if (this.detailData.operator.charAt(0) === ';') {
  3092. this.detailData.operator = this.detailData.operator.substring(1)
  3093. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  3094. }
  3095. } else {
  3096. for (let i = 0; i < this.dataListSelections2.length; i++) {
  3097. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  3098. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  3099. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  3100. }
  3101. }
  3102. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  3103. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  3104. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  3105. }
  3106. }
  3107. this.operatorData = {
  3108. flag: '',
  3109. site: '',
  3110. bu: '',
  3111. adminID: '',
  3112. adminName: '',
  3113. roleName: '',
  3114. roleId: '',
  3115. userName: this.$store.state.user.name
  3116. }
  3117. this.operatorModelFlag = false
  3118. },
  3119. // bu内容改变事件
  3120. buChange () {
  3121. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  3122. this.modalData.templateId = ''
  3123. this.modalData.templateName = ''
  3124. } else { // 无工单检验
  3125. this.modalData.partNo = ''
  3126. this.modalData.partDesc = ''
  3127. this.modalData.invdefinetype = ''
  3128. this.modalData.sku = ''
  3129. this.modalData.cinvSourceCode = ''
  3130. this.modalData.templateId = ''
  3131. this.modalData.templateName = ''
  3132. }
  3133. },
  3134. // 获取用户的bu
  3135. getSiteAndBuByUserName () {
  3136. let tempData = {
  3137. username: this.$store.state.user.name,
  3138. }
  3139. getSiteAndBuByUserName(tempData).then(({data}) => {
  3140. if (data.code === 0) {
  3141. this.userBuList = data.rows
  3142. }
  3143. })
  3144. },
  3145. // 子明细导入
  3146. subDetailUpload () {
  3147. let currentData = {
  3148. flag: 'FQC',
  3149. site: this.detailData.site,
  3150. buNo: this.detailData.buNo,
  3151. inspectionNo: this.detailData.inspectionNo
  3152. }
  3153. //打开组件 去做新增业务
  3154. this.$nextTick(() => {
  3155. this.$refs.subDetailUpload.init(currentData)
  3156. })
  3157. },
  3158. // 查询单位
  3159. umSearch () {
  3160. let tempData = {
  3161. site: this.$store.state.user.site,
  3162. active: 'Y'
  3163. }
  3164. umSearch(tempData).then(({data}) => {
  3165. if (data.code === 0) {
  3166. this.umList = data.rows
  3167. }
  3168. })
  3169. },
  3170. // 标签号回车事件
  3171. rollNoEnter () {
  3172. const regex = /\(08\)(.*)/
  3173. const result = this.modalData.rollNo.match(regex)
  3174. let tempData = {
  3175. site: '',
  3176. bu: this.modalData.bu,
  3177. rollNo: result == null ? this.modalData.rollNo : result[1]
  3178. }
  3179. rollNoEnter(tempData).then(({data}) => {
  3180. if (data && data.code === 0) {
  3181. this.operationList = data.rows
  3182. this.modalData.seqNo = data.rows[0].seqNo
  3183. this.modalData.orderNo = data.rows[0].orderNo
  3184. this.modalData.operationDesc = data.rows[0].operationDesc
  3185. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3186. this.modalData.resourceId = data.rows[0].resourceId
  3187. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3188. this.modalData.partNo = data.rows[0].partNo
  3189. this.modalData.partDesc = data.rows[0].partDesc
  3190. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3191. this.modalData.sku = data.rows[0].sku
  3192. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3193. } else {
  3194. this.$message.error(data.msg)
  3195. }
  3196. })
  3197. },
  3198. querySearchAsync (queryString, cb) {
  3199. clearTimeout(this.timeout)
  3200. let results = []
  3201. if (queryString === '') {
  3202. cb(results)
  3203. } else {
  3204. // 掉接口需要的参数
  3205. let find = {
  3206. rollNo: queryString, //上面输入框绑定的数据
  3207. site: this.$store.state.user.site,
  3208. }
  3209. // 这里去调后端的接口.根据自己接口的情况进行赋值
  3210. getRollNo(find).then(({data}) => {
  3211. if (data.code === 0) {
  3212. let result = data.rows
  3213. // 循环放到一个远程搜索需要的数组
  3214. for (let i = 0; i < result.length; i++) {
  3215. const element = result[i]
  3216. results.push({
  3217. value: element.rollNo,
  3218. seqNo: element.seqNo,
  3219. orderNo: element.orderNo
  3220. })
  3221. }
  3222. cb(results)
  3223. } else {
  3224. results = []
  3225. cb(results)
  3226. }
  3227. })
  3228. }
  3229. },
  3230. // 点击出现搜索后点击的每一项
  3231. handleSelect (item) {
  3232. this.modalData.rollNo = item.value
  3233. this.modalData.seqNo = item.seqNo
  3234. this.modalData.orderNo = item.orderNo
  3235. this.getOperationList()
  3236. //this.getPartList()
  3237. },
  3238. // 获取处置措施列表
  3239. disposalMeasuresSearch () {
  3240. let tempData = {
  3241. inspectionTypeNo: '107'
  3242. }
  3243. disposalMeasuresSearch(tempData).then(({data}) => {
  3244. if (data.code === 0) {
  3245. this.disposalMeasuresOptions = data.rows
  3246. }
  3247. })
  3248. },
  3249. // 查询检验类型
  3250. inspectionTypeSearch () {
  3251. let tempData = {
  3252. site: this.$store.state.user.site
  3253. }
  3254. inspectionTypeSearch(tempData).then(({data}) => {
  3255. if (data.code === 0) {
  3256. this.typeOptions = data.rows
  3257. this.typeOptions.forEach(val => {
  3258. if (val.inspectionTypeName.includes('FQC')) {
  3259. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  3260. this.templateData.inspectionTypeName = val.inspectionTypeName
  3261. }
  3262. })
  3263. }
  3264. })
  3265. },
  3266. // 获取基础数据列表S
  3267. getBaseList (val,type) {
  3268. this.tagNo = val
  3269. this.$nextTick(() => {
  3270. let strVal = ''
  3271. if (val === 1052) {
  3272. this.searchSeqInfo()
  3273. this.seqDetailFlag = true
  3274. }
  3275. if (val === 505) {
  3276. strVal = this.modalData.resourceDesc
  3277. this.$refs.baseList.init(val, strVal)
  3278. }
  3279. })
  3280. },
  3281. /* 列表方法的回调 */
  3282. getBaseData (val) {
  3283. if (this.tagNo === 1052) {
  3284. this.modalData.seqNo = val.seqno
  3285. this.modalData.orderNo = val.orderno
  3286. this.modalData.operationDesc = ''
  3287. this.modalData.resourceId = ''
  3288. this.getOperationList()
  3289. }
  3290. if (this.tagNo === 505) {
  3291. this.modalData.resourceId = val.resource_id
  3292. this.modalData.resourceDesc = val.resource_desc
  3293. }
  3294. },
  3295. // 获取机台列表
  3296. getResourceList () {
  3297. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  3298. if (this.modalData.specialTaskFlag === 'Y') {
  3299. return
  3300. } else {
  3301. getResourceList(this.modalData).then(({data}) => {
  3302. if (data && data.code === 0) {
  3303. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3304. this.modalData.resourceId = data.rows[0].resourceId
  3305. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3306. } else {
  3307. this.$message.error(data.msg)
  3308. }
  3309. })
  3310. }
  3311. },
  3312. // 获取工序列表
  3313. getOperationList () {
  3314. getOperationList(this.modalData).then(({data}) => {
  3315. if (data && data.code === 0) {
  3316. this.operationList = data.rows
  3317. this.modalData.operationDesc = data.rows[0].operationDesc
  3318. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3319. this.modalData.resourceId = data.rows[0].resourceId
  3320. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3321. this.modalData.partNo = data.rows[0].partNo
  3322. this.modalData.partDesc = data.rows[0].partDesc
  3323. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3324. this.modalData.sku = data.rows[0].sku
  3325. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3326. this.modalData.operationDesc = data.rows[0].operationDesc
  3327. this.modalData.qtyrequired = data.rows[0].qtyrequired
  3328. this.modalData.lotsize = data.rows[0].lotsize
  3329. } else {
  3330. this.$message.error(data.msg)
  3331. }
  3332. })
  3333. },
  3334. // 获取物料列表
  3335. getPartList () {
  3336. getPartList(this.modalData).then(({data}) => {
  3337. if (data && data.code === 0) {
  3338. this.partList = data.rows
  3339. this.modalData.partNo = this.partList[0].partNo
  3340. this.modalData.partDesc = this.partList[0].partDesc
  3341. this.modalData.invdefinetype = this.partList[0].invdefinetype
  3342. this.modalData.sku = this.partList[0].sku
  3343. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  3344. } else {
  3345. this.$message.error(data.msg)
  3346. }
  3347. })
  3348. },
  3349. // 是否新增特殊任务
  3350. changeSpecialTask () {
  3351. // 先重置数据
  3352. this.modalData = {
  3353. flag: '1',
  3354. site: '',
  3355. bu: this.userBuList[0].buNo,
  3356. inspectionNo: '',
  3357. partNo: '',
  3358. partDesc: '',
  3359. inspectionTypeNo: '',
  3360. inspectionTypeName: '',
  3361. inspectorNo: '',
  3362. inspectorName: '',
  3363. submit_flag: '',
  3364. orderNo: '',
  3365. operationDesc: '',
  3366. operationNo: '',
  3367. resourceId: '',
  3368. resourceDesc: '',
  3369. rollQty: '',
  3370. seqNo: '',
  3371. batchRollNo: '',
  3372. invdefinetype: '',
  3373. sku: '',
  3374. cinvSourceCode: '',
  3375. specialRequirements: '',
  3376. templateId: '',
  3377. templateName: '',
  3378. specialTaskFlag: '',
  3379. workCenterNo: '',
  3380. rollNo: '',
  3381. umId: this.umList[0].umId,
  3382. umName: this.umList[0].umName
  3383. }
  3384. // 获取选中框
  3385. let obj = document.getElementsByName('specialTask')
  3386. // 判断是否打勾
  3387. if (obj[0].checked) {
  3388. let tempData = {
  3389. site: '',
  3390. bu: this.modalData.bu
  3391. }
  3392. this.modalData.specialTaskFlag = 'Y'
  3393. // 获取特殊工序列表
  3394. getSpecialOperationList(tempData).then(({data}) => {
  3395. if (data && data.code === 0) {
  3396. this.operationList = data.rows
  3397. } else {
  3398. this.$message.error(data.msg)
  3399. }
  3400. })
  3401. // 派工单和工单号赋值
  3402. this.modalData.seqNo = '000#1TSGD'
  3403. this.modalData.orderNo = '000#1'
  3404. } else {
  3405. this.operationList = []
  3406. this.modalData.specialTaskFlag = ''
  3407. }
  3408. },
  3409. // 新增FAI巡检记录
  3410. saveData () {
  3411. if (this.modalData.bu === '' || this.modalData.bu == null) {
  3412. this.$message.warning('请选择BU!')
  3413. return
  3414. }
  3415. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  3416. this.$message.warning('请选择派工单!')
  3417. return
  3418. }
  3419. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  3420. this.$message.warning('请选择工单!')
  3421. return
  3422. }
  3423. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  3424. this.$message.warning('请选择物料!')
  3425. return
  3426. }
  3427. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  3428. this.$message.warning('请选择工序!')
  3429. return
  3430. }
  3431. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  3432. this.$message.warning('请选择机台!')
  3433. return
  3434. }
  3435. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  3436. this.$message.warning('请填写送检数量!')
  3437. return
  3438. }
  3439. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3440. this.$message.warning('请选择单位!')
  3441. return
  3442. }
  3443. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  3444. this.$message.warning('请选择检验模板!')
  3445. return
  3446. }
  3447. this.saveLoading = true
  3448. if (this.modalData.flag === '1') {
  3449. saveFQCInspection(this.modalData).then(({data}) => {
  3450. if (data && data.code === 0) {
  3451. this.getDataList()
  3452. this.operationList = []
  3453. this.resourceList = []
  3454. this.partList = []
  3455. this.modalFlag = false
  3456. this.$message.success('操作成功')
  3457. } else {
  3458. this.$message.error(data.msg)
  3459. }
  3460. this.saveLoading = false
  3461. }).catch(()=>{
  3462. this.saveLoading = false
  3463. })
  3464. }
  3465. },
  3466. // 检查动控是否开启
  3467. queryController () {
  3468. let tempData = {
  3469. controlNo: '10004',
  3470. site: this.$store.state.user.site,
  3471. }
  3472. queryController(tempData).then(({data}) => {
  3473. if (data && data.code === 0) {
  3474. this.controlData = data.rows
  3475. } else {
  3476. this.$message.error(data.msg)
  3477. }
  3478. })
  3479. },
  3480. // 新增
  3481. addModal () {
  3482. this.modalData = {
  3483. flag: '1',
  3484. site: '',
  3485. bu: this.userBuList[0].buNo,
  3486. inspectionNo: '',
  3487. partNo: '',
  3488. partDesc: '',
  3489. inspectionTypeNo: '107',
  3490. inspectionTypeName: '',
  3491. inspectorNo: '',
  3492. inspectorName: '',
  3493. submit_flag: '',
  3494. orderNo: '',
  3495. operationDesc: '',
  3496. operationNo: '',
  3497. resourceId: '',
  3498. resourceDesc: '',
  3499. rollQty: '',
  3500. seqNo: '',
  3501. batchRollNo: '',
  3502. invdefinetype: '',
  3503. sku: '',
  3504. cinvSourceCode: '',
  3505. specialRequirements: '',
  3506. templateId: '',
  3507. templateName: '',
  3508. specialTaskFlag: '',
  3509. workCenterNo: '',
  3510. rollNo: '',
  3511. umId: this.umList[0].umId,
  3512. umName: this.umList[0].umName,
  3513. sjzs: '',
  3514. }
  3515. this.operationList = []
  3516. this.resourceList = []
  3517. this.partList = []
  3518. this.modalFlag = true
  3519. this.checked = false
  3520. },
  3521. // 获取检验模板列表
  3522. queryTemplateList () {
  3523. this.templateData.bu = this.modalData.bu
  3524. // 查询所有检验模板
  3525. queryTemplateList(this.templateData).then(({data}) => {
  3526. if (data && data.code === 0) {
  3527. this.templateList = data.rows
  3528. this.templateModelFlag = true
  3529. }else {
  3530. this.$message.error(data.msg)
  3531. }
  3532. })
  3533. },
  3534. // 获取物料列表
  3535. queryPartList () {
  3536. this.partData.bu = this.modalData.bu
  3537. // 查询所有物料
  3538. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3539. this.partList = []
  3540. this.partModelFlag = true
  3541. } else {
  3542. queryPartList(this.partData).then(({data}) => {
  3543. if (data && data.code === 0) {
  3544. this.partList = data.rows
  3545. this.partModelFlag = true
  3546. } else {
  3547. this.$message.error(data.msg)
  3548. }
  3549. })
  3550. }
  3551. },
  3552. // 选中检验模板
  3553. getRowData (row) {
  3554. this.modalData.templateId = row.templateId
  3555. this.modalData.templateName = row.templateName
  3556. this.templateModelFlag = false
  3557. },
  3558. // 选中派工单号
  3559. getRowData1 (row) {
  3560. this.modalData.sku = row.sku
  3561. this.modalData.cinvSourceCode = row.cinvSourceCode
  3562. this.modalData.orderNo = row.orderNo
  3563. this.modalData.seqNo = row.seqNo
  3564. this.modalData.lotsize = row.lotsize
  3565. this.modalData.operationDesc = row.operationDesc
  3566. this.modalData.qtyrequired = row.qtyrequired
  3567. this.modalData.rollQty = row.qtyrequired
  3568. this.modalData.sjzs = row.sjzs
  3569. this.getOperationList()
  3570. this.seqDetailFlag = false
  3571. },
  3572. // 选中物料
  3573. getRowData2 (row) {
  3574. this.modalData.partNo = row.partNo
  3575. this.modalData.partDesc = row.partDesc
  3576. this.modalData.sku = row.sku
  3577. this.modalData.cinvSourceCode = row.cinvSourceCode
  3578. this.modalData.invdefinetype = row.invdefinetype
  3579. this.partData = {
  3580. site: '',
  3581. bu: '',
  3582. partNo: '',
  3583. partDesc: '',
  3584. sku: '',
  3585. cinvSourceCode: ''
  3586. }
  3587. this.partModelFlag = false
  3588. },
  3589. selectFlag () {
  3590. return true
  3591. },
  3592. // 单机选中
  3593. FAIClickRow (row) {
  3594. this.$refs.FAITable.toggleRowSelection(row)
  3595. },
  3596. // 复选
  3597. selectionFAI (val) {
  3598. this.FAISelections = val
  3599. },
  3600. // 刷新派设备文档的列表
  3601. getFileContentData (row) {
  3602. this.currentFileRow = row
  3603. this.fileActiveTab = 'qcFile'
  3604. let currentData = {
  3605. orderRef1: row.site,
  3606. orderRef2: row.inspectionNo,
  3607. orderRef4: row.buNo,
  3608. partNo: row.partNo
  3609. }
  3610. this.fileLoading = true
  3611. getInspectionFile(currentData).then(({data}) => {
  3612. if (data && data.code === 0) {
  3613. this.fileContentList = data.rows
  3614. } else {
  3615. this.fileContentList = []
  3616. }
  3617. this.fileLoading = false
  3618. }).catch(()=>{
  3619. this.fileLoading = false
  3620. })
  3621. this.getSopFileList(row)
  3622. this.fileFlag = true
  3623. },
  3624. // 打开文件清单外部链接(按物料编码)
  3625. openFileExternalLink () {
  3626. const partNo = (this.currentFileRow && this.currentFileRow.partNo) || this.detailData.partNo
  3627. if (!partNo) {
  3628. this.$message.error('物料号不能为空')
  3629. return false
  3630. }
  3631. const baseUrl = window.SITE_CONFIG['materialSopUrl'] || 'http://pdm.bt.in/#/public/materialDocs'
  3632. const targetUrl = `${baseUrl}/${partNo}/all`
  3633. window.open(targetUrl, '_blank')
  3634. },
  3635. // 获取SOP文件列表(FQC传所有条件:site, partNo, operationDesc, workcenterNo, orderNo)
  3636. getSopFileList(row) {
  3637. this.sopFileLoading = true
  3638. this.sopFileList = []
  3639. searchQcSopFileList({
  3640. site: row.site,
  3641. partNo: row.partNo || '',
  3642. operationDesc: row.operationDesc || '',
  3643. workcenterNo: row.workCenterNo || '',
  3644. orderNo: row.orderNo || ''
  3645. }).then(({data}) => {
  3646. if (data && data.code === 0) {
  3647. this.sopFileList = data.rows || []
  3648. } else {
  3649. this.sopFileList = []
  3650. }
  3651. this.sopFileLoading = false
  3652. }).catch(() => {
  3653. this.sopFileList = []
  3654. this.sopFileLoading = false
  3655. })
  3656. },
  3657. previewSopFile(row) {
  3658. if (!row.sopUrl) {
  3659. this.$message.warning('该文件暂无预览路径')
  3660. return
  3661. }
  3662. const fileName = row.sopName || row.sopUrl
  3663. downloadSopFile(row.sopUrl).then(({ data }) => {
  3664. this.$filePreview.previewFile(data, fileName).then(result => {
  3665. if (result.message) {
  3666. this.$message.success(result.message)
  3667. }
  3668. }).catch(error => {
  3669. this.$message.error('文件预览失败:' + (error.message || '未知错误'))
  3670. })
  3671. }).catch(() => {
  3672. this.$message.error('文件下载失败,请稍后重试')
  3673. })
  3674. },
  3675. // 新增文件的modal
  3676. addUploadFileModal () {
  3677. let currentData = {
  3678. titleCon: 'FQC文件上传',
  3679. site: this.detailData.site,
  3680. buNo: this.detailData.buNo,
  3681. createBy: this.$store.state.user.name,
  3682. inspectionNo: this.detailData.inspectionNo,
  3683. remark: '',
  3684. folder: 'qcFQC',
  3685. }
  3686. //打开组件 去做新增业务
  3687. this.$nextTick(() => {
  3688. this.$refs.qcFAIUploadFile.init(currentData)
  3689. })
  3690. },
  3691. // 上传项目图片
  3692. uploadImageModal (row) {
  3693. // 打开上传图片前先应用当前数据,防止上传完成刷新表单后导致未保存的数据丢失
  3694. if (this.detailData.state === '待检验') {
  3695. this.Transfer('1')
  3696. }
  3697. let currentData = {
  3698. site: this.detailData.site,
  3699. buNo: this.detailData.buNo,
  3700. createBy: this.$store.state.user.name,
  3701. inspectionNo: this.detailData.inspectionNo,
  3702. itemNo: row.itemNo,
  3703. folder: 'FQCItemImageFile'
  3704. }
  3705. //打开组件 去做新增业务
  3706. this.$nextTick(() => {
  3707. this.$refs.comQcItemImageUploadFile.init(currentData)
  3708. })
  3709. },
  3710. // 获取主信息数据列表
  3711. getDataList () {
  3712. this.searchLoading = true
  3713. this.searchData.limit = this.pageSize
  3714. this.searchData.page = this.pageIndex
  3715. qcFQCInspectionSearch(this.searchData).then(({data}) => {
  3716. if (data.code === 0) {
  3717. this.dataList = data.page.list
  3718. this.pageIndex = data.page.currPage
  3719. this.pageSize = data.page.pageSize
  3720. this.totalPage = data.page.totalCount
  3721. this.searchLoading = false
  3722. } else {
  3723. this.searchLoading = false
  3724. }
  3725. }).catch(()=>{
  3726. this.searchLoading = false
  3727. })
  3728. },
  3729. // 每页数
  3730. sizeChangeHandle (val) {
  3731. this.pageSize = val
  3732. this.pageIndex = 1
  3733. this.getDataList()
  3734. },
  3735. // 当前页
  3736. currentChangeHandle (val) {
  3737. this.pageIndex = val
  3738. this.getDataList()
  3739. },
  3740. // 导出excel - 获取所有数据
  3741. async createExportData () {
  3742. this.searchData.limit = -1
  3743. this.searchData.page = 1
  3744. const { data } = await qcFQCInspectionSearch(this.searchData)
  3745. return data.page.list || []
  3746. },
  3747. startDownload () {
  3748. this._exportLoading = this.$loading({
  3749. lock: true,
  3750. text: '正在导出数据,请稍候...',
  3751. spinner: 'el-icon-loading',
  3752. background: 'rgba(0, 0, 0, 0.7)'
  3753. })
  3754. },
  3755. finishDownload () {
  3756. if (this._exportLoading) {
  3757. this._exportLoading.close()
  3758. this._exportLoading = null
  3759. }
  3760. },
  3761. // 子明细每页数
  3762. sizeChangeHandle2 (val) {
  3763. this.pageSize2 = val
  3764. },
  3765. // 子明细当前页
  3766. currentChangeHandle2 (val) {
  3767. this.pageIndex2 = val
  3768. },
  3769. // 多选
  3770. selectionChangeHandle (val) {
  3771. this.dataListSelections = val
  3772. },
  3773. // 删除检验记录
  3774. deleteModal () {
  3775. if (this.FAISelections.length === 0) {
  3776. this.$alert('请勾选要删除的检验单!', '提示', {
  3777. confirmButtonText: '确定'
  3778. })
  3779. return false
  3780. }
  3781. this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', {
  3782. confirmButtonText: '确定',
  3783. cancelButtonText: '取消',
  3784. type: 'warning'
  3785. }).then(() => {
  3786. let tempData = {
  3787. site: '',
  3788. submitList: this.FAISelections
  3789. }
  3790. fqcRecordDelete(tempData).then(({data}) => {
  3791. if (data && data.code === 0) {
  3792. this.getDataList()
  3793. this.FAISelections = []
  3794. this.$message.success('操作成功')
  3795. } else {
  3796. this.$message.error(data.msg)
  3797. }
  3798. })
  3799. })
  3800. },
  3801. Transfer (type) {
  3802. if (type === '2') {
  3803. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3804. this.$message.warning('请选择检验结论!')
  3805. return
  3806. }
  3807. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3808. this.$message.warning('请选择处置措施!')
  3809. return
  3810. }
  3811. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3812. const flag = this.detailList.some(item => item.itemResult === 'N')
  3813. if (!flag) {
  3814. this.$message.warning('请选择不合格项目!')
  3815. return
  3816. }
  3817. }
  3818. if (this.detailData.inspectionResult !== '不合格') {
  3819. this.detailData.disposalMeasures = ''
  3820. this.detailData.disposalRemark = ''
  3821. }
  3822. }
  3823. this.saveDetailInformation(type)
  3824. },
  3825. // 新增明细信息
  3826. saveDetailInformation (type) {
  3827. this.preserveExceptionLockedFields()
  3828. this.saveInformationData.site = this.detailData.site
  3829. this.saveInformationData.buNo = this.detailData.buNo
  3830. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3831. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3832. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3833. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3834. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3835. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3836. this.saveInformationData.rollQty = this.detailData.rollQty
  3837. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3838. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3839. this.saveInformationData.partNo = this.detailData.partNo
  3840. this.saveInformationData.partDesc = this.detailData.partDesc
  3841. this.saveInformationData.operator = this.detailData.operator
  3842. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3843. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3844. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3845. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3846. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  3847. this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
  3848. this.transferLoadFlag = true
  3849. saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3850. if (data && data.code === 0) {
  3851. this.getDataList()
  3852. // 应用时(type=1)不关闭对话框,只刷新数据
  3853. if (type === '1') {
  3854. this.getInspectionFormData()
  3855. } else {
  3856. this.detailInformationFlag = false
  3857. }
  3858. this.$message.success('操作成功')
  3859. } else {
  3860. this.$message.error(data.msg)
  3861. }
  3862. this.transferLoadFlag = false
  3863. }).catch(()=>{
  3864. this.transferLoadFlag = false
  3865. })
  3866. },
  3867. abnormalModifyModal (row) {
  3868. this.detailModal(row, true)
  3869. },
  3870. closeDetailDialog () {
  3871. this.exceptionModifyMode = false
  3872. this.exceptionModifyInspectionResult = ''
  3873. this.exceptionModifyItemResultMap = {}
  3874. },
  3875. preserveExceptionLockedFields () {
  3876. if (!this.exceptionModifyMode) {
  3877. return
  3878. }
  3879. this.detailData.inspectionResult = this.exceptionModifyInspectionResult
  3880. this.detailList.forEach(item => {
  3881. const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
  3882. if (originItemResult !== undefined) {
  3883. item.itemResult = originItemResult
  3884. }
  3885. })
  3886. },
  3887. isSubDetailReadonly (row) {
  3888. if (!row) {
  3889. return true
  3890. }
  3891. return row.isSubmit === 'Y' && !this.exceptionModifyMode
  3892. },
  3893. // 开始检验
  3894. actionModal (row) {
  3895. this.actionData = {
  3896. site: row.site,
  3897. buNo: row.buNo,
  3898. inspectionNo: row.inspectionNo
  3899. }
  3900. getFQCItemObjectList(this.actionData).then(({data}) => {
  3901. if (data && data.code === 0) {
  3902. if (data.rows.length === 0) {
  3903. this.actionModal2()
  3904. } else {
  3905. this.itemObjectList = data.rows
  3906. this.ItemObjectModelFlag = true
  3907. }
  3908. } else {
  3909. this.$message.error(data.msg)
  3910. }
  3911. })
  3912. },
  3913. // 开始检验
  3914. actionModal2 () {
  3915. this.$confirm(`确认开始检验?`, '提示', {
  3916. confirmButtonText: '确定',
  3917. cancelButtonText: '取消',
  3918. type: 'warning'
  3919. }).then(() => {
  3920. let tempData = {
  3921. site: this.actionData.site,
  3922. buNo: this.actionData.buNo,
  3923. inspectionNo: this.actionData.inspectionNo,
  3924. actionBy: this.$store.state.user.name,
  3925. state: '待检验',
  3926. equipmentList: this.itemObjectList
  3927. }
  3928. actionFQCInspection(tempData).then(({data}) => {
  3929. if (data && data.code === 0) {
  3930. this.getDataList()
  3931. this.$message.success('操作成功')
  3932. this.ItemObjectModelFlag = false
  3933. } else {
  3934. this.$message.error(data.msg)
  3935. }
  3936. })
  3937. })
  3938. },
  3939. // 明细记录信息查询
  3940. detailModal (row, exceptionModifyMode = false) {
  3941. this.exceptionModifyMode = exceptionModifyMode
  3942. this.exceptionModifyInspectionResult = ''
  3943. this.exceptionModifyItemResultMap = {}
  3944. this.detailData.site = row.site
  3945. this.detailData.buNo = row.buNo
  3946. this.detailData.inspectionNo = row.inspectionNo
  3947. this.detailData.partNo = row.partNo
  3948. this.detailData.partDesc = row.partDesc
  3949. this.detailData.rollQty = row.rollQty
  3950. this.detailData.samplingQty = row.samplingQty
  3951. this.detailData.unqualifiedQty = row.unqualifiedQty
  3952. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3953. this.detailData.submitFlag = row.submitFlag
  3954. this.detailData.disposalMeasures = row.disposalMeasures
  3955. this.detailData.disposalRemark = row.disposalRemark
  3956. this.detailData.inspectionResult = row.inspectionResult
  3957. this.detailData.inspectorNo = row.inspectorNo
  3958. this.detailData.inspectorName = row.inspectorName
  3959. this.detailData.inspectionRemark = row.inspectionRemark
  3960. this.detailData.cinvSourceCode = row.cinvSourceCode
  3961. this.detailData.sku = row.sku
  3962. this.detailData.invdefinetype = row.invdefinetype
  3963. this.detailData.umId = row.umId
  3964. this.detailData.umName = row.umName
  3965. this.detailData.operator = row.operator
  3966. this.detailData.operatorName = row.operatorName
  3967. this.detailData.responsiblePerson = row.responsiblePerson
  3968. this.detailData.responsiblePersonName = row.responsiblePersonName
  3969. this.detailData.state = row.state
  3970. this.detailData.spec = row.spec
  3971. if (this.exceptionModifyMode) {
  3972. this.exceptionModifyInspectionResult = row.inspectionResult
  3973. }
  3974. if (row.state === '待检验') {
  3975. this.detailData.passQty = row.samplingQty
  3976. } else {
  3977. this.detailData.passQty = row.passQty
  3978. this.detailData.notPassQty = row.notPassQty
  3979. }
  3980. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  3981. this.getInspectionFormData()
  3982. this.detailInformationFlag = true
  3983. },
  3984. // 检验单明细
  3985. getInspectionFormData () {
  3986. fqcDetailSearch(this.detailData).then(({data}) => {
  3987. if (data && data.code === 0) {
  3988. this.detailList = data.rows
  3989. if (this.exceptionModifyMode) {
  3990. let itemResultMap = {}
  3991. this.detailList.forEach(item => {
  3992. itemResultMap[item.itemNo] = item.itemResult
  3993. })
  3994. this.exceptionModifyItemResultMap = itemResultMap
  3995. }
  3996. } else {
  3997. this.detailList = []
  3998. this.exceptionModifyItemResultMap = {}
  3999. }
  4000. })
  4001. },
  4002. // 子明细记录信息查询
  4003. subDetailModal (row) {
  4004. this.subDetailLoading = true
  4005. this.subDetailData = row
  4006. this.pageIndex2 = 1
  4007. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  4008. if (data.code === 0) {
  4009. this.tableData = data.rows
  4010. }
  4011. this.subDetailLoading = false
  4012. }).catch(()=>{
  4013. this.subDetailLoading = false
  4014. })
  4015. this.batchAddData = {
  4016. samplingLocation: '',
  4017. samplingLocationB: '',
  4018. samplingNumber: ''
  4019. }
  4020. this.subDetailFlag = true
  4021. },
  4022. // 子明细分页查询
  4023. subDetailModal2 () {
  4024. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  4025. if (data.code === 0) {
  4026. this.tableData = data.rows
  4027. }
  4028. })
  4029. },
  4030. // 审核按钮
  4031. submitResult () {
  4032. let tempData1 = '' // 记录不是待审核状态的单号
  4033. let tempData2 = '' // 记录处置措施未填写的单号
  4034. if (this.FAISelections.length === 0) {
  4035. this.$alert('请勾选要审核的检验单!', '提示', {
  4036. confirmButtonText: '确定'
  4037. })
  4038. return false
  4039. }
  4040. for (let i = 0; i < this.FAISelections.length; i++) {
  4041. if (this.FAISelections[i].state !== '待审核'){
  4042. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  4043. }
  4044. if (this.FAISelections[i].inspectionResult === '不合格' && (this.FAISelections[i].disposalMeasures ==='' || this.FAISelections[i].disposalMeasures == null)) {
  4045. tempData2 = tempData2 + this.FAISelections[i].inspectionNo + '、'
  4046. }
  4047. }
  4048. if (tempData1 !== ''){
  4049. tempData1 = tempData1.substring(0, tempData1.length - 1)
  4050. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  4051. confirmButtonText: '确定'
  4052. })
  4053. return false
  4054. }
  4055. if (tempData2 !== ''){
  4056. tempData2 = tempData2.substring(0, tempData2.length - 1)
  4057. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  4058. confirmButtonText: '确定'
  4059. })
  4060. return false
  4061. }
  4062. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  4063. confirmButtonText: '确定',
  4064. cancelButtonText: '取消',
  4065. type: 'warning'
  4066. }).then(() => {
  4067. this.submitData.submitList = this.FAISelections
  4068. saveFQCSubmitResult(this.submitData).then(({data}) => {
  4069. if (data && data.code === 0) {
  4070. this.getDataList()
  4071. this.FAISelections = []
  4072. this.$message.success('操作成功')
  4073. } else {
  4074. this.$message.error(data.msg)
  4075. }
  4076. })
  4077. })
  4078. },
  4079. // 取消审核
  4080. cancelApproval () {
  4081. let tempData1 = '' // 记录不是已完成状态的单号
  4082. if (this.FAISelections.length === 0) {
  4083. this.$message.warning('请勾选要取消审核的检验单!')
  4084. return
  4085. }
  4086. for (let i = 0; i < this.FAISelections.length; i++) {
  4087. if (this.FAISelections[i].state !== '已完成') {
  4088. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  4089. }
  4090. }
  4091. if (tempData1 !== '') {
  4092. tempData1 = tempData1.substring(0, tempData1.length - 1)
  4093. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  4094. return
  4095. }
  4096. this.$confirm(`确定取消审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  4097. confirmButtonText: '确定',
  4098. cancelButtonText: '取消',
  4099. type: 'warning'
  4100. }).then(() => {
  4101. this.submitData.submitList = this.FAISelections
  4102. cancelApproval2(this.submitData).then(({data}) => {
  4103. if (data && data.code === 0) {
  4104. this.getDataList()
  4105. this.FAISelections = []
  4106. this.$message.success('操作成功')
  4107. } else {
  4108. this.$message.error(data.msg)
  4109. }
  4110. })
  4111. })
  4112. },
  4113. // 子明细方法
  4114. //表格的新增
  4115. rowClassName ({ row, rowIndex }) {
  4116. row.xh = rowIndex + 1
  4117. row.num = this.tableData.indexOf(row) + 1
  4118. },
  4119. //单选框选中数据
  4120. handleDetailSelectionChange (selection) {
  4121. this.checkedDetail = selection
  4122. },
  4123. //点击新增更多
  4124. handleAddBtn (td) {
  4125. if (this.exceptionModifyMode) {
  4126. let obj = {
  4127. subDetailValue: '',
  4128. samplingLocation: '',
  4129. samplingLocationB: '',
  4130. subDetailValueB: '',
  4131. subDetailValueC: '',
  4132. subDetailValueD: '',
  4133. subDetailValueE: '',
  4134. }
  4135. this.tableData.push(obj)
  4136. return
  4137. }
  4138. checkFQCIsSubmit(td).then(({data}) => {
  4139. if (data.flag !== 1) {
  4140. let obj = {
  4141. subDetailValue: '',
  4142. samplingLocation: '',
  4143. samplingLocationB: '',
  4144. subDetailValueB: '',
  4145. subDetailValueC: '',
  4146. subDetailValueD: '',
  4147. subDetailValueE: '',
  4148. }
  4149. this.tableData.push(obj)
  4150. } else {
  4151. this.$message.error('记录已提交')
  4152. }
  4153. })
  4154. },
  4155. // 批量新增操作
  4156. batchHandleAdd (td) {
  4157. if (this.exceptionModifyMode) {
  4158. this.batchHandleAddModalFlag = true
  4159. return
  4160. }
  4161. checkFQCIsSubmit(td).then(({data}) => {
  4162. if (data.flag !== 1) {
  4163. this.batchHandleAddModalFlag = true
  4164. } else {
  4165. this.$message.error('记录已提交')
  4166. }
  4167. })
  4168. },
  4169. // 批量新增行
  4170. batchHandleAddModal () {
  4171. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  4172. let obj = {
  4173. samplingLocation: this.batchAddData.samplingLocation,
  4174. samplingLocationB: this.batchAddData.samplingLocationB,
  4175. subDetailValue: '',
  4176. subDetailValueB: '',
  4177. subDetailValueC: '',
  4178. subDetailValueD: '',
  4179. subDetailValueE: '',
  4180. }
  4181. this.tableData.push(obj)
  4182. }
  4183. this.batchHandleAddModalFlag = false
  4184. },
  4185. // 回车事件
  4186. nextFocus1 (index) {
  4187. let a1 = `${index + 1}` + `a`
  4188. this.$nextTick(() => {
  4189. this.$refs[a1].focus()
  4190. })
  4191. },
  4192. nextFocus2 (index) {
  4193. let a2 = `${index + 1}` + `b`
  4194. this.$nextTick(() => {
  4195. this.$refs[a2].focus()
  4196. })
  4197. },
  4198. nextFocus3 (index) {
  4199. let a3 = `${index + 1}` + `c`
  4200. this.$nextTick(() => {
  4201. this.$refs[a3].focus()
  4202. })
  4203. },
  4204. nextFocus4 (index) {
  4205. let a = `${index + 1}` + `d`
  4206. this.$nextTick(() => {
  4207. this.$refs[a].focus()
  4208. })
  4209. },
  4210. nextFocus5 (index) {
  4211. let a = `${index + 1}` + `e`
  4212. this.$nextTick(() => {
  4213. this.$refs[a].focus()
  4214. })
  4215. },
  4216. nextFocus6 (index) {
  4217. let a = `${index + 1}` + `f`
  4218. this.$nextTick(() => {
  4219. this.$refs[a].focus()
  4220. })
  4221. },
  4222. nextFocus7 (index) {
  4223. let a = `${index + 1}` + `g`
  4224. this.$nextTick(() => {
  4225. this.$refs[a].focus()
  4226. })
  4227. },
  4228. focusNextInput (index, type) {
  4229. let aaa = ''
  4230. if (this.detailList.length - 1 === index) {
  4231. aaa = `${type}0`
  4232. } else {
  4233. aaa = `${type}${index + 1}`
  4234. }
  4235. this.$nextTick(() => {
  4236. this.$refs[aaa].focus()
  4237. })
  4238. },
  4239. updateItemResult(row){
  4240. if (this.exceptionModifyMode) {
  4241. return
  4242. }
  4243. if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
  4244. this.$message.success("tuichu")
  4245. return;
  4246. }
  4247. if (row.maxValue == null && row.minValue == null) {
  4248. if (row.numberValue!=row.defaultValue){
  4249. row.itemResult = 'N'
  4250. }
  4251. }else if (row.maxValue != null && row.minValue != null){
  4252. if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
  4253. row.itemResult = 'N'
  4254. }else {
  4255. row.itemResult = 'Y'
  4256. }
  4257. }else if(row.maxValue != null){
  4258. if ( row.numberValue>row.maxValue) {
  4259. row.itemResult = 'N'
  4260. }else {
  4261. row.itemResult = 'Y'
  4262. }
  4263. }else if(row.minValue != null){
  4264. if ( row.numberValue<row.minValue) {
  4265. row.itemResult = 'N'
  4266. }else {
  4267. row.itemResult = 'Y'
  4268. }
  4269. }
  4270. },
  4271. //删除
  4272. handleDeleteBtn (td) {
  4273. if (this.exceptionModifyMode) {
  4274. if (this.checkedDetail.length === 0) {
  4275. this.$alert("请先选择要删除的数据", "提示", {
  4276. confirmButtonText: "确定",
  4277. });
  4278. } else {
  4279. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4280. confirmButtonText: "确定",
  4281. cancelButtonText: "取消",
  4282. type: "warning",
  4283. callback: (action) => {
  4284. if (action === "confirm") {
  4285. let val = this.checkedDetail;
  4286. val.forEach((val, index) => {
  4287. this.tableData.splice(this.tableData.indexOf(val), 1)
  4288. if (this.templateTableData.length === 0) {
  4289. this.pageIndex2--
  4290. }
  4291. })
  4292. this.$message({
  4293. message: "删除成功!",
  4294. type: "success",
  4295. })
  4296. return
  4297. } else {
  4298. this.$message({
  4299. message: "已取消删除操作",
  4300. type: "warning",
  4301. })
  4302. return
  4303. }
  4304. },
  4305. })
  4306. }
  4307. return
  4308. }
  4309. checkFQCIsSubmit(td).then(({data}) => {
  4310. if (data.flag !== 1) {
  4311. if (this.checkedDetail.length === 0) {
  4312. this.$alert("请先选择要删除的数据", "提示", {
  4313. confirmButtonText: "确定",
  4314. });
  4315. } else {
  4316. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4317. confirmButtonText: "确定",
  4318. cancelButtonText: "取消",
  4319. type: "warning",
  4320. callback: (action) => {
  4321. if (action === "confirm") {
  4322. let val = this.checkedDetail;
  4323. val.forEach((val, index) => {
  4324. this.tableData.splice(this.tableData.indexOf(val), 1)
  4325. if (this.templateTableData.length === 0) {
  4326. this.pageIndex2--
  4327. }
  4328. })
  4329. this.$message({
  4330. message: "删除成功!",
  4331. type: "success",
  4332. })
  4333. return
  4334. } else {
  4335. this.$message({
  4336. message: "已取消删除操作",
  4337. type: "warning",
  4338. })
  4339. return
  4340. }
  4341. },
  4342. })
  4343. }
  4344. } else {
  4345. this.$alert("记录已提交!", '错误', {
  4346. confirmButtonText: '确定'
  4347. })
  4348. }
  4349. })
  4350. },
  4351. // 新增子明细记录
  4352. saveSubDetailResult () {
  4353. for (let i = 0; i < this.tableData.length; i++) {
  4354. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  4355. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  4356. return
  4357. }
  4358. }
  4359. this.subDetailData.subDetailValues = this.tableData
  4360. saveFQCSubDetailed(this.subDetailData).then(({data}) => {
  4361. if (data && data.code === 0) {
  4362. if (data.count > 0) {
  4363. if (!this.exceptionModifyMode) {
  4364. this.subDetailData.itemResult = 'N'
  4365. }
  4366. this.subDetailData.unqualifiedQuantity = data.count
  4367. }
  4368. if (this.subDetailData.subDetailValues.length > 0) {
  4369. this.subDetailData.subDetailRecordNum = 1
  4370. } else {
  4371. this.subDetailData.subDetailRecordNum = -1
  4372. this.subDetailData.unqualifiedQuantity = 0
  4373. if (!this.exceptionModifyMode) {
  4374. this.subDetailData.itemResult = 'Y'
  4375. }
  4376. }
  4377. this.subDetailFlag = false
  4378. this.tableData = []
  4379. this.$message.success('操作成功')
  4380. } else {
  4381. this.$message.error(data.msg)
  4382. }
  4383. })
  4384. },
  4385. // 检验结论改变事件
  4386. resultChange () {
  4387. if (this.detailData.inspectionResult === '不合格') {
  4388. this.detailData.passQty = 0
  4389. }
  4390. },
  4391. // 校验用户是否收藏
  4392. favoriteIsOk () {
  4393. let userFavorite = {
  4394. userId: this.$store.state.user.id,
  4395. languageCode: this.$i18n.locale
  4396. }
  4397. userFavoriteList(userFavorite).then(({data}) => {
  4398. for (let i = 0; i < data.list.length; i++) {
  4399. if (this.$route.meta.menuId === data.list[i].menuId) {
  4400. this.favorite = true
  4401. }
  4402. }
  4403. })
  4404. },
  4405. // 收藏 OR 取消收藏
  4406. favoriteFunction () {
  4407. let userFavorite = {
  4408. userId: this.$store.state.user.id,
  4409. functionId: this.$route.meta.menuId,
  4410. }
  4411. if (this.favorite) {
  4412. removeUserFavorite(userFavorite).then(({data}) => {
  4413. this.$message.success(data.msg)
  4414. this.favorite = false
  4415. })
  4416. } else {
  4417. // 收藏
  4418. saveUserFavorite(userFavorite).then(({data}) => {
  4419. this.$message.success(data.msg)
  4420. this.favorite = true
  4421. })
  4422. }
  4423. },
  4424. ensureSubmitDateColumn (columns) {
  4425. const columnList = Array.isArray(columns) ? [...columns] : []
  4426. const hasSubmitDateColumn = columnList.some(item => item.columnProp === 'submitDate' || item.columnProp === 'submit_date')
  4427. if (hasSubmitDateColumn) {
  4428. return columnList
  4429. }
  4430. const submitDateColumn = {
  4431. userId: this.$store.state.user.name,
  4432. functionId: 301015,
  4433. serialNumber: '301015Table1SubmitDate',
  4434. tableId: "301015Table1",
  4435. tableName: "FQC检验记录表",
  4436. columnProp: 'submitDate',
  4437. headerAlign: "center",
  4438. align: "center",
  4439. columnLabel: '审核时间',
  4440. columnHidden: false,
  4441. columnImage: false,
  4442. columnSortable: false,
  4443. sortLv: 0,
  4444. status: true,
  4445. fixed: '',
  4446. columnWidth: 170,
  4447. }
  4448. const inspectorDateIndex = columnList.findIndex(item => item.columnProp === 'inspectorDate')
  4449. if (inspectorDateIndex >= 0) {
  4450. columnList.splice(inspectorDateIndex + 1, 0, submitDateColumn)
  4451. } else {
  4452. columnList.push(submitDateColumn)
  4453. }
  4454. return columnList
  4455. },
  4456. // 动态列开始 获取 用户保存的 格式列
  4457. async getTableUserColumn (tableId, columnId) {
  4458. let queryTableUser = {
  4459. userId: this.$store.state.user.name,
  4460. functionId: this.$route.meta.menuId,
  4461. tableId: tableId,
  4462. status: true,
  4463. languageCode: this.$i18n.locale
  4464. }
  4465. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  4466. if (data.rows.length > 0) {
  4467. //this.columnList1 = []
  4468. switch (columnId) {
  4469. case 1:
  4470. this.columnList1 = this.ensureSubmitDateColumn(data.rows)
  4471. break;
  4472. case 2:
  4473. this.detailColumnList = data.rows
  4474. break;
  4475. case 3:
  4476. this.seqDetailColumnList = data.rows
  4477. break;
  4478. }
  4479. } else {
  4480. this.getColumnList(tableId, columnId)
  4481. }
  4482. })
  4483. },
  4484. // 获取 tableDefault 列
  4485. async getColumnList (tableId, columnId) {
  4486. let queryTable = {
  4487. functionId: this.$route.meta.menuId,
  4488. tableId: tableId,
  4489. languageCode: this.$i18n.locale
  4490. }
  4491. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  4492. if (data.rows.length !== 0) {
  4493. switch (columnId) {
  4494. case 1:
  4495. this.columnList1 = this.ensureSubmitDateColumn(data.rows)
  4496. break;
  4497. case 2:
  4498. this.detailColumnList = data.rows
  4499. break;
  4500. case 3:
  4501. this.seqDetailColumnList = data.rows
  4502. break;
  4503. }
  4504. }
  4505. })
  4506. },
  4507. // 明细导入后将返回值回传给父组件
  4508. changeMyString (val) {
  4509. for (let i = 0; i < this.detailList.length; i++) {
  4510. if (val[this.detailList[i].itemNo] !== undefined) {
  4511. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  4512. if (val[this.detailList[i].itemNo] != null) {
  4513. this.detailList[i].subDetailRecordNum = 1
  4514. }
  4515. if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
  4516. this.detailList[i].itemResult = 'N'
  4517. }
  4518. }
  4519. }
  4520. },
  4521. searchSeqInfo () {
  4522. let tempData = {
  4523. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  4524. bu: this.modalData.bu,
  4525. seqNo: this.seqDetailData.seqNo,
  4526. orderNo: this.seqDetailData.orderNo,
  4527. sku: this.seqDetailData.sku,
  4528. partDesc: this.seqDetailData.partDesc,
  4529. partNo: this.seqDetailData.partNo,
  4530. operationDesc: this.seqDetailData.operationDesc,
  4531. status: this.seqDetailData.status
  4532. }
  4533. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  4534. this.seqInfoList = []
  4535. } else {
  4536. searchSeqInfo(tempData).then(({data}) => {
  4537. if (data && data.code === 0) {
  4538. this.seqInfoList = data.rows
  4539. } else {
  4540. this.$message.error(data.msg)
  4541. }
  4542. })
  4543. }
  4544. },
  4545. closeDialog () {
  4546. this.seqDetailData = {
  4547. seqNo : '',
  4548. orderNo: '',
  4549. sku: '',
  4550. partNo: '',
  4551. partDesc:'',
  4552. operationDesc: '',
  4553. status: '下达'
  4554. }
  4555. this.seqInfoList = []
  4556. },
  4557. //获取按钮的权限数据
  4558. getButtonAuthData () {
  4559. let searchFlag = this.isAuth(this.menuId + ":search")
  4560. let checkFlag = this.isAuth(this.menuId + ":check")
  4561. let saveFlag = this.isAuth(this.menuId + ":save")
  4562. let deleteFlag = this.isAuth(this.menuId + ":delete")
  4563. let detailFlag = this.isAuth(this.menuId + ":detail")
  4564. let fileFlag = this.isAuth(this.menuId + ":file")
  4565. let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
  4566. let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
  4567. //处理页面的权限数据
  4568. this.authSearch = !searchFlag
  4569. this.authCheck = !checkFlag
  4570. this.authSave = !saveFlag
  4571. this.authDelete = !deleteFlag
  4572. this.authDetail = !detailFlag
  4573. this.authFile = !fileFlag
  4574. this.authCancelCheck = !cancelCheckFlag
  4575. this.authExceptionModify = !exceptionModifyFlag
  4576. },
  4577. // ======================== FQC检验项目操作相关方法 ========================
  4578. openItemOperationDialog() {
  4579. this.itemOperationQuery = { itemNo: '', itemDesc: '' }
  4580. this.searchFQCItems()
  4581. this.itemOperationDialogFlag = true
  4582. },
  4583. async searchFQCItems() {
  4584. try {
  4585. const params = {
  4586. site: this.detailData.site,
  4587. buNo: this.detailData.buNo,
  4588. inspectionNo: this.detailData.inspectionNo,
  4589. itemNo: this.itemOperationQuery.itemNo || '',
  4590. itemDesc: this.itemOperationQuery.itemDesc || ''
  4591. }
  4592. const { data } = await getFQCItemList(params)
  4593. if (data && data.code === 0) {
  4594. this.availableItemList = data.row1 || []
  4595. this.selectedItemList = data.row2 || []
  4596. }
  4597. } catch (error) {
  4598. this.$message.error('查询检验项目失败')
  4599. }
  4600. },
  4601. availableItemClickRow(row) {
  4602. this.$refs.availableItemTable.toggleRowSelection(row)
  4603. },
  4604. availableItemSelectionChange(selection) {
  4605. this.availableItemSelections = selection
  4606. },
  4607. selectedItemClickRow(row) {
  4608. this.$refs.selectedItemTable.toggleRowSelection(row)
  4609. },
  4610. selectedItemSelectionChange(selection) {
  4611. this.selectedItemSelections = selection
  4612. },
  4613. async addInspectionItems() {
  4614. if (!this.availableItemSelections || this.availableItemSelections.length === 0) {
  4615. this.$message.warning('请选择要添加的项目')
  4616. return
  4617. }
  4618. this.$confirm('确认添加选中的检验项目吗?', '提示', {
  4619. confirmButtonText: '确定',
  4620. cancelButtonText: '取消',
  4621. type: 'warning'
  4622. }).then(async () => {
  4623. try {
  4624. const params = {
  4625. site: this.detailData.site,
  4626. buNo: this.detailData.buNo,
  4627. inspectionNo: this.detailData.inspectionNo,
  4628. itemList: this.availableItemSelections.map(item => ({ itemNo: item.itemNo }))
  4629. }
  4630. const { data } = await addFQCItemDetails(params)
  4631. if (data && data.code === 0) {
  4632. this.$message.success('添加成功')
  4633. this.searchFQCItems()
  4634. } else {
  4635. this.$message.error(data.msg || '添加失败')
  4636. }
  4637. } catch (error) {
  4638. this.$message.error('添加失败,请检查')
  4639. }
  4640. }).catch(() => {
  4641. this.$message.info('已取消添加')
  4642. })
  4643. },
  4644. async deleteInspectionItems() {
  4645. if (!this.selectedItemSelections || this.selectedItemSelections.length === 0) {
  4646. this.$message.warning('请选择要移除的项目')
  4647. return
  4648. }
  4649. this.$confirm('确认移除选中的检验项目吗?(将同时删除该项目的子明细数据)', '提示', {
  4650. confirmButtonText: '确定',
  4651. cancelButtonText: '取消',
  4652. type: 'warning'
  4653. }).then(async () => {
  4654. try {
  4655. const params = {
  4656. site: this.detailData.site,
  4657. buNo: this.detailData.buNo,
  4658. inspectionNo: this.detailData.inspectionNo,
  4659. itemList: this.selectedItemSelections.map(item => ({ itemNo: item.itemNo }))
  4660. }
  4661. const { data } = await deleteFQCItemDetails(params)
  4662. if (data && data.code === 0) {
  4663. this.$message.success('移除成功')
  4664. this.searchFQCItems()
  4665. } else {
  4666. this.$message.error(data.msg || '移除失败')
  4667. }
  4668. } catch (error) {
  4669. this.$message.error('移除失败,请检查')
  4670. }
  4671. }).catch(() => {
  4672. this.$message.info('已取消移除')
  4673. })
  4674. },
  4675. refreshInspectionDetailList() {
  4676. if (this.detailInformationFlag) {
  4677. this.getInspectionFormData()
  4678. }
  4679. },
  4680. // ======================== FQC模板导入相关方法 ========================
  4681. openTemplateImportDialog() {
  4682. this.templateQuery = { templateId: '', templateDesc: '' }
  4683. this.searchFQCTemplates()
  4684. this.templateImportDialogFlag = true
  4685. },
  4686. async searchFQCTemplates() {
  4687. try {
  4688. const params = {
  4689. site: this.detailData.site,
  4690. buNo: this.detailData.buNo,
  4691. templateId: this.templateQuery.templateId || '',
  4692. templateDesc: this.templateQuery.templateDesc || ''
  4693. }
  4694. const { data } = await getFQCTemplateList(params)
  4695. if (data && data.code === 0) {
  4696. this.templateList = data.rows || []
  4697. }
  4698. } catch (error) {
  4699. this.$message.error('查询模板失败')
  4700. }
  4701. },
  4702. templateClickRow(row) {
  4703. this.$refs.templateTable.toggleRowSelection(row)
  4704. },
  4705. templateSelectionChange(selection) {
  4706. this.templateSelections = selection
  4707. },
  4708. confirmImportTemplate() {
  4709. if (!this.templateSelections || this.templateSelections.length === 0) {
  4710. this.$message.warning('请选择要导入的模板')
  4711. return
  4712. }
  4713. this.$confirm(`确认导入选中的 ${this.templateSelections.length} 个模板吗?`, '提示', {
  4714. confirmButtonText: '确定',
  4715. cancelButtonText: '取消',
  4716. type: 'warning'
  4717. }).then(async () => {
  4718. this.importLoading = true
  4719. try {
  4720. const params = {
  4721. site: this.detailData.site,
  4722. buNo: this.detailData.buNo,
  4723. inspectionNo: this.detailData.inspectionNo,
  4724. templateList: this.templateSelections.map(item => ({ templateId: item.templateId }))
  4725. }
  4726. const { data } = await importFQCTemplateItems(params)
  4727. if (data && data.code === 0) {
  4728. this.$message.success(`导入成功,共导入 ${data.importCount || 0} 个检验项目`)
  4729. this.templateImportDialogFlag = false
  4730. this.templateSelections = []
  4731. this.getInspectionFormData()
  4732. } else {
  4733. this.$message.error(data.msg || '导入失败')
  4734. }
  4735. } catch (error) {
  4736. this.$message.error('导入失败,请检查')
  4737. } finally {
  4738. this.importLoading = false
  4739. }
  4740. }).catch(() => {
  4741. this.$message.info('已取消导入')
  4742. })
  4743. },
  4744. resetItemQuery() {
  4745. this.itemOperationQuery = { itemNo: '', itemDesc: '' }
  4746. this.searchFQCItems()
  4747. },
  4748. resetTemplateQuery() {
  4749. this.templateQuery = { templateId: '', templateDesc: '' }
  4750. this.searchFQCTemplates()
  4751. },
  4752. }
  4753. }
  4754. </script>
  4755. <style scoped>
  4756. .file-dialog-title {
  4757. display: inline-flex;
  4758. align-items: center;
  4759. gap: 10px;
  4760. }
  4761. .file-dialog-link {
  4762. color: #17b3a3;
  4763. text-decoration: underline;
  4764. font-size: 13px;
  4765. cursor: pointer;
  4766. }
  4767. .file-dialog-link:visited,
  4768. .file-dialog-link:active,
  4769. .file-dialog-link:hover {
  4770. color: #17b3a3;
  4771. }
  4772. /* 搜索卡片样式 */
  4773. .search-card {
  4774. margin-bottom: 16px;
  4775. border-radius: 8px;
  4776. overflow: hidden;
  4777. transition: all 0.3s ease;
  4778. }
  4779. .search-card:hover {
  4780. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  4781. }
  4782. .search-card /deep/ .el-card__header {
  4783. padding: 5px 20px;
  4784. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  4785. border-bottom: none;
  4786. }
  4787. .search-header {
  4788. display: flex;
  4789. justify-content: space-between;
  4790. align-items: center;
  4791. }
  4792. .header-left {
  4793. display: flex;
  4794. align-items: center;
  4795. color: #fff;
  4796. }
  4797. .header-left i {
  4798. font-size: 16px;
  4799. margin-right: 8px;
  4800. }
  4801. .header-title {
  4802. font-size: 14px;
  4803. font-weight: 600;
  4804. letter-spacing: 0.5px;
  4805. }
  4806. .header-right {
  4807. color: #fff;
  4808. }
  4809. .collapse-btn {
  4810. color: #fff;
  4811. font-weight: 500;
  4812. transition: all 0.3s ease;
  4813. }
  4814. .collapse-btn:hover {
  4815. color: #f0f0f0;
  4816. transform: translateY(-1px);
  4817. }
  4818. .collapse-btn i {
  4819. transition: transform 0.3s ease;
  4820. }
  4821. /* 搜索表单样式 */
  4822. .search-form {
  4823. padding: 6px 0;
  4824. min-height: 0;
  4825. }
  4826. /* 卡片主体样式 */
  4827. .search-card /deep/ .el-card__body {
  4828. padding: 10px;
  4829. transition: all 0.3s ease;
  4830. }
  4831. /* 收起时的样式 */
  4832. .search-card.collapsed /deep/ .el-card__body {
  4833. padding: 10px 20px;
  4834. }
  4835. .search-form /deep/ .el-form-item {
  4836. margin-bottom: 12px;
  4837. }
  4838. .search-form /deep/ .el-form-item__label {
  4839. font-weight: 500;
  4840. color: #606266;
  4841. padding-bottom: 4px;
  4842. }
  4843. .search-form /deep/ .el-input__inner,
  4844. .search-form /deep/ .el-textarea__inner {
  4845. border-radius: 6px;
  4846. border: 1px solid #DCDFE6;
  4847. transition: all 0.3s ease;
  4848. }
  4849. .search-form /deep/ .el-input__inner:focus,
  4850. .search-form /deep/ .el-textarea__inner:focus {
  4851. border-color: #9ac3d0;
  4852. box-shadow: 0 0 0 2px rgba(154, 195, 208, 0.1);
  4853. }
  4854. .search-form /deep/ .el-select {
  4855. width: 100%;
  4856. }
  4857. .search-form /deep/ .el-date-editor.el-input {
  4858. width: 100%;
  4859. }
  4860. /* 状态下拉框优化 */
  4861. .search-form /deep/ .status-select {
  4862. width: 180px;
  4863. }
  4864. .search-form /deep/ .status-select .el-select__tags {
  4865. max-width: calc(100% - 30px);
  4866. }
  4867. .search-form /deep/ .status-select .el-tag {
  4868. max-width: 100%;
  4869. overflow: hidden;
  4870. text-overflow: ellipsis;
  4871. white-space: nowrap;
  4872. }
  4873. /* 操作按钮区域 */
  4874. .search-actions {
  4875. display: flex;
  4876. justify-content: space-between;
  4877. align-items: center;
  4878. padding: 8px 0 2px 0;
  4879. }
  4880. /* 展开时显示上边框 */
  4881. .search-card:not(.collapsed) .search-actions {
  4882. border-top: 1px solid #f0f0f0;
  4883. margin-top: 6px;
  4884. }
  4885. /* 收起时不显示上边框和上边距 */
  4886. .search-card.collapsed .search-actions {
  4887. border-top: none;
  4888. margin-top: 0;
  4889. padding-top: 0;
  4890. }
  4891. .action-left,
  4892. .action-right {
  4893. display: flex;
  4894. gap: 8px;
  4895. }
  4896. .search-actions .el-button {
  4897. border-radius: 4px;
  4898. padding: 5px 10px;
  4899. font-size: 12px;
  4900. font-weight: 500;
  4901. transition: all 0.3s ease;
  4902. }
  4903. .search-actions .el-button:hover {
  4904. transform: translateY(-2px);
  4905. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  4906. }
  4907. .search-actions .el-button--primary {
  4908. background: #60aeff;
  4909. border-color: #60aeff;
  4910. }
  4911. .search-actions .el-button--primary:hover {
  4912. background: #7dbdff;
  4913. border-color: #7dbdff;
  4914. }
  4915. .search-actions .el-button--success {
  4916. background: #67C23A;
  4917. border-color: #67C23A;
  4918. }
  4919. .search-actions .el-button--success:hover {
  4920. background: #85ce61;
  4921. border-color: #85ce61;
  4922. }
  4923. .search-actions .el-button--danger {
  4924. background: #F56C6C;
  4925. border-color: #F56C6C;
  4926. }
  4927. .search-actions .el-button--danger:hover {
  4928. background: #f78989;
  4929. border-color: #f78989;
  4930. }
  4931. .search-actions .el-button--warning {
  4932. background: #E6A23C;
  4933. border-color: #E6A23C;
  4934. }
  4935. .search-actions .el-button--warning:hover {
  4936. background: #ebb563;
  4937. border-color: #ebb563;
  4938. }
  4939. /* 响应式设计 */
  4940. @media (max-width: 1200px) {
  4941. .search-actions {
  4942. flex-direction: column;
  4943. gap: 10px;
  4944. }
  4945. .action-left,
  4946. .action-right {
  4947. width: 100%;
  4948. justify-content: center;
  4949. }
  4950. }
  4951. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  4952. color: red;
  4953. font-weight: bold;
  4954. }
  4955. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  4956. color: rgb(103,194,58);
  4957. font-weight: bold;
  4958. }
  4959. .el-table /deep/ .cell{
  4960. height: auto;
  4961. line-height: 1.5;
  4962. }
  4963. /* ==================== FQC检验项目操作对话框样式 ==================== */
  4964. /deep/ .item-operation-dialog {
  4965. border-radius: 8px;
  4966. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  4967. }
  4968. /deep/ .item-operation-dialog .el-dialog__header {
  4969. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  4970. padding: 20px 24px;
  4971. border-radius: 8px 8px 0 0;
  4972. }
  4973. /deep/ .item-operation-dialog .el-dialog__title {
  4974. color: #ffffff;
  4975. font-size: 16px;
  4976. font-weight: 600;
  4977. letter-spacing: 0.5px;
  4978. }
  4979. /deep/ .item-operation-dialog .el-dialog__headerbtn .el-dialog__close {
  4980. color: #ffffff;
  4981. font-size: 20px;
  4982. font-weight: bold;
  4983. }
  4984. /deep/ .item-operation-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  4985. color: #f0f0f0;
  4986. }
  4987. /deep/ .item-operation-dialog .el-dialog__body {
  4988. padding: 24px;
  4989. background: #f8f9fa;
  4990. }
  4991. .search-container {
  4992. background: #ffffff;
  4993. padding: 16px 20px;
  4994. border-radius: 6px;
  4995. margin-bottom: 20px;
  4996. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  4997. }
  4998. .search-container .el-form-item {
  4999. margin-bottom: 0;
  5000. }
  5001. .search-container .el-form-item__label {
  5002. font-weight: 500;
  5003. color: #606266;
  5004. }
  5005. .item-operation-content {
  5006. display: flex;
  5007. gap: 16px;
  5008. align-items: stretch;
  5009. }
  5010. .item-panel {
  5011. flex: 1;
  5012. background: #ffffff;
  5013. border-radius: 6px;
  5014. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  5015. overflow: hidden;
  5016. transition: all 0.3s ease;
  5017. }
  5018. .item-panel:hover {
  5019. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  5020. }
  5021. .available-panel {
  5022. flex: 1.5;
  5023. }
  5024. .selected-panel {
  5025. flex: 1;
  5026. }
  5027. .panel-header {
  5028. padding: 8px 16px;
  5029. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  5030. border-bottom: 2px solid #9ac3d0;
  5031. display: flex;
  5032. align-items: center;
  5033. gap: 8px;
  5034. }
  5035. .panel-header i {
  5036. font-size: 18px;
  5037. color: #ffffff;
  5038. }
  5039. .panel-title {
  5040. font-size: 14px;
  5041. font-weight: 600;
  5042. color: #ffffff;
  5043. letter-spacing: 0.5px;
  5044. }
  5045. .item-count {
  5046. margin-left: auto;
  5047. font-size: 12px;
  5048. color: #ffffff;
  5049. background: rgba(255, 255, 255, 0.25);
  5050. padding: 2px 10px;
  5051. border-radius: 12px;
  5052. font-weight: 500;
  5053. }
  5054. .operation-table {
  5055. border: none !important;
  5056. }
  5057. .operation-table /deep/ .el-table__body tr:hover > td {
  5058. background-color: #f0f7ff !important;
  5059. }
  5060. .operation-table /deep/ .el-table__row.current-row > td {
  5061. background-color: #e6f2ff !important;
  5062. }
  5063. .operation-table /deep/ td {
  5064. border-bottom: 1px solid #f0f0f0;
  5065. }
  5066. .operation-table /deep/ .el-table__body {
  5067. font-size: 13px;
  5068. }
  5069. .operation-buttons {
  5070. display: flex;
  5071. flex-direction: column;
  5072. justify-content: center;
  5073. align-items: center;
  5074. gap: 20px;
  5075. padding: 0 8px;
  5076. }
  5077. .operation-buttons .el-button {
  5078. width: 48px;
  5079. height: 48px;
  5080. font-size: 20px;
  5081. transition: all 0.3s ease;
  5082. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5083. }
  5084. .operation-buttons .el-button:hover {
  5085. transform: scale(1.1);
  5086. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  5087. }
  5088. .operation-buttons .el-button.is-disabled {
  5089. opacity: 0.4;
  5090. cursor: not-allowed;
  5091. }
  5092. .operation-buttons .el-button--primary {
  5093. background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
  5094. border: none;
  5095. }
  5096. .operation-buttons .el-button--danger {
  5097. background: linear-gradient(135deg, #F56C6C 0%, #f78989 100%);
  5098. border: none;
  5099. }
  5100. @media (max-width: 1200px) {
  5101. .item-operation-content {
  5102. flex-direction: column;
  5103. }
  5104. .operation-buttons {
  5105. flex-direction: row;
  5106. gap: 12px;
  5107. }
  5108. .operation-buttons .el-button {
  5109. width: 42px;
  5110. height: 42px;
  5111. font-size: 18px;
  5112. }
  5113. }
  5114. /deep/ .template-import-dialog {
  5115. border-radius: 8px;
  5116. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  5117. }
  5118. /deep/ .template-import-dialog .el-dialog__header {
  5119. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  5120. padding: 20px 24px;
  5121. border-radius: 8px 8px 0 0;
  5122. }
  5123. /deep/ .template-import-dialog .el-dialog__title {
  5124. color: #ffffff;
  5125. font-size: 16px;
  5126. font-weight: 600;
  5127. letter-spacing: 0.5px;
  5128. }
  5129. /deep/ .template-import-dialog .el-dialog__headerbtn .el-dialog__close {
  5130. color: #ffffff;
  5131. font-size: 20px;
  5132. font-weight: bold;
  5133. }
  5134. /deep/ .template-import-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  5135. color: #f0f0f0;
  5136. }
  5137. /deep/ .template-import-dialog .el-dialog__body {
  5138. padding: 24px;
  5139. background: #f8f9fa;
  5140. }
  5141. .template-list-container {
  5142. background: #ffffff;
  5143. border-radius: 6px;
  5144. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  5145. overflow: hidden;
  5146. transition: all 0.3s ease;
  5147. }
  5148. .template-list-container:hover {
  5149. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  5150. }
  5151. .template-table {
  5152. border: none !important;
  5153. }
  5154. .template-table /deep/ .el-table__body tr:hover > td {
  5155. background-color: #f0f7ff !important;
  5156. }
  5157. .template-table /deep/ .el-table__row.current-row > td {
  5158. background-color: #e6f2ff !important;
  5159. }
  5160. .template-table /deep/ td {
  5161. border-bottom: 1px solid #f0f0f0;
  5162. }
  5163. .template-table /deep/ .el-table__body {
  5164. font-size: 13px;
  5165. }
  5166. .operation-btn {
  5167. position: relative;
  5168. padding: 8px 16px;
  5169. border: none;
  5170. border-radius: 4px;
  5171. font-size: 13px;
  5172. font-weight: 500;
  5173. cursor: pointer;
  5174. transition: all 0.3s ease;
  5175. overflow: hidden;
  5176. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  5177. }
  5178. .operation-btn:hover {
  5179. transform: translateY(-1px);
  5180. box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  5181. }
  5182. .operation-btn:active {
  5183. transform: translateY(0);
  5184. }
  5185. .operation-btn i {
  5186. margin-right: 4px;
  5187. font-size: 13px;
  5188. }
  5189. .operation-btn span {
  5190. position: relative;
  5191. z-index: 1;
  5192. }
  5193. .item-operation-btn {
  5194. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5195. color: #ffffff;
  5196. }
  5197. .item-operation-btn:hover {
  5198. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5199. color: #ffffff;
  5200. }
  5201. .template-import-btn {
  5202. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5203. color: #ffffff;
  5204. margin-left: 10px;
  5205. }
  5206. .template-import-btn:hover {
  5207. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5208. color: #ffffff;
  5209. }
  5210. /* ==================== 检验单对话框样式 ==================== */
  5211. .fqc-inspection-dialog /deep/ .el-dialog__header {
  5212. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  5213. padding: 20px 24px;
  5214. border-radius: 8px 8px 0 0;
  5215. }
  5216. .fqc-inspection-dialog /deep/ .el-dialog__title {
  5217. color: #ffffff;
  5218. font-size: 18px;
  5219. font-weight: 600;
  5220. letter-spacing: 0.5px;
  5221. }
  5222. .fqc-inspection-dialog /deep/ .el-dialog__headerbtn .el-dialog__close {
  5223. color: #ffffff;
  5224. font-size: 20px;
  5225. }
  5226. .fqc-inspection-dialog /deep/ .el-dialog__body {
  5227. padding: 0;
  5228. background: #f5f7fa;
  5229. }
  5230. /* 单据信息卡片 */
  5231. .inspection-info-card {
  5232. background: #ffffff;
  5233. padding: 0px 0px;
  5234. }
  5235. .info-section {
  5236. margin-bottom: 0;
  5237. background: #f9fafb;
  5238. border-radius: 6px;
  5239. padding: 12px;
  5240. border: 1px solid #e8eaed;
  5241. transition: all 0.3s ease;
  5242. }
  5243. .info-section:hover {
  5244. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  5245. border-color: #d0d4d9;
  5246. }
  5247. .info-section:last-child {
  5248. margin-bottom: 0;
  5249. }
  5250. .section-title {
  5251. display: flex;
  5252. align-items: center;
  5253. margin-bottom: 12px;
  5254. padding-bottom: 8px;
  5255. border-bottom: 2px solid #e8eaed;
  5256. font-size: 14px;
  5257. font-weight: 600;
  5258. color: #303133;
  5259. }
  5260. .section-title i {
  5261. font-size: 18px;
  5262. margin-right: 8px;
  5263. color: #667eea;
  5264. }
  5265. .info-row {
  5266. margin-bottom: 0 !important;
  5267. }
  5268. .info-item {
  5269. margin-bottom: 0;
  5270. }
  5271. .info-item label {
  5272. display: block;
  5273. margin-bottom: 6px;
  5274. font-size: 12px;
  5275. font-weight: 500;
  5276. color: #606266;
  5277. }
  5278. .info-item label a {
  5279. color: #409eff;
  5280. text-decoration: none;
  5281. transition: color 0.3s;
  5282. }
  5283. .info-item label a:hover {
  5284. color: #66b1ff;
  5285. text-decoration: underline;
  5286. }
  5287. .info-item /deep/ .el-input--small .el-input__inner,
  5288. .info-item /deep/ .el-input-number--small .el-input__inner {
  5289. border-radius: 4px;
  5290. border: 1px solid #dcdfe6;
  5291. transition: all 0.3s;
  5292. }
  5293. .info-item /deep/ .el-input--small .el-input__inner:focus,
  5294. .info-item /deep/ .el-input-number--small .el-input__inner:focus {
  5295. border-color: #667eea;
  5296. box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
  5297. }
  5298. .info-item /deep/ .el-select {
  5299. width: 100%;
  5300. }
  5301. /* 操作按钮区域 */
  5302. .action-buttons {
  5303. display: flex;
  5304. justify-content: space-between;
  5305. align-items: center;
  5306. padding: 10px 12px;
  5307. background: #ffffff;
  5308. border-radius: 6px;
  5309. border: 1px solid #e8eaed;
  5310. margin-top: 10px;
  5311. }
  5312. .left-actions,
  5313. .right-actions {
  5314. display: flex;
  5315. gap: 10px;
  5316. }
  5317. .action-buttons .el-button {
  5318. border-radius: 6px;
  5319. font-weight: 500;
  5320. transition: all 0.3s ease;
  5321. }
  5322. .action-buttons .el-button:hover {
  5323. transform: translateY(-2px);
  5324. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5325. }
  5326. /* 检验项目列表 */
  5327. .inspection-table-wrapper {
  5328. background: #ffffff;
  5329. padding: 0px 0px;
  5330. }
  5331. .table-header {
  5332. display: flex;
  5333. align-items: center;
  5334. justify-content: space-between;
  5335. margin-bottom: 10px;
  5336. margin-top: 10px;
  5337. border-bottom: 2px solid #e8eaed;
  5338. }
  5339. .table-title {
  5340. font-size: 15px;
  5341. font-weight: 600;
  5342. color: #303133;
  5343. display: flex;
  5344. align-items: center;
  5345. }
  5346. .table-title i {
  5347. font-size: 18px;
  5348. margin-right: 8px;
  5349. color: #667eea;
  5350. }
  5351. .inspection-table {
  5352. border-radius: 8px;
  5353. overflow: hidden;
  5354. }
  5355. .inspection-table /deep/ .el-table__header-wrapper th {
  5356. background: linear-gradient(135deg, #f5f7fa 0%, #e8eaed 100%);
  5357. color: #303133;
  5358. font-weight: 600;
  5359. font-size: 13px;
  5360. padding: 12px 0;
  5361. }
  5362. .inspection-table /deep/ .el-table__body-wrapper .el-table__row {
  5363. transition: all 0.3s ease;
  5364. }
  5365. .inspection-table /deep/ .el-table__body-wrapper .el-table__row:hover {
  5366. background: #f5f7fa;
  5367. }
  5368. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped {
  5369. background: #fafbfc;
  5370. }
  5371. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped:hover {
  5372. background: #f0f2f5;
  5373. }
  5374. .inspection-table /deep/ .el-button--mini {
  5375. padding: 7px 10px;
  5376. border-radius: 4px;
  5377. font-size: 12px;
  5378. }
  5379. /* 底部操作按钮 */
  5380. .dialog-footer {
  5381. display: flex;
  5382. justify-content: center;
  5383. align-items: center;
  5384. gap: 12px;
  5385. padding: 12px 16px;
  5386. background: #ffffff;
  5387. border-top: 1px solid #e8eaed;
  5388. }
  5389. .dialog-footer .el-button {
  5390. min-width: 100px;
  5391. border-radius: 6px;
  5392. font-weight: 500;
  5393. transition: all 0.3s ease;
  5394. }
  5395. .dialog-footer .el-button:hover {
  5396. transform: translateY(-2px);
  5397. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5398. }
  5399. .dialog-footer .el-button--success {
  5400. background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  5401. border: none;
  5402. }
  5403. .dialog-footer .el-button--success:hover {
  5404. background: linear-gradient(135deg, #15b39d 0%, #4af58e 100%);
  5405. }
  5406. </style>