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.

3978 lines
138 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
5 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-card :class="['search-card', { 'collapsed': !searchExpanded }]" shadow="hover">
  5. <div slot="header" class="search-header">
  6. <div class="header-left">
  7. <i class="el-icon-search"></i>
  8. <span class="header-title">Search</span>
  9. </div>
  10. <div class="header-right">
  11. <el-button
  12. type="text"
  13. size="small"
  14. @click="toggleSearchExpand"
  15. class="collapse-btn">
  16. <i :class="searchExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
  17. {{ searchExpanded ? '收起' : '展开' }}
  18. </el-button>
  19. </div>
  20. </div>
  21. <el-form
  22. :model="searchData"
  23. label-width="90px"
  24. class="search-form"
  25. @keyup.enter.native="getDataList">
  26. <!-- 所有查询条件 - 可展开/收起 -->
  27. <template v-if="searchExpanded">
  28. <!-- 第一行 -->
  29. <el-row :gutter="20">
  30. <el-col :span="6">
  31. <el-form-item label="BU">
  32. <el-select v-model="searchData.buDesc" placeholder="请选择BU" clearable>
  33. <el-option
  34. v-for="i in userBuList"
  35. :key="i.buNo"
  36. :label="i.buDesc"
  37. :value="i.buDesc">
  38. </el-option>
  39. </el-select>
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="6">
  43. <el-form-item label="检验单号">
  44. <el-input
  45. v-model="searchData.inspectionNo"
  46. placeholder="请输入检验单号"
  47. clearable
  48. prefix-icon="el-icon-document">
  49. </el-input>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="6">
  53. <el-form-item label="物料编码">
  54. <el-input
  55. v-model="searchData.partNo"
  56. placeholder="请输入物料编码"
  57. clearable
  58. prefix-icon="el-icon-goods">
  59. </el-input>
  60. </el-form-item>
  61. </el-col>
  62. <el-col :span="6">
  63. <el-form-item label="物料名称">
  64. <el-input
  65. v-model="searchData.partDesc"
  66. placeholder="请输入物料名称"
  67. clearable>
  68. </el-input>
  69. </el-form-item>
  70. </el-col>
  71. </el-row>
  72. <!-- 第二行 -->
  73. <el-row :gutter="20">
  74. <el-col :span="6">
  75. <el-form-item label="质检员">
  76. <el-input
  77. v-model="searchData.inspectorName"
  78. placeholder="请输入质检员姓名"
  79. clearable
  80. prefix-icon="el-icon-user">
  81. </el-input>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="6">
  85. <el-form-item label="客户编码">
  86. <el-input
  87. v-model="searchData.customerNo"
  88. placeholder="请输入客户编码"
  89. clearable>
  90. </el-input>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="6">
  94. <el-form-item label="客户名称">
  95. <el-input
  96. v-model="searchData.customerName"
  97. placeholder="请输入客户名称"
  98. clearable>
  99. </el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="6">
  103. <el-form-item label="检验结论">
  104. <el-select v-model="searchData.inspectionResult" placeholder="请选择" clearable>
  105. <el-option label="合格" value="合格">
  106. <span style="color: #67C23A"> 合格</span>
  107. </el-option>
  108. <el-option label="不合格" value="不合格">
  109. <span style="color: #F56C6C"> 不合格</span>
  110. </el-option>
  111. <el-option label="免检" value="免检">
  112. <span style="color: #909399"> 免检</span>
  113. </el-option>
  114. </el-select>
  115. </el-form-item>
  116. </el-col>
  117. </el-row>
  118. <el-row :gutter="20">
  119. <el-col :span="5">
  120. <el-form-item label="处置措施">
  121. <el-select v-model="searchData.disposalMeasures" placeholder="请选择" clearable>
  122. <el-option
  123. v-for="i in disposalMeasuresOptions"
  124. :key="i.id"
  125. :label="i.disposalMeasures"
  126. :value="i.disposalMeasures">
  127. </el-option>
  128. </el-select>
  129. </el-form-item>
  130. </el-col>
  131. <el-col :span="7">
  132. <el-form-item label="状态">
  133. <el-select
  134. v-model="searchData.states"
  135. multiple
  136. collapse-tags
  137. placeholder="请选择状态"
  138. class="status-select">
  139. <el-option label="未开始" value="未开始"></el-option>
  140. <el-option label="待检验" value="待检验"></el-option>
  141. <el-option label="待审核" value="待审核"></el-option>
  142. <el-option label="已完成" value="已完成"></el-option>
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="6">
  147. <el-form-item label="送检日期">
  148. <el-date-picker
  149. v-model="searchData.startDate2"
  150. type="date"
  151. value-format='yyyy-MM-dd'
  152. format='yyyy-MM-dd'
  153. placeholder="开始日期"
  154. style="width: 45%">
  155. </el-date-picker>
  156. <span style="color: #DCDFE6;">~</span>
  157. <el-date-picker
  158. v-model="searchData.endDate2"
  159. type="date"
  160. value-format='yyyy-MM-dd'
  161. format='yyyy-MM-dd'
  162. placeholder="结束日期"
  163. style="width: 45%">
  164. </el-date-picker>
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="6">
  168. <el-form-item label="检验日期">
  169. <el-date-picker
  170. v-model="searchData.startDate"
  171. type="date"
  172. value-format='yyyy-MM-dd'
  173. format='yyyy-MM-dd'
  174. placeholder="开始日期"
  175. style="width: 45%">
  176. </el-date-picker>
  177. <span style="color: #DCDFE6;">~</span>
  178. <el-date-picker
  179. v-model="searchData.endDate"
  180. type="date"
  181. value-format='yyyy-MM-dd'
  182. format='yyyy-MM-dd'
  183. placeholder="结束日期"
  184. style="width: 45%">
  185. </el-date-picker>
  186. </el-form-item>
  187. </el-col>
  188. </el-row>
  189. </template>
  190. <!-- 操作按钮区域 -->
  191. <el-row :gutter="20">
  192. <el-col :span="24">
  193. <div class="search-actions">
  194. <div class="action-left">
  195. <el-button
  196. v-if="!authSearch"
  197. type="primary"
  198. icon="el-icon-search"
  199. @click="getDataList">
  200. 查询
  201. </el-button>
  202. <el-button
  203. icon="el-icon-refresh-left"
  204. @click="resetSearch">
  205. 重置
  206. </el-button>
  207. </div>
  208. <div class="action-right">
  209. <el-button
  210. v-if="!authCheck"
  211. type="success"
  212. icon="el-icon-check"
  213. @click="submitResult">
  214. 审核
  215. </el-button>
  216. <el-button
  217. v-if="!authDelete"
  218. type="danger"
  219. icon="el-icon-delete"
  220. @click="deleteModal">
  221. 删除
  222. </el-button>
  223. <el-button
  224. v-if="!authOverLoad"
  225. type="warning"
  226. icon="el-icon-refresh"
  227. :loading="overLoading"
  228. @click="overLoadModal">
  229. 任务重载
  230. </el-button>
  231. <download-excel
  232. :fields="fields()"
  233. :data="exportData"
  234. type="xls"
  235. :name="exportName"
  236. :header="exportHeader"
  237. :footer="exportFooter"
  238. :fetch="createExportData"
  239. :before-generate="startDownload"
  240. :before-finish="finishDownload"
  241. worksheet="导出信息"
  242. class="el-button el-button--primary el-button--medium">
  243. <i class="el-icon-download"></i>
  244. 导出
  245. </download-excel>
  246. </div>
  247. </div>
  248. </el-col>
  249. </el-row>
  250. </el-form>
  251. </el-card>
  252. <!-- 检验记录展示列表 -->
  253. <el-table
  254. :height="height"
  255. :data="dataList"
  256. border
  257. ref="OQCTable"
  258. show-summary
  259. :summary-method="getSummaries"
  260. @row-click="FQASClickRow"
  261. @selection-change="selectionFQAS"
  262. style="width: 100%;">
  263. <el-table-column
  264. type="selection"
  265. header-align="center"
  266. align="center"
  267. width="50">
  268. </el-table-column>
  269. <el-table-column
  270. prop="state"
  271. header-align="center"
  272. align="center"
  273. label="状态">
  274. <template slot-scope="scope">
  275. <div :style="{fontWeight:'bold', color: scope.row.state === '待检验' ? 'red' : scope.row.state === '待审核' ? '#ffa500e0' : scope.row.state === '已完成' ? '#3ac252' : ''}">
  276. {{ scope.row.state }}
  277. </div>
  278. </template>
  279. </el-table-column>
  280. <el-table-column
  281. v-for="(item,index) in columnList1" :key="index"
  282. :sortable="item.columnSortable"
  283. :prop="item.columnProp"
  284. :header-align="item.headerAlign"
  285. :show-overflow-tooltip="item.showOverflowTooltip"
  286. :align="item.align"
  287. :fixed="item.fixed===''?false:item.fixed"
  288. :min-width="item.columnWidth"
  289. :label="item.columnLabel">
  290. <template slot-scope="scope">
  291. <div v-if="item.columnProp === 'inspectionResult' && scope.row.inspectionResult === '不合格' && scope.row.disposalMeasures === '拒收退回'">
  292. <span v-if="!item.columnHidden" style="color: red"> {{ scope.row[item.columnProp] }}</span>
  293. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  294. </div>
  295. <div v-else>
  296. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  297. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  298. </div>
  299. </template>
  300. </el-table-column>
  301. <el-table-column
  302. fixed="right"
  303. header-align="center"
  304. align="center"
  305. width="100"
  306. label="操作">
  307. <template slot-scope="scope">
  308. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  309. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  310. <el-dropdown trigger="click">
  311. <el-link style="cursor: pointer;font-size: 12px">更多</el-link>
  312. <el-dropdown-menu slot="dropdown">
  313. <el-dropdown-item v-if="!authFile" @click.native="getFileContentData(scope.row)">工作文件</el-dropdown-item>
  314. <el-dropdown-item v-if="!authChange && scope.row.state === '待检验'" @click.native="changeInspectionModal(scope.row)">更改检验方式</el-dropdown-item>
  315. </el-dropdown-menu>
  316. </el-dropdown>
  317. </template>
  318. </el-table-column>
  319. </el-table>
  320. <!-- 分页-->
  321. <el-pagination
  322. style="margin-top: 0px"
  323. @size-change="sizeChangeHandle"
  324. @current-change="currentChangeHandle"
  325. :current-page="pageIndex"
  326. :page-sizes="[20, 50, 100, 200, 500]"
  327. :page-size="pageSize"
  328. :total="totalPage"
  329. layout="total, sizes, prev, pager, next, jumper">
  330. </el-pagination>
  331. <!-- 检验单详情页 -->
  332. <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
  333. <el-form :inline="true" label-position="top">
  334. <el-form-item :label="'物料编码'">
  335. <el-input v-model="detailData.partNo" disabled style="width: 120px"></el-input>
  336. </el-form-item>
  337. <el-form-item :label="'物料名称'">
  338. <el-input v-model="detailData.partDesc" disabled style="width: 220px"></el-input>
  339. </el-form-item>
  340. <el-form-item :label="'计量单位'">
  341. <el-input v-model="detailData.umId" disabled style="width: 80px"></el-input>
  342. </el-form-item>
  343. <el-form-item :label="'发货数量'">
  344. <el-input class="inlineNumber numInput" v-model="detailData.rollQty" type="number" disabled style="width: 72px"></el-input>
  345. </el-form-item>
  346. <el-form-item :label="'送检数量'">
  347. <el-input class="inlineNumber numInput" v-model="detailData.rollCount" type="number" style="width: 72px"></el-input>
  348. </el-form-item>
  349. <el-form-item :label="'抽样数量'">
  350. <el-input class="inlineNumber numInput" v-model="detailData.samplingQty" type="number" style="width: 72px"></el-input>
  351. </el-form-item>
  352. <el-form-item :label="'不合格项目数量'">
  353. <el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled type="number" style="width: 85px"></el-input>
  354. <el-input class="inlineNumber numInput" v-else @input="handleInput(detailData.unqualifiedQty,1)" v-model="detailData.unqualifiedQty" type="number" style="width: 85px"></el-input>
  355. </el-form-item>
  356. <el-form-item :label="'合格数量'">
  357. <el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled type="number" style="width: 72px"></el-input>
  358. <el-input class="inlineNumber numInput" v-else @input="handleInput(detailData.passQty,2)" v-model="detailData.passQty" type="number" style="width: 72px"></el-input>
  359. </el-form-item>
  360. <el-form-item :label="'不合格数量'">
  361. <el-input class="inlineNumber numInput" v-model="detailData.notPassQty" type="number" disabled style="width: 72px"></el-input>
  362. </el-form-item>
  363. <el-form-item :label="' '">
  364. <el-button type="primary" @click="getFileContentData(detailData)">工作文件</el-button>
  365. </el-form-item>
  366. <el-form-item :label="' '">
  367. <el-button type="primary" icon="el-icon-upload" @click="subDetailUpload">明细导入</el-button>
  368. </el-form-item>
  369. </el-form>
  370. <el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;">
  371. <el-form-item :label="'检验结论'">
  372. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
  373. <el-option label="合格" value="合格"></el-option>
  374. <el-option label="不合格" value="不合格"></el-option>
  375. </el-select>
  376. <el-select v-else v-model="detailData.inspectionResult" @change="resultChange" style="width: 100px" placeholder="请选择">
  377. <el-option label="合格" value="合格"></el-option>
  378. <el-option label="不合格" value="不合格"></el-option>
  379. </el-select>
  380. </el-form-item>
  381. <el-form-item :label="'质检备注'">
  382. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 310px"></el-input>
  383. <el-input v-else v-model="detailData.inspectionRemark" style="width: 310px"></el-input>
  384. </el-form-item>
  385. <el-form-item>
  386. <span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span>
  387. <span v-else style="cursor: pointer" slot="label" @click="getOperatorList"><a>协同人员</a></span>
  388. <el-input v-model="detailData.operatorName" readonly style="width: 224px"></el-input>
  389. </el-form-item>
  390. <el-form-item>
  391. <span v-if="detailData.submitFlag === 'Y'" slot="label">责任人(供应商)</span>
  392. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(509)" ><a>责任人(供应商)</a></span>
  393. <el-input v-model="detailData.responsiblePerson" :readonly="detailData.submitFlag === 'Y'" style="width: 224px"></el-input>
  394. <!-- <span v-if="detailData.submitFlag === 'Y'" slot="label">责任人</span>-->
  395. <!-- <span v-else style="cursor: pointer" slot="label" @click="getResponsiblePersonList"><a>责任人</a></span>-->
  396. <!-- <el-input v-model="detailData.responsiblePersonName" readonly style="width: 224px"></el-input>-->
  397. </el-form-item>
  398. <el-form-item :label="' '" style="margin-left: 31px; margin-top: -10px">
  399. <el-button class="operation-btn item-operation-btn" @click="openItemOperationDialog">
  400. <i class="el-icon-setting"></i>
  401. <span>项目导入</span>
  402. </el-button>
  403. <el-button class="operation-btn template-import-btn" @click="openTemplateImportDialog">
  404. <i class="el-icon-download"></i>
  405. <span>模板导入</span>
  406. </el-button>
  407. </el-form-item>
  408. </el-form>
  409. <el-form v-show="detailData.inspectionResult === '不合格'" :inline="true" label-position="top">
  410. <el-form-item :label="'处置措施'">
  411. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px">
  412. <el-option
  413. v-for = "i in disposalMeasuresOptions"
  414. :key = "i.id"
  415. :label = "i.disposalMeasures"
  416. :value = "i.disposalMeasures">
  417. </el-option>
  418. </el-select>
  419. <el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px">
  420. <el-option
  421. v-for = "i in disposalMeasuresOptions"
  422. :key = "i.id"
  423. :label = "i.disposalMeasures"
  424. :value = "i.disposalMeasures">
  425. </el-option>
  426. </el-select>
  427. </el-form-item>
  428. <el-form-item :label="'处置说明'">
  429. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 200px"></el-input>
  430. <el-input v-else v-model="detailData.disposalRemark" style="width: 280px"></el-input>
  431. </el-form-item>
  432. </el-form>
  433. <!-- 展示列表 -->
  434. <div class="rq ">
  435. <el-table
  436. :height="500"
  437. :data="detailList"
  438. border
  439. :row-style="rowDetailStyle"
  440. @row-click="OQCDetailClickRow"
  441. style="width: 100%;">
  442. <el-table-column
  443. prop=""
  444. header-align="center"
  445. align="center"
  446. min-width="60"
  447. label="操作">
  448. <template slot-scope="scope">
  449. <el-button v-if="scope.row.detailImageNum > 0" type="success" class="el-icon-picture" @click="uploadImageModal(scope.row)"></el-button>
  450. <el-button v-else class="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button>
  451. </template>
  452. </el-table-column>
  453. <el-table-column
  454. v-for="(item,index) in detailColumnList" :key="index"
  455. :sortable="item.columnSortable"
  456. :prop="item.columnProp"
  457. :header-align="item.headerAlign"
  458. :show-overflow-tooltip="item.showOverflowTooltip"
  459. :align="item.align"
  460. :fixed="item.fixed===''?false:item.fixed"
  461. :min-width="item.columnWidth"
  462. :label="item.columnLabel">
  463. <template slot-scope="scope">
  464. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  465. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  466. </template>
  467. </el-table-column>
  468. <el-table-column
  469. prop=""
  470. header-align="center"
  471. align="right"
  472. min-width="80"
  473. label="实测值">
  474. <template slot-scope="scope">
  475. <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" style="height: 11px; width: 98%"></el-input>
  476. <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>
  477. </template>
  478. </el-table-column>
  479. <el-table-column
  480. prop=""
  481. header-align="center"
  482. align="center"
  483. min-width="80"
  484. label="检验明细">
  485. <template slot-scope="scope">
  486. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button>
  487. <el-button v-else type="primary" @click="subDetailModal(scope.row)">点击输入</el-button>
  488. </template>
  489. </el-table-column>
  490. <el-table-column
  491. prop=""
  492. header-align="center"
  493. align="right"
  494. min-width="80"
  495. label="抽样数量">
  496. <template slot-scope="scope">
  497. <el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled type="number" style="height: 11px; width: 98%"></el-input>
  498. <el-input class="inlineNumber numInput" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input>
  499. </template>
  500. </el-table-column>
  501. <el-table-column
  502. prop=""
  503. header-align="center"
  504. align="right"
  505. min-width="80"
  506. label="不合格数量">
  507. <template slot-scope="scope">
  508. <el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled type="number" style="height: 11px; width: 98%"></el-input>
  509. <el-input class="inlineNumber numInput" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input>
  510. </template>
  511. </el-table-column>
  512. <el-table-column
  513. prop=""
  514. header-align="center"
  515. align="right"
  516. min-width="90"
  517. label="项目检验结论">
  518. <template slot-scope="scope">
  519. <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" >
  520. <el-option label="合格" value="Y" style="color: green"></el-option>
  521. <el-option label="不合格" value="N" style="color: red"></el-option>
  522. </el-select>
  523. <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="合格">
  524. <el-option label="合格" value="Y" style="color: green"></el-option>
  525. <el-option label="不合格" value="N" style="color: red"></el-option>
  526. </el-select>
  527. </template>
  528. </el-table-column>
  529. </el-table>
  530. </div>
  531. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  532. <el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
  533. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
  534. <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
  535. </el-footer>
  536. </el-dialog>
  537. <!-- 文件清单 -->
  538. <el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
  539. <el-form :inline="true" label-position="top">
  540. <el-form-item v-if="detailInformationFlag">
  541. <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>
  542. </el-form-item>
  543. </el-form>
  544. <el-table
  545. :height="350"
  546. :data="fileContentList"
  547. border
  548. style="width: 100%; ">
  549. <el-table-column
  550. v-for="(item,index) in fileColumnList" :key="index"
  551. :sortable="item.columnSortable"
  552. :prop="item.columnProp"
  553. :header-align="item.headerAlign"
  554. :show-overflow-tooltip="item.showOverflowTooltip"
  555. :align="item.align"
  556. :fixed="item.fixed===''?false:item.fixed"
  557. :min-width="item.columnWidth"
  558. :label="item.columnLabel">
  559. <template slot-scope="scope">
  560. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  561. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  562. </template>
  563. </el-table-column>
  564. <el-table-column
  565. fixed="right"
  566. header-align="center"
  567. align="center"
  568. width="100"
  569. label="操作">
  570. <template slot-scope="scope">
  571. <el-link style="cursor: pointer" @click="downloadFile(scope.row)">下载</el-link>
  572. <el-link style="cursor:pointer" @click="previewFile(scope.row)">预览</el-link>
  573. <el-link v-if="scope.row.fileType2 !== 'sop'" style="cursor: pointer" @click="deleteFile(scope.row)">删除</el-link>
  574. </template>
  575. </el-table-column>
  576. </el-table>
  577. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  578. <el-button type="primary" @click="fileFlag=false">关闭</el-button>
  579. </el-footer>
  580. </el-dialog>
  581. <!-- 子明细信息 -->
  582. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="572px">
  583. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  584. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  585. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  586. <div class="rq ">
  587. <el-table
  588. :height="400"
  589. :data="templateTableData"
  590. border
  591. :row-class-name="rowClassName"
  592. @selection-change="handleDetailSelectionChange"
  593. style="width: 100%;">
  594. <el-table-column type="selection" align="center" width="50"></el-table-column>
  595. <el-table-column label="序号" align="center" prop="rowI" width="50"></el-table-column>
  596. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
  597. <template slot-scope="{row}">
  598. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  599. <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
  600. </template>
  601. </el-table-column>
  602. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
  603. <template slot-scope="{row}">
  604. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  605. <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
  606. </template>
  607. </el-table-column>
  608. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="200">
  609. <template slot-scope="{row}">
  610. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
  611. <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
  612. </template>
  613. </el-table-column>
  614. <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
  615. <template slot-scope="{row}">
  616. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
  617. <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
  618. </template>
  619. </el-table-column>
  620. <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
  621. <template slot-scope="{row}">
  622. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
  623. <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
  624. </template>
  625. </el-table-column>
  626. <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
  627. <template slot-scope="{row}">
  628. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
  629. <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
  630. </template>
  631. </el-table-column>
  632. <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
  633. <template slot-scope="{row}">
  634. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
  635. <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
  636. </template>
  637. </el-table-column>
  638. </el-table>
  639. <!-- 分页-->
  640. <el-pagination
  641. @size-change="sizeChangeHandle2"
  642. @current-change="currentChangeHandle2"
  643. :current-page="pageIndex2"
  644. :page-sizes="[20, 50, 100, 200, 500]"
  645. :page-size="pageSize2"
  646. :total="tableData.length"
  647. layout="total, sizes, prev, pager, next, jumper">
  648. </el-pagination>
  649. </div>
  650. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  651. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
  652. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  653. </el-footer>
  654. </el-dialog>
  655. <!-- 批量新增子明细操作-->
  656. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  657. <el-form :inline="true" label-position="top">
  658. <el-form-item :label="'默认抽样位置A'">
  659. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  660. </el-form-item>
  661. <el-form-item :label="'默认抽样位置B'">
  662. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  663. </el-form-item>
  664. <el-form-item :label="'抽样数量'">
  665. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  666. </el-form-item>
  667. </el-form>
  668. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  669. <el-button type="primary" @click="batchHandleAddModal">保存</el-button>
  670. <el-button type="primary" @click="batchHandleAddModalFlag = false">关闭</el-button>
  671. </el-footer>
  672. </el-dialog>
  673. <!-- 机修人员清单 -->
  674. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  675. <div class="rq">
  676. <el-form :inline="true" label-position="top" :model="operatorData">
  677. <el-form-item :label="'所属角色'">
  678. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
  679. <el-option
  680. v-for = "i in roleList"
  681. :key = "i.roleId"
  682. :label = "i.roleName"
  683. :value = "i.roleId">
  684. </el-option>
  685. </el-select>
  686. </el-form-item>
  687. <el-form-item :label="'用户编码'">
  688. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  689. </el-form-item>
  690. <el-form-item :label="'用户姓名'">
  691. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  692. </el-form-item>
  693. <el-form-item :label="' '">
  694. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  695. </el-form-item>
  696. </el-form>
  697. <el-table
  698. :height="300"
  699. :data="operatorList"
  700. ref="operatorTable"
  701. @row-click="operatorClickRow"
  702. @selection-change="selectionChangeHandle2"
  703. border
  704. style="width: 100%;">
  705. <el-table-column
  706. type="selection"
  707. header-align="center"
  708. align="center"
  709. width="50">
  710. </el-table-column>
  711. <el-table-column
  712. v-for="(item,index) in operatorDetailList" :key="index"
  713. :sortable="item.columnSortable"
  714. :prop="item.columnProp"
  715. :header-align="item.headerAlign"
  716. :show-overflow-tooltip="item.showOverflowTooltip"
  717. :align="item.align"
  718. :fixed="item.fixed==''?false:item.fixed"
  719. :min-width="item.columnWidth"
  720. :label="item.columnLabel">
  721. <template slot-scope="scope">
  722. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  723. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  724. </template>
  725. </el-table-column>
  726. </el-table>
  727. </div>
  728. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  729. <el-button type="primary" @click="confirmOperator">确认</el-button>
  730. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  731. </el-footer>
  732. </el-dialog>
  733. <!-- 更改检验方式 -->
  734. <el-dialog title="更改检验方式" top="25vh" :close-on-click-modal="false" v-drag :visible.sync="changeModalFlag" width="500px">
  735. <el-form :inline="true" label-position="top" :model="changeData" style="margin-left: 7px;margin-top: -5px;">
  736. <el-form-item label="检验方式">
  737. <el-select v-model="changeData.inspectCode" style="width: 210px">
  738. <el-option label="全检" value="全检"></el-option>
  739. <el-option label="数量抽检" value="数量抽检"></el-option>
  740. <el-option label="比例抽检" value="比例抽检"></el-option>
  741. <el-option label="不固定抽检" value="不固定抽检"></el-option>
  742. </el-select>
  743. </el-form-item>
  744. <el-form-item label="抽检数量">
  745. <el-input class="inlineNumber numInput" v-model="changeData.qtySample" type="number" style="width: 110px"></el-input>
  746. </el-form-item>
  747. <el-form-item label="抽检比例">
  748. <el-input class="inlineNumber numInput" v-model="changeData.percentSample" type="number" style="width: 110px"></el-input>
  749. </el-form-item>
  750. </el-form>
  751. <el-form :inline="true" label-position="top" :model="changeData" style="margin-left: 7px;margin-top: -5px;">
  752. <el-form-item>
  753. <span slot="label" @click="getBaseList(207)"><a herf="#">抽样方案编码</a></span>
  754. <el-input v-model="changeData.samplingProgrammeNo" style="width: 143px"></el-input>
  755. </el-form-item>
  756. <el-form-item label="抽样方案名称">
  757. <el-input v-model="changeData.samplingProgrammeDesc" disabled style="width: 300px"></el-input>
  758. </el-form-item>
  759. </el-form>
  760. <el-form :inline="true" label-position="top" :model="changeData" style="margin-left: 7px;margin-top: -5px;">
  761. <el-form-item>
  762. <span slot="label" @click="getBaseList(208)"><a herf="#">检验水平编码</a></span>
  763. <el-input v-model="changeData.samplingLevelNo" style="width: 143px"></el-input>
  764. </el-form-item>
  765. <el-form-item label="检验水平名称">
  766. <el-input v-model="changeData.samplingLevelDesc" disabled style="width: 300px"></el-input>
  767. </el-form-item>
  768. </el-form>
  769. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  770. <el-button type="primary" @click="changeInspectionWay">保存</el-button>
  771. <el-button type="primary" @click="changeModalFlag = false">关闭</el-button>
  772. </el-footer>
  773. </el-dialog>
  774. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  775. <!-- 上传文件的modal -->
  776. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile>
  777. <!-- 上传文件的modal -->
  778. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  779. <!-- 子明细导入 -->
  780. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  781. <!-- 项目操作对话框 -->
  782. <el-dialog title="检验项目操作" @close="refreshInspectionDetailList" :close-on-click-modal="false" v-drag :visible.sync="itemOperationDialogFlag" width="1200px" custom-class="item-operation-dialog">
  783. <div class="search-container">
  784. <el-form :inline="true" size="small">
  785. <el-form-item label="项目编码">
  786. <el-input v-model="itemOperationQuery.itemNo" placeholder="请输入项目编码" clearable prefix-icon="el-icon-search" style="width: 160px"></el-input>
  787. </el-form-item>
  788. <el-form-item label="项目名称">
  789. <el-input v-model="itemOperationQuery.itemDesc" placeholder="请输入项目名称" clearable prefix-icon="el-icon-search" style="width: 200px"></el-input>
  790. </el-form-item>
  791. <el-button type="primary" icon="el-icon-search" size="small" @click="searchOQCItems">查询</el-button>
  792. </el-form>
  793. </div>
  794. <div class="item-operation-content">
  795. <div class="item-panel available-panel">
  796. <div class="panel-header">
  797. <i class="el-icon-menu"></i>
  798. <span class="panel-title">可选项目列表</span>
  799. <span class="item-count">{{ availableItemList.length }}</span>
  800. </div>
  801. <el-table ref="availableItemTable" :data="availableItemList" @row-click="availableItemClickRow" @selection-change="availableItemSelectionChange" highlight-current-row class="operation-table" height="400" border>
  802. <el-table-column type="selection" width="45" align="center"></el-table-column>
  803. <el-table-column prop="itemNo" label="项目编码" min-width="120"></el-table-column>
  804. <el-table-column prop="itemDesc" label="项目名称" min-width="180" show-overflow-tooltip></el-table-column>
  805. </el-table>
  806. </div>
  807. <div class="operation-buttons">
  808. <el-tooltip content="添加选中项目" placement="left">
  809. <el-button type="primary" icon="el-icon-d-arrow-right" circle @click="addInspectionItems" :disabled="!availableItemSelections || availableItemSelections.length === 0"></el-button>
  810. </el-tooltip>
  811. <el-tooltip content="移除选中项目" placement="right">
  812. <el-button type="danger" icon="el-icon-d-arrow-left" circle @click="deleteInspectionItems" :disabled="!selectedItemSelections || selectedItemSelections.length === 0"></el-button>
  813. </el-tooltip>
  814. </div>
  815. <div class="item-panel selected-panel">
  816. <div class="panel-header">
  817. <i class="el-icon-tickets"></i>
  818. <span class="panel-title">已有项目列表</span>
  819. <span class="item-count">{{ selectedItemList.length }}</span>
  820. </div>
  821. <el-table ref="selectedItemTable" :data="selectedItemList" @row-click="selectedItemClickRow" @selection-change="selectedItemSelectionChange" highlight-current-row class="operation-table" height="400" border>
  822. <el-table-column type="selection" width="45" align="center"></el-table-column>
  823. <el-table-column prop="itemNo" label="项目编码" min-width="120"></el-table-column>
  824. <el-table-column prop="itemDesc" label="项目名称" min-width="180" show-overflow-tooltip></el-table-column>
  825. </el-table>
  826. </div>
  827. </div>
  828. <div slot="footer" class="dialog-footer">
  829. <el-button @click="itemOperationDialogFlag = false" size="small">关闭</el-button>
  830. </div>
  831. </el-dialog>
  832. <!-- 模板导入对话框 -->
  833. <el-dialog title="模板导入" :close-on-click-modal="false" v-drag :visible.sync="templateImportDialogFlag" width="900px" custom-class="template-import-dialog">
  834. <div class="search-container">
  835. <el-form :inline="true" size="small">
  836. <el-form-item label="模板编码">
  837. <el-input v-model="templateQuery.templateId" placeholder="请输入模板编码" clearable prefix-icon="el-icon-search" style="width: 160px"></el-input>
  838. </el-form-item>
  839. <el-form-item label="模板名称">
  840. <el-input v-model="templateQuery.templateDesc" placeholder="请输入模板名称" clearable prefix-icon="el-icon-search" style="width: 200px"></el-input>
  841. </el-form-item>
  842. <el-button type="primary" icon="el-icon-search" size="small" @click="searchOQCTemplates">查询</el-button>
  843. <el-button icon="el-icon-refresh-left" size="small" @click="resetTemplateQuery">重置</el-button>
  844. </el-form>
  845. </div>
  846. <div class="template-list-container">
  847. <el-table ref="templateTable" :data="templateList" @row-click="templateClickRow" @selection-change="templateSelectionChange" highlight-current-row class="template-table" height="450" border>
  848. <el-table-column type="selection" width="45" align="center"></el-table-column>
  849. <el-table-column prop="templateId" label="模板编码" min-width="120"></el-table-column>
  850. <el-table-column prop="templateName" label="模板名称" min-width="180" show-overflow-tooltip></el-table-column>
  851. <el-table-column prop="remark" label="备注" min-width="200" show-overflow-tooltip></el-table-column>
  852. <el-table-column prop="itemCount" label="项目数量" width="100" align="center"></el-table-column>
  853. </el-table>
  854. </div>
  855. <div slot="footer" class="dialog-footer">
  856. <el-button type="primary" icon="el-icon-download" @click="confirmImportTemplate" :disabled="!templateSelections || templateSelections.length === 0" :loading="importLoading" size="small">导入选中模板</el-button>
  857. <el-button @click="templateImportDialogFlag = false" size="small">关闭</el-button>
  858. </div>
  859. </el-dialog>
  860. </div>
  861. </template>
  862. <script>
  863. import {
  864. qcOQCInspectionSearch, // OQC检验记录查询
  865. fqasDetailSearch, // FQAS检验记录查询
  866. selectFQASSubDetailedRecord, // 查询子明细记录
  867. saveFQASDetailedRecord, // 新增明细信息
  868. checkFQASIsSubmit, // 检查是否已提交
  869. saveFQASSubDetailed, // 新增子明细信息
  870. saveFQASSubmitResult, // 审核
  871. fqasRecordDelete, // 删除检验记录
  872. disposalMeasuresSearch, // 获取处置措施列表
  873. fqasRecordOverLoad, // 重载检验单
  874. getSiteAndBuByUserName,
  875. actionFQASInspection, // 开始检验
  876. dataAcquisition, // 数据采集
  877. changeInspectionWay, // 更改检验方式
  878. getFileContentList2,
  879. downLoadObjectFile,
  880. deleteObjectFile,
  881. getUserRoleList,
  882. getOperatorList,
  883. // OQC检验项目操作和模板导入
  884. getOQCItemList,
  885. addOQCItemDetails,
  886. deleteOQCItemDetails,
  887. getOQCTemplateList,
  888. importOQCTemplateItems
  889. } from "@/api/qc/qc.js"
  890. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  891. import Chooselist from '@/views/modules/common/Chooselist_eam'
  892. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  893. import qcFAIUploadFile from "./qc_FAI_upload_file"
  894. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  895. import subDetailUpload from "./sub_detail_upload"
  896. export default {
  897. components: {
  898. Chooselist,
  899. qcFAIUploadFile,
  900. comQcItemImageUploadFile,
  901. subDetailUpload
  902. },
  903. computed: {
  904. templateTableData () {
  905. let start = (this.pageIndex2 - 1) * this.pageSize2
  906. let end = start + this.pageSize2
  907. if (end > this.tableData.length){
  908. end = this.tableData.length
  909. }
  910. return this.tableData.slice(start,end)
  911. }
  912. },
  913. watch: {
  914. detailData: {
  915. deep: true,
  916. handler: function (newV, oldV) {
  917. this.detailData.notPassQty = this.detailData.samplingQty - this.detailData.passQty
  918. }
  919. },
  920. detailList: {
  921. deep: true,
  922. handler: function (newV, oldV) {
  923. let num = 0
  924. for (let i = 0; i < this.detailList.length; i++) {
  925. if (this.detailList[i].itemResult === 'N') {
  926. num++
  927. }
  928. }
  929. this.detailData.unqualifiedQty = num
  930. }
  931. },
  932. },
  933. data () {
  934. return {
  935. searchExpanded: false, // 搜索条件展开状态,默认收起
  936. loadFlag: false,
  937. // 是否收藏
  938. favorite: false,
  939. // 导出 start
  940. exportData: [],
  941. transferLoadFlag: false,
  942. exportName: "FQAS检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  943. exportHeader: ["FQAS检验录入"],
  944. exportFooter: [],
  945. exportList: [],
  946. // 导出 end
  947. submitData: {
  948. site: '',
  949. inspectionNo: '',
  950. isQualified: '',
  951. isQualifiedChinese: '',
  952. submitList: [],
  953. updateBy: this.$store.state.user.name,
  954. },
  955. tagNo:'',
  956. searchData: {
  957. site: '',
  958. userName: this.$store.state.user.name,
  959. inspectionNo: '',
  960. inspectionTypeNo:'109',
  961. isQualified: '',
  962. buDesc: '',
  963. startDate: '',
  964. endDate: '',
  965. startDate2: '',
  966. endDate2: '',
  967. partNo:'',
  968. partDesc:'',
  969. state: '',
  970. inspectionResult: '',
  971. disposalMeasures: '',
  972. inspectorName: '',
  973. page: 1,
  974. limit: 10,
  975. states: ['未开始','待检验'],
  976. customerNo: '',
  977. customerName: ''
  978. },
  979. pageIndex: 1,
  980. pageSize: 200,
  981. totalPage: 0,
  982. pageIndex2: 1,
  983. pageSize2: 20,
  984. totalPage2: 0,
  985. height: 200,
  986. dataList: [],
  987. dataListSelections: [],
  988. submitFlag: false,
  989. modalData: {
  990. flag:'',
  991. functionType:'',
  992. site: '',
  993. bu: '',
  994. inspectionNo:'',
  995. workOrderNumber: '',
  996. workOrderQuantity: '',
  997. reelNumber: '',
  998. partNo: '',
  999. rollingQuantity: '',
  1000. sampleQuantity: '',
  1001. detailCodeNo:'',
  1002. detailCodeDesc:'',
  1003. inspectionTypeNo:'109',
  1004. inspectionTypeName:'OQC',
  1005. inspectorNo:'',
  1006. inspectorName:'',
  1007. isQualified:'',
  1008. isQualifiedChinese:''
  1009. },
  1010. // 展示列集
  1011. // columnList1: [],
  1012. columnList1: [
  1013. {
  1014. userId: this.$store.state.user.name,
  1015. functionId: 301017,
  1016. serialNumber: '301017Table1BuDesc',
  1017. tableId: "301017Table1",
  1018. tableName: "OQC检验记录表",
  1019. columnProp: 'buDesc',
  1020. headerAlign: "center",
  1021. align: "center",
  1022. columnLabel: 'BU',
  1023. columnHidden: false,
  1024. columnImage: false,
  1025. columnSortable: false,
  1026. sortLv: 0,
  1027. status: true,
  1028. fixed: '',
  1029. columnWidth: 100,
  1030. },
  1031. {
  1032. userId: this.$store.state.user.name,
  1033. functionId: 301017,
  1034. serialNumber: '301017Table1InspectionNo',
  1035. tableId: "301017Table1",
  1036. tableName: "OQC检验记录表",
  1037. columnProp: 'inspectionNo',
  1038. headerAlign: "center",
  1039. align: "center",
  1040. columnLabel: '检验单号',
  1041. columnHidden: false,
  1042. columnImage: false,
  1043. columnSortable: false,
  1044. sortLv: 0,
  1045. status: true,
  1046. fixed: '',
  1047. columnWidth: 120,
  1048. },
  1049. {
  1050. userId: this.$store.state.user.name,
  1051. functionId: 301017,
  1052. serialNumber: '301017Table1InspectionResult',
  1053. tableId: "301017Table1",
  1054. tableName: "OQC检验记录表",
  1055. columnProp: 'inspectionResult',
  1056. headerAlign: "center",
  1057. align: "center",
  1058. columnLabel: '检验结论',
  1059. columnHidden: false,
  1060. columnImage: false,
  1061. columnSortable: false,
  1062. sortLv: 0,
  1063. status: true,
  1064. fixed: '',
  1065. columnWidth: 100,
  1066. },
  1067. {
  1068. userId: this.$store.state.user.name,
  1069. functionId: 301017,
  1070. serialNumber: '301017Table1TaskDate',
  1071. tableId: "301017Table1",
  1072. tableName: "OQC检验记录表",
  1073. columnProp: 'taskDate',
  1074. headerAlign: "center",
  1075. align: "center",
  1076. columnLabel: '送检日期',
  1077. columnHidden: false,
  1078. columnImage: false,
  1079. columnSortable: false,
  1080. sortLv: 0,
  1081. status: true,
  1082. fixed: '',
  1083. columnWidth: 130,
  1084. },
  1085. {
  1086. userId: this.$store.state.user.name,
  1087. functionId: 301017,
  1088. serialNumber: '301017Table1InspectionCycle',
  1089. tableId: "301017Table1",
  1090. tableName: "OQC检验记录表",
  1091. columnProp: 'inspectionCycle',
  1092. headerAlign: "center",
  1093. align: "right",
  1094. columnLabel: '检验周期(h)',
  1095. columnHidden: false,
  1096. columnImage: false,
  1097. columnSortable: false,
  1098. sortLv: 0,
  1099. status: true,
  1100. fixed: '',
  1101. columnWidth: 100,
  1102. },
  1103. {
  1104. userId: this.$store.state.user.name,
  1105. functionId: 301017,
  1106. serialNumber: '301017Table1RollNo',
  1107. tableId: "301017Table1",
  1108. tableName: "OQC检验记录表",
  1109. columnProp: 'rollNo',
  1110. headerAlign: "center",
  1111. align: "center",
  1112. columnLabel: '标签条码',
  1113. columnHidden: false,
  1114. columnImage: false,
  1115. columnSortable: false,
  1116. sortLv: 0,
  1117. status: true,
  1118. fixed: '',
  1119. columnWidth: 120,
  1120. },
  1121. {
  1122. userId: this.$store.state.user.name,
  1123. functionId: 301017,
  1124. serialNumber: '301017Table1PartNo',
  1125. tableId: "301017Table1",
  1126. tableName: "OQC检验记录表",
  1127. columnProp: 'partNo',
  1128. headerAlign: "center",
  1129. align: "center",
  1130. columnLabel: '物料编码',
  1131. columnHidden: false,
  1132. columnImage: false,
  1133. columnSortable: false,
  1134. sortLv: 0,
  1135. status: true,
  1136. fixed: '',
  1137. columnWidth: 120,
  1138. },
  1139. {
  1140. userId: this.$store.state.user.name,
  1141. functionId: 301017,
  1142. serialNumber: '301017Table1PartDesc',
  1143. tableId: "301017Table1",
  1144. tableName: "OQC检验记录表",
  1145. columnProp: 'partDesc',
  1146. headerAlign: "center",
  1147. align: "left",
  1148. columnLabel: '物料名称',
  1149. columnHidden: false,
  1150. columnImage: false,
  1151. columnSortable: false,
  1152. sortLv: 0,
  1153. status: true,
  1154. fixed: '',
  1155. columnWidth: 200,
  1156. },
  1157. {
  1158. userId: this.$store.state.user.name,
  1159. functionId: 301017,
  1160. serialNumber: '301017Table1Umid',
  1161. tableId: "301017Table1",
  1162. tableName: "OQC检验记录表",
  1163. columnProp: 'umId',
  1164. headerAlign: "center",
  1165. align: "left",
  1166. columnLabel: '计量单位',
  1167. columnHidden: false,
  1168. columnImage: false,
  1169. columnSortable: false,
  1170. sortLv: 0,
  1171. status: true,
  1172. fixed: '',
  1173. columnWidth: 100,
  1174. },
  1175. {
  1176. userId: this.$store.state.user.name,
  1177. functionId: 301017,
  1178. serialNumber: '301017Table1RollQty',
  1179. tableId: "301017Table1",
  1180. tableName: "OQC检验记录表",
  1181. columnProp: 'rollQty',
  1182. headerAlign: "center",
  1183. align: "right",
  1184. columnLabel: '发货数量',
  1185. columnHidden: false,
  1186. columnImage: false,
  1187. columnSortable: false,
  1188. sortLv: 0,
  1189. status: true,
  1190. fixed: '',
  1191. columnWidth: 100,
  1192. },
  1193. {
  1194. userId: this.$store.state.user.name,
  1195. functionId: 301017,
  1196. serialNumber: '301017Table1RollCount',
  1197. tableId: "301017Table1",
  1198. tableName: "OQC检验记录表",
  1199. columnProp: 'rollCount',
  1200. headerAlign: "center",
  1201. align: "right",
  1202. columnLabel: '送检数量',
  1203. columnHidden: false,
  1204. columnImage: false,
  1205. columnSortable: false,
  1206. sortLv: 0,
  1207. status: true,
  1208. fixed: '',
  1209. columnWidth: 100,
  1210. },
  1211. {
  1212. userId: this.$store.state.user.name,
  1213. functionId: 301017,
  1214. serialNumber: '301017Table1SamplingQty',
  1215. tableId: "301017Table1",
  1216. tableName: "OQC检验记录表",
  1217. columnProp: 'samplingQty',
  1218. headerAlign: "center",
  1219. align: "right",
  1220. columnLabel: '抽样数量',
  1221. columnHidden: false,
  1222. columnImage: false,
  1223. columnSortable: false,
  1224. sortLv: 0,
  1225. status: true,
  1226. fixed: '',
  1227. columnWidth: 100,
  1228. },
  1229. {
  1230. userId: this.$store.state.user.name,
  1231. functionId: 301017,
  1232. serialNumber: '301017Table1PoOrderNo',
  1233. tableId: "301017Table1",
  1234. tableName: "OQC检验记录表",
  1235. columnProp: 'poOrderNo',
  1236. headerAlign: "center",
  1237. align: "left",
  1238. columnLabel: '关联单号',
  1239. columnHidden: false,
  1240. columnImage: false,
  1241. columnSortable: false,
  1242. sortLv: 0,
  1243. status: true,
  1244. fixed: '',
  1245. columnWidth: 100,
  1246. },
  1247. {
  1248. userId: this.$store.state.user.name,
  1249. functionId: 301017,
  1250. serialNumber: '301017Table1PoItemNo',
  1251. tableId: "301017Table1",
  1252. tableName: "OQC检验记录表",
  1253. columnProp: 'poItemNo',
  1254. headerAlign: "center",
  1255. align: "left",
  1256. columnLabel: '关联单行号',
  1257. columnHidden: false,
  1258. columnImage: false,
  1259. columnSortable: false,
  1260. sortLv: 0,
  1261. status: true,
  1262. fixed: '',
  1263. columnWidth: 100,
  1264. },
  1265. {
  1266. userId: this.$store.state.user.name,
  1267. functionId: 301017,
  1268. serialNumber: '301017Table1CustomerNo',
  1269. tableId: "301017Table1",
  1270. tableName: "OQC检验记录表",
  1271. columnProp: 'customerNo',
  1272. headerAlign: "center",
  1273. align: "left",
  1274. columnLabel: '客户编码',
  1275. columnHidden: false,
  1276. columnImage: false,
  1277. columnSortable: false,
  1278. sortLv: 0,
  1279. status: true,
  1280. fixed: '',
  1281. columnWidth: 100,
  1282. },
  1283. {
  1284. userId: this.$store.state.user.name,
  1285. functionId: 301017,
  1286. serialNumber: '301017Table1CustomerName',
  1287. tableId: "301017Table1",
  1288. tableName: "OQC检验记录表",
  1289. columnProp: 'customerName',
  1290. headerAlign: "center",
  1291. align: "left",
  1292. columnLabel: '客户名称',
  1293. columnHidden: false,
  1294. columnImage: false,
  1295. columnSortable: false,
  1296. sortLv: 0,
  1297. status: true,
  1298. fixed: '',
  1299. columnWidth: 150,
  1300. },
  1301. {
  1302. userId: this.$store.state.user.name,
  1303. functionId: 301017,
  1304. serialNumber: '301017Table1InspectionRemark',
  1305. tableId: "301017Table1",
  1306. tableName: "OQC检验记录表",
  1307. columnProp: 'inspectionRemark',
  1308. headerAlign: "center",
  1309. align: "left",
  1310. columnLabel: '质检备注',
  1311. columnHidden: false,
  1312. columnImage: false,
  1313. columnSortable: false,
  1314. sortLv: 0,
  1315. status: true,
  1316. fixed: '',
  1317. columnWidth: 200,
  1318. },
  1319. {
  1320. userId: this.$store.state.user.name,
  1321. functionId: 301017,
  1322. serialNumber: '301017Table1DisposalMeasures',
  1323. tableId: "301017Table1",
  1324. tableName: "OQC检验记录表",
  1325. columnProp: 'disposalMeasures',
  1326. headerAlign: "center",
  1327. align: "center",
  1328. columnLabel: '处置措施',
  1329. columnHidden: false,
  1330. columnImage: false,
  1331. columnSortable: false,
  1332. sortLv: 0,
  1333. status: true,
  1334. fixed: '',
  1335. columnWidth: 120,
  1336. },
  1337. {
  1338. userId: this.$store.state.user.name,
  1339. functionId: 301017,
  1340. serialNumber: '301017Table1DisposalRemark',
  1341. tableId: "301017Table1",
  1342. tableName: "OQC检验记录表",
  1343. columnProp: 'disposalRemark',
  1344. headerAlign: "center",
  1345. align: "left",
  1346. columnLabel: '处置说明',
  1347. columnHidden: false,
  1348. columnImage: false,
  1349. columnSortable: false,
  1350. sortLv: 0,
  1351. status: true,
  1352. fixed: '',
  1353. columnWidth: 200,
  1354. },
  1355. {
  1356. userId: this.$store.state.user.name,
  1357. functionId: 301017,
  1358. serialNumber: '301017Table1ActionDate',
  1359. tableId: "301017Table1",
  1360. tableName: "OQC检验记录表",
  1361. columnProp: 'actionDate',
  1362. headerAlign: "center",
  1363. align: "center",
  1364. columnLabel: '开始检验时间',
  1365. columnHidden: false,
  1366. columnImage: false,
  1367. columnSortable: false,
  1368. sortLv: 0,
  1369. status: true,
  1370. fixed: '',
  1371. columnWidth: 170,
  1372. },
  1373. {
  1374. userId: this.$store.state.user.name,
  1375. functionId: 301017,
  1376. serialNumber: '301017Table1InspectorDate',
  1377. tableId: "301017Table1",
  1378. tableName: "OQC检验记录表",
  1379. columnProp: 'inspectorDate',
  1380. headerAlign: "center",
  1381. align: "center",
  1382. columnLabel: '检验时间',
  1383. columnHidden: false,
  1384. columnImage: false,
  1385. columnSortable: false,
  1386. sortLv: 0,
  1387. status: true,
  1388. fixed: '',
  1389. columnWidth: 170,
  1390. },
  1391. {
  1392. userId: this.$store.state.user.name,
  1393. functionId: 301017,
  1394. serialNumber: '301017Table1CreateBy',
  1395. tableId: "301017Table1",
  1396. tableName: "OQC检验记录表",
  1397. columnProp: 'createBy',
  1398. headerAlign: "center",
  1399. align: "center",
  1400. columnLabel: '送检员',
  1401. columnHidden: false,
  1402. columnImage: false,
  1403. columnSortable: false,
  1404. sortLv: 0,
  1405. status: true,
  1406. fixed: '',
  1407. columnWidth: 100,
  1408. },
  1409. {
  1410. userId: this.$store.state.user.name,
  1411. functionId: 301017,
  1412. serialNumber: '301017Table1InspectorName',
  1413. tableId: "301017Table1",
  1414. tableName: "OQC检验记录表",
  1415. columnProp: 'inspectorName',
  1416. headerAlign: "center",
  1417. align: "center",
  1418. columnLabel: '质检员',
  1419. columnHidden: false,
  1420. columnImage: false,
  1421. columnSortable: false,
  1422. sortLv: 0,
  1423. status: true,
  1424. fixed: '',
  1425. columnWidth: 100,
  1426. },
  1427. ],
  1428. detailColumnList: [
  1429. {
  1430. userId: this.$store.state.user.name,
  1431. functionId: 301017,
  1432. serialNumber: '301017Table2ItemNo',
  1433. tableId: "301017Table2",
  1434. tableName: "检验单明细表",
  1435. columnProp: 'itemNo',
  1436. headerAlign: "center",
  1437. align: "center",
  1438. columnLabel: '检验项目编码',
  1439. columnHidden: false,
  1440. columnImage: false,
  1441. columnSortable: false,
  1442. sortLv: 0,
  1443. status: true,
  1444. fixed: '',
  1445. columnWidth: 120,
  1446. },
  1447. {
  1448. userId: this.$store.state.user.name,
  1449. functionId: 301017,
  1450. serialNumber: '301017Table2ItemDesc',
  1451. tableId: "301017Table2",
  1452. tableName: "检验单明细表",
  1453. columnProp: 'itemDesc',
  1454. headerAlign: "center",
  1455. align: "left",
  1456. columnLabel: '检验项目',
  1457. columnHidden: false,
  1458. columnImage: false,
  1459. columnSortable: false,
  1460. sortLv: 0,
  1461. status: true,
  1462. fixed: '',
  1463. columnWidth: 150,
  1464. },
  1465. {
  1466. userId: this.$store.state.user.name,
  1467. functionId: 301017,
  1468. serialNumber: '301017Table2SamplingLevelDesc',
  1469. tableId: "301017Table2",
  1470. tableName: "检验单明细表",
  1471. columnProp: 'samplingLevelDesc',
  1472. headerAlign: "center",
  1473. align: "left",
  1474. columnLabel: '检验水平',
  1475. columnHidden: false,
  1476. columnImage: false,
  1477. columnSortable: false,
  1478. sortLv: 0,
  1479. status: true,
  1480. fixed: '',
  1481. columnWidth: 150,
  1482. },
  1483. {
  1484. userId: this.$store.state.user.name,
  1485. functionId: 301017,
  1486. serialNumber: '301017Table2SamplingProgrammeDesc',
  1487. tableId: "301017Table2",
  1488. tableName: "检验单明细表",
  1489. columnProp: 'samplingProgrammeDesc',
  1490. headerAlign: "center",
  1491. align: "left",
  1492. columnLabel: '检验方案',
  1493. columnHidden: false,
  1494. columnImage: false,
  1495. columnSortable: false,
  1496. sortLv: 0,
  1497. status: true,
  1498. fixed: '',
  1499. columnWidth: 150,
  1500. },
  1501. {
  1502. userId: this.$store.state.user.name,
  1503. functionId: 301017,
  1504. serialNumber: '301017Table2MethodName',
  1505. tableId: "301017Table2",
  1506. tableName: "检验单明细表",
  1507. columnProp: 'methodName',
  1508. headerAlign: "center",
  1509. align: "left",
  1510. columnLabel: '检验方法',
  1511. columnHidden: false,
  1512. columnImage: false,
  1513. columnSortable: false,
  1514. sortLv: 0,
  1515. status: true,
  1516. fixed: '',
  1517. columnWidth: 150,
  1518. },
  1519. {
  1520. userId: this.$store.state.user.name,
  1521. functionId: 301017,
  1522. serialNumber: '301017Table2MethodRemark',
  1523. tableId: "301017Table2",
  1524. tableName: "检验单明细表",
  1525. columnProp: 'methodRemark',
  1526. headerAlign: "center",
  1527. align: "left",
  1528. columnLabel: '检验方法说明',
  1529. columnHidden: false,
  1530. columnImage: false,
  1531. columnSortable: false,
  1532. sortLv: 0,
  1533. status: true,
  1534. fixed: '',
  1535. columnWidth: 200,
  1536. },
  1537. {
  1538. userId: this.$store.state.user.name,
  1539. functionId: 301017,
  1540. serialNumber: '301017Table2ObjectDesc',
  1541. tableId: "301017Table2",
  1542. tableName: "检验单明细表",
  1543. columnProp: 'objectDesc',
  1544. headerAlign: "center",
  1545. align: "left",
  1546. columnLabel: '检测仪器',
  1547. columnHidden: false,
  1548. columnImage: false,
  1549. columnSortable: false,
  1550. sortLv: 0,
  1551. status: true,
  1552. fixed: '',
  1553. columnWidth: 150,
  1554. },
  1555. {
  1556. userId: this.$store.state.user.name,
  1557. functionId: 301017,
  1558. serialNumber: '301017Table2Aql',
  1559. tableId: "301017Table2",
  1560. tableName: "检验单明细表",
  1561. columnProp: 'aql',
  1562. headerAlign: "center",
  1563. align: "right",
  1564. columnLabel: 'AQL',
  1565. columnHidden: false,
  1566. columnImage: false,
  1567. columnSortable: false,
  1568. sortLv: 0,
  1569. status: true,
  1570. fixed: '',
  1571. columnWidth: 100,
  1572. },
  1573. {
  1574. userId: this.$store.state.user.name,
  1575. functionId: 301017,
  1576. serialNumber: '301017Table2Ac',
  1577. tableId: "301017Table2",
  1578. tableName: "检验单明细表",
  1579. columnProp: 'ac',
  1580. headerAlign: "center",
  1581. align: "right",
  1582. columnLabel: 'AC',
  1583. columnHidden: false,
  1584. columnImage: false,
  1585. columnSortable: false,
  1586. sortLv: 0,
  1587. status: true,
  1588. fixed: '',
  1589. columnWidth: 100,
  1590. },
  1591. {
  1592. userId: this.$store.state.user.name,
  1593. functionId: 301017,
  1594. serialNumber: '301017Table2Re',
  1595. tableId: "301017Table2",
  1596. tableName: "检验单明细表",
  1597. columnProp: 're',
  1598. headerAlign: "center",
  1599. align: "right",
  1600. columnLabel: 'RE',
  1601. columnHidden: false,
  1602. columnImage: false,
  1603. columnSortable: false,
  1604. sortLv: 0,
  1605. status: true,
  1606. fixed: '',
  1607. columnWidth: 100,
  1608. },
  1609. {
  1610. userId: this.$store.state.user.name,
  1611. functionId: 301017,
  1612. serialNumber: '301017Table2DefaultValue',
  1613. tableId: "301017Table2",
  1614. tableName: "检验单明细表",
  1615. columnProp: 'defaultValue',
  1616. headerAlign: "center",
  1617. align: "right",
  1618. columnLabel: '标准值',
  1619. columnHidden: false,
  1620. columnImage: false,
  1621. columnSortable: false,
  1622. sortLv: 0,
  1623. status: true,
  1624. fixed: '',
  1625. columnWidth: 100,
  1626. },
  1627. {
  1628. userId: this.$store.state.user.name,
  1629. functionId: 301017,
  1630. serialNumber: '301017Table2MaxValue',
  1631. tableId: "301017Table2",
  1632. tableName: "检验单明细表",
  1633. columnProp: 'maxValue',
  1634. headerAlign: "center",
  1635. align: "right",
  1636. columnLabel: '最大值',
  1637. columnHidden: false,
  1638. columnImage: false,
  1639. columnSortable: false,
  1640. sortLv: 0,
  1641. status: true,
  1642. fixed: '',
  1643. columnWidth: 100,
  1644. },
  1645. {
  1646. userId: this.$store.state.user.name,
  1647. functionId: 301017,
  1648. serialNumber: '301017Table2MinValue',
  1649. tableId: "301017Table2",
  1650. tableName: "检验单明细表",
  1651. columnProp: 'minValue',
  1652. headerAlign: "center",
  1653. align: "right",
  1654. columnLabel: '最小值',
  1655. columnHidden: false,
  1656. columnImage: false,
  1657. columnSortable: false,
  1658. sortLv: 0,
  1659. status: true,
  1660. fixed: '',
  1661. columnWidth: 100,
  1662. },
  1663. {
  1664. userId: this.$store.state.user.name,
  1665. functionId: 301017,
  1666. serialNumber: '301017Table2ValueType',
  1667. tableId: "301017Table2",
  1668. tableName: "检验单明细表",
  1669. columnProp: 'valueType',
  1670. headerAlign: "center",
  1671. align: "center",
  1672. columnLabel: '检测值类型',
  1673. columnHidden: false,
  1674. columnImage: false,
  1675. columnSortable: false,
  1676. sortLv: 0,
  1677. status: true,
  1678. fixed: '',
  1679. columnWidth: 100,
  1680. },
  1681. ],
  1682. fileColumnList: [
  1683. {
  1684. columnProp: 'fileName',
  1685. headerAlign: "center",
  1686. align: "center",
  1687. columnLabel: '文件名称',
  1688. columnHidden: false,
  1689. columnImage: false,
  1690. columnSortable: false,
  1691. sortLv: 0,
  1692. status: true,
  1693. fixed: '',
  1694. },
  1695. {
  1696. columnProp: 'createdBy',
  1697. headerAlign: "center",
  1698. align: 'center',
  1699. columnLabel: '上传人',
  1700. columnHidden: false,
  1701. columnImage: false,
  1702. columnSortable: true,
  1703. sortLv: 0,
  1704. status: true,
  1705. fixed: false
  1706. },
  1707. {
  1708. columnProp: 'createDate',
  1709. headerAlign: "center",
  1710. align: 'center',
  1711. columnLabel: '上传时间',
  1712. columnHidden: false,
  1713. columnImage: false,
  1714. columnSortable: true,
  1715. sortLv: 0,
  1716. status: true,
  1717. fixed: false
  1718. },
  1719. {
  1720. columnProp: 'orderRef3',
  1721. headerAlign: "center",
  1722. align: 'center',
  1723. columnLabel: '备注',
  1724. columnHidden: false,
  1725. columnImage: false,
  1726. columnSortable: true,
  1727. sortLv: 0,
  1728. status: true,
  1729. fixed: false
  1730. },
  1731. ],
  1732. detailData: {
  1733. site: '',
  1734. buNo: '',
  1735. inspectionNo: '',
  1736. partNo: '',
  1737. partDesc: '',
  1738. rollQty: '',
  1739. samplingQty: '',
  1740. unqualifiedQty: 0,
  1741. unqualifiedQuantity: '',
  1742. disposalMeasures: '',
  1743. disposalRemark: '',
  1744. inspectionResult: '',
  1745. inspectorNo: '',
  1746. inspectionRemark: '',
  1747. submitFlag: '',
  1748. umId: '',
  1749. rollCount: '',
  1750. operator: '',
  1751. operatorName: '',
  1752. responsiblePerson: '',
  1753. responsiblePersonName: '',
  1754. passQty: '',
  1755. notPassQty: ''
  1756. },
  1757. detailInformationFlag: false,
  1758. detailList: [],
  1759. saveInformationData: {
  1760. site: '',
  1761. buNo: '',
  1762. inspectionNo:'',
  1763. disposalMeasures: '',
  1764. disposalRemark: '',
  1765. inspectorNo: '',
  1766. inspectionRemark: '',
  1767. itemList:[],
  1768. unqualifiedQty: '',
  1769. rollCount: '',
  1770. samplingQty: '',
  1771. partNo: '',
  1772. partDesc: '',
  1773. operator: '',
  1774. operatorName: '',
  1775. responsiblePerson: '',
  1776. responsiblePersonName: '',
  1777. subDetailList: [],
  1778. passQty: '',
  1779. notPassQty: ''
  1780. },
  1781. // 子明细数据对象
  1782. tableData: [],
  1783. checkedDetail: [],
  1784. subDetailFlag: false,
  1785. subDetailData: {
  1786. site: '',
  1787. buNo: '',
  1788. inspectionNo: '',
  1789. itemNo: '',
  1790. itemDesc: '',
  1791. defaultValue: '',
  1792. maxValue: '',
  1793. minValue: '',
  1794. valueTypeDb: '',
  1795. subDetailValues:[]
  1796. },
  1797. options: [],
  1798. fileFlag: false,
  1799. fileContentList: [],
  1800. FQASSelections: [],
  1801. batchHandleAddModalFlag: false,
  1802. batchAddData: {
  1803. samplingLocation: '',
  1804. samplingLocationB: '',
  1805. samplingNumber: ''
  1806. },
  1807. disposalMeasuresOptions: [],
  1808. userBuList: [],
  1809. authSearch: false,
  1810. authCheck: false,
  1811. authOverLoad: false,
  1812. authDelete: false,
  1813. authDetail: false,
  1814. authFile: false,
  1815. authChange: false,
  1816. menuId: this.$route.meta.menuId,
  1817. roleList: [],
  1818. operatorList: [],
  1819. operatorData: {
  1820. flag: '',
  1821. site: '',
  1822. bu: '',
  1823. adminID: '',
  1824. adminName: '',
  1825. roleName: '',
  1826. roleId: '',
  1827. },
  1828. operatorModelFlag: false,
  1829. dataListSelections2: [],
  1830. operatorDetailList: [
  1831. {
  1832. columnProp: 'adminID',
  1833. headerAlign: "center",
  1834. align: "center",
  1835. columnLabel: '用户账号',
  1836. columnHidden: false,
  1837. columnImage: false,
  1838. columnSortable: false,
  1839. sortLv: 0,
  1840. status: true,
  1841. fixed: '',
  1842. },
  1843. {
  1844. columnProp: 'adminName',
  1845. headerAlign: "center",
  1846. align: "center",
  1847. columnLabel: '用户名称',
  1848. columnHidden: false,
  1849. columnImage: false,
  1850. columnSortable: false,
  1851. sortLv: 0,
  1852. status: true,
  1853. fixed: '',
  1854. },
  1855. {
  1856. columnProp: 'email',
  1857. headerAlign: "center",
  1858. align: "center",
  1859. columnLabel: '邮箱',
  1860. columnHidden: false,
  1861. columnImage: false,
  1862. columnSortable: false,
  1863. sortLv: 0,
  1864. status: true,
  1865. fixed: '',
  1866. },
  1867. {
  1868. columnProp: 'phone',
  1869. headerAlign: "center",
  1870. align: "center",
  1871. columnLabel: '手机号',
  1872. columnHidden: false,
  1873. columnImage: false,
  1874. columnSortable: false,
  1875. sortLv: 0,
  1876. status: true,
  1877. fixed: '',
  1878. },
  1879. ],
  1880. acquisitionList: [],
  1881. fileData: {
  1882. site: '',
  1883. buNo: '',
  1884. inspectionNo: '',
  1885. partNo: '',
  1886. inspectionTypeNo: ''
  1887. },
  1888. currentRow: {},
  1889. currentDetailRow: {},
  1890. changeData: {
  1891. site: '',
  1892. buNo: '',
  1893. inspectionNo: '',
  1894. rollCount: '',
  1895. inspectCode: '',
  1896. qtySample: '',
  1897. percentSample: '',
  1898. samplingProgrammeNo: '',
  1899. samplingProgrammeDesc: '',
  1900. samplingLevelNo: '',
  1901. samplingLevelDesc: '',
  1902. receiptNo: '',
  1903. receiptItemNo: '',
  1904. inspectionTypeNo: ''
  1905. },
  1906. changeModalFlag: false,
  1907. overLoading: false,
  1908. // OQC项目操作相关
  1909. itemOperationDialogFlag: false,
  1910. itemOperationQuery: {
  1911. itemNo: '',
  1912. itemDesc: '',
  1913. },
  1914. availableItemList: [],
  1915. selectedItemList: [],
  1916. availableItemSelections: [],
  1917. selectedItemSelections: [],
  1918. // OQC模板导入相关
  1919. templateImportDialogFlag: false,
  1920. templateQuery: {
  1921. templateId: '',
  1922. templateDesc: '',
  1923. },
  1924. templateList: [],
  1925. templateSelections: [],
  1926. importLoading: false
  1927. }
  1928. },
  1929. mounted () {
  1930. this.$nextTick(() => {
  1931. this.height = window.innerHeight - 250
  1932. })
  1933. },
  1934. updated() {
  1935. this.$nextTick(()=>{
  1936. this.$refs.OQCTable.doLayout()
  1937. })
  1938. },
  1939. created () {
  1940. // 按钮控制
  1941. this.getButtonAuthData()
  1942. // 获取用户的 site 和 bu
  1943. this.getSiteAndBuByUserName()
  1944. this.favoriteIsOk()
  1945. this.disposalMeasuresSearch()
  1946. // 动态列
  1947. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1948. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  1949. if (!this.authSearch) {
  1950. // 获取数据列表
  1951. this.getDataList()
  1952. }
  1953. // 获取用户角色
  1954. this.getUserRoleList()
  1955. },
  1956. methods: {
  1957. // 切换搜索条件展开/收起
  1958. toggleSearchExpand() {
  1959. this.searchExpanded = !this.searchExpanded;
  1960. },
  1961. // 重置搜索条件
  1962. resetSearch() {
  1963. this.searchData = {
  1964. site: '',
  1965. userName: this.$store.state.user.name,
  1966. inspectionNo: '',
  1967. inspectionTypeNo: '109',
  1968. isQualified: '',
  1969. buDesc: '',
  1970. startDate: '',
  1971. endDate: '',
  1972. startDate2: '',
  1973. endDate2: '',
  1974. partNo: '',
  1975. partDesc: '',
  1976. inspectorName: '',
  1977. customerNo: '',
  1978. customerName: '',
  1979. inspectionResult: '',
  1980. disposalMeasures: '',
  1981. states: []
  1982. };
  1983. this.getDataList();
  1984. },
  1985. // 列表数据总结
  1986. getSummaries (param) {
  1987. const { columns, data } = param
  1988. const sums = []
  1989. columns.forEach((column, index) => {
  1990. if (index === 0) {
  1991. sums[index] = '总计'
  1992. return
  1993. }
  1994. if (column.property !== 'rollQty' && column.property !== 'rollCount') {
  1995. sums[index] = ''
  1996. return
  1997. }
  1998. const values = data.map(item => Number(item[column.property]))
  1999. if (!values.every(value => isNaN(value))) {
  2000. sums[index] = values.reduce((prev, curr) => {
  2001. const value = Number(curr)
  2002. if (!isNaN(value)) {
  2003. return prev + curr
  2004. } else {
  2005. return prev
  2006. }
  2007. }, 0)
  2008. } else {
  2009. sums[index] = ''
  2010. }
  2011. })
  2012. return sums
  2013. },
  2014. // 检验结论改变事件
  2015. resultChange () {
  2016. if (this.detailData.inspectionResult === '不合格') {
  2017. this.detailData.passQty = 0
  2018. }
  2019. },
  2020. // 数据采集
  2021. dataAcquisition () {
  2022. this.loadFlag = true
  2023. let tempDate = {
  2024. site: this.detailData.site,
  2025. buNo: this.detailData.buNo,
  2026. inspectionNo: this.detailData.inspectionNo,
  2027. flag: 'iqc'
  2028. }
  2029. dataAcquisition(tempDate).then(({data}) => {
  2030. if (data.code === 0) {
  2031. // this.acquisitionList = data.rows
  2032. this.changeMyString(data.rows)
  2033. this.$message({
  2034. message: '数据采集成功',
  2035. type: 'success',
  2036. duration: 1500
  2037. })
  2038. } else {
  2039. this.$message({
  2040. message: data.msg,
  2041. type: 'warning',
  2042. duration: 1500
  2043. })
  2044. }
  2045. this.loadFlag = false
  2046. })
  2047. },
  2048. // 获取用户角色
  2049. getUserRoleList () {
  2050. getUserRoleList().then(({data}) => {
  2051. if (data.code === 0) {
  2052. this.roleList = data.rows
  2053. } else {
  2054. this.roleList = []
  2055. }
  2056. })
  2057. },
  2058. // 获取协同人员列表
  2059. getOperatorList () {
  2060. this.operatorData.flag = '1'
  2061. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2062. if (this.roleList.length > 0) {
  2063. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2064. if (filterList.length > 0) {
  2065. this.operatorData.roleId = filterList[0].roleId
  2066. } else {
  2067. this.operatorData.roleId = this.roleList[0].roleId
  2068. }
  2069. } else {
  2070. this.operatorData.roleId = ''
  2071. }
  2072. // 先清空缓存选中
  2073. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2074. // 拿到选中的人员编号
  2075. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2076. getOperatorList(this.operatorData).then(({data}) => {
  2077. if (data && data.code === 0) {
  2078. this.operatorList = data.rows
  2079. this.operatorList.forEach(val => {
  2080. // 回显选中
  2081. if (tempDataList.includes(val.adminID)) {
  2082. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2083. }
  2084. })
  2085. this.operatorModelFlag = true
  2086. } else {
  2087. this.$alert(data.msg, '错误', {
  2088. confirmButtonText: '确定'
  2089. })
  2090. }
  2091. })
  2092. },
  2093. // 获取责任人员列表
  2094. getResponsiblePersonList () {
  2095. this.operatorData.flag = '2'
  2096. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2097. if (this.roleList.length > 0) {
  2098. let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
  2099. if (filterList.length > 0) {
  2100. this.operatorData.roleId = filterList[0].roleId
  2101. } else {
  2102. this.operatorData.roleId = this.roleList[0].roleId
  2103. }
  2104. } else {
  2105. this.operatorData.roleId = ''
  2106. }
  2107. // 先清空缓存选中
  2108. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2109. // 拿到选中的人员编号
  2110. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2111. getOperatorList(this.operatorData).then(({data}) => {
  2112. if (data && data.code === 0) {
  2113. this.operatorList = data.rows
  2114. this.operatorList.forEach(val => {
  2115. // 回显选中
  2116. if (tempDataList.includes(val.adminID)) {
  2117. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2118. }
  2119. })
  2120. this.operatorModelFlag = true
  2121. } else {
  2122. this.$alert(data.msg, '错误', {
  2123. confirmButtonText: '确定'
  2124. })
  2125. }
  2126. })
  2127. },
  2128. // 查询机修人员列表
  2129. getOperatorList2 () {
  2130. if (this.operatorData.flag === '1') {
  2131. // 拿到选中的人员编号
  2132. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2133. getOperatorList(this.operatorData).then(({data}) => {
  2134. if (data && data.code === 0) {
  2135. this.operatorList = data.rows
  2136. this.operatorList.forEach(val => {
  2137. // 回显选中的部门
  2138. if (tempDataList.includes(val.adminID)) {
  2139. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2140. }
  2141. })
  2142. } else {
  2143. this.operatorList = []
  2144. }
  2145. })
  2146. } else {
  2147. // 拿到选中的人员编号
  2148. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2149. getOperatorList(this.operatorData).then(({data}) => {
  2150. if (data && data.code === 0) {
  2151. this.operatorList = data.rows
  2152. this.operatorList.forEach(val => {
  2153. // 回显选中的部门
  2154. if (tempDataList.includes(val.adminID)) {
  2155. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2156. }
  2157. })
  2158. } else {
  2159. this.operatorList = []
  2160. }
  2161. })
  2162. }
  2163. },
  2164. // 点击行选中复选框
  2165. operatorClickRow (row) {
  2166. this.$refs.operatorTable.toggleRowSelection(row)
  2167. },
  2168. // 多选
  2169. selectionChangeHandle2 (val) {
  2170. this.dataListSelections2 = val
  2171. },
  2172. // 确认多选协同人员
  2173. confirmOperator () {
  2174. if (this.dataListSelections2.length === 0) {
  2175. this.$message.warning('请勾选人员!')
  2176. return
  2177. }
  2178. if (this.operatorData.flag === '1') {
  2179. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2180. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2181. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2182. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2183. }
  2184. }
  2185. if (this.detailData.operator.charAt(0) === ';') {
  2186. this.detailData.operator = this.detailData.operator.substring(1)
  2187. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2188. }
  2189. } else {
  2190. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2191. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2192. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2193. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2194. }
  2195. }
  2196. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2197. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2198. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2199. }
  2200. }
  2201. this.operatorData = {
  2202. flag: '',
  2203. site: '',
  2204. bu: '',
  2205. adminID: '',
  2206. adminName: '',
  2207. roleName: '',
  2208. roleId: '',
  2209. }
  2210. this.operatorModelFlag = false
  2211. },
  2212. // // 实测值内容改变事件
  2213. // changeValue (row) {
  2214. // if (row.minValue == null && row.maxValue != null) {
  2215. // if (row.numberValue > row.maxValue) {
  2216. // row.itemResult = 'N'
  2217. // } else {
  2218. // row.itemResult = 'Y'
  2219. // }
  2220. // } else if (row.maxValue == null && row.minValue != null) {
  2221. // if (row.numberValue < row.minValue) {
  2222. // row.itemResult = 'N'
  2223. // } else {
  2224. // row.itemResult = 'Y'
  2225. // }
  2226. // } else if (row.minValue != null && row.maxValue != null) {
  2227. // if (row.numberValue < row.minValue || row.numberValue > row.maxValue) {
  2228. // row.itemResult = 'N'
  2229. // } else {
  2230. // row.itemResult = 'Y'
  2231. // }
  2232. // }
  2233. // },
  2234. // 获取用户的bu
  2235. getSiteAndBuByUserName () {
  2236. let tempData = {
  2237. username: this.$store.state.user.name,
  2238. }
  2239. getSiteAndBuByUserName(tempData).then(({data}) => {
  2240. if (data.code === 0) {
  2241. this.userBuList = data.rows
  2242. }
  2243. })
  2244. },
  2245. // ======= 正则校验 =======
  2246. handleInput (value, type) {
  2247. // 大于等于0,且只能输入4位小数
  2248. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  2249. if (val === null || val === undefined || val === '') {
  2250. val = 0
  2251. }
  2252. if (type === 1) {
  2253. this.detailData.unqualifiedQty = val
  2254. } else if (type === 2) {
  2255. this.detailData.passQty = val
  2256. }
  2257. },
  2258. // 子明细导入
  2259. subDetailUpload () {
  2260. let currentData = {
  2261. flag: 'FQAS',
  2262. site: this.detailData.site,
  2263. buNo: this.detailData.buNo,
  2264. inspectionNo: this.detailData.inspectionNo
  2265. }
  2266. //打开组件 去做新增业务
  2267. this.$nextTick(() => {
  2268. this.$refs.subDetailUpload.init(currentData)
  2269. })
  2270. },
  2271. // 获取处置措施列表
  2272. disposalMeasuresSearch () {
  2273. let tempData = {
  2274. inspectionTypeNo: '109'
  2275. }
  2276. disposalMeasuresSearch(tempData).then(({data}) => {
  2277. if (data.code === 0) {
  2278. this.disposalMeasuresOptions = data.rows
  2279. }
  2280. })
  2281. },
  2282. // 单机选中
  2283. FQASClickRow (row) {
  2284. this.currentRow = JSON.parse(JSON.stringify(row))
  2285. },
  2286. // 复选
  2287. selectionFQAS (val) {
  2288. this.FQASSelections = val
  2289. },
  2290. // 单机选中
  2291. OQCDetailClickRow (row) {
  2292. this.currentDetailRow = JSON.parse(JSON.stringify(row))
  2293. },
  2294. rowDetailStyle ({row}) {
  2295. if (this.currentDetailRow.itemNo === row.itemNo) {
  2296. return { 'background-color': '#50DCDC', cursor: 'pointer' };
  2297. }
  2298. },
  2299. // 刷新派设备文档的列表
  2300. getFileContentData (row) {
  2301. this.fileData = {
  2302. site: row.site,
  2303. buNo: row.buNo,
  2304. inspectionNo: row.inspectionNo,
  2305. partNo: row.partNo,
  2306. inspectionTypeNo: '109'
  2307. }
  2308. getFileContentList2(this.fileData).then(({data}) => {
  2309. //区分请求成功和失败的状况
  2310. if (data && data.code == 200) {
  2311. this.fileContentList = data.rows
  2312. } else {
  2313. this.fileContentList = []
  2314. }
  2315. })
  2316. this.fileFlag = true
  2317. },
  2318. // 新增文件的modal
  2319. addUploadFileModal () {
  2320. let currentData = {
  2321. titleCon: 'OQC文件上传',
  2322. site: this.detailData.site,
  2323. buNo: this.detailData.buNo,
  2324. createBy: this.$store.state.user.name,
  2325. inspectionNo: this.detailData.inspectionNo,
  2326. remark: '',
  2327. folder: 'qcFQAS',
  2328. }
  2329. //打开组件 去做新增业务
  2330. this.$nextTick(() => {
  2331. this.$refs.qcFAIUploadFile.init(currentData)
  2332. })
  2333. },
  2334. // 上传项目图片
  2335. uploadImageModal (row) {
  2336. let currentData = {
  2337. site: this.detailData.site,
  2338. buNo: this.detailData.buNo,
  2339. createBy: this.$store.state.user.name,
  2340. inspectionNo: this.detailData.inspectionNo,
  2341. itemNo: row.itemNo,
  2342. folder: 'FQASItemImageFile'
  2343. }
  2344. //打开组件 去做新增业务
  2345. this.$nextTick(() => {
  2346. this.$refs.comQcItemImageUploadFile.init(currentData)
  2347. })
  2348. },
  2349. // 文件下载
  2350. downloadFile (row) {
  2351. downLoadObjectFile(row)
  2352. .then(({data}) => {
  2353. // 不限制文件下载类型
  2354. const blob = new Blob([data], {type: "application/octet-stream"})
  2355. // 下载文件名称
  2356. const fileName = row.fileName
  2357. // a标签下载
  2358. const linkNode = document.createElement('a')
  2359. // a标签的download属性规定下载文件的名称
  2360. linkNode.download = fileName
  2361. linkNode.style.display = 'none'
  2362. // 生成一个Blob URL
  2363. linkNode.href = URL.createObjectURL(blob)
  2364. document.body.appendChild(linkNode)
  2365. // 模拟在按钮上的一次鼠标单击
  2366. linkNode.click()
  2367. // 释放URL 对象
  2368. URL.revokeObjectURL(linkNode.href)
  2369. document.body.removeChild(linkNode)
  2370. })
  2371. },
  2372. // 预览
  2373. previewFile (row) {
  2374. // 预览文件
  2375. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  2376. let type = ''
  2377. if (image.includes(row.fileType.toLowerCase())) {
  2378. type = 'image/' + row.fileType
  2379. }
  2380. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  2381. if (video.includes(row.fileType.toLowerCase())) {
  2382. type = 'video/' + row.fileType
  2383. }
  2384. let txt = ['txt']
  2385. if (txt.includes(row.fileType.toLowerCase())) {
  2386. type = 'text/plain'
  2387. }
  2388. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  2389. if (office.includes(row.fileType.toLowerCase())) {
  2390. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  2391. return
  2392. }
  2393. let pdf = ['pdf']
  2394. if (pdf.includes(row.fileType.toLowerCase())) {
  2395. type = 'application/pdf'
  2396. }
  2397. if (type === ''){
  2398. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  2399. return;
  2400. }
  2401. // downLoadObjectFile(row).then(({data}) => {
  2402. // const blob = new Blob([data], { type: type });
  2403. // // 创建URL来生成预览
  2404. // const fileURL = URL.createObjectURL(blob);
  2405. // // alert(blob)
  2406. // localStorage.setItem("imgUrl",fileURL)
  2407. // window.open(window.location.origin+"/#/image",'_blank')
  2408. // // 在新标签页中打开文件预览
  2409. // // const newTab = window.open(fileURL, '_blank')
  2410. // })
  2411. downLoadObjectFile(row).then(({data}) => {
  2412. const blob = new Blob([data], { type: type });
  2413. // 创建URL来生成预览
  2414. const fileURL = URL.createObjectURL(blob);
  2415. if (type.includes('image')) { // 图片
  2416. localStorage.setItem("imgUrl",fileURL)
  2417. window.open(window.location.origin+"/#/image",'_blank')
  2418. } else {
  2419. // 在新标签页中打开文件预览
  2420. const newTab = window.open(fileURL, '_blank')
  2421. }
  2422. })
  2423. },
  2424. // 删除文件
  2425. deleteFile (row) {
  2426. let tempData = {
  2427. site: row.orderRef1,
  2428. inspectionNo: row.orderRef2,
  2429. buNo: row.orderRef4,
  2430. partNo: this.fileData.partNo,
  2431. inspectionTypeNo: '109'
  2432. }
  2433. this.$confirm('确定要删除此文件?', '提示', {
  2434. confirmButtonText: '确定',
  2435. cancelButtonText: '取消',
  2436. type: 'warning'
  2437. }).then(() => {
  2438. deleteObjectFile(row).then(({data}) => {
  2439. if (data && data.code == 0) {
  2440. this.getFileContentData(tempData)
  2441. this.$message({
  2442. message: '操作成功',
  2443. type: 'success',
  2444. duration: 1500,
  2445. onClose: () => {}
  2446. })
  2447. } else {
  2448. this.$alert(data.msg, '错误', {
  2449. confirmButtonText: '确定'
  2450. })
  2451. }
  2452. })
  2453. }).catch(() => {
  2454. })
  2455. },
  2456. // 获取基础数据列表S
  2457. getBaseList (val,type) {
  2458. this.tagNo = val
  2459. this.$nextTick(() => {
  2460. let strVal = ''
  2461. let conSql = ''
  2462. if (val === 1037) {
  2463. strVal = this.modalData.detailCodeNo
  2464. this.$refs.baseList.init(val, strVal)
  2465. }
  2466. if (val === 1040) {
  2467. strVal = this.modalData.inspectorNo
  2468. this.$refs.baseList.init(val, strVal)
  2469. }
  2470. if (val === 207) {
  2471. strVal = this.changeData.samplingProgrammeNo
  2472. conSql = " and bu_no = '" + this.changeData.buNo + "'"
  2473. this.$refs.baseList.init(val, strVal, conSql)
  2474. }
  2475. if (val === 208) {
  2476. strVal = this.changeData.samplingLevelNo
  2477. conSql = " and bu_no = '" + this.changeData.buNo + "'"
  2478. this.$refs.baseList.init(val, strVal, conSql)
  2479. }
  2480. if (val === 509) {
  2481. strVal = this.detailData.responsiblePerson
  2482. this.$refs.baseList.init(val, strVal)
  2483. }
  2484. })
  2485. },
  2486. // 列表方法的回调
  2487. getBaseData (val) {
  2488. if (this.tagNo === 1037) {
  2489. this.modalData.detailCodeNo = val.code_no
  2490. this.modalData.detailCodeDesc = val.code_desc
  2491. }
  2492. if (this.tagNo === 1040) {
  2493. this.modalData.inspectorNo = val.inspector_no
  2494. this.modalData.inspectorName = val.inspector_name
  2495. }
  2496. if (this.tagNo === 207) {
  2497. this.changeData.samplingProgrammeNo = val.sampling_programme_no
  2498. this.changeData.samplingProgrammeDesc = val.sampling_programme_desc
  2499. }
  2500. if (this.tagNo === 208) {
  2501. this.changeData.samplingLevelNo = val.sampling_level_no
  2502. this.changeData.samplingLevelDesc = val.sampling_level_desc
  2503. }
  2504. if (this.tagNo === 509) {
  2505. this.detailData.responsiblePerson = val.SupplierID
  2506. }
  2507. },
  2508. // 获取主信息数据列表
  2509. getDataList () {
  2510. this.searchData.limit = this.pageSize
  2511. this.searchData.page = this.pageIndex
  2512. qcOQCInspectionSearch(this.searchData).then(({data}) => {
  2513. if (data.code === 0) {
  2514. this.dataList = data.page.list
  2515. this.pageIndex = data.page.currPage
  2516. this.pageSize = data.page.pageSize
  2517. this.totalPage = data.page.totalCount
  2518. }
  2519. })
  2520. },
  2521. // 每页数
  2522. sizeChangeHandle (val) {
  2523. this.pageSize = val
  2524. this.pageIndex = 1
  2525. this.getDataList()
  2526. },
  2527. // 当前页
  2528. currentChangeHandle (val) {
  2529. this.pageIndex = val
  2530. this.getDataList()
  2531. },
  2532. // 多选
  2533. selectionChangeHandle (val) {
  2534. this.dataListSelections = val
  2535. },
  2536. async Transfer (type) {
  2537. if (type === '2') {
  2538. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  2539. this.$message.warning('请选择检验结论!')
  2540. return
  2541. }
  2542. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  2543. this.$message.warning('请选择处置措施!')
  2544. return
  2545. }
  2546. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  2547. const flag = this.detailList.some(item => item.itemResult === 'N')
  2548. if (!flag) {
  2549. this.$message.warning('请选择不合格项目!')
  2550. return
  2551. }
  2552. }
  2553. if (this.detailData.inspectionResult !== '不合格') {
  2554. this.detailData.disposalMeasures = ''
  2555. this.detailData.disposalRemark = ''
  2556. }
  2557. }
  2558. this.saveDetailInformation(type)
  2559. },
  2560. // 新增明细信息
  2561. saveDetailInformation (type) {
  2562. this.saveInformationData.site = this.detailData.site
  2563. this.saveInformationData.buNo = this.detailData.buNo
  2564. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  2565. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  2566. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  2567. this.saveInformationData.inspectorNo = this.$store.state.user.name
  2568. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  2569. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  2570. this.saveInformationData.rollCount = this.detailData.rollCount
  2571. this.saveInformationData.samplingQty = this.detailData.samplingQty
  2572. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  2573. this.saveInformationData.partNo = this.detailData.partNo
  2574. this.saveInformationData.partDesc = this.detailData.partDesc
  2575. this.saveInformationData.operator = this.detailData.operator
  2576. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  2577. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  2578. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  2579. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  2580. this.saveInformationData.type = type
  2581. this.transferLoadFlag = true
  2582. saveFQASDetailedRecord(this.saveInformationData).then(({data}) => {
  2583. if (data && data.code === 0) {
  2584. this.searchData.inspectionNo = ''
  2585. this.getDataList()
  2586. this.detailInformationFlag = false
  2587. this.$message({
  2588. message: '操作成功',
  2589. type: 'success',
  2590. duration: 1500,
  2591. onClose: () => {}
  2592. })
  2593. } else {
  2594. this.$alert(data.msg, '错误', {
  2595. confirmButtonText: '确定'
  2596. })
  2597. }
  2598. }).finally(()=>{
  2599. this.transferLoadFlag = false
  2600. })
  2601. },
  2602. // 开始检验
  2603. actionModal (row) {
  2604. this.$confirm(`确认开始检验?`, '提示', {
  2605. confirmButtonText: '确定',
  2606. cancelButtonText: '取消',
  2607. type: 'warning'
  2608. }).then(() => {
  2609. let tempData = {
  2610. site: row.site,
  2611. buNo: row.buNo,
  2612. inspectionNo: row.inspectionNo,
  2613. actionBy: this.$store.state.user.name,
  2614. state: '待检验'
  2615. }
  2616. actionFQASInspection(tempData).then(async ({data}) => {
  2617. if (data && data.code === 0) {
  2618. this.$message({
  2619. message: '操作成功',
  2620. type: 'success',
  2621. duration: 1500,
  2622. onClose: () => {
  2623. }
  2624. })
  2625. this.searchData.inspectionNo = row.inspectionNo
  2626. await this.getDataList()
  2627. this.detailModal(row)
  2628. } else {
  2629. await this.$alert(data.msg, '错误', {
  2630. confirmButtonText: '确定'
  2631. })
  2632. }
  2633. })
  2634. })
  2635. },
  2636. // 明细记录信息查询
  2637. detailModal (row) {
  2638. this.detailData.site = row.site
  2639. this.detailData.buNo = row.buNo
  2640. this.detailData.inspectionNo = row.inspectionNo
  2641. this.detailData.partNo = row.partNo
  2642. this.detailData.partDesc = row.partDesc
  2643. this.detailData.rollQty = row.rollQty
  2644. this.detailData.samplingQty = row.samplingQty
  2645. this.detailData.unqualifiedQty = row.unqualifiedQty
  2646. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  2647. this.detailData.submitFlag = row.submitFlag
  2648. this.detailData.disposalMeasures = row.disposalMeasures
  2649. this.detailData.disposalRemark = row.disposalRemark
  2650. this.detailData.inspectionResult = row.inspectionResult
  2651. this.detailData.inspectorNo = row.inspectorNo
  2652. this.detailData.inspectionRemark = row.inspectionRemark
  2653. this.detailData.umId = row.umId
  2654. this.detailData.rollCount = row.rollCount
  2655. this.detailData.operator = row.operator
  2656. this.detailData.operatorName = row.operatorName
  2657. this.detailData.responsiblePerson = row.responsiblePerson
  2658. this.detailData.responsiblePersonName = row.responsiblePersonName
  2659. if (row.state === '待检验') {
  2660. this.detailData.passQty = row.samplingQty
  2661. } else {
  2662. this.detailData.passQty = row.passQty
  2663. this.detailData.notPassQty = row.notPassQty
  2664. }
  2665. this.getInspectionFormData()
  2666. // this.acquisitionList = []
  2667. this.detailInformationFlag = true
  2668. },
  2669. // 检验单明细
  2670. getInspectionFormData () {
  2671. fqasDetailSearch(this.detailData).then(({data}) => {
  2672. if (data && data.code === 0) {
  2673. this.detailList = data.rows
  2674. } else {
  2675. this.detailList = []
  2676. }
  2677. })
  2678. },
  2679. // 子明细记录信息查询
  2680. subDetailModal (row) {
  2681. this.subDetailData = row
  2682. this.pageIndex2 = 1
  2683. selectFQASSubDetailedRecord(this.subDetailData).then(({data}) => {
  2684. this.tableData = data.rows
  2685. })
  2686. this.batchAddData = {
  2687. samplingLocation: '',
  2688. samplingLocationB: '',
  2689. samplingNumber: ''
  2690. }
  2691. this.subDetailFlag = true
  2692. },
  2693. // 删除检验记录
  2694. deleteModal () {
  2695. if (this.FQASSelections.length === 0) {
  2696. this.$message.warning('请勾选要删除的检验单!')
  2697. return
  2698. }
  2699. this.$confirm(`是否删除该 `+ this.FQASSelections.length +` 条检验记录?`, '提示', {
  2700. confirmButtonText: '确定',
  2701. cancelButtonText: '取消',
  2702. type: 'warning'
  2703. }).then(() => {
  2704. let tempData = {
  2705. site: '',
  2706. submitList: this.FQASSelections
  2707. }
  2708. fqasRecordDelete(tempData).then(({data}) => {
  2709. if (data && data.code === 0) {
  2710. this.getDataList()
  2711. this.FQASSelections = []
  2712. this.$message({
  2713. message: '操作成功',
  2714. type: 'success',
  2715. duration: 1500,
  2716. onClose: () => {}
  2717. })
  2718. } else {
  2719. this.$alert(data.msg, '错误', {
  2720. confirmButtonText: '确定'
  2721. })
  2722. }
  2723. })
  2724. }).catch(() => {
  2725. })
  2726. },
  2727. // 任务重载
  2728. overLoadModal () {
  2729. if (this.FQASSelections.length === 0) {
  2730. this.$message.warning('请勾选要重载的检验单!')
  2731. return
  2732. }
  2733. if (this.FQASSelections.every(val => val.state === '待检验' || val.state === '未开始')) {
  2734. this.$confirm(`是否重载该 `+ this.FQASSelections.length +` 条检验单?`, '提示', {
  2735. confirmButtonText: '确定',
  2736. cancelButtonText: '取消',
  2737. type: 'warning'
  2738. }).then(() => {
  2739. let tempData = {
  2740. site: '',
  2741. submitList: this.FQASSelections
  2742. }
  2743. this.overLoading = true
  2744. fqasRecordOverLoad(tempData).then(({data}) => {
  2745. if (data && data.code === 0) {
  2746. this.getDataList()
  2747. this.FQASSelections = []
  2748. this.$message({
  2749. message: '操作成功',
  2750. type: 'success',
  2751. duration: 1500,
  2752. onClose: () => {}
  2753. })
  2754. this.overLoading = false
  2755. } else {
  2756. this.overLoading = false
  2757. this.$alert(data.msg, '错误', {
  2758. confirmButtonText: '确定'
  2759. })
  2760. }
  2761. }).catch(() => {
  2762. this.overLoading = false
  2763. })
  2764. })
  2765. } else {
  2766. this.$message.warning('检验单必须为待检验状态!')
  2767. return
  2768. }
  2769. },
  2770. // 审核按钮
  2771. submitResult () {
  2772. let tempData1 = '' // 记录不是待审核状态的单号
  2773. let tempData2 = '' // 记录处置措施未填写的单号
  2774. if (this.FQASSelections.length === 0) {
  2775. this.$message.warning('请勾选要审核的检验单!')
  2776. return
  2777. }
  2778. for (let i = 0; i < this.FQASSelections.length; i++) {
  2779. if (this.FQASSelections[i].state !== '待审核'){
  2780. tempData1 = tempData1 + this.FQASSelections[i].inspectionNo + '、'
  2781. }
  2782. if (this.FQASSelections[i].inspectionResult === '不合格' && (this.FQASSelections[i].disposalMeasures === '' || this.FQASSelections[i].disposalMeasures == null)) {
  2783. tempData2 = tempData2 + this.FQASSelections[i].inspectionNo + '、'
  2784. }
  2785. }
  2786. if (tempData1 !== '') {
  2787. tempData1 = tempData1.substring(0, tempData1.length - 1)
  2788. this.$message.warning('检验单号 ' + tempData1 + ' 不是待审核状态!')
  2789. return
  2790. }
  2791. if (tempData2 !== '') {
  2792. tempData2 = tempData2.substring(0, tempData2.length - 1)
  2793. this.$message.warning('检验单号 ' + tempData2 + ' 的处置措施未选择!')
  2794. return
  2795. }
  2796. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FQASSelections.length + ` 条记录`, '提示', {
  2797. confirmButtonText: '确定',
  2798. cancelButtonText: '取消',
  2799. type: 'warning'
  2800. }).then(() => {
  2801. this.submitData.submitList = this.FQASSelections
  2802. saveFQASSubmitResult(this.submitData).then(({data}) => {
  2803. if (data && data.code === 0) {
  2804. this.getDataList()
  2805. this.FQASSelections = []
  2806. this.$message({
  2807. message: '操作成功',
  2808. type: 'success',
  2809. duration: 1500,
  2810. onClose: () => {}
  2811. })
  2812. } else {
  2813. this.$alert(data.msg, '错误', {
  2814. confirmButtonText: '确定'
  2815. })
  2816. }
  2817. })
  2818. }).catch(() => {
  2819. })
  2820. },
  2821. // 子明细每页数
  2822. sizeChangeHandle2 (val) {
  2823. this.pageSize2 = val
  2824. },
  2825. // 子明细当前页
  2826. currentChangeHandle2 (val) {
  2827. this.pageIndex2 = val
  2828. },
  2829. // 子明细方法
  2830. // 表格的新增
  2831. rowClassName ({ row, rowIndex }) {
  2832. row.xh = rowIndex + 1
  2833. row.rowI = this.tableData.indexOf(row) + 1
  2834. },
  2835. // 单选框选中数据
  2836. handleDetailSelectionChange(selection) {
  2837. this.checkedDetail = selection
  2838. },
  2839. // 点击新增更多
  2840. handleAddBtn (td) {
  2841. checkFQASIsSubmit(td).then(({data}) => {
  2842. if (data.flag !== 1) {
  2843. let obj = {
  2844. subDetailValue: '',
  2845. samplingLocation: '',
  2846. samplingLocationB: '',
  2847. subDetailValueB: '',
  2848. subDetailValueC: '',
  2849. subDetailValueD: '',
  2850. subDetailValueE: '',
  2851. }
  2852. this.tableData.push(obj)
  2853. } else {
  2854. this.$message.error('记录已提交')
  2855. }
  2856. })
  2857. },
  2858. // 批量新增操作
  2859. batchHandleAdd (td) {
  2860. checkFQASIsSubmit(td).then(({data}) => {
  2861. if (data.flag !== 1) {
  2862. this.batchHandleAddModalFlag = true
  2863. } else {
  2864. this.$alert("记录已提交!", '错误', {
  2865. confirmButtonText: '确定'
  2866. })
  2867. }
  2868. })
  2869. },
  2870. // 批量新增行
  2871. batchHandleAddModal () {
  2872. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  2873. let obj = {
  2874. samplingLocation: this.batchAddData.samplingLocation,
  2875. samplingLocationB: this.batchAddData.samplingLocationB,
  2876. subDetailValue: '',
  2877. subDetailValueB: '',
  2878. subDetailValueC: '',
  2879. subDetailValueD: '',
  2880. subDetailValueE: '',
  2881. }
  2882. this.tableData.push(obj)
  2883. }
  2884. this.batchHandleAddModalFlag = false
  2885. },
  2886. // 回车事件
  2887. nextFocus1 (index) {
  2888. let a1 = `${index + 1}` + `a`
  2889. this.$nextTick(() => {
  2890. this.$refs[a1].focus()
  2891. })
  2892. },
  2893. nextFocus2 (index) {
  2894. let a2 = `${index + 1}` + `b`
  2895. this.$nextTick(() => {
  2896. this.$refs[a2].focus()
  2897. })
  2898. },
  2899. nextFocus3 (index) {
  2900. let a3 = `${index + 1}` + `c`
  2901. this.$nextTick(() => {
  2902. this.$refs[a3].focus()
  2903. })
  2904. },
  2905. nextFocus4 (index) {
  2906. let a = `${index + 1}` + `d`
  2907. this.$nextTick(() => {
  2908. this.$refs[a].focus()
  2909. })
  2910. },
  2911. nextFocus5 (index) {
  2912. let a = `${index + 1}` + `e`
  2913. this.$nextTick(() => {
  2914. this.$refs[a].focus()
  2915. })
  2916. },
  2917. nextFocus6 (index) {
  2918. let a = `${index + 1}` + `f`
  2919. this.$nextTick(() => {
  2920. this.$refs[a].focus()
  2921. })
  2922. },
  2923. nextFocus7 (index) {
  2924. let a = `${index + 1}` + `g`
  2925. this.$nextTick(() => {
  2926. this.$refs[a].focus()
  2927. })
  2928. },
  2929. focusNextInput (index, type) {
  2930. let aaa = ''
  2931. if (this.detailList.length - 1 === index) {
  2932. aaa = `${type}0`
  2933. } else {
  2934. aaa = `${type}${index + 1}`
  2935. }
  2936. this.$nextTick(() => {
  2937. this.$refs[aaa].focus()
  2938. })
  2939. },
  2940. //删除
  2941. handleDeleteBtn (td) {
  2942. checkFQASIsSubmit(td).then(({data}) => {
  2943. if (data.flag !== 1) {
  2944. if (this.checkedDetail.length === 0) {
  2945. this.$alert("请先选择要删除的数据", "提示", {
  2946. confirmButtonText: "确定",
  2947. })
  2948. } else {
  2949. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  2950. confirmButtonText: "确定",
  2951. cancelButtonText: "取消",
  2952. type: "warning",
  2953. callback: (action) => {
  2954. if (action === "confirm") {
  2955. let val = this.checkedDetail
  2956. val.forEach((val, index) => {
  2957. this.tableData.splice(this.tableData.indexOf(val), 1)
  2958. if (this.templateTableData.length === 0) {
  2959. this.pageIndex2--
  2960. }
  2961. })
  2962. this.$message({
  2963. message: "删除成功!",
  2964. type: "success",
  2965. })
  2966. return
  2967. } else {
  2968. this.$message({
  2969. message: "已取消删除操作",
  2970. type: "warning",
  2971. })
  2972. return
  2973. }
  2974. },
  2975. })
  2976. }
  2977. } else {
  2978. this.$alert("记录已提交!", '错误', {
  2979. confirmButtonText: '确定'
  2980. })
  2981. }
  2982. })
  2983. },
  2984. // 新增子明细记录
  2985. saveSubDetailResult () {
  2986. for (let i = 0; i < this.tableData.length; i++) {
  2987. if(this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null){
  2988. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  2989. return
  2990. }
  2991. }
  2992. this.subDetailData.subDetailValues = this.tableData
  2993. saveFQASSubDetailed(this.subDetailData).then(({data}) => {
  2994. if (data && data.code === 0) {
  2995. if (data.count > 0) {
  2996. this.subDetailData.itemResult = 'N'
  2997. this.subDetailData.unqualifiedQuantity = data.count
  2998. }
  2999. if (this.subDetailData.subDetailValues.length > 0) {
  3000. this.subDetailData.subDetailRecordNum = 1
  3001. } else {
  3002. this.subDetailData.subDetailRecordNum = -1
  3003. this.subDetailData.unqualifiedQuantity = 0
  3004. this.subDetailData.itemResult = 'Y'
  3005. }
  3006. this.subDetailFlag = false
  3007. this.tableData = []
  3008. this.$message({
  3009. message: '操作成功',
  3010. type: 'success',
  3011. duration: 1500,
  3012. onClose: () => {}
  3013. })
  3014. } else {
  3015. this.$alert(data.msg, '错误', {
  3016. confirmButtonText: '确定'
  3017. })
  3018. }
  3019. })
  3020. },
  3021. // 更改检验方式
  3022. changeInspectionModal (row) {
  3023. this.changeData = {
  3024. site: row.site,
  3025. buNo: row.buNo,
  3026. inspectionNo: row.inspectionNo,
  3027. rollCount: row.rollCount,
  3028. inspectCode: '',
  3029. qtySample: '',
  3030. percentSample: '',
  3031. samplingProgrammeNo: '',
  3032. samplingProgrammeDesc: '',
  3033. samplingLevelNo: '',
  3034. samplingLevelDesc: '',
  3035. receiptNo: row.receiptNo,
  3036. receiptItemNo: row.receiptItemNo,
  3037. inspectionTypeNo: '108'
  3038. }
  3039. this.changeModalFlag = true
  3040. },
  3041. // 保存修改
  3042. changeInspectionWay () {
  3043. if (this.changeData.inspectCode === '' || this.changeData.inspectCode == null) {
  3044. this.$message.warning('请选择检验方式!')
  3045. return
  3046. }
  3047. if (this.changeData.inspectCode === '数量抽检' && (this.changeData.qtySample == null || this.changeData.qtySample === '' || this.changeData.qtySample === 0)) {
  3048. this.$message.warning('请填写抽检数量!')
  3049. return
  3050. }
  3051. if (this.changeData.inspectCode === '比例抽检' && (this.changeData.percentSample == null || this.changeData.percentSample === '' || this.changeData.percentSample === 0)) {
  3052. this.$message.warning('请填写抽检比例!')
  3053. return
  3054. }
  3055. if (this.changeData.inspectCode === '不固定抽检' && (this.changeData.samplingProgrammeNo == null || this.changeData.samplingProgrammeNo === '')) {
  3056. this.$message.warning('请选择抽样方案!')
  3057. return
  3058. }
  3059. if (this.changeData.inspectCode === '不固定抽检' && (this.changeData.samplingLevelNo === null || this.changeData.samplingLevelNo === '')) {
  3060. this.$message.warning('请选择检验水平!')
  3061. return
  3062. }
  3063. if (this.changeData.inspectCode === '数量抽检' && this.changeData.qtySample > this.changeData.rollCount) {
  3064. this.$message.warning('抽检数量不能大于送检数量,当前检验单送检数量为[]!')
  3065. return
  3066. }
  3067. changeInspectionWay(this.changeData).then(({data}) => {
  3068. if (data && data.code === 0) {
  3069. this.getDataList()
  3070. this.changeModalFlag = false
  3071. this.$message({
  3072. message: '操作成功',
  3073. type: 'success',
  3074. duration: 1500,
  3075. onClose: () => {}
  3076. })
  3077. } else {
  3078. this.$alert(data.msg, '错误', {
  3079. confirmButtonText: '确定'
  3080. })
  3081. }
  3082. })
  3083. },
  3084. // 校验用户是否收藏
  3085. favoriteIsOk () {
  3086. let userFavorite = {
  3087. userId: this.$store.state.user.id,
  3088. languageCode: this.$i18n.locale
  3089. }
  3090. userFavoriteList(userFavorite).then(({data}) => {
  3091. for (let i = 0; i < data.list.length; i++) {
  3092. if (this.$route.meta.menuId === data.list[i].menuId) {
  3093. this.favorite = true
  3094. }
  3095. }
  3096. })
  3097. },
  3098. // 收藏 OR 取消收藏
  3099. favoriteFunction () {
  3100. let userFavorite = {
  3101. userId: this.$store.state.user.id,
  3102. functionId: this.$route.meta.menuId,
  3103. }
  3104. if (this.favorite) {
  3105. removeUserFavorite(userFavorite).then(({data}) => {
  3106. this.$message.success(data.msg)
  3107. this.favorite = false
  3108. })
  3109. } else {
  3110. // 收藏
  3111. saveUserFavorite(userFavorite).then(({data}) => {
  3112. this.$message.success(data.msg)
  3113. this.favorite = true
  3114. })
  3115. }
  3116. },
  3117. //导出excel
  3118. async createExportData () {
  3119. this.searchData.limit = -1
  3120. this.searchData.page = 1
  3121. await qcOQCInspectionSearch(this.searchData).then(({data}) => {
  3122. this.exportList = data.page.list
  3123. })
  3124. return this.exportList
  3125. },
  3126. startDownload() {},
  3127. finishDownload() {},
  3128. fields () {
  3129. let json = "{"
  3130. this.columnList1.forEach((item, index) => {
  3131. if (index == this.columnList1.length - 1) {
  3132. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  3133. } else {
  3134. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  3135. }
  3136. })
  3137. json += "}"
  3138. let s = eval("(" + json + ")")
  3139. return s
  3140. },
  3141. // 动态列开始 获取 用户保存的 格式列
  3142. async getTableUserColumn (tableId, columnId) {
  3143. let queryTableUser = {
  3144. userId: this.$store.state.user.name,
  3145. functionId: this.$route.meta.menuId,
  3146. tableId: tableId,
  3147. status: true,
  3148. languageCode: this.$i18n.locale
  3149. }
  3150. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3151. if (data.rows.length > 0) {
  3152. //this.columnList1 = []
  3153. switch (columnId) {
  3154. case 1:
  3155. this.columnList1 = data.rows
  3156. break;
  3157. case 2:
  3158. this.detailColumnList = data.rows
  3159. break;
  3160. }
  3161. } else {
  3162. this.getColumnList(tableId, columnId)
  3163. }
  3164. })
  3165. },
  3166. // 获取 tableDefault 列
  3167. async getColumnList (tableId, columnId) {
  3168. let queryTable = {
  3169. functionId: this.$route.meta.menuId,
  3170. tableId: tableId,
  3171. languageCode: this.$i18n.locale
  3172. }
  3173. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3174. if (!data.rows.length == 0) {
  3175. switch (columnId) {
  3176. case 1:
  3177. this.columnList1 = data.rows
  3178. break;
  3179. case 2:
  3180. this.detailColumnList = data.rows
  3181. break;
  3182. }
  3183. }
  3184. })
  3185. },
  3186. /**
  3187. * 明细导入后将返回值回传给父组件
  3188. * @param val
  3189. */
  3190. changeMyString (val) {
  3191. for (let i = 0; i < this.detailList.length; i++) {
  3192. if (val[this.detailList[i].itemNo] !== undefined) {
  3193. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  3194. if (val[this.detailList[i].itemNo] != null) {
  3195. this.detailList[i].subDetailRecordNum = 1
  3196. }
  3197. if (val[this.detailList[i].itemNo] > 0) {
  3198. this.detailList[i].itemResult = 'N'
  3199. }
  3200. }
  3201. }
  3202. },
  3203. //获取按钮的权限数据
  3204. getButtonAuthData () {
  3205. let searchFlag = this.isAuth(this.menuId+":search")
  3206. let checkFlag = this.isAuth(this.menuId+":check")
  3207. let overLoadFlag = this.isAuth(this.menuId+":overLoad")
  3208. let deleteFlag = this.isAuth(this.menuId+":delete")
  3209. let detailFlag = this.isAuth(this.menuId+":detail")
  3210. let fileFlag = this.isAuth(this.menuId+":file")
  3211. let changeFlag = this.isAuth(this.menuId+":change")
  3212. //处理页面的权限数据
  3213. this.authSearch = !searchFlag
  3214. this.authCheck = !checkFlag
  3215. this.authOverLoad = !overLoadFlag
  3216. this.authDelete = !deleteFlag
  3217. this.authDetail = !detailFlag
  3218. this.authFile = !fileFlag
  3219. this.authChange = !changeFlag
  3220. },
  3221. // ======================== OQC检验项目操作相关方法 ========================
  3222. openItemOperationDialog() {
  3223. this.itemOperationQuery = { itemNo: '', itemDesc: '' }
  3224. this.searchOQCItems()
  3225. this.itemOperationDialogFlag = true
  3226. },
  3227. async searchOQCItems() {
  3228. try {
  3229. const params = {
  3230. site: this.detailData.site,
  3231. buNo: this.detailData.buNo,
  3232. inspectionNo: this.detailData.inspectionNo,
  3233. itemNo: this.itemOperationQuery.itemNo || '',
  3234. itemDesc: this.itemOperationQuery.itemDesc || ''
  3235. }
  3236. const { data } = await getOQCItemList(params)
  3237. if (data && data.code === 0) {
  3238. this.availableItemList = data.row1 || []
  3239. this.selectedItemList = data.row2 || []
  3240. }
  3241. } catch (error) {
  3242. this.$message.error('查询检验项目失败')
  3243. }
  3244. },
  3245. availableItemClickRow(row) {
  3246. this.$refs.availableItemTable.toggleRowSelection(row)
  3247. },
  3248. availableItemSelectionChange(selection) {
  3249. this.availableItemSelections = selection
  3250. },
  3251. selectedItemClickRow(row) {
  3252. this.$refs.selectedItemTable.toggleRowSelection(row)
  3253. },
  3254. selectedItemSelectionChange(selection) {
  3255. this.selectedItemSelections = selection
  3256. },
  3257. async addInspectionItems() {
  3258. if (!this.availableItemSelections || this.availableItemSelections.length === 0) {
  3259. this.$message.warning('请选择要添加的项目')
  3260. return
  3261. }
  3262. this.$confirm('确认添加选中的检验项目吗?', '提示', {
  3263. confirmButtonText: '确定',
  3264. cancelButtonText: '取消',
  3265. type: 'warning'
  3266. }).then(async () => {
  3267. try {
  3268. const params = {
  3269. site: this.detailData.site,
  3270. buNo: this.detailData.buNo,
  3271. inspectionNo: this.detailData.inspectionNo,
  3272. itemList: this.availableItemSelections.map(item => ({ itemNo: item.itemNo }))
  3273. }
  3274. const { data } = await addOQCItemDetails(params)
  3275. if (data && data.code === 0) {
  3276. this.$message.success('添加成功')
  3277. this.searchOQCItems()
  3278. } else {
  3279. this.$message.error(data.msg || '添加失败')
  3280. }
  3281. } catch (error) {
  3282. this.$message.error('添加失败,请检查')
  3283. }
  3284. }).catch(() => {
  3285. this.$message.info('已取消添加')
  3286. })
  3287. },
  3288. async deleteInspectionItems() {
  3289. if (!this.selectedItemSelections || this.selectedItemSelections.length === 0) {
  3290. this.$message.warning('请选择要移除的项目')
  3291. return
  3292. }
  3293. this.$confirm('确认移除选中的检验项目吗?(将同时删除该项目的子明细数据)', '提示', {
  3294. confirmButtonText: '确定',
  3295. cancelButtonText: '取消',
  3296. type: 'warning'
  3297. }).then(async () => {
  3298. try {
  3299. const params = {
  3300. site: this.detailData.site,
  3301. buNo: this.detailData.buNo,
  3302. inspectionNo: this.detailData.inspectionNo,
  3303. itemList: this.selectedItemSelections.map(item => ({ itemNo: item.itemNo }))
  3304. }
  3305. const { data } = await deleteOQCItemDetails(params)
  3306. if (data && data.code === 0) {
  3307. this.$message.success('移除成功')
  3308. this.searchOQCItems()
  3309. } else {
  3310. this.$message.error(data.msg || '移除失败')
  3311. }
  3312. } catch (error) {
  3313. this.$message.error('移除失败,请检查')
  3314. }
  3315. }).catch(() => {
  3316. this.$message.info('已取消移除')
  3317. })
  3318. },
  3319. refreshInspectionDetailList() {
  3320. if (this.detailInformationFlag) {
  3321. this.getInspectionFormData()
  3322. }
  3323. },
  3324. // ======================== OQC模板导入相关方法 ========================
  3325. openTemplateImportDialog() {
  3326. this.templateQuery = { templateId: '', templateDesc: '' }
  3327. this.searchOQCTemplates()
  3328. this.templateImportDialogFlag = true
  3329. },
  3330. async searchOQCTemplates() {
  3331. try {
  3332. const params = {
  3333. site: this.detailData.site,
  3334. buNo: this.detailData.buNo,
  3335. templateId: this.templateQuery.templateId || '',
  3336. templateDesc: this.templateQuery.templateDesc || ''
  3337. }
  3338. const { data } = await getOQCTemplateList(params)
  3339. if (data && data.code === 0) {
  3340. this.templateList = data.rows || []
  3341. }
  3342. } catch (error) {
  3343. this.$message.error('查询模板失败')
  3344. }
  3345. },
  3346. templateClickRow(row) {
  3347. this.$refs.templateTable.toggleRowSelection(row)
  3348. },
  3349. templateSelectionChange(selection) {
  3350. this.templateSelections = selection
  3351. },
  3352. confirmImportTemplate() {
  3353. if (!this.templateSelections || this.templateSelections.length === 0) {
  3354. this.$message.warning('请选择要导入的模板')
  3355. return
  3356. }
  3357. this.$confirm(`确认导入选中的 ${this.templateSelections.length} 个模板吗?`, '提示', {
  3358. confirmButtonText: '确定',
  3359. cancelButtonText: '取消',
  3360. type: 'warning'
  3361. }).then(async () => {
  3362. this.importLoading = true
  3363. try {
  3364. const params = {
  3365. site: this.detailData.site,
  3366. buNo: this.detailData.buNo,
  3367. inspectionNo: this.detailData.inspectionNo,
  3368. templateList: this.templateSelections.map(item => ({ templateId: item.templateId }))
  3369. }
  3370. const { data } = await importOQCTemplateItems(params)
  3371. if (data && data.code === 0) {
  3372. this.$message.success(`导入成功,共导入 ${data.importCount || 0} 个检验项目`)
  3373. this.templateImportDialogFlag = false
  3374. this.templateSelections = []
  3375. this.getInspectionFormData()
  3376. } else {
  3377. this.$message.error(data.msg || '导入失败')
  3378. }
  3379. } catch (error) {
  3380. this.$message.error('导入失败,请检查')
  3381. } finally {
  3382. this.importLoading = false
  3383. }
  3384. }).catch(() => {
  3385. this.$message.info('已取消导入')
  3386. })
  3387. },
  3388. resetTemplateQuery() {
  3389. this.templateQuery = { templateId: '', templateDesc: '' }
  3390. this.searchOQCTemplates()
  3391. },
  3392. }
  3393. }
  3394. </script>
  3395. <style scoped>
  3396. /* 搜索卡片样式 */
  3397. .search-card {
  3398. margin-bottom: 16px;
  3399. border-radius: 8px;
  3400. overflow: hidden;
  3401. transition: all 0.3s ease;
  3402. }
  3403. .search-card:hover {
  3404. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  3405. }
  3406. .search-card /deep/ .el-card__header {
  3407. padding: 5px 20px;
  3408. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3409. border-bottom: none;
  3410. }
  3411. .search-header {
  3412. display: flex;
  3413. justify-content: space-between;
  3414. align-items: center;
  3415. }
  3416. .header-left {
  3417. display: flex;
  3418. align-items: center;
  3419. color: #fff;
  3420. }
  3421. .header-left i {
  3422. font-size: 16px;
  3423. margin-right: 8px;
  3424. }
  3425. .header-title {
  3426. font-size: 14px;
  3427. font-weight: 600;
  3428. letter-spacing: 0.5px;
  3429. }
  3430. .header-right {
  3431. color: #fff;
  3432. }
  3433. .collapse-btn {
  3434. color: #fff;
  3435. font-weight: 500;
  3436. transition: all 0.3s ease;
  3437. }
  3438. .collapse-btn:hover {
  3439. color: #f0f0f0;
  3440. transform: translateY(-1px);
  3441. }
  3442. .collapse-btn i {
  3443. transition: transform 0.3s ease;
  3444. }
  3445. /* 搜索表单样式 */
  3446. .search-form {
  3447. padding: 10px 0;
  3448. min-height: 0;
  3449. }
  3450. /* 卡片主体样式 */
  3451. .search-card /deep/ .el-card__body {
  3452. padding: 10px 8px;
  3453. transition: all 0.3s ease;
  3454. }
  3455. /* 收起时的样式 */
  3456. .search-card.collapsed /deep/ .el-card__body {
  3457. padding: 10px 8px;
  3458. }
  3459. .search-form /deep/ .el-form-item {
  3460. margin-bottom: 18px;
  3461. }
  3462. .search-form /deep/ .el-form-item__label {
  3463. font-weight: 500;
  3464. color: #606266;
  3465. padding-bottom: 6px;
  3466. }
  3467. .search-form /deep/ .el-input__inner,
  3468. .search-form /deep/ .el-textarea__inner {
  3469. border-radius: 6px;
  3470. border: 1px solid #DCDFE6;
  3471. transition: all 0.3s ease;
  3472. }
  3473. .search-form /deep/ .el-input__inner:focus,
  3474. .search-form /deep/ .el-textarea__inner:focus {
  3475. border-color: #667eea;
  3476. box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
  3477. }
  3478. .search-form /deep/ .el-select {
  3479. width: 100%;
  3480. }
  3481. .search-form /deep/ .el-date-editor.el-input {
  3482. width: 100%;
  3483. }
  3484. /* 状态下拉框优化 */
  3485. .search-form /deep/ .status-select {
  3486. width: 100%;
  3487. }
  3488. .search-form /deep/ .status-select .el-select__tags {
  3489. max-width: calc(100% - 30px);
  3490. }
  3491. .search-form /deep/ .status-select .el-tag {
  3492. max-width: 100%;
  3493. overflow: hidden;
  3494. text-overflow: ellipsis;
  3495. white-space: nowrap;
  3496. }
  3497. /* 操作按钮区域 */
  3498. .search-actions {
  3499. display: flex;
  3500. justify-content: space-between;
  3501. align-items: center;
  3502. padding: 8px 0 2px 0;
  3503. }
  3504. /* 展开时显示上边框 */
  3505. .search-card:not(.collapsed) .search-actions {
  3506. border-top: 1px solid #f0f0f0;
  3507. margin-top: 8px;
  3508. }
  3509. /* 收起时不显示上边框和上边距 */
  3510. .search-card.collapsed .search-actions {
  3511. border-top: none;
  3512. margin-top: 0;
  3513. padding-top: 0;
  3514. }
  3515. .action-left,
  3516. .action-right {
  3517. display: flex;
  3518. gap: 8px;
  3519. }
  3520. .search-actions .el-button {
  3521. border-radius: 4px;
  3522. padding: 5px 10px;
  3523. font-size: 12px;
  3524. font-weight: 500;
  3525. transition: all 0.3s ease;
  3526. }
  3527. .search-actions .el-button:hover {
  3528. transform: translateY(-2px);
  3529. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  3530. }
  3531. .search-actions .el-button--primary {
  3532. background: #60aeff;
  3533. border-color: #60aeff;
  3534. }
  3535. .search-actions .el-button--primary:hover {
  3536. background: #7dbdff;
  3537. border-color: #7dbdff;
  3538. }
  3539. .search-actions .el-button--success {
  3540. background: #67C23A;
  3541. border-color: #67C23A;
  3542. }
  3543. .search-actions .el-button--success:hover {
  3544. background: #85ce61;
  3545. border-color: #85ce61;
  3546. }
  3547. .search-actions .el-button--danger {
  3548. background: #F56C6C;
  3549. border-color: #F56C6C;
  3550. }
  3551. .search-actions .el-button--danger:hover {
  3552. background: #f78989;
  3553. border-color: #f78989;
  3554. }
  3555. .search-actions .el-button--warning {
  3556. background: #E6A23C;
  3557. border-color: #E6A23C;
  3558. }
  3559. .search-actions .el-button--warning:hover {
  3560. background: #ebb563;
  3561. border-color: #ebb563;
  3562. }
  3563. /* 响应式设计 */
  3564. @media (max-width: 1200px) {
  3565. .search-actions {
  3566. flex-direction: column;
  3567. gap: 10px;
  3568. }
  3569. .action-left,
  3570. .action-right {
  3571. width: 100%;
  3572. justify-content: center;
  3573. }
  3574. }
  3575. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  3576. color: red;
  3577. font-weight: bold;
  3578. }
  3579. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  3580. color: rgb(103,194,58);
  3581. font-weight: bold;
  3582. }
  3583. .numInput /deep/ .el-input__inner{
  3584. text-align: right;
  3585. }
  3586. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3587. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3588. -webkit-appearance: none;
  3589. }
  3590. /deep/ .inlineNumber input[type="number"]{
  3591. -moz-appearance: textfield;
  3592. padding-right: 5px !important;
  3593. }
  3594. .el-table /deep/ .cell{
  3595. height: auto;
  3596. line-height: 1.5;
  3597. }
  3598. /* ==================== OQC检验项目操作对话框样式 ==================== */
  3599. /deep/ .item-operation-dialog {
  3600. border-radius: 8px;
  3601. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  3602. }
  3603. /deep/ .item-operation-dialog .el-dialog__header {
  3604. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3605. padding: 20px 24px;
  3606. border-radius: 8px 8px 0 0;
  3607. }
  3608. /deep/ .item-operation-dialog .el-dialog__title {
  3609. color: #ffffff;
  3610. font-size: 16px;
  3611. font-weight: 600;
  3612. letter-spacing: 0.5px;
  3613. }
  3614. /deep/ .item-operation-dialog .el-dialog__headerbtn .el-dialog__close {
  3615. color: #ffffff;
  3616. font-size: 20px;
  3617. font-weight: bold;
  3618. }
  3619. /deep/ .item-operation-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  3620. color: #f0f0f0;
  3621. }
  3622. /deep/ .item-operation-dialog .el-dialog__body {
  3623. padding: 24px;
  3624. background: #f8f9fa;
  3625. }
  3626. .search-container {
  3627. background: #ffffff;
  3628. padding: 16px 20px;
  3629. border-radius: 6px;
  3630. margin-bottom: 20px;
  3631. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3632. }
  3633. .search-container .el-form-item {
  3634. margin-bottom: 0;
  3635. }
  3636. .search-container .el-form-item__label {
  3637. font-weight: 500;
  3638. color: #606266;
  3639. }
  3640. .item-operation-content {
  3641. display: flex;
  3642. gap: 16px;
  3643. align-items: stretch;
  3644. }
  3645. .item-panel {
  3646. flex: 1;
  3647. background: #ffffff;
  3648. border-radius: 6px;
  3649. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3650. overflow: hidden;
  3651. transition: all 0.3s ease;
  3652. }
  3653. .item-panel:hover {
  3654. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  3655. }
  3656. .available-panel {
  3657. flex: 1.5;
  3658. }
  3659. .selected-panel {
  3660. flex: 1;
  3661. }
  3662. .panel-header {
  3663. padding: 14px 16px;
  3664. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3665. border-bottom: 2px solid #9ac3d0;
  3666. display: flex;
  3667. align-items: center;
  3668. gap: 8px;
  3669. }
  3670. .panel-header i {
  3671. font-size: 18px;
  3672. color: #ffffff;
  3673. }
  3674. .panel-title {
  3675. font-size: 14px;
  3676. font-weight: 600;
  3677. color: #ffffff;
  3678. letter-spacing: 0.5px;
  3679. }
  3680. .item-count {
  3681. margin-left: auto;
  3682. font-size: 12px;
  3683. color: #ffffff;
  3684. background: rgba(255, 255, 255, 0.25);
  3685. padding: 2px 10px;
  3686. border-radius: 12px;
  3687. font-weight: 500;
  3688. }
  3689. .operation-table {
  3690. border: none !important;
  3691. }
  3692. .operation-table /deep/ .el-table__body tr:hover > td {
  3693. background-color: #f0f7ff !important;
  3694. }
  3695. .operation-table /deep/ .el-table__row.current-row > td {
  3696. background-color: #e6f2ff !important;
  3697. }
  3698. .operation-table /deep/ td {
  3699. border-bottom: 1px solid #f0f0f0;
  3700. }
  3701. .operation-table /deep/ .el-table__body {
  3702. font-size: 13px;
  3703. }
  3704. .operation-buttons {
  3705. display: flex;
  3706. flex-direction: column;
  3707. justify-content: center;
  3708. align-items: center;
  3709. gap: 20px;
  3710. padding: 0 8px;
  3711. }
  3712. .operation-buttons .el-button {
  3713. width: 48px;
  3714. height: 48px;
  3715. font-size: 20px;
  3716. transition: all 0.3s ease;
  3717. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  3718. }
  3719. .operation-buttons .el-button:hover {
  3720. transform: scale(1.1);
  3721. box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  3722. }
  3723. .operation-buttons .el-button.is-disabled {
  3724. opacity: 0.4;
  3725. cursor: not-allowed;
  3726. }
  3727. .operation-buttons .el-button--primary {
  3728. background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%);
  3729. border: none;
  3730. }
  3731. .operation-buttons .el-button--danger {
  3732. background: linear-gradient(135deg, #F56C6C 0%, #f78989 100%);
  3733. border: none;
  3734. }
  3735. @media (max-width: 1200px) {
  3736. .item-operation-content {
  3737. flex-direction: column;
  3738. }
  3739. .operation-buttons {
  3740. flex-direction: row;
  3741. gap: 12px;
  3742. }
  3743. .operation-buttons .el-button {
  3744. width: 42px;
  3745. height: 42px;
  3746. font-size: 18px;
  3747. }
  3748. }
  3749. /deep/ .template-import-dialog {
  3750. border-radius: 8px;
  3751. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  3752. }
  3753. /deep/ .template-import-dialog .el-dialog__header {
  3754. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  3755. padding: 20px 24px;
  3756. border-radius: 8px 8px 0 0;
  3757. }
  3758. /deep/ .template-import-dialog .el-dialog__title {
  3759. color: #ffffff;
  3760. font-size: 16px;
  3761. font-weight: 600;
  3762. letter-spacing: 0.5px;
  3763. }
  3764. /deep/ .template-import-dialog .el-dialog__headerbtn .el-dialog__close {
  3765. color: #ffffff;
  3766. font-size: 20px;
  3767. font-weight: bold;
  3768. }
  3769. /deep/ .template-import-dialog .el-dialog__headerbtn:hover .el-dialog__close {
  3770. color: #f0f0f0;
  3771. }
  3772. /deep/ .template-import-dialog .el-dialog__body {
  3773. padding: 24px;
  3774. background: #f8f9fa;
  3775. }
  3776. .template-list-container {
  3777. background: #ffffff;
  3778. border-radius: 6px;
  3779. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  3780. overflow: hidden;
  3781. transition: all 0.3s ease;
  3782. }
  3783. .template-list-container:hover {
  3784. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  3785. }
  3786. .template-table {
  3787. border: none !important;
  3788. }
  3789. .template-table /deep/ .el-table__body tr:hover > td {
  3790. background-color: #f0f7ff !important;
  3791. }
  3792. .template-table /deep/ .el-table__row.current-row > td {
  3793. background-color: #e6f2ff !important;
  3794. }
  3795. .template-table /deep/ td {
  3796. border-bottom: 1px solid #f0f0f0;
  3797. }
  3798. .template-table /deep/ .el-table__body {
  3799. font-size: 13px;
  3800. }
  3801. .operation-btn {
  3802. position: relative;
  3803. padding: 8px 16px;
  3804. border: none;
  3805. border-radius: 4px;
  3806. font-size: 13px;
  3807. font-weight: 500;
  3808. cursor: pointer;
  3809. transition: all 0.3s ease;
  3810. overflow: hidden;
  3811. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  3812. }
  3813. .operation-btn:hover {
  3814. transform: translateY(-1px);
  3815. box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  3816. }
  3817. .operation-btn:active {
  3818. transform: translateY(0);
  3819. }
  3820. .operation-btn i {
  3821. margin-right: 4px;
  3822. font-size: 13px;
  3823. }
  3824. .operation-btn span {
  3825. position: relative;
  3826. z-index: 1;
  3827. }
  3828. .item-operation-btn {
  3829. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  3830. color: #ffffff;
  3831. }
  3832. .item-operation-btn:hover {
  3833. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  3834. color: #ffffff;
  3835. }
  3836. .template-import-btn {
  3837. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  3838. color: #ffffff;
  3839. margin-left: 10px;
  3840. }
  3841. .template-import-btn:hover {
  3842. background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%);
  3843. color: #ffffff;
  3844. }
  3845. </style>