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

3802 lines
141 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
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 收藏 -->
  4. <div>
  5. <span @click="favoriteFunction()">
  6. <icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
  7. </span>
  8. </div>
  9. <!-- 条件查询 -->
  10. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
  11. <el-form-item :label="'BU'">
  12. <el-select v-model="searchData.buDesc" placeholder="请选择" clearable style="width: 75px">
  13. <el-option
  14. v-for = "i in userBuList"
  15. :key = "i.buNo"
  16. :label = "i.buDesc"
  17. :value = "i.buDesc">
  18. </el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item :label="'检验单号'">
  22. <el-input v-model="searchData.inspectionNo" clearable style="width: 140px"></el-input>
  23. </el-form-item>
  24. <el-form-item :label="'单据号'">
  25. <el-input v-model="searchData.poOrderNo" clearable style="width: 150px"></el-input>
  26. </el-form-item>
  27. <el-form-item :label="'单据行号'">
  28. <el-input v-model="searchData.poItemNo" clearable style="width: 120px"></el-input>
  29. </el-form-item>
  30. <el-form-item :label="'物料编码'">
  31. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  32. </el-form-item>
  33. <el-form-item :label="'物料名称'">
  34. <el-input v-model="searchData.partDesc" clearable style="width: 315px"></el-input>
  35. </el-form-item>
  36. </el-form>
  37. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
  38. <el-form-item :label="'通知单号'">
  39. <el-input v-model="searchData.receiptNo" clearable style="width: 144px"></el-input>
  40. </el-form-item>
  41. <el-form-item :label="'关联单号1'">
  42. <el-input v-model="searchData.refInfo1" clearable style="width: 155px"></el-input>
  43. </el-form-item>
  44. <el-form-item :label="'关联单号2'">
  45. <el-input v-model="searchData.refInfo2" clearable style="width: 155px"></el-input>
  46. </el-form-item>
  47. <el-form-item :label="'关联单号3'">
  48. <el-input v-model="searchData.refInfo3" clearable style="width: 155px"></el-input>
  49. </el-form-item>
  50. <el-form-item :label="'关联单号4'">
  51. <el-input v-model="searchData.refInfo4" clearable style="width: 155px"></el-input>
  52. </el-form-item>
  53. <el-form-item :label="'关联单号5'">
  54. <el-input v-model="searchData.refInfo5" clearable style="width: 155px"></el-input>
  55. </el-form-item>
  56. </el-form>
  57. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList">
  58. <el-form-item :label="'质检员'">
  59. <el-input v-model="searchData.inspectorName" clearable style="width: 120px"></el-input>
  60. </el-form-item>
  61. <el-form-item>
  62. <span slot="label" @click="getBaseList(509,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" :disabled="detailData.fullInspectionFlag" 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" :disabled="detailData.fullInspectionFlag" 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. inspectCode: '',
  1855. fullInspectionFlag: false,
  1856. passQty: '',
  1857. notPassQty: ''
  1858. },
  1859. detailInformationFlag: false,
  1860. detailList: [],
  1861. saveInformationData: {
  1862. site: '',
  1863. buNo: '',
  1864. inspectionNo:'',
  1865. disposalMeasures: '',
  1866. disposalRemark: '',
  1867. inspectorNo: '',
  1868. inspectionRemark: '',
  1869. itemList:[],
  1870. unqualifiedQty: '',
  1871. rollCount: '',
  1872. samplingQty: '',
  1873. poOrderNo: '',
  1874. poItemNo: '',
  1875. partNo: '',
  1876. partDesc: '',
  1877. operator: '',
  1878. operatorName: '',
  1879. responsiblePerson: '',
  1880. responsiblePersonName: '',
  1881. subDetailList: [],
  1882. passQty: '',
  1883. notPassQty: ''
  1884. },
  1885. // 子明细数据对象
  1886. tableData: [],
  1887. checkedDetail: [],
  1888. subDetailFlag: false,
  1889. subDetailData: {
  1890. site: '',
  1891. buNo: '',
  1892. inspectionNo: '',
  1893. itemNo: '',
  1894. itemDesc: '',
  1895. defaultValue: '',
  1896. maxValue: '',
  1897. minValue: '',
  1898. valueTypeDb: '',
  1899. subDetailValues:[]
  1900. },
  1901. options: [],
  1902. fileFlag: false,
  1903. fileContentList: [],
  1904. IQCSelections: [],
  1905. batchHandleAddModalFlag: false,
  1906. batchAddData: {
  1907. samplingLocation: '',
  1908. samplingLocationB: '',
  1909. samplingNumber: ''
  1910. },
  1911. disposalMeasuresOptions: [],
  1912. orderTypeList: [],
  1913. userBuList: [],
  1914. authSearch: false,
  1915. authCheck: false,
  1916. authOverLoad: false,
  1917. authDelete: false,
  1918. authDetail: false,
  1919. authFile: false,
  1920. authChange: false,
  1921. menuId: this.$route.meta.menuId,
  1922. roleList: [],
  1923. operatorList: [],
  1924. operatorData: {
  1925. flag: '',
  1926. site: '',
  1927. bu: '',
  1928. adminID: '',
  1929. adminName: '',
  1930. roleName: '',
  1931. roleId: '',
  1932. },
  1933. operatorModelFlag: false,
  1934. dataListSelections2: [],
  1935. operatorDetailList: [
  1936. {
  1937. columnProp: 'adminID',
  1938. headerAlign: "center",
  1939. align: "center",
  1940. columnLabel: '用户账号',
  1941. columnHidden: false,
  1942. columnImage: false,
  1943. columnSortable: false,
  1944. sortLv: 0,
  1945. status: true,
  1946. fixed: '',
  1947. },
  1948. {
  1949. columnProp: 'adminName',
  1950. headerAlign: "center",
  1951. align: "center",
  1952. columnLabel: '用户名称',
  1953. columnHidden: false,
  1954. columnImage: false,
  1955. columnSortable: false,
  1956. sortLv: 0,
  1957. status: true,
  1958. fixed: '',
  1959. },
  1960. {
  1961. columnProp: 'email',
  1962. headerAlign: "center",
  1963. align: "center",
  1964. columnLabel: '邮箱',
  1965. columnHidden: false,
  1966. columnImage: false,
  1967. columnSortable: false,
  1968. sortLv: 0,
  1969. status: true,
  1970. fixed: '',
  1971. },
  1972. {
  1973. columnProp: 'phone',
  1974. headerAlign: "center",
  1975. align: "center",
  1976. columnLabel: '手机号',
  1977. columnHidden: false,
  1978. columnImage: false,
  1979. columnSortable: false,
  1980. sortLv: 0,
  1981. status: true,
  1982. fixed: '',
  1983. },
  1984. ],
  1985. acquisitionList: [],
  1986. fileData: {
  1987. site: '',
  1988. buNo: '',
  1989. inspectionNo: '',
  1990. partNo: '',
  1991. inspectionTypeNo: ''
  1992. },
  1993. batchInformationFlag: false,
  1994. batchDetailList: [],
  1995. batchInformationTable: 'batchInfo',
  1996. batchColumnList: [
  1997. {
  1998. columnProp: 'inspectionNo',
  1999. headerAlign: "center",
  2000. align: "center",
  2001. columnLabel: '检验单号',
  2002. columnHidden: false,
  2003. columnImage: false,
  2004. columnSortable: false,
  2005. sortLv: 0,
  2006. status: true,
  2007. fixed: '',
  2008. columnWidth: 120,
  2009. },
  2010. {
  2011. columnProp: 'partNo',
  2012. headerAlign: "center",
  2013. align: "center",
  2014. columnLabel: '物料编码',
  2015. columnHidden: false,
  2016. columnImage: false,
  2017. columnSortable: false,
  2018. sortLv: 0,
  2019. status: true,
  2020. fixed: '',
  2021. columnWidth: 120,
  2022. },
  2023. {
  2024. columnProp: 'partDesc',
  2025. headerAlign: "center",
  2026. align: "left",
  2027. columnLabel: '物料名称',
  2028. columnHidden: false,
  2029. columnImage: false,
  2030. columnSortable: false,
  2031. sortLv: 0,
  2032. status: true,
  2033. fixed: '',
  2034. columnWidth: 200,
  2035. },
  2036. {
  2037. columnProp: 'rollQty',
  2038. headerAlign: "center",
  2039. align: "right",
  2040. columnLabel: '到货数量',
  2041. columnHidden: false,
  2042. columnImage: false,
  2043. columnSortable: false,
  2044. sortLv: 0,
  2045. status: true,
  2046. fixed: '',
  2047. columnWidth: 80,
  2048. },
  2049. {
  2050. columnProp: 'rollCount',
  2051. headerAlign: "center",
  2052. align: "right",
  2053. columnLabel: '送检数量',
  2054. columnHidden: false,
  2055. columnImage: false,
  2056. columnSortable: false,
  2057. sortLv: 0,
  2058. status: true,
  2059. fixed: '',
  2060. columnWidth: 80,
  2061. },
  2062. {
  2063. columnProp: 'samplingQty',
  2064. headerAlign: "center",
  2065. align: "right",
  2066. columnLabel: '抽样数量',
  2067. columnHidden: false,
  2068. columnImage: false,
  2069. columnSortable: false,
  2070. sortLv: 0,
  2071. status: true,
  2072. fixed: '',
  2073. columnWidth: 80,
  2074. },
  2075. // {
  2076. // columnProp: 'passQty',
  2077. // headerAlign: "center",
  2078. // align: "right",
  2079. // columnLabel: '合格数量',
  2080. // columnHidden: false,
  2081. // columnImage: false,
  2082. // columnSortable: false,
  2083. // sortLv: 0,
  2084. // status: true,
  2085. // fixed: '',
  2086. // columnWidth: 80,
  2087. // },
  2088. ],
  2089. batchIndex: '',
  2090. currentRow: {},
  2091. currentDetailRow: {},
  2092. changeData: {
  2093. site: '',
  2094. buNo: '',
  2095. inspectionNo: '',
  2096. rollCount: '',
  2097. inspectCode: '',
  2098. qtySample: '',
  2099. percentSample: '',
  2100. samplingProgrammeNo: '',
  2101. samplingProgrammeDesc: '',
  2102. samplingLevelNo: '',
  2103. samplingLevelDesc: '',
  2104. receiptNo: '',
  2105. receiptItemNo: '',
  2106. inspectionTypeNo: ''
  2107. },
  2108. changeModalFlag: false,
  2109. batchLoading: false,
  2110. overLoading: false,
  2111. searchLoading: false
  2112. }
  2113. },
  2114. mounted () {
  2115. this.$nextTick(() => {
  2116. this.height = window.innerHeight - 250
  2117. })
  2118. },
  2119. updated() {
  2120. this.$nextTick(()=>{
  2121. this.$refs.IQCTable.doLayout()
  2122. })
  2123. },
  2124. created () {
  2125. // 按钮控制
  2126. this.getButtonAuthData()
  2127. // 获取用户的 site 和 bu
  2128. this.getSiteAndBuByUserName()
  2129. this.favoriteIsOk()
  2130. this.disposalMeasuresSearch()
  2131. //this.orderTypeSearch()
  2132. // 动态列
  2133. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2134. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2135. if (!this.authSearch) {
  2136. // 获取数据列表
  2137. this.getDataList()
  2138. }
  2139. // 获取用户角色
  2140. this.getUserRoleList()
  2141. },
  2142. methods: {
  2143. // 删除所选
  2144. deleteBatch (row) {
  2145. if (this.IQCSelections.length === 1) {
  2146. this.$message.warning('检验单数量为1,不允许删除!')
  2147. return
  2148. }
  2149. this.$confirm(`确认删除所选检验单?`, '提示', {
  2150. confirmButtonText: '确定',
  2151. cancelButtonText: '取消',
  2152. type: 'warning'
  2153. }).then(() => {
  2154. this.$refs.IQCTable.toggleRowSelection(row, false)
  2155. })
  2156. },
  2157. // 批量合格处理
  2158. batchQualifiedModal () {
  2159. if (this.IQCSelections.length === 0) {
  2160. this.$message.warning('请勾选要批量处理的检验单!')
  2161. return
  2162. }
  2163. // 判断检验单状态
  2164. if (this.IQCSelections.every(val => val.state === '待检验')) {
  2165. // 校验检验明细
  2166. if (this.IQCSelections.some(val => val.templateId == null || val.templateId === '')) {
  2167. this.$message.warning('检验单不存在检验明细!')
  2168. return
  2169. }
  2170. // 校验模板和供应商
  2171. // 获取第一个对象的属性值作为参考
  2172. const firstItem = this.IQCSelections[0]
  2173. const firstTemplateId = firstItem.templateId
  2174. const firstSupplierNo = firstItem.supplierNo
  2175. if (!this.IQCSelections.every(item => item.templateId === firstTemplateId && item.supplierNo === firstSupplierNo)) {
  2176. this.$message.warning('所选检验单模板和供应商必须一致!')
  2177. return
  2178. }
  2179. this.IQCSelections.forEach((item, index) => {
  2180. this.$set(this.IQCSelections[index], 'inspectorNo', this.$store.state.user.name)
  2181. })
  2182. this.detailModal2(this.IQCSelections[0])
  2183. this.personnelSynchronizationFlag = true
  2184. } else {
  2185. this.$message.warning('检验单必须为待检验状态!')
  2186. return
  2187. }
  2188. },
  2189. // 获取协同人员列表
  2190. batchGetOperatorList (index) {
  2191. this.operatorData.flag = '3'
  2192. this.operatorData.bu = this.IQCSelections[index].site + '_' + this.IQCSelections[index].buNo
  2193. if (this.roleList.length > 0) {
  2194. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2195. if (filterList.length > 0) {
  2196. this.operatorData.roleId = filterList[0].roleId
  2197. } else {
  2198. this.operatorData.roleId = this.roleList[0].roleId
  2199. }
  2200. } else {
  2201. this.operatorData.roleId = ''
  2202. }
  2203. // 先清空缓存选中
  2204. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2205. // 拿到选中的人员编号
  2206. let tempDataList = (this.IQCSelections[index].operator == null ? '' : this.IQCSelections[index].operator).split(';')
  2207. getOperatorList(this.operatorData).then(({data}) => {
  2208. if (data && data.code === 0) {
  2209. this.operatorList = data.rows
  2210. this.operatorList.forEach(val => {
  2211. // 回显选中
  2212. if (tempDataList.includes(val.adminID)) {
  2213. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2214. }
  2215. })
  2216. this.batchIndex = index
  2217. this.operatorModelFlag = true
  2218. } else {
  2219. this.$alert(data.msg, '错误', {
  2220. confirmButtonText: '确定'
  2221. })
  2222. }
  2223. })
  2224. },
  2225. // 获取责任人列表
  2226. batchGetResponsiblePersonList (index) {
  2227. this.operatorData.flag = '4'
  2228. this.operatorData.bu = this.IQCSelections[index].site + '_' + this.IQCSelections[index].buNo
  2229. if (this.roleList.length > 0) {
  2230. let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
  2231. if (filterList.length > 0) {
  2232. this.operatorData.roleId = filterList[0].roleId
  2233. } else {
  2234. this.operatorData.roleId = this.roleList[0].roleId
  2235. }
  2236. } else {
  2237. this.operatorData.roleId = ''
  2238. }
  2239. // 先清空缓存选中
  2240. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2241. // 拿到选中的人员编号
  2242. let tempDataList = (this.IQCSelections[index].responsiblePerson == null ? '' : this.IQCSelections[index].responsiblePerson).split(';')
  2243. getOperatorList(this.operatorData).then(({data}) => {
  2244. if (data && data.code === 0) {
  2245. this.operatorList = data.rows
  2246. this.operatorList.forEach(val => {
  2247. // 回显选中
  2248. if (tempDataList.includes(val.adminID)) {
  2249. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2250. }
  2251. })
  2252. this.batchIndex = index
  2253. this.operatorModelFlag = true
  2254. } else {
  2255. this.$alert(data.msg, '错误', {
  2256. confirmButtonText: '确定'
  2257. })
  2258. }
  2259. })
  2260. },
  2261. // 保存批量合格信息
  2262. batchSave () {
  2263. this.$confirm(`确认保存检验数据?`, '提示', {
  2264. confirmButtonText: '确定',
  2265. cancelButtonText: '取消',
  2266. type: 'warning'
  2267. }).then(() => {
  2268. let tempData = {
  2269. submitList: JSON.parse(JSON.stringify(this.IQCSelections)),
  2270. itemList: JSON.parse(JSON.stringify(this.batchDetailList))
  2271. }
  2272. this.batchLoading = true
  2273. batchSaveIQCDetailedRecord(tempData).then(({data}) => {
  2274. if (data && data.code === 0) {
  2275. this.getDataList()
  2276. this.batchInformationFlag = false
  2277. this.$message({
  2278. message: '操作成功',
  2279. type: 'success',
  2280. duration: 1500,
  2281. onClose: () => {}
  2282. })
  2283. } else {
  2284. this.$alert(data.msg, '错误', {
  2285. confirmButtonText: '确定'
  2286. })
  2287. }
  2288. this.batchLoading = false
  2289. }).catch(()=>{
  2290. this.batchLoading = false
  2291. })
  2292. })
  2293. },
  2294. // 列表数据总结
  2295. getSummaries (param) {
  2296. const { columns, data } = param
  2297. const sums = []
  2298. columns.forEach((column, index) => {
  2299. if (index === 0) {
  2300. sums[index] = '总计'
  2301. return
  2302. }
  2303. if (column.property !== 'rollQty' && column.property !== 'rollCount') {
  2304. sums[index] = ''
  2305. return
  2306. }
  2307. const values = data.map(item => Number(item[column.property]))
  2308. if (!values.every(value => isNaN(value))) {
  2309. sums[index] = values.reduce((prev, curr) => {
  2310. const value = Number(curr)
  2311. if (!isNaN(value)) {
  2312. return prev + curr
  2313. } else {
  2314. return prev
  2315. }
  2316. }, 0)
  2317. } else {
  2318. sums[index] = ''
  2319. }
  2320. })
  2321. return sums
  2322. },
  2323. // 检验结论改变事件
  2324. resultChange () {
  2325. if (this.detailData.inspectionResult === '不合格') {
  2326. this.detailData.passQty = 0
  2327. }
  2328. },
  2329. // 数据采集
  2330. dataAcquisition () {
  2331. this.loadFlag = true
  2332. let tempDate = {
  2333. site: this.detailData.site,
  2334. buNo: this.detailData.buNo,
  2335. inspectionNo: this.detailData.inspectionNo,
  2336. flag: 'iqc'
  2337. }
  2338. dataAcquisition(tempDate).then(({data}) => {
  2339. if (data.code === 0) {
  2340. // this.acquisitionList = data.rows
  2341. this.changeMyString(data.rows)
  2342. this.$message({
  2343. message: '数据采集成功',
  2344. type: 'success',
  2345. duration: 1500
  2346. })
  2347. } else {
  2348. this.$message({
  2349. message: data.msg,
  2350. type: 'warning',
  2351. duration: 1500
  2352. })
  2353. }
  2354. this.loadFlag = false
  2355. })
  2356. },
  2357. // 获取用户角色
  2358. getUserRoleList () {
  2359. getUserRoleList().then(({data}) => {
  2360. if (data.code === 0) {
  2361. this.roleList = data.rows
  2362. } else {
  2363. this.roleList = []
  2364. }
  2365. })
  2366. },
  2367. // 获取协同人员列表
  2368. getOperatorList () {
  2369. this.operatorData.flag = '1'
  2370. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2371. if (this.roleList.length > 0) {
  2372. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2373. if (filterList.length > 0) {
  2374. this.operatorData.roleId = filterList[0].roleId
  2375. } else {
  2376. this.operatorData.roleId = this.roleList[0].roleId
  2377. }
  2378. } else {
  2379. this.operatorData.roleId = ''
  2380. }
  2381. // 先清空缓存选中
  2382. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2383. // 拿到选中的人员编号
  2384. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2385. getOperatorList(this.operatorData).then(({data}) => {
  2386. if (data && data.code === 0) {
  2387. this.operatorList = data.rows
  2388. this.operatorList.forEach(val => {
  2389. // 回显选中
  2390. if (tempDataList.includes(val.adminID)) {
  2391. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2392. }
  2393. })
  2394. this.operatorModelFlag = true
  2395. } else {
  2396. this.$alert(data.msg, '错误', {
  2397. confirmButtonText: '确定'
  2398. })
  2399. }
  2400. })
  2401. },
  2402. // 获取责任人员列表
  2403. getResponsiblePersonList () {
  2404. this.operatorData.flag = '2'
  2405. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2406. if (this.roleList.length > 0) {
  2407. let filterList = this.roleList.filter(item => item.roleName === '系统管理员')
  2408. if (filterList.length > 0) {
  2409. this.operatorData.roleId = filterList[0].roleId
  2410. } else {
  2411. this.operatorData.roleId = this.roleList[0].roleId
  2412. }
  2413. } else {
  2414. this.operatorData.roleId = ''
  2415. }
  2416. // 先清空缓存选中
  2417. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2418. // 拿到选中的人员编号
  2419. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2420. getOperatorList(this.operatorData).then(({data}) => {
  2421. if (data && data.code === 0) {
  2422. this.operatorList = data.rows
  2423. this.operatorList.forEach(val => {
  2424. // 回显选中
  2425. if (tempDataList.includes(val.adminID)) {
  2426. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2427. }
  2428. })
  2429. this.operatorModelFlag = true
  2430. } else {
  2431. this.$alert(data.msg, '错误', {
  2432. confirmButtonText: '确定'
  2433. })
  2434. }
  2435. })
  2436. },
  2437. // 查询机修人员列表
  2438. getOperatorList2 () {
  2439. if (this.operatorData.flag === '1') {
  2440. // 拿到选中的人员编号
  2441. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2442. getOperatorList(this.operatorData).then(({data}) => {
  2443. if (data && data.code === 0) {
  2444. this.operatorList = data.rows
  2445. this.operatorList.forEach(val => {
  2446. // 回显选中的部门
  2447. if (tempDataList.includes(val.adminID)) {
  2448. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2449. }
  2450. })
  2451. } else {
  2452. this.operatorList = []
  2453. }
  2454. })
  2455. } else if (this.operatorData.flag === '2') {
  2456. // 拿到选中的人员编号
  2457. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2458. getOperatorList(this.operatorData).then(({data}) => {
  2459. if (data && data.code === 0) {
  2460. this.operatorList = data.rows
  2461. this.operatorList.forEach(val => {
  2462. // 回显选中的部门
  2463. if (tempDataList.includes(val.adminID)) {
  2464. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2465. }
  2466. })
  2467. } else {
  2468. this.operatorList = []
  2469. }
  2470. })
  2471. } else if (this.operatorData.flag === '3') {
  2472. // 拿到选中的人员编号
  2473. let tempDataList = (this.IQCSelections[this.batchIndex].operator == null ? '' : this.IQCSelections[this.batchIndex].operator).split(';')
  2474. getOperatorList(this.operatorData).then(({data}) => {
  2475. if (data && data.code === 0) {
  2476. this.operatorList = data.rows
  2477. this.operatorList.forEach(val => {
  2478. // 回显选中的部门
  2479. if (tempDataList.includes(val.adminID)) {
  2480. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2481. }
  2482. })
  2483. } else {
  2484. this.operatorList = []
  2485. }
  2486. })
  2487. } else if (this.operatorData.flag === '4') {
  2488. // 拿到选中的人员编号
  2489. let tempDataList = (this.IQCSelections[this.batchIndex].responsiblePerson == null ? '' : this.IQCSelections[this.batchIndex].responsiblePerson).split(';')
  2490. getOperatorList(this.operatorData).then(({data}) => {
  2491. if (data && data.code === 0) {
  2492. this.operatorList = data.rows
  2493. this.operatorList.forEach(val => {
  2494. // 回显选中的部门
  2495. if (tempDataList.includes(val.adminID)) {
  2496. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2497. }
  2498. })
  2499. } else {
  2500. this.operatorList = []
  2501. }
  2502. })
  2503. }
  2504. },
  2505. // 点击行选中复选框
  2506. operatorClickRow (row) {
  2507. this.$refs.operatorTable.toggleRowSelection(row)
  2508. },
  2509. // 多选
  2510. selectionChangeHandle2 (val) {
  2511. this.dataListSelections2 = val
  2512. },
  2513. // 确认多选协同人员
  2514. confirmOperator () {
  2515. if (this.dataListSelections2.length === 0) {
  2516. this.$message.warning('请勾选人员!')
  2517. return
  2518. }
  2519. if (this.operatorData.flag === '1') {
  2520. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2521. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2522. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2523. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2524. }
  2525. }
  2526. if (this.detailData.operator.charAt(0) === ';') {
  2527. this.detailData.operator = this.detailData.operator.substring(1)
  2528. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2529. }
  2530. } else if (this.operatorData.flag === '2') {
  2531. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2532. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2533. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2534. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2535. }
  2536. }
  2537. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2538. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2539. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2540. }
  2541. } else if (this.operatorData.flag === '3') {
  2542. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2543. if (!this.IQCSelections[this.batchIndex].operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2544. this.IQCSelections[this.batchIndex].operatorName = this.IQCSelections[this.batchIndex].operatorName + ";" + this.dataListSelections2[i].adminName
  2545. this.IQCSelections[this.batchIndex].operator = this.IQCSelections[this.batchIndex].operator + ";" + this.dataListSelections2[i].adminID
  2546. }
  2547. }
  2548. if (this.IQCSelections[this.batchIndex].operator.charAt(0) === ';') {
  2549. this.IQCSelections[this.batchIndex].operator = this.IQCSelections[this.batchIndex].operator.substring(1)
  2550. this.IQCSelections[this.batchIndex].operatorName = this.IQCSelections[this.batchIndex].operatorName.substring(1)
  2551. // 如果是人员同步且有多条数据需要同步 那么就将其他数据的人员也同步
  2552. if (this.personnelSynchronizationFlag && this.IQCSelections.length > 1) {
  2553. // 拿到除了this.batchIndex的所有数据
  2554. let tempData = this.IQCSelections.filter((item, index) => index !== this.batchIndex)
  2555. // 遍历数据
  2556. tempData.forEach(item => {
  2557. this.$set(item, 'operator', this.IQCSelections[this.batchIndex].operator)
  2558. this.$set(item, 'operatorName', this.IQCSelections[this.batchIndex].operatorName)
  2559. })
  2560. }
  2561. }
  2562. } else if (this.operatorData.flag === '4') {
  2563. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2564. if (!this.IQCSelections[this.batchIndex].responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2565. this.IQCSelections[this.batchIndex].responsiblePersonName = this.IQCSelections[this.batchIndex].responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2566. this.IQCSelections[this.batchIndex].responsiblePerson = this.IQCSelections[this.batchIndex].responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2567. }
  2568. }
  2569. if (this.IQCSelections[this.batchIndex].responsiblePerson.charAt(0) === ';') {
  2570. this.IQCSelections[this.batchIndex].responsiblePerson = this.IQCSelections[this.batchIndex].responsiblePerson.substring(1)
  2571. this.IQCSelections[this.batchIndex].responsiblePersonName = this.IQCSelections[this.batchIndex].responsiblePersonName.substring(1)
  2572. // 如果是人员同步且有多条数据需要同步 那么就将其他数据的人员也同步
  2573. if (this.personnelSynchronizationFlag && this.IQCSelections.length > 1) {
  2574. // 拿到除了this.batchIndex的所有数据
  2575. let tempData = this.IQCSelections.filter((item, index) => index !== this.batchIndex)
  2576. // 遍历数据
  2577. tempData.forEach(item => {
  2578. this.$set(item, 'responsiblePerson', this.IQCSelections[this.batchIndex].responsiblePerson)
  2579. this.$set(item, 'responsiblePersonName', this.IQCSelections[this.batchIndex].responsiblePersonName)
  2580. })
  2581. }
  2582. }
  2583. }
  2584. this.operatorData = {
  2585. flag: '',
  2586. site: '',
  2587. bu: '',
  2588. adminID: '',
  2589. adminName: '',
  2590. roleName: '',
  2591. roleId: '',
  2592. }
  2593. this.operatorModelFlag = false
  2594. },
  2595. // // 实测值内容改变事件
  2596. // changeValue (row) {
  2597. // if (row.minValue == null && row.maxValue != null) {
  2598. // if (row.numberValue > row.maxValue) {
  2599. // row.itemResult = 'N'
  2600. // } else {
  2601. // row.itemResult = 'Y'
  2602. // }
  2603. // } else if (row.maxValue == null && row.minValue != null) {
  2604. // if (row.numberValue < row.minValue) {
  2605. // row.itemResult = 'N'
  2606. // } else {
  2607. // row.itemResult = 'Y'
  2608. // }
  2609. // } else if (row.minValue != null && row.maxValue != null) {
  2610. // if (row.numberValue < row.minValue || row.numberValue > row.maxValue) {
  2611. // row.itemResult = 'N'
  2612. // } else {
  2613. // row.itemResult = 'Y'
  2614. // }
  2615. // }
  2616. // },
  2617. // 获取用户的bu
  2618. getSiteAndBuByUserName () {
  2619. let tempData = {
  2620. username: this.$store.state.user.name,
  2621. }
  2622. getSiteAndBuByUserName(tempData).then(({data}) => {
  2623. if (data.code === 0) {
  2624. this.userBuList = data.rows
  2625. }
  2626. })
  2627. },
  2628. // ======= 正则校验 =======
  2629. handleInput (value, type) {
  2630. // 大于等于0,且只能输入4位小数
  2631. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  2632. if (val === null || val === undefined || val === '') {
  2633. val = 0
  2634. }
  2635. if (type === 1) {
  2636. this.detailData.unqualifiedQty = val
  2637. } else if (type === 2) {
  2638. this.detailData.passQty = val
  2639. }
  2640. },
  2641. // 子明细导入
  2642. subDetailUpload () {
  2643. let currentData = {
  2644. flag: 'IQC',
  2645. site: this.detailData.site,
  2646. buNo: this.detailData.buNo,
  2647. inspectionNo: this.detailData.inspectionNo
  2648. }
  2649. //打开组件 去做新增业务
  2650. this.$nextTick(() => {
  2651. this.$refs.subDetailUpload.init(currentData)
  2652. })
  2653. },
  2654. // 获取处置措施列表
  2655. disposalMeasuresSearch () {
  2656. let tempData = {
  2657. inspectionTypeNo: '105'
  2658. }
  2659. disposalMeasuresSearch(tempData).then(({data}) => {
  2660. if (data.code === 0) {
  2661. this.disposalMeasuresOptions = data.rows
  2662. }
  2663. })
  2664. },
  2665. // 获取采购类型列表
  2666. orderTypeSearch () {
  2667. orderTypeSearch().then(({data}) => {
  2668. if (data.code === 0) {
  2669. this.orderTypeList = data.rows
  2670. }
  2671. })
  2672. },
  2673. // 单机选中
  2674. IQCClickRow (row) {
  2675. this.currentRow = JSON.parse(JSON.stringify(row))
  2676. },
  2677. // 复选
  2678. selectionIQC (val) {
  2679. this.IQCSelections = val
  2680. },
  2681. rowStyle ({row}) {
  2682. if (this.currentRow.inspectionNo === row.inspectionNo) {
  2683. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  2684. }
  2685. },
  2686. // 单机选中
  2687. IQCDetailClickRow (row) {
  2688. this.currentDetailRow = JSON.parse(JSON.stringify(row))
  2689. },
  2690. rowDetailStyle ({row}) {
  2691. if (this.currentDetailRow.itemNo === row.itemNo) {
  2692. return { 'background-color': '#50DCDC', cursor: 'pointer' };
  2693. }
  2694. },
  2695. // 刷新派设备文档的列表
  2696. getFileContentData (row) {
  2697. this.fileData = {
  2698. site: row.site,
  2699. buNo: row.buNo,
  2700. inspectionNo: row.inspectionNo,
  2701. partNo: row.partNo,
  2702. inspectionTypeNo: '105'
  2703. }
  2704. getFileContentList2(this.fileData).then(({data}) => {
  2705. //区分请求成功和失败的状况
  2706. if (data && data.code === 200) {
  2707. this.fileContentList = data.rows
  2708. } else {
  2709. this.fileContentList = []
  2710. }
  2711. })
  2712. this.fileFlag = true
  2713. },
  2714. // 新增文件的modal
  2715. addUploadFileModal () {
  2716. let currentData = {
  2717. titleCon: 'IQC文件上传',
  2718. site: this.detailData.site,
  2719. buNo: this.detailData.buNo,
  2720. createBy: this.$store.state.user.name,
  2721. inspectionNo: this.detailData.inspectionNo,
  2722. remark: '',
  2723. folder: 'qcIQC',
  2724. }
  2725. //打开组件 去做新增业务
  2726. this.$nextTick(() => {
  2727. this.$refs.qcFAIUploadFile.init(currentData)
  2728. })
  2729. },
  2730. // 上传项目图片
  2731. uploadImageModal (row) {
  2732. let currentData = {
  2733. site: this.detailData.site,
  2734. buNo: this.detailData.buNo,
  2735. createBy: this.$store.state.user.name,
  2736. inspectionNo: this.detailData.inspectionNo,
  2737. itemNo: row.itemNo,
  2738. folder: 'IQCItemImageFile'
  2739. }
  2740. //打开组件 去做新增业务
  2741. this.$nextTick(() => {
  2742. this.$refs.comQcItemImageUploadFile.init(currentData)
  2743. })
  2744. },
  2745. // 文件下载
  2746. downloadFile (row) {
  2747. downLoadObjectFile(row)
  2748. .then(({data}) => {
  2749. // 不限制文件下载类型
  2750. const blob = new Blob([data], {type: "application/octet-stream"})
  2751. // 下载文件名称
  2752. const fileName = row.fileName
  2753. // a标签下载
  2754. const linkNode = document.createElement('a')
  2755. // a标签的download属性规定下载文件的名称
  2756. linkNode.download = fileName
  2757. linkNode.style.display = 'none'
  2758. // 生成一个Blob URL
  2759. linkNode.href = URL.createObjectURL(blob)
  2760. document.body.appendChild(linkNode)
  2761. // 模拟在按钮上的一次鼠标单击
  2762. linkNode.click()
  2763. // 释放URL 对象
  2764. URL.revokeObjectURL(linkNode.href)
  2765. document.body.removeChild(linkNode)
  2766. })
  2767. },
  2768. // 预览
  2769. previewFile (row) {
  2770. // 预览文件
  2771. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  2772. let type = ''
  2773. if (image.includes(row.fileType.toLowerCase())) {
  2774. type = 'image/' + row.fileType
  2775. }
  2776. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  2777. if (video.includes(row.fileType.toLowerCase())) {
  2778. type = 'video/' + row.fileType
  2779. }
  2780. let txt = ['txt']
  2781. if (txt.includes(row.fileType.toLowerCase())) {
  2782. type = 'text/plain'
  2783. }
  2784. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  2785. if (office.includes(row.fileType.toLowerCase())) {
  2786. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  2787. return
  2788. }
  2789. let pdf = ['pdf']
  2790. if (pdf.includes(row.fileType.toLowerCase())) {
  2791. type = 'application/pdf'
  2792. }
  2793. if (type === ''){
  2794. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  2795. return;
  2796. }
  2797. downLoadObjectFile(row).then(({data}) => {
  2798. const blob = new Blob([data], { type: type });
  2799. // 创建URL来生成预览
  2800. const fileURL = URL.createObjectURL(blob);
  2801. if (type.includes('image')) { // 图片
  2802. localStorage.setItem("imgUrl",fileURL)
  2803. window.open(window.location.origin+"/#/image",'_blank')
  2804. } else {
  2805. // 在新标签页中打开文件预览
  2806. const newTab = window.open(fileURL, '_blank')
  2807. }
  2808. })
  2809. },
  2810. // 删除文件
  2811. deleteFile (row) {
  2812. let tempData = {
  2813. site: row.orderRef1,
  2814. inspectionNo: row.orderRef2,
  2815. buNo: row.orderRef4,
  2816. partNo: this.fileData.partNo,
  2817. inspectionTypeNo: '105'
  2818. }
  2819. this.$confirm('确定要删除此文件?', '提示', {
  2820. confirmButtonText: '确定',
  2821. cancelButtonText: '取消',
  2822. type: 'warning'
  2823. }).then(() => {
  2824. deleteObjectFile(row).then(({data}) => {
  2825. if (data && data.code == 0) {
  2826. this.getFileContentData(tempData)
  2827. this.$message({
  2828. message: '操作成功',
  2829. type: 'success',
  2830. duration: 1500,
  2831. onClose: () => {}
  2832. })
  2833. } else {
  2834. this.$alert(data.msg, '错误', {
  2835. confirmButtonText: '确定'
  2836. })
  2837. }
  2838. })
  2839. }).catch(() => {
  2840. })
  2841. },
  2842. // 获取基础数据列表S
  2843. getBaseList (val,type) {
  2844. this.tagNo = val
  2845. this.tagType = type
  2846. this.$nextTick(() => {
  2847. let strVal = ''
  2848. let conSql = ''
  2849. if (val === 1037) {
  2850. strVal = this.modalData.detailCodeNo
  2851. this.$refs.baseList.init(val, strVal)
  2852. }
  2853. if (val === 1040) {
  2854. strVal = this.modalData.inspectorNo
  2855. this.$refs.baseList.init(val, strVal)
  2856. }
  2857. if (val === 508) {
  2858. strVal = this.searchData.warehouseId
  2859. this.$refs.baseList.init(val, strVal)
  2860. }
  2861. if (val === 509 && type === 1) {
  2862. strVal = this.searchData.supplierNo
  2863. this.$refs.baseList.init(val, strVal)
  2864. }
  2865. if (val === 509 && type === 2) {
  2866. strVal = this.detailData.responsiblePerson
  2867. this.$refs.baseList.init(val, strVal)
  2868. }
  2869. if (val === 207) {
  2870. strVal = this.changeData.samplingProgrammeNo
  2871. conSql = " and bu_no = '" + this.changeData.buNo + "'"
  2872. this.$refs.baseList.init(val, strVal, conSql)
  2873. }
  2874. if (val === 208) {
  2875. strVal = this.changeData.samplingLevelNo
  2876. conSql = " and bu_no = '" + this.changeData.buNo + "'"
  2877. this.$refs.baseList.init(val, strVal, conSql)
  2878. }
  2879. })
  2880. },
  2881. // 列表方法的回调
  2882. getBaseData (val) {
  2883. if (this.tagNo === 1037) {
  2884. this.modalData.detailCodeNo = val.code_no
  2885. this.modalData.detailCodeDesc = val.code_desc
  2886. }
  2887. if (this.tagNo === 1040) {
  2888. this.modalData.inspectorNo = val.inspector_no
  2889. this.modalData.inspectorName = val.inspector_name
  2890. }
  2891. if (this.tagNo === 508) {
  2892. this.searchData.warehouseId = val.WareHouseID
  2893. }
  2894. if (this.tagNo === 509 && this.tagType === 1) {
  2895. this.searchData.supplierNo = val.SupplierID
  2896. }
  2897. if (this.tagNo === 509 && this.tagType === 2) {
  2898. this.detailData.responsiblePerson = val.SupplierID
  2899. }
  2900. if (this.tagNo === 207) {
  2901. this.changeData.samplingProgrammeNo = val.sampling_programme_no
  2902. this.changeData.samplingProgrammeDesc = val.sampling_programme_desc
  2903. }
  2904. if (this.tagNo === 208) {
  2905. this.changeData.samplingLevelNo = val.sampling_level_no
  2906. this.changeData.samplingLevelDesc = val.sampling_level_desc
  2907. }
  2908. },
  2909. // 获取主信息数据列表
  2910. getDataList () {
  2911. this.searchLoading = true
  2912. this.searchData.limit = this.pageSize
  2913. this.searchData.page = this.pageIndex
  2914. qcIQCInspectionSearch(this.searchData).then(({data}) => {
  2915. if (data.code === 0) {
  2916. this.dataList = data.page.list
  2917. this.pageIndex = data.page.currPage
  2918. this.pageSize = data.page.pageSize
  2919. this.totalPage = data.page.totalCount
  2920. this.searchLoading = false
  2921. } else {
  2922. this.searchLoading = false
  2923. }
  2924. }).catch(() => {
  2925. this.searchLoading = false
  2926. })
  2927. },
  2928. // 每页数
  2929. sizeChangeHandle (val) {
  2930. this.pageSize = val
  2931. this.pageIndex = 1
  2932. this.getDataList()
  2933. },
  2934. // 当前页
  2935. currentChangeHandle (val) {
  2936. this.pageIndex = val
  2937. this.getDataList()
  2938. },
  2939. // 多选
  2940. selectionChangeHandle (val) {
  2941. this.dataListSelections = val
  2942. },
  2943. // 查询检验类型
  2944. inspectorSearch () {
  2945. inspectorSearch().then(({data}) => {
  2946. if (data.code === 0) {
  2947. this.options = data.rows
  2948. }
  2949. })
  2950. },
  2951. async Transfer () {
  2952. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  2953. this.$message.warning('请选择检验结论!')
  2954. return
  2955. }
  2956. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  2957. this.$message.warning('请选择处置措施!')
  2958. return
  2959. }
  2960. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  2961. const flag = this.detailList.some(item => item.itemResult === 'N')
  2962. if (!flag) {
  2963. this.$message.warning('请选择不合格项目!')
  2964. return
  2965. }
  2966. }
  2967. this.$confirm(`确认保存检验数据?`, '提示', {
  2968. confirmButtonText: '确定',
  2969. cancelButtonText: '取消',
  2970. type: 'warning'
  2971. }).then(() => {
  2972. if (this.detailData.inspectionResult !== '不合格') {
  2973. this.detailData.disposalMeasures = ''
  2974. this.detailData.disposalRemark = ''
  2975. }
  2976. this.saveDetailInformation()
  2977. })
  2978. },
  2979. // 新增明细信息
  2980. saveDetailInformation () {
  2981. this.saveInformationData.site = this.detailData.site
  2982. this.saveInformationData.buNo = this.detailData.buNo
  2983. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  2984. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  2985. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  2986. this.saveInformationData.inspectorNo = this.$store.state.user.name
  2987. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  2988. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  2989. this.saveInformationData.rollCount = this.detailData.rollCount
  2990. this.saveInformationData.samplingQty = this.detailData.samplingQty
  2991. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  2992. this.saveInformationData.poOrderNo = this.detailData.poOrderNo
  2993. this.saveInformationData.poItemNo = this.detailData.poItemNo
  2994. this.saveInformationData.partNo = this.detailData.partNo
  2995. this.saveInformationData.partDesc = this.detailData.partDesc
  2996. this.saveInformationData.operator = this.detailData.operator
  2997. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  2998. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  2999. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3000. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3001. // this.saveInformationData.subDetailList = this.acquisitionList
  3002. saveIQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3003. if (data && data.code === 0) {
  3004. this.searchData.inspectionNo = ''
  3005. this.getDataList()
  3006. this.detailInformationFlag = false
  3007. this.$message({
  3008. message: '操作成功',
  3009. type: 'success',
  3010. duration: 1500,
  3011. onClose: () => {}
  3012. })
  3013. } else {
  3014. this.$alert(data.msg, '错误', {
  3015. confirmButtonText: '确定'
  3016. })
  3017. }
  3018. })
  3019. },
  3020. // 开始检验
  3021. actionModal (row) {
  3022. this.$confirm(`确认开始检验?`, '提示', {
  3023. confirmButtonText: '确定',
  3024. cancelButtonText: '取消',
  3025. type: 'warning'
  3026. }).then(() => {
  3027. let tempData = {
  3028. site: row.site,
  3029. buNo: row.buNo,
  3030. inspectionNo: row.inspectionNo,
  3031. actionBy: this.$store.state.user.name,
  3032. state: '待检验'
  3033. }
  3034. actionIQCInspection(tempData).then(async ({data}) => {
  3035. if (data && data.code === 0) {
  3036. this.$message({
  3037. message: '操作成功',
  3038. type: 'success',
  3039. duration: 1500,
  3040. onClose: () => {
  3041. }
  3042. })
  3043. this.searchData.inspectionNo = row.inspectionNo
  3044. await this.getDataList()
  3045. this.detailModal(row)
  3046. } else {
  3047. await this.$alert(data.msg, '错误', {
  3048. confirmButtonText: '确定'
  3049. })
  3050. }
  3051. })
  3052. })
  3053. },
  3054. // 明细记录信息查询
  3055. detailModal (row) {
  3056. this.detailData.site = row.site
  3057. this.detailData.buNo = row.buNo
  3058. this.detailData.inspectionNo = row.inspectionNo
  3059. this.detailData.partNo = row.partNo
  3060. this.detailData.partDesc = row.partDesc
  3061. this.detailData.rollQty = row.rollQty
  3062. this.detailData.samplingQty = row.samplingQty
  3063. this.detailData.unqualifiedQty = row.unqualifiedQty
  3064. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3065. this.detailData.submitFlag = row.submitFlag
  3066. this.detailData.disposalMeasures = row.disposalMeasures
  3067. this.detailData.disposalRemark = row.disposalRemark
  3068. this.detailData.inspectionResult = row.inspectionResult
  3069. this.detailData.inspectorNo = row.inspectorNo
  3070. this.detailData.inspectionRemark = row.inspectionRemark
  3071. this.detailData.umId = row.umId
  3072. this.detailData.rollCount = row.rollCount
  3073. this.detailData.poOrderNo = row.poOrderNo
  3074. this.detailData.poItemNo = row.poItemNo
  3075. this.detailData.operator = row.operator
  3076. this.detailData.operatorName = row.operatorName
  3077. this.detailData.responsiblePerson = row.responsiblePerson
  3078. this.detailData.responsiblePersonName = row.responsiblePersonName
  3079. this.detailData.inspectCode = row.inspectCode
  3080. this.detailData.fullInspectionFlag = this.getFullInspectionFlag(row)
  3081. if (row.state === '待检验') {
  3082. this.detailData.passQty = row.samplingQty
  3083. } else {
  3084. this.detailData.passQty = row.passQty
  3085. this.detailData.notPassQty = row.notPassQty
  3086. }
  3087. this.getInspectionFormData()
  3088. this.inspectorSearch()
  3089. // this.acquisitionList = []
  3090. this.detailInformationFlag = true
  3091. },
  3092. detailModal2 (row) {
  3093. this.detailData.site = row.site
  3094. this.detailData.buNo = row.buNo
  3095. this.detailData.inspectionNo = row.inspectionNo
  3096. this.detailData.partNo = row.partNo
  3097. this.detailData.partDesc = row.partDesc
  3098. this.detailData.rollQty = row.rollQty
  3099. this.detailData.samplingQty = row.samplingQty
  3100. this.detailData.unqualifiedQty = row.unqualifiedQty
  3101. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3102. this.detailData.submitFlag = row.submitFlag
  3103. this.detailData.disposalMeasures = row.disposalMeasures
  3104. this.detailData.disposalRemark = row.disposalRemark
  3105. this.detailData.inspectionResult = row.inspectionResult
  3106. this.detailData.inspectorNo = row.inspectorNo
  3107. this.detailData.inspectionRemark = row.inspectionRemark
  3108. this.detailData.umId = row.umId
  3109. this.detailData.rollCount = row.rollCount
  3110. this.detailData.poOrderNo = row.poOrderNo
  3111. this.detailData.poItemNo = row.poItemNo
  3112. this.detailData.operator = row.operator
  3113. this.detailData.operatorName = row.operatorName
  3114. this.detailData.responsiblePerson = row.responsiblePerson
  3115. this.detailData.responsiblePersonName = row.responsiblePersonName
  3116. this.detailData.inspectCode = row.inspectCode
  3117. this.detailData.fullInspectionFlag = this.getFullInspectionFlag(row)
  3118. this.detailData.passQty = row.passQty
  3119. this.detailData.notPassQty = row.notPassQty
  3120. iqcDetailSearch(this.detailData).then(({data}) => {
  3121. if (data && data.code === 0) {
  3122. this.batchDetailList = data.rows
  3123. this.batchInformationTable = 'batchInfo'
  3124. this.batchInformationFlag = true
  3125. } else {
  3126. this.$message.warning('未查到检验单明细信息!')
  3127. }
  3128. })
  3129. },
  3130. // 检验单明细
  3131. getInspectionFormData () {
  3132. iqcDetailSearch(this.detailData).then(({data}) => {
  3133. if (data && data.code === 0) {
  3134. this.detailList = data.rows
  3135. } else {
  3136. this.detailList = []
  3137. }
  3138. })
  3139. },
  3140. // 子明细记录信息查询
  3141. subDetailModal (row) {
  3142. this.subDetailData = row
  3143. this.pageIndex2 = 1
  3144. selectIQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3145. this.tableData = data.rows
  3146. })
  3147. this.batchAddData = {
  3148. samplingLocation: '',
  3149. samplingLocationB: '',
  3150. samplingNumber: ''
  3151. }
  3152. this.subDetailFlag = true
  3153. },
  3154. // 删除检验记录
  3155. deleteModal () {
  3156. if (this.IQCSelections.length === 0) {
  3157. this.$message.warning('请勾选要删除的检验单!')
  3158. return
  3159. }
  3160. this.$confirm(`是否删除该 `+ this.IQCSelections.length +` 条检验记录?`, '提示', {
  3161. confirmButtonText: '确定',
  3162. cancelButtonText: '取消',
  3163. type: 'warning'
  3164. }).then(() => {
  3165. let tempData = {
  3166. site: '',
  3167. submitList: this.IQCSelections
  3168. }
  3169. iqcRecordDelete(tempData).then(({data}) => {
  3170. if (data && data.code === 0) {
  3171. this.getDataList()
  3172. this.IQCSelections = []
  3173. this.$message({
  3174. message: '操作成功',
  3175. type: 'success',
  3176. duration: 1500,
  3177. onClose: () => {}
  3178. })
  3179. } else {
  3180. this.$alert(data.msg, '错误', {
  3181. confirmButtonText: '确定'
  3182. })
  3183. }
  3184. })
  3185. })
  3186. },
  3187. // 任务重载
  3188. overLoadModal () {
  3189. if (this.IQCSelections.length === 0) {
  3190. this.$message.warning('请勾选要重载的检验单!')
  3191. return
  3192. }
  3193. if (this.IQCSelections.every(val => val.state === '待检验' || val.state === '未开始')) {
  3194. this.$confirm(`是否重载该 `+ this.IQCSelections.length +` 条检验单?`, '提示', {
  3195. confirmButtonText: '确定',
  3196. cancelButtonText: '取消',
  3197. type: 'warning'
  3198. }).then(() => {
  3199. let tempData = {
  3200. site: '',
  3201. submitList: this.IQCSelections
  3202. }
  3203. this.overLoading = true
  3204. iqcRecordOverLoad(tempData).then(({data}) => {
  3205. if (data && data.code === 0) {
  3206. this.getDataList()
  3207. this.IQCSelections = []
  3208. this.$message({
  3209. message: '操作成功',
  3210. type: 'success',
  3211. duration: 1500,
  3212. onClose: () => {}
  3213. })
  3214. this.overLoading = false
  3215. } else {
  3216. this.overLoading = false
  3217. this.$alert(data.msg, '错误', {
  3218. confirmButtonText: '确定'
  3219. })
  3220. }
  3221. }).catch(() => {
  3222. this.overLoading = false
  3223. })
  3224. })
  3225. } else {
  3226. this.$message.warning('检验单必须为待检验状态!')
  3227. return
  3228. }
  3229. },
  3230. // 审核按钮
  3231. submitResult () {
  3232. let tempData1 = '' // 记录不是待审核状态的单号
  3233. let tempData2 = '' // 记录处置措施未填写的单号
  3234. if (this.IQCSelections.length === 0) {
  3235. this.$message.warning('请勾选要审核的检验单!')
  3236. return
  3237. }
  3238. for (let i = 0; i < this.IQCSelections.length; i++) {
  3239. if (this.IQCSelections[i].state !== '待审核'){
  3240. tempData1 = tempData1 + this.IQCSelections[i].inspectionNo + '、'
  3241. }
  3242. if (this.IQCSelections[i].inspectionResult === '不合格' && (this.IQCSelections[i].disposalMeasures === '' || this.IQCSelections[i].disposalMeasures == null)) {
  3243. tempData2 = tempData2 + this.IQCSelections[i].inspectionNo + '、'
  3244. }
  3245. }
  3246. if (tempData1 !== '') {
  3247. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3248. this.$message.warning('检验单号 ' + tempData1 + ' 不是待审核状态!')
  3249. return
  3250. }
  3251. if (tempData2 !== '') {
  3252. tempData2 = tempData2.substring(0, tempData2.length - 1)
  3253. this.$message.warning('检验单号 ' + tempData2 + ' 的处置措施未选择!')
  3254. return
  3255. }
  3256. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.IQCSelections.length + ` 条记录`, '提示', {
  3257. confirmButtonText: '确定',
  3258. cancelButtonText: '取消',
  3259. type: 'warning'
  3260. }).then(() => {
  3261. this.submitData.submitList = this.IQCSelections
  3262. saveIQCSubmitResult(this.submitData).then(({data}) => {
  3263. if (data && data.code === 0) {
  3264. this.getDataList()
  3265. this.IQCSelections = []
  3266. this.$message({
  3267. message: '操作成功',
  3268. type: 'success',
  3269. duration: 1500,
  3270. onClose: () => {}
  3271. })
  3272. } else {
  3273. this.$alert(data.msg, '错误', {
  3274. confirmButtonText: '确定'
  3275. })
  3276. }
  3277. })
  3278. }).catch(() => {
  3279. })
  3280. },
  3281. // 子明细每页数
  3282. sizeChangeHandle2 (val) {
  3283. this.pageSize2 = val
  3284. },
  3285. // 子明细当前页
  3286. currentChangeHandle2 (val) {
  3287. this.pageIndex2 = val
  3288. },
  3289. // 子明细方法
  3290. // 表格的新增
  3291. rowClassName ({ row, rowIndex }) {
  3292. row.xh = rowIndex + 1
  3293. row.rowI = this.tableData.indexOf(row) + 1
  3294. },
  3295. // 单选框选中数据
  3296. handleDetailSelectionChange(selection) {
  3297. this.checkedDetail = selection
  3298. },
  3299. // 点击新增更多
  3300. handleAddBtn (td) {
  3301. checkIQCIsSubmit(td).then(({data}) => {
  3302. if (data.flag !== 1) {
  3303. let obj = {}
  3304. obj.subDetailValue = ""
  3305. obj.samplingLocation = ""
  3306. this.tableData.push(obj)
  3307. } else {
  3308. this.$alert("记录已提交!", '错误', {
  3309. confirmButtonText: '确定'
  3310. })
  3311. }
  3312. })
  3313. },
  3314. // 批量新增操作
  3315. batchHandleAdd (td) {
  3316. checkIQCIsSubmit(td).then(({data}) => {
  3317. if (data.flag !== 1) {
  3318. this.batchHandleAddModalFlag = true
  3319. } else {
  3320. this.$alert("记录已提交!", '错误', {
  3321. confirmButtonText: '确定'
  3322. })
  3323. }
  3324. })
  3325. },
  3326. // 批量新增行
  3327. batchHandleAddModal () {
  3328. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  3329. let obj = {}
  3330. obj.samplingLocation = this.batchAddData.samplingLocation
  3331. obj.samplingLocationB = this.batchAddData.samplingLocationB
  3332. obj.subDetailValue = ""
  3333. this.tableData.push(obj)
  3334. }
  3335. this.batchHandleAddModalFlag = false
  3336. },
  3337. // 回车事件
  3338. nextFocus1 (index) {
  3339. let a1 = `${index + 1}` + `a`
  3340. this.$nextTick(() => {
  3341. this.$refs[a1].focus()
  3342. })
  3343. },
  3344. nextFocus2 (index) {
  3345. let a2 = `${index + 1}` + `b`
  3346. this.$nextTick(() => {
  3347. this.$refs[a2].focus()
  3348. })
  3349. },
  3350. nextFocus3 (index) {
  3351. let a3 = `${index + 1}` + `c`
  3352. this.$nextTick(() => {
  3353. this.$refs[a3].focus()
  3354. })
  3355. },
  3356. focusNextInput (index, type) {
  3357. let aaa = ''
  3358. if (this.detailList.length - 1 === index) {
  3359. aaa = `${type}0`
  3360. } else {
  3361. aaa = `${type}${index + 1}`
  3362. }
  3363. this.$nextTick(() => {
  3364. this.$refs[aaa].focus()
  3365. })
  3366. },
  3367. //删除
  3368. handleDeleteBtn (td) {
  3369. checkIQCIsSubmit(td).then(({data}) => {
  3370. if (data.flag !== 1) {
  3371. if (this.checkedDetail.length === 0) {
  3372. this.$alert("请先选择要删除的数据", "提示", {
  3373. confirmButtonText: "确定",
  3374. })
  3375. } else {
  3376. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  3377. confirmButtonText: "确定",
  3378. cancelButtonText: "取消",
  3379. type: "warning",
  3380. callback: (action) => {
  3381. if (action === "confirm") {
  3382. let val = this.checkedDetail
  3383. val.forEach((val, index) => {
  3384. this.tableData.splice(this.tableData.indexOf(val), 1)
  3385. if (this.templateTableData.length === 0) {
  3386. this.pageIndex2--
  3387. }
  3388. })
  3389. this.$message({
  3390. message: "删除成功!",
  3391. type: "success",
  3392. })
  3393. return
  3394. } else {
  3395. this.$message({
  3396. message: "已取消删除操作",
  3397. type: "warning",
  3398. })
  3399. return
  3400. }
  3401. },
  3402. })
  3403. }
  3404. } else {
  3405. this.$alert("记录已提交!", '错误', {
  3406. confirmButtonText: '确定'
  3407. })
  3408. }
  3409. })
  3410. },
  3411. // 新增子明细记录
  3412. saveSubDetailResult () {
  3413. for (let i = 0; i < this.tableData.length; i++) {
  3414. if(this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null){
  3415. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  3416. return
  3417. }
  3418. }
  3419. this.subDetailData.subDetailValues = this.tableData
  3420. saveIQCSubDetailed(this.subDetailData).then(({data}) => {
  3421. if (data && data.code === 0) {
  3422. if (data.count > 0) {
  3423. this.subDetailData.itemResult = 'N'
  3424. this.subDetailData.unqualifiedQuantity = data.count
  3425. }
  3426. if (this.subDetailData.subDetailValues.length > 0) {
  3427. this.subDetailData.subDetailRecordNum = 1
  3428. } else {
  3429. this.subDetailData.subDetailRecordNum = -1
  3430. this.subDetailData.unqualifiedQuantity = 0
  3431. this.subDetailData.itemResult = 'Y'
  3432. }
  3433. this.subDetailFlag = false
  3434. this.tableData = []
  3435. this.$message({
  3436. message: '操作成功',
  3437. type: 'success',
  3438. duration: 1500,
  3439. onClose: () => {}
  3440. })
  3441. } else {
  3442. this.$alert(data.msg, '错误', {
  3443. confirmButtonText: '确定'
  3444. })
  3445. }
  3446. })
  3447. },
  3448. // 更改检验方式
  3449. changeInspectionModal (row) {
  3450. this.changeData = {
  3451. site: row.site,
  3452. buNo: row.buNo,
  3453. inspectionNo: row.inspectionNo,
  3454. rollCount: row.rollCount,
  3455. inspectCode: '',
  3456. qtySample: '',
  3457. percentSample: '',
  3458. samplingProgrammeNo: '',
  3459. samplingProgrammeDesc: '',
  3460. samplingLevelNo: '',
  3461. samplingLevelDesc: '',
  3462. receiptNo: row.receiptNo,
  3463. receiptItemNo: row.receiptItemNo,
  3464. inspectionTypeNo: '105'
  3465. }
  3466. this.changeModalFlag = true
  3467. },
  3468. // 保存修改
  3469. changeInspectionWay () {
  3470. if (this.changeData.inspectCode === '' || this.changeData.inspectCode == null) {
  3471. this.$message.warning('请选择检验方式!')
  3472. return
  3473. }
  3474. if (this.changeData.inspectCode === '数量抽检' && (this.changeData.qtySample == null || this.changeData.qtySample === '' || this.changeData.qtySample === 0)) {
  3475. this.$message.warning('请填写抽检数量!')
  3476. return
  3477. }
  3478. if (this.changeData.inspectCode === '比例抽检' && (this.changeData.percentSample == null || this.changeData.percentSample === '' || this.changeData.percentSample === 0)) {
  3479. this.$message.warning('请填写抽检比例!')
  3480. return
  3481. }
  3482. if (this.changeData.inspectCode === '不固定抽检' && (this.changeData.samplingProgrammeNo == null || this.changeData.samplingProgrammeNo === '')) {
  3483. this.$message.warning('请选择抽样方案!')
  3484. return
  3485. }
  3486. if (this.changeData.inspectCode === '不固定抽检' && (this.changeData.samplingLevelNo === null || this.changeData.samplingLevelNo === '')) {
  3487. this.$message.warning('请选择检验水平!')
  3488. return
  3489. }
  3490. if (this.changeData.inspectCode === '数量抽检' && this.changeData.qtySample > this.changeData.rollCount) {
  3491. this.$message.warning('抽检数量不能大于送检数量,当前检验单送检数量为[]!')
  3492. return
  3493. }
  3494. changeInspectionWay(this.changeData).then(({data}) => {
  3495. if (data && data.code === 0) {
  3496. this.getDataList()
  3497. this.changeModalFlag = false
  3498. this.$message({
  3499. message: '操作成功',
  3500. type: 'success',
  3501. duration: 1500,
  3502. onClose: () => {}
  3503. })
  3504. } else {
  3505. this.$alert(data.msg, '错误', {
  3506. confirmButtonText: '确定'
  3507. })
  3508. }
  3509. })
  3510. },
  3511. // 校验用户是否收藏
  3512. favoriteIsOk () {
  3513. let userFavorite = {
  3514. userId: this.$store.state.user.id,
  3515. languageCode: this.$i18n.locale
  3516. }
  3517. userFavoriteList(userFavorite).then(({data}) => {
  3518. for (let i = 0; i < data.list.length; i++) {
  3519. if (this.$route.meta.menuId === data.list[i].menuId) {
  3520. this.favorite = true
  3521. }
  3522. }
  3523. })
  3524. },
  3525. // 检验方式为全检时,不允许修改送检数量和抽样数量
  3526. getFullInspectionFlag (row) {
  3527. if (row.inspectCode !== '' && row.inspectCode != null) {
  3528. return row.inspectCode === '全检'
  3529. }
  3530. // 部分历史数据未返回检验方式时,使用数量一致性作为兜底判断
  3531. if (row.rollCount === '' || row.rollCount == null || row.samplingQty === '' || row.samplingQty == null) {
  3532. return false
  3533. }
  3534. return Number(row.rollCount) === Number(row.samplingQty)
  3535. },
  3536. // 收藏 OR 取消收藏
  3537. favoriteFunction () {
  3538. let userFavorite = {
  3539. userId: this.$store.state.user.id,
  3540. functionId: this.$route.meta.menuId,
  3541. }
  3542. if (this.favorite) {
  3543. removeUserFavorite(userFavorite).then(({data}) => {
  3544. this.$message.success(data.msg)
  3545. this.favorite = false
  3546. })
  3547. } else {
  3548. // 收藏
  3549. saveUserFavorite(userFavorite).then(({data}) => {
  3550. this.$message.success(data.msg)
  3551. this.favorite = true
  3552. })
  3553. }
  3554. },
  3555. //导出excel
  3556. async createExportData () {
  3557. this.searchData.limit = -1
  3558. this.searchData.page = 1
  3559. await qcIQCInspectionSearch(this.searchData).then(({data}) => {
  3560. this.exportList = data.page.list
  3561. })
  3562. return this.exportList
  3563. },
  3564. startDownload() {},
  3565. finishDownload() {},
  3566. fields () {
  3567. let json = "{"
  3568. this.columnList1.forEach((item, index) => {
  3569. if (index == this.columnList1.length - 1) {
  3570. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  3571. } else {
  3572. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  3573. }
  3574. })
  3575. json += "}"
  3576. let s = eval("(" + json + ")")
  3577. return s
  3578. },
  3579. // 动态列开始 获取 用户保存的 格式列
  3580. async getTableUserColumn (tableId, columnId) {
  3581. let queryTableUser = {
  3582. userId: this.$store.state.user.name,
  3583. functionId: this.$route.meta.menuId,
  3584. tableId: tableId,
  3585. status: true,
  3586. languageCode: this.$i18n.locale
  3587. }
  3588. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3589. if (data.rows.length > 0) {
  3590. //this.columnList1 = []
  3591. switch (columnId) {
  3592. case 1:
  3593. this.columnList1 = data.rows
  3594. break;
  3595. case 2:
  3596. this.detailColumnList = data.rows
  3597. break;
  3598. // case 3:
  3599. // this.columnList2 = data.rows
  3600. // break;
  3601. // case 4:
  3602. // this.columnList3 = data.rows
  3603. // break;
  3604. }
  3605. } else {
  3606. this.getColumnList(tableId, columnId)
  3607. }
  3608. })
  3609. },
  3610. // 获取 tableDefault 列
  3611. async getColumnList (tableId, columnId) {
  3612. let queryTable = {
  3613. functionId: this.$route.meta.menuId,
  3614. tableId: tableId,
  3615. languageCode: this.$i18n.locale
  3616. }
  3617. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3618. if (!data.rows.length == 0) {
  3619. switch (columnId) {
  3620. case 1:
  3621. this.columnList1 = data.rows
  3622. break;
  3623. case 2:
  3624. this.detailColumnList = data.rows
  3625. break;
  3626. // case 3:
  3627. // this.columnList2 = data.rows
  3628. // break;
  3629. // case 4:
  3630. // this.columnList3 = data.rows
  3631. // break;
  3632. }
  3633. } else {
  3634. // this.showDefault = true.
  3635. }
  3636. })
  3637. },
  3638. /**
  3639. * 明细导入后将返回值回传给父组件
  3640. * @param val
  3641. */
  3642. changeMyString (val) {
  3643. for (let i = 0; i < this.detailList.length; i++) {
  3644. if (val[this.detailList[i].itemNo] !== undefined) {
  3645. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  3646. if (val[this.detailList[i].itemNo] != null) {
  3647. this.detailList[i].subDetailRecordNum = 1
  3648. }
  3649. if (val[this.detailList[i].itemNo] > 0) {
  3650. this.detailList[i].itemResult = 'N'
  3651. }
  3652. }
  3653. }
  3654. },
  3655. //获取按钮的权限数据
  3656. getButtonAuthData () {
  3657. let searchFlag = this.isAuth(this.menuId+":search")
  3658. let checkFlag = this.isAuth(this.menuId+":check")
  3659. let overLoadFlag = this.isAuth(this.menuId+":overLoad")
  3660. let deleteFlag = this.isAuth(this.menuId+":delete")
  3661. let detailFlag = this.isAuth(this.menuId+":detail")
  3662. let fileFlag = this.isAuth(this.menuId+":file")
  3663. let changeFlag = this.isAuth(this.menuId+":change")
  3664. //处理页面的权限数据
  3665. this.authSearch = !searchFlag
  3666. this.authCheck = !checkFlag
  3667. this.authOverLoad = !overLoadFlag
  3668. this.authDelete = !deleteFlag
  3669. this.authDetail = !detailFlag
  3670. this.authFile = !fileFlag
  3671. this.authChange = !changeFlag
  3672. },
  3673. }
  3674. }
  3675. </script>
  3676. <style scoped>
  3677. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  3678. color: red;
  3679. font-weight: bold;
  3680. }
  3681. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  3682. color: rgb(103,194,58);
  3683. font-weight: bold;
  3684. }
  3685. .numInput /deep/ .el-input__inner{
  3686. text-align: right;
  3687. }
  3688. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3689. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3690. -webkit-appearance: none;
  3691. }
  3692. /deep/ .inlineNumber input[type="number"]{
  3693. -moz-appearance: textfield;
  3694. padding-right: 5px !important;
  3695. }
  3696. .el-table /deep/ .cell{
  3697. height: auto;
  3698. line-height: 1.5;
  3699. }
  3700. /deep/ .el-tabs--border-card>.el-tabs__content{
  3701. padding: 5px !important;
  3702. }
  3703. </style>