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.

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