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.

3440 lines
115 KiB

2 months ago
2 months ago
4 months ago
  1. <template>
  2. <div class="process-inspection">
  3. <el-dialog
  4. title="过程检验"
  5. :close-on-click-modal="false"
  6. v-drag
  7. :visible.sync="visible"
  8. width="1400px"
  9. :append-to-body="true"
  10. @close="handleClose">
  11. <!-- 查询条件 -->
  12. <el-form :inline="true" label-position="top" :model="searchData">
  13. <el-form-item label=" ">
  14. <el-button type="primary" @click="addModal">新增</el-button>
  15. <el-button type="primary" @click="submitResult">审核</el-button>
  16. <el-button type="primary" @click="deleteModal">删除</el-button>
  17. </el-form-item>
  18. </el-form>
  19. <!-- 检验记录展示列表 -->
  20. <el-table
  21. :height="400"
  22. :data="dataList"
  23. border
  24. ref="IPQCTable"
  25. @row-click="IPQCClickRow"
  26. @selection-change="selectionIPQC"
  27. style="width: 100%;">
  28. <el-table-column
  29. type="selection"
  30. header-align="center"
  31. align="center"
  32. :selectable="selectFlag"
  33. width="50">
  34. </el-table-column>
  35. <el-table-column
  36. prop="state"
  37. header-align="center"
  38. align="center"
  39. label="状态">
  40. <template slot-scope="scope">
  41. <div :style="{fontWeight:'bold', color: scope.row.state =='待检验' ? 'red' : scope.row.state =='待审核' ? '#ffa500e0' : scope.row.state =='已完成' ? '#3ac252' : ''}">
  42. {{ scope.row.state }}
  43. </div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column
  47. v-for="(item,index) in columnList1" :key="index"
  48. v-if="!item.columnHidden"
  49. :sortable="item.columnSortable"
  50. :prop="item.columnProp"
  51. :header-align="item.headerAlign"
  52. :show-overflow-tooltip="item.showOverflowTooltip"
  53. :align="item.align"
  54. :fixed="item.fixed==''?false:item.fixed"
  55. :min-width="item.columnWidth"
  56. :label="item.columnLabel">
  57. <template slot-scope="scope">
  58. <span v-if="!item.columnImage"> {{ scope.row[item.columnProp] }}</span>
  59. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column
  63. fixed="right"
  64. header-align="center"
  65. align="center"
  66. width="130"
  67. label="操作">
  68. <template slot-scope="scope">
  69. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  70. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  71. <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <!-- 分页 -->
  76. <el-pagination
  77. style="margin-top: 0px"
  78. @size-change="sizeChangeHandle"
  79. @current-change="currentChangeHandle"
  80. :current-page="pageIndex"
  81. :page-sizes="[20, 50, 100, 200, 500]"
  82. :page-size="pageSize"
  83. :total="totalPage"
  84. layout="total, sizes, prev, pager, next, jumper">
  85. </el-pagination>
  86. <!-- 新增检验记录弹窗 -->
  87. <el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px" :append-to-body="true">
  88. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  89. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  90. <el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">
  91. <el-option
  92. v-for="i in userBuList"
  93. :key="i.buNo"
  94. :label="i.sitename"
  95. :value="i.buNo">
  96. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  97. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  98. {{ i.buDesc }}
  99. </span>
  100. </el-option>
  101. </el-select>
  102. </el-form-item>
  103. <el-form-item label="标签号">
  104. <el-input v-if="this.modalData.specialTaskFlag === 'Y'" disabled v-model="modalData.rollNo" style="width: 221px"></el-input>
  105. <el-input v-else v-model="modalData.rollNo" @keyup.native.enter="rollNoEnter" clearable style="width: 221px"></el-input>
  106. </el-form-item>
  107. </el-form>
  108. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  109. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && (this.modalData.rollNo === '' || this.modalData.rollNo == null)" prop="orderNo" :rules="rules.seqNoType">
  110. <span style="cursor: pointer" slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span>
  111. <el-input v-model="modalData.seqNo" style="width: 221px"></el-input>
  112. </el-form-item>
  113. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && this.modalData.rollNo !== '' && this.modalData.rollNo != null" prop="orderNo" :rules="rules.seqNoType">
  114. <span slot="label">派工单号</span>
  115. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  116. </el-form-item>
  117. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType">
  118. <span slot="label">派工单号</span>
  119. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  120. </el-form-item>
  121. <el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
  122. <el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input>
  123. </el-form-item>
  124. </el-form>
  125. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  126. <el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
  127. <el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px">
  128. <el-option
  129. v-for="i in operationList"
  130. :key="i.operationNo"
  131. :label="i.operationDesc"
  132. :value="i.operationDesc">
  133. </el-option>
  134. </el-select>
  135. </el-form-item>
  136. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'">
  137. <span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
  138. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  139. </el-form-item>
  140. <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">
  141. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  142. </el-form-item>
  143. </el-form>
  144. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  145. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData">
  146. <span style="cursor: pointer" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  147. <el-input v-model="modalData.partNo" style="width: 221px"></el-input>
  148. </el-form-item>
  149. <el-form-item v-else label="物料编码" prop="partNo" :rules="rules.partNoType">
  150. <el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
  151. </el-form-item>
  152. <el-form-item label="物料名称">
  153. <el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input>
  154. </el-form-item>
  155. </el-form>
  156. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  157. <el-form-item label="物料类别">
  158. <el-input v-model="modalData.invdefinetype" readonly style="width: 221px"></el-input>
  159. </el-form-item>
  160. <el-form-item label="SKU">
  161. <el-input v-model="modalData.sku" readonly style="width: 221px"></el-input>
  162. </el-form-item>
  163. </el-form>
  164. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px">
  165. <el-form-item label="检验类型" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType">
  166. <el-select v-model="modalData.inspectionTypeNo" style="width: 221px">
  167. <el-option label="首件检" value="首件检"></el-option>
  168. <el-option label="自检" value="自检"></el-option>
  169. <el-option label="巡检" value="巡检"></el-option>
  170. <el-option label="末件检" value="末件检"></el-option>
  171. </el-select>
  172. </el-form-item>
  173. <el-form-item label="送检数量" prop="rollQty" :rules="rules.rollQtyType">
  174. <el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
  175. </el-form-item>
  176. <el-form-item label="单位" prop="umId" :rules="rules.umIdType">
  177. <el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
  178. <el-option
  179. v-for="i in umList"
  180. :key="i.umId"
  181. :label="i.umName"
  182. :value="i.umId">
  183. </el-option>
  184. </el-select>
  185. </el-form-item>
  186. </el-form>
  187. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  188. <el-form-item prop="templateId" :rules="rules.templateId">
  189. <span style="cursor: pointer" v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList"><a>检验模板</a></span>
  190. <span v-else slot="label">检验模板</span>
  191. <el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input>
  192. </el-form-item>
  193. <el-form-item label="送检总数">
  194. <el-input v-model="modalData.sjzs" disabled style="width: 120px"></el-input>
  195. </el-form-item>
  196. <el-form-item label=" ">
  197. <input type="checkbox" id="specialTask" name="specialTask" v-model="checked" @click="changeSpecialTask"/> <label for="specialTask">无工单检验</label>
  198. </el-form-item>
  199. </el-form>
  200. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  201. <el-form-item label="老卷号">
  202. <el-input v-model="modalData.batchRollNo" style="width: 456px"></el-input>
  203. </el-form-item>
  204. </el-form>
  205. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
  206. <el-form-item label="特殊要求">
  207. <el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  208. </el-form-item>
  209. </el-form>
  210. <el-footer style="height:40px;margin-top: 55px;text-align:center">
  211. <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
  212. <el-button @click="modalFlag = false">关闭</el-button>
  213. </el-footer>
  214. </el-dialog>
  215. <!-- 派工单号弹出框 -->
  216. <el-dialog title="派工单号" @close="closeSeqDialog" :close-on-click-modal="false" v-drag :visible.sync="seqDetailFlag" width="952px" :append-to-body="true">
  217. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  218. <el-form-item label="工单号">
  219. <el-input v-model="seqDetailData.orderNo" clearable style="width: 150px"></el-input>
  220. </el-form-item>
  221. <el-form-item label="派工单号">
  222. <el-input v-model="seqDetailData.seqNo" clearable style="width: 150px"></el-input>
  223. </el-form-item>
  224. <el-form-item label="SKU">
  225. <el-input v-model="seqDetailData.sku" clearable style="width: 150px"></el-input>
  226. </el-form-item>
  227. <el-form-item label="物料编码">
  228. <el-input v-model="seqDetailData.partNo" clearable style="width: 150px"></el-input>
  229. </el-form-item>
  230. <el-form-item label="物料名称">
  231. <el-input v-model="seqDetailData.partDesc" clearable style="width: 150px"></el-input>
  232. </el-form-item>
  233. <el-form-item label="工序">
  234. <el-input v-model="seqDetailData.operationDesc" clearable style="width: 150px"></el-input>
  235. </el-form-item>
  236. <el-form-item label=" ">
  237. <el-button type="primary" @click="searchSeqInfo" style="margin-top: 24px">查询</el-button>
  238. </el-form-item>
  239. </el-form>
  240. <el-table
  241. :height="400"
  242. :data="seqInfoList"
  243. @row-dblclick="getRowData1"
  244. border
  245. style="width: 100%;">
  246. <el-table-column
  247. v-for="(item,index) in seqDetailColumnList" :key="index"
  248. :sortable="item.columnSortable"
  249. :prop="item.columnProp"
  250. :header-align="item.headerAlign"
  251. :show-overflow-tooltip="item.showOverflowTooltip"
  252. :align="item.align"
  253. :fixed="item.fixed==''?false:item.fixed"
  254. :min-width="item.columnWidth"
  255. :label="item.columnLabel">
  256. <template slot-scope="scope">
  257. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  258. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  259. </template>
  260. </el-table-column>
  261. </el-table>
  262. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  263. <el-button type="primary" @click="seqDetailFlag=false">关闭</el-button>
  264. </el-footer>
  265. </el-dialog>
  266. <!-- 检验模板弹出框 -->
  267. <el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px" :append-to-body="true">
  268. <div class="rq">
  269. <el-form :inline="true" label-position="top" :model="templateData">
  270. <el-form-item :label="'模板编码'">
  271. <el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
  272. </el-form-item>
  273. <el-form-item :label="'模板名称'">
  274. <el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
  275. </el-form-item>
  276. <el-form-item :label="' '">
  277. <el-button type="primary" @click="queryTemplateList">查询</el-button>
  278. </el-form-item>
  279. </el-form>
  280. <el-table
  281. :height="300"
  282. :data="templateList"
  283. @row-dblclick="getRowData"
  284. border
  285. style="width: 100%;">
  286. <el-table-column
  287. v-for="(item,index) in templateDetailList" :key="index"
  288. :sortable="item.columnSortable"
  289. :prop="item.columnProp"
  290. :header-align="item.headerAlign"
  291. :show-overflow-tooltip="item.showOverflowTooltip"
  292. :align="item.align"
  293. :fixed="item.fixed==''?false:item.fixed"
  294. :min-width="item.columnWidth"
  295. :label="item.columnLabel">
  296. <template slot-scope="scope">
  297. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  298. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  299. </template>
  300. </el-table-column>
  301. </el-table>
  302. </div>
  303. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  304. <el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
  305. </el-footer>
  306. </el-dialog>
  307. <!-- 检验单详情对话框 -->
  308. <el-dialog
  309. title="检验明细清单"
  310. :close-on-click-modal="false"
  311. v-drag
  312. :visible.sync="detailInformationFlag"
  313. width="1200px"
  314. top="2vh"
  315. :append-to-body="true"
  316. custom-class="ipqc-inspection-dialog">
  317. <!-- 单据信息卡片 -->
  318. <div class="inspection-info-card">
  319. <div class="info-section">
  320. <div class="section-title">
  321. <i class="el-icon-document"></i>
  322. <span>检验单信息</span>
  323. </div>
  324. <!-- 第一行物料信息 + 人员信息 -->
  325. <el-row :gutter="12" class="info-row">
  326. <el-col :span="3">
  327. <div class="info-item">
  328. <label>物料编码</label>
  329. <el-input v-model="detailData.partNo" disabled size="small"></el-input>
  330. </div>
  331. </el-col>
  332. <el-col :span="3">
  333. <div class="info-item">
  334. <label>物料类别</label>
  335. <el-input v-model="detailData.invdefinetype" readonly size="small"></el-input>
  336. </div>
  337. </el-col>
  338. <el-col :span="6">
  339. <div class="info-item">
  340. <label>物料名称</label>
  341. <el-input v-model="detailData.partDesc" disabled size="small"></el-input>
  342. </div>
  343. </el-col>
  344. <el-col :span="3">
  345. <div class="info-item">
  346. <label>规格型号</label>
  347. <el-input v-model="detailData.spec" disabled size="small"></el-input>
  348. </div>
  349. </el-col>
  350. <el-col :span="2">
  351. <div class="info-item">
  352. <label>单位</label>
  353. <el-input v-model="detailData.umName" disabled size="small"></el-input>
  354. </div>
  355. </el-col>
  356. <el-col :span="3">
  357. <div class="info-item">
  358. <label>
  359. <span v-if="detailData.submitFlag === 'Y'">协同人员</span>
  360. <a v-else style="cursor: pointer" @click="getOperatorListModal">协同人员</a>
  361. </label>
  362. <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
  363. </div>
  364. </el-col>
  365. <el-col :span="4">
  366. <div class="info-item">
  367. <label>
  368. <span v-if="detailData.submitFlag === 'Y'">责任人</span>
  369. <a v-else style="cursor: pointer" @click="getResponsiblePersonListModal">责任人</a>
  370. </label>
  371. <el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input>
  372. </div>
  373. </el-col>
  374. </el-row>
  375. <!-- 第二行数量信息 -->
  376. <el-row :gutter="12" class="info-row" style="margin-top: 12px">
  377. <el-col :span="4">
  378. <div class="info-item">
  379. <label>送检数量</label>
  380. <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" size="small" style="width: 100%"></el-input-number>
  381. </div>
  382. </el-col>
  383. <el-col :span="4">
  384. <div class="info-item">
  385. <label>抽样数量</label>
  386. <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" size="small" style="width: 100%"></el-input-number>
  387. </div>
  388. </el-col>
  389. <el-col :span="4">
  390. <div class="info-item">
  391. <label>合格数量</label>
  392. <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>
  393. <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
  394. </div>
  395. </el-col>
  396. <el-col :span="4">
  397. <div class="info-item">
  398. <label>不合格数量</label>
  399. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.notPassQty" disabled size="small" style="width: 100%"></el-input-number>
  400. </div>
  401. </el-col>
  402. <el-col :span="4">
  403. <div class="info-item">
  404. <label>不合格项目数量</label>
  405. <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>
  406. <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
  407. </div>
  408. </el-col>
  409. <el-col :span="4">
  410. <div class="info-item">
  411. <label>批次合格数</label>
  412. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.batchQualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
  413. </div>
  414. </el-col>
  415. </el-row>
  416. </div>
  417. <div class="info-section" style="margin-top: 10px">
  418. <div class="section-title">
  419. <i class="el-icon-finished"></i>
  420. <span>检验结论</span>
  421. </div>
  422. <el-row :gutter="12" class="info-row">
  423. <el-col :span="3">
  424. <div class="info-item">
  425. <label>检验结论</label>
  426. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
  427. <el-option label="合格" value="合格"></el-option>
  428. <el-option label="不合格" value="不合格"></el-option>
  429. </el-select>
  430. <el-select v-else v-model="detailData.inspectionResult" @change="resultChange" size="small" placeholder="请选择" style="width: 100%">
  431. <el-option label="合格" value="合格"></el-option>
  432. <el-option label="不合格" value="不合格"></el-option>
  433. </el-select>
  434. </div>
  435. </el-col>
  436. <el-col :span="7">
  437. <div class="info-item">
  438. <label>质检备注</label>
  439. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
  440. <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
  441. </div>
  442. </el-col>
  443. <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
  444. <div class="info-item">
  445. <label>处置措施</label>
  446. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
  447. <el-option
  448. v-for="i in disposalMeasuresOptions"
  449. :key="i.id"
  450. :label="i.disposalMeasures"
  451. :value="i.disposalMeasures">
  452. </el-option>
  453. </el-select>
  454. <el-select v-else clearable v-model="detailData.disposalMeasures" size="small" style="width: 100%">
  455. <el-option
  456. v-for="i in disposalMeasuresOptions"
  457. :key="i.id"
  458. :label="i.disposalMeasures"
  459. :value="i.disposalMeasures">
  460. </el-option>
  461. </el-select>
  462. </div>
  463. </el-col>
  464. <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
  465. <div class="info-item">
  466. <label>处置说明</label>
  467. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled size="small"></el-input>
  468. <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
  469. </div>
  470. </el-col>
  471. </el-row>
  472. </div>
  473. <!-- 操作按钮区域 -->
  474. <div class="action-buttons">
  475. <div class="left-actions">
  476. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" size="small" :loading="loadFlag" @click="handleDataAcquisition" icon="el-icon-download">
  477. 数据采集
  478. </el-button>
  479. <el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
  480. 文件清单
  481. </el-button>
  482. </div>
  483. <div class="right-actions">
  484. <el-button type="success" size="small" @click="openItemOperationDialog" icon="el-icon-setting">
  485. 项目导入
  486. </el-button>
  487. <el-button type="primary" size="small" @click="openTemplateImportDialog" icon="el-icon-download">
  488. 模板导入
  489. </el-button>
  490. </div>
  491. </div>
  492. </div>
  493. <!-- 检验项目列表 -->
  494. <div class="inspection-table-wrapper">
  495. <div class="table-header">
  496. <span class="table-title">
  497. <i class="el-icon-tickets"></i>
  498. 检验项目明细
  499. </span>
  500. </div>
  501. <el-table
  502. :height="435"
  503. :data="detailList"
  504. border
  505. stripe
  506. style="width: 100%;"
  507. class="inspection-table">
  508. <el-table-column
  509. prop=""
  510. header-align="center"
  511. align="center"
  512. width="80"
  513. label="操作">
  514. <template slot-scope="scope">
  515. <el-button icon="el-icon-edit-outline" type="success" size="mini" :loading="loadFlag" @click="dataAcquisitionByItemHandle(scope.row)" title="数据采集"></el-button>
  516. </template>
  517. </el-table-column>
  518. <el-table-column
  519. prop="itemNo"
  520. header-align="center"
  521. align="center"
  522. min-width="80"
  523. label="项目编号">
  524. </el-table-column>
  525. <el-table-column
  526. prop="itemDesc"
  527. header-align="center"
  528. align="left"
  529. min-width="150"
  530. show-overflow-tooltip
  531. label="项目名称">
  532. </el-table-column>
  533. <el-table-column
  534. prop="defaultValue"
  535. header-align="center"
  536. align="center"
  537. min-width="100"
  538. label="标准值">
  539. <template slot-scope="scope">
  540. <el-input v-model="scope.row.defaultValue" style="height: 11px; width: 98%"></el-input>
  541. </template>
  542. </el-table-column>
  543. <el-table-column
  544. prop="minValue"
  545. header-align="center"
  546. align="center"
  547. min-width="80"
  548. label="下限值">
  549. <template slot-scope="scope">
  550. <el-input v-model="scope.row.minValue" style="height: 11px; width: 98%"></el-input>
  551. </template>
  552. </el-table-column>
  553. <el-table-column
  554. prop="maxValue"
  555. header-align="center"
  556. align="center"
  557. min-width="80"
  558. label="上限值">
  559. <template slot-scope="scope">
  560. <el-input v-model="scope.row.maxValue" style="height: 11px; width: 98%"></el-input>
  561. </template>
  562. </el-table-column>
  563. <el-table-column
  564. prop=""
  565. header-align="center"
  566. align="right"
  567. min-width="80"
  568. label="实测值">
  569. <template slot-scope="scope">
  570. <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>
  571. <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>
  572. </template>
  573. </el-table-column>
  574. <el-table-column
  575. prop=""
  576. header-align="center"
  577. align="right"
  578. min-width="80"
  579. label="抽样数量">
  580. <template slot-scope="scope">
  581. <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>
  582. <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>
  583. </template>
  584. </el-table-column>
  585. <el-table-column
  586. prop=""
  587. header-align="center"
  588. align="right"
  589. min-width="80"
  590. label="不合格数量">
  591. <template slot-scope="scope">
  592. <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>
  593. <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>
  594. </template>
  595. </el-table-column>
  596. <el-table-column
  597. prop=""
  598. header-align="center"
  599. align="right"
  600. min-width="90"
  601. label="项目检验结论">
  602. <template slot-scope="scope">
  603. <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">
  604. <el-option label="合格" value="Y" style="color: green"></el-option>
  605. <el-option label="不合格" value="N" style="color: red"></el-option>
  606. </el-select>
  607. <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="合格">
  608. <el-option label="合格" value="Y" style="color: green"></el-option>
  609. <el-option label="不合格" value="N" style="color: red"></el-option>
  610. </el-select>
  611. </template>
  612. </el-table-column>
  613. </el-table>
  614. </div>
  615. <!-- 底部操作按钮 -->
  616. <div class="dialog-footer">
  617. <el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
  618. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
  619. <el-button @click="detailInformationFlag=false">关闭</el-button>
  620. </div>
  621. </el-dialog>
  622. <!-- 人员清单弹窗 -->
  623. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px" :append-to-body="true">
  624. <div class="rq">
  625. <el-form :inline="true" label-position="top" :model="operatorData">
  626. <el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
  627. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
  628. <el-option
  629. v-for="i in roleList"
  630. :key="i.roleId"
  631. :label="i.roleName"
  632. :value="i.roleId">
  633. </el-option>
  634. </el-select>
  635. </el-form-item>
  636. <el-form-item :label="'用户编码'">
  637. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  638. </el-form-item>
  639. <el-form-item :label="'用户姓名'">
  640. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  641. </el-form-item>
  642. <el-form-item :label="' '">
  643. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  644. </el-form-item>
  645. </el-form>
  646. <el-table
  647. :height="300"
  648. :data="operatorList"
  649. ref="operatorTable"
  650. @row-click="operatorClickRow"
  651. @selection-change="selectionChangeHandle2"
  652. border
  653. style="width: 100%;">
  654. <el-table-column
  655. type="selection"
  656. header-align="center"
  657. align="center"
  658. width="50">
  659. </el-table-column>
  660. <el-table-column
  661. v-for="(item,index) in operatorDetailList" :key="index"
  662. :sortable="item.columnSortable"
  663. :prop="item.columnProp"
  664. :header-align="item.headerAlign"
  665. :show-overflow-tooltip="item.showOverflowTooltip"
  666. :align="item.align"
  667. :fixed="item.fixed==''?false:item.fixed"
  668. :min-width="item.columnWidth"
  669. :label="item.columnLabel">
  670. <template slot-scope="scope">
  671. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  672. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  673. </template>
  674. </el-table-column>
  675. </el-table>
  676. </div>
  677. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  678. <el-button type="primary" @click="confirmOperator">确认</el-button>
  679. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  680. </el-footer>
  681. </el-dialog>
  682. <!-- 项目操作对话框 -->
  683. <el-dialog
  684. title="检验项目操作"
  685. @close="refreshInspectionDetailList"
  686. :close-on-click-modal="false"
  687. v-drag
  688. :visible.sync="itemOperationDialogFlag"
  689. width="1200px"
  690. :append-to-body="true"
  691. custom-class="item-operation-dialog">
  692. <!-- 查询区域 -->
  693. <div class="search-container">
  694. <el-form :inline="true" size="small">
  695. <el-form-item label="项目编码">
  696. <el-input
  697. v-model="itemOperationQuery.itemNo"
  698. placeholder="请输入项目编码"
  699. clearable
  700. prefix-icon="el-icon-search"
  701. style="width: 160px">
  702. </el-input>
  703. </el-form-item>
  704. <el-form-item label="项目名称">
  705. <el-input
  706. v-model="itemOperationQuery.itemDesc"
  707. placeholder="请输入项目名称"
  708. clearable
  709. prefix-icon="el-icon-search"
  710. style="width: 200px">
  711. </el-input>
  712. </el-form-item>
  713. <el-form-item>
  714. <el-button type="primary" icon="el-icon-search" @click="searchIPQCItems" size="small">查询</el-button>
  715. <el-button icon="el-icon-refresh" @click="resetItemQuery" size="small">重置</el-button>
  716. </el-form-item>
  717. </el-form>
  718. </div>
  719. <!-- 主内容区域 -->
  720. <div class="item-operation-content">
  721. <!-- 可选项目 -->
  722. <div class="item-panel available-panel">
  723. <div class="panel-header">
  724. <i class="el-icon-s-unfold"></i>
  725. <span class="panel-title">可选项目</span>
  726. <span class="item-count">({{ availableItemList.length }})</span>
  727. </div>
  728. <el-table
  729. height="420px"
  730. :data="availableItemList"
  731. ref="availableItemTable"
  732. @row-click="availableItemClickRow"
  733. @selection-change="availableItemSelectionChange"
  734. highlight-current-row
  735. class="operation-table"
  736. :header-cell-style="{background: '#f5f7fa', color: '#606266', fontWeight: '500'}">
  737. <el-table-column
  738. type="selection"
  739. width="45"
  740. align="center">
  741. </el-table-column>
  742. <el-table-column
  743. prop="itemNo"
  744. align="center"
  745. width="100"
  746. label="编码">
  747. </el-table-column>
  748. <el-table-column
  749. prop="itemDesc"
  750. align="left"
  751. min-width="140"
  752. show-overflow-tooltip
  753. label="名称">
  754. </el-table-column>
  755. <el-table-column
  756. prop="defaultValue"
  757. align="center"
  758. width="80"
  759. show-overflow-tooltip
  760. label="标准值">
  761. </el-table-column>
  762. <el-table-column
  763. align="center"
  764. width="100"
  765. label="范围">
  766. <template slot-scope="scope">
  767. <span v-if="scope.row.minValue || scope.row.maxValue" style="font-size: 12px; color: #909399;">
  768. {{ scope.row.minValue || '-' }} ~ {{ scope.row.maxValue || '-' }}
  769. </span>
  770. </template>
  771. </el-table-column>
  772. </el-table>
  773. </div>
  774. <!-- 操作按钮 -->
  775. <div class="operation-buttons">
  776. <el-tooltip content="添加选中项目" placement="left">
  777. <el-button
  778. type="primary"
  779. icon="el-icon-d-arrow-right"
  780. circle
  781. @click="addInspectionItems"
  782. :disabled="!availableItemSelections || availableItemSelections.length === 0">
  783. </el-button>
  784. </el-tooltip>
  785. <el-tooltip content="移除选中项目" placement="right">
  786. <el-button
  787. type="danger"
  788. icon="el-icon-d-arrow-left"
  789. circle
  790. @click="deleteInspectionItems"
  791. :disabled="!selectedItemSelections || selectedItemSelections.length === 0">
  792. </el-button>
  793. </el-tooltip>
  794. </div>
  795. <!-- 已有项目 -->
  796. <div class="item-panel selected-panel">
  797. <div class="panel-header">
  798. <i class="el-icon-s-check"></i>
  799. <span class="panel-title">已有项目</span>
  800. <span class="item-count">({{ selectedItemList.length }})</span>
  801. </div>
  802. <el-table
  803. height="420px"
  804. :data="selectedItemList"
  805. ref="selectedItemTable"
  806. @row-click="selectedItemClickRow"
  807. @selection-change="selectedItemSelectionChange"
  808. highlight-current-row
  809. class="operation-table"
  810. :header-cell-style="{background: '#f5f7fa', color: '#606266', fontWeight: '500'}">
  811. <el-table-column
  812. type="selection"
  813. width="45"
  814. align="center">
  815. </el-table-column>
  816. <el-table-column
  817. prop="itemNo"
  818. align="center"
  819. width="100"
  820. label="编码">
  821. </el-table-column>
  822. <el-table-column
  823. prop="itemDesc"
  824. align="left"
  825. min-width="200"
  826. show-overflow-tooltip
  827. label="名称">
  828. </el-table-column>
  829. </el-table>
  830. </div>
  831. </div>
  832. <!-- 底部按钮 -->
  833. <div slot="footer" class="dialog-footer">
  834. <el-button @click="itemOperationDialogFlag = false" size="small" style="width: 80px;">关闭</el-button>
  835. </div>
  836. </el-dialog>
  837. <!-- 模板导入对话框 -->
  838. <el-dialog
  839. title="检验模板导入"
  840. :close-on-click-modal="false"
  841. v-drag
  842. :visible.sync="templateImportDialogFlag"
  843. width="800px"
  844. :append-to-body="true"
  845. custom-class="template-import-dialog">
  846. <!-- 查询区域 -->
  847. <div class="search-container">
  848. <el-form :inline="true" size="small">
  849. <el-form-item label="模板编码">
  850. <el-input
  851. v-model="templateQuery.templateId"
  852. placeholder="请输入模板编码"
  853. clearable
  854. prefix-icon="el-icon-search"
  855. style="width: 160px">
  856. </el-input>
  857. </el-form-item>
  858. <el-form-item label="模板名称">
  859. <el-input
  860. v-model="templateQuery.templateDesc"
  861. placeholder="请输入模板名称"
  862. clearable
  863. prefix-icon="el-icon-search"
  864. style="width: 200px">
  865. </el-input>
  866. </el-form-item>
  867. <el-form-item>
  868. <el-button type="primary" icon="el-icon-search" @click="searchIPQCTemplates" size="small">查询</el-button>
  869. <el-button icon="el-icon-refresh" @click="resetTemplateQuery" size="small">重置</el-button>
  870. </el-form-item>
  871. </el-form>
  872. </div>
  873. <!-- 模板列表 -->
  874. <div class="template-list-container">
  875. <el-table
  876. height="400px"
  877. :data="templateImportList"
  878. ref="templateTable"
  879. @row-click="templateClickRow"
  880. @selection-change="templateSelectionChange"
  881. highlight-current-row
  882. class="template-table"
  883. :header-cell-style="{background: '#f5f7fa', color: '#606266', fontWeight: '500'}">
  884. <el-table-column
  885. type="selection"
  886. width="50"
  887. align="center">
  888. </el-table-column>
  889. <el-table-column
  890. prop="templateId"
  891. align="center"
  892. width="150"
  893. label="模板编码">
  894. </el-table-column>
  895. <el-table-column
  896. prop="templateName"
  897. align="left"
  898. min-width="200"
  899. show-overflow-tooltip
  900. label="模板名称">
  901. </el-table-column>
  902. <el-table-column
  903. prop="inspectionTypeName"
  904. align="center"
  905. width="120"
  906. label="检验类型">
  907. </el-table-column>
  908. </el-table>
  909. </div>
  910. <!-- 底部按钮 -->
  911. <div slot="footer" class="dialog-footer">
  912. <el-button type="primary" :loading="importLoading" @click="confirmImportTemplate" size="small">确认导入</el-button>
  913. <el-button @click="templateImportDialogFlag = false" size="small">关闭</el-button>
  914. </div>
  915. </el-dialog>
  916. </el-dialog>
  917. <!-- 文件清单对话框 -->
  918. <el-dialog title="文件清单" :close-on-click-modal="false" :visible.sync="fileFlag" width="900px" append-to-body>
  919. <el-tabs v-model="fileActiveTab" type="border-card">
  920. <el-tab-pane label="QC检验文件" name="qcFile">
  921. <el-table :height="350" :data="fileContentList" border v-loading="fileLoading" style="width: 100%;">
  922. <el-table-column prop="fileName" header-align="center" align="left" label="文件名称" min-width="200" show-overflow-tooltip></el-table-column>
  923. <el-table-column prop="createdBy" header-align="center" align="center" label="上传人" width="120"></el-table-column>
  924. <el-table-column prop="createDate" header-align="center" align="center" label="上传时间" width="160"></el-table-column>
  925. </el-table>
  926. </el-tab-pane>
  927. <el-tab-pane label="SOP文件" name="sopFile">
  928. <el-table :data="sopFileList" border v-loading="sopFileLoading" height="350" style="width: 100%;">
  929. <el-table-column prop="sopName" header-align="center" align="left" label="文件名称" min-width="200" show-overflow-tooltip></el-table-column>
  930. <el-table-column prop="fileType" header-align="center" align="center" label="文件类型" width="100"></el-table-column>
  931. <el-table-column prop="version" header-align="center" align="center" label="版本号" width="80"></el-table-column>
  932. <el-table-column prop="createdBy" header-align="center" align="center" label="上传人" width="100"></el-table-column>
  933. <el-table-column prop="creationDate" header-align="center" align="center" label="上传时间" width="150"></el-table-column>
  934. <el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
  935. <template slot-scope="scope">
  936. <el-link type="primary" @click="previewSopFile(scope.row)">预览</el-link>
  937. </template>
  938. </el-table-column>
  939. </el-table>
  940. </el-tab-pane>
  941. </el-tabs>
  942. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  943. <el-button type="primary" @click="fileFlag = false">关闭</el-button>
  944. </el-footer>
  945. </el-dialog>
  946. </div>
  947. </template>
  948. <script>
  949. import {
  950. qcIPQCInspectionSearch, // 查询IPQC的检验记录
  951. ipqcRecordDelete, // 删除检验记录
  952. saveOsInspection, // 新增检验记录
  953. saveIPQCSubmitResult, // 审核
  954. getSiteAndBuByUserName, // 获取用户BU列表
  955. ipqcDetailSearch, // 查询IPQC的检验明细
  956. actionIPQCInspection, // 开始检验
  957. getIPQCItemObjectList, // 查询项目设备
  958. getOperationList, // 查询工序列表
  959. queryController, // 检查动控
  960. umSearch, // 查询单位列表
  961. queryTemplateList, // 获取检验模板列表
  962. queryPartList, // 查询物料集合
  963. rollNoEnter as rollNoEnterAPI, // 标签号回车事件
  964. searchSeqInfo, // 派工单号查询
  965. getSiteAndBuByUserName2, // 获取BU列表
  966. saveIPQCDetailedRecord, // 保存检验明细记录
  967. getSpecialOperationList, // 获取特殊工序列表
  968. inspectionTypeSearch, // 搜索所有检验类型
  969. disposalMeasuresSearch, // 获取处置措施列表
  970. getUserRoleList, // 获取用户角色列表
  971. getOperatorList, // 获取协同人员列表
  972. getResponsibleOperatorList, // 获取责任人列表
  973. dataAcquisition, // 数据采集
  974. dataAcquisitionByItem, // 按项目数据采集
  975. getIPQCItemList, // 获取IPQC检验项目列表
  976. addIPQCItemDetails, // 添加检验项目
  977. deleteIPQCItemDetails, // 删除检验项目
  978. getIPQCTemplateList, // 获取IPQC模板列表
  979. importIPQCTemplateItems, // 导入模板项目
  980. } from "@/api/qc/qc.js"
  981. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  982. import { getInspectionFile } from '@/api/eam/eam_object_list.js'
  983. import { searchQcSopFileList, downloadSopFile } from '@/api/qc/qc.js'
  984. export default {
  985. name: 'ComProcessInspection',
  986. props: {
  987. visible: {
  988. type: Boolean,
  989. default: false
  990. },
  991. orderNo: {
  992. type: String,
  993. default: ''
  994. },
  995. resourceId: {
  996. type: String,
  997. default: ''
  998. },
  999. seqNo: {
  1000. type: String,
  1001. default: ''
  1002. },
  1003. site: {
  1004. type: String,
  1005. default: ''
  1006. },
  1007. buNo: {
  1008. type: String,
  1009. default: ''
  1010. },
  1011. rollNo: {
  1012. type: String,
  1013. default: ''
  1014. }
  1015. },
  1016. data() {
  1017. return {
  1018. // 查询参数
  1019. searchData: {
  1020. userName: this.$store.state.user.name,
  1021. buNo: '',
  1022. inspectionNo: '',
  1023. partNo: '',
  1024. sku: '',
  1025. partDesc: '',
  1026. inspectionResult: '',
  1027. inspectionTypeNo: '',
  1028. inspectionTypeNos: ['首件检', '巡检'], // 过程检验只展示首件检和巡检
  1029. cinvSourceCode: '',
  1030. orderNo: '',
  1031. seqNo: '',
  1032. operationDesc: '',
  1033. states: [],
  1034. startDate2: '',
  1035. endDate2: '',
  1036. startDate: '',
  1037. endDate: '',
  1038. limit: 20,
  1039. page: 1
  1040. },
  1041. searchLoading: false,
  1042. // 列表数据
  1043. dataList: [],
  1044. IPQCSelections: [],
  1045. // 分页
  1046. pageIndex: 1,
  1047. pageSize: 20,
  1048. totalPage: 0,
  1049. // BU列表
  1050. buList: [],
  1051. userBuList: [],
  1052. // 列配置
  1053. columnList1: [
  1054. {
  1055. userId: this.$store.state.user.name,
  1056. functionId: 301014,
  1057. serialNumber: '301014Table1BuDesc',
  1058. tableId: "301014Table1",
  1059. tableName: "IPQC检验记录表",
  1060. columnProp: 'buDesc',
  1061. headerAlign: "center",
  1062. align: "center",
  1063. columnLabel: 'BU',
  1064. columnHidden: false,
  1065. columnImage: false,
  1066. columnSortable: false,
  1067. sortLv: 0,
  1068. status: true,
  1069. fixed: '',
  1070. columnWidth: 100,
  1071. showOverflowTooltip: true
  1072. },
  1073. {
  1074. userId: this.$store.state.user.name,
  1075. functionId: 301014,
  1076. serialNumber: '301014Table1InspectionNo',
  1077. tableId: "301014Table1",
  1078. tableName: "IPQC检验记录表",
  1079. columnProp: 'inspectionNo',
  1080. headerAlign: "center",
  1081. align: "center",
  1082. columnLabel: '检验单号',
  1083. columnHidden: false,
  1084. columnImage: false,
  1085. columnSortable: false,
  1086. sortLv: 0,
  1087. status: true,
  1088. fixed: '',
  1089. columnWidth: 120,
  1090. showOverflowTooltip: true
  1091. },
  1092. {
  1093. userId: this.$store.state.user.name,
  1094. functionId: 301014,
  1095. serialNumber: '301014Table1InspectionResult',
  1096. tableId: "301014Table1",
  1097. tableName: "IPQC检验记录表",
  1098. columnProp: 'inspectionResult',
  1099. headerAlign: "center",
  1100. align: "center",
  1101. columnLabel: '检验结论',
  1102. columnHidden: false,
  1103. columnImage: false,
  1104. columnSortable: false,
  1105. sortLv: 0,
  1106. status: true,
  1107. fixed: '',
  1108. columnWidth: 100,
  1109. showOverflowTooltip: true
  1110. },
  1111. {
  1112. userId: this.$store.state.user.name,
  1113. functionId: 301014,
  1114. serialNumber: '301014Table1DisposalMeasures',
  1115. tableId: "301014Table1",
  1116. tableName: "IPQC检验记录表",
  1117. columnProp: 'disposalMeasures',
  1118. headerAlign: "center",
  1119. align: "center",
  1120. columnLabel: '处置措施',
  1121. columnHidden: false,
  1122. columnImage: false,
  1123. columnSortable: false,
  1124. sortLv: 0,
  1125. status: true,
  1126. fixed: '',
  1127. columnWidth: 100,
  1128. showOverflowTooltip: true
  1129. },
  1130. {
  1131. userId: this.$store.state.user.name,
  1132. functionId: 301014,
  1133. serialNumber: '301014Table1InspectionTypeNo',
  1134. tableId: "301014Table1",
  1135. tableName: "IPQC检验记录表",
  1136. columnProp: 'inspectionTypeNo',
  1137. headerAlign: "center",
  1138. align: "center",
  1139. columnLabel: '检验类型',
  1140. columnHidden: false,
  1141. columnImage: false,
  1142. columnSortable: false,
  1143. sortLv: 0,
  1144. status: true,
  1145. fixed: '',
  1146. columnWidth: 100,
  1147. showOverflowTooltip: true
  1148. },
  1149. {
  1150. userId: this.$store.state.user.name,
  1151. functionId: 301014,
  1152. serialNumber: '301014Table1TaskDate',
  1153. tableId: "301014Table1",
  1154. tableName: "IPQC检验记录表",
  1155. columnProp: 'taskDate',
  1156. headerAlign: "center",
  1157. align: "center",
  1158. columnLabel: '送检日期',
  1159. columnHidden: false,
  1160. columnImage: false,
  1161. columnSortable: false,
  1162. sortLv: 0,
  1163. status: true,
  1164. fixed: '',
  1165. columnWidth: 130,
  1166. showOverflowTooltip: true
  1167. },
  1168. {
  1169. userId: this.$store.state.user.name,
  1170. functionId: 301014,
  1171. serialNumber: '301014Table1InspectionCycle',
  1172. tableId: "301014Table1",
  1173. tableName: "IPQC检验记录表",
  1174. columnProp: 'inspectionCycle',
  1175. headerAlign: "center",
  1176. align: "right",
  1177. columnLabel: '检验周期(h)',
  1178. columnHidden: false,
  1179. columnImage: false,
  1180. columnSortable: false,
  1181. sortLv: 0,
  1182. status: true,
  1183. fixed: '',
  1184. columnWidth: 100,
  1185. showOverflowTooltip: true
  1186. },
  1187. {
  1188. userId: this.$store.state.user.name,
  1189. functionId: 301014,
  1190. serialNumber: '301014Table1SeqNo',
  1191. tableId: "301014Table1",
  1192. tableName: "IPQC检验记录表",
  1193. columnProp: 'seqNo',
  1194. headerAlign: "center",
  1195. align: "left",
  1196. columnLabel: '派工单号',
  1197. columnHidden: false,
  1198. columnImage: false,
  1199. columnSortable: false,
  1200. sortLv: 0,
  1201. status: true,
  1202. fixed: '',
  1203. columnWidth: 200,
  1204. showOverflowTooltip: true
  1205. },
  1206. {
  1207. userId: this.$store.state.user.name,
  1208. functionId: 301014,
  1209. serialNumber: '301014Table1PartNo',
  1210. tableId: "301014Table1",
  1211. tableName: "IPQC检验记录表",
  1212. columnProp: 'partNo',
  1213. headerAlign: "center",
  1214. align: "center",
  1215. columnLabel: '物料编码',
  1216. columnHidden: false,
  1217. columnImage: false,
  1218. columnSortable: false,
  1219. sortLv: 0,
  1220. status: true,
  1221. fixed: '',
  1222. columnWidth: 120,
  1223. showOverflowTooltip: true
  1224. },
  1225. {
  1226. userId: this.$store.state.user.name,
  1227. functionId: 301014,
  1228. serialNumber: '301014Table1PartDesc',
  1229. tableId: "301014Table1",
  1230. tableName: "IPQC检验记录表",
  1231. columnProp: 'partDesc',
  1232. headerAlign: "center",
  1233. align: "left",
  1234. columnLabel: '物料名称',
  1235. columnHidden: false,
  1236. columnImage: false,
  1237. columnSortable: false,
  1238. sortLv: 0,
  1239. status: true,
  1240. fixed: '',
  1241. columnWidth: 300,
  1242. showOverflowTooltip: true
  1243. },
  1244. ],
  1245. // 新增弹窗
  1246. modalFlag: false,
  1247. modalData: {
  1248. flag: '1',
  1249. site: '',
  1250. bu: '',
  1251. rollNo: '',
  1252. seqNo: '',
  1253. orderNo: '',
  1254. operationDesc: '',
  1255. operationNo: '',
  1256. resourceId: '',
  1257. resourceDesc: '',
  1258. workCenterNo: '',
  1259. partNo: '',
  1260. partDesc: '',
  1261. invdefinetype: '',
  1262. sku: '',
  1263. cinvSourceCode: '',
  1264. inspectionTypeNo: '',
  1265. rollQty: '',
  1266. umId: '',
  1267. umName: '',
  1268. templateId: '',
  1269. templateName: '',
  1270. sjzs: '',
  1271. batchRollNo: '',
  1272. specialRequirements: '',
  1273. specialTaskFlag: 'N'
  1274. },
  1275. saveLoading: false,
  1276. checked: false,
  1277. // 下拉列表数据
  1278. operationList: [],
  1279. umList: [],
  1280. controlData: { baseData: '' },
  1281. // 权限控制
  1282. authDetail: false,
  1283. authFile: false,
  1284. // 详情弹窗相关
  1285. detailInformationFlag: false,
  1286. detailData: {
  1287. site: '',
  1288. buNo: '',
  1289. inspectionNo: '',
  1290. partNo: '',
  1291. partDesc: '',
  1292. spec: '',
  1293. rollQty: '',
  1294. samplingQty: '',
  1295. unqualifiedQty: '',
  1296. unqualifiedQuantity: '',
  1297. submitFlag: '',
  1298. disposalMeasures: '',
  1299. disposalRemark: '',
  1300. inspectionResult: '',
  1301. inspectorNo: '',
  1302. inspectorName: '',
  1303. inspectionRemark: '',
  1304. cinvSourceCode: '',
  1305. sku: '',
  1306. invdefinetype: '',
  1307. umId: '',
  1308. umName: '',
  1309. operator: '',
  1310. operatorName: '',
  1311. responsiblePerson: '',
  1312. responsiblePersonName: '',
  1313. state: '',
  1314. passQty: '',
  1315. notPassQty: '',
  1316. batchQualifiedQty: '',
  1317. orderNo: '',
  1318. templateId: ''
  1319. },
  1320. // 处置措施选项
  1321. disposalMeasuresOptions: [],
  1322. // 协同人员/责任人相关
  1323. roleList: [],
  1324. operatorModelFlag: false,
  1325. operatorData: {
  1326. flag: '',
  1327. site: '',
  1328. bu: '',
  1329. adminID: '',
  1330. adminName: '',
  1331. roleName: '',
  1332. roleId: '',
  1333. userName: ''
  1334. },
  1335. operatorList: [],
  1336. operatorDetailList: [
  1337. {
  1338. columnProp: 'adminID',
  1339. headerAlign: "center",
  1340. align: "center",
  1341. columnLabel: '用户编码',
  1342. columnHidden: false,
  1343. columnImage: false,
  1344. columnSortable: false,
  1345. fixed: '',
  1346. columnWidth: 100,
  1347. showOverflowTooltip: true
  1348. },
  1349. {
  1350. columnProp: 'adminName',
  1351. headerAlign: "center",
  1352. align: "center",
  1353. columnLabel: '用户姓名',
  1354. columnHidden: false,
  1355. columnImage: false,
  1356. columnSortable: false,
  1357. fixed: '',
  1358. columnWidth: 100,
  1359. showOverflowTooltip: true
  1360. },
  1361. {
  1362. columnProp: 'roleName',
  1363. headerAlign: "center",
  1364. align: "center",
  1365. columnLabel: '角色',
  1366. columnHidden: false,
  1367. columnImage: false,
  1368. columnSortable: false,
  1369. fixed: '',
  1370. columnWidth: 150,
  1371. showOverflowTooltip: true
  1372. }
  1373. ],
  1374. dataListSelections2: [],
  1375. // 数据采集loading
  1376. loadFlag: false,
  1377. // 项目导入相关
  1378. itemOperationDialogFlag: false,
  1379. itemOperationQuery: {
  1380. itemNo: '',
  1381. itemDesc: ''
  1382. },
  1383. availableItemList: [],
  1384. selectedItemList: [],
  1385. availableItemSelections: [],
  1386. selectedItemSelections: [],
  1387. // 模板导入相关
  1388. templateImportDialogFlag: false,
  1389. templateQuery: {
  1390. templateId: '',
  1391. templateDesc: ''
  1392. },
  1393. templateImportList: [],
  1394. templateSelections: [],
  1395. importLoading: false,
  1396. detailList: [],
  1397. transferLoadFlag: false,
  1398. saveInformationData: {
  1399. site: '',
  1400. buNo: '',
  1401. inspectionNo:'',
  1402. detailList: [],
  1403. type: ''
  1404. },
  1405. // 开始检验相关
  1406. ItemObjectModelFlag: false,
  1407. actionData: {
  1408. site: '',
  1409. buNo: '',
  1410. inspectionNo: ''
  1411. },
  1412. itemObjectList: [],
  1413. // 工作文件相关
  1414. fileFlag: false,
  1415. fileContentList: [],
  1416. fileLoading: false,
  1417. fileActiveTab: 'qcFile',
  1418. sopFileList: [],
  1419. sopFileLoading: false,
  1420. currentFileRow: null,
  1421. // 派工单号相关
  1422. seqDetailFlag: false,
  1423. seqInfoList: [],
  1424. seqDetailData: {
  1425. orderNo: '',
  1426. seqNo: '',
  1427. sku: '',
  1428. partNo: '',
  1429. partDesc: '',
  1430. operationDesc: '',
  1431. status: ''
  1432. },
  1433. seqDetailColumnList: [
  1434. {
  1435. columnProp: 'orderNo',
  1436. headerAlign: "center",
  1437. align: "center",
  1438. columnLabel: '工单号',
  1439. columnHidden: false,
  1440. columnImage: false,
  1441. columnSortable: false,
  1442. fixed: '',
  1443. columnWidth: 80,
  1444. showOverflowTooltip: true
  1445. },
  1446. {
  1447. columnProp: 'seqNo',
  1448. headerAlign: "center",
  1449. align: "center",
  1450. columnLabel: '派工单号',
  1451. columnHidden: false,
  1452. columnImage: false,
  1453. columnSortable: false,
  1454. fixed: '',
  1455. columnWidth: 80,
  1456. showOverflowTooltip: true
  1457. },
  1458. {
  1459. columnProp: 'sku',
  1460. headerAlign: "center",
  1461. align: "center",
  1462. columnLabel: 'SKU',
  1463. columnHidden: false,
  1464. columnImage: false,
  1465. columnSortable: false,
  1466. fixed: '',
  1467. columnWidth: 80,
  1468. showOverflowTooltip: true
  1469. },
  1470. {
  1471. columnProp: 'partNo',
  1472. headerAlign: "center",
  1473. align: "center",
  1474. columnLabel: '物料编码',
  1475. columnHidden: false,
  1476. columnImage: false,
  1477. columnSortable: false,
  1478. fixed: '',
  1479. columnWidth: 80,
  1480. showOverflowTooltip: true
  1481. },
  1482. {
  1483. columnProp: 'partDesc',
  1484. headerAlign: "center",
  1485. align: "center",
  1486. columnLabel: '物料名称',
  1487. columnHidden: false,
  1488. columnImage: false,
  1489. columnSortable: false,
  1490. fixed: '',
  1491. columnWidth: 80,
  1492. showOverflowTooltip: true
  1493. },
  1494. {
  1495. columnProp: 'lotsize',
  1496. headerAlign: "center",
  1497. align: "right",
  1498. columnLabel: '批量',
  1499. columnHidden: false,
  1500. columnImage: false,
  1501. columnSortable: false,
  1502. fixed: '',
  1503. columnWidth: 80,
  1504. showOverflowTooltip: true
  1505. },
  1506. {
  1507. columnProp: 'qtyrequired',
  1508. headerAlign: "center",
  1509. align: "right",
  1510. columnLabel: '需求数量',
  1511. columnHidden: false,
  1512. columnImage: false,
  1513. columnSortable: false,
  1514. fixed: '',
  1515. columnWidth: 80,
  1516. showOverflowTooltip: true
  1517. },
  1518. {
  1519. columnProp: 'sjzs',
  1520. headerAlign: "center",
  1521. align: "right",
  1522. columnLabel: '送检总数',
  1523. columnHidden: false,
  1524. columnImage: false,
  1525. columnSortable: false,
  1526. fixed: '',
  1527. columnWidth: 80,
  1528. showOverflowTooltip: true
  1529. },
  1530. {
  1531. columnProp: 'operationDesc',
  1532. headerAlign: "center",
  1533. align: "center",
  1534. columnLabel: '工序',
  1535. columnHidden: false,
  1536. columnImage: false,
  1537. columnSortable: false,
  1538. fixed: '',
  1539. columnWidth: 80,
  1540. showOverflowTooltip: true
  1541. }
  1542. ],
  1543. // 检验模板相关
  1544. templateModelFlag: false,
  1545. templateData: {
  1546. site: '',
  1547. bu: '',
  1548. templateId: '',
  1549. templateName: '',
  1550. inspectionTypeNo: '',
  1551. inspectionTypeName: ''
  1552. },
  1553. templateList: [],
  1554. templateDetailList: [
  1555. {
  1556. columnProp: 'templateId',
  1557. headerAlign: "center",
  1558. align: "center",
  1559. columnLabel: '模板编码',
  1560. columnHidden: false,
  1561. columnImage: false,
  1562. columnSortable: false,
  1563. fixed: '',
  1564. columnWidth: 120,
  1565. showOverflowTooltip: true
  1566. },
  1567. {
  1568. columnProp: 'templateName',
  1569. headerAlign: "center",
  1570. align: "center",
  1571. columnLabel: '模板名称',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. columnSortable: false,
  1575. fixed: '',
  1576. columnWidth: 200,
  1577. showOverflowTooltip: true
  1578. },
  1579. {
  1580. columnProp: 'inspectionTypeName',
  1581. headerAlign: "center",
  1582. align: "center",
  1583. columnLabel: '检验类型',
  1584. columnHidden: false,
  1585. columnImage: false,
  1586. columnSortable: false,
  1587. fixed: '',
  1588. columnWidth: 100,
  1589. showOverflowTooltip: true
  1590. }
  1591. ],
  1592. rules: {
  1593. bu: [{ required: true, message: '请选择BU', trigger: ['blur','change']}],
  1594. seqNoType: [{ required: true, message: '请输入派工单号', trigger: ['blur','change'] }],
  1595. orderNoType: [{ required: true, message: '请输入工单号', trigger: ['blur','change'] }],
  1596. operationDescType: [{ required: true, message: '请选择工序', trigger: ['blur','change'] }],
  1597. resourceIdType: [{ required: true, message: '请输入机台', trigger: ['blur','change'] }],
  1598. partNoType: [{ required: true, message: '请输入物料编码', trigger: ['blur','change'] }],
  1599. inspectionTypeNoType: [{ required: true, message: '请选择检验类型', trigger: ['blur','change'] }],
  1600. rollQtyType: [{ required: true, message: '请输入送检数量', trigger: ['blur','change'] }],
  1601. umIdType: [{ required: true, message: '请选择单位', trigger: ['blur','change'] }],
  1602. templateId: [{ required: true, message: '请选择检验模板', trigger: ['blur','change'] }]
  1603. },
  1604. typeOptions: [],
  1605. }
  1606. },
  1607. watch: {
  1608. visible(val) {
  1609. if (val) {
  1610. this.init()
  1611. }
  1612. }
  1613. },
  1614. methods: {
  1615. // 初始化
  1616. init() {
  1617. // 设置订单号参数
  1618. if (this.orderNo) {
  1619. this.searchData.orderNo = this.orderNo
  1620. }
  1621. // // 设置机台ID参数
  1622. // if (this.resourceId) {
  1623. // this.searchData.resourceId = this.resourceId
  1624. // }
  1625. if (this.seqNo) {
  1626. this.searchData.seqNo = this.seqNo
  1627. }
  1628. this.getDataList()
  1629. this.getSiteAndBuByUserName2()
  1630. this.getUmList()
  1631. // 查看 质量任务生成规则控制 动控是否开启
  1632. this.queryController()
  1633. this.inspectionTypeSearch()
  1634. // 获取处置措施列表
  1635. this.getDisposalMeasuresOptions()
  1636. // 获取用户角色列表
  1637. this.getUserRoleListData()
  1638. },
  1639. // 查询检验类型
  1640. inspectionTypeSearch () {
  1641. let tempData = {
  1642. site: this.site
  1643. }
  1644. inspectionTypeSearch(tempData).then(({data}) => {
  1645. if (data.code === 0) {
  1646. this.typeOptions = data.rows
  1647. this.typeOptions.forEach(val => {
  1648. if (val.inspectionTypeName.includes('IPQC')) {
  1649. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  1650. this.templateData.inspectionTypeName = val.inspectionTypeName
  1651. }
  1652. })
  1653. }
  1654. })
  1655. },
  1656. // 检查动控是否开启
  1657. queryController () {
  1658. let tempData = {
  1659. controlNo: '10004',
  1660. site: this.site,
  1661. }
  1662. queryController(tempData).then(({data}) => {
  1663. if (data && data.code === 0) {
  1664. this.controlData = data.rows
  1665. } else {
  1666. this.$message.error(data.msg)
  1667. }
  1668. })
  1669. },
  1670. // 获取用户BU列表
  1671. getSiteAndBuByUserName2() {
  1672. let tempData = {
  1673. username: this.$store.state.user.name,
  1674. }
  1675. getSiteAndBuByUserName(tempData).then(({data}) => {
  1676. if (data && data.code === 0) {
  1677. this.userBuList = data.rows
  1678. if (this.userBuList.length > 0) {
  1679. this.modalData.bu = this.userBuList[0].buNo
  1680. }
  1681. }
  1682. })
  1683. getSiteAndBuByUserName2(tempData).then(({data}) => {
  1684. if (data && data.code === 0) {
  1685. this.buList = data.rows
  1686. }
  1687. })
  1688. },
  1689. // 获取数据列表
  1690. getDataList() {
  1691. this.searchLoading = true
  1692. this.searchData.limit = this.pageSize
  1693. this.searchData.page = this.pageIndex
  1694. qcIPQCInspectionSearch(this.searchData).then(({data}) => {
  1695. if (data.code === 0) {
  1696. this.dataList = data.page.list
  1697. this.pageIndex = data.page.currPage
  1698. this.pageSize = data.page.pageSize
  1699. this.totalPage = data.page.totalCount
  1700. this.searchLoading = false
  1701. } else {
  1702. this.$message.error(data.msg)
  1703. }
  1704. }).catch(() => {
  1705. this.searchLoading = false
  1706. })
  1707. },
  1708. // 行点击事件
  1709. IPQCClickRow(row) {
  1710. console.log('点击行:', row)
  1711. },
  1712. // 选择变化事件
  1713. selectionIPQC(selection) {
  1714. this.IPQCSelections = selection
  1715. },
  1716. // 选择标志
  1717. selectFlag(row, index) {
  1718. return true
  1719. },
  1720. // 分页大小变化
  1721. sizeChangeHandle(val) {
  1722. this.pageSize = val
  1723. this.pageIndex = 1
  1724. this.getDataList()
  1725. },
  1726. // 当前页变化
  1727. currentChangeHandle(val) {
  1728. this.pageIndex = val
  1729. this.getDataList()
  1730. },
  1731. // 新增弹窗
  1732. addModal() {
  1733. // 判断是否有当前卷号(排除"暂无卷号"的情况)
  1734. const hasCurrentRollNo = this.rollNo && this.rollNo !== '' && this.rollNo !== '暂无卷号';
  1735. this.modalData = {
  1736. flag: '1',
  1737. site: '',
  1738. bu: this.userBuList.length > 0 ? this.userBuList[0].buNo : '',
  1739. rollNo: hasCurrentRollNo ? this.rollNo : '',
  1740. seqNo: hasCurrentRollNo ? '' : this.seqNo,
  1741. orderNo: '',
  1742. operationDesc: '',
  1743. operationNo: '',
  1744. resourceId: '',
  1745. resourceDesc: '',
  1746. workCenterNo: '',
  1747. partNo: '',
  1748. partDesc: '',
  1749. invdefinetype: '',
  1750. sku: '',
  1751. cinvSourceCode: '',
  1752. inspectionTypeNo: '',
  1753. rollQty: '',
  1754. umId: this.umList.length > 0 ? this.umList[0].umId : '',
  1755. umName: this.umList.length > 0 ? this.umList[0].umName : '',
  1756. templateId: '',
  1757. templateName: '',
  1758. sjzs: '',
  1759. batchRollNo: '',
  1760. specialRequirements: '',
  1761. specialTaskFlag: 'N'
  1762. }
  1763. this.operationList = []
  1764. this.checked = false
  1765. this.modalFlag = true
  1766. // 打开弹窗后自动查询信息
  1767. this.$nextTick(() => {
  1768. if (hasCurrentRollNo) {
  1769. // 有当前卷号,通过标签号查询信息
  1770. this.rollNoEnter();
  1771. } else if (this.seqNo && this.seqNo !== '') {
  1772. // 没有当前卷号但有派工单号,通过派工单号查询信息
  1773. this.seqNoDirectSearch();
  1774. }
  1775. });
  1776. },
  1777. // BU变化事件
  1778. buChange() {
  1779. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  1780. this.modalData.templateId = ''
  1781. this.modalData.templateName = ''
  1782. } else { // 无工单检验
  1783. this.modalData.partNo = ''
  1784. this.modalData.partDesc = ''
  1785. this.modalData.invdefinetype = ''
  1786. this.modalData.sku = ''
  1787. this.modalData.templateId = ''
  1788. this.modalData.templateName = ''
  1789. }
  1790. },
  1791. // 标签号回车事件
  1792. rollNoEnter() {
  1793. if (this.modalData.rollNo) {
  1794. rollNoEnterAPI(this.modalData).then(({data}) => {
  1795. if (data && data.code === 0) {
  1796. const rollData = data.rows[0]
  1797. this.modalData.seqNo = rollData.seqNo
  1798. this.modalData.orderNo = rollData.orderNo
  1799. this.modalData.partNo = rollData.partNo
  1800. this.modalData.partDesc = rollData.partDesc
  1801. this.modalData.invdefinetype = rollData.invdefinetype
  1802. this.modalData.sku = rollData.sku
  1803. this.modalData.operationDesc = rollData.operationDesc
  1804. this.modalData.resourceDesc = rollData.resourceDesc
  1805. this.getOperationList()
  1806. } else {
  1807. this.$message.error(data.msg || '标签号查询失败')
  1808. }
  1809. }).catch(() => {
  1810. this.$message.error('标签号查询失败')
  1811. })
  1812. }
  1813. },
  1814. // 获取工序列表
  1815. getOperationList() {
  1816. getOperationList(this.modalData).then(({data}) => {
  1817. if (data && data.code === 0) {
  1818. this.operationList = data.rows
  1819. if (data.rows.length > 0) {
  1820. this.modalData.operationDesc = data.rows[0].operationDesc
  1821. this.modalData.workCenterNo = data.rows[0].workCenterNo
  1822. this.modalData.resourceId = data.rows[0].resourceId
  1823. this.modalData.resourceDesc = data.rows[0].resourceDesc
  1824. }
  1825. }
  1826. })
  1827. },
  1828. // 获取单位列表
  1829. getUmList() {
  1830. let tempData = {
  1831. site: this.site,
  1832. active: 'Y'
  1833. }
  1834. umSearch(tempData).then(({data}) => {
  1835. if (data && data.code === 0) {
  1836. this.umList = data.rows
  1837. }
  1838. })
  1839. },
  1840. // 获取基础列表
  1841. getBaseList(type) {
  1842. this.$nextTick(() => {
  1843. if (type === 1052) {
  1844. this.searchSeqInfo()
  1845. this.seqDetailFlag = true
  1846. }
  1847. if (type === 505) {
  1848. // 机台选择逻辑
  1849. console.log('机台选择:', type)
  1850. }
  1851. })
  1852. },
  1853. // 查询物料列表
  1854. queryPartList() {
  1855. console.log('查询物料列表')
  1856. },
  1857. // 查询检验模板列表
  1858. queryTemplateList() {
  1859. this.templateData.bu = this.modalData.bu
  1860. // 查询所有检验模板
  1861. queryTemplateList(this.templateData).then(({data}) => {
  1862. if (data && data.code === 0) {
  1863. this.templateList = data.rows
  1864. this.templateModelFlag = true
  1865. } else {
  1866. this.$message.error(data.msg)
  1867. }
  1868. })
  1869. },
  1870. // 选中检验模板
  1871. getRowData(row) {
  1872. this.modalData.templateId = row.templateId
  1873. this.modalData.templateName = row.templateName
  1874. this.templateModelFlag = false
  1875. },
  1876. // 派工单号查询
  1877. searchSeqInfo() {
  1878. let tempData = {
  1879. bu: this.modalData.bu,
  1880. seqNo: this.seqDetailData.seqNo,
  1881. orderNo: this.seqDetailData.orderNo,
  1882. sku: this.seqDetailData.sku,
  1883. partDesc: this.seqDetailData.partDesc,
  1884. partNo: this.seqDetailData.partNo,
  1885. operationDesc: this.seqDetailData.operationDesc,
  1886. status: this.seqDetailData.status
  1887. }
  1888. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  1889. this.seqInfoList = []
  1890. } else {
  1891. searchSeqInfo(tempData).then(({data}) => {
  1892. if (data && data.code === 0) {
  1893. this.seqInfoList = data.rows
  1894. } else {
  1895. this.$message.error(data.msg)
  1896. }
  1897. })
  1898. }
  1899. },
  1900. // 选中派工单号
  1901. getRowData1(row) {
  1902. this.modalData.seqNo = row.seqno || row.seqNo
  1903. this.modalData.orderNo = row.orderno || row.orderNo
  1904. this.modalData.partNo = row.partNo
  1905. this.modalData.partDesc = row.partDesc
  1906. this.modalData.sku = row.sku
  1907. this.modalData.operationDesc = row.operationDesc
  1908. this.modalData.sjzs = row.sjzs
  1909. this.seqDetailFlag = false
  1910. this.getOperationList()
  1911. },
  1912. // 关闭派工单号弹窗
  1913. closeSeqDialog() {
  1914. this.seqDetailData = {
  1915. seqNo: '',
  1916. orderNo: '',
  1917. sku: '',
  1918. partNo: '',
  1919. partDesc: '',
  1920. operationDesc: '',
  1921. status: ''
  1922. }
  1923. this.seqInfoList = []
  1924. },
  1925. // 派工单号直接查询(新增时自动调用)
  1926. seqNoDirectSearch() {
  1927. if (!this.modalData.seqNo) return;
  1928. let tempData = {
  1929. bu: this.modalData.bu,
  1930. seqNo: this.modalData.seqNo,
  1931. orderNo: '',
  1932. sku: '',
  1933. partDesc: '',
  1934. partNo: '',
  1935. operationDesc: '',
  1936. status: ''
  1937. }
  1938. searchSeqInfo(tempData).then(({data}) => {
  1939. if (data && data.code === 0 && data.rows && data.rows.length > 0) {
  1940. // 自动选取第一条记录并赋值
  1941. const row = data.rows[0];
  1942. this.modalData.seqNo = row.seqno || row.seqNo;
  1943. this.modalData.orderNo = row.orderno || row.orderNo;
  1944. this.modalData.partNo = row.partNo;
  1945. this.modalData.partDesc = row.partDesc;
  1946. this.modalData.sku = row.sku;
  1947. this.modalData.operationDesc = row.operationDesc;
  1948. this.modalData.sjzs = row.sjzs;
  1949. this.getOperationList();
  1950. }
  1951. }).catch(() => {
  1952. // 查询失败静默处理
  1953. });
  1954. },
  1955. // 无工单检验变化
  1956. changeSpecialTask() {
  1957. // 先重置数据
  1958. this.modalData = {
  1959. flag: '1',
  1960. site: '',
  1961. bu: this.userBuList.length > 0 ? this.userBuList[0].buNo : '',
  1962. rollNo: '',
  1963. seqNo: '',
  1964. orderNo: '',
  1965. operationDesc: '',
  1966. operationNo: '',
  1967. resourceId: '',
  1968. resourceDesc: '',
  1969. workCenterNo: '',
  1970. partNo: '',
  1971. partDesc: '',
  1972. invdefinetype: '',
  1973. sku: '',
  1974. cinvSourceCode: '',
  1975. inspectionTypeNo: '',
  1976. rollQty: '',
  1977. umId: this.umList.length > 0 ? this.umList[0].umId : '',
  1978. umName: this.umList.length > 0 ? this.umList[0].umName : '',
  1979. templateId: '',
  1980. templateName: '',
  1981. sjzs: '',
  1982. batchRollNo: '',
  1983. specialRequirements: '',
  1984. specialTaskFlag: ''
  1985. }
  1986. // 获取选中框
  1987. let obj = document.getElementsByName('specialTask')
  1988. // 判断是否打勾
  1989. if (obj[0].checked) {
  1990. let tempData = {
  1991. site: '',
  1992. bu: this.modalData.bu
  1993. }
  1994. this.modalData.specialTaskFlag = 'Y'
  1995. // 获取特殊工序列表
  1996. getSpecialOperationList(tempData).then(({data}) => {
  1997. if (data && data.code === 0) {
  1998. this.operationList = data.rows
  1999. } else {
  2000. this.$message.error(data.msg)
  2001. }
  2002. })
  2003. // 派工单和工单号赋值
  2004. this.modalData.seqNo = '000#1TSGD'
  2005. this.modalData.orderNo = '000#1'
  2006. } else {
  2007. this.operationList = []
  2008. this.modalData.specialTaskFlag = ''
  2009. }
  2010. },
  2011. // 保存数据
  2012. saveData() {
  2013. // 验证 BU
  2014. if (this.modalData.bu === '' || this.modalData.bu == null) {
  2015. this.$message.warning('请选择BU!')
  2016. return
  2017. }
  2018. // 验证派工单号
  2019. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  2020. this.$message.warning('请选择派工单!')
  2021. return
  2022. }
  2023. // 验证工单号
  2024. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  2025. this.$message.warning('请选择工单!')
  2026. return
  2027. }
  2028. // 验证检验类型
  2029. if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
  2030. this.$message.warning('请选择检验类型!')
  2031. return
  2032. }
  2033. // 验证物料编码(非无工单检验)
  2034. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  2035. this.$message.warning('请选择物料!')
  2036. return
  2037. }
  2038. // 验证工序
  2039. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  2040. this.$message.warning('请选择工序!')
  2041. return
  2042. }
  2043. // 验证机台(非无工单检验)
  2044. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  2045. this.$message.warning('请选择机台!')
  2046. return
  2047. }
  2048. // 验证送检数量
  2049. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  2050. this.$message.warning('请填写送检数量!')
  2051. return
  2052. }
  2053. // 验证单位
  2054. if (this.modalData.umId === '' || this.modalData.umId == null) {
  2055. this.$message.warning('请选择单位!')
  2056. return
  2057. }
  2058. // 验证检验模板(动控开启时)
  2059. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  2060. this.$message.warning('请选择检验模板!')
  2061. return
  2062. }
  2063. this.saveLoading = true
  2064. if (this.modalData.flag === '1') {
  2065. saveOsInspection(this.modalData).then(({data}) => {
  2066. if (data && data.code === 0) {
  2067. this.getDataList()
  2068. this.operationList = []
  2069. this.modalFlag = false
  2070. this.$message.success('操作成功')
  2071. } else {
  2072. this.$message.error(data.msg)
  2073. }
  2074. this.saveLoading = false
  2075. }).catch(() => {
  2076. this.saveLoading = false
  2077. })
  2078. }
  2079. },
  2080. // 删除
  2081. deleteModal() {
  2082. if (this.IPQCSelections.length === 0) {
  2083. this.$alert('请勾选要删除的检验单!', '提示', {
  2084. confirmButtonText: '确定'
  2085. })
  2086. return false
  2087. }
  2088. this.$confirm(`是否删除该 ${this.IPQCSelections.length} 条检验记录?`, '提示', {
  2089. confirmButtonText: '确定',
  2090. cancelButtonText: '取消',
  2091. type: 'warning'
  2092. }).then(() => {
  2093. let tempData = {
  2094. submitList: this.IPQCSelections
  2095. }
  2096. ipqcRecordDelete(tempData).then(({data}) => {
  2097. if (data && data.code === 0) {
  2098. this.getDataList()
  2099. this.IPQCSelections = []
  2100. this.$message.success('操作成功')
  2101. } else {
  2102. this.$message.error(data.msg)
  2103. }
  2104. })
  2105. })
  2106. },
  2107. // 审核
  2108. submitResult() {
  2109. if (this.IPQCSelections.length === 0) {
  2110. this.$alert('请勾选要审核的检验单!', '提示', {
  2111. confirmButtonText: '确定'
  2112. })
  2113. return false
  2114. }
  2115. // 校验单据状态,必须是'待审核'才可以审核
  2116. const invalidRecords = this.IPQCSelections.filter(item => item.state !== '待审核')
  2117. if (invalidRecords.length > 0) {
  2118. this.$alert('只能审核状态为"待审核"的检验单!', '提示', {
  2119. confirmButtonText: '确定'
  2120. })
  2121. return false
  2122. }
  2123. this.$confirm(`是否审核该 ${this.IPQCSelections.length} 条检验记录?`, '提示', {
  2124. confirmButtonText: '确定',
  2125. cancelButtonText: '取消',
  2126. type: 'warning'
  2127. }).then(() => {
  2128. let tempData = {
  2129. submitList: this.IPQCSelections
  2130. }
  2131. saveIPQCSubmitResult(tempData).then(({data}) => {
  2132. if (data && data.code === 0) {
  2133. this.getDataList()
  2134. this.IPQCSelections = []
  2135. this.$message.success('操作成功')
  2136. } else {
  2137. this.$message.error(data.msg)
  2138. }
  2139. })
  2140. })
  2141. },
  2142. // 开始检验
  2143. actionModal(row) {
  2144. this.actionData = {
  2145. site: row.site,
  2146. buNo: row.buNo,
  2147. inspectionNo: row.inspectionNo
  2148. }
  2149. getIPQCItemObjectList(this.actionData).then(({data}) => {
  2150. if (data && data.code === 0) {
  2151. if (data.rows.length === 0) {
  2152. this.actionModal2()
  2153. } else {
  2154. this.itemObjectList = data.rows
  2155. this.ItemObjectModelFlag = true
  2156. }
  2157. } else {
  2158. this.$message.error(data.msg)
  2159. }
  2160. })
  2161. },
  2162. // 开始检验确认
  2163. actionModal2() {
  2164. this.$confirm(`确认开始检验?`, '提示', {
  2165. confirmButtonText: '确定',
  2166. cancelButtonText: '取消',
  2167. type: 'warning'
  2168. }).then(() => {
  2169. let tempData = {
  2170. site: this.actionData.site,
  2171. buNo: this.actionData.buNo,
  2172. inspectionNo: this.actionData.inspectionNo,
  2173. actionBy: this.$store.state.user.name,
  2174. state: '待检验',
  2175. equipmentList: this.itemObjectList
  2176. }
  2177. actionIPQCInspection(tempData).then(({data}) => {
  2178. if (data && data.code === 0) {
  2179. this.getDataList()
  2180. this.$message.success('操作成功')
  2181. this.ItemObjectModelFlag = false
  2182. } else {
  2183. this.$message.error(data.msg)
  2184. }
  2185. })
  2186. })
  2187. },
  2188. // 明细记录信息查询
  2189. detailModal(row) {
  2190. this.detailData.site = row.site
  2191. this.detailData.buNo = row.buNo
  2192. this.detailData.inspectionNo = row.inspectionNo
  2193. this.detailData.partNo = row.partNo
  2194. this.detailData.partDesc = row.partDesc
  2195. this.detailData.spec = row.spec || ''
  2196. this.detailData.rollQty = row.rollQty
  2197. this.detailData.samplingQty = row.samplingQty
  2198. this.detailData.unqualifiedQty = row.unqualifiedQty
  2199. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  2200. this.detailData.submitFlag = row.submitFlag
  2201. this.detailData.disposalMeasures = row.disposalMeasures || ''
  2202. this.detailData.disposalRemark = row.disposalRemark || ''
  2203. this.detailData.inspectionResult = row.inspectionResult
  2204. this.detailData.inspectorNo = row.inspectorNo
  2205. this.detailData.inspectorName = row.inspectorName
  2206. this.detailData.inspectionRemark = row.inspectionRemark
  2207. this.detailData.cinvSourceCode = row.cinvSourceCode
  2208. this.detailData.sku = row.sku
  2209. this.detailData.invdefinetype = row.invdefinetype
  2210. this.detailData.umId = row.umId
  2211. this.detailData.umName = row.umName
  2212. this.detailData.operator = row.operator || ''
  2213. this.detailData.operatorName = row.operatorName || ''
  2214. this.detailData.responsiblePerson = row.responsiblePerson || ''
  2215. this.detailData.responsiblePersonName = row.responsiblePersonName || ''
  2216. this.detailData.state = row.state
  2217. this.detailData.orderNo = row.orderNo || ''
  2218. this.detailData.templateId = row.templateId || ''
  2219. if (row.state === '待检验') {
  2220. this.detailData.passQty = row.samplingQty
  2221. } else {
  2222. this.detailData.passQty = row.passQty
  2223. this.detailData.notPassQty = row.notPassQty
  2224. }
  2225. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  2226. this.getInspectionFormData()
  2227. this.detailInformationFlag = true
  2228. },
  2229. // 检验单明细
  2230. getInspectionFormData() {
  2231. ipqcDetailSearch(this.detailData).then(({data}) => {
  2232. if (data && data.code === 0) {
  2233. this.detailList = data.rows
  2234. } else {
  2235. this.detailList = []
  2236. }
  2237. })
  2238. },
  2239. // 刷新派设备文档的列表
  2240. getFileContentData(row) {
  2241. this.currentFileRow = row
  2242. this.fileActiveTab = 'qcFile'
  2243. let currentData = {
  2244. orderRef1: row.site,
  2245. orderRef2: row.inspectionNo,
  2246. orderRef4: row.buNo,
  2247. partNo: row.partNo
  2248. }
  2249. this.fileLoading = true
  2250. getInspectionFile(currentData).then(({data}) => {
  2251. if (data && data.code === 0) {
  2252. this.fileContentList = data.rows
  2253. } else {
  2254. this.fileContentList = []
  2255. }
  2256. this.fileLoading = false
  2257. }).catch(()=>{
  2258. this.fileLoading = false
  2259. })
  2260. this.getSopFileList(row)
  2261. this.fileFlag = true
  2262. },
  2263. // 获取SOP文件列表(过程检验传所有条件:site, partNo, operationDesc, workcenterNo, orderNo)
  2264. getSopFileList(row) {
  2265. this.sopFileLoading = true
  2266. this.sopFileList = []
  2267. searchQcSopFileList({
  2268. site: row.site,
  2269. partNo: row.partNo || '',
  2270. operationDesc: row.operationDesc || '',
  2271. workcenterNo: row.workCenterNo || '',
  2272. orderNo: row.orderNo || ''
  2273. }).then(({data}) => {
  2274. if (data && data.code === 0) {
  2275. this.sopFileList = data.rows || []
  2276. } else {
  2277. this.sopFileList = []
  2278. }
  2279. this.sopFileLoading = false
  2280. }).catch(() => {
  2281. this.sopFileList = []
  2282. this.sopFileLoading = false
  2283. })
  2284. },
  2285. previewSopFile(row) {
  2286. if (!row.sopUrl) { this.$message.warning('该文件暂无预览路径'); return }
  2287. const fileName = row.sopName || row.sopUrl
  2288. let fileSuffix = fileName.includes('.') ? fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase() : ''
  2289. const officeTypes = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  2290. if (officeTypes.includes(fileSuffix)) { this.$message.warning(`暂不支持在线预览${fileSuffix.toUpperCase()}文件`); return }
  2291. let mimeType = 'application/octet-stream'
  2292. if (['jpg', 'jpeg', 'png', 'gif', 'bmp'].includes(fileSuffix)) { mimeType = 'image/' + fileSuffix }
  2293. else if (['mp4', 'avi', 'mov', 'wmv', 'flv'].includes(fileSuffix)) { mimeType = 'video/' + fileSuffix }
  2294. else if (fileSuffix === 'pdf') { mimeType = 'application/pdf' }
  2295. else if (fileSuffix === 'txt') { mimeType = 'text/plain' }
  2296. downloadSopFile(row.sopUrl).then(({ data }) => {
  2297. const blob = new Blob([data], { type: mimeType })
  2298. window.open(URL.createObjectURL(blob), '_blank')
  2299. }).catch(() => { this.$message.error('文件预览失败,请稍后重试') })
  2300. },
  2301. // 保存检验明细(应用/保存)
  2302. Transfer(type) {
  2303. // 保存时校验
  2304. if (type === '2') {
  2305. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  2306. this.$message.warning('请选择检验结论!')
  2307. return
  2308. }
  2309. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  2310. this.$message.warning('请选择处置措施!')
  2311. return
  2312. }
  2313. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  2314. const flag = this.detailList.some(item => item.itemResult === 'N')
  2315. if (!flag) {
  2316. this.$message.warning('请选择不合格项目!')
  2317. return
  2318. }
  2319. }
  2320. if (this.detailData.inspectionResult !== '不合格') {
  2321. this.detailData.disposalMeasures = ''
  2322. this.detailData.disposalRemark = ''
  2323. }
  2324. }
  2325. this.saveDetailInformation(type)
  2326. },
  2327. // 保存检验明细信息
  2328. saveDetailInformation(type) {
  2329. this.saveInformationData.site = this.detailData.site
  2330. this.saveInformationData.buNo = this.detailData.buNo
  2331. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  2332. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  2333. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  2334. this.saveInformationData.inspectorNo = this.$store.state.user.name
  2335. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  2336. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  2337. this.saveInformationData.rollQty = this.detailData.rollQty
  2338. this.saveInformationData.samplingQty = this.detailData.samplingQty
  2339. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  2340. this.saveInformationData.partNo = this.detailData.partNo
  2341. this.saveInformationData.partDesc = this.detailData.partDesc
  2342. this.saveInformationData.operator = this.detailData.operator
  2343. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  2344. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  2345. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  2346. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  2347. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  2348. this.saveInformationData.type = type
  2349. this.transferLoadFlag = true
  2350. saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
  2351. if (data && data.code === 0) {
  2352. this.getDataList()
  2353. this.detailInformationFlag = false
  2354. this.$message.success('操作成功')
  2355. } else {
  2356. this.$message.error(data.msg)
  2357. }
  2358. this.transferLoadFlag = false
  2359. }).catch(() => {
  2360. this.transferLoadFlag = false
  2361. })
  2362. },
  2363. // 检验结论变化事件
  2364. resultChange() {
  2365. if (this.detailData.inspectionResult !== '不合格') {
  2366. this.detailData.disposalMeasures = ''
  2367. this.detailData.disposalRemark = ''
  2368. }
  2369. },
  2370. // 获取处置措施列表
  2371. getDisposalMeasuresOptions() {
  2372. let tempData = {
  2373. inspectionTypeNo: '101'
  2374. }
  2375. disposalMeasuresSearch(tempData).then(({data}) => {
  2376. if (data.code === 0) {
  2377. this.disposalMeasuresOptions = data.rows
  2378. }
  2379. })
  2380. },
  2381. // 获取用户角色列表
  2382. getUserRoleListData() {
  2383. getUserRoleList().then(({data}) => {
  2384. if (data.code === 0) {
  2385. this.roleList = data.rows
  2386. } else {
  2387. this.roleList = []
  2388. }
  2389. })
  2390. },
  2391. // 获取协同人员列表
  2392. getOperatorListModal() {
  2393. this.operatorData.flag = '1'
  2394. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2395. this.operatorData.userName = this.$store.state.user.name
  2396. if (this.roleList.length > 0) {
  2397. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2398. if (filterList.length > 0) {
  2399. this.operatorData.roleId = filterList[0].roleId
  2400. } else {
  2401. this.operatorData.roleId = this.roleList[0].roleId
  2402. }
  2403. } else {
  2404. this.operatorData.roleId = ''
  2405. }
  2406. // 先清空缓存选中
  2407. this.$nextTick(() => {
  2408. if (this.$refs.operatorTable) {
  2409. this.$refs.operatorTable.clearSelection()
  2410. }
  2411. })
  2412. // 拿到选中的人员编号
  2413. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2414. getOperatorList(this.operatorData).then(({data}) => {
  2415. if (data && data.code === 0) {
  2416. this.operatorList = data.rows
  2417. this.operatorList.forEach(val => {
  2418. // 回显选中
  2419. if (tempDataList.includes(val.adminID)) {
  2420. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2421. }
  2422. })
  2423. this.operatorModelFlag = true
  2424. } else {
  2425. this.$message.error(data.msg)
  2426. }
  2427. })
  2428. },
  2429. // 获取责任人员列表
  2430. getResponsiblePersonListModal() {
  2431. this.operatorData.flag = '2'
  2432. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2433. this.operatorData.userName = this.$store.state.user.name
  2434. // 先清空缓存选中
  2435. this.$nextTick(() => {
  2436. if (this.$refs.operatorTable) {
  2437. this.$refs.operatorTable.clearSelection()
  2438. }
  2439. })
  2440. // 拿到选中的人员编号
  2441. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2442. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2443. if (data && data.code === 0) {
  2444. this.operatorList = data.rows
  2445. this.operatorList.forEach(val => {
  2446. // 回显选中
  2447. if (tempDataList.includes(val.adminID)) {
  2448. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2449. }
  2450. })
  2451. this.operatorModelFlag = true
  2452. } else {
  2453. this.$message.error(data.msg)
  2454. }
  2455. })
  2456. },
  2457. // 查询人员列表
  2458. getOperatorList2() {
  2459. if (this.operatorData.flag === '1') {
  2460. // 拿到选中的人员编号
  2461. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2462. getOperatorList(this.operatorData).then(({data}) => {
  2463. if (data && data.code === 0) {
  2464. this.operatorList = data.rows
  2465. this.operatorList.forEach(val => {
  2466. // 回显选中的部门
  2467. if (tempDataList.includes(val.adminID)) {
  2468. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2469. }
  2470. })
  2471. } else {
  2472. this.operatorList = []
  2473. }
  2474. })
  2475. } else {
  2476. // 拿到选中的人员编号
  2477. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2478. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2479. if (data && data.code === 0) {
  2480. this.operatorList = data.rows
  2481. this.operatorList.forEach(val => {
  2482. // 回显选中的部门
  2483. if (tempDataList.includes(val.adminID)) {
  2484. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2485. }
  2486. })
  2487. } else {
  2488. this.operatorList = []
  2489. }
  2490. })
  2491. }
  2492. },
  2493. // 点击行选中复选框
  2494. operatorClickRow(row) {
  2495. this.$refs.operatorTable.toggleRowSelection(row)
  2496. },
  2497. // 多选
  2498. selectionChangeHandle2(val) {
  2499. this.dataListSelections2 = val
  2500. },
  2501. // 确认多选协同人员
  2502. confirmOperator() {
  2503. if (this.dataListSelections2.length === 0) {
  2504. this.$message.warning('请勾选人员!')
  2505. return
  2506. }
  2507. if (this.operatorData.flag === '1') {
  2508. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2509. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2510. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2511. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2512. }
  2513. }
  2514. if (this.detailData.operator.charAt(0) === ';') {
  2515. this.detailData.operator = this.detailData.operator.substring(1)
  2516. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2517. }
  2518. } else {
  2519. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2520. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2521. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2522. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2523. }
  2524. }
  2525. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2526. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2527. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2528. }
  2529. }
  2530. this.operatorData = {
  2531. flag: '',
  2532. site: '',
  2533. bu: '',
  2534. adminID: '',
  2535. adminName: '',
  2536. roleName: '',
  2537. roleId: '',
  2538. userName: this.$store.state.user.name
  2539. }
  2540. this.operatorModelFlag = false
  2541. },
  2542. // 数据采集
  2543. handleDataAcquisition() {
  2544. this.loadFlag = true
  2545. let tempDate = {
  2546. site: this.detailData.site,
  2547. buNo: this.detailData.buNo,
  2548. inspectionNo: this.detailData.inspectionNo,
  2549. flag: 'ipqc'
  2550. }
  2551. dataAcquisition(tempDate).then(({data}) => {
  2552. if (data.code === 0) {
  2553. this.changeMyString(data.rows)
  2554. this.$message.success('数据采集成功')
  2555. } else {
  2556. this.$message.error(data.msg)
  2557. }
  2558. this.loadFlag = false
  2559. })
  2560. },
  2561. // 根据项目数据采集
  2562. dataAcquisitionByItemHandle(row) {
  2563. this.loadFlag = true
  2564. let tempDate = {
  2565. site: row.site,
  2566. buNo: row.buNo,
  2567. inspectionNo: row.inspectionNo,
  2568. templateId: row.templateId,
  2569. itemNo: row.itemNo,
  2570. flag: 'ipqc'
  2571. }
  2572. dataAcquisitionByItem(tempDate).then(({data}) => {
  2573. if (data.code === 0) {
  2574. this.changeMyString(data.rows)
  2575. this.$message.success('数据采集成功')
  2576. } else {
  2577. this.$message.error(data.msg)
  2578. }
  2579. this.loadFlag = false
  2580. })
  2581. },
  2582. // 更新检验明细列表数据
  2583. changeMyString(rows) {
  2584. if (rows && rows.length > 0) {
  2585. rows.forEach(row => {
  2586. const index = this.detailList.findIndex(item => item.itemNo === row.itemNo)
  2587. if (index !== -1) {
  2588. if (row.valueTypeDb === 'N') {
  2589. this.detailList[index].numberValue = row.numberValue
  2590. } else {
  2591. this.detailList[index].textValue = row.textValue
  2592. }
  2593. }
  2594. })
  2595. }
  2596. },
  2597. // 根据实测值更新项目检验结论
  2598. updateItemResult(row) {
  2599. if (row.valueTypeDb === 'N' && row.numberValue !== '' && row.numberValue != null) {
  2600. const numValue = parseFloat(row.numberValue)
  2601. const minValue = row.minValue != null ? parseFloat(row.minValue) : null
  2602. const maxValue = row.maxValue != null ? parseFloat(row.maxValue) : null
  2603. if (minValue != null && maxValue != null) {
  2604. row.itemResult = (numValue >= minValue && numValue <= maxValue) ? 'Y' : 'N'
  2605. }
  2606. }
  2607. },
  2608. // 焦点跳转到下一个输入框
  2609. focusNextInput(currentIndex, fieldType) {
  2610. const nextIndex = currentIndex + 1
  2611. if (nextIndex < this.detailList.length) {
  2612. this.$nextTick(() => {
  2613. const ref = this.$refs[`${fieldType}${nextIndex}`]
  2614. if (ref) {
  2615. if (Array.isArray(ref)) {
  2616. ref[0].focus()
  2617. } else {
  2618. ref.focus()
  2619. }
  2620. }
  2621. })
  2622. }
  2623. },
  2624. // ======================== 项目操作相关方法 ========================
  2625. // 打开项目操作对话框
  2626. openItemOperationDialog() {
  2627. this.itemOperationQuery = {
  2628. itemNo: '',
  2629. itemDesc: '',
  2630. }
  2631. this.searchIPQCItems()
  2632. this.itemOperationDialogFlag = true
  2633. },
  2634. // 查询IPQC类型的检验项目
  2635. async searchIPQCItems() {
  2636. try {
  2637. const {data} = await getIPQCItemList({
  2638. site: this.detailData.site,
  2639. buNo: this.detailData.buNo,
  2640. inspectionNo: this.detailData.inspectionNo,
  2641. templateId: this.detailData.templateId,
  2642. itemNo: this.itemOperationQuery.itemNo,
  2643. itemDesc: this.itemOperationQuery.itemDesc,
  2644. })
  2645. if (data && data.code === 0) {
  2646. this.availableItemList = data.row1 || []
  2647. this.selectedItemList = data.row2 || []
  2648. } else {
  2649. this.$message.error(data.msg || '查询失败')
  2650. }
  2651. } catch (error) {
  2652. this.$message.error('查询失败,请检查')
  2653. }
  2654. },
  2655. // 重置查询条件
  2656. resetItemQuery() {
  2657. this.itemOperationQuery = {
  2658. itemNo: '',
  2659. itemDesc: '',
  2660. }
  2661. this.searchIPQCItems()
  2662. },
  2663. // 可选项目行点击
  2664. availableItemClickRow(row) {
  2665. this.$refs.availableItemTable.toggleRowSelection(row)
  2666. },
  2667. // 可选项目选择变化
  2668. availableItemSelectionChange(selection) {
  2669. this.availableItemSelections = selection
  2670. },
  2671. // 已有项目行点击
  2672. selectedItemClickRow(row) {
  2673. this.$refs.selectedItemTable.toggleRowSelection(row)
  2674. },
  2675. // 已有项目选择变化
  2676. selectedItemSelectionChange(selection) {
  2677. this.selectedItemSelections = selection
  2678. },
  2679. // 添加检验项目
  2680. async addInspectionItems() {
  2681. if (!this.availableItemSelections || this.availableItemSelections.length === 0) {
  2682. this.$message.warning('请选择可选项目!')
  2683. return
  2684. }
  2685. try {
  2686. const {data} = await addIPQCItemDetails({
  2687. site: this.detailData.site,
  2688. buNo: this.detailData.buNo,
  2689. inspectionNo: this.detailData.inspectionNo,
  2690. templateId: this.detailData.templateId,
  2691. orderNo: this.detailData.orderNo,
  2692. itemList: this.availableItemSelections,
  2693. })
  2694. if (data && data.code === 0) {
  2695. this.$message.success('添加成功')
  2696. this.searchIPQCItems()
  2697. this.availableItemSelections = []
  2698. } else {
  2699. this.$message.error(data.msg || '添加失败')
  2700. }
  2701. } catch (error) {
  2702. this.$message.error('添加失败,请检查')
  2703. }
  2704. },
  2705. // 删除检验项目
  2706. async deleteInspectionItems() {
  2707. if (!this.selectedItemSelections || this.selectedItemSelections.length === 0) {
  2708. this.$message.warning('请选择已有项目!')
  2709. return
  2710. }
  2711. this.$confirm('确定删除选中的检验项目吗?删除后将同时删除该项目的子明细数据。', '提示', {
  2712. confirmButtonText: '确定',
  2713. cancelButtonText: '取消',
  2714. type: 'warning'
  2715. }).then(async () => {
  2716. try {
  2717. const {data} = await deleteIPQCItemDetails({
  2718. site: this.detailData.site,
  2719. buNo: this.detailData.buNo,
  2720. inspectionNo: this.detailData.inspectionNo,
  2721. templateId: this.detailData.templateId,
  2722. itemList: this.selectedItemSelections,
  2723. })
  2724. if (data && data.code === 0) {
  2725. this.$message.success('删除成功')
  2726. this.searchIPQCItems()
  2727. this.selectedItemSelections = []
  2728. } else {
  2729. this.$message.error(data.msg || '删除失败')
  2730. }
  2731. } catch (error) {
  2732. this.$message.error('删除失败,请检查')
  2733. }
  2734. }).catch(() => {
  2735. this.$message.info('已取消删除')
  2736. })
  2737. },
  2738. // 刷新检验明细列表
  2739. refreshInspectionDetailList() {
  2740. if (this.detailInformationFlag) {
  2741. this.getInspectionFormData()
  2742. }
  2743. },
  2744. // ======================== 模板导入相关方法 ========================
  2745. // 打开模板导入对话框
  2746. openTemplateImportDialog() {
  2747. this.templateQuery = {
  2748. templateId: '',
  2749. templateDesc: '',
  2750. }
  2751. this.searchIPQCTemplates()
  2752. this.templateImportDialogFlag = true
  2753. },
  2754. // 查询IPQC检验模板
  2755. async searchIPQCTemplates() {
  2756. try {
  2757. const {data} = await getIPQCTemplateList({
  2758. site: this.detailData.site,
  2759. buNo: this.detailData.buNo,
  2760. templateId: this.templateQuery.templateId,
  2761. templateDesc: this.templateQuery.templateDesc,
  2762. })
  2763. if (data && data.code === 0) {
  2764. this.templateImportList = data.rows || []
  2765. } else {
  2766. this.$message.error(data.msg || '查询失败')
  2767. }
  2768. } catch (error) {
  2769. this.$message.error('查询失败,请检查')
  2770. }
  2771. },
  2772. // 重置模板查询条件
  2773. resetTemplateQuery() {
  2774. this.templateQuery = {
  2775. templateId: '',
  2776. templateDesc: '',
  2777. }
  2778. this.searchIPQCTemplates()
  2779. },
  2780. // 模板行点击
  2781. templateClickRow(row) {
  2782. this.$refs.templateTable.toggleRowSelection(row)
  2783. },
  2784. // 模板选择变化
  2785. templateSelectionChange(selection) {
  2786. this.templateSelections = selection
  2787. },
  2788. // 确认导入模板
  2789. async confirmImportTemplate() {
  2790. if (!this.templateSelections || this.templateSelections.length === 0) {
  2791. this.$message.warning('请选择要导入的模板!')
  2792. return
  2793. }
  2794. this.$confirm(`确定要导入选中的 ${this.templateSelections.length} 个模板吗?`, '提示', {
  2795. confirmButtonText: '确定',
  2796. cancelButtonText: '取消',
  2797. type: 'warning'
  2798. }).then(async () => {
  2799. this.importLoading = true
  2800. try {
  2801. const {data} = await importIPQCTemplateItems({
  2802. site: this.detailData.site,
  2803. buNo: this.detailData.buNo,
  2804. inspectionNo: this.detailData.inspectionNo,
  2805. orderNo: this.detailData.orderNo,
  2806. templateList: this.templateSelections.map(t => ({
  2807. templateId: t.templateId,
  2808. templateName: t.templateName
  2809. }))
  2810. })
  2811. if (data && data.code === 0) {
  2812. this.$message.success(`导入成功!共导入 ${data.importCount || 0} 个检验项目`)
  2813. this.templateImportDialogFlag = false
  2814. this.templateSelections = []
  2815. // 刷新检验明细列表
  2816. this.getInspectionFormData()
  2817. } else {
  2818. this.$message.error(data.msg || '导入失败')
  2819. }
  2820. } catch (error) {
  2821. this.$message.error('导入失败,请检查')
  2822. } finally {
  2823. this.importLoading = false
  2824. }
  2825. }).catch(() => {
  2826. this.$message.info('已取消导入')
  2827. })
  2828. },
  2829. // 关闭弹窗
  2830. handleClose() {
  2831. this.$emit('update:visible', false)
  2832. }
  2833. }
  2834. }
  2835. </script>
  2836. <style scoped>
  2837. .process-inspection {
  2838. }
  2839. .demo-form-inline .el-form-item {
  2840. margin-bottom: 10px;
  2841. }
  2842. /* ==================== 检验单对话框样式 ==================== */
  2843. /deep/ .ipqc-inspection-dialog .el-dialog__header {
  2844. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  2845. padding: 20px 24px;
  2846. border-radius: 8px 8px 0 0;
  2847. }
  2848. /deep/ .ipqc-inspection-dialog .el-dialog__title {
  2849. color: #ffffff;
  2850. font-size: 18px;
  2851. font-weight: 600;
  2852. letter-spacing: 0.5px;
  2853. }
  2854. /deep/ .ipqc-inspection-dialog .el-dialog__headerbtn .el-dialog__close {
  2855. color: #ffffff;
  2856. font-size: 20px;
  2857. }
  2858. /deep/ .ipqc-inspection-dialog .el-dialog__body {
  2859. padding: 0;
  2860. background: #f5f7fa;
  2861. }
  2862. /* 单据信息卡片 */
  2863. .inspection-info-card {
  2864. background: #ffffff;
  2865. padding: 0px 0px;
  2866. }
  2867. .info-section {
  2868. margin-bottom: 0;
  2869. background: #f9fafb;
  2870. border-radius: 6px;
  2871. padding: 12px;
  2872. border: 1px solid #e8eaed;
  2873. transition: all 0.3s ease;
  2874. }
  2875. .info-section:hover {
  2876. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  2877. border-color: #d0d4d9;
  2878. }
  2879. .info-section:last-child {
  2880. margin-bottom: 0;
  2881. }
  2882. .section-title {
  2883. display: flex;
  2884. align-items: center;
  2885. margin-bottom: 12px;
  2886. padding-bottom: 8px;
  2887. border-bottom: 2px solid #e8eaed;
  2888. font-size: 14px;
  2889. font-weight: 600;
  2890. color: #303133;
  2891. }
  2892. .section-title i {
  2893. font-size: 18px;
  2894. margin-right: 8px;
  2895. color: #667eea;
  2896. }
  2897. .info-row {
  2898. margin-bottom: 0 !important;
  2899. }
  2900. .info-item {
  2901. margin-bottom: 0;
  2902. }
  2903. .info-item label {
  2904. display: block;
  2905. margin-bottom: 6px;
  2906. font-size: 12px;
  2907. font-weight: 500;
  2908. color: #606266;
  2909. }
  2910. .info-item label a {
  2911. color: #409eff;
  2912. text-decoration: none;
  2913. transition: color 0.3s;
  2914. }
  2915. .info-item label a:hover {
  2916. color: #66b1ff;
  2917. text-decoration: underline;
  2918. }
  2919. .info-item /deep/ .el-input--small .el-input__inner,
  2920. .info-item /deep/ .el-input-number--small .el-input__inner {
  2921. border-radius: 4px;
  2922. border: 1px solid #dcdfe6;
  2923. transition: all 0.3s;
  2924. }
  2925. .info-item /deep/ .el-input--small .el-input__inner:focus,
  2926. .info-item /deep/ .el-input-number--small .el-input__inner:focus {
  2927. border-color: #667eea;
  2928. box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
  2929. }
  2930. .info-item /deep/ .el-select {
  2931. width: 100%;
  2932. }
  2933. /* 操作按钮区域 */
  2934. .action-buttons {
  2935. display: flex;
  2936. justify-content: space-between;
  2937. align-items: center;
  2938. padding: 10px 12px;
  2939. background: #ffffff;
  2940. border-radius: 6px;
  2941. border: 1px solid #e8eaed;
  2942. margin-top: 10px;
  2943. }
  2944. .left-actions,
  2945. .right-actions {
  2946. display: flex;
  2947. gap: 10px;
  2948. }
  2949. .action-buttons .el-button {
  2950. border-radius: 6px;
  2951. font-weight: 500;
  2952. transition: all 0.3s ease;
  2953. }
  2954. .action-buttons .el-button:hover {
  2955. transform: translateY(-2px);
  2956. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  2957. }
  2958. /* 检验项目列表 */
  2959. .inspection-table-wrapper {
  2960. background: #ffffff;
  2961. padding: 0px 0px;
  2962. }
  2963. .table-header {
  2964. display: flex;
  2965. align-items: center;
  2966. justify-content: space-between;
  2967. margin-bottom: 10px;
  2968. margin-top: 10px;
  2969. border-bottom: 2px solid #e8eaed;
  2970. }
  2971. .table-title {
  2972. font-size: 15px;
  2973. font-weight: 600;
  2974. color: #303133;
  2975. display: flex;
  2976. align-items: center;
  2977. }
  2978. .table-title i {
  2979. font-size: 18px;
  2980. margin-right: 8px;
  2981. color: #667eea;
  2982. }
  2983. .inspection-table {
  2984. border-radius: 8px;
  2985. overflow: hidden;
  2986. }
  2987. .inspection-table /deep/ .el-table__header-wrapper th {
  2988. background: linear-gradient(135deg, #f5f7fa 0%, #e8eaed 100%);
  2989. color: #606266;
  2990. font-weight: 500;
  2991. }
  2992. /* 底部操作按钮 */
  2993. .dialog-footer {
  2994. display: flex;
  2995. justify-content: center;
  2996. align-items: center;
  2997. gap: 12px;
  2998. padding: 12px 16px;
  2999. background: #ffffff;
  3000. }
  3001. .dialog-footer .el-button {
  3002. min-width: 100px;
  3003. border-radius: 6px;
  3004. font-weight: 500;
  3005. transition: all 0.3s ease;
  3006. }
  3007. .dialog-footer .el-button:hover {
  3008. transform: translateY(-2px);
  3009. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  3010. }
  3011. .dialog-footer .el-button--success {
  3012. background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  3013. border: none;
  3014. }
  3015. .dialog-footer .el-button--success:hover {
  3016. background: linear-gradient(135deg, #15b39d 0%, #4af58e 100%);
  3017. }
  3018. /* 项目检验结论颜色 */
  3019. /deep/ .redElSelect .el-input--suffix .el-input__inner {
  3020. color: red;
  3021. font-weight: bold;
  3022. }
  3023. /deep/ .greenElSelect .el-input--suffix .el-input__inner {
  3024. color: rgb(103,194,58);
  3025. font-weight: bold;
  3026. }
  3027. /* 表格单元格高度修复 */
  3028. .inspection-table /deep/ .cell {
  3029. height: auto;
  3030. line-height: 1.5;
  3031. }
  3032. .inspection-table /deep/ .el-table__body-wrapper .el-table__row {
  3033. transition: all 0.3s ease;
  3034. }
  3035. .inspection-table /deep/ .el-table__body-wrapper .el-table__row:hover {
  3036. background: #f5f7fa;
  3037. }
  3038. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped {
  3039. background: #fafbfc;
  3040. }
  3041. .inspection-table /deep/ .el-table__body-wrapper .el-table__row.el-table__row--striped:hover {
  3042. background: #f0f2f5;
  3043. }
  3044. .inspection-table /deep/ .el-button--mini {
  3045. padding: 7px 10px;
  3046. border-radius: 4px;
  3047. font-size: 12px;
  3048. }
  3049. .inspection-table /deep/ .el-table__header-wrapper th {
  3050. background: linear-gradient(135deg, #f5f7fa 0%, #e8eaed 100%);
  3051. color: #303133;
  3052. font-weight: 600;
  3053. font-size: 13px;
  3054. padding: 12px 0;
  3055. }
  3056. /* ==================== 项目操作对话框样式 ==================== */
  3057. /deep/ .item-operation-dialog {
  3058. border-radius: 8px;
  3059. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  3060. }
  3061. /deep/ .item-operation-dialog .el-dialog__header {
  3062. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3063. padding: 20px 24px;
  3064. border-radius: 8px 8px 0 0;
  3065. }
  3066. /deep/ .item-operation-dialog .el-dialog__title {
  3067. color: #ffffff;
  3068. font-size: 16px;
  3069. font-weight: 600;
  3070. letter-spacing: 0.5px;
  3071. }
  3072. /deep/ .item-operation-dialog .el-dialog__headerbtn .el-dialog__close {
  3073. color: #ffffff;
  3074. font-size: 20px;
  3075. font-weight: bold;
  3076. }
  3077. /deep/ .item-operation-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  3078. color: #f0f0f0;
  3079. }
  3080. /deep/ .item-operation-dialog .el-dialog__body {
  3081. padding: 24px;
  3082. background: #f8f9fa;
  3083. }
  3084. /* 查询区域样式 */
  3085. .search-container {
  3086. background: #ffffff;
  3087. padding: 16px 20px;
  3088. border-radius: 6px;
  3089. margin-bottom: 20px;
  3090. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3091. }
  3092. .search-container .el-form-item {
  3093. margin-bottom: 0;
  3094. }
  3095. .search-container .el-form-item__label {
  3096. font-weight: 500;
  3097. color: #606266;
  3098. }
  3099. /* 主内容区域 */
  3100. .item-operation-content {
  3101. display: flex;
  3102. gap: 16px;
  3103. align-items: stretch;
  3104. }
  3105. /* 项目面板 */
  3106. .item-panel {
  3107. flex: 1;
  3108. background: #ffffff;
  3109. border-radius: 6px;
  3110. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3111. overflow: hidden;
  3112. transition: all 0.3s ease;
  3113. }
  3114. .item-panel:hover {
  3115. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  3116. }
  3117. .available-panel {
  3118. flex: 1.5;
  3119. }
  3120. .selected-panel {
  3121. flex: 1;
  3122. }
  3123. /* 面板头部 */
  3124. .panel-header {
  3125. padding: 8px 16px;
  3126. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3127. border-bottom: 2px solid #9ac3d0;
  3128. display: flex;
  3129. align-items: center;
  3130. gap: 8px;
  3131. }
  3132. .panel-header i {
  3133. font-size: 18px;
  3134. color: #ffffff;
  3135. }
  3136. .panel-title {
  3137. font-size: 14px;
  3138. font-weight: 600;
  3139. color: #ffffff;
  3140. letter-spacing: 0.5px;
  3141. }
  3142. .item-count {
  3143. margin-left: auto;
  3144. font-size: 12px;
  3145. color: #ffffff;
  3146. background: rgba(255, 255, 255, 0.25);
  3147. padding: 2px 10px;
  3148. border-radius: 12px;
  3149. font-weight: 500;
  3150. }
  3151. /* 表格样式优化 */
  3152. .operation-table {
  3153. border: none !important;
  3154. }
  3155. .operation-table /deep/ .el-table__body tr:hover > td {
  3156. background-color: #f0f7ff !important;
  3157. }
  3158. .operation-table /deep/ .el-table__row.current-row > td {
  3159. background-color: #e6f2ff !important;
  3160. }
  3161. .operation-table /deep/ td {
  3162. border-bottom: 1px solid #f0f0f0;
  3163. }
  3164. .operation-table /deep/ .el-table__body {
  3165. font-size: 13px;
  3166. }
  3167. /* 操作按钮区域 */
  3168. .operation-buttons {
  3169. display: flex;
  3170. flex-direction: column;
  3171. justify-content: center;
  3172. align-items: center;
  3173. gap: 20px;
  3174. padding: 0 8px;
  3175. }
  3176. .operation-buttons .el-button {
  3177. width: 48px;
  3178. height: 48px;
  3179. font-size: 20px;
  3180. transition: all 0.3s ease;
  3181. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  3182. }
  3183. .operation-buttons .el-button:hover {
  3184. transform: scale(1.1);
  3185. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  3186. }
  3187. .operation-buttons .el-button.is-disabled {
  3188. opacity: 0.4;
  3189. cursor: not-allowed;
  3190. }
  3191. .operation-buttons .el-button--primary {
  3192. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  3193. border: none;
  3194. }
  3195. .operation-buttons .el-button--danger {
  3196. background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  3197. border: none;
  3198. }
  3199. /* ==================== 模板导入对话框样式 ==================== */
  3200. /deep/ .template-import-dialog {
  3201. border-radius: 8px;
  3202. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  3203. }
  3204. /deep/ .template-import-dialog .el-dialog__header {
  3205. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3206. padding: 20px 24px;
  3207. border-radius: 8px 8px 0 0;
  3208. }
  3209. /deep/ .template-import-dialog .el-dialog__title {
  3210. color: #ffffff;
  3211. font-size: 16px;
  3212. font-weight: 600;
  3213. letter-spacing: 0.5px;
  3214. }
  3215. /deep/ .template-import-dialog .el-dialog__headerbtn .el-dialog__close {
  3216. color: #ffffff;
  3217. font-size: 20px;
  3218. font-weight: bold;
  3219. }
  3220. /deep/ .template-import-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  3221. color: #f0f0f0;
  3222. }
  3223. /deep/ .template-import-dialog .el-dialog__body {
  3224. padding: 24px;
  3225. background: #f8f9fa;
  3226. }
  3227. /* 模板列表容器 */
  3228. .template-list-container {
  3229. background: #ffffff;
  3230. border-radius: 6px;
  3231. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3232. overflow: hidden;
  3233. transition: all 0.3s ease;
  3234. }
  3235. .template-list-container:hover {
  3236. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  3237. }
  3238. /* 模板表格 */
  3239. .template-table {
  3240. border: none !important;
  3241. }
  3242. .template-table /deep/ .el-table__body tr:hover > td {
  3243. background-color: #f0f7ff !important;
  3244. }
  3245. .template-table /deep/ .el-table__row.current-row > td {
  3246. background-color: #e6f2ff !important;
  3247. }
  3248. .template-table /deep/ td {
  3249. border-bottom: 1px solid #f0f0f0;
  3250. }
  3251. .template-table /deep/ .el-table__body {
  3252. font-size: 13px;
  3253. }
  3254. </style>