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.

5406 lines
184 KiB

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