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.

5810 lines
193 KiB

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