祥兆质量前端
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.

3706 lines
136 KiB

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