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.

5645 lines
186 KiB

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