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

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