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.

5550 lines
189 KiB

11 months ago
5 months ago
5 months ago
5 months ago
2 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
6 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
6 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
2 months ago
11 months ago
11 months ago
5 months ago
11 months ago
11 months ago
11 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
5 months ago
11 months ago
7 months ago
11 months ago
7 months ago
11 months ago
7 months ago
11 months ago
7 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
5 months ago
11 months ago
5 months ago
5 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
5 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
7 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
7 months ago
7 months ago
11 months ago
11 months 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'
  139. format='yyyy-MM-dd HH:mm'
  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'
  148. format='yyyy-MM-dd HH:mm'
  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">{{scope.row[item.columnProp]}}</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: '301015Table1InspectorName',
  1889. tableId: "301015Table1",
  1890. tableName: "FQC检验记录表",
  1891. columnProp: 'inspectorName',
  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: 100,
  1902. },
  1903. {
  1904. userId: this.$store.state.user.name,
  1905. functionId: 301015,
  1906. serialNumber: '301015Table1SpecialRequirements',
  1907. tableId: "301015Table1",
  1908. tableName: "FQC检验记录表",
  1909. columnProp: 'specialRequirements',
  1910. headerAlign: "center",
  1911. align: "left",
  1912. columnLabel: '特殊要求',
  1913. columnHidden: false,
  1914. columnImage: false,
  1915. columnSortable: false,
  1916. sortLv: 0,
  1917. status: true,
  1918. fixed: '',
  1919. columnWidth: 200,
  1920. },
  1921. ],
  1922. //项目清单
  1923. detailData: {
  1924. site: '',
  1925. buNo: '',
  1926. inspectionNo:'',
  1927. partNo:'',
  1928. partDesc:'',
  1929. rollQty:'',
  1930. samplingQty: '',
  1931. unqualifiedQty: 0,
  1932. unqualifiedQuantity:'',
  1933. disposalMeasures:'',
  1934. disposalRemark: '',
  1935. inspectionResult: '',
  1936. inspectorNo: '',
  1937. inspectorName: '',
  1938. inspectionRemark: '',
  1939. submitFlag: '',
  1940. cinvSourceCode: '',
  1941. sku: '',
  1942. invdefinetype: '',
  1943. umId: '',
  1944. umName: '',
  1945. operator: '',
  1946. operatorName: '',
  1947. responsiblePerson: '',
  1948. responsiblePersonName: '',
  1949. state: '',
  1950. passQty: '',
  1951. notPassQty: '',
  1952. batchQualifiedQty: '',
  1953. spec: ''
  1954. },
  1955. detailInformationFlag: false,
  1956. detailList: [],
  1957. saveInformationData: {
  1958. site: '',
  1959. buNo: '',
  1960. inspectionNo:'',
  1961. disposalMeasures: '',
  1962. disposalRemark: '',
  1963. inspectorNo: '',
  1964. inspectionRemark: '',
  1965. samplingQty: '',
  1966. rollQty: '',
  1967. itemList:[],
  1968. unqualifiedQty: '',
  1969. partNo: '',
  1970. partDesc: '',
  1971. operator: '',
  1972. operatorName: '',
  1973. responsiblePerson: '',
  1974. responsiblePersonName: '',
  1975. subDetailList: [],
  1976. type: '',
  1977. passQty: '',
  1978. notPassQty: '',
  1979. batchQualifiedQty: ''
  1980. },
  1981. detailColumnList: [
  1982. {
  1983. userId: this.$store.state.user.name,
  1984. functionId: 301015,
  1985. serialNumber: '301015Table2ItemNo',
  1986. tableId: "301015Table2",
  1987. tableName: "检验单明细表",
  1988. columnProp: 'itemNo',
  1989. headerAlign: "center",
  1990. align: "center",
  1991. columnLabel: '检验项目编码',
  1992. columnHidden: false,
  1993. columnImage: false,
  1994. columnSortable: false,
  1995. sortLv: 0,
  1996. status: true,
  1997. fixed: '',
  1998. columnWidth: 120,
  1999. },
  2000. {
  2001. userId: this.$store.state.user.name,
  2002. functionId: 301015,
  2003. serialNumber: '301015Table2ItemDesc',
  2004. tableId: "301015Table2",
  2005. tableName: "检验单明细表",
  2006. columnProp: 'itemDesc',
  2007. headerAlign: "center",
  2008. align: "left",
  2009. columnLabel: '检验项目',
  2010. columnHidden: false,
  2011. columnImage: false,
  2012. columnSortable: false,
  2013. sortLv: 0,
  2014. status: true,
  2015. fixed: '',
  2016. columnWidth: 150,
  2017. },
  2018. {
  2019. userId: this.$store.state.user.name,
  2020. functionId: 301015,
  2021. serialNumber: '301015Table2SamplingLevelDesc',
  2022. tableId: "301015Table2",
  2023. tableName: "检验单明细表",
  2024. columnProp: 'samplingLevelDesc',
  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: 120,
  2035. },
  2036. {
  2037. userId: this.$store.state.user.name,
  2038. functionId: 301015,
  2039. serialNumber: '301015Table2SamplingProgrammeDesc',
  2040. tableId: "301015Table2",
  2041. tableName: "检验单明细表",
  2042. columnProp: 'samplingProgrammeDesc',
  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: '301015Table2MethodName',
  2058. tableId: "301015Table2",
  2059. tableName: "检验单明细表",
  2060. columnProp: 'methodName',
  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: '301015Table2MethodRemark',
  2076. tableId: "301015Table2",
  2077. tableName: "检验单明细表",
  2078. columnProp: 'methodRemark',
  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: 200,
  2089. },
  2090. {
  2091. userId: this.$store.state.user.name,
  2092. functionId: 301015,
  2093. serialNumber: '301015Table2ObjectDesc',
  2094. tableId: "301015Table2",
  2095. tableName: "检验单明细表",
  2096. columnProp: 'objectDesc',
  2097. headerAlign: "center",
  2098. align: "center",
  2099. columnLabel: '检测仪器',
  2100. columnHidden: false,
  2101. columnImage: false,
  2102. columnSortable: false,
  2103. sortLv: 0,
  2104. status: true,
  2105. fixed: '',
  2106. columnWidth: 120,
  2107. },
  2108. {
  2109. userId: this.$store.state.user.name,
  2110. functionId: 301015,
  2111. serialNumber: '301015Table2Aql',
  2112. tableId: "301015Table2",
  2113. tableName: "检验单明细表",
  2114. columnProp: 'aql',
  2115. headerAlign: "center",
  2116. align: "right",
  2117. columnLabel: 'AQL',
  2118. columnHidden: false,
  2119. columnImage: false,
  2120. columnSortable: false,
  2121. sortLv: 0,
  2122. status: true,
  2123. fixed: '',
  2124. columnWidth: 100,
  2125. },
  2126. {
  2127. userId: this.$store.state.user.name,
  2128. functionId: 301015,
  2129. serialNumber: '301015Table2Ac',
  2130. tableId: "301015Table2",
  2131. tableName: "检验单明细表",
  2132. columnProp: 'ac',
  2133. headerAlign: "center",
  2134. align: "right",
  2135. columnLabel: 'AC',
  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: '301015Table2Re',
  2148. tableId: "301015Table2",
  2149. tableName: "检验单明细表",
  2150. columnProp: 're',
  2151. headerAlign: "center",
  2152. align: "right",
  2153. columnLabel: 'RE',
  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: '301015Table2DefaultValue',
  2166. tableId: "301015Table2",
  2167. tableName: "检验单明细表",
  2168. columnProp: 'defaultValue',
  2169. headerAlign: "center",
  2170. align: "center",
  2171. columnLabel: '标准值',
  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: '301015Table2MaxValue',
  2184. tableId: "301015Table2",
  2185. tableName: "检验单明细表",
  2186. columnProp: 'maxValue',
  2187. headerAlign: "center",
  2188. align: "right",
  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: '301015Table2MinValue',
  2202. tableId: "301015Table2",
  2203. tableName: "检验单明细表",
  2204. columnProp: 'minValue',
  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: '301015Table2ValueType',
  2220. tableId: "301015Table2",
  2221. tableName: "检验单明细表",
  2222. columnProp: 'valueType',
  2223. headerAlign: "center",
  2224. align: "center",
  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. fileColumnList: [
  2236. {
  2237. columnProp: 'fileName',
  2238. headerAlign: "center",
  2239. align: "center",
  2240. columnLabel: '文件名称',
  2241. columnHidden: false,
  2242. columnImage: false,
  2243. columnSortable: false,
  2244. sortLv: 0,
  2245. status: true,
  2246. fixed: '',
  2247. },
  2248. {
  2249. columnProp: 'createdBy',
  2250. headerAlign: "center",
  2251. align: 'center',
  2252. columnLabel: '上传人',
  2253. columnHidden: false,
  2254. columnImage: false,
  2255. columnSortable: true,
  2256. sortLv: 0,
  2257. status: true,
  2258. fixed: false
  2259. },
  2260. {
  2261. columnProp: 'createDate',
  2262. headerAlign: "center",
  2263. align: 'center',
  2264. columnLabel: '上传时间',
  2265. columnHidden: false,
  2266. columnImage: false,
  2267. columnSortable: true,
  2268. sortLv: 0,
  2269. status: true,
  2270. fixed: false
  2271. },
  2272. {
  2273. columnProp: 'orderRef3',
  2274. headerAlign: "center",
  2275. align: 'center',
  2276. columnLabel: '备注',
  2277. columnHidden: false,
  2278. columnImage: false,
  2279. columnSortable: true,
  2280. sortLv: 0,
  2281. status: true,
  2282. fixed: false
  2283. },
  2284. ],
  2285. // 派工单号
  2286. seqInfoList: [],
  2287. seqDetailFlag: false,
  2288. seqDetailData: {
  2289. orderNo: '',
  2290. seqNo: '',
  2291. sku: '',
  2292. partNo: '',
  2293. partDesc: '',
  2294. operationDesc: '',
  2295. qtyrequired: '',
  2296. lotsize: '',
  2297. status: '下达'
  2298. },
  2299. seqDetailColumnList: [
  2300. {
  2301. userId: this.$store.state.user.name,
  2302. functionId: 301015,
  2303. serialNumber: '301015Table3OrderNo',
  2304. tableId: "301015Table3",
  2305. tableName: "任务新增-派工单",
  2306. fixed: '',
  2307. columnWidth: 80,
  2308. columnProp: 'orderNo',
  2309. headerAlign: "center",
  2310. align: "center",
  2311. columnLabel: '工单号',
  2312. columnHidden: false,
  2313. columnImage: false,
  2314. columnSortable: false,
  2315. sortLv: 0,
  2316. status: true,
  2317. },
  2318. {
  2319. userId: this.$store.state.user.name,
  2320. functionId: 301015,
  2321. serialNumber: '301015Table3SeqNo',
  2322. tableId: "301015Table3",
  2323. tableName: "任务新增-派工单",
  2324. fixed: '',
  2325. columnWidth: 80,
  2326. columnProp: 'seqNo',
  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: '301015Table3Sku',
  2340. tableId: "301015Table3",
  2341. tableName: "任务新增-派工单",
  2342. fixed: '',
  2343. columnWidth: 80,
  2344. columnProp: 'sku',
  2345. headerAlign: "center",
  2346. align: "center",
  2347. columnLabel: 'SKU',
  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: '301015Table3PartNo',
  2358. tableId: "301015Table3",
  2359. tableName: "任务新增-派工单",
  2360. fixed: '',
  2361. columnWidth: 80,
  2362. columnProp: 'partNo',
  2363. headerAlign: "center",
  2364. align: "center",
  2365. columnLabel: '物料编码',
  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: '301015Table3PartDesc',
  2376. tableId: "301015Table3",
  2377. tableName: "任务新增-派工单",
  2378. fixed: '',
  2379. columnWidth: 80,
  2380. columnProp: 'partDesc',
  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: '301015Table3Lotsize',
  2394. tableId: "301015Table3",
  2395. tableName: "任务新增-派工单",
  2396. fixed: '',
  2397. columnWidth: 80,
  2398. columnProp: 'lotsize',
  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: '301015Table3Qtyrequired',
  2412. tableId: "301015Table3",
  2413. tableName: "任务新增-派工单",
  2414. fixed: '',
  2415. columnWidth: 80,
  2416. columnProp: 'qtyrequired',
  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: '301015Table3OperationDesc',
  2430. tableId: "301015Table3",
  2431. tableName: "任务新增-派工单",
  2432. fixed: '',
  2433. columnWidth: 80,
  2434. columnProp: 'operationDesc',
  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. // 子明细数据对象
  2446. tableData: [],
  2447. checkedDetail: [],
  2448. subDetailFlag: false,
  2449. subDetailData: {
  2450. site: '',
  2451. buNo: '',
  2452. inspectionNo: '',
  2453. itemNo: '',
  2454. itemDesc: '',
  2455. defaultValue: '',
  2456. maxValue: '',
  2457. minValue: '',
  2458. valueTypeDb: '',
  2459. subDetailValues:[],
  2460. page: 1,
  2461. limit: 10,
  2462. },
  2463. options: [],
  2464. FAISelections: [],
  2465. modalFlag: false,
  2466. rules: {
  2467. orderNoType:[
  2468. {
  2469. required: true,
  2470. message: ' ',
  2471. trigger: ['blur','change']
  2472. }
  2473. ],
  2474. operationDescType:[
  2475. {
  2476. required: true,
  2477. message: ' ',
  2478. trigger: ['blur','change']
  2479. }
  2480. ],
  2481. resourceIdType:[
  2482. {
  2483. required: true,
  2484. message: ' ',
  2485. trigger: ['blur','change']
  2486. }
  2487. ],
  2488. rollQtyType:[
  2489. {
  2490. required: true,
  2491. message: ' ',
  2492. trigger: ['blur','change']
  2493. }
  2494. ],
  2495. seqNoType: [
  2496. {
  2497. required: true,
  2498. message: ' ',
  2499. trigger: ['blur','change']
  2500. }
  2501. ],
  2502. partNoType: [
  2503. {
  2504. required: true,
  2505. message: ' ',
  2506. trigger: ['blur','change']
  2507. }
  2508. ],
  2509. umIdType: [
  2510. {
  2511. required: true,
  2512. message: ' ',
  2513. trigger: ['blur','change']
  2514. }
  2515. ],
  2516. templateId: [
  2517. {
  2518. required: true,
  2519. message: ' ',
  2520. trigger: ['blur','change']
  2521. }
  2522. ],
  2523. bu:[
  2524. {
  2525. required: true,
  2526. message: ' ',
  2527. trigger: ['blur','change']
  2528. }
  2529. ]
  2530. },
  2531. resourceList: [],
  2532. operationList: [],
  2533. partList: [],
  2534. batchHandleAddModalFlag: false,
  2535. batchAddData: {
  2536. samplingLocation: '',
  2537. samplingLocationB: '',
  2538. samplingNumber: ''
  2539. },
  2540. controlData: {},
  2541. templateData: {
  2542. site: '',
  2543. bu: '',
  2544. templateId: '',
  2545. templateName: '',
  2546. inspectionTypeNo: '',
  2547. inspectionTypeName: ''
  2548. },
  2549. templateModelFlag: false,
  2550. templateDetailList: [
  2551. {
  2552. columnProp: 'templateId',
  2553. headerAlign: "center",
  2554. align: "center",
  2555. columnLabel: '模板编码',
  2556. columnHidden: false,
  2557. columnImage: false,
  2558. columnSortable: false,
  2559. sortLv: 0,
  2560. status: true,
  2561. fixed: '',
  2562. },
  2563. {
  2564. columnProp: 'templateName',
  2565. headerAlign: "center",
  2566. align: "center",
  2567. columnLabel: '模板名称',
  2568. columnHidden: false,
  2569. columnImage: false,
  2570. columnSortable: false,
  2571. sortLv: 0,
  2572. status: true,
  2573. fixed: '',
  2574. },
  2575. {
  2576. columnProp: 'inspectionTypeName',
  2577. headerAlign: "center",
  2578. align: "center",
  2579. columnLabel: '检验类型',
  2580. columnHidden: false,
  2581. columnImage: false,
  2582. columnSortable: false,
  2583. sortLv: 0,
  2584. status: true,
  2585. fixed: '',
  2586. },
  2587. ],
  2588. checked: false,
  2589. typeOptions: [],
  2590. disposalMeasuresOptions: [],
  2591. timeout: null,
  2592. partData: {
  2593. site: '',
  2594. bu: '',
  2595. partNo: '',
  2596. partDesc: '',
  2597. sku: '',
  2598. cinvSourceCode: ''
  2599. },
  2600. partDetailList: [
  2601. {
  2602. columnProp: 'partNo',
  2603. headerAlign: "center",
  2604. align: "center",
  2605. columnLabel: '物料编码',
  2606. columnHidden: false,
  2607. columnImage: false,
  2608. columnSortable: false,
  2609. sortLv: 0,
  2610. status: true,
  2611. fixed: '',
  2612. },
  2613. {
  2614. columnProp: 'partDesc',
  2615. headerAlign: "center",
  2616. align: "center",
  2617. columnLabel: '物料名称',
  2618. columnHidden: false,
  2619. columnImage: false,
  2620. columnSortable: false,
  2621. sortLv: 0,
  2622. status: true,
  2623. fixed: '',
  2624. },
  2625. {
  2626. columnProp: 'sku',
  2627. headerAlign: "center",
  2628. align: "center",
  2629. columnLabel: 'SKU',
  2630. columnHidden: false,
  2631. columnImage: false,
  2632. columnSortable: false,
  2633. sortLv: 0,
  2634. status: true,
  2635. fixed: '',
  2636. },
  2637. {
  2638. columnProp: 'cinvSourceCode',
  2639. headerAlign: "center",
  2640. align: "center",
  2641. columnLabel: 'PN',
  2642. columnHidden: false,
  2643. columnImage: false,
  2644. columnSortable: false,
  2645. sortLv: 0,
  2646. status: true,
  2647. fixed: '',
  2648. },
  2649. ],
  2650. partModelFlag: false,
  2651. umList: [],
  2652. userBuList: [],
  2653. buList: [],
  2654. authSearch: false,
  2655. authSave: false,
  2656. authCheck: false,
  2657. authCancelCheck: false,
  2658. authDelete: false,
  2659. authDetail: false,
  2660. authFile: false,
  2661. authExceptionModify: false,
  2662. exceptionModifyMode: false,
  2663. exceptionModifyInspectionResult: '',
  2664. exceptionModifyItemResultMap: {},
  2665. menuId: this.$route.meta.menuId,
  2666. roleList: [],
  2667. operatorList: [],
  2668. operatorData: {
  2669. flag: '',
  2670. site: '',
  2671. bu: '',
  2672. adminID: '',
  2673. adminName: '',
  2674. roleName: '',
  2675. roleId: '',
  2676. userName: this.$store.state.user.name
  2677. },
  2678. operatorModelFlag: false,
  2679. dataListSelections2: [],
  2680. operatorDetailList: [
  2681. {
  2682. columnProp: 'adminID',
  2683. headerAlign: "center",
  2684. align: "center",
  2685. columnLabel: '用户账号',
  2686. columnHidden: false,
  2687. columnImage: false,
  2688. columnSortable: false,
  2689. sortLv: 0,
  2690. status: true,
  2691. fixed: '',
  2692. },
  2693. {
  2694. columnProp: 'adminName',
  2695. headerAlign: "center",
  2696. align: "center",
  2697. columnLabel: '用户名称',
  2698. columnHidden: false,
  2699. columnImage: false,
  2700. columnSortable: false,
  2701. sortLv: 0,
  2702. status: true,
  2703. fixed: '',
  2704. },
  2705. {
  2706. columnProp: 'email',
  2707. headerAlign: "center",
  2708. align: "center",
  2709. columnLabel: '邮箱',
  2710. columnHidden: false,
  2711. columnImage: false,
  2712. columnSortable: false,
  2713. sortLv: 0,
  2714. status: true,
  2715. fixed: '',
  2716. },
  2717. {
  2718. columnProp: 'phone',
  2719. headerAlign: "center",
  2720. align: "center",
  2721. columnLabel: '手机号',
  2722. columnHidden: false,
  2723. columnImage: false,
  2724. columnSortable: false,
  2725. sortLv: 0,
  2726. status: true,
  2727. fixed: '',
  2728. },
  2729. ],
  2730. acquisitionList: [],
  2731. ItemObjectModelFlag: false,
  2732. itemObjectList: [],
  2733. itemObjectColumnList: [
  2734. {
  2735. columnProp: 'itemNo',
  2736. headerAlign: "center",
  2737. align: "center",
  2738. columnLabel: '项目编码',
  2739. columnHidden: false,
  2740. columnImage: false,
  2741. status: true,
  2742. columnWidth: 120,
  2743. },
  2744. {
  2745. columnProp: 'itemDesc',
  2746. headerAlign: "center",
  2747. align: "left",
  2748. columnLabel: '项目名称',
  2749. columnHidden: false,
  2750. columnImage: false,
  2751. status: true,
  2752. columnWidth: 200,
  2753. },
  2754. ],
  2755. actionData: {
  2756. site: '',
  2757. buNo: '',
  2758. inspectionNo: ''
  2759. },
  2760. fileLoading: false,
  2761. subDetailLoading: false,
  2762. saveLoading: false,
  2763. searchLoading: false,
  2764. // FQC项目操作相关
  2765. itemOperationDialogFlag: false,
  2766. itemOperationQuery: {
  2767. itemNo: '',
  2768. itemDesc: '',
  2769. },
  2770. availableItemList: [],
  2771. selectedItemList: [],
  2772. availableItemSelections: [],
  2773. selectedItemSelections: [],
  2774. // FQC模板导入相关
  2775. templateImportDialogFlag: false,
  2776. templateQuery: {
  2777. templateId: '',
  2778. templateDesc: '',
  2779. },
  2780. templateList: [],
  2781. templateSelections: [],
  2782. importLoading: false
  2783. }
  2784. },
  2785. mounted () {
  2786. this.calculateTableHeight();
  2787. window.addEventListener('resize', this.calculateTableHeight);
  2788. },
  2789. beforeDestroy() {
  2790. window.removeEventListener('resize', this.calculateTableHeight);
  2791. },
  2792. created () {
  2793. // 按钮控制
  2794. this.getButtonAuthData()
  2795. // 获取用户的 site 和 bu
  2796. this.getSiteAndBuByUserName()
  2797. // 获取用户的 site 和 bu
  2798. this.getSiteAndBuByUserName2()
  2799. // 收藏
  2800. this.favoriteIsOk()
  2801. // 检验类型
  2802. this.inspectionTypeSearch()
  2803. // 处置措施
  2804. this.disposalMeasuresSearch()
  2805. // 单位
  2806. this.umSearch()
  2807. // 查看 质量任务生成规则控制 动控是否开启
  2808. this.queryController()
  2809. // 动态列
  2810. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2811. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2812. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2813. if (!this.authSearch) {
  2814. // 获取数据列表
  2815. this.getDataList()
  2816. }
  2817. // 获取用户角色
  2818. this.getUserRoleList()
  2819. // 加载工序下拉列表
  2820. this.loadOperationDescList()
  2821. },
  2822. methods: {
  2823. // 加载工序下拉列表
  2824. loadOperationDescList() {
  2825. const params = {
  2826. userName: this.$store.state.user.name
  2827. }
  2828. getAllOperationDescList(params).then(({data}) => {
  2829. if (data && data.code === 0) {
  2830. this.operationDescList = data.rows || []
  2831. }
  2832. })
  2833. },
  2834. // 切换搜索框展开/收起
  2835. toggleSearchExpand() {
  2836. this.searchExpanded = !this.searchExpanded;
  2837. this.calculateTableHeight();
  2838. },
  2839. // 计算表格高度
  2840. calculateTableHeight() {
  2841. this.$nextTick(() => {
  2842. const windowHeight = window.innerHeight;
  2843. const headerHeight = this.searchExpanded ? 412 : 186;
  2844. this.height = windowHeight - headerHeight - 65;
  2845. });
  2846. },
  2847. // 重置搜索条件
  2848. resetSearch() {
  2849. this.searchData = {
  2850. site: '',
  2851. userName: this.$store.state.user.name,
  2852. inspectionNo: '',
  2853. inspectionTypeNo: '',
  2854. isQualified: '',
  2855. buNo: '',
  2856. startDate: '',
  2857. endDate: '',
  2858. startDate2: '',
  2859. endDate2: '',
  2860. partNo:'',
  2861. partDesc:'',
  2862. cinvSourceCode:'',
  2863. sku:'',
  2864. state: '',
  2865. inspectionResult: '',
  2866. disposalMeasures: '',
  2867. page: 1,
  2868. limit: 10,
  2869. states: ['未开始','待检验'],
  2870. orderNo: '',
  2871. seqNo: '',
  2872. operationDesc: '',
  2873. documentNo: ''
  2874. }
  2875. },
  2876. // 获取用户的bu
  2877. getSiteAndBuByUserName2 () {
  2878. let tempData = {
  2879. username: this.$store.state.user.name,
  2880. }
  2881. getSiteAndBuByUserName2(tempData).then(({data}) => {
  2882. if (data.code === 0) {
  2883. this.buList = data.rows
  2884. }
  2885. })
  2886. },
  2887. // 批量打印标签
  2888. printList () {
  2889. if (this.FAISelections.length === 0) {
  2890. this.$message.warning('请勾选要打印的检验单!')
  2891. return
  2892. }
  2893. const inspectionNos = this.$refs.qrCode.init(this.FAISelections.map(item => item.inspectionNo))
  2894. for (let i = 0; i < inspectionNos.length; i++) {
  2895. this.FAISelections[i].qrCode = inspectionNos[i]
  2896. }
  2897. qcPrint(this.FAISelections)
  2898. },
  2899. // 数据采集
  2900. dataAcquisition () {
  2901. this.loadFlag = true
  2902. let tempDate = {
  2903. site: this.detailData.site,
  2904. buNo: this.detailData.buNo,
  2905. inspectionNo: this.detailData.inspectionNo,
  2906. flag: 'fqc'
  2907. }
  2908. dataAcquisition(tempDate).then(({data}) => {
  2909. if (data.code === 0) {
  2910. this.changeMyString(data.rows)
  2911. this.$message.success('数据采集成功')
  2912. } else {
  2913. this.$message.error(data.msg)
  2914. }
  2915. this.loadFlag = false
  2916. })
  2917. },
  2918. // 根据项目数据采集
  2919. dataAcquisitionByItem (row) {
  2920. this.loadFlag = true
  2921. let tempDate = {
  2922. site: row.site,
  2923. buNo: row.buNo,
  2924. inspectionNo: row.inspectionNo,
  2925. templateId: row.templateId,
  2926. itemNo: row.itemNo,
  2927. flag: 'fqc'
  2928. }
  2929. dataAcquisitionByItem(tempDate).then(({data}) => {
  2930. if (data.code === 0) {
  2931. this.changeMyString(data.rows)
  2932. this.$message.success('数据采集成功')
  2933. } else {
  2934. this.$message.error(data.msg)
  2935. }
  2936. this.loadFlag = false
  2937. })
  2938. },
  2939. // 获取用户角色
  2940. getUserRoleList () {
  2941. getUserRoleList().then(({data}) => {
  2942. if (data.code === 0) {
  2943. this.roleList = data.rows
  2944. } else {
  2945. this.roleList = []
  2946. }
  2947. })
  2948. },
  2949. // 获取协同人员列表
  2950. getOperatorList () {
  2951. this.operatorData.flag = '1'
  2952. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2953. if (this.roleList.length > 0) {
  2954. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2955. if (filterList.length > 0) {
  2956. this.operatorData.roleId = filterList[0].roleId
  2957. } else {
  2958. this.operatorData.roleId = this.roleList[0].roleId
  2959. }
  2960. } else {
  2961. this.operatorData.roleId = ''
  2962. }
  2963. // 先清空缓存选中
  2964. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2965. // 拿到选中的人员编号
  2966. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2967. getOperatorList(this.operatorData).then(({data}) => {
  2968. if (data && data.code === 0) {
  2969. this.operatorList = data.rows
  2970. this.operatorList.forEach(val => {
  2971. // 回显选中
  2972. if (tempDataList.includes(val.adminID)) {
  2973. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2974. }
  2975. })
  2976. this.operatorModelFlag = true
  2977. } else {
  2978. this.$message.error(data.msg)
  2979. }
  2980. })
  2981. },
  2982. // 获取责任人员列表
  2983. getResponsiblePersonList () {
  2984. this.operatorData.flag = '2'
  2985. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2986. // 先清空缓存选中
  2987. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2988. // 拿到选中的人员编号
  2989. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2990. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2991. if (data && data.code === 0) {
  2992. this.operatorList = data.rows
  2993. this.operatorList.forEach(val => {
  2994. // 回显选中
  2995. if (tempDataList.includes(val.adminID)) {
  2996. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2997. }
  2998. })
  2999. this.operatorModelFlag = true
  3000. } else {
  3001. this.$message.error(data.msg)
  3002. }
  3003. })
  3004. },
  3005. // 查询机修人员列表
  3006. getOperatorList2 () {
  3007. if (this.operatorData.flag === '1') {
  3008. // 拿到选中的人员编号
  3009. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  3010. getOperatorList(this.operatorData).then(({data}) => {
  3011. if (data && data.code === 0) {
  3012. this.operatorList = data.rows
  3013. this.operatorList.forEach(val => {
  3014. // 回显选中的部门
  3015. if (tempDataList.includes(val.adminID)) {
  3016. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3017. }
  3018. })
  3019. } else {
  3020. this.operatorList = []
  3021. }
  3022. })
  3023. } else {
  3024. // 拿到选中的人员编号
  3025. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  3026. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  3027. if (data && data.code === 0) {
  3028. this.operatorList = data.rows
  3029. this.operatorList.forEach(val => {
  3030. // 回显选中的部门
  3031. if (tempDataList.includes(val.adminID)) {
  3032. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  3033. }
  3034. })
  3035. } else {
  3036. this.operatorList = []
  3037. }
  3038. })
  3039. }
  3040. },
  3041. // 点击行选中复选框
  3042. operatorClickRow (row) {
  3043. this.$refs.operatorTable.toggleRowSelection(row)
  3044. },
  3045. // 多选
  3046. selectionChangeHandle2 (val) {
  3047. this.dataListSelections2 = val
  3048. },
  3049. // 确认多选协同人员
  3050. confirmOperator () {
  3051. if (this.dataListSelections2.length === 0) {
  3052. this.$message.warning('请勾选人员!')
  3053. return
  3054. }
  3055. if (this.operatorData.flag === '1') {
  3056. for (let i = 0; i < this.dataListSelections2.length; i++) {
  3057. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  3058. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  3059. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  3060. }
  3061. }
  3062. if (this.detailData.operator.charAt(0) === ';') {
  3063. this.detailData.operator = this.detailData.operator.substring(1)
  3064. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  3065. }
  3066. } else {
  3067. for (let i = 0; i < this.dataListSelections2.length; i++) {
  3068. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  3069. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  3070. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  3071. }
  3072. }
  3073. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  3074. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  3075. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  3076. }
  3077. }
  3078. this.operatorData = {
  3079. flag: '',
  3080. site: '',
  3081. bu: '',
  3082. adminID: '',
  3083. adminName: '',
  3084. roleName: '',
  3085. roleId: '',
  3086. userName: this.$store.state.user.name
  3087. }
  3088. this.operatorModelFlag = false
  3089. },
  3090. // bu内容改变事件
  3091. buChange () {
  3092. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  3093. this.modalData.templateId = ''
  3094. this.modalData.templateName = ''
  3095. } else { // 无工单检验
  3096. this.modalData.partNo = ''
  3097. this.modalData.partDesc = ''
  3098. this.modalData.invdefinetype = ''
  3099. this.modalData.sku = ''
  3100. this.modalData.cinvSourceCode = ''
  3101. this.modalData.templateId = ''
  3102. this.modalData.templateName = ''
  3103. }
  3104. },
  3105. // 获取用户的bu
  3106. getSiteAndBuByUserName () {
  3107. let tempData = {
  3108. username: this.$store.state.user.name,
  3109. }
  3110. getSiteAndBuByUserName(tempData).then(({data}) => {
  3111. if (data.code === 0) {
  3112. this.userBuList = data.rows
  3113. }
  3114. })
  3115. },
  3116. // 子明细导入
  3117. subDetailUpload () {
  3118. let currentData = {
  3119. flag: 'FQC',
  3120. site: this.detailData.site,
  3121. buNo: this.detailData.buNo,
  3122. inspectionNo: this.detailData.inspectionNo
  3123. }
  3124. //打开组件 去做新增业务
  3125. this.$nextTick(() => {
  3126. this.$refs.subDetailUpload.init(currentData)
  3127. })
  3128. },
  3129. // 查询单位
  3130. umSearch () {
  3131. let tempData = {
  3132. site: this.$store.state.user.site,
  3133. active: 'Y'
  3134. }
  3135. umSearch(tempData).then(({data}) => {
  3136. if (data.code === 0) {
  3137. this.umList = data.rows
  3138. }
  3139. })
  3140. },
  3141. // 标签号回车事件
  3142. rollNoEnter () {
  3143. const regex = /\(08\)(.*)/
  3144. const result = this.modalData.rollNo.match(regex)
  3145. let tempData = {
  3146. site: '',
  3147. bu: this.modalData.bu,
  3148. rollNo: result == null ? this.modalData.rollNo : result[1]
  3149. }
  3150. rollNoEnter(tempData).then(({data}) => {
  3151. if (data && data.code === 0) {
  3152. this.operationList = data.rows
  3153. this.modalData.seqNo = data.rows[0].seqNo
  3154. this.modalData.orderNo = data.rows[0].orderNo
  3155. this.modalData.operationDesc = data.rows[0].operationDesc
  3156. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3157. this.modalData.resourceId = data.rows[0].resourceId
  3158. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3159. this.modalData.partNo = data.rows[0].partNo
  3160. this.modalData.partDesc = data.rows[0].partDesc
  3161. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3162. this.modalData.sku = data.rows[0].sku
  3163. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3164. } else {
  3165. this.$message.error(data.msg)
  3166. }
  3167. })
  3168. },
  3169. querySearchAsync (queryString, cb) {
  3170. clearTimeout(this.timeout)
  3171. let results = []
  3172. if (queryString === '') {
  3173. cb(results)
  3174. } else {
  3175. // 掉接口需要的参数
  3176. let find = {
  3177. rollNo: queryString, //上面输入框绑定的数据
  3178. site: this.$store.state.user.site,
  3179. }
  3180. // 这里去调后端的接口.根据自己接口的情况进行赋值
  3181. getRollNo(find).then(({data}) => {
  3182. if (data.code === 0) {
  3183. let result = data.rows
  3184. // 循环放到一个远程搜索需要的数组
  3185. for (let i = 0; i < result.length; i++) {
  3186. const element = result[i]
  3187. results.push({
  3188. value: element.rollNo,
  3189. seqNo: element.seqNo,
  3190. orderNo: element.orderNo
  3191. })
  3192. }
  3193. cb(results)
  3194. } else {
  3195. results = []
  3196. cb(results)
  3197. }
  3198. })
  3199. }
  3200. },
  3201. // 点击出现搜索后点击的每一项
  3202. handleSelect (item) {
  3203. this.modalData.rollNo = item.value
  3204. this.modalData.seqNo = item.seqNo
  3205. this.modalData.orderNo = item.orderNo
  3206. this.getOperationList()
  3207. //this.getPartList()
  3208. },
  3209. // 获取处置措施列表
  3210. disposalMeasuresSearch () {
  3211. let tempData = {
  3212. inspectionTypeNo: '107'
  3213. }
  3214. disposalMeasuresSearch(tempData).then(({data}) => {
  3215. if (data.code === 0) {
  3216. this.disposalMeasuresOptions = data.rows
  3217. }
  3218. })
  3219. },
  3220. // 查询检验类型
  3221. inspectionTypeSearch () {
  3222. let tempData = {
  3223. site: this.$store.state.user.site
  3224. }
  3225. inspectionTypeSearch(tempData).then(({data}) => {
  3226. if (data.code === 0) {
  3227. this.typeOptions = data.rows
  3228. this.typeOptions.forEach(val => {
  3229. if (val.inspectionTypeName.includes('FQC')) {
  3230. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  3231. this.templateData.inspectionTypeName = val.inspectionTypeName
  3232. }
  3233. })
  3234. }
  3235. })
  3236. },
  3237. // 获取基础数据列表S
  3238. getBaseList (val,type) {
  3239. this.tagNo = val
  3240. this.$nextTick(() => {
  3241. let strVal = ''
  3242. if (val === 1052) {
  3243. this.searchSeqInfo()
  3244. this.seqDetailFlag = true
  3245. }
  3246. if (val === 505) {
  3247. strVal = this.modalData.resourceDesc
  3248. this.$refs.baseList.init(val, strVal)
  3249. }
  3250. })
  3251. },
  3252. /* 列表方法的回调 */
  3253. getBaseData (val) {
  3254. if (this.tagNo === 1052) {
  3255. this.modalData.seqNo = val.seqno
  3256. this.modalData.orderNo = val.orderno
  3257. this.modalData.operationDesc = ''
  3258. this.modalData.resourceId = ''
  3259. this.getOperationList()
  3260. }
  3261. if (this.tagNo === 505) {
  3262. this.modalData.resourceId = val.resource_id
  3263. this.modalData.resourceDesc = val.resource_desc
  3264. }
  3265. },
  3266. // 获取机台列表
  3267. getResourceList () {
  3268. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  3269. if (this.modalData.specialTaskFlag === 'Y') {
  3270. return
  3271. } else {
  3272. getResourceList(this.modalData).then(({data}) => {
  3273. if (data && data.code === 0) {
  3274. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3275. this.modalData.resourceId = data.rows[0].resourceId
  3276. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3277. } else {
  3278. this.$message.error(data.msg)
  3279. }
  3280. })
  3281. }
  3282. },
  3283. // 获取工序列表
  3284. getOperationList () {
  3285. getOperationList(this.modalData).then(({data}) => {
  3286. if (data && data.code === 0) {
  3287. this.operationList = data.rows
  3288. this.modalData.operationDesc = data.rows[0].operationDesc
  3289. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3290. this.modalData.resourceId = data.rows[0].resourceId
  3291. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3292. this.modalData.partNo = data.rows[0].partNo
  3293. this.modalData.partDesc = data.rows[0].partDesc
  3294. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3295. this.modalData.sku = data.rows[0].sku
  3296. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3297. this.modalData.operationDesc = data.rows[0].operationDesc
  3298. this.modalData.qtyrequired = data.rows[0].qtyrequired
  3299. this.modalData.lotsize = data.rows[0].lotsize
  3300. } else {
  3301. this.$message.error(data.msg)
  3302. }
  3303. })
  3304. },
  3305. // 获取物料列表
  3306. getPartList () {
  3307. getPartList(this.modalData).then(({data}) => {
  3308. if (data && data.code === 0) {
  3309. this.partList = data.rows
  3310. this.modalData.partNo = this.partList[0].partNo
  3311. this.modalData.partDesc = this.partList[0].partDesc
  3312. this.modalData.invdefinetype = this.partList[0].invdefinetype
  3313. this.modalData.sku = this.partList[0].sku
  3314. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  3315. } else {
  3316. this.$message.error(data.msg)
  3317. }
  3318. })
  3319. },
  3320. // 是否新增特殊任务
  3321. changeSpecialTask () {
  3322. // 先重置数据
  3323. this.modalData = {
  3324. flag: '1',
  3325. site: '',
  3326. bu: this.userBuList[0].buNo,
  3327. inspectionNo: '',
  3328. partNo: '',
  3329. partDesc: '',
  3330. inspectionTypeNo: '',
  3331. inspectionTypeName: '',
  3332. inspectorNo: '',
  3333. inspectorName: '',
  3334. submit_flag: '',
  3335. orderNo: '',
  3336. operationDesc: '',
  3337. operationNo: '',
  3338. resourceId: '',
  3339. resourceDesc: '',
  3340. rollQty: '',
  3341. seqNo: '',
  3342. batchRollNo: '',
  3343. invdefinetype: '',
  3344. sku: '',
  3345. cinvSourceCode: '',
  3346. specialRequirements: '',
  3347. templateId: '',
  3348. templateName: '',
  3349. specialTaskFlag: '',
  3350. workCenterNo: '',
  3351. rollNo: '',
  3352. umId: this.umList[0].umId,
  3353. umName: this.umList[0].umName
  3354. }
  3355. // 获取选中框
  3356. let obj = document.getElementsByName('specialTask')
  3357. // 判断是否打勾
  3358. if (obj[0].checked) {
  3359. let tempData = {
  3360. site: '',
  3361. bu: this.modalData.bu
  3362. }
  3363. this.modalData.specialTaskFlag = 'Y'
  3364. // 获取特殊工序列表
  3365. getSpecialOperationList(tempData).then(({data}) => {
  3366. if (data && data.code === 0) {
  3367. this.operationList = data.rows
  3368. } else {
  3369. this.$message.error(data.msg)
  3370. }
  3371. })
  3372. // 派工单和工单号赋值
  3373. this.modalData.seqNo = '000#1TSGD'
  3374. this.modalData.orderNo = '000#1'
  3375. } else {
  3376. this.operationList = []
  3377. this.modalData.specialTaskFlag = ''
  3378. }
  3379. },
  3380. // 新增FAI巡检记录
  3381. saveData () {
  3382. if (this.modalData.bu === '' || this.modalData.bu == null) {
  3383. this.$message.warning('请选择BU!')
  3384. return
  3385. }
  3386. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  3387. this.$message.warning('请选择派工单!')
  3388. return
  3389. }
  3390. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  3391. this.$message.warning('请选择工单!')
  3392. return
  3393. }
  3394. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  3395. this.$message.warning('请选择物料!')
  3396. return
  3397. }
  3398. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  3399. this.$message.warning('请选择工序!')
  3400. return
  3401. }
  3402. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  3403. this.$message.warning('请选择机台!')
  3404. return
  3405. }
  3406. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  3407. this.$message.warning('请填写送检数量!')
  3408. return
  3409. }
  3410. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3411. this.$message.warning('请选择单位!')
  3412. return
  3413. }
  3414. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  3415. this.$message.warning('请选择检验模板!')
  3416. return
  3417. }
  3418. this.saveLoading = true
  3419. if (this.modalData.flag === '1') {
  3420. saveFQCInspection(this.modalData).then(({data}) => {
  3421. if (data && data.code === 0) {
  3422. this.getDataList()
  3423. this.operationList = []
  3424. this.resourceList = []
  3425. this.partList = []
  3426. this.modalFlag = false
  3427. this.$message.success('操作成功')
  3428. } else {
  3429. this.$message.error(data.msg)
  3430. }
  3431. this.saveLoading = false
  3432. }).catch(()=>{
  3433. this.saveLoading = false
  3434. })
  3435. }
  3436. },
  3437. // 检查动控是否开启
  3438. queryController () {
  3439. let tempData = {
  3440. controlNo: '10004',
  3441. site: this.$store.state.user.site,
  3442. }
  3443. queryController(tempData).then(({data}) => {
  3444. if (data && data.code === 0) {
  3445. this.controlData = data.rows
  3446. } else {
  3447. this.$message.error(data.msg)
  3448. }
  3449. })
  3450. },
  3451. // 新增
  3452. addModal () {
  3453. this.modalData = {
  3454. flag: '1',
  3455. site: '',
  3456. bu: this.userBuList[0].buNo,
  3457. inspectionNo: '',
  3458. partNo: '',
  3459. partDesc: '',
  3460. inspectionTypeNo: '107',
  3461. inspectionTypeName: '',
  3462. inspectorNo: '',
  3463. inspectorName: '',
  3464. submit_flag: '',
  3465. orderNo: '',
  3466. operationDesc: '',
  3467. operationNo: '',
  3468. resourceId: '',
  3469. resourceDesc: '',
  3470. rollQty: '',
  3471. seqNo: '',
  3472. batchRollNo: '',
  3473. invdefinetype: '',
  3474. sku: '',
  3475. cinvSourceCode: '',
  3476. specialRequirements: '',
  3477. templateId: '',
  3478. templateName: '',
  3479. specialTaskFlag: '',
  3480. workCenterNo: '',
  3481. rollNo: '',
  3482. umId: this.umList[0].umId,
  3483. umName: this.umList[0].umName,
  3484. sjzs: '',
  3485. }
  3486. this.operationList = []
  3487. this.resourceList = []
  3488. this.partList = []
  3489. this.modalFlag = true
  3490. this.checked = false
  3491. },
  3492. // 获取检验模板列表
  3493. queryTemplateList () {
  3494. this.templateData.bu = this.modalData.bu
  3495. // 查询所有检验模板
  3496. queryTemplateList(this.templateData).then(({data}) => {
  3497. if (data && data.code === 0) {
  3498. this.templateList = data.rows
  3499. this.templateModelFlag = true
  3500. }else {
  3501. this.$message.error(data.msg)
  3502. }
  3503. })
  3504. },
  3505. // 获取物料列表
  3506. queryPartList () {
  3507. this.partData.bu = this.modalData.bu
  3508. // 查询所有物料
  3509. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3510. this.partList = []
  3511. this.partModelFlag = true
  3512. } else {
  3513. queryPartList(this.partData).then(({data}) => {
  3514. if (data && data.code === 0) {
  3515. this.partList = data.rows
  3516. this.partModelFlag = true
  3517. } else {
  3518. this.$message.error(data.msg)
  3519. }
  3520. })
  3521. }
  3522. },
  3523. // 选中检验模板
  3524. getRowData (row) {
  3525. this.modalData.templateId = row.templateId
  3526. this.modalData.templateName = row.templateName
  3527. this.templateModelFlag = false
  3528. },
  3529. // 选中派工单号
  3530. getRowData1 (row) {
  3531. this.modalData.sku = row.sku
  3532. this.modalData.cinvSourceCode = row.cinvSourceCode
  3533. this.modalData.orderNo = row.orderNo
  3534. this.modalData.seqNo = row.seqNo
  3535. this.modalData.lotsize = row.lotsize
  3536. this.modalData.operationDesc = row.operationDesc
  3537. this.modalData.qtyrequired = row.qtyrequired
  3538. this.modalData.rollQty = row.qtyrequired
  3539. this.modalData.sjzs = row.sjzs
  3540. this.getOperationList()
  3541. this.seqDetailFlag = false
  3542. },
  3543. // 选中物料
  3544. getRowData2 (row) {
  3545. this.modalData.partNo = row.partNo
  3546. this.modalData.partDesc = row.partDesc
  3547. this.modalData.sku = row.sku
  3548. this.modalData.cinvSourceCode = row.cinvSourceCode
  3549. this.modalData.invdefinetype = row.invdefinetype
  3550. this.partData = {
  3551. site: '',
  3552. bu: '',
  3553. partNo: '',
  3554. partDesc: '',
  3555. sku: '',
  3556. cinvSourceCode: ''
  3557. }
  3558. this.partModelFlag = false
  3559. },
  3560. selectFlag () {
  3561. return true
  3562. },
  3563. // 单机选中
  3564. FAIClickRow (row) {
  3565. this.$refs.FAITable.toggleRowSelection(row)
  3566. },
  3567. // 复选
  3568. selectionFAI (val) {
  3569. this.FAISelections = val
  3570. },
  3571. // 刷新派设备文档的列表
  3572. getFileContentData (row) {
  3573. this.currentFileRow = row
  3574. this.fileActiveTab = 'qcFile'
  3575. let currentData = {
  3576. orderRef1: row.site,
  3577. orderRef2: row.inspectionNo,
  3578. orderRef4: row.buNo,
  3579. partNo: row.partNo
  3580. }
  3581. this.fileLoading = true
  3582. getInspectionFile(currentData).then(({data}) => {
  3583. if (data && data.code === 0) {
  3584. this.fileContentList = data.rows
  3585. } else {
  3586. this.fileContentList = []
  3587. }
  3588. this.fileLoading = false
  3589. }).catch(()=>{
  3590. this.fileLoading = false
  3591. })
  3592. this.getSopFileList(row)
  3593. this.fileFlag = true
  3594. },
  3595. // 打开文件清单外部链接(按物料编码)
  3596. openFileExternalLink () {
  3597. const partNo = (this.currentFileRow && this.currentFileRow.partNo) || this.detailData.partNo
  3598. if (!partNo) {
  3599. this.$message.error('物料号不能为空')
  3600. return false
  3601. }
  3602. const baseUrl = window.SITE_CONFIG['materialSopUrl'] || 'http://pdm.bt.in/#/public/materialSop'
  3603. const targetUrl = `${baseUrl}/${partNo}`
  3604. window.open(targetUrl, '_blank')
  3605. },
  3606. // 获取SOP文件列表(FQC传所有条件:site, partNo, operationDesc, workcenterNo, orderNo)
  3607. getSopFileList(row) {
  3608. this.sopFileLoading = true
  3609. this.sopFileList = []
  3610. searchQcSopFileList({
  3611. site: row.site,
  3612. partNo: row.partNo || '',
  3613. operationDesc: row.operationDesc || '',
  3614. workcenterNo: row.workCenterNo || '',
  3615. orderNo: row.orderNo || ''
  3616. }).then(({data}) => {
  3617. if (data && data.code === 0) {
  3618. this.sopFileList = data.rows || []
  3619. } else {
  3620. this.sopFileList = []
  3621. }
  3622. this.sopFileLoading = false
  3623. }).catch(() => {
  3624. this.sopFileList = []
  3625. this.sopFileLoading = false
  3626. })
  3627. },
  3628. previewSopFile(row) {
  3629. if (!row.sopUrl) {
  3630. this.$message.warning('该文件暂无预览路径')
  3631. return
  3632. }
  3633. const fileName = row.sopName || row.sopUrl
  3634. downloadSopFile(row.sopUrl).then(({ data }) => {
  3635. this.$filePreview.previewFile(data, fileName).then(result => {
  3636. if (result.message) {
  3637. this.$message.success(result.message)
  3638. }
  3639. }).catch(error => {
  3640. this.$message.error('文件预览失败:' + (error.message || '未知错误'))
  3641. })
  3642. }).catch(() => {
  3643. this.$message.error('文件下载失败,请稍后重试')
  3644. })
  3645. },
  3646. // 新增文件的modal
  3647. addUploadFileModal () {
  3648. let currentData = {
  3649. titleCon: 'FQC文件上传',
  3650. site: this.detailData.site,
  3651. buNo: this.detailData.buNo,
  3652. createBy: this.$store.state.user.name,
  3653. inspectionNo: this.detailData.inspectionNo,
  3654. remark: '',
  3655. folder: 'qcFQC',
  3656. }
  3657. //打开组件 去做新增业务
  3658. this.$nextTick(() => {
  3659. this.$refs.qcFAIUploadFile.init(currentData)
  3660. })
  3661. },
  3662. // 上传项目图片
  3663. uploadImageModal (row) {
  3664. // 打开上传图片前先应用当前数据,防止上传完成刷新表单后导致未保存的数据丢失
  3665. if (this.detailData.state === '待检验') {
  3666. this.Transfer('1')
  3667. }
  3668. let currentData = {
  3669. site: this.detailData.site,
  3670. buNo: this.detailData.buNo,
  3671. createBy: this.$store.state.user.name,
  3672. inspectionNo: this.detailData.inspectionNo,
  3673. itemNo: row.itemNo,
  3674. folder: 'FQCItemImageFile'
  3675. }
  3676. //打开组件 去做新增业务
  3677. this.$nextTick(() => {
  3678. this.$refs.comQcItemImageUploadFile.init(currentData)
  3679. })
  3680. },
  3681. // 获取主信息数据列表
  3682. getDataList () {
  3683. this.searchLoading = true
  3684. this.searchData.limit = this.pageSize
  3685. this.searchData.page = this.pageIndex
  3686. qcFQCInspectionSearch(this.searchData).then(({data}) => {
  3687. if (data.code === 0) {
  3688. this.dataList = data.page.list
  3689. this.pageIndex = data.page.currPage
  3690. this.pageSize = data.page.pageSize
  3691. this.totalPage = data.page.totalCount
  3692. this.searchLoading = false
  3693. } else {
  3694. this.searchLoading = false
  3695. }
  3696. }).catch(()=>{
  3697. this.searchLoading = false
  3698. })
  3699. },
  3700. // 每页数
  3701. sizeChangeHandle (val) {
  3702. this.pageSize = val
  3703. this.pageIndex = 1
  3704. this.getDataList()
  3705. },
  3706. // 当前页
  3707. currentChangeHandle (val) {
  3708. this.pageIndex = val
  3709. this.getDataList()
  3710. },
  3711. // 导出excel - 获取所有数据
  3712. async createExportData () {
  3713. this.searchData.limit = -1
  3714. this.searchData.page = 1
  3715. const { data } = await qcFQCInspectionSearch(this.searchData)
  3716. return data.page.list || []
  3717. },
  3718. startDownload () {
  3719. this._exportLoading = this.$loading({
  3720. lock: true,
  3721. text: '正在导出数据,请稍候...',
  3722. spinner: 'el-icon-loading',
  3723. background: 'rgba(0, 0, 0, 0.7)'
  3724. })
  3725. },
  3726. finishDownload () {
  3727. if (this._exportLoading) {
  3728. this._exportLoading.close()
  3729. this._exportLoading = null
  3730. }
  3731. },
  3732. // 子明细每页数
  3733. sizeChangeHandle2 (val) {
  3734. this.pageSize2 = val
  3735. },
  3736. // 子明细当前页
  3737. currentChangeHandle2 (val) {
  3738. this.pageIndex2 = val
  3739. },
  3740. // 多选
  3741. selectionChangeHandle (val) {
  3742. this.dataListSelections = val
  3743. },
  3744. // 删除检验记录
  3745. deleteModal () {
  3746. if (this.FAISelections.length === 0) {
  3747. this.$alert('请勾选要删除的检验单!', '提示', {
  3748. confirmButtonText: '确定'
  3749. })
  3750. return false
  3751. }
  3752. this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', {
  3753. confirmButtonText: '确定',
  3754. cancelButtonText: '取消',
  3755. type: 'warning'
  3756. }).then(() => {
  3757. let tempData = {
  3758. site: '',
  3759. submitList: this.FAISelections
  3760. }
  3761. fqcRecordDelete(tempData).then(({data}) => {
  3762. if (data && data.code === 0) {
  3763. this.getDataList()
  3764. this.FAISelections = []
  3765. this.$message.success('操作成功')
  3766. } else {
  3767. this.$message.error(data.msg)
  3768. }
  3769. })
  3770. })
  3771. },
  3772. Transfer (type) {
  3773. if (type === '2') {
  3774. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3775. this.$message.warning('请选择检验结论!')
  3776. return
  3777. }
  3778. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3779. this.$message.warning('请选择处置措施!')
  3780. return
  3781. }
  3782. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3783. const flag = this.detailList.some(item => item.itemResult === 'N')
  3784. if (!flag) {
  3785. this.$message.warning('请选择不合格项目!')
  3786. return
  3787. }
  3788. }
  3789. if (this.detailData.inspectionResult !== '不合格') {
  3790. this.detailData.disposalMeasures = ''
  3791. this.detailData.disposalRemark = ''
  3792. }
  3793. }
  3794. this.saveDetailInformation(type)
  3795. },
  3796. // 新增明细信息
  3797. saveDetailInformation (type) {
  3798. this.preserveExceptionLockedFields()
  3799. this.saveInformationData.site = this.detailData.site
  3800. this.saveInformationData.buNo = this.detailData.buNo
  3801. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3802. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3803. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3804. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3805. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3806. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3807. this.saveInformationData.rollQty = this.detailData.rollQty
  3808. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3809. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3810. this.saveInformationData.partNo = this.detailData.partNo
  3811. this.saveInformationData.partDesc = this.detailData.partDesc
  3812. this.saveInformationData.operator = this.detailData.operator
  3813. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3814. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3815. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3816. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3817. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  3818. this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
  3819. this.transferLoadFlag = true
  3820. saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3821. if (data && data.code === 0) {
  3822. this.getDataList()
  3823. // 应用时(type=1)不关闭对话框,只刷新数据
  3824. if (type === '1') {
  3825. this.getInspectionFormData()
  3826. } else {
  3827. this.detailInformationFlag = false
  3828. }
  3829. this.$message.success('操作成功')
  3830. } else {
  3831. this.$message.error(data.msg)
  3832. }
  3833. this.transferLoadFlag = false
  3834. }).catch(()=>{
  3835. this.transferLoadFlag = false
  3836. })
  3837. },
  3838. abnormalModifyModal (row) {
  3839. this.detailModal(row, true)
  3840. },
  3841. closeDetailDialog () {
  3842. this.exceptionModifyMode = false
  3843. this.exceptionModifyInspectionResult = ''
  3844. this.exceptionModifyItemResultMap = {}
  3845. },
  3846. preserveExceptionLockedFields () {
  3847. if (!this.exceptionModifyMode) {
  3848. return
  3849. }
  3850. this.detailData.inspectionResult = this.exceptionModifyInspectionResult
  3851. this.detailList.forEach(item => {
  3852. const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
  3853. if (originItemResult !== undefined) {
  3854. item.itemResult = originItemResult
  3855. }
  3856. })
  3857. },
  3858. isSubDetailReadonly (row) {
  3859. if (!row) {
  3860. return true
  3861. }
  3862. return row.isSubmit === 'Y' && !this.exceptionModifyMode
  3863. },
  3864. // 开始检验
  3865. actionModal (row) {
  3866. this.actionData = {
  3867. site: row.site,
  3868. buNo: row.buNo,
  3869. inspectionNo: row.inspectionNo
  3870. }
  3871. getFQCItemObjectList(this.actionData).then(({data}) => {
  3872. if (data && data.code === 0) {
  3873. if (data.rows.length === 0) {
  3874. this.actionModal2()
  3875. } else {
  3876. this.itemObjectList = data.rows
  3877. this.ItemObjectModelFlag = true
  3878. }
  3879. } else {
  3880. this.$message.error(data.msg)
  3881. }
  3882. })
  3883. },
  3884. // 开始检验
  3885. actionModal2 () {
  3886. this.$confirm(`确认开始检验?`, '提示', {
  3887. confirmButtonText: '确定',
  3888. cancelButtonText: '取消',
  3889. type: 'warning'
  3890. }).then(() => {
  3891. let tempData = {
  3892. site: this.actionData.site,
  3893. buNo: this.actionData.buNo,
  3894. inspectionNo: this.actionData.inspectionNo,
  3895. actionBy: this.$store.state.user.name,
  3896. state: '待检验',
  3897. equipmentList: this.itemObjectList
  3898. }
  3899. actionFQCInspection(tempData).then(({data}) => {
  3900. if (data && data.code === 0) {
  3901. this.getDataList()
  3902. this.$message.success('操作成功')
  3903. this.ItemObjectModelFlag = false
  3904. } else {
  3905. this.$message.error(data.msg)
  3906. }
  3907. })
  3908. })
  3909. },
  3910. // 明细记录信息查询
  3911. detailModal (row, exceptionModifyMode = false) {
  3912. this.exceptionModifyMode = exceptionModifyMode
  3913. this.exceptionModifyInspectionResult = ''
  3914. this.exceptionModifyItemResultMap = {}
  3915. this.detailData.site = row.site
  3916. this.detailData.buNo = row.buNo
  3917. this.detailData.inspectionNo = row.inspectionNo
  3918. this.detailData.partNo = row.partNo
  3919. this.detailData.partDesc = row.partDesc
  3920. this.detailData.rollQty = row.rollQty
  3921. this.detailData.samplingQty = row.samplingQty
  3922. this.detailData.unqualifiedQty = row.unqualifiedQty
  3923. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3924. this.detailData.submitFlag = row.submitFlag
  3925. this.detailData.disposalMeasures = row.disposalMeasures
  3926. this.detailData.disposalRemark = row.disposalRemark
  3927. this.detailData.inspectionResult = row.inspectionResult
  3928. this.detailData.inspectorNo = row.inspectorNo
  3929. this.detailData.inspectorName = row.inspectorName
  3930. this.detailData.inspectionRemark = row.inspectionRemark
  3931. this.detailData.cinvSourceCode = row.cinvSourceCode
  3932. this.detailData.sku = row.sku
  3933. this.detailData.invdefinetype = row.invdefinetype
  3934. this.detailData.umId = row.umId
  3935. this.detailData.umName = row.umName
  3936. this.detailData.operator = row.operator
  3937. this.detailData.operatorName = row.operatorName
  3938. this.detailData.responsiblePerson = row.responsiblePerson
  3939. this.detailData.responsiblePersonName = row.responsiblePersonName
  3940. this.detailData.state = row.state
  3941. this.detailData.spec = row.spec
  3942. if (this.exceptionModifyMode) {
  3943. this.exceptionModifyInspectionResult = row.inspectionResult
  3944. }
  3945. if (row.state === '待检验') {
  3946. this.detailData.passQty = row.samplingQty
  3947. } else {
  3948. this.detailData.passQty = row.passQty
  3949. this.detailData.notPassQty = row.notPassQty
  3950. }
  3951. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  3952. this.getInspectionFormData()
  3953. this.detailInformationFlag = true
  3954. },
  3955. // 检验单明细
  3956. getInspectionFormData () {
  3957. fqcDetailSearch(this.detailData).then(({data}) => {
  3958. if (data && data.code === 0) {
  3959. this.detailList = data.rows
  3960. if (this.exceptionModifyMode) {
  3961. let itemResultMap = {}
  3962. this.detailList.forEach(item => {
  3963. itemResultMap[item.itemNo] = item.itemResult
  3964. })
  3965. this.exceptionModifyItemResultMap = itemResultMap
  3966. }
  3967. } else {
  3968. this.detailList = []
  3969. this.exceptionModifyItemResultMap = {}
  3970. }
  3971. })
  3972. },
  3973. // 子明细记录信息查询
  3974. subDetailModal (row) {
  3975. this.subDetailLoading = true
  3976. this.subDetailData = row
  3977. this.pageIndex2 = 1
  3978. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3979. if (data.code === 0) {
  3980. this.tableData = data.rows
  3981. }
  3982. this.subDetailLoading = false
  3983. }).catch(()=>{
  3984. this.subDetailLoading = false
  3985. })
  3986. this.batchAddData = {
  3987. samplingLocation: '',
  3988. samplingLocationB: '',
  3989. samplingNumber: ''
  3990. }
  3991. this.subDetailFlag = true
  3992. },
  3993. // 子明细分页查询
  3994. subDetailModal2 () {
  3995. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3996. if (data.code === 0) {
  3997. this.tableData = data.rows
  3998. }
  3999. })
  4000. },
  4001. // 审核按钮
  4002. submitResult () {
  4003. let tempData1 = '' // 记录不是待审核状态的单号
  4004. let tempData2 = '' // 记录处置措施未填写的单号
  4005. if (this.FAISelections.length === 0) {
  4006. this.$alert('请勾选要审核的检验单!', '提示', {
  4007. confirmButtonText: '确定'
  4008. })
  4009. return false
  4010. }
  4011. for (let i = 0; i < this.FAISelections.length; i++) {
  4012. if (this.FAISelections[i].state !== '待审核'){
  4013. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  4014. }
  4015. if (this.FAISelections[i].inspectionResult === '不合格' && (this.FAISelections[i].disposalMeasures ==='' || this.FAISelections[i].disposalMeasures == null)) {
  4016. tempData2 = tempData2 + this.FAISelections[i].inspectionNo + '、'
  4017. }
  4018. }
  4019. if (tempData1 !== ''){
  4020. tempData1 = tempData1.substring(0, tempData1.length - 1)
  4021. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  4022. confirmButtonText: '确定'
  4023. })
  4024. return false
  4025. }
  4026. if (tempData2 !== ''){
  4027. tempData2 = tempData2.substring(0, tempData2.length - 1)
  4028. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  4029. confirmButtonText: '确定'
  4030. })
  4031. return false
  4032. }
  4033. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  4034. confirmButtonText: '确定',
  4035. cancelButtonText: '取消',
  4036. type: 'warning'
  4037. }).then(() => {
  4038. this.submitData.submitList = this.FAISelections
  4039. saveFQCSubmitResult(this.submitData).then(({data}) => {
  4040. if (data && data.code === 0) {
  4041. this.getDataList()
  4042. this.FAISelections = []
  4043. this.$message.success('操作成功')
  4044. } else {
  4045. this.$message.error(data.msg)
  4046. }
  4047. })
  4048. })
  4049. },
  4050. // 取消审核
  4051. cancelApproval () {
  4052. let tempData1 = '' // 记录不是已完成状态的单号
  4053. if (this.FAISelections.length === 0) {
  4054. this.$message.warning('请勾选要取消审核的检验单!')
  4055. return
  4056. }
  4057. for (let i = 0; i < this.FAISelections.length; i++) {
  4058. if (this.FAISelections[i].state !== '已完成') {
  4059. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  4060. }
  4061. }
  4062. if (tempData1 !== '') {
  4063. tempData1 = tempData1.substring(0, tempData1.length - 1)
  4064. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  4065. return
  4066. }
  4067. this.$confirm(`确定取消审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  4068. confirmButtonText: '确定',
  4069. cancelButtonText: '取消',
  4070. type: 'warning'
  4071. }).then(() => {
  4072. this.submitData.submitList = this.FAISelections
  4073. cancelApproval2(this.submitData).then(({data}) => {
  4074. if (data && data.code === 0) {
  4075. this.getDataList()
  4076. this.FAISelections = []
  4077. this.$message.success('操作成功')
  4078. } else {
  4079. this.$message.error(data.msg)
  4080. }
  4081. })
  4082. })
  4083. },
  4084. // 子明细方法
  4085. //表格的新增
  4086. rowClassName ({ row, rowIndex }) {
  4087. row.xh = rowIndex + 1
  4088. row.num = this.tableData.indexOf(row) + 1
  4089. },
  4090. //单选框选中数据
  4091. handleDetailSelectionChange (selection) {
  4092. this.checkedDetail = selection
  4093. },
  4094. //点击新增更多
  4095. handleAddBtn (td) {
  4096. if (this.exceptionModifyMode) {
  4097. let obj = {
  4098. subDetailValue: '',
  4099. samplingLocation: '',
  4100. samplingLocationB: '',
  4101. subDetailValueB: '',
  4102. subDetailValueC: '',
  4103. subDetailValueD: '',
  4104. subDetailValueE: '',
  4105. }
  4106. this.tableData.push(obj)
  4107. return
  4108. }
  4109. checkFQCIsSubmit(td).then(({data}) => {
  4110. if (data.flag !== 1) {
  4111. let obj = {
  4112. subDetailValue: '',
  4113. samplingLocation: '',
  4114. samplingLocationB: '',
  4115. subDetailValueB: '',
  4116. subDetailValueC: '',
  4117. subDetailValueD: '',
  4118. subDetailValueE: '',
  4119. }
  4120. this.tableData.push(obj)
  4121. } else {
  4122. this.$message.error('记录已提交')
  4123. }
  4124. })
  4125. },
  4126. // 批量新增操作
  4127. batchHandleAdd (td) {
  4128. if (this.exceptionModifyMode) {
  4129. this.batchHandleAddModalFlag = true
  4130. return
  4131. }
  4132. checkFQCIsSubmit(td).then(({data}) => {
  4133. if (data.flag !== 1) {
  4134. this.batchHandleAddModalFlag = true
  4135. } else {
  4136. this.$message.error('记录已提交')
  4137. }
  4138. })
  4139. },
  4140. // 批量新增行
  4141. batchHandleAddModal () {
  4142. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  4143. let obj = {
  4144. samplingLocation: this.batchAddData.samplingLocation,
  4145. samplingLocationB: this.batchAddData.samplingLocationB,
  4146. subDetailValue: '',
  4147. subDetailValueB: '',
  4148. subDetailValueC: '',
  4149. subDetailValueD: '',
  4150. subDetailValueE: '',
  4151. }
  4152. this.tableData.push(obj)
  4153. }
  4154. this.batchHandleAddModalFlag = false
  4155. },
  4156. // 回车事件
  4157. nextFocus1 (index) {
  4158. let a1 = `${index + 1}` + `a`
  4159. this.$nextTick(() => {
  4160. this.$refs[a1].focus()
  4161. })
  4162. },
  4163. nextFocus2 (index) {
  4164. let a2 = `${index + 1}` + `b`
  4165. this.$nextTick(() => {
  4166. this.$refs[a2].focus()
  4167. })
  4168. },
  4169. nextFocus3 (index) {
  4170. let a3 = `${index + 1}` + `c`
  4171. this.$nextTick(() => {
  4172. this.$refs[a3].focus()
  4173. })
  4174. },
  4175. nextFocus4 (index) {
  4176. let a = `${index + 1}` + `d`
  4177. this.$nextTick(() => {
  4178. this.$refs[a].focus()
  4179. })
  4180. },
  4181. nextFocus5 (index) {
  4182. let a = `${index + 1}` + `e`
  4183. this.$nextTick(() => {
  4184. this.$refs[a].focus()
  4185. })
  4186. },
  4187. nextFocus6 (index) {
  4188. let a = `${index + 1}` + `f`
  4189. this.$nextTick(() => {
  4190. this.$refs[a].focus()
  4191. })
  4192. },
  4193. nextFocus7 (index) {
  4194. let a = `${index + 1}` + `g`
  4195. this.$nextTick(() => {
  4196. this.$refs[a].focus()
  4197. })
  4198. },
  4199. focusNextInput (index, type) {
  4200. let aaa = ''
  4201. if (this.detailList.length - 1 === index) {
  4202. aaa = `${type}0`
  4203. } else {
  4204. aaa = `${type}${index + 1}`
  4205. }
  4206. this.$nextTick(() => {
  4207. this.$refs[aaa].focus()
  4208. })
  4209. },
  4210. updateItemResult(row){
  4211. if (this.exceptionModifyMode) {
  4212. return
  4213. }
  4214. if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
  4215. this.$message.success("tuichu")
  4216. return;
  4217. }
  4218. if (row.maxValue == null && row.minValue == null) {
  4219. if (row.numberValue!=row.defaultValue){
  4220. row.itemResult = 'N'
  4221. }
  4222. }else if (row.maxValue != null && row.minValue != null){
  4223. if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
  4224. row.itemResult = 'N'
  4225. }else {
  4226. row.itemResult = 'Y'
  4227. }
  4228. }else if(row.maxValue != null){
  4229. if ( row.numberValue>row.maxValue) {
  4230. row.itemResult = 'N'
  4231. }else {
  4232. row.itemResult = 'Y'
  4233. }
  4234. }else if(row.minValue != null){
  4235. if ( row.numberValue<row.minValue) {
  4236. row.itemResult = 'N'
  4237. }else {
  4238. row.itemResult = 'Y'
  4239. }
  4240. }
  4241. },
  4242. //删除
  4243. handleDeleteBtn (td) {
  4244. if (this.exceptionModifyMode) {
  4245. if (this.checkedDetail.length === 0) {
  4246. this.$alert("请先选择要删除的数据", "提示", {
  4247. confirmButtonText: "确定",
  4248. });
  4249. } else {
  4250. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4251. confirmButtonText: "确定",
  4252. cancelButtonText: "取消",
  4253. type: "warning",
  4254. callback: (action) => {
  4255. if (action === "confirm") {
  4256. let val = this.checkedDetail;
  4257. val.forEach((val, index) => {
  4258. this.tableData.splice(this.tableData.indexOf(val), 1)
  4259. if (this.templateTableData.length === 0) {
  4260. this.pageIndex2--
  4261. }
  4262. })
  4263. this.$message({
  4264. message: "删除成功!",
  4265. type: "success",
  4266. })
  4267. return
  4268. } else {
  4269. this.$message({
  4270. message: "已取消删除操作",
  4271. type: "warning",
  4272. })
  4273. return
  4274. }
  4275. },
  4276. })
  4277. }
  4278. return
  4279. }
  4280. checkFQCIsSubmit(td).then(({data}) => {
  4281. if (data.flag !== 1) {
  4282. if (this.checkedDetail.length === 0) {
  4283. this.$alert("请先选择要删除的数据", "提示", {
  4284. confirmButtonText: "确定",
  4285. });
  4286. } else {
  4287. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4288. confirmButtonText: "确定",
  4289. cancelButtonText: "取消",
  4290. type: "warning",
  4291. callback: (action) => {
  4292. if (action === "confirm") {
  4293. let val = this.checkedDetail;
  4294. val.forEach((val, index) => {
  4295. this.tableData.splice(this.tableData.indexOf(val), 1)
  4296. if (this.templateTableData.length === 0) {
  4297. this.pageIndex2--
  4298. }
  4299. })
  4300. this.$message({
  4301. message: "删除成功!",
  4302. type: "success",
  4303. })
  4304. return
  4305. } else {
  4306. this.$message({
  4307. message: "已取消删除操作",
  4308. type: "warning",
  4309. })
  4310. return
  4311. }
  4312. },
  4313. })
  4314. }
  4315. } else {
  4316. this.$alert("记录已提交!", '错误', {
  4317. confirmButtonText: '确定'
  4318. })
  4319. }
  4320. })
  4321. },
  4322. // 新增子明细记录
  4323. saveSubDetailResult () {
  4324. for (let i = 0; i < this.tableData.length; i++) {
  4325. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  4326. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  4327. return
  4328. }
  4329. }
  4330. this.subDetailData.subDetailValues = this.tableData
  4331. saveFQCSubDetailed(this.subDetailData).then(({data}) => {
  4332. if (data && data.code === 0) {
  4333. if (data.count > 0) {
  4334. if (!this.exceptionModifyMode) {
  4335. this.subDetailData.itemResult = 'N'
  4336. }
  4337. this.subDetailData.unqualifiedQuantity = data.count
  4338. }
  4339. if (this.subDetailData.subDetailValues.length > 0) {
  4340. this.subDetailData.subDetailRecordNum = 1
  4341. } else {
  4342. this.subDetailData.subDetailRecordNum = -1
  4343. this.subDetailData.unqualifiedQuantity = 0
  4344. if (!this.exceptionModifyMode) {
  4345. this.subDetailData.itemResult = 'Y'
  4346. }
  4347. }
  4348. this.subDetailFlag = false
  4349. this.tableData = []
  4350. this.$message.success('操作成功')
  4351. } else {
  4352. this.$message.error(data.msg)
  4353. }
  4354. })
  4355. },
  4356. // 检验结论改变事件
  4357. resultChange () {
  4358. if (this.detailData.inspectionResult === '不合格') {
  4359. this.detailData.passQty = 0
  4360. }
  4361. },
  4362. // 校验用户是否收藏
  4363. favoriteIsOk () {
  4364. let userFavorite = {
  4365. userId: this.$store.state.user.id,
  4366. languageCode: this.$i18n.locale
  4367. }
  4368. userFavoriteList(userFavorite).then(({data}) => {
  4369. for (let i = 0; i < data.list.length; i++) {
  4370. if (this.$route.meta.menuId === data.list[i].menuId) {
  4371. this.favorite = true
  4372. }
  4373. }
  4374. })
  4375. },
  4376. // 收藏 OR 取消收藏
  4377. favoriteFunction () {
  4378. let userFavorite = {
  4379. userId: this.$store.state.user.id,
  4380. functionId: this.$route.meta.menuId,
  4381. }
  4382. if (this.favorite) {
  4383. removeUserFavorite(userFavorite).then(({data}) => {
  4384. this.$message.success(data.msg)
  4385. this.favorite = false
  4386. })
  4387. } else {
  4388. // 收藏
  4389. saveUserFavorite(userFavorite).then(({data}) => {
  4390. this.$message.success(data.msg)
  4391. this.favorite = true
  4392. })
  4393. }
  4394. },
  4395. // 动态列开始 获取 用户保存的 格式列
  4396. async getTableUserColumn (tableId, columnId) {
  4397. let queryTableUser = {
  4398. userId: this.$store.state.user.name,
  4399. functionId: this.$route.meta.menuId,
  4400. tableId: tableId,
  4401. status: true,
  4402. languageCode: this.$i18n.locale
  4403. }
  4404. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  4405. if (data.rows.length > 0) {
  4406. //this.columnList1 = []
  4407. switch (columnId) {
  4408. case 1:
  4409. this.columnList1 = data.rows
  4410. break;
  4411. case 2:
  4412. this.detailColumnList = data.rows
  4413. break;
  4414. case 3:
  4415. this.seqDetailColumnList = data.rows
  4416. break;
  4417. }
  4418. } else {
  4419. this.getColumnList(tableId, columnId)
  4420. }
  4421. })
  4422. },
  4423. // 获取 tableDefault 列
  4424. async getColumnList (tableId, columnId) {
  4425. let queryTable = {
  4426. functionId: this.$route.meta.menuId,
  4427. tableId: tableId,
  4428. languageCode: this.$i18n.locale
  4429. }
  4430. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  4431. if (data.rows.length !== 0) {
  4432. switch (columnId) {
  4433. case 1:
  4434. this.columnList1 = data.rows
  4435. break;
  4436. case 2:
  4437. this.detailColumnList = data.rows
  4438. break;
  4439. case 3:
  4440. this.seqDetailColumnList = data.rows
  4441. break;
  4442. }
  4443. }
  4444. })
  4445. },
  4446. // 明细导入后将返回值回传给父组件
  4447. changeMyString (val) {
  4448. for (let i = 0; i < this.detailList.length; i++) {
  4449. if (val[this.detailList[i].itemNo] !== undefined) {
  4450. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  4451. if (val[this.detailList[i].itemNo] != null) {
  4452. this.detailList[i].subDetailRecordNum = 1
  4453. }
  4454. if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
  4455. this.detailList[i].itemResult = 'N'
  4456. }
  4457. }
  4458. }
  4459. },
  4460. searchSeqInfo () {
  4461. let tempData = {
  4462. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  4463. bu: this.modalData.bu,
  4464. seqNo: this.seqDetailData.seqNo,
  4465. orderNo: this.seqDetailData.orderNo,
  4466. sku: this.seqDetailData.sku,
  4467. partDesc: this.seqDetailData.partDesc,
  4468. partNo: this.seqDetailData.partNo,
  4469. operationDesc: this.seqDetailData.operationDesc,
  4470. status: this.seqDetailData.status
  4471. }
  4472. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  4473. this.seqInfoList = []
  4474. } else {
  4475. searchSeqInfo(tempData).then(({data}) => {
  4476. if (data && data.code === 0) {
  4477. this.seqInfoList = data.rows
  4478. } else {
  4479. this.$message.error(data.msg)
  4480. }
  4481. })
  4482. }
  4483. },
  4484. closeDialog () {
  4485. this.seqDetailData = {
  4486. seqNo : '',
  4487. orderNo: '',
  4488. sku: '',
  4489. partNo: '',
  4490. partDesc:'',
  4491. operationDesc: '',
  4492. status: '下达'
  4493. }
  4494. this.seqInfoList = []
  4495. },
  4496. //获取按钮的权限数据
  4497. getButtonAuthData () {
  4498. let searchFlag = this.isAuth(this.menuId + ":search")
  4499. let checkFlag = this.isAuth(this.menuId + ":check")
  4500. let saveFlag = this.isAuth(this.menuId + ":save")
  4501. let deleteFlag = this.isAuth(this.menuId + ":delete")
  4502. let detailFlag = this.isAuth(this.menuId + ":detail")
  4503. let fileFlag = this.isAuth(this.menuId + ":file")
  4504. let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
  4505. let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
  4506. //处理页面的权限数据
  4507. this.authSearch = !searchFlag
  4508. this.authCheck = !checkFlag
  4509. this.authSave = !saveFlag
  4510. this.authDelete = !deleteFlag
  4511. this.authDetail = !detailFlag
  4512. this.authFile = !fileFlag
  4513. this.authCancelCheck = !cancelCheckFlag
  4514. this.authExceptionModify = !exceptionModifyFlag
  4515. },
  4516. // ======================== FQC检验项目操作相关方法 ========================
  4517. openItemOperationDialog() {
  4518. this.itemOperationQuery = { itemNo: '', itemDesc: '' }
  4519. this.searchFQCItems()
  4520. this.itemOperationDialogFlag = true
  4521. },
  4522. async searchFQCItems() {
  4523. try {
  4524. const params = {
  4525. site: this.detailData.site,
  4526. buNo: this.detailData.buNo,
  4527. inspectionNo: this.detailData.inspectionNo,
  4528. itemNo: this.itemOperationQuery.itemNo || '',
  4529. itemDesc: this.itemOperationQuery.itemDesc || ''
  4530. }
  4531. const { data } = await getFQCItemList(params)
  4532. if (data && data.code === 0) {
  4533. this.availableItemList = data.row1 || []
  4534. this.selectedItemList = data.row2 || []
  4535. }
  4536. } catch (error) {
  4537. this.$message.error('查询检验项目失败')
  4538. }
  4539. },
  4540. availableItemClickRow(row) {
  4541. this.$refs.availableItemTable.toggleRowSelection(row)
  4542. },
  4543. availableItemSelectionChange(selection) {
  4544. this.availableItemSelections = selection
  4545. },
  4546. selectedItemClickRow(row) {
  4547. this.$refs.selectedItemTable.toggleRowSelection(row)
  4548. },
  4549. selectedItemSelectionChange(selection) {
  4550. this.selectedItemSelections = selection
  4551. },
  4552. async addInspectionItems() {
  4553. if (!this.availableItemSelections || this.availableItemSelections.length === 0) {
  4554. this.$message.warning('请选择要添加的项目')
  4555. return
  4556. }
  4557. this.$confirm('确认添加选中的检验项目吗?', '提示', {
  4558. confirmButtonText: '确定',
  4559. cancelButtonText: '取消',
  4560. type: 'warning'
  4561. }).then(async () => {
  4562. try {
  4563. const params = {
  4564. site: this.detailData.site,
  4565. buNo: this.detailData.buNo,
  4566. inspectionNo: this.detailData.inspectionNo,
  4567. itemList: this.availableItemSelections.map(item => ({ itemNo: item.itemNo }))
  4568. }
  4569. const { data } = await addFQCItemDetails(params)
  4570. if (data && data.code === 0) {
  4571. this.$message.success('添加成功')
  4572. this.searchFQCItems()
  4573. } else {
  4574. this.$message.error(data.msg || '添加失败')
  4575. }
  4576. } catch (error) {
  4577. this.$message.error('添加失败,请检查')
  4578. }
  4579. }).catch(() => {
  4580. this.$message.info('已取消添加')
  4581. })
  4582. },
  4583. async deleteInspectionItems() {
  4584. if (!this.selectedItemSelections || this.selectedItemSelections.length === 0) {
  4585. this.$message.warning('请选择要移除的项目')
  4586. return
  4587. }
  4588. this.$confirm('确认移除选中的检验项目吗?(将同时删除该项目的子明细数据)', '提示', {
  4589. confirmButtonText: '确定',
  4590. cancelButtonText: '取消',
  4591. type: 'warning'
  4592. }).then(async () => {
  4593. try {
  4594. const params = {
  4595. site: this.detailData.site,
  4596. buNo: this.detailData.buNo,
  4597. inspectionNo: this.detailData.inspectionNo,
  4598. itemList: this.selectedItemSelections.map(item => ({ itemNo: item.itemNo }))
  4599. }
  4600. const { data } = await deleteFQCItemDetails(params)
  4601. if (data && data.code === 0) {
  4602. this.$message.success('移除成功')
  4603. this.searchFQCItems()
  4604. } else {
  4605. this.$message.error(data.msg || '移除失败')
  4606. }
  4607. } catch (error) {
  4608. this.$message.error('移除失败,请检查')
  4609. }
  4610. }).catch(() => {
  4611. this.$message.info('已取消移除')
  4612. })
  4613. },
  4614. refreshInspectionDetailList() {
  4615. if (this.detailInformationFlag) {
  4616. this.getInspectionFormData()
  4617. }
  4618. },
  4619. // ======================== FQC模板导入相关方法 ========================
  4620. openTemplateImportDialog() {
  4621. this.templateQuery = { templateId: '', templateDesc: '' }
  4622. this.searchFQCTemplates()
  4623. this.templateImportDialogFlag = true
  4624. },
  4625. async searchFQCTemplates() {
  4626. try {
  4627. const params = {
  4628. site: this.detailData.site,
  4629. buNo: this.detailData.buNo,
  4630. templateId: this.templateQuery.templateId || '',
  4631. templateDesc: this.templateQuery.templateDesc || ''
  4632. }
  4633. const { data } = await getFQCTemplateList(params)
  4634. if (data && data.code === 0) {
  4635. this.templateList = data.rows || []
  4636. }
  4637. } catch (error) {
  4638. this.$message.error('查询模板失败')
  4639. }
  4640. },
  4641. templateClickRow(row) {
  4642. this.$refs.templateTable.toggleRowSelection(row)
  4643. },
  4644. templateSelectionChange(selection) {
  4645. this.templateSelections = selection
  4646. },
  4647. confirmImportTemplate() {
  4648. if (!this.templateSelections || this.templateSelections.length === 0) {
  4649. this.$message.warning('请选择要导入的模板')
  4650. return
  4651. }
  4652. this.$confirm(`确认导入选中的 ${this.templateSelections.length} 个模板吗?`, '提示', {
  4653. confirmButtonText: '确定',
  4654. cancelButtonText: '取消',
  4655. type: 'warning'
  4656. }).then(async () => {
  4657. this.importLoading = true
  4658. try {
  4659. const params = {
  4660. site: this.detailData.site,
  4661. buNo: this.detailData.buNo,
  4662. inspectionNo: this.detailData.inspectionNo,
  4663. templateList: this.templateSelections.map(item => ({ templateId: item.templateId }))
  4664. }
  4665. const { data } = await importFQCTemplateItems(params)
  4666. if (data && data.code === 0) {
  4667. this.$message.success(`导入成功,共导入 ${data.importCount || 0} 个检验项目`)
  4668. this.templateImportDialogFlag = false
  4669. this.templateSelections = []
  4670. this.getInspectionFormData()
  4671. } else {
  4672. this.$message.error(data.msg || '导入失败')
  4673. }
  4674. } catch (error) {
  4675. this.$message.error('导入失败,请检查')
  4676. } finally {
  4677. this.importLoading = false
  4678. }
  4679. }).catch(() => {
  4680. this.$message.info('已取消导入')
  4681. })
  4682. },
  4683. resetItemQuery() {
  4684. this.itemOperationQuery = { itemNo: '', itemDesc: '' }
  4685. this.searchFQCItems()
  4686. },
  4687. resetTemplateQuery() {
  4688. this.templateQuery = { templateId: '', templateDesc: '' }
  4689. this.searchFQCTemplates()
  4690. },
  4691. }
  4692. }
  4693. </script>
  4694. <style scoped>
  4695. .file-dialog-title {
  4696. display: inline-flex;
  4697. align-items: center;
  4698. gap: 10px;
  4699. }
  4700. .file-dialog-link {
  4701. color: #17b3a3;
  4702. text-decoration: underline;
  4703. font-size: 13px;
  4704. cursor: pointer;
  4705. }
  4706. .file-dialog-link:visited,
  4707. .file-dialog-link:active,
  4708. .file-dialog-link:hover {
  4709. color: #17b3a3;
  4710. }
  4711. /* 搜索卡片样式 */
  4712. .search-card {
  4713. margin-bottom: 16px;
  4714. border-radius: 8px;
  4715. overflow: hidden;
  4716. transition: all 0.3s ease;
  4717. }
  4718. .search-card:hover {
  4719. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  4720. }
  4721. .search-card /deep/ .el-card__header {
  4722. padding: 5px 20px;
  4723. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  4724. border-bottom: none;
  4725. }
  4726. .search-header {
  4727. display: flex;
  4728. justify-content: space-between;
  4729. align-items: center;
  4730. }
  4731. .header-left {
  4732. display: flex;
  4733. align-items: center;
  4734. color: #fff;
  4735. }
  4736. .header-left i {
  4737. font-size: 16px;
  4738. margin-right: 8px;
  4739. }
  4740. .header-title {
  4741. font-size: 14px;
  4742. font-weight: 600;
  4743. letter-spacing: 0.5px;
  4744. }
  4745. .header-right {
  4746. color: #fff;
  4747. }
  4748. .collapse-btn {
  4749. color: #fff;
  4750. font-weight: 500;
  4751. transition: all 0.3s ease;
  4752. }
  4753. .collapse-btn:hover {
  4754. color: #f0f0f0;
  4755. transform: translateY(-1px);
  4756. }
  4757. .collapse-btn i {
  4758. transition: transform 0.3s ease;
  4759. }
  4760. /* 搜索表单样式 */
  4761. .search-form {
  4762. padding: 6px 0;
  4763. min-height: 0;
  4764. }
  4765. /* 卡片主体样式 */
  4766. .search-card /deep/ .el-card__body {
  4767. padding: 10px;
  4768. transition: all 0.3s ease;
  4769. }
  4770. /* 收起时的样式 */
  4771. .search-card.collapsed /deep/ .el-card__body {
  4772. padding: 10px 20px;
  4773. }
  4774. .search-form /deep/ .el-form-item {
  4775. margin-bottom: 12px;
  4776. }
  4777. .search-form /deep/ .el-form-item__label {
  4778. font-weight: 500;
  4779. color: #606266;
  4780. padding-bottom: 4px;
  4781. }
  4782. .search-form /deep/ .el-input__inner,
  4783. .search-form /deep/ .el-textarea__inner {
  4784. border-radius: 6px;
  4785. border: 1px solid #DCDFE6;
  4786. transition: all 0.3s ease;
  4787. }
  4788. .search-form /deep/ .el-input__inner:focus,
  4789. .search-form /deep/ .el-textarea__inner:focus {
  4790. border-color: #9ac3d0;
  4791. box-shadow: 0 0 0 2px rgba(154, 195, 208, 0.1);
  4792. }
  4793. .search-form /deep/ .el-select {
  4794. width: 100%;
  4795. }
  4796. .search-form /deep/ .el-date-editor.el-input {
  4797. width: 100%;
  4798. }
  4799. /* 状态下拉框优化 */
  4800. .search-form /deep/ .status-select {
  4801. width: 180px;
  4802. }
  4803. .search-form /deep/ .status-select .el-select__tags {
  4804. max-width: calc(100% - 30px);
  4805. }
  4806. .search-form /deep/ .status-select .el-tag {
  4807. max-width: 100%;
  4808. overflow: hidden;
  4809. text-overflow: ellipsis;
  4810. white-space: nowrap;
  4811. }
  4812. /* 操作按钮区域 */
  4813. .search-actions {
  4814. display: flex;
  4815. justify-content: space-between;
  4816. align-items: center;
  4817. padding: 8px 0 2px 0;
  4818. }
  4819. /* 展开时显示上边框 */
  4820. .search-card:not(.collapsed) .search-actions {
  4821. border-top: 1px solid #f0f0f0;
  4822. margin-top: 6px;
  4823. }
  4824. /* 收起时不显示上边框和上边距 */
  4825. .search-card.collapsed .search-actions {
  4826. border-top: none;
  4827. margin-top: 0;
  4828. padding-top: 0;
  4829. }
  4830. .action-left,
  4831. .action-right {
  4832. display: flex;
  4833. gap: 8px;
  4834. }
  4835. .search-actions .el-button {
  4836. border-radius: 4px;
  4837. padding: 5px 10px;
  4838. font-size: 12px;
  4839. font-weight: 500;
  4840. transition: all 0.3s ease;
  4841. }
  4842. .search-actions .el-button:hover {
  4843. transform: translateY(-2px);
  4844. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  4845. }
  4846. .search-actions .el-button--primary {
  4847. background: #60aeff;
  4848. border-color: #60aeff;
  4849. }
  4850. .search-actions .el-button--primary:hover {
  4851. background: #7dbdff;
  4852. border-color: #7dbdff;
  4853. }
  4854. .search-actions .el-button--success {
  4855. background: #67C23A;
  4856. border-color: #67C23A;
  4857. }
  4858. .search-actions .el-button--success:hover {
  4859. background: #85ce61;
  4860. border-color: #85ce61;
  4861. }
  4862. .search-actions .el-button--danger {
  4863. background: #F56C6C;
  4864. border-color: #F56C6C;
  4865. }
  4866. .search-actions .el-button--danger:hover {
  4867. background: #f78989;
  4868. border-color: #f78989;
  4869. }
  4870. .search-actions .el-button--warning {
  4871. background: #E6A23C;
  4872. border-color: #E6A23C;
  4873. }
  4874. .search-actions .el-button--warning:hover {
  4875. background: #ebb563;
  4876. border-color: #ebb563;
  4877. }
  4878. /* 响应式设计 */
  4879. @media (max-width: 1200px) {
  4880. .search-actions {
  4881. flex-direction: column;
  4882. gap: 10px;
  4883. }
  4884. .action-left,
  4885. .action-right {
  4886. width: 100%;
  4887. justify-content: center;
  4888. }
  4889. }
  4890. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  4891. color: red;
  4892. font-weight: bold;
  4893. }
  4894. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  4895. color: rgb(103,194,58);
  4896. font-weight: bold;
  4897. }
  4898. .el-table /deep/ .cell{
  4899. height: auto;
  4900. line-height: 1.5;
  4901. }
  4902. /* ==================== FQC检验项目操作对话框样式 ==================== */
  4903. /deep/ .item-operation-dialog {
  4904. border-radius: 8px;
  4905. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  4906. }
  4907. /deep/ .item-operation-dialog .el-dialog__header {
  4908. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  4909. padding: 20px 24px;
  4910. border-radius: 8px 8px 0 0;
  4911. }
  4912. /deep/ .item-operation-dialog .el-dialog__title {
  4913. color: #ffffff;
  4914. font-size: 16px;
  4915. font-weight: 600;
  4916. letter-spacing: 0.5px;
  4917. }
  4918. /deep/ .item-operation-dialog .el-dialog__headerbtn .el-dialog__close {
  4919. color: #ffffff;
  4920. font-size: 20px;
  4921. font-weight: bold;
  4922. }
  4923. /deep/ .item-operation-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  4924. color: #f0f0f0;
  4925. }
  4926. /deep/ .item-operation-dialog .el-dialog__body {
  4927. padding: 24px;
  4928. background: #f8f9fa;
  4929. }
  4930. .search-container {
  4931. background: #ffffff;
  4932. padding: 16px 20px;
  4933. border-radius: 6px;
  4934. margin-bottom: 20px;
  4935. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  4936. }
  4937. .search-container .el-form-item {
  4938. margin-bottom: 0;
  4939. }
  4940. .search-container .el-form-item__label {
  4941. font-weight: 500;
  4942. color: #606266;
  4943. }
  4944. .item-operation-content {
  4945. display: flex;
  4946. gap: 16px;
  4947. align-items: stretch;
  4948. }
  4949. .item-panel {
  4950. flex: 1;
  4951. background: #ffffff;
  4952. border-radius: 6px;
  4953. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  4954. overflow: hidden;
  4955. transition: all 0.3s ease;
  4956. }
  4957. .item-panel:hover {
  4958. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  4959. }
  4960. .available-panel {
  4961. flex: 1.5;
  4962. }
  4963. .selected-panel {
  4964. flex: 1;
  4965. }
  4966. .panel-header {
  4967. padding: 8px 16px;
  4968. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  4969. border-bottom: 2px solid #9ac3d0;
  4970. display: flex;
  4971. align-items: center;
  4972. gap: 8px;
  4973. }
  4974. .panel-header i {
  4975. font-size: 18px;
  4976. color: #ffffff;
  4977. }
  4978. .panel-title {
  4979. font-size: 14px;
  4980. font-weight: 600;
  4981. color: #ffffff;
  4982. letter-spacing: 0.5px;
  4983. }
  4984. .item-count {
  4985. margin-left: auto;
  4986. font-size: 12px;
  4987. color: #ffffff;
  4988. background: rgba(255, 255, 255, 0.25);
  4989. padding: 2px 10px;
  4990. border-radius: 12px;
  4991. font-weight: 500;
  4992. }
  4993. .operation-table {
  4994. border: none !important;
  4995. }
  4996. .operation-table /deep/ .el-table__body tr:hover > td {
  4997. background-color: #f0f7ff !important;
  4998. }
  4999. .operation-table /deep/ .el-table__row.current-row > td {
  5000. background-color: #e6f2ff !important;
  5001. }
  5002. .operation-table /deep/ td {
  5003. border-bottom: 1px solid #f0f0f0;
  5004. }
  5005. .operation-table /deep/ .el-table__body {
  5006. font-size: 13px;
  5007. }
  5008. .operation-buttons {
  5009. display: flex;
  5010. flex-direction: column;
  5011. justify-content: center;
  5012. align-items: center;
  5013. gap: 20px;
  5014. padding: 0 8px;
  5015. }
  5016. .operation-buttons .el-button {
  5017. width: 48px;
  5018. height: 48px;
  5019. font-size: 20px;
  5020. transition: all 0.3s ease;
  5021. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5022. }
  5023. .operation-buttons .el-button:hover {
  5024. transform: scale(1.1);
  5025. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  5026. }
  5027. .operation-buttons .el-button.is-disabled {
  5028. opacity: 0.4;
  5029. cursor: not-allowed;
  5030. }
  5031. .operation-buttons .el-button--primary {
  5032. background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
  5033. border: none;
  5034. }
  5035. .operation-buttons .el-button--danger {
  5036. background: linear-gradient(135deg, #F56C6C 0%, #f78989 100%);
  5037. border: none;
  5038. }
  5039. @media (max-width: 1200px) {
  5040. .item-operation-content {
  5041. flex-direction: column;
  5042. }
  5043. .operation-buttons {
  5044. flex-direction: row;
  5045. gap: 12px;
  5046. }
  5047. .operation-buttons .el-button {
  5048. width: 42px;
  5049. height: 42px;
  5050. font-size: 18px;
  5051. }
  5052. }
  5053. /deep/ .template-import-dialog {
  5054. border-radius: 8px;
  5055. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  5056. }
  5057. /deep/ .template-import-dialog .el-dialog__header {
  5058. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  5059. padding: 20px 24px;
  5060. border-radius: 8px 8px 0 0;
  5061. }
  5062. /deep/ .template-import-dialog .el-dialog__title {
  5063. color: #ffffff;
  5064. font-size: 16px;
  5065. font-weight: 600;
  5066. letter-spacing: 0.5px;
  5067. }
  5068. /deep/ .template-import-dialog .el-dialog__headerbtn .el-dialog__close {
  5069. color: #ffffff;
  5070. font-size: 20px;
  5071. font-weight: bold;
  5072. }
  5073. /deep/ .template-import-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  5074. color: #f0f0f0;
  5075. }
  5076. /deep/ .template-import-dialog .el-dialog__body {
  5077. padding: 24px;
  5078. background: #f8f9fa;
  5079. }
  5080. .template-list-container {
  5081. background: #ffffff;
  5082. border-radius: 6px;
  5083. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  5084. overflow: hidden;
  5085. transition: all 0.3s ease;
  5086. }
  5087. .template-list-container:hover {
  5088. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  5089. }
  5090. .template-table {
  5091. border: none !important;
  5092. }
  5093. .template-table /deep/ .el-table__body tr:hover > td {
  5094. background-color: #f0f7ff !important;
  5095. }
  5096. .template-table /deep/ .el-table__row.current-row > td {
  5097. background-color: #e6f2ff !important;
  5098. }
  5099. .template-table /deep/ td {
  5100. border-bottom: 1px solid #f0f0f0;
  5101. }
  5102. .template-table /deep/ .el-table__body {
  5103. font-size: 13px;
  5104. }
  5105. .operation-btn {
  5106. position: relative;
  5107. padding: 8px 16px;
  5108. border: none;
  5109. border-radius: 4px;
  5110. font-size: 13px;
  5111. font-weight: 500;
  5112. cursor: pointer;
  5113. transition: all 0.3s ease;
  5114. overflow: hidden;
  5115. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  5116. }
  5117. .operation-btn:hover {
  5118. transform: translateY(-1px);
  5119. box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  5120. }
  5121. .operation-btn:active {
  5122. transform: translateY(0);
  5123. }
  5124. .operation-btn i {
  5125. margin-right: 4px;
  5126. font-size: 13px;
  5127. }
  5128. .operation-btn span {
  5129. position: relative;
  5130. z-index: 1;
  5131. }
  5132. .item-operation-btn {
  5133. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5134. color: #ffffff;
  5135. }
  5136. .item-operation-btn:hover {
  5137. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5138. color: #ffffff;
  5139. }
  5140. .template-import-btn {
  5141. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5142. color: #ffffff;
  5143. margin-left: 10px;
  5144. }
  5145. .template-import-btn:hover {
  5146. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  5147. color: #ffffff;
  5148. }
  5149. /* ==================== 检验单对话框样式 ==================== */
  5150. .fqc-inspection-dialog /deep/ .el-dialog__header {
  5151. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  5152. padding: 20px 24px;
  5153. border-radius: 8px 8px 0 0;
  5154. }
  5155. .fqc-inspection-dialog /deep/ .el-dialog__title {
  5156. color: #ffffff;
  5157. font-size: 18px;
  5158. font-weight: 600;
  5159. letter-spacing: 0.5px;
  5160. }
  5161. .fqc-inspection-dialog /deep/ .el-dialog__headerbtn .el-dialog__close {
  5162. color: #ffffff;
  5163. font-size: 20px;
  5164. }
  5165. .fqc-inspection-dialog /deep/ .el-dialog__body {
  5166. padding: 0;
  5167. background: #f5f7fa;
  5168. }
  5169. /* 单据信息卡片 */
  5170. .inspection-info-card {
  5171. background: #ffffff;
  5172. padding: 0px 0px;
  5173. }
  5174. .info-section {
  5175. margin-bottom: 0;
  5176. background: #f9fafb;
  5177. border-radius: 6px;
  5178. padding: 12px;
  5179. border: 1px solid #e8eaed;
  5180. transition: all 0.3s ease;
  5181. }
  5182. .info-section:hover {
  5183. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  5184. border-color: #d0d4d9;
  5185. }
  5186. .info-section:last-child {
  5187. margin-bottom: 0;
  5188. }
  5189. .section-title {
  5190. display: flex;
  5191. align-items: center;
  5192. margin-bottom: 12px;
  5193. padding-bottom: 8px;
  5194. border-bottom: 2px solid #e8eaed;
  5195. font-size: 14px;
  5196. font-weight: 600;
  5197. color: #303133;
  5198. }
  5199. .section-title i {
  5200. font-size: 18px;
  5201. margin-right: 8px;
  5202. color: #667eea;
  5203. }
  5204. .info-row {
  5205. margin-bottom: 0 !important;
  5206. }
  5207. .info-item {
  5208. margin-bottom: 0;
  5209. }
  5210. .info-item label {
  5211. display: block;
  5212. margin-bottom: 6px;
  5213. font-size: 12px;
  5214. font-weight: 500;
  5215. color: #606266;
  5216. }
  5217. .info-item label a {
  5218. color: #409eff;
  5219. text-decoration: none;
  5220. transition: color 0.3s;
  5221. }
  5222. .info-item label a:hover {
  5223. color: #66b1ff;
  5224. text-decoration: underline;
  5225. }
  5226. .info-item /deep/ .el-input--small .el-input__inner,
  5227. .info-item /deep/ .el-input-number--small .el-input__inner {
  5228. border-radius: 4px;
  5229. border: 1px solid #dcdfe6;
  5230. transition: all 0.3s;
  5231. }
  5232. .info-item /deep/ .el-input--small .el-input__inner:focus,
  5233. .info-item /deep/ .el-input-number--small .el-input__inner:focus {
  5234. border-color: #667eea;
  5235. box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
  5236. }
  5237. .info-item /deep/ .el-select {
  5238. width: 100%;
  5239. }
  5240. /* 操作按钮区域 */
  5241. .action-buttons {
  5242. display: flex;
  5243. justify-content: space-between;
  5244. align-items: center;
  5245. padding: 10px 12px;
  5246. background: #ffffff;
  5247. border-radius: 6px;
  5248. border: 1px solid #e8eaed;
  5249. margin-top: 10px;
  5250. }
  5251. .left-actions,
  5252. .right-actions {
  5253. display: flex;
  5254. gap: 10px;
  5255. }
  5256. .action-buttons .el-button {
  5257. border-radius: 6px;
  5258. font-weight: 500;
  5259. transition: all 0.3s ease;
  5260. }
  5261. .action-buttons .el-button:hover {
  5262. transform: translateY(-2px);
  5263. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5264. }
  5265. /* 检验项目列表 */
  5266. .inspection-table-wrapper {
  5267. background: #ffffff;
  5268. padding: 0px 0px;
  5269. }
  5270. .table-header {
  5271. display: flex;
  5272. align-items: center;
  5273. justify-content: space-between;
  5274. margin-bottom: 10px;
  5275. margin-top: 10px;
  5276. border-bottom: 2px solid #e8eaed;
  5277. }
  5278. .table-title {
  5279. font-size: 15px;
  5280. font-weight: 600;
  5281. color: #303133;
  5282. display: flex;
  5283. align-items: center;
  5284. }
  5285. .table-title i {
  5286. font-size: 18px;
  5287. margin-right: 8px;
  5288. color: #667eea;
  5289. }
  5290. .inspection-table {
  5291. border-radius: 8px;
  5292. overflow: hidden;
  5293. }
  5294. .inspection-table /deep/ .el-table__header-wrapper th {
  5295. background: linear-gradient(135deg, #f5f7fa 0%, #e8eaed 100%);
  5296. color: #303133;
  5297. font-weight: 600;
  5298. font-size: 13px;
  5299. padding: 12px 0;
  5300. }
  5301. .inspection-table /deep/ .el-table__body-wrapper .el-table__row {
  5302. transition: all 0.3s ease;
  5303. }
  5304. .inspection-table /deep/ .el-table__body-wrapper .el-table__row:hover {
  5305. background: #f5f7fa;
  5306. }
  5307. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped {
  5308. background: #fafbfc;
  5309. }
  5310. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped:hover {
  5311. background: #f0f2f5;
  5312. }
  5313. .inspection-table /deep/ .el-button--mini {
  5314. padding: 7px 10px;
  5315. border-radius: 4px;
  5316. font-size: 12px;
  5317. }
  5318. /* 底部操作按钮 */
  5319. .dialog-footer {
  5320. display: flex;
  5321. justify-content: center;
  5322. align-items: center;
  5323. gap: 12px;
  5324. padding: 12px 16px;
  5325. background: #ffffff;
  5326. border-top: 1px solid #e8eaed;
  5327. }
  5328. .dialog-footer .el-button {
  5329. min-width: 100px;
  5330. border-radius: 6px;
  5331. font-weight: 500;
  5332. transition: all 0.3s ease;
  5333. }
  5334. .dialog-footer .el-button:hover {
  5335. transform: translateY(-2px);
  5336. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  5337. }
  5338. .dialog-footer .el-button--success {
  5339. background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  5340. border: none;
  5341. }
  5342. .dialog-footer .el-button--success:hover {
  5343. background: linear-gradient(135deg, #15b39d 0%, #4af58e 100%);
  5344. }
  5345. </style>