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.

3030 lines
106 KiB

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