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.

4481 lines
167 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
6 months ago
2 months ago
6 months ago
3 years ago
3 years ago
3 years ago
3 years ago
2 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 months ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
6 months ago
6 months ago
6 months ago
6 months ago
3 months ago
6 months ago
6 months ago
3 months ago
6 months ago
3 months ago
6 months ago
6 months ago
6 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
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. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item :label="'BU'">
  6. <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 75px">
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item :label="'检验单号'">
  16. <el-input v-model="searchData.inspectionNo" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item :label="'物料编码'">
  19. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  20. </el-form-item>
  21. <el-form-item :label="'SKU'">
  22. <el-input v-model="searchData.sku" clearable style="width: 120px"></el-input>
  23. </el-form-item>
  24. <el-form-item :label="'物料名称'">
  25. <el-input v-model="searchData.partDesc" clearable style="width: 200px"></el-input>
  26. </el-form-item>
  27. <el-form-item :label="'检验结论'">
  28. <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
  29. <el-option label="合格" value="合格"></el-option>
  30. <el-option label="不合格" value="不合格"></el-option>
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item :label="'检验类型'">
  34. <el-select v-model="searchData.inspectionTypeNo" clearable style="width: 100px">
  35. <el-option label="IPQC首检" value="首件检"></el-option>
  36. <el-option label="IPQC自检" value="自检"></el-option>
  37. <el-option label="IPQC巡检" value="巡检"></el-option>
  38. <el-option label="IPQC末件检" value="末件检"></el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item :label="'处置措施'">
  42. <el-select v-model="searchData.disposalMeasures" clearable style="width: 90px">
  43. <el-option
  44. v-for = "i in disposalMeasuresOptions"
  45. :key = "i.id"
  46. :label = "i.disposalMeasures"
  47. :value = "i.disposalMeasures">
  48. </el-option>
  49. </el-select>
  50. </el-form-item>
  51. </el-form>
  52. <el-form :inline="true" label-position="top" :model="searchData">
  53. <el-form-item :label="'PN'">
  54. <el-input v-model="searchData.cinvSourceCode" clearable style="width: 120px"></el-input>
  55. </el-form-item>
  56. <el-form-item :label="'工单号'">
  57. <el-input v-model="searchData.orderNo" clearable style="width: 137px"></el-input>
  58. </el-form-item>
  59. <el-form-item :label="'派工单号'">
  60. <el-input v-model="searchData.seqNo" clearable style="width: 167px"></el-input>
  61. </el-form-item>
  62. <el-form-item :label="'工序'">
  63. <el-input v-model="searchData.operationDesc" clearable style="width: 108px"></el-input>
  64. </el-form-item>
  65. <el-form-item :label="'状态'">
  66. <el-select v-model="searchData.states" multiple style="width: 340px">
  67. <el-option label="未开始" value="未开始"></el-option>
  68. <el-option label="待检验" value="待检验"></el-option>
  69. <el-option label="待审核" value="待审核"></el-option>
  70. <el-option label="已完成" value="已完成"></el-option>
  71. </el-select>
  72. </el-form-item>
  73. </el-form>
  74. <el-form :inline="true" label-position="top" :model="searchData">
  75. <el-form-item :label="'送检日期'">
  76. <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>
  77. -
  78. <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>
  79. </el-form-item>
  80. <el-form-item :label="'检验时间:'">
  81. <el-date-picker style="width: 170px" v-model="searchData.startDate" type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期"></el-date-picker>
  82. -
  83. <el-date-picker style="width: 170px" v-model="searchData.endDate" type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期"></el-date-picker>
  84. </el-form-item>
  85. <el-form-item :label="' '">
  86. <el-button v-if="!authSearch" type="primary" :loading="searchLoading" @click="getDataList">查询</el-button>
  87. <el-button v-if="!authSave" type="primary" @click="addModal">新增</el-button>
  88. <el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button>
  89. <el-button v-if="!authCancelCheck" type="primary" @click="cancelApproval">取消审核</el-button>
  90. <el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button>
  91. <el-button type="primary" @click="printList">打印</el-button>
  92. <download-excel
  93. :fields="fields()"
  94. :data="exportData"
  95. type="xls"
  96. :name="exportName"
  97. :header="exportHeader"
  98. :footer="exportFooter"
  99. :fetch="createExportData"
  100. :before-generate="startDownload"
  101. :before-finish="finishDownload"
  102. worksheet="导出信息"
  103. class="el-button el-button--primary el-button--medium">
  104. {{ "导出" }}
  105. </download-excel>
  106. </el-form-item>
  107. </el-form>
  108. <!-- 检验记录展示列表 -->
  109. <el-table
  110. :height="height"
  111. :data="dataList"
  112. border
  113. ref="IPQCTable"
  114. @row-click="IPQCClickRow"
  115. @selection-change="selectionIPQC"
  116. style="width: 100%;">
  117. <el-table-column
  118. type="selection"
  119. header-align="center"
  120. align="center"
  121. :selectable="selectFlag"
  122. width="50">
  123. </el-table-column>
  124. <el-table-column
  125. prop="state"
  126. header-align="center"
  127. align="center"
  128. label="状态">
  129. <template slot-scope="scope">
  130. <div :style="{fontWeight:'bold', color: scope.row.state =='待检验' ? 'red' : scope.row.state =='待审核' ? '#ffa500e0' : scope.row.state =='已完成' ? '#3ac252' : ''}">
  131. {{ scope.row.state }}
  132. </div>
  133. </template>
  134. </el-table-column>
  135. <el-table-column
  136. header-align="center"
  137. align="center"
  138. width="90"
  139. label="是否阅读">
  140. <template slot-scope="scope">
  141. <span v-if="scope.row.state !== '待检验'"></span>
  142. <span v-else-if="scope.row.hasWorkFile === 'N'">无需</span>
  143. <span v-else-if="scope.row.workFileRead === 'Y'" style="color: #3ac252"></span>
  144. <span v-else-if="scope.row.hasWorkFile === 'Y'" style="color: red"></span>
  145. <span v-else></span>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. v-for="(item,index) in columnList1" :key="index"
  150. :sortable="item.columnSortable"
  151. :prop="item.columnProp"
  152. :header-align="item.headerAlign"
  153. :show-overflow-tooltip="item.showOverflowTooltip"
  154. :align="item.align"
  155. :fixed="item.fixed==''?false:item.fixed"
  156. :min-width="item.columnWidth"
  157. :label="item.columnLabel">
  158. <template slot-scope="scope">
  159. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  160. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  161. </template>
  162. </el-table-column>
  163. <el-table-column
  164. fixed="right"
  165. header-align="center"
  166. align="center"
  167. width="130"
  168. label="操作">
  169. <template slot-scope="scope">
  170. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  171. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  172. <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
  173. </template>
  174. </el-table-column>
  175. </el-table>
  176. <!-- 分页-->
  177. <el-pagination
  178. @size-change="sizeChangeHandle"
  179. @current-change="currentChangeHandle"
  180. :current-page="pageIndex"
  181. :page-sizes="[20, 50, 100, 200, 500]"
  182. :page-size="pageSize"
  183. :total="totalPage"
  184. layout="total, sizes, prev, pager, next, jumper">
  185. </el-pagination>
  186. <!-- 新增巡检记录 -->
  187. <el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
  188. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  189. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  190. <el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">
  191. <el-option
  192. v-for = "i in userBuList"
  193. :key = "i.buNo"
  194. :label = "i.sitename"
  195. :value = "i.buNo">
  196. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  197. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  198. {{ i.buDesc }}
  199. </span>
  200. </el-option>
  201. </el-select>
  202. </el-form-item>
  203. <el-form-item label="标签号">
  204. <el-input v-if="this.modalData.specialTaskFlag === 'Y'" disabled v-model="modalData.rollNo" style="width: 221px"></el-input>
  205. <el-input v-else v-model="modalData.rollNo" @keyup.native.enter="rollNoEnter" clearable style="width: 221px"></el-input>
  206. </el-form-item>
  207. </el-form>
  208. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  209. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && (this.modalData.rollNo === '' || this.modalData.rollNo == null)" prop="orderNo" :rules="rules.seqNoType">
  210. <span style="cursor: pointer" slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span>
  211. <el-input v-model="modalData.seqNo" style="width: 221px"></el-input>
  212. </el-form-item>
  213. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && this.modalData.rollNo !== '' && this.modalData.rollNo != null" prop="orderNo" :rules="rules.seqNoType">
  214. <span slot="label">派工单号</span>
  215. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  216. </el-form-item>
  217. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType">
  218. <span slot="label">派工单号</span>
  219. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  220. </el-form-item>
  221. <el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
  222. <el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input>
  223. </el-form-item>
  224. </el-form>
  225. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  226. <el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
  227. <el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px">
  228. <el-option
  229. v-for = "i in operationList"
  230. :key = "i.operationNo"
  231. :label = "i.operationDesc"
  232. :value = "i.operationDesc">
  233. </el-option>
  234. </el-select>
  235. </el-form-item>
  236. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'">
  237. <span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
  238. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  239. </el-form-item>
  240. <el-form-item v-else label="机台" prop="resourceId" :rules="rules.resourceIdType">
  241. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  242. </el-form-item>
  243. </el-form>
  244. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  245. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData">
  246. <span style="cursor: pointer" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  247. <el-input v-model="modalData.partNo" style="width: 221px"></el-input>
  248. </el-form-item>
  249. <el-form-item v-else label="物料编码" prop="partNo" :rules="rules.partNoType">
  250. <el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
  251. </el-form-item>
  252. <el-form-item label="物料名称">
  253. <el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input>
  254. </el-form-item>
  255. </el-form>
  256. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  257. <el-form-item label="物料类别">
  258. <el-input v-model="modalData.invdefinetype" readonly style="width: 221px"></el-input>
  259. </el-form-item>
  260. <el-form-item label="SKU">
  261. <el-input v-model="modalData.sku" readonly style="width: 221px"></el-input>
  262. </el-form-item>
  263. </el-form>
  264. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  265. <el-form-item label="检验类型" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType">
  266. <el-select v-model="modalData.inspectionTypeNo" style="width: 221px">
  267. <el-option label="首件检" value="首件检"></el-option>
  268. <el-option label="自检" value="自检"></el-option>
  269. <el-option label="巡检" value="巡检"></el-option>
  270. <el-option label="末件检" value="末件检"></el-option>
  271. </el-select>
  272. </el-form-item>
  273. <el-form-item label="送检数量" prop="rollQty" :rules="rules.rollQtyType">
  274. <el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
  275. </el-form-item>
  276. <el-form-item label="单位" prop="umId" :rules="rules.umIdType">
  277. <el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
  278. <el-option
  279. v-for = "i in umList"
  280. :key = "i.umId"
  281. :label = "i.umName"
  282. :value = "i.umId">
  283. </el-option>
  284. </el-select>
  285. </el-form-item>
  286. </el-form>
  287. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  288. <el-form-item prop="templateId" :rules="rules.templateId">
  289. <span style="cursor: pointer" v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList"><a>检验模板</a></span>
  290. <span v-else slot="label">检验模板</span>
  291. <el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input>
  292. </el-form-item>
  293. <el-form-item label="送检总数">
  294. <el-input v-model="modalData.sjzs" disabled style="width: 120px"></el-input>
  295. </el-form-item>
  296. <el-form-item label=" ">
  297. <input type="checkbox" id="specialTask" name="specialTask" v-model="checked" @click="changeSpecialTask"/> <label for="specialTask">无工单检验</label>
  298. </el-form-item>
  299. </el-form>
  300. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  301. <el-form-item label="老卷号">
  302. <el-input v-model="modalData.batchRollNo" style="width: 456px"></el-input>
  303. </el-form-item>
  304. </el-form>
  305. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  306. <el-form-item label="特殊要求">
  307. <el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  308. </el-form-item>
  309. </el-form>
  310. <el-footer style="height:40px;margin-top: 55px;text-align:center">
  311. <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
  312. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  313. </el-footer>
  314. </el-dialog>
  315. <!-- 检验单详情页 -->
  316. <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
  317. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
  318. <el-form-item :label="'物料编码'">
  319. <el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
  320. </el-form-item>
  321. <el-form-item :label="'物料类别'">
  322. <el-input v-model="detailData.invdefinetype" readonly style="width: 100px"></el-input>
  323. </el-form-item>
  324. <el-form-item :label="'PN'">
  325. <el-input v-model="detailData.cinvSourceCode" readonly style="width: 100px"></el-input>
  326. </el-form-item>
  327. <el-form-item :label="'SKU'">
  328. <el-input v-model="detailData.sku" readonly style="width: 100px"></el-input>
  329. </el-form-item>
  330. <el-form-item :label="'物料名称'">
  331. <el-input v-model="detailData.partDesc" readonly style="width: 300px"></el-input>
  332. </el-form-item>
  333. <el-form-item :label="'单位'">
  334. <el-input v-model="detailData.umName" readonly style="width: 60px"></el-input>
  335. </el-form-item>
  336. <el-form-item>
  337. <span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span>
  338. <span v-else style="cursor: pointer" slot="label" @click="getOperatorList"><a>协同人员</a></span>
  339. <el-input v-model="detailData.operatorName" readonly style="width: 150px"></el-input>
  340. </el-form-item>
  341. <el-form-item>
  342. <span v-if="detailData.submitFlag === 'Y'" slot="label">责任人</span>
  343. <span v-else style="cursor: pointer" slot="label" @click="getResponsiblePersonList"><a>责任人</a></span>
  344. <el-input v-model="detailData.responsiblePersonName" readonly style="width: 150px"></el-input>
  345. </el-form-item>
  346. </el-form>
  347. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList">
  348. <el-form-item :label="'送检数量'">
  349. <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" style="width: 85px"></el-input-number>
  350. </el-form-item>
  351. <el-form-item :label="'抽样数量'">
  352. <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 85px"></el-input-number>
  353. </el-form-item>
  354. <el-form-item :label="'合格数量'">
  355. <el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled style="width: 85px" @change="noPassQtyChange"></el-input-number>
  356. <el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-else v-model="detailData.passQty" style="width: 85px" @change="noPassQtyChange"></el-input-number>
  357. </el-form-item>
  358. <el-form-item :label="'不合格数量'">
  359. <el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.notPassQty" disabled style="width: 85px"></el-input-number>
  360. <el-input-number :controls="false" :step="0" :min="0" :max="Number(detailData.samplingQty) || 0" v-else v-model="detailData.notPassQty" style="width: 85px" @change="noNotPassQtyChange"></el-input-number>
  361. </el-form-item>
  362. <el-form-item :label="'不合格项目数量'">
  363. <el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled style="width: 85px"></el-input-number>
  364. <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 85px"></el-input-number>
  365. </el-form-item>
  366. <el-form-item :label="'批次合格数'">
  367. <el-input-number :controls="false" :step="0" min="0" v-model="detailData.batchQualifiedQty" disabled style="width: 85px"></el-input-number>
  368. </el-form-item>
  369. <el-form-item style="margin-top: 13px;margin-left: 405px">
  370. <el-button v-if="detailData.submitFlag !== 'Y'" :loading="loadFlag" @click="dataAcquisition">
  371. <svg t="1739002700745" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="38076" width="22" height="22"><path d="M922.000696 762.746435V465.363478l55.652174-0.111304v299.542261c0 131.695304-106.562783 239.571478-236.922435 239.571478H285.42887C155.158261 1004.365913 48.484174 896.623304 48.484174 764.794435V465.252174h59.258435v299.542261c0 101.843478 77.022609 179.712 177.775304 179.712H740.841739c100.61913 0 181.158957-79.916522 181.158957-181.76z" fill="#1D293F" p-id="38077"></path><path d="M290.148174 192.556522c20.301913-20.925217 30.47513-48.617739 30.47513-83.099826 0-72.548174-36.285217-108.833391-108.722087-108.833392H141.401043v223.365566h70.255305c32.055652-0.111304 58.167652-10.529391 78.491826-31.432348z m-105.227131-7.635479V39.446261h23.596522c19.70087 0 35.661913 6.166261 47.994435 18.632348 12.354783 12.466087 18.387478 29.740522 18.387478 52.001391 0 22.973217-5.921391 41.22713-17.652869 54.650435s-27.937391 20.190609-48.617739 20.190608H184.921043zM634.434783 595.366957h-84.057044V498.866087a102.511304 102.511304 0 0 0 74.262261-98.54887c0-56.230957-45.478957-102.310957-101.10887-102.310956-55.629913 0-101.086609 46.08-101.086608 102.310956 0 46.08 30.586435 85.25913 72.192 97.947826v96.990609h-81.252174c-16.829217-43.78713-50.688-99.283478-81.65287-143.070609a101.331478 101.331478 0 0 0 14.269218-52.001391c0-56.230957-45.946435-102.310957-102.177392-102.310956s-102.177391 46.08-102.177391 102.310956c0 56.230957 45.946435 102.310957 102.177391 102.310957 15.716174 0 30.72-3.628522 44.009739-10.017392 21.170087 34.326261 42.829913 74.351304 57.811479 102.778435h-73.906087l128.333913 130.493218 94.675478-108.966957v145.853217h-111.616l148.034783 148.858435 130.715826-148.858435h-111.504696v-129.402434l91.180522 92.516174 113.307826-130.248348h-53.203478c14.758957-28.42713 36.173913-68.452174 57.210434-102.800696 13.178435 6.41113 27.937391 10.039652 43.542261 10.039652 55.629913 0 101.086609-46.08 101.086609-102.310956 0-56.230957-45.456696-102.310957-101.086609-102.310957-55.652174 0-101.220174 46.08-101.220174 102.310957a102.4 102.4 0 0 0 14.135653 52.001391c-30.72 43.653565-64.200348 99.283478-80.896 142.937044z m-390.611479-148.48a46.614261 46.614261 0 0 1-46.436174-46.458435c0-25.510957 20.925217-46.436174 46.436174-46.436174s46.436174 20.925217 46.436174 46.436174-20.925217 46.436174-46.436174 46.436174z m279.819131 0c-25.266087 0-45.946435-20.925217-45.946435-46.458435 0-25.510957 20.702609-46.436174 45.968696-46.436174 25.266087 0 45.946435 20.925217 45.946434 46.436174s-20.680348 46.436174-45.946434 46.436174z m278.639304-93.005914c25.288348 0 45.968696 20.925217 45.968696 46.436174s-20.702609 46.436174-45.968696 46.436174c-25.266087 0-45.946435-20.925217-45.946435-46.436174s20.680348-46.436174 45.946435-46.436174zM395.130435 172.722087h74.128695l15.248696 51.155478h47.415652L458.707478 0.623304h-51.155478L332.8 223.98887h47.170783l15.11513-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517217-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.138783 19.456l23.218087 77.401043h-54.405566l23.329392-78.002087z m168.96 165.932522h43.631304V39.446261h58.189913V0.623304h-159.877565v38.956522h58.056348v184.297739z m169.894956-51.155478h74.128696l15.248696 51.155478h47.415652L830.330435 0.623304h-51.155478l-74.752 223.365566h47.193043l15.09287-51.266783z m32.768-114.777044c1.825391-6.032696 3.027478-12.332522 3.517218-18.854956h1.202087c0.601043 8.102957 1.691826 14.514087 3.161043 19.456l23.218087 77.401043h-54.427826l23.329391-78.002087z" fill="#FD9F01" p-id="38078"></path></svg>
  372. </el-button>
  373. <el-button @click="getFileContentData(detailData)">
  374. <svg t="1739002974630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="59598" width="22" height="22"><path d="M807.3216 889.5488H221.184c-78.7456 0-142.848-64.1024-142.848-142.848V286.976c0-78.7456 64.1024-142.848 142.848-142.848h178.8416c20.7872 0 40.7552 8.8064 54.784 24.1664l77.568 85.0944c2.4064 2.6112 5.8368 4.1472 9.3696 4.1472h265.5232c78.7456 0 142.848 64.1024 142.848 142.848v346.2656c0.0512 78.7968-64.0512 142.8992-142.7968 142.8992zM221.184 205.568c-44.9024 0-81.408 36.5056-81.408 81.408v459.6736c0 44.9024 36.5056 81.408 81.408 81.408h586.1376c44.9024 0 81.408-36.5056 81.408-81.408V400.4352c0-44.9024-36.5056-81.408-81.408-81.408h-265.5232c-20.7872 0-40.7552-8.8064-54.784-24.1664L409.3952 209.7152c-2.4064-2.6112-5.8368-4.1472-9.3696-4.1472H221.184z" fill="#6FB1F9" p-id="59599"></path><path d="M466.0224 453.8368H249.0368c-16.9472 0-30.72-13.7728-30.72-30.72s13.7728-30.72 30.72-30.72h216.9856c16.9472 0 30.72 13.7728 30.72 30.72s-13.7728 30.72-30.72 30.72z" fill="#6FB1F9" p-id="59600"></path></svg>
  375. </el-button>
  376. <el-button @click="subDetailUpload">
  377. <svg t="1739002903501" class="icon" viewBox="0 0 1550 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="50418" width="22" height="22"><path d="M985.000229 727.917714c20.48 0 34.113829-13.663086 34.113828-34.143085 0-10.24-3.393829-17.056914-10.24-23.873829l-204.8-204.8c-6.816914-6.846171-13.633829-10.24-23.873828-10.24-10.24 0-17.086171 3.393829-23.903086 10.24l-204.8 204.8c-6.816914 6.816914-10.24 13.633829-10.24 23.873829 0 20.48 13.663086 34.143086 34.143086 34.143085 10.24 0 17.056914-3.423086 23.873828-10.24l146.783086-146.783085v395.966171c0 20.48 13.663086 34.113829 34.143086 34.113829s34.113829-13.633829 34.113828-34.113829V570.894629l146.783086 146.783085c6.816914 6.816914 13.663086 10.24 23.903086 10.24z m282.799542-353.045943c0-10.24 1.287314-17.086171 0-27.296914C1240.502857 128.117029 1043.0464 29.257143 858.199771 29.257143 701.205943 29.257143 564.662857 117.994057 496.405943 247.720229 469.079771 240.874057 441.782857 234.057143 414.485943 234.057143 281.365943 234.057143 175.542857 307.112229 175.542857 440.232229c0 17.056914 3.423086 34.113829 6.816914 51.2C97.514057 535.786057 29.257143 585.5232 29.257143 723.031771c0 170.656914 136.543086 277.942857 307.2 277.942858H585.142857c20.48 0 34.143086-13.633829 34.143086-34.113829S605.622857 932.717714 585.142857 932.717714h-248.685714c-133.12 0-238.943086-76.565943-238.943086-209.685943 0-82.797714 37.566171-131.657143 105.325714-166.765714l58.046172-20.48-13.663086-61.44c-3.423086-10.24-3.423086-23.873829-3.423086-34.113828 0-95.583086 75.103086-137.918171 170.686172-137.918172 20.48 0 37.536914 3.423086 58.016914 10.24l54.623086 20.48 27.296914-51.2c61.44-112.64 179.317029-198.100114 303.776914-184.32 184.846629 20.48 309.511314 71.68 341.343086 250.0608 1.199543 6.787657 0 10.24 0 17.056914v6.846172l-3.423086 47.776914 44.383086 20.48c110.094629 34.6112 222.354286 143.36 222.354286 249.183086 0 150.176914-122.88 243.799771-273.056914 243.799771h-214.571886c-20.48 0-34.113829 13.663086-34.113829 34.143086s13.633829 34.113829 34.113829 34.113829h214.571886c187.713829 0 341.313829-124.342857 341.313828-312.056686 0-144.530286-121.270857-269.663086-263.314286-314.046172z" fill="#6C5FFC" p-id="50419"></path></svg>
  378. </el-button>
  379. </el-form-item>
  380. </el-form>
  381. <el-form :inline="true" label-position="top">
  382. <el-form-item :label="'检验结论'">
  383. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
  384. <el-option label="合格" value="合格"></el-option>
  385. <el-option label="不合格" value="不合格"></el-option>
  386. </el-select>
  387. <el-select v-else v-model="detailData.inspectionResult" @change="resultChange" style="width: 100px" placeholder="请选择">
  388. <el-option label="合格" value="合格"></el-option>
  389. <el-option label="不合格" value="不合格"></el-option>
  390. </el-select>
  391. </el-form-item>
  392. <el-form-item :label="'质检备注'">
  393. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 293px"></el-input>
  394. <el-input v-else v-model="detailData.inspectionRemark" style="width: 293px"></el-input>
  395. </el-form-item>
  396. <el-form-item v-show="detailData.inspectionResult === '不合格'" style="margin-top: 5px">
  397. <el-form-item :label="'处置措施'">
  398. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px">
  399. <el-option
  400. v-for = "i in disposalMeasuresOptions"
  401. :key = "i.id"
  402. :label = "i.disposalMeasures"
  403. :value = "i.disposalMeasures">
  404. </el-option>
  405. </el-select>
  406. <el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px">
  407. <el-option
  408. v-for = "i in disposalMeasuresOptions"
  409. :key = "i.id"
  410. :label = "i.disposalMeasures"
  411. :value = "i.disposalMeasures">
  412. </el-option>
  413. </el-select>
  414. </el-form-item>
  415. <el-form-item :label="'处置说明'">
  416. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input>
  417. <el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input>
  418. </el-form-item>
  419. </el-form-item>
  420. </el-form>
  421. <!-- 展示列表 -->
  422. <div class="rq ">
  423. <el-table
  424. :height="500"
  425. :data="detailList"
  426. border
  427. style="width: 100%;">
  428. <el-table-column
  429. prop=""
  430. header-align="center"
  431. align="center"
  432. min-width="90"
  433. label="操作">
  434. <template slot-scope="scope">
  435. <el-button class="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button>
  436. <el-button style="margin-left: 2px" class="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button>
  437. </template>
  438. </el-table-column>
  439. <el-table-column
  440. v-for="(item,index) in detailColumnList" :key="index"
  441. :sortable="item.columnSortable"
  442. :prop="item.columnProp"
  443. :header-align="item.headerAlign"
  444. :show-overflow-tooltip="item.showOverflowTooltip"
  445. :align="item.align"
  446. :fixed="item.fixed==''?false:item.fixed"
  447. :min-width="item.columnWidth"
  448. :label="item.columnLabel">
  449. <template slot-scope="scope">
  450. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  451. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  452. </template>
  453. </el-table-column>
  454. <el-table-column
  455. prop=""
  456. header-align="center"
  457. align="right"
  458. min-width="80"
  459. label="实测值">
  460. <template slot-scope="scope">
  461. <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" @change="updateItemResult(scope.row)" style="height: 11px; width: 98%"></el-input>
  462. <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>
  463. </template>
  464. </el-table-column>
  465. <el-table-column
  466. prop=""
  467. header-align="center"
  468. align="center"
  469. min-width="80"
  470. label="检验明细">
  471. <template slot-scope="scope">
  472. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row)">点击输入</el-button>
  473. <el-button v-else type="primary" @click="subDetailModal(scope.row)">点击输入</el-button>
  474. </template>
  475. </el-table-column>
  476. <el-table-column
  477. prop=""
  478. header-align="center"
  479. align="right"
  480. min-width="80"
  481. label="抽样数量">
  482. <template slot-scope="scope">
  483. <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>
  484. <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>
  485. </template>
  486. </el-table-column>
  487. <el-table-column
  488. prop=""
  489. header-align="center"
  490. align="right"
  491. min-width="80"
  492. label="不合格数量">
  493. <template slot-scope="scope">
  494. <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>
  495. <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>
  496. </template>
  497. </el-table-column>
  498. <el-table-column
  499. prop=""
  500. header-align="center"
  501. align="right"
  502. min-width="90"
  503. label="项目检验结论">
  504. <template slot-scope="scope">
  505. <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">
  506. <el-option label="合格" value="Y" style="color: green"></el-option>
  507. <el-option label="不合格" value="N" style="color: red"></el-option>
  508. </el-select>
  509. <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="合格">
  510. <el-option label="合格" value="Y" style="color: green"></el-option>
  511. <el-option label="不合格" value="N" style="color: red"></el-option>
  512. </el-select>
  513. </template>
  514. </el-table-column>
  515. </el-table>
  516. </div>
  517. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  518. <el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
  519. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
  520. <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
  521. </el-footer>
  522. </el-dialog>
  523. <!-- 子明细信息 -->
  524. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="1102px">
  525. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  526. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  527. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  528. <div class="rq ">
  529. <el-table
  530. :height="400"
  531. :data="templateTableData"
  532. border
  533. v-loading="subDetailLoading"
  534. element-loading-text="拼命加载中"
  535. :row-class-name="rowClassName"
  536. @selection-change="handleDetailSelectionChange"
  537. style="width: 100%;">
  538. <el-table-column type="selection" align="center" width="40"></el-table-column>
  539. <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
  540. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
  541. <template slot-scope="{row}">
  542. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  543. <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>
  544. </template>
  545. </el-table-column>
  546. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
  547. <template slot-scope="{row}">
  548. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  549. <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>
  550. </template>
  551. </el-table-column>
  552. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
  553. <template slot-scope="{row}">
  554. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
  555. <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>
  556. </template>
  557. </el-table-column>
  558. <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
  559. <template slot-scope="{row}">
  560. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
  561. <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>
  562. </template>
  563. </el-table-column>
  564. <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
  565. <template slot-scope="{row}">
  566. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
  567. <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>
  568. </template>
  569. </el-table-column>
  570. <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
  571. <template slot-scope="{row}">
  572. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
  573. <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>
  574. </template>
  575. </el-table-column>
  576. <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
  577. <template slot-scope="{row}">
  578. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
  579. <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>
  580. </template>
  581. </el-table-column>
  582. </el-table>
  583. <!-- 分页-->
  584. <el-pagination
  585. @size-change="sizeChangeHandle2"
  586. @current-change="currentChangeHandle2"
  587. :current-page="pageIndex2"
  588. :page-sizes="[20, 50, 100, 200, 500]"
  589. :page-size="pageSize2"
  590. :total="tableData.length"
  591. layout="total, sizes, prev, pager, next, jumper">
  592. </el-pagination>
  593. </div>
  594. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  595. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" :loading="subDetailVisiable" @click="saveSubDetailResult">保存</el-button>
  596. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  597. </el-footer>
  598. </el-dialog>
  599. <!-- 派工单号 -->
  600. <el-dialog title="派工单号" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="seqDetailFlag" width="952px" height="273px">
  601. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  602. <el-form-item label="工单号">
  603. <el-input v-model="seqDetailData.orderNo" clearable style="width: 150px"></el-input>
  604. </el-form-item>
  605. <el-form-item label="派工单号">
  606. <el-input v-model="seqDetailData.seqNo" clearable style="width: 150px"></el-input>
  607. </el-form-item>
  608. <el-form-item label="SKU">
  609. <el-input v-model="seqDetailData.sku" clearable style="width: 150px"></el-input>
  610. </el-form-item>
  611. <el-form-item label="状态">
  612. <el-select v-model="seqDetailData.status" style="width: 100px" placeholder="请选择">
  613. <el-option label="下达" value="下达"></el-option>
  614. <el-option label="关闭" value="关闭"></el-option>
  615. </el-select>
  616. </el-form-item>
  617. </el-form>
  618. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  619. <el-form-item label="物料编码">
  620. <el-input v-model="seqDetailData.partNo" clearable style="width: 150px"></el-input>
  621. </el-form-item>
  622. <el-form-item label="物料名称">
  623. <el-input v-model="seqDetailData.partDesc" clearable style="width: 315px"></el-input>
  624. </el-form-item>
  625. <el-form-item label="工序">
  626. <el-input v-model="seqDetailData.operationDesc" clearable style="width: 150px"></el-input>
  627. </el-form-item>
  628. <el-form-item>
  629. <el-button type="primary" @click="searchSeqInfo" style="margin-top: 24px">查询</el-button>
  630. </el-form-item>
  631. </el-form>
  632. <el-table
  633. :height="400"
  634. :data="seqInfoList"
  635. @row-dblclick="getRowData1"
  636. border
  637. style="width: 100%;">
  638. <el-table-column
  639. v-for="(item,index) in seqDetailColumnList" :key="index"
  640. :sortable="item.columnSortable"
  641. :prop="item.columnProp"
  642. :header-align="item.headerAlign"
  643. :show-overflow-tooltip="item.showOverflowTooltip"
  644. :align="item.align"
  645. :fixed="item.fixed==''?false:item.fixed"
  646. :min-width="item.columnWidth"
  647. :label="item.columnLabel">
  648. </el-table-column>
  649. </el-table>
  650. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  651. <el-button type="primary" @click="seqDetailFlag = false">关闭</el-button>
  652. </el-footer>
  653. </el-dialog>
  654. <!-- 批量新增子明细操作-->
  655. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  656. <el-form :inline="true" label-position="top">
  657. <el-form-item :label="'默认抽样位置A'">
  658. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  659. </el-form-item>
  660. <el-form-item :label="'默认抽样位置B'">
  661. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  662. </el-form-item>
  663. <el-form-item :label="'抽样数量'">
  664. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  665. </el-form-item>
  666. </el-form>
  667. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  668. <el-button type="primary" @click="batchHandleAddModal">保存</el-button>
  669. <el-button type="primary" @click="batchHandleAddModalFlag=false">关闭</el-button>
  670. </el-footer>
  671. </el-dialog>
  672. <!-- 检验模板 -->
  673. <el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px">
  674. <div class="rq">
  675. <el-form :inline="true" label-position="top" :model="templateData">
  676. <el-form-item :label="'模板编码'">
  677. <el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
  678. </el-form-item>
  679. <el-form-item :label="'模板名称'">
  680. <el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
  681. </el-form-item>
  682. <!-- <el-form-item :label="'检验类型'">-->
  683. <!-- <el-select v-model="templateData.inspectionTypeNo" style="width: 100px">-->
  684. <!-- <el-option-->
  685. <!-- v-for = "i in typeOptions"-->
  686. <!-- :key = "i.inspectionTypeNo"-->
  687. <!-- :label = "i.inspectionTypeName"-->
  688. <!-- :value = "i.inspectionTypeNo">-->
  689. <!-- </el-option>-->
  690. <!-- </el-select>-->
  691. <!-- </el-form-item>-->
  692. <el-form-item :label="' '">
  693. <el-button type="primary" @click="queryTemplateList">查询</el-button>
  694. </el-form-item>
  695. </el-form>
  696. <el-table
  697. :height="300"
  698. :data="templateList"
  699. @row-dblclick="getRowData"
  700. border
  701. style="width: 100%;">
  702. <el-table-column
  703. v-for="(item,index) in templateDetailList" :key="index"
  704. :sortable="item.columnSortable"
  705. :prop="item.columnProp"
  706. :header-align="item.headerAlign"
  707. :show-overflow-tooltip="item.showOverflowTooltip"
  708. :align="item.align"
  709. :fixed="item.fixed==''?false:item.fixed"
  710. :min-width="item.columnWidth"
  711. :label="item.columnLabel">
  712. <template slot-scope="scope">
  713. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  714. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  715. </template>
  716. </el-table-column>
  717. </el-table>
  718. </div>
  719. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  720. <el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
  721. </el-footer>
  722. </el-dialog>
  723. <!-- 物料 -->
  724. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="520px">
  725. <div class="rq">
  726. <el-form :inline="true" label-position="top" :model="partData">
  727. <el-form-item :label="'物料编码'">
  728. <el-input v-model="partData.partNo" clearable style="width: 115px"></el-input>
  729. </el-form-item>
  730. <el-form-item :label="'物料名称'">
  731. <el-input v-model="partData.partDesc" clearable style="width: 115px"></el-input>
  732. </el-form-item>
  733. <el-form-item :label="'SKU'">
  734. <el-input v-model="partData.sku" clearable style="width: 79px"></el-input>
  735. </el-form-item>
  736. <el-form-item :label="'PN'">
  737. <el-input v-model="partData.cinvSourceCode" clearable style="width: 79px"></el-input>
  738. </el-form-item>
  739. <el-form-item :label="' '">
  740. <el-button type="primary" @click="queryPartList">查询</el-button>
  741. </el-form-item>
  742. </el-form>
  743. <el-table
  744. :height="300"
  745. :data="partList"
  746. @row-dblclick="getRowData2"
  747. border
  748. style="width: 100%;">
  749. <el-table-column
  750. v-for="(item,index) in partDetailList" :key="index"
  751. :sortable="item.columnSortable"
  752. :prop="item.columnProp"
  753. :header-align="item.headerAlign"
  754. :show-overflow-tooltip="item.showOverflowTooltip"
  755. :align="item.align"
  756. :fixed="item.fixed==''?false:item.fixed"
  757. :min-width="item.columnWidth"
  758. :label="item.columnLabel">
  759. <template slot-scope="scope">
  760. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  761. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  762. </template>
  763. </el-table-column>
  764. </el-table>
  765. </div>
  766. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  767. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  768. </el-footer>
  769. </el-dialog>
  770. <!-- 文件清单 -->
  771. <el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
  772. <el-form :inline="true" label-position="top">
  773. <el-form-item v-if="detailInformationFlag">
  774. <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>
  775. </el-form-item>
  776. </el-form>
  777. <iqc-file-table :columns="fileColumnList" :data-list="fileContentList" :query-loading="fileLoading" :inspection-no="currentWorkFileRow && currentWorkFileRow.inspectionNo" @file-previewed="onWorkFilePreviewed" @file-deleted="() => getFileContentData(currentWorkFileRow)"></iqc-file-table>
  778. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  779. <el-button type="primary" @click="fileFlag = false">关闭</el-button>
  780. </el-footer>
  781. </el-dialog>
  782. <!-- 机修人员清单 -->
  783. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  784. <div class="rq">
  785. <el-form :inline="true" label-position="top" :model="operatorData">
  786. <el-form-item v-if="operatorData.flag !== '2' || detailData.buNo !== '04-MHM'" :label="'所属角色'">
  787. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px" @change="getOperatorList2">
  788. <el-option
  789. v-for = "i in roleList"
  790. :key = "i.roleId"
  791. :label = "i.roleName"
  792. :value = "i.roleId">
  793. </el-option>
  794. </el-select>
  795. </el-form-item>
  796. <el-form-item :label="'用户编码'">
  797. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  798. </el-form-item>
  799. <el-form-item :label="'用户姓名'">
  800. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  801. </el-form-item>
  802. <el-form-item :label="' '">
  803. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  804. </el-form-item>
  805. </el-form>
  806. <el-table
  807. :height="300"
  808. :data="operatorList"
  809. ref="operatorTable"
  810. @row-click="operatorClickRow"
  811. @selection-change="selectionChangeHandle2"
  812. border
  813. style="width: 100%;">
  814. <el-table-column
  815. type="selection"
  816. header-align="center"
  817. align="center"
  818. width="50">
  819. </el-table-column>
  820. <el-table-column
  821. v-for="(item,index) in operatorDetailList" :key="index"
  822. :sortable="item.columnSortable"
  823. :prop="item.columnProp"
  824. :header-align="item.headerAlign"
  825. :show-overflow-tooltip="item.showOverflowTooltip"
  826. :align="item.align"
  827. :fixed="item.fixed==''?false:item.fixed"
  828. :min-width="item.columnWidth"
  829. :label="item.columnLabel">
  830. <template slot-scope="scope">
  831. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  832. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  833. </template>
  834. </el-table-column>
  835. </el-table>
  836. </div>
  837. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  838. <el-button type="primary" @click="confirmOperator">确认</el-button>
  839. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  840. </el-footer>
  841. </el-dialog>
  842. <!-- 配置项目设备 -->
  843. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
  844. <div class="rq">
  845. <el-table
  846. :height="350"
  847. :data="itemObjectList"
  848. border
  849. style="width: 100%">
  850. <el-table-column
  851. v-for="(item,index) in itemObjectColumnList" :key="index"
  852. :sortable="item.columnSortable"
  853. :prop="item.columnProp"
  854. :header-align="item.headerAlign"
  855. :show-overflow-tooltip="item.showOverflowTooltip"
  856. :align="item.align"
  857. :fixed="item.fixed===''?false:item.fixed"
  858. :min-width="item.columnWidth"
  859. :label="item.columnLabel">
  860. <template slot-scope="scope">
  861. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  862. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  863. </template>
  864. </el-table-column>
  865. <el-table-column
  866. header-align="center"
  867. align="center"
  868. min-width="100"
  869. label="设备">
  870. <template slot-scope="scope">
  871. <el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
  872. <el-option
  873. v-for = "i in scope.row.objectList"
  874. :key = "i.objectID"
  875. :label = "i.objectDesc"
  876. :value = "i.objectID">
  877. </el-option>
  878. </el-select>
  879. </template>
  880. </el-table-column>
  881. </el-table>
  882. </div>
  883. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  884. <el-button type="primary" @click="actionModal2">保存</el-button>
  885. <el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
  886. </el-footer>
  887. </el-dialog>
  888. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  889. <!-- 上传文件的modal -->
  890. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile>
  891. <!-- 上传文件的modal -->
  892. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  893. <!-- 子明细导入 -->
  894. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  895. <!-- 打印标签 -->
  896. <qr-code ref="qrCode"></qr-code>
  897. </div>
  898. </template>
  899. <script>
  900. import {
  901. qcIPQCInspectionSearch, // 查询IPQC的检验记录
  902. ipqcDetailSearch, // 查询IPQC的检验明细
  903. inspectorSearch, // 查询检验员
  904. ipqcRecordDelete, // 删除检验记录
  905. markIPQCWorkFileRead, // 标记工作文件已阅读
  906. saveIPQCDetailedRecord, // 新增明细信息
  907. saveIPQCSubmitResult, // 审核
  908. saveIPQCSubDetailed, // 新增子明细信息
  909. selectIPQCSubDetailedRecord, // 子明细记录信息查询
  910. checkIPQCIsSubmit, // 检查是否已提交
  911. getOperationList, // 查询工序列表
  912. getResourceList, // 查询机台列表
  913. getPartList, // 查询物料列表
  914. saveOsInspection, // 新增检验记录
  915. queryController, // 检查动控
  916. queryTemplateList, // 获取检验模板列表
  917. getSpecialOperationList, // 获取特殊工序列表
  918. inspectionTypeSearch, // 搜索所有检验类型
  919. disposalMeasuresSearch, // 获取处置措施列表
  920. getRollNo, // 模糊查询标签号
  921. rollNoEnter, // 标签号回车事件
  922. queryPartList, // 查询物料集合
  923. umSearch, // 查询单位列表
  924. getSiteAndBuByUserName,
  925. getSiteAndBuByUserName2,
  926. searchSeqInfo, // 派工单号查询
  927. actionIPQCInspection, // 开始检验
  928. dataAcquisition, // 数据采集
  929. getIPQCItemObjectList, // 查询项目设备
  930. dataAcquisitionByItem, // 根据项目数据采集
  931. cancelApproval2, // 取消审核
  932. searchPartAttributeDetails, // 查询物料属性模板
  933. getEamPropertiesItemByItemNo,
  934. getCollectorDataByItem,
  935. getResponsibleOperatorList,
  936. } from "@/api/qc/qc.js"
  937. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  938. import Chooselist from '@/views/modules/common/Chooselist_eam'
  939. import {getInspectionFile} from '@/api/eam/eam_object_list.js'
  940. import {
  941. deleteObjectFile,
  942. getUserRoleList, // 获取用户角色列表
  943. getOperatorList
  944. } from '@/api/eam/eam.js'
  945. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  946. import {qcPrint} from '@/api/qc/qcPrint.js'
  947. import qcFAIUploadFile from "./qc_FAI_upload_file"
  948. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  949. import subDetailUpload from "./sub_detail_upload";
  950. import QrCode from "../common/QrCode.vue";
  951. import IqcFileTable from "./IQCFileTable.vue";
  952. /*上传文件的組件*/
  953. export default {
  954. components: {
  955. IqcFileTable,
  956. QrCode,
  957. Chooselist,
  958. qcFAIUploadFile,
  959. comQcItemImageUploadFile,
  960. subDetailUpload
  961. },
  962. computed: {
  963. templateTableData () {
  964. let start = (this.pageIndex2 - 1) * this.pageSize2
  965. let end = start + this.pageSize2
  966. if (end > this.tableData.length){
  967. end = this.tableData.length
  968. }
  969. return this.tableData.slice(start,end)
  970. },
  971. },
  972. watch: {
  973. detailData: {
  974. deep: true,
  975. handler: function (newV, oldV) {
  976. if (this.detailData.inspectionResult === '不合格') {
  977. if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
  978. this.detailData.batchQualifiedQty = this.detailData.rollQty
  979. } else if (this.detailData.disposalMeasures === '挑选使用') {
  980. this.detailData.batchQualifiedQty = this.detailData.rollQty - this.detailData.notPassQty
  981. } else {
  982. this.detailData.batchQualifiedQty = 0
  983. }
  984. } else {
  985. this.detailData.batchQualifiedQty = this.detailData.rollQty
  986. }
  987. }
  988. },
  989. detailList: {
  990. deep: true,
  991. handler: function (newV, oldV) {
  992. let num2 = 0
  993. for (let i = 0; i < this.detailList.length; i++) {
  994. if (this.detailList[i].itemResult === 'N') {
  995. num2++
  996. }
  997. }
  998. this.detailData.unqualifiedQty = num2
  999. }
  1000. },
  1001. },
  1002. data () {
  1003. return {
  1004. loadFlag: false,
  1005. transferLoadFlag: false,
  1006. inspectionNo: '',
  1007. fileFlag: false,
  1008. fileContentList: [],
  1009. currentWorkFileRow: null,
  1010. // 是否收藏
  1011. favorite: false,
  1012. // 导出 start
  1013. exportData: [],
  1014. exportName: "IPQC检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  1015. exportHeader: ["IPQC检验录入"],
  1016. exportFooter: [],
  1017. exportList: [],
  1018. // 导出 end
  1019. checkCompletedData:{
  1020. inspectionNo: ''
  1021. },
  1022. submitData:{
  1023. site: '',
  1024. inspectionNo: '',
  1025. submit_flag: '',
  1026. inspectionResult: '',
  1027. submitList: [],
  1028. updateBy: this.$store.state.user.name,
  1029. type: 'ipqc'
  1030. },
  1031. tagNo:'',
  1032. searchData: {
  1033. site: '',
  1034. userName: this.$store.state.user.name,
  1035. inspectionNo: '',
  1036. state: '',
  1037. inspectionResult: '',
  1038. orderNo: '',
  1039. operationDesc: '',
  1040. buNo: '',
  1041. startDate: '',
  1042. endDate: '',
  1043. startDate2: '',
  1044. endDate2: '',
  1045. inspectionTypeNo: '',
  1046. partNo: '',
  1047. partDesc: '',
  1048. cinvSourceCode: '',
  1049. sku: '',
  1050. disposalMeasures: '',
  1051. page: 1,
  1052. limit: 10,
  1053. seqNo: '',
  1054. states: ['未开始','待检验'],
  1055. },
  1056. pageIndex: 1,
  1057. pageSize: 20,
  1058. totalPage: 0,
  1059. pageIndex2: 1,
  1060. pageSize2: 20,
  1061. totalPage2: 0,
  1062. height: 200,
  1063. dataList: [],
  1064. dataListSelections: [],
  1065. modalData: {
  1066. flag:'',
  1067. site: '',
  1068. bu: '',
  1069. inspectionNo:'',
  1070. partNo: '',
  1071. partDesc: '',
  1072. inspectionTypeNo:'',
  1073. inspectionTypeName:'',
  1074. inspectorNo:'',
  1075. inspectorName:'',
  1076. submit_flag:'',
  1077. orderNo: '',
  1078. operationDesc: '',
  1079. operationNo: '',
  1080. resourceId: '',
  1081. resourceDesc: '',
  1082. rollQty: '',
  1083. seqNo: '',
  1084. batchRollNo: '',
  1085. invdefinetype: '',
  1086. sku: '',
  1087. cinvSourceCode: '',
  1088. qtyrequired: '',
  1089. lotsize:'',
  1090. specialRequirements: '',
  1091. templateId: '',
  1092. templateName: '',
  1093. specialTaskFlag: '',
  1094. workCenterNo: '',
  1095. rollNo: '',
  1096. umId: '',
  1097. umName: '',
  1098. sjzs: ''
  1099. },
  1100. // 展示列集
  1101. columnList1: [
  1102. {
  1103. userId: this.$store.state.user.name,
  1104. functionId: 301014,
  1105. serialNumber: '301014Table1BuDesc',
  1106. tableId: "301014Table1",
  1107. tableName: "IPQC检验记录表",
  1108. columnProp: 'buDesc',
  1109. headerAlign: "center",
  1110. align: "center",
  1111. columnLabel: 'BU',
  1112. columnHidden: false,
  1113. columnImage: false,
  1114. columnSortable: false,
  1115. sortLv: 0,
  1116. status: true,
  1117. fixed: '',
  1118. columnWidth: 100,
  1119. },
  1120. {
  1121. userId: this.$store.state.user.name,
  1122. functionId: 301014,
  1123. serialNumber: '301014Table1InspectionNo',
  1124. tableId: "301014Table1",
  1125. tableName: "IPQC检验记录表",
  1126. columnProp: 'inspectionNo',
  1127. headerAlign: "center",
  1128. align: "center",
  1129. columnLabel: '检验单号',
  1130. columnHidden: false,
  1131. columnImage: false,
  1132. columnSortable: false,
  1133. sortLv: 0,
  1134. status: true,
  1135. fixed: '',
  1136. columnWidth: 120,
  1137. },
  1138. {
  1139. userId: this.$store.state.user.name,
  1140. functionId: 301014,
  1141. serialNumber: '301014Table1BatchRollNo',
  1142. tableId: "301014Table1",
  1143. tableName: "IPQC检验记录表",
  1144. columnProp: 'batchRollNo',
  1145. headerAlign: "center",
  1146. align: "center",
  1147. columnLabel: '老卷号',
  1148. columnHidden: false,
  1149. columnImage: false,
  1150. columnSortable: false,
  1151. sortLv: 0,
  1152. status: true,
  1153. fixed: '',
  1154. columnWidth: 150,
  1155. },
  1156. {
  1157. userId: this.$store.state.user.name,
  1158. functionId: 301014,
  1159. serialNumber: '301014Table1RollNo',
  1160. tableId: "301014Table1",
  1161. tableName: "IPQC检验记录表",
  1162. columnProp: 'rollNo',
  1163. headerAlign: "center",
  1164. align: "center",
  1165. columnLabel: '标签条码',
  1166. columnHidden: false,
  1167. columnImage: false,
  1168. columnSortable: false,
  1169. sortLv: 0,
  1170. status: true,
  1171. fixed: '',
  1172. columnWidth: 150,
  1173. },
  1174. {
  1175. userId: this.$store.state.user.name,
  1176. functionId: 301014,
  1177. serialNumber: '301014Table1InspectionResult',
  1178. tableId: "301014Table1",
  1179. tableName: "IPQC检验记录表",
  1180. columnProp: 'inspectionResult',
  1181. headerAlign: "center",
  1182. align: "center",
  1183. columnLabel: '检验结论',
  1184. columnHidden: false,
  1185. columnImage: false,
  1186. columnSortable: false,
  1187. sortLv: 0,
  1188. status: true,
  1189. fixed: '',
  1190. columnWidth: 100,
  1191. },
  1192. {
  1193. userId: this.$store.state.user.name,
  1194. functionId: 301014,
  1195. serialNumber: '301014Table1DisposalMeasures',
  1196. tableId: "301014Table1",
  1197. tableName: "IPQC检验记录表",
  1198. columnProp: 'disposalMeasures',
  1199. headerAlign: "center",
  1200. align: "center",
  1201. columnLabel: '处置措施',
  1202. columnHidden: false,
  1203. columnImage: false,
  1204. columnSortable: false,
  1205. sortLv: 0,
  1206. status: true,
  1207. fixed: '',
  1208. columnWidth: 100,
  1209. },
  1210. {
  1211. userId: this.$store.state.user.name,
  1212. functionId: 301014,
  1213. serialNumber: '301014Table1InspectionTypeNo',
  1214. tableId: "301014Table1",
  1215. tableName: "IPQC检验记录表",
  1216. columnProp: 'inspectionTypeNo',
  1217. headerAlign: "center",
  1218. align: "center",
  1219. columnLabel: '检验类型',
  1220. columnHidden: false,
  1221. columnImage: false,
  1222. columnSortable: false,
  1223. sortLv: 0,
  1224. status: true,
  1225. fixed: '',
  1226. columnWidth: 100,
  1227. },
  1228. {
  1229. userId: this.$store.state.user.name,
  1230. functionId: 301014,
  1231. serialNumber: '301014Table1TaskDate',
  1232. tableId: "301014Table1",
  1233. tableName: "IPQC检验记录表",
  1234. columnProp: 'taskDate',
  1235. headerAlign: "center",
  1236. align: "center",
  1237. columnLabel: '送检日期',
  1238. columnHidden: false,
  1239. columnImage: false,
  1240. columnSortable: false,
  1241. sortLv: 0,
  1242. status: true,
  1243. fixed: '',
  1244. columnWidth: 130,
  1245. },
  1246. {
  1247. userId: this.$store.state.user.name,
  1248. functionId: 301014,
  1249. serialNumber: '301014Table1InspectionCycle',
  1250. tableId: "301014Table1",
  1251. tableName: "IPQC检验记录表",
  1252. columnProp: 'inspectionCycle',
  1253. headerAlign: "center",
  1254. align: "right",
  1255. columnLabel: '检验周期(h)',
  1256. columnHidden: false,
  1257. columnImage: false,
  1258. columnSortable: false,
  1259. sortLv: 0,
  1260. status: true,
  1261. fixed: '',
  1262. columnWidth: 100,
  1263. },
  1264. {
  1265. userId: this.$store.state.user.name,
  1266. functionId: 301014,
  1267. serialNumber: '301014Table1OrderNo',
  1268. tableId: "301014Table1",
  1269. tableName: "IPQC检验记录表",
  1270. columnProp: 'orderNo',
  1271. headerAlign: "center",
  1272. align: "left",
  1273. columnLabel: '工单号',
  1274. columnHidden: false,
  1275. columnImage: false,
  1276. columnSortable: false,
  1277. sortLv: 0,
  1278. status: true,
  1279. fixed: '',
  1280. columnWidth: 150,
  1281. },
  1282. {
  1283. userId: this.$store.state.user.name,
  1284. functionId: 301014,
  1285. serialNumber: '301014Table1SeqNo',
  1286. tableId: "301014Table1",
  1287. tableName: "IPQC检验记录表",
  1288. columnProp: 'seqNo',
  1289. headerAlign: "center",
  1290. align: "left",
  1291. columnLabel: '派工单号',
  1292. columnHidden: false,
  1293. columnImage: false,
  1294. columnSortable: false,
  1295. sortLv: 0,
  1296. status: true,
  1297. fixed: '',
  1298. columnWidth: 200,
  1299. },
  1300. {
  1301. userId: this.$store.state.user.name,
  1302. functionId: 301014,
  1303. serialNumber: '301014Table1OperationDesc',
  1304. tableId: "301014Table1",
  1305. tableName: "IPQC检验记录表",
  1306. columnProp: 'operationDesc',
  1307. headerAlign: "center",
  1308. align: "left",
  1309. columnLabel: '工序',
  1310. columnHidden: false,
  1311. columnImage: false,
  1312. columnSortable: false,
  1313. sortLv: 0,
  1314. status: true,
  1315. fixed: '',
  1316. columnWidth: 120,
  1317. },
  1318. {
  1319. userId: this.$store.state.user.name,
  1320. functionId: 301014,
  1321. serialNumber: '301014Table1ResourceDesc',
  1322. tableId: "301014Table1",
  1323. tableName: "IPQC检验记录表",
  1324. columnProp: 'resourceDesc',
  1325. headerAlign: "center",
  1326. align: "left",
  1327. columnLabel: '机台',
  1328. columnHidden: false,
  1329. columnImage: false,
  1330. columnSortable: false,
  1331. sortLv: 0,
  1332. status: true,
  1333. fixed: '',
  1334. columnWidth: 120,
  1335. },
  1336. {
  1337. userId: this.$store.state.user.name,
  1338. functionId: 301014,
  1339. serialNumber: '301014Table1PartNo',
  1340. tableId: "301014Table1",
  1341. tableName: "IPQC检验记录表",
  1342. columnProp: 'partNo',
  1343. headerAlign: "center",
  1344. align: "center",
  1345. columnLabel: '物料编码',
  1346. columnHidden: false,
  1347. columnImage: false,
  1348. columnSortable: false,
  1349. sortLv: 0,
  1350. status: true,
  1351. fixed: '',
  1352. columnWidth: 120,
  1353. },
  1354. {
  1355. userId: this.$store.state.user.name,
  1356. functionId: 301014,
  1357. serialNumber: '301014Table1PartDesc',
  1358. tableId: "301014Table1",
  1359. tableName: "IPQC检验记录表",
  1360. columnProp: 'partDesc',
  1361. headerAlign: "center",
  1362. align: "left",
  1363. columnLabel: '物料名称',
  1364. columnHidden: false,
  1365. columnImage: false,
  1366. columnSortable: false,
  1367. sortLv: 0,
  1368. status: true,
  1369. fixed: '',
  1370. columnWidth: 300,
  1371. },
  1372. {
  1373. userId: this.$store.state.user.name,
  1374. functionId: 301014,
  1375. serialNumber: '301014Table1Sku',
  1376. tableId: "301014Table1",
  1377. tableName: "IPQC检验记录表",
  1378. columnProp: 'sku',
  1379. headerAlign: "center",
  1380. align: "center",
  1381. columnLabel: 'SKU',
  1382. columnHidden: false,
  1383. columnImage: false,
  1384. columnSortable: false,
  1385. sortLv: 0,
  1386. status: true,
  1387. fixed: '',
  1388. columnWidth: 120,
  1389. },
  1390. {
  1391. userId: this.$store.state.user.name,
  1392. functionId: 301014,
  1393. serialNumber: '301014Table1cinvSourceCode',
  1394. tableId: "301014Table1",
  1395. tableName: "IPQC检验记录表",
  1396. columnProp: 'cinvSourceCode',
  1397. headerAlign: "center",
  1398. align: "center",
  1399. columnLabel: 'PN',
  1400. columnHidden: false,
  1401. columnImage: false,
  1402. columnSortable: false,
  1403. sortLv: 0,
  1404. status: true,
  1405. fixed: '',
  1406. columnWidth: 120,
  1407. },
  1408. {
  1409. userId: this.$store.state.user.name,
  1410. functionId: 301014,
  1411. serialNumber: '301014Table1Invdefinetype',
  1412. tableId: "301014Table1",
  1413. tableName: "IPQC检验记录表",
  1414. columnProp: 'invdefinetype',
  1415. headerAlign: "center",
  1416. align: "left",
  1417. columnLabel: '物料类别',
  1418. columnHidden: false,
  1419. columnImage: false,
  1420. columnSortable: false,
  1421. sortLv: 0,
  1422. status: true,
  1423. fixed: '',
  1424. columnWidth: 120,
  1425. },
  1426. {
  1427. userId: this.$store.state.user.name,
  1428. functionId: 301014,
  1429. serialNumber: '301014Table1RollQty',
  1430. tableId: "301014Table1",
  1431. tableName: "IPQC检验记录表",
  1432. columnProp: 'rollQty',
  1433. headerAlign: "center",
  1434. align: "right",
  1435. columnLabel: '送检数量',
  1436. columnHidden: false,
  1437. columnImage: false,
  1438. columnSortable: false,
  1439. sortLv: 0,
  1440. status: true,
  1441. fixed: '',
  1442. columnWidth: 100,
  1443. },
  1444. {
  1445. userId: this.$store.state.user.name,
  1446. functionId: 301014,
  1447. serialNumber: '301014Table1SamplingQty',
  1448. tableId: "301014Table1",
  1449. tableName: "IPQC检验记录表",
  1450. columnProp: 'samplingQty',
  1451. headerAlign: "center",
  1452. align: "right",
  1453. columnLabel: '抽样数量',
  1454. columnHidden: false,
  1455. columnImage: false,
  1456. columnSortable: false,
  1457. sortLv: 0,
  1458. status: true,
  1459. fixed: '',
  1460. columnWidth: 100,
  1461. },
  1462. {
  1463. userId: this.$store.state.user.name,
  1464. functionId: 301014,
  1465. serialNumber: '301014Table1UmName',
  1466. tableId: "301014Table1",
  1467. tableName: "IPQC检验记录表",
  1468. columnProp: 'umName',
  1469. headerAlign: "center",
  1470. align: "center",
  1471. columnLabel: '单位',
  1472. columnHidden: false,
  1473. columnImage: false,
  1474. columnSortable: false,
  1475. sortLv: 0,
  1476. status: true,
  1477. fixed: '',
  1478. columnWidth: 100,
  1479. },
  1480. {
  1481. userId: this.$store.state.user.name,
  1482. functionId: 301014,
  1483. serialNumber: '301014Table1InspectionRemark',
  1484. tableId: "301014Table1",
  1485. tableName: "IPQC检验记录表",
  1486. columnProp: 'inspectionRemark',
  1487. headerAlign: "center",
  1488. align: "left",
  1489. columnLabel: '质检备注',
  1490. columnHidden: false,
  1491. columnImage: false,
  1492. columnSortable: false,
  1493. sortLv: 0,
  1494. status: true,
  1495. fixed: '',
  1496. columnWidth: 200,
  1497. },
  1498. {
  1499. userId: this.$store.state.user.name,
  1500. functionId: 301014,
  1501. serialNumber: '301014Table1DisposalRemark',
  1502. tableId: "301014Table1",
  1503. tableName: "IPQC检验记录表",
  1504. columnProp: 'disposalRemark',
  1505. headerAlign: "center",
  1506. align: "left",
  1507. columnLabel: '处置说明',
  1508. columnHidden: false,
  1509. columnImage: false,
  1510. columnSortable: false,
  1511. sortLv: 0,
  1512. status: true,
  1513. fixed: '',
  1514. columnWidth: 200,
  1515. },
  1516. {
  1517. userId: this.$store.state.user.name,
  1518. functionId: 301014,
  1519. serialNumber: '301014Table1ActionDate',
  1520. tableId: "301014Table1",
  1521. tableName: "IPQC检验记录表",
  1522. columnProp: 'actionDate',
  1523. headerAlign: "center",
  1524. align: "center",
  1525. columnLabel: '开始检验时间',
  1526. columnHidden: false,
  1527. columnImage: false,
  1528. columnSortable: false,
  1529. sortLv: 0,
  1530. status: true,
  1531. fixed: '',
  1532. columnWidth: 170,
  1533. },
  1534. {
  1535. userId: this.$store.state.user.name,
  1536. functionId: 301014,
  1537. serialNumber: '301014Table1InspectorDate',
  1538. tableId: "301014Table1",
  1539. tableName: "IPQC检验记录表",
  1540. columnProp: 'inspectorDate',
  1541. headerAlign: "center",
  1542. align: "center",
  1543. columnLabel: '检验时间',
  1544. columnHidden: false,
  1545. columnImage: false,
  1546. columnSortable: false,
  1547. sortLv: 0,
  1548. status: true,
  1549. fixed: '',
  1550. columnWidth: 170,
  1551. },
  1552. {
  1553. userId: this.$store.state.user.name,
  1554. functionId: 301014,
  1555. serialNumber: '301014Table1InspectorName',
  1556. tableId: "301014Table1",
  1557. tableName: "IPQC检验记录表",
  1558. columnProp: 'inspectorName',
  1559. headerAlign: "center",
  1560. align: "center",
  1561. columnLabel: '质检员',
  1562. columnHidden: false,
  1563. columnImage: false,
  1564. columnSortable: false,
  1565. sortLv: 0,
  1566. status: true,
  1567. fixed: '',
  1568. columnWidth: 100,
  1569. },
  1570. {
  1571. userId: this.$store.state.user.name,
  1572. functionId: 301014,
  1573. serialNumber: '301014Table1SpecialRequirements',
  1574. tableId: "301014Table1",
  1575. tableName: "IPQC检验记录表",
  1576. columnProp: 'specialRequirements',
  1577. headerAlign: "center",
  1578. align: "left",
  1579. columnLabel: '特殊要求',
  1580. columnHidden: false,
  1581. columnImage: false,
  1582. columnSortable: false,
  1583. sortLv: 0,
  1584. status: true,
  1585. fixed: '',
  1586. columnWidth: 200,
  1587. },
  1588. ],
  1589. //项目清单
  1590. detailData: {
  1591. site: '',
  1592. buNo: '',
  1593. inspectionNo:'',
  1594. partNo:'',
  1595. partDesc:'',
  1596. rollQty:'',
  1597. samplingQty: '',
  1598. unqualifiedQty: 0,
  1599. unqualifiedQuantity:'',
  1600. disposalMeasures:'',
  1601. disposalRemark: '',
  1602. inspectionResult: '',
  1603. inspectorNo: '',
  1604. inspectorName: '',
  1605. inspectionRemark: '',
  1606. submitFlag: '',
  1607. cinvSourceCode: '',
  1608. sku: '',
  1609. invdefinetype: '',
  1610. umId: '',
  1611. umName: '',
  1612. operator: '',
  1613. operatorName: '',
  1614. responsiblePerson: '',
  1615. responsiblePersonName: '',
  1616. state: '',
  1617. passQty: '',
  1618. notPassQty: '',
  1619. batchQualifiedQty: ''
  1620. },
  1621. detailInformationFlag: false,
  1622. detailList: [],
  1623. saveInformationData: {
  1624. site: '',
  1625. buNo: '',
  1626. inspectionNo:'',
  1627. disposalMeasures: '',
  1628. disposalRemark: '',
  1629. inspectorNo: '',
  1630. inspectionRemark: '',
  1631. samplingQty: '',
  1632. rollQty: '',
  1633. itemList:[],
  1634. unqualifiedQty: '',
  1635. partNo: '',
  1636. partDesc: '',
  1637. operator: '',
  1638. operatorName: '',
  1639. responsiblePerson: '',
  1640. responsiblePersonName: '',
  1641. subDetailList: [],
  1642. type: '',
  1643. passQty: '',
  1644. notPassQty: '',
  1645. batchQualifiedQty: ''
  1646. },
  1647. detailColumnList: [
  1648. {
  1649. userId: this.$store.state.user.name,
  1650. functionId: 301014,
  1651. serialNumber: '301014Table2ItemNo',
  1652. tableId: "301014Table2",
  1653. tableName: "检验单明细表",
  1654. columnProp: 'itemNo',
  1655. headerAlign: "center",
  1656. align: "center",
  1657. columnLabel: '检验项目编码',
  1658. columnHidden: false,
  1659. columnImage: false,
  1660. columnSortable: false,
  1661. sortLv: 0,
  1662. status: true,
  1663. fixed: '',
  1664. columnWidth: 120,
  1665. },
  1666. {
  1667. userId: this.$store.state.user.name,
  1668. functionId: 301014,
  1669. serialNumber: '301014Table2ItemDesc',
  1670. tableId: "301014Table2",
  1671. tableName: "检验单明细表",
  1672. columnProp: 'itemDesc',
  1673. headerAlign: "center",
  1674. align: "left",
  1675. columnLabel: '检验项目名称',
  1676. columnHidden: false,
  1677. columnImage: false,
  1678. columnSortable: false,
  1679. sortLv: 0,
  1680. status: true,
  1681. fixed: '',
  1682. columnWidth: 150,
  1683. },
  1684. {
  1685. userId: this.$store.state.user.name,
  1686. functionId: 301014,
  1687. serialNumber: '301014Table2SamplingLevelDesc',
  1688. tableId: "301014Table2",
  1689. tableName: "检验单明细表",
  1690. columnProp: 'samplingLevelDesc',
  1691. headerAlign: "center",
  1692. align: "left",
  1693. columnLabel: '检验水平',
  1694. columnHidden: false,
  1695. columnImage: false,
  1696. columnSortable: false,
  1697. sortLv: 0,
  1698. status: true,
  1699. fixed: '',
  1700. columnWidth: 120,
  1701. },
  1702. {
  1703. userId: this.$store.state.user.name,
  1704. functionId: 301014,
  1705. serialNumber: '301014Table2SamplingProgrammeDesc',
  1706. tableId: "301014Table2",
  1707. tableName: "检验单明细表",
  1708. columnProp: 'samplingProgrammeDesc',
  1709. headerAlign: "center",
  1710. align: "left",
  1711. columnLabel: '检验方案',
  1712. columnHidden: false,
  1713. columnImage: false,
  1714. columnSortable: false,
  1715. sortLv: 0,
  1716. status: true,
  1717. fixed: '',
  1718. columnWidth: 120,
  1719. },
  1720. {
  1721. userId: this.$store.state.user.name,
  1722. functionId: 301014,
  1723. serialNumber: '301014Table2MethodName',
  1724. tableId: "301014Table2",
  1725. tableName: "检验单明细表",
  1726. columnProp: 'methodName',
  1727. headerAlign: "center",
  1728. align: "left",
  1729. columnLabel: '检验方法',
  1730. columnHidden: false,
  1731. columnImage: false,
  1732. columnSortable: false,
  1733. sortLv: 0,
  1734. status: true,
  1735. fixed: '',
  1736. columnWidth: 120,
  1737. },
  1738. {
  1739. userId: this.$store.state.user.name,
  1740. functionId: 301014,
  1741. serialNumber: '301014Table2MethodRemark',
  1742. tableId: "301014Table2",
  1743. tableName: "检验单明细表",
  1744. columnProp: 'methodRemark',
  1745. headerAlign: "center",
  1746. align: "left",
  1747. columnLabel: '检验方法说明',
  1748. columnHidden: false,
  1749. columnImage: false,
  1750. columnSortable: false,
  1751. sortLv: 0,
  1752. status: true,
  1753. fixed: '',
  1754. columnWidth: 200,
  1755. },
  1756. {
  1757. userId: this.$store.state.user.name,
  1758. functionId: 301014,
  1759. serialNumber: '301014Table2ObjectDesc',
  1760. tableId: "301014Table2",
  1761. tableName: "检验单明细表",
  1762. columnProp: 'objectDesc',
  1763. headerAlign: "center",
  1764. align: "center",
  1765. columnLabel: '检测仪器',
  1766. columnHidden: false,
  1767. columnImage: false,
  1768. columnSortable: false,
  1769. sortLv: 0,
  1770. status: true,
  1771. fixed: '',
  1772. columnWidth: 120,
  1773. },
  1774. {
  1775. userId: this.$store.state.user.name,
  1776. functionId: 301014,
  1777. serialNumber: '301014Table2Aql',
  1778. tableId: "301014Table2",
  1779. tableName: "检验单明细表",
  1780. columnProp: 'aql',
  1781. headerAlign: "center",
  1782. align: "right",
  1783. columnLabel: 'AQL',
  1784. columnHidden: false,
  1785. columnImage: false,
  1786. columnSortable: false,
  1787. sortLv: 0,
  1788. status: true,
  1789. fixed: '',
  1790. columnWidth: 100,
  1791. },
  1792. {
  1793. userId: this.$store.state.user.name,
  1794. functionId: 301014,
  1795. serialNumber: '301014Table2Ac',
  1796. tableId: "301014Table2",
  1797. tableName: "检验单明细表",
  1798. columnProp: 'ac',
  1799. headerAlign: "center",
  1800. align: "right",
  1801. columnLabel: 'AC',
  1802. columnHidden: false,
  1803. columnImage: false,
  1804. columnSortable: false,
  1805. sortLv: 0,
  1806. status: true,
  1807. fixed: '',
  1808. columnWidth: 100,
  1809. },
  1810. {
  1811. userId: this.$store.state.user.name,
  1812. functionId: 301014,
  1813. serialNumber: '301014Table2Re',
  1814. tableId: "301014Table2",
  1815. tableName: "检验单明细表",
  1816. columnProp: 're',
  1817. headerAlign: "center",
  1818. align: "right",
  1819. columnLabel: 'RE',
  1820. columnHidden: false,
  1821. columnImage: false,
  1822. columnSortable: false,
  1823. sortLv: 0,
  1824. status: true,
  1825. fixed: '',
  1826. columnWidth: 100,
  1827. },
  1828. {
  1829. userId: this.$store.state.user.name,
  1830. functionId: 301014,
  1831. serialNumber: '301014Table2DefaultValue',
  1832. tableId: "301014Table2",
  1833. tableName: "检验单明细表",
  1834. columnProp: 'defaultValue',
  1835. headerAlign: "center",
  1836. align: "right",
  1837. columnLabel: '标准值',
  1838. columnHidden: false,
  1839. columnImage: false,
  1840. columnSortable: false,
  1841. sortLv: 0,
  1842. status: true,
  1843. fixed: '',
  1844. columnWidth: 100,
  1845. },
  1846. {
  1847. userId: this.$store.state.user.name,
  1848. functionId: 301014,
  1849. serialNumber: '301014Table2MaxValue',
  1850. tableId: "301014Table2",
  1851. tableName: "检验单明细表",
  1852. columnProp: 'maxValue',
  1853. headerAlign: "center",
  1854. align: "right",
  1855. columnLabel: '上限值',
  1856. columnHidden: false,
  1857. columnImage: false,
  1858. columnSortable: false,
  1859. sortLv: 0,
  1860. status: true,
  1861. fixed: '',
  1862. columnWidth: 100,
  1863. },
  1864. {
  1865. userId: this.$store.state.user.name,
  1866. functionId: 301014,
  1867. serialNumber: '301014Table2MinValue',
  1868. tableId: "301014Table2",
  1869. tableName: "检验单明细表",
  1870. columnProp: 'minValue',
  1871. headerAlign: "center",
  1872. align: "right",
  1873. columnLabel: '下限值',
  1874. columnHidden: false,
  1875. columnImage: false,
  1876. columnSortable: false,
  1877. sortLv: 0,
  1878. status: true,
  1879. fixed: '',
  1880. columnWidth: 100,
  1881. },
  1882. {
  1883. userId: this.$store.state.user.name,
  1884. functionId: 301014,
  1885. serialNumber: '301014Table2ValueType',
  1886. tableId: "301014Table2",
  1887. tableName: "检验单明细表",
  1888. columnProp: 'valueType',
  1889. headerAlign: "center",
  1890. align: "center",
  1891. columnLabel: '检测值类型',
  1892. columnHidden: false,
  1893. columnImage: false,
  1894. columnSortable: false,
  1895. sortLv: 0,
  1896. status: true,
  1897. fixed: '',
  1898. columnWidth: 100,
  1899. },
  1900. ],
  1901. fileColumnList: [
  1902. {
  1903. columnProp: 'fileName',
  1904. headerAlign: "center",
  1905. align: "center",
  1906. columnLabel: '文件名称',
  1907. columnHidden: false,
  1908. columnImage: false,
  1909. columnSortable: false,
  1910. sortLv: 0,
  1911. status: true,
  1912. fixed: '',
  1913. },
  1914. {
  1915. columnProp: 'createdBy',
  1916. headerAlign: "center",
  1917. align: 'center',
  1918. columnLabel: '上传人',
  1919. columnHidden: false,
  1920. columnImage: false,
  1921. columnSortable: true,
  1922. sortLv: 0,
  1923. status: true,
  1924. fixed: false
  1925. },
  1926. {
  1927. columnProp: 'createDate',
  1928. headerAlign: "center",
  1929. align: 'center',
  1930. columnLabel: '上传时间',
  1931. columnHidden: false,
  1932. columnImage: false,
  1933. columnSortable: true,
  1934. sortLv: 0,
  1935. status: true,
  1936. fixed: false
  1937. },
  1938. {
  1939. columnProp: 'orderRef3',
  1940. headerAlign: "center",
  1941. align: 'center',
  1942. columnLabel: '备注',
  1943. columnHidden: false,
  1944. columnImage: false,
  1945. columnSortable: true,
  1946. sortLv: 0,
  1947. status: true,
  1948. fixed: false
  1949. },
  1950. ],
  1951. // 派工单号
  1952. seqInfoList: [],
  1953. seqDetailFlag: false,
  1954. seqDetailData: {
  1955. orderNo: '',
  1956. seqNo: '',
  1957. sku: '',
  1958. cinvSourceCode:'',
  1959. partNo: '',
  1960. partDesc: '',
  1961. operationDesc: '',
  1962. qtyrequired: '',
  1963. lotsize: '',
  1964. status: '下达'
  1965. },
  1966. seqDetailColumnList: [
  1967. {
  1968. userId: this.$store.state.user.name,
  1969. functionId: 301014,
  1970. serialNumber: '301014Table3OrderNo',
  1971. tableId: "301014Table3",
  1972. tableName: "派工单号表",
  1973. fixed: '',
  1974. columnWidth: 80,
  1975. columnProp: 'orderNo',
  1976. headerAlign: "center",
  1977. align: "center",
  1978. columnLabel: '工单号',
  1979. columnHidden: false,
  1980. columnImage: false,
  1981. columnSortable: false,
  1982. sortLv: 0,
  1983. status: true,
  1984. },
  1985. {
  1986. userId: this.$store.state.user.name,
  1987. functionId: 301014,
  1988. serialNumber: '301014Table3SeqNo',
  1989. tableId: "301014Table3",
  1990. tableName: "派工单号表",
  1991. fixed: '',
  1992. columnWidth: 80,
  1993. columnProp: 'seqNo',
  1994. headerAlign: "center",
  1995. align: "center",
  1996. columnLabel: '派工单号',
  1997. columnHidden: false,
  1998. columnImage: false,
  1999. columnSortable: false,
  2000. sortLv: 0,
  2001. status: true,
  2002. },
  2003. {
  2004. userId: this.$store.state.user.name,
  2005. functionId: 301014,
  2006. serialNumber: '301014Table3Sku',
  2007. tableId: "301014Table3",
  2008. tableName: "派工单号表",
  2009. fixed: '',
  2010. columnWidth: 80,
  2011. columnProp: 'sku',
  2012. headerAlign: "center",
  2013. align: "center",
  2014. columnLabel: 'SKU',
  2015. columnHidden: false,
  2016. columnImage: false,
  2017. columnSortable: false,
  2018. sortLv: 0,
  2019. status: true,
  2020. },
  2021. {
  2022. userId: this.$store.state.user.name,
  2023. functionId: 301014,
  2024. serialNumber: '301014Table3PartNo',
  2025. tableId: "301014Table3",
  2026. tableName: "派工单号表",
  2027. fixed: '',
  2028. columnWidth: 80,
  2029. columnProp: 'partNo',
  2030. headerAlign: "center",
  2031. align: "center",
  2032. columnLabel: '物料编码',
  2033. columnHidden: false,
  2034. columnImage: false,
  2035. columnSortable: false,
  2036. sortLv: 0,
  2037. status: true,
  2038. },
  2039. {
  2040. userId: this.$store.state.user.name,
  2041. functionId: 301014,
  2042. serialNumber: '301014Table3PartDesc',
  2043. tableId: "301014Table3",
  2044. tableName: "派工单号表",
  2045. fixed: '',
  2046. columnWidth: 80,
  2047. columnProp: 'partDesc',
  2048. headerAlign: "center",
  2049. align: "center",
  2050. columnLabel: '物料名称',
  2051. columnHidden: false,
  2052. columnImage: false,
  2053. columnSortable: false,
  2054. sortLv: 0,
  2055. status: true,
  2056. },
  2057. {
  2058. userId: this.$store.state.user.name,
  2059. functionId: 301014,
  2060. serialNumber: '301014Table3Lotsize',
  2061. tableId: "301014Table3",
  2062. tableName: "派工单号表",
  2063. fixed: '',
  2064. columnWidth: 80,
  2065. columnProp: 'lotsize',
  2066. headerAlign: "center",
  2067. align: "right",
  2068. columnLabel: '工单数量',
  2069. columnHidden: false,
  2070. columnImage: false,
  2071. columnSortable: false,
  2072. sortLv: 0,
  2073. status: true,
  2074. },
  2075. {
  2076. userId: this.$store.state.user.name,
  2077. functionId: 301014,
  2078. serialNumber: '301014Table3Qtyrequired',
  2079. tableId: "301014Table3",
  2080. tableName: "派工单号表",
  2081. fixed: '',
  2082. columnWidth: 80,
  2083. columnProp: 'qtyrequired',
  2084. headerAlign: "center",
  2085. align: "right",
  2086. columnLabel: '派工数量',
  2087. columnHidden: false,
  2088. columnImage: false,
  2089. columnSortable: false,
  2090. sortLv: 0,
  2091. status: true,
  2092. },
  2093. {
  2094. userId: this.$store.state.user.name,
  2095. functionId: 301014,
  2096. serialNumber: '301014Table3Sjzs',
  2097. tableId: "301014Table3",
  2098. tableName: "派工单号表",
  2099. fixed: '',
  2100. columnWidth: 80,
  2101. columnProp: 'sjzs',
  2102. headerAlign: "center",
  2103. align: "right",
  2104. columnLabel: '送检总数',
  2105. columnHidden: false,
  2106. columnImage: false,
  2107. columnSortable: false,
  2108. sortLv: 0,
  2109. status: true,
  2110. },
  2111. {
  2112. userId: this.$store.state.user.name,
  2113. functionId: 301014,
  2114. serialNumber: '301014Table3OperationDesc',
  2115. tableId: "301014Table3",
  2116. tableName: "派工单号表",
  2117. fixed: '',
  2118. columnWidth: 80,
  2119. columnProp: 'operationDesc',
  2120. headerAlign: "center",
  2121. align: "center",
  2122. columnLabel: '工序',
  2123. columnHidden: false,
  2124. columnImage: false,
  2125. columnSortable: false,
  2126. sortLv: 0,
  2127. status: true,
  2128. }
  2129. ],
  2130. // 子明细数据对象
  2131. tableData: [],
  2132. checkedDetail: [],
  2133. subDetailFlag: false,
  2134. subDetailData: {
  2135. site: '',
  2136. buNo: '',
  2137. inspectionNo: '',
  2138. itemNo: '',
  2139. itemDesc: '',
  2140. defaultValue: '',
  2141. maxValue: '',
  2142. minValue: '',
  2143. valueTypeDb: '',
  2144. subDetailValues:[],
  2145. page: 1,
  2146. limit: 10,
  2147. },
  2148. options: [],
  2149. modalDisableFlag: false,
  2150. modalFlag: false,
  2151. operationList: [],
  2152. resourceList: [],
  2153. partList: [],
  2154. IPQCSelections: [],
  2155. rules: {
  2156. seqNoType: [
  2157. {
  2158. required: true,
  2159. message: ' ',
  2160. trigger: ['blur','change']
  2161. }
  2162. ],
  2163. orderNoType: [
  2164. {
  2165. required: true,
  2166. message: ' ',
  2167. trigger: ['blur','change']
  2168. }
  2169. ],
  2170. operationDescType: [
  2171. {
  2172. required: true,
  2173. message: ' ',
  2174. trigger: ['blur','change']
  2175. }
  2176. ],
  2177. resourceIdType: [
  2178. {
  2179. required: true,
  2180. message: ' ',
  2181. trigger: ['blur','change']
  2182. }
  2183. ],
  2184. rollQtyType: [
  2185. {
  2186. required: true,
  2187. message: ' ',
  2188. trigger: ['blur','change']
  2189. }
  2190. ],
  2191. inspectionTypeNoType: [
  2192. {
  2193. required: true,
  2194. message: ' ',
  2195. trigger: ['blur','change']
  2196. }
  2197. ],
  2198. partNoType: [
  2199. {
  2200. required: true,
  2201. message: ' ',
  2202. trigger: ['blur','change']
  2203. }
  2204. ],
  2205. umIdType: [
  2206. {
  2207. required: true,
  2208. message: ' ',
  2209. trigger: ['blur','change']
  2210. }
  2211. ],
  2212. templateId: [
  2213. {
  2214. required: true,
  2215. message: ' ',
  2216. trigger: ['blur','change']
  2217. }
  2218. ],
  2219. bu:[
  2220. {
  2221. required: true,
  2222. message: ' ',
  2223. trigger: ['blur','change']
  2224. }
  2225. ]
  2226. },
  2227. batchHandleAddModalFlag: false,
  2228. batchAddData: {
  2229. samplingLocation: '',
  2230. samplingLocationB: '',
  2231. samplingNumber: ''
  2232. },
  2233. controlData: {},
  2234. templateData: {
  2235. site: '',
  2236. bu: '',
  2237. templateId: '',
  2238. templateName: '',
  2239. inspectionTypeNo: '',
  2240. inspectionTypeName: ''
  2241. },
  2242. partData: {
  2243. site: '',
  2244. bu: '',
  2245. partNo: '',
  2246. partDesc: '',
  2247. sku: '',
  2248. cinvSourceCode: '',
  2249. },
  2250. templateList: [],
  2251. templateModelFlag: false,
  2252. templateDetailList: [
  2253. {
  2254. columnProp: 'templateId',
  2255. headerAlign: "center",
  2256. align: "center",
  2257. columnLabel: '模板编码',
  2258. columnHidden: false,
  2259. columnImage: false,
  2260. columnSortable: false,
  2261. sortLv: 0,
  2262. status: true,
  2263. fixed: '',
  2264. },
  2265. {
  2266. columnProp: 'templateName',
  2267. headerAlign: "center",
  2268. align: "center",
  2269. columnLabel: '模板名称',
  2270. columnHidden: false,
  2271. columnImage: false,
  2272. columnSortable: false,
  2273. sortLv: 0,
  2274. status: true,
  2275. fixed: '',
  2276. },
  2277. {
  2278. columnProp: 'inspectionTypeName',
  2279. headerAlign: "center",
  2280. align: "center",
  2281. columnLabel: '检验类型',
  2282. columnHidden: false,
  2283. columnImage: false,
  2284. columnSortable: false,
  2285. sortLv: 0,
  2286. status: true,
  2287. fixed: '',
  2288. },
  2289. ],
  2290. partDetailList: [
  2291. {
  2292. columnProp: 'partNo',
  2293. headerAlign: "center",
  2294. align: "center",
  2295. columnLabel: '物料编码',
  2296. columnHidden: false,
  2297. columnImage: false,
  2298. columnSortable: false,
  2299. sortLv: 0,
  2300. status: true,
  2301. fixed: '',
  2302. },
  2303. {
  2304. columnProp: 'partDesc',
  2305. headerAlign: "center",
  2306. align: "center",
  2307. columnLabel: '物料名称',
  2308. columnHidden: false,
  2309. columnImage: false,
  2310. columnSortable: false,
  2311. sortLv: 0,
  2312. status: true,
  2313. fixed: '',
  2314. },
  2315. {
  2316. columnProp: 'sku',
  2317. headerAlign: "center",
  2318. align: "center",
  2319. columnLabel: 'SKU',
  2320. columnHidden: false,
  2321. columnImage: false,
  2322. columnSortable: false,
  2323. sortLv: 0,
  2324. status: true,
  2325. fixed: '',
  2326. },
  2327. {
  2328. columnProp: 'cinvSourceCode',
  2329. headerAlign: "center",
  2330. align: "center",
  2331. columnLabel: 'PN',
  2332. columnHidden: false,
  2333. columnImage: false,
  2334. columnSortable: false,
  2335. sortLv: 0,
  2336. status: true,
  2337. fixed: '',
  2338. }
  2339. ],
  2340. checked: false,
  2341. typeOptions: [],
  2342. disposalMeasuresOptions: [],
  2343. timeout: null,
  2344. partModelFlag: false,
  2345. umList: [],
  2346. userBuList: [],
  2347. buList: [],
  2348. authSearch: false,
  2349. authSave: false,
  2350. authCheck: false,
  2351. authCancelCheck: false,
  2352. authDelete: false,
  2353. authDetail: false,
  2354. authFile: false,
  2355. menuId: this.$route.meta.menuId,
  2356. roleList: [],
  2357. defaultCollaborativeRoleName: 'IPQC操作员',
  2358. operatorList: [],
  2359. operatorData: {
  2360. flag: '',
  2361. site: '',
  2362. bu: '',
  2363. adminID: '',
  2364. adminName: '',
  2365. roleName: '',
  2366. roleId: '',
  2367. userName: this.$store.state.user.name
  2368. },
  2369. operatorModelFlag: false,
  2370. dataListSelections2: [],
  2371. operatorDetailList: [
  2372. {
  2373. columnProp: 'adminID',
  2374. headerAlign: "center",
  2375. align: "center",
  2376. columnLabel: '用户账号',
  2377. columnHidden: false,
  2378. columnImage: false,
  2379. columnSortable: false,
  2380. sortLv: 0,
  2381. status: true,
  2382. fixed: '',
  2383. },
  2384. {
  2385. columnProp: 'adminName',
  2386. headerAlign: "center",
  2387. align: "center",
  2388. columnLabel: '用户名称',
  2389. columnHidden: false,
  2390. columnImage: false,
  2391. columnSortable: false,
  2392. sortLv: 0,
  2393. status: true,
  2394. fixed: '',
  2395. },
  2396. {
  2397. columnProp: 'email',
  2398. headerAlign: "center",
  2399. align: "center",
  2400. columnLabel: '邮箱',
  2401. columnHidden: false,
  2402. columnImage: false,
  2403. columnSortable: false,
  2404. sortLv: 0,
  2405. status: true,
  2406. fixed: '',
  2407. },
  2408. {
  2409. columnProp: 'phone',
  2410. headerAlign: "center",
  2411. align: "center",
  2412. columnLabel: '手机号',
  2413. columnHidden: false,
  2414. columnImage: false,
  2415. columnSortable: false,
  2416. sortLv: 0,
  2417. status: true,
  2418. fixed: '',
  2419. },
  2420. ],
  2421. acquisitionList: [],
  2422. ItemObjectModelFlag: false,
  2423. itemObjectList: [],
  2424. itemObjectColumnList: [
  2425. {
  2426. columnProp: 'itemNo',
  2427. headerAlign: "center",
  2428. align: "center",
  2429. columnLabel: '项目编码',
  2430. columnHidden: false,
  2431. columnImage: false,
  2432. status: true,
  2433. columnWidth: 120,
  2434. },
  2435. {
  2436. columnProp: 'itemDesc',
  2437. headerAlign: "center",
  2438. align: "left",
  2439. columnLabel: '项目名称',
  2440. columnHidden: false,
  2441. columnImage: false,
  2442. status: true,
  2443. columnWidth: 200,
  2444. },
  2445. ],
  2446. actionData: {
  2447. site: '',
  2448. buNo: '',
  2449. inspectionNo: ''
  2450. },
  2451. fileLoading: false,
  2452. subDetailLoading: false,
  2453. saveLoading: false,
  2454. searchLoading: false,
  2455. subDetailVisiable: false,
  2456. }
  2457. },
  2458. mounted () {
  2459. this.$nextTick(() => {
  2460. this.height = window.innerHeight - 250
  2461. })
  2462. },
  2463. created () {
  2464. // 按钮控制
  2465. this.getButtonAuthData()
  2466. // 获取用户的 site 和 bu
  2467. this.getSiteAndBuByUserName()
  2468. // 获取用户的 site 和 bu
  2469. this.getSiteAndBuByUserName2()
  2470. // 收藏
  2471. this.favoriteIsOk()
  2472. // 检验类型
  2473. this.inspectionTypeSearch()
  2474. // 处置措施
  2475. this.disposalMeasuresSearch()
  2476. // 单位
  2477. this.umSearch()
  2478. // 查看 质量任务生成规则控制 动控是否开启
  2479. this.queryController()
  2480. // 动态列
  2481. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2482. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2483. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2484. if (!this.authSearch) {
  2485. // 获取数据列表
  2486. this.getDataList()
  2487. }
  2488. // 获取用户角色
  2489. this.getUserRoleList()
  2490. },
  2491. methods: {
  2492. // 获取用户的bu
  2493. getSiteAndBuByUserName2 () {
  2494. let tempData = {
  2495. username: this.$store.state.user.name,
  2496. }
  2497. getSiteAndBuByUserName2(tempData).then(({data}) => {
  2498. if (data.code === 0) {
  2499. this.buList = data.rows
  2500. }
  2501. })
  2502. },
  2503. // 批量打印标签
  2504. printList () {
  2505. if (this.IPQCSelections.length === 0) {
  2506. this.$message.warning('请勾选要打印的检验单!')
  2507. return
  2508. }
  2509. const inspectionNos = this.$refs.qrCode.init(this.IPQCSelections.map(item => item.inspectionNo))
  2510. for (let i = 0; i < inspectionNos.length; i++) {
  2511. this.IPQCSelections[i].qrCode = inspectionNos[i]
  2512. }
  2513. qcPrint(this.IPQCSelections)
  2514. },
  2515. // 数据采集
  2516. dataAcquisition () {
  2517. this.loadFlag = true
  2518. let tempDate = {
  2519. site: this.detailData.site,
  2520. buNo: this.detailData.buNo,
  2521. inspectionNo: this.detailData.inspectionNo,
  2522. flag: 'ipqc'
  2523. }
  2524. dataAcquisition(tempDate).then(({data}) => {
  2525. if (data.code === 0) {
  2526. // this.acquisitionList = data.rows
  2527. this.changeMyString(data.rows)
  2528. this.$message({
  2529. message: '数据采集成功',
  2530. type: 'success',
  2531. duration: 1500
  2532. })
  2533. } else {
  2534. this.$message({
  2535. message: data.msg,
  2536. type: 'warning',
  2537. duration: 1500
  2538. })
  2539. }
  2540. this.loadFlag = false
  2541. })
  2542. },
  2543. getCollect(){
  2544. let param = {
  2545. site: '2',
  2546. }
  2547. getCollectorDataByItem(param).then(({data}) => {
  2548. if (data.code === 0) {
  2549. this.changeMyString(data.rows)
  2550. this.$message({
  2551. message: '数据采集成功',
  2552. type: 'success',
  2553. duration: 1500
  2554. })
  2555. } else {
  2556. this.$message({
  2557. message: data.msg,
  2558. type: 'warning',
  2559. duration: 1500
  2560. })
  2561. }
  2562. this.loadFlag = false
  2563. })
  2564. },
  2565. // 根据项目数据采集
  2566. dataAcquisitionByItem (row) {
  2567. let params = {
  2568. site: row.site,
  2569. buNo: row.buNo,
  2570. itemNo: row.itemNo,
  2571. }
  2572. this.loadFlag = true
  2573. getEamPropertiesItemByItemNo(params).then(({data}) => {
  2574. if (data.code === 0) {
  2575. let itemData = data.itemData
  2576. console.log("this", itemData,row);
  2577. console.log("itemData.colss)",itemData.collectionFlag == 'Y' && itemData.collectionMethod.includes('thickness'));
  2578. if(itemData.collectionFlag == 'Y' && itemData.collectionMethod.includes('thickness')){
  2579. let param = {
  2580. site: row.site,
  2581. sopType: 'ipqc',
  2582. bu: row.buNo,
  2583. itemNo: row.itemNo,
  2584. inspectionNo: row.inspectionNo,
  2585. orderNo: row.orderNo,
  2586. }
  2587. getCollectorDataByItem(param).then(({data}) => {
  2588. if (data.code === 0 && data.rows.length > 0) {
  2589. this.changeMyString(data.rows)
  2590. if(data.abnormal){
  2591. this.$message({
  2592. message: '数据采集成功,且存在异常数据,请注意查看',
  2593. type: 'warning',
  2594. duration: 1500
  2595. })
  2596. }else{
  2597. this.$message({
  2598. message: '数据采集成功',
  2599. type: 'success',
  2600. duration: 1500
  2601. })
  2602. }
  2603. }else if(data.code === 0 && data.rows.length == 0){
  2604. this.$message({
  2605. message: '数据采集成功,未采集到数据',
  2606. type: 'success',
  2607. duration: 1500
  2608. })
  2609. } else {
  2610. this.$message({
  2611. message: data.msg||'未采集到数据',
  2612. type: 'warning',
  2613. duration: 1500
  2614. })
  2615. }
  2616. this.loadFlag = false
  2617. })
  2618. }else{
  2619. let tempDate = {
  2620. site: row.site,
  2621. buNo: row.buNo,
  2622. inspectionNo: row.inspectionNo,
  2623. templateId: row.templateId,
  2624. itemNo: row.itemNo,
  2625. flag: 'ipqc'
  2626. }
  2627. dataAcquisitionByItem(tempDate).then(({data}) => {
  2628. if (data.code === 0) {
  2629. this.changeMyString(data.rows)
  2630. this.$message({
  2631. message: '数据采集成功',
  2632. type: 'success',
  2633. duration: 1500
  2634. })
  2635. } else {
  2636. this.$message({
  2637. message: "暂无获取到异常数据",
  2638. type: 'warning',
  2639. duration: 1500
  2640. })
  2641. }
  2642. this.loadFlag = false
  2643. })
  2644. }
  2645. } else {
  2646. this.$alert(data.msg, '错误', {
  2647. confirmButtonText: '确定'
  2648. })
  2649. }
  2650. })
  2651. },
  2652. // 获取用户角色
  2653. getUserRoleList () {
  2654. getUserRoleList().then(({data}) => {
  2655. if (data.code === 0) {
  2656. this.roleList = data.rows
  2657. } else {
  2658. this.roleList = []
  2659. }
  2660. })
  2661. },
  2662. // 获取协同人员列表
  2663. getOperatorList () {
  2664. this.operatorData.flag = '1'
  2665. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2666. const tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2667. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2668. this.setDefaultCollaborativeRole(() => {
  2669. this.fetchCollaborativeOperatorData(tempDataList, true)
  2670. })
  2671. },
  2672. isMhmResponsibleBu () {
  2673. return this.detailData.buNo === '04-MHM'
  2674. },
  2675. setDefaultCollaborativeRole (callback) {
  2676. const apply = () => {
  2677. if (this.roleList.length > 0) {
  2678. const roleName = this.isMhmResponsibleBu() ? this.defaultCollaborativeRoleName : '系统管理员'
  2679. const match = this.roleList.find(item => item.roleName === roleName)
  2680. const roleId = match ? match.roleId : this.roleList[0].roleId
  2681. this.$set(this.operatorData, 'roleId', roleId != null && roleId !== '' ? Number(roleId) : '')
  2682. } else {
  2683. this.$set(this.operatorData, 'roleId', '')
  2684. }
  2685. callback && callback()
  2686. }
  2687. if (this.roleList.length > 0) {
  2688. apply()
  2689. } else {
  2690. getUserRoleList().then(({ data }) => {
  2691. this.roleList = (data && data.code === 0) ? (data.rows || []) : []
  2692. apply()
  2693. })
  2694. }
  2695. },
  2696. fetchCollaborativeOperatorData (tempDataList, showDialog) {
  2697. this.operatorData.roleName = ''
  2698. getOperatorList(this.operatorData).then(({ data }) => {
  2699. if (data && data.code === 0) {
  2700. this.operatorList = data.rows
  2701. this.operatorList.forEach(val => {
  2702. if (tempDataList.includes(val.adminID)) {
  2703. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2704. }
  2705. })
  2706. if (showDialog) {
  2707. this.operatorModelFlag = true
  2708. }
  2709. } else if (showDialog) {
  2710. this.$alert(data.msg, '错误', {
  2711. confirmButtonText: '确定'
  2712. })
  2713. } else {
  2714. this.operatorList = []
  2715. }
  2716. })
  2717. },
  2718. fetchResponsibleOperatorData (tempDataList, showDialog) {
  2719. let request
  2720. if (this.isMhmResponsibleBu()) {
  2721. this.operatorData.roleName = ''
  2722. request = getResponsibleOperatorList(this.operatorData)
  2723. } else {
  2724. request = getOperatorList(this.operatorData)
  2725. }
  2726. request.then(({ data }) => {
  2727. if (data && data.code === 0) {
  2728. this.operatorList = data.rows
  2729. this.operatorList.forEach(val => {
  2730. if (tempDataList.includes(val.adminID)) {
  2731. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2732. }
  2733. })
  2734. if (showDialog) {
  2735. this.operatorModelFlag = true
  2736. }
  2737. } else if (showDialog) {
  2738. this.$alert(data.msg, '错误', {
  2739. confirmButtonText: '确定'
  2740. })
  2741. } else {
  2742. this.operatorList = []
  2743. }
  2744. })
  2745. },
  2746. // 获取责任人员列表
  2747. getResponsiblePersonList () {
  2748. this.operatorData.flag = '2'
  2749. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2750. const tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2751. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2752. const openDialog = () => {
  2753. this.fetchResponsibleOperatorData(tempDataList, true)
  2754. }
  2755. if (this.isMhmResponsibleBu()) {
  2756. this.operatorData.roleId = ''
  2757. openDialog()
  2758. } else {
  2759. if (this.roleList.length > 0) {
  2760. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2761. if (filterList.length > 0) {
  2762. this.operatorData.roleId = filterList[0].roleId
  2763. } else {
  2764. this.operatorData.roleId = this.roleList[0].roleId
  2765. }
  2766. } else {
  2767. this.operatorData.roleId = ''
  2768. }
  2769. openDialog()
  2770. }
  2771. },
  2772. // 查询机修人员列表
  2773. getOperatorList2 () {
  2774. if (this.operatorData.flag === '1') {
  2775. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2776. this.fetchCollaborativeOperatorData(tempDataList, false)
  2777. } else {
  2778. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2779. this.fetchResponsibleOperatorData(tempDataList, false)
  2780. }
  2781. },
  2782. // 点击行选中复选框
  2783. operatorClickRow (row) {
  2784. this.$refs.operatorTable.toggleRowSelection(row)
  2785. },
  2786. // 多选
  2787. selectionChangeHandle2 (val) {
  2788. this.dataListSelections2 = val
  2789. },
  2790. // 确认多选协同人员
  2791. confirmOperator () {
  2792. if (this.dataListSelections2.length === 0 && this.operatorData.flag === '1') {
  2793. this.$message.warning('请勾选人员!')
  2794. return
  2795. }
  2796. if (this.operatorData.flag === '1') {
  2797. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2798. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2799. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2800. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2801. }
  2802. }
  2803. if (this.detailData.operator.charAt(0) === ';') {
  2804. this.detailData.operator = this.detailData.operator.substring(1)
  2805. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2806. }
  2807. } else {
  2808. const adminIds = []
  2809. const adminNames = []
  2810. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2811. adminIds.push(this.dataListSelections2[i].adminID)
  2812. adminNames.push(this.dataListSelections2[i].adminName)
  2813. }
  2814. this.detailData.responsiblePerson = adminIds.join(';')
  2815. this.detailData.responsiblePersonName = adminNames.join(';')
  2816. }
  2817. this.operatorData = {
  2818. flag: '',
  2819. site: '',
  2820. bu: '',
  2821. adminID: '',
  2822. adminName: '',
  2823. roleName: '',
  2824. roleId: '',
  2825. userName: this.$store.state.user.name
  2826. }
  2827. this.operatorModelFlag = false
  2828. },
  2829. // bu内容改变事件
  2830. buChange () {
  2831. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  2832. this.modalData.templateId = ''
  2833. this.modalData.templateName = ''
  2834. } else { // 无工单检验
  2835. this.modalData.partNo = ''
  2836. this.modalData.partDesc = ''
  2837. this.modalData.invdefinetype = ''
  2838. this.modalData.sku = ''
  2839. this.modalData.cinvSourceCode = ''
  2840. this.modalData.templateId = ''
  2841. this.modalData.templateName = ''
  2842. }
  2843. },
  2844. // 获取用户的bu
  2845. getSiteAndBuByUserName () {
  2846. let tempData = {
  2847. username: this.$store.state.user.name,
  2848. }
  2849. getSiteAndBuByUserName(tempData).then(({data}) => {
  2850. if (data.code === 0) {
  2851. this.userBuList = data.rows
  2852. }
  2853. })
  2854. },
  2855. // 子明细导入
  2856. subDetailUpload () {
  2857. let currentData = {
  2858. flag: 'IPQC',
  2859. site: this.detailData.site,
  2860. buNo: this.detailData.buNo,
  2861. inspectionNo: this.detailData.inspectionNo
  2862. }
  2863. //打开组件 去做新增业务
  2864. this.$nextTick(() => {
  2865. this.$refs.subDetailUpload.init(currentData)
  2866. })
  2867. },
  2868. // 查询单位
  2869. umSearch () {
  2870. let tempData = {
  2871. site: this.$store.state.user.site,
  2872. active: 'Y'
  2873. }
  2874. umSearch(tempData).then(({data}) => {
  2875. if (data.code === 0) {
  2876. this.umList = data.rows
  2877. }
  2878. })
  2879. },
  2880. // 标签号回车事件
  2881. rollNoEnter () {
  2882. const regex = /\(08\)(.*)/
  2883. const result = this.modalData.rollNo.match(regex)
  2884. let tempData = {
  2885. site: '',
  2886. bu: this.modalData.bu,
  2887. rollNo: result == null ? this.modalData.rollNo : result[1]
  2888. }
  2889. rollNoEnter(tempData).then(({data}) => {
  2890. if (data && data.code === 0) {
  2891. this.operationList = data.rows
  2892. this.modalData.seqNo = data.rows[0].seqNo
  2893. this.modalData.orderNo = data.rows[0].orderNo
  2894. this.modalData.operationDesc = data.rows[0].operationDesc
  2895. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2896. this.modalData.resourceId = data.rows[0].resourceId
  2897. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2898. this.modalData.partNo = data.rows[0].partNo
  2899. this.modalData.partDesc = data.rows[0].partDesc
  2900. this.modalData.invdefinetype = data.rows[0].invdefinetype
  2901. this.modalData.sku = data.rows[0].sku
  2902. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2903. } else {
  2904. this.$alert(data.msg, '错误', {
  2905. confirmButtonText: '确定'
  2906. })
  2907. }
  2908. })
  2909. },
  2910. // input 模糊搜索
  2911. querySearchAsync (queryString, cb) {
  2912. clearTimeout(this.timeout)
  2913. let results = []
  2914. if (queryString === '') {
  2915. cb(results)
  2916. } else {
  2917. // 掉接口需要的参数
  2918. let find = {
  2919. rollNo: queryString, //上面输入框绑定的数据
  2920. site: this.$store.state.user.site,
  2921. }
  2922. // 这里去调后端的接口.根据自己接口的情况进行赋值
  2923. getRollNo(find).then(({data}) => {
  2924. if (data.code === 0) {
  2925. let result = data.rows
  2926. // 循环放到一个远程搜索需要的数组
  2927. for (let i = 0; i < result.length; i++) {
  2928. const element = result[i]
  2929. results.push({
  2930. value: element.rollNo,
  2931. seqNo: element.seqNo,
  2932. orderNo: element.orderNo
  2933. })
  2934. }
  2935. cb(results)
  2936. } else {
  2937. results = []
  2938. cb(results)
  2939. }
  2940. })
  2941. }
  2942. },
  2943. // 点击出现搜索后点击的每一项
  2944. handleSelect (item) {
  2945. this.modalData.rollNo = item.value
  2946. this.modalData.seqNo = item.seqNo
  2947. this.modalData.orderNo = item.orderNo
  2948. this.getOperationList()
  2949. //this.getPartList()
  2950. },
  2951. // 获取处置措施列表
  2952. disposalMeasuresSearch () {
  2953. let tempData = {
  2954. inspectionTypeNo: '101'
  2955. }
  2956. disposalMeasuresSearch(tempData).then(({data}) => {
  2957. if (data.code === 0) {
  2958. this.disposalMeasuresOptions = data.rows
  2959. }
  2960. })
  2961. },
  2962. // 查询检验类型
  2963. inspectionTypeSearch () {
  2964. let tempData = {
  2965. site: this.$store.state.user.site
  2966. }
  2967. inspectionTypeSearch(tempData).then(({data}) => {
  2968. if (data.code === 0) {
  2969. this.typeOptions = data.rows
  2970. this.typeOptions.forEach(val => {
  2971. if (val.inspectionTypeName.includes('IPQC')) {
  2972. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  2973. this.templateData.inspectionTypeName = val.inspectionTypeName
  2974. }
  2975. })
  2976. }
  2977. })
  2978. },
  2979. selectFlag () {
  2980. return true
  2981. },
  2982. // 单机选中
  2983. IPQCClickRow (row) {
  2984. this.$refs.IPQCTable.toggleRowSelection(row)
  2985. },
  2986. // 复选
  2987. selectionIPQC (val) {
  2988. this.IPQCSelections = val
  2989. },
  2990. resolveWorkFileRow (row) {
  2991. if (!row || !row.inspectionNo) {
  2992. return row
  2993. }
  2994. const matched = this.dataList.find(item =>
  2995. item.site === row.site && item.buNo === row.buNo && item.inspectionNo === row.inspectionNo
  2996. )
  2997. return matched || row
  2998. },
  2999. saveWorkFileReadToServer (row) {
  3000. const target = this.resolveWorkFileRow(row)
  3001. if (!target || !target.inspectionNo || target.workFileRead === 'Y') {
  3002. return Promise.resolve()
  3003. }
  3004. return markIPQCWorkFileRead({
  3005. site: target.site,
  3006. buNo: target.buNo,
  3007. inspectionNo: target.inspectionNo
  3008. }).then(({data}) => {
  3009. if (data && data.code === 0) {
  3010. this.$set(target, 'workFileRead', 'Y')
  3011. }
  3012. })
  3013. },
  3014. onWorkFilePreviewed () {
  3015. if (this.currentWorkFileRow) {
  3016. this.saveWorkFileReadToServer(this.currentWorkFileRow)
  3017. }
  3018. },
  3019. fetchWorkFiles (row) {
  3020. const currentData = {
  3021. orderRef1: row.site,
  3022. orderRef2: row.inspectionNo,
  3023. orderRef4: row.buNo,
  3024. partNo: row.partNo
  3025. }
  3026. return getInspectionFile(currentData).then(({data}) => {
  3027. if (data && data.code === 0) {
  3028. return data.rows || []
  3029. }
  3030. return []
  3031. }).catch(() => [])
  3032. },
  3033. //刷新派设备文档的列表
  3034. getFileContentData (row) {
  3035. this.currentWorkFileRow = this.resolveWorkFileRow(row)
  3036. let currentData = {
  3037. orderRef1: row.site,
  3038. orderRef2: row.inspectionNo,
  3039. orderRef4: row.buNo,
  3040. partNo: row.partNo
  3041. }
  3042. this.fileLoading = true
  3043. getInspectionFile(currentData).then(({data}) => {
  3044. //区分请求成功和失败的状况
  3045. if (data && data.code === 0) {
  3046. this.fileContentList = data.rows
  3047. } else {
  3048. this.fileContentList = []
  3049. }
  3050. this.$set(this.resolveWorkFileRow(row), 'hasWorkFile', this.fileContentList.length > 0 ? 'Y' : 'N')
  3051. this.fileLoading = false
  3052. }).catch(()=>{
  3053. this.fileLoading = false
  3054. })
  3055. this.fileFlag = true
  3056. },
  3057. /*新增文件的modal*/
  3058. addUploadFileModal () {
  3059. let currentData = {
  3060. titleCon: 'IPQC文件上传',
  3061. site: this.detailData.site,
  3062. buNo: this.detailData.buNo,
  3063. createBy: this.$store.state.user.name,
  3064. inspectionNo: this.detailData.inspectionNo,
  3065. remark: '',
  3066. folder: 'qcIPQC',
  3067. }
  3068. //打开组件 去做新增业务
  3069. this.$nextTick(() => {
  3070. this.$refs.qcFAIUploadFile.init(currentData)
  3071. })
  3072. },
  3073. // 上传项目图片
  3074. uploadImageModal (row) {
  3075. let currentData = {
  3076. site: this.detailData.site,
  3077. buNo: this.detailData.buNo,
  3078. createBy: this.$store.state.user.name,
  3079. inspectionNo: this.detailData.inspectionNo,
  3080. itemNo: row.itemNo,
  3081. folder: 'IPQCItemImageFile'
  3082. }
  3083. //打开组件 去做新增业务
  3084. this.$nextTick(() => {
  3085. this.$refs.comQcItemImageUploadFile.init(currentData)
  3086. })
  3087. },
  3088. // 查询检验员
  3089. inspectorSearch () {
  3090. inspectorSearch().then(({data}) => {
  3091. if (data.code === 0) {
  3092. this.options = data.rows
  3093. }
  3094. })
  3095. },
  3096. // 获取基础数据列表S
  3097. getBaseList (val,type) {
  3098. this.tagNo = val
  3099. this.$nextTick(() => {
  3100. let strVal = ''
  3101. if (val === 1052) {
  3102. this.searchSeqInfo()
  3103. this.seqDetailFlag = true
  3104. }
  3105. if (val === 505) {
  3106. strVal = this.modalData.resourceDesc
  3107. this.$refs.baseList.init(val, strVal)
  3108. }
  3109. // if (val === 206) {
  3110. // strVal = this.modalData.partNo
  3111. // this.$refs.baseList.init(val, strVal)
  3112. // }
  3113. })
  3114. },
  3115. /* 列表方法的回调 */
  3116. getBaseData (val) {
  3117. if (this.tagNo === 1052) {
  3118. this.modalData.seqNo = val.seqno
  3119. this.modalData.orderNo = val.orderno
  3120. this.modalData.operationDesc = ''
  3121. this.modalData.resourceId = ''
  3122. this.getOperationList()
  3123. //this.getPartList()
  3124. }
  3125. if (this.tagNo === 505) {
  3126. this.modalData.resourceId = val.resource_id
  3127. this.modalData.resourceDesc = val.resource_desc
  3128. }
  3129. // if (this.tagNo === 206) {
  3130. // this.modalData.partNo = val.part_no
  3131. // this.modalData.partDesc = val.part_desc
  3132. // // 获取物料的其他信息
  3133. // this.getPartInformation()
  3134. // }
  3135. },
  3136. // // 获取物料其它信息
  3137. // getPartInformation () {
  3138. // getPartInformation(this.modalData).then(({data}) => {
  3139. // if (data && data.code === 0) {
  3140. // this.modalData.spec = data.rows[0].spec
  3141. // this.modalData.sku = data.rows[0].sku
  3142. // } else {
  3143. // this.$alert(data.msg, '错误', {
  3144. // confirmButtonText: '确定'
  3145. // })
  3146. // }
  3147. // })
  3148. // },
  3149. // 获取工序列表
  3150. getOperationList () {
  3151. getOperationList(this.modalData).then(({data}) => {
  3152. if (data && data.code === 0) {
  3153. this.operationList = data.rows
  3154. this.modalData.operationDesc = data.rows[0].operationDesc
  3155. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3156. this.modalData.resourceId = data.rows[0].resourceId
  3157. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3158. this.modalData.partNo = data.rows[0].partNo
  3159. this.modalData.partDesc = data.rows[0].partDesc
  3160. this.modalData.invdefinetype = data.rows[0].invdefinetype
  3161. this.modalData.sku = data.rows[0].sku
  3162. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  3163. this.modalData.operationDesc = data.rows[0].operationDesc
  3164. this.modalData.qtyrequired = data.rows[0].qtyrequired
  3165. this.modalData.lotsize = data.rows[0].lotsize
  3166. } else {
  3167. this.$alert(data.msg, '错误', {
  3168. confirmButtonText: '确定'
  3169. })
  3170. }
  3171. })
  3172. },
  3173. // 获取机台列表
  3174. getResourceList () {
  3175. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  3176. if (this.modalData.specialTaskFlag === 'Y') {
  3177. return
  3178. } else {
  3179. getResourceList(this.modalData).then(({data}) => {
  3180. if (data && data.code === 0) {
  3181. //this.resourceList = data.rows
  3182. this.modalData.workCenterNo = data.rows[0].workCenterNo
  3183. this.modalData.resourceId = data.rows[0].resourceId
  3184. this.modalData.resourceDesc = data.rows[0].resourceDesc
  3185. } else {
  3186. this.$alert(data.msg, '错误', {
  3187. confirmButtonText: '确定'
  3188. })
  3189. }
  3190. })
  3191. }
  3192. },
  3193. // 获取物料列表
  3194. getPartList () {
  3195. getPartList(this.modalData).then(({data}) => {
  3196. if (data && data.code === 0) {
  3197. this.partList = data.rows
  3198. this.modalData.partNo = this.partList[0].partNo
  3199. this.modalData.partDesc = this.partList[0].partDesc
  3200. this.modalData.invdefinetype = this.partList[0].invdefinetype
  3201. this.modalData.sku = this.partList[0].sku
  3202. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  3203. } else {
  3204. this.$alert(data.msg, '错误', {
  3205. confirmButtonText: '确定'
  3206. })
  3207. }
  3208. })
  3209. },
  3210. // 检查动控是否开启
  3211. queryController () {
  3212. let tempData = {
  3213. controlNo: '10004',
  3214. site: this.$store.state.user.site,
  3215. }
  3216. queryController(tempData).then(({data}) => {
  3217. if (data && data.code === 0) {
  3218. this.controlData = data.rows
  3219. } else {
  3220. this.$alert(data.msg, '错误', {
  3221. confirmButtonText: '确定'
  3222. })
  3223. }
  3224. })
  3225. },
  3226. addModal () {
  3227. this.modalData = {
  3228. flag: '1',
  3229. site: '',
  3230. bu: this.userBuList[0].buNo,
  3231. inspectionNo:'',
  3232. partNo: '',
  3233. partDesc: '',
  3234. inspectionTypeNo:'',
  3235. inspectionTypeName:'',
  3236. inspectorNo:'',
  3237. inspectorName:'',
  3238. submit_flag:'',
  3239. orderNo: '',
  3240. operationDesc: '',
  3241. operationNo: '',
  3242. resourceId: '',
  3243. resourceDesc: '',
  3244. rollQty: '',
  3245. seqNo: '',
  3246. batchRollNo: '',
  3247. invdefinetype: '',
  3248. sku: '',
  3249. cinvSourceCode: '',
  3250. specialRequirements: '',
  3251. templateId: '',
  3252. templateName: '',
  3253. specialTaskFlag: '',
  3254. workCenterNo: '',
  3255. rollNo: '',
  3256. umId: this.umList[0].umId,
  3257. umName: this.umList[0].umName,
  3258. sjzs: '',
  3259. }
  3260. this.operationList = []
  3261. this.resourceList = []
  3262. this.partList = []
  3263. this.modalDisableFlag = false
  3264. this.modalFlag = true
  3265. this.checked = false
  3266. },
  3267. // 获取检验模板列表
  3268. queryTemplateList () {
  3269. this.templateData.bu = this.modalData.bu
  3270. // 查询所有检验模板
  3271. queryTemplateList(this.templateData).then(({data}) => {
  3272. if (data && data.code === 0) {
  3273. this.templateList = data.rows
  3274. this.templateModelFlag = true
  3275. }else {
  3276. this.$alert(data.msg, '错误', {
  3277. confirmButtonText: '确定'
  3278. })
  3279. }
  3280. })
  3281. },
  3282. // 获取物料列表
  3283. queryPartList () {
  3284. this.partData.bu = this.modalData.bu
  3285. // 查询所有物料
  3286. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3287. this.partList = []
  3288. this.partModelFlag = true
  3289. } else {
  3290. queryPartList(this.partData).then(({data}) => {
  3291. if (data && data.code === 0) {
  3292. this.partList = data.rows
  3293. this.partModelFlag = true
  3294. }else {
  3295. this.$alert(data.msg, '错误', {
  3296. confirmButtonText: '确定'
  3297. })
  3298. }
  3299. })
  3300. }
  3301. },
  3302. // 选中检验模板
  3303. getRowData (row) {
  3304. this.modalData.templateId = row.templateId
  3305. this.modalData.templateName = row.templateName
  3306. this.templateModelFlag = false
  3307. },
  3308. // 选中派工单号
  3309. getRowData1 (row) {
  3310. this.modalData.sku = row.sku
  3311. this.modalData.partNo = row.partNo
  3312. this.modalData.partDesc = row.partDesc
  3313. this.modalData.orderNo = row.orderNo
  3314. this.modalData.seqNo = row.seqNo
  3315. this.modalData.lotsize = row.lotsize
  3316. this.modalData.operationDesc = row.operationDesc
  3317. this.modalData.qtyrequired = row.qtyrequired
  3318. this.modalData.rollQty = row.qtyrequired
  3319. this.modalData.sjzs = row.sjzs
  3320. this.getOperationList()
  3321. //查询物料对应的模板
  3322. let params = {
  3323. site: this.modalData.bu.split('_')[0],
  3324. buNo: this.modalData.bu.split('_')[1],
  3325. partNo: this.modalData.partNo,
  3326. attributeNo: this.modalData.partNo,
  3327. partDesc: this.modalData.partDesc,
  3328. attributeType: 'A',
  3329. inspectionTypeNo: '101'
  3330. }
  3331. searchPartAttributeDetails(params).then(({data}) => {
  3332. if (data.total = 1){
  3333. this.modalData.templateId = data.rows[0].templateId
  3334. this.modalData.templateName = data.rows[0].templateName
  3335. }
  3336. })
  3337. this.seqDetailFlag = false
  3338. },
  3339. // 选中物料
  3340. getRowData2 (row) {
  3341. this.modalData.partNo = row.partNo
  3342. this.modalData.partDesc = row.partDesc
  3343. this.modalData.sku = row.sku
  3344. this.modalData.invdefinetype = row.invdefinetype
  3345. this.modalData.cinvSourceCode = row.cinvSourceCode
  3346. this.partData = {
  3347. site: '',
  3348. bu: '',
  3349. partNo: '',
  3350. partDesc: '',
  3351. sku: '',
  3352. cinvSourceCode: '',
  3353. }
  3354. this.partModelFlag = false
  3355. },
  3356. // 是否新增特殊任务
  3357. changeSpecialTask () {
  3358. // 先重置数据
  3359. this.modalData = {
  3360. flag: '1',
  3361. site: '',
  3362. bu: this.userBuList[0].buNo,
  3363. inspectionNo:'',
  3364. partNo: '',
  3365. partDesc: '',
  3366. inspectionTypeNo:'',
  3367. inspectionTypeName:'',
  3368. inspectorNo:'',
  3369. inspectorName:'',
  3370. submit_flag:'',
  3371. orderNo: '',
  3372. operationDesc: '',
  3373. operationNo: '',
  3374. resourceId: '',
  3375. resourceDesc: '',
  3376. rollQty: '',
  3377. seqNo: '',
  3378. batchRollNo: '',
  3379. invdefinetype: '',
  3380. sku: '',
  3381. cinvSourceCode: '',
  3382. specialRequirements: '',
  3383. templateId: '',
  3384. templateName: '',
  3385. specialTaskFlag: '',
  3386. workCenterNo: '',
  3387. rollNo: '',
  3388. umId: this.umList[0].umId,
  3389. umName: this.umList[0].umName
  3390. }
  3391. // 获取选中框
  3392. let obj = document.getElementsByName('specialTask')
  3393. // 判断是否打勾
  3394. if (obj[0].checked) {
  3395. let tempData = {
  3396. site: '',
  3397. bu: this.modalData.bu
  3398. }
  3399. this.modalData.specialTaskFlag = 'Y'
  3400. // 获取特殊工序列表
  3401. getSpecialOperationList(tempData).then(({data}) => {
  3402. if (data && data.code === 0) {
  3403. this.operationList = data.rows
  3404. } else {
  3405. this.$alert(data.msg, '错误', {
  3406. confirmButtonText: '确定'
  3407. })
  3408. }
  3409. })
  3410. // 派工单和工单号赋值
  3411. this.modalData.seqNo = '000#1TSGD'
  3412. this.modalData.orderNo = '000#1'
  3413. } else {
  3414. this.operationList = []
  3415. this.modalData.specialTaskFlag = ''
  3416. }
  3417. },
  3418. // 新增IPQC巡检记录
  3419. saveData () {
  3420. if (this.modalData.bu === '' || this.modalData.bu == null) {
  3421. this.$message.warning('请选择BU!')
  3422. return
  3423. }
  3424. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  3425. this.$message.warning('请选择派工单!')
  3426. return
  3427. }
  3428. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  3429. this.$message.warning('请选择工单!')
  3430. return
  3431. }
  3432. if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
  3433. this.$message.warning('请选择检验类型!')
  3434. return
  3435. }
  3436. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  3437. this.$message.warning('请选择物料!')
  3438. return
  3439. }
  3440. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  3441. this.$message.warning('请选择工序!')
  3442. return
  3443. }
  3444. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  3445. this.$message.warning('请选择机台!')
  3446. return
  3447. }
  3448. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  3449. this.$message.warning('请填写送检数量!')
  3450. return
  3451. }
  3452. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3453. this.$message.warning('请选择单位!')
  3454. return
  3455. }
  3456. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  3457. this.$message.warning('请选择检验模板!')
  3458. return
  3459. }
  3460. this.saveLoading = true
  3461. if(this.modalData.flag === '1'){
  3462. saveOsInspection(this.modalData).then(({data}) => {
  3463. if (data && data.code === 0) {
  3464. this.getDataList()
  3465. this.operationList = []
  3466. this.resourceList = []
  3467. this.partList = []
  3468. this.modalFlag = false
  3469. this.$message({
  3470. message: '操作成功',
  3471. type: 'success',
  3472. duration: 1500,
  3473. onClose: () => {}
  3474. })
  3475. } else {
  3476. this.$alert(data.msg, '错误', {
  3477. confirmButtonText: '确定'
  3478. })
  3479. }
  3480. this.saveLoading = false
  3481. }).catch(()=>{
  3482. this.saveLoading = false
  3483. })
  3484. }
  3485. },
  3486. // 获取主信息数据列表
  3487. getDataList () {
  3488. this.searchLoading = true
  3489. this.searchData.limit = this.pageSize
  3490. this.searchData.page = this.pageIndex
  3491. qcIPQCInspectionSearch(this.searchData).then(({data}) => {
  3492. if (data.code === 0) {
  3493. this.dataList = data.page.list
  3494. this.pageIndex = data.page.currPage
  3495. this.pageSize = data.page.pageSize
  3496. this.totalPage = data.page.totalCount
  3497. this.searchLoading = false
  3498. } else {
  3499. this.searchLoading = false
  3500. }
  3501. }).catch(()=>{
  3502. this.searchLoading = false
  3503. })
  3504. },
  3505. // 每页数
  3506. sizeChangeHandle (val) {
  3507. this.pageSize = val
  3508. this.pageIndex = 1
  3509. this.getDataList()
  3510. },
  3511. // 当前页
  3512. currentChangeHandle (val) {
  3513. this.pageIndex = val
  3514. this.getDataList()
  3515. },
  3516. // 子明细每页数
  3517. sizeChangeHandle2 (val) {
  3518. this.pageSize2 = val
  3519. },
  3520. // 子明细当前页
  3521. currentChangeHandle2 (val) {
  3522. this.pageIndex2 = val
  3523. },
  3524. // 多选
  3525. selectionChangeHandle (val) {
  3526. this.dataListSelections = val
  3527. },
  3528. // 删除检验记录
  3529. deleteModal () {
  3530. if (this.IPQCSelections.length === 0) {
  3531. this.$alert('请勾选要删除的检验单!', '提示', {
  3532. confirmButtonText: '确定'
  3533. })
  3534. return false
  3535. }
  3536. this.$confirm(`是否删除该 `+ this.IPQCSelections.length +` 条检验记录?`, '提示', {
  3537. confirmButtonText: '确定',
  3538. cancelButtonText: '取消',
  3539. type: 'warning'
  3540. }).then(() => {
  3541. let tempData = {
  3542. site: this.$store.state.user.site,
  3543. submitList: this.IPQCSelections
  3544. }
  3545. ipqcRecordDelete(tempData).then(({data}) => {
  3546. if (data && data.code === 0) {
  3547. this.getDataList()
  3548. this.IPQCSelections = []
  3549. this.$message({
  3550. message: '操作成功',
  3551. type: 'success',
  3552. duration: 1500,
  3553. onClose: () => {}
  3554. })
  3555. } else {
  3556. this.$alert(data.msg, '错误', {
  3557. confirmButtonText: '确定'
  3558. })
  3559. }
  3560. })
  3561. }).catch(() => {
  3562. })
  3563. },
  3564. Transfer (type) {
  3565. if (type === '2') {
  3566. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3567. this.$message.warning('请选择检验结论!')
  3568. return
  3569. }
  3570. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3571. this.$message.warning('请选择处置措施!')
  3572. return
  3573. }
  3574. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3575. const flag = this.detailList.some(item => item.itemResult === 'N')
  3576. if (!flag) {
  3577. this.$message.warning('请选择不合格项目!')
  3578. return
  3579. }
  3580. }
  3581. if (this.detailData.inspectionResult !== '不合格') {
  3582. this.detailData.disposalMeasures = ''
  3583. this.detailData.disposalRemark = ''
  3584. }
  3585. }
  3586. this.saveDetailInformation(type)
  3587. },
  3588. // 新增明细信息
  3589. saveDetailInformation (type) {
  3590. this.saveInformationData.site = this.detailData.site
  3591. this.saveInformationData.buNo = this.detailData.buNo
  3592. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3593. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3594. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3595. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3596. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3597. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3598. this.saveInformationData.rollQty = this.detailData.rollQty
  3599. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3600. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3601. this.saveInformationData.partNo = this.detailData.partNo
  3602. this.saveInformationData.partDesc = this.detailData.partDesc
  3603. this.saveInformationData.operator = this.detailData.operator
  3604. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3605. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3606. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3607. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3608. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  3609. this.saveInformationData.type = type
  3610. this.transferLoadFlag = true
  3611. // this.saveInformationData.subDetailList = this.acquisitionList
  3612. saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3613. if (data && data.code === 0) {
  3614. this.getDataList()
  3615. this.detailInformationFlag = false
  3616. this.$message({
  3617. message: '操作成功',
  3618. type: 'success',
  3619. duration: 1500,
  3620. onClose: () => {}
  3621. })
  3622. } else {
  3623. this.$alert(data.msg, '错误', {
  3624. confirmButtonText: '确定'
  3625. })
  3626. }
  3627. this.transferLoadFlag = false
  3628. }).catch(()=>{
  3629. this.transferLoadFlag = false
  3630. })
  3631. },
  3632. // 开始检验
  3633. actionModal (row) {
  3634. this.actionData = {
  3635. site: row.site,
  3636. buNo: row.buNo,
  3637. inspectionNo: row.inspectionNo
  3638. }
  3639. getIPQCItemObjectList(this.actionData).then(({data}) => {
  3640. if (data && data.code === 0) {
  3641. if (data.rows.length === 0) {
  3642. this.actionModal2()
  3643. } else {
  3644. this.itemObjectList = data.rows
  3645. this.ItemObjectModelFlag = true
  3646. }
  3647. } else {
  3648. this.$alert(data.msg, '错误', {
  3649. confirmButtonText: '确定'
  3650. })
  3651. }
  3652. })
  3653. },
  3654. // 开始检验
  3655. actionModal2 () {
  3656. this.$confirm(`确认开始检验?`, '提示', {
  3657. confirmButtonText: '确定',
  3658. cancelButtonText: '取消',
  3659. type: 'warning'
  3660. }).then(() => {
  3661. let tempData = {
  3662. site: this.actionData.site,
  3663. buNo: this.actionData.buNo,
  3664. inspectionNo: this.actionData.inspectionNo,
  3665. actionBy: this.$store.state.user.name,
  3666. state: '待检验',
  3667. equipmentList: this.itemObjectList
  3668. }
  3669. actionIPQCInspection(tempData).then(({data}) => {
  3670. if (data && data.code === 0) {
  3671. this.getDataList()
  3672. this.$message({
  3673. message: '操作成功',
  3674. type: 'success',
  3675. duration: 1500,
  3676. onClose: () => {}
  3677. })
  3678. this.ItemObjectModelFlag = false
  3679. } else {
  3680. this.$alert(data.msg, '错误', {
  3681. confirmButtonText: '确定'
  3682. })
  3683. }
  3684. })
  3685. })
  3686. },
  3687. // 明细记录信息查询
  3688. detailModal (row) {
  3689. if (row.state === '待检验' && row.workFileRead !== 'Y') {
  3690. if (row.hasWorkFile === 'N') {
  3691. this.openDetailModal(row)
  3692. return
  3693. }
  3694. this.fetchWorkFiles(row).then(files => {
  3695. const target = this.resolveWorkFileRow(row)
  3696. this.$set(target, 'hasWorkFile', files.length > 0 ? 'Y' : 'N')
  3697. if (files.length > 0 && target.workFileRead !== 'Y') {
  3698. this.$message.warning('请先预览工作文件后再进行检验操作')
  3699. this.currentWorkFileRow = target
  3700. this.fileContentList = files
  3701. this.fileFlag = true
  3702. return
  3703. }
  3704. this.openDetailModal(row)
  3705. })
  3706. return
  3707. }
  3708. this.openDetailModal(row)
  3709. },
  3710. openDetailModal (row) {
  3711. this.detailData.site = row.site
  3712. this.detailData.buNo = row.buNo
  3713. this.detailData.inspectionNo = row.inspectionNo
  3714. this.detailData.partNo = row.partNo
  3715. this.detailData.partDesc = row.partDesc
  3716. this.detailData.rollQty = row.rollQty
  3717. this.detailData.samplingQty = row.samplingQty
  3718. this.detailData.unqualifiedQty = row.unqualifiedQty
  3719. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3720. this.detailData.submitFlag = row.submitFlag
  3721. this.detailData.disposalMeasures = row.disposalMeasures
  3722. this.detailData.disposalRemark = row.disposalRemark
  3723. this.detailData.inspectionResult = row.inspectionResult
  3724. this.detailData.inspectorNo = row.inspectorNo
  3725. this.detailData.inspectorName = row.inspectorName
  3726. this.detailData.inspectionRemark = row.inspectionRemark
  3727. this.detailData.cinvSourceCode = row.cinvSourceCode
  3728. this.detailData.sku = row.sku
  3729. this.detailData.cinvSourceCode = row.cinvSourceCode
  3730. this.detailData.invdefinetype = row.invdefinetype
  3731. this.detailData.umId = row.umId
  3732. this.detailData.umName = row.umName
  3733. this.detailData.operator = row.operator
  3734. this.detailData.operatorName = row.operatorName
  3735. this.detailData.responsiblePerson = row.responsiblePerson
  3736. this.detailData.responsiblePersonName = row.responsiblePersonName
  3737. this.detailData.state = row.state
  3738. if (row.state === '待检验') {
  3739. this.detailData.passQty = row.samplingQty
  3740. } else {
  3741. this.detailData.passQty = row.passQty
  3742. this.detailData.notPassQty = row.notPassQty
  3743. }
  3744. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  3745. this.getInspectionFormData()
  3746. this.inspectorSearch()
  3747. // this.acquisitionList = []
  3748. this.detailInformationFlag = true
  3749. },
  3750. // 检验单明细
  3751. getInspectionFormData () {
  3752. ipqcDetailSearch(this.detailData).then(({data}) => {
  3753. if (data && data.code === 0) {
  3754. this.detailList = data.rows
  3755. } else {
  3756. this.detailList = []
  3757. }
  3758. })
  3759. },
  3760. // 子明细记录信息查询
  3761. subDetailModal (row) {
  3762. this.subDetailLoading = true
  3763. this.subDetailData = row
  3764. this.pageIndex2 = 1
  3765. selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3766. if (data.code === 0) {
  3767. this.tableData = data.rows
  3768. }
  3769. this.subDetailLoading = false
  3770. }).catch(()=>{
  3771. this.subDetailLoading = false
  3772. })
  3773. this.batchAddData = {
  3774. samplingLocation: '',
  3775. samplingLocationB: '',
  3776. samplingNumber: ''
  3777. }
  3778. this.subDetailFlag = true
  3779. },
  3780. // 子明细分页查询
  3781. subDetailModal2 () {
  3782. selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3783. if (data.code === 0) {
  3784. this.tableData = data.rows
  3785. }
  3786. })
  3787. },
  3788. // 审核按钮
  3789. submitResult () {
  3790. let tempData1 = '' // 记录不是待审核状态的单号
  3791. let tempData2 = '' // 记录处置措施未填写的单号
  3792. if (this.IPQCSelections.length === 0) {
  3793. this.$alert('请勾选要审核的检验单!', '提示', {
  3794. confirmButtonText: '确定'
  3795. })
  3796. return false
  3797. }
  3798. for (let i = 0; i < this.IPQCSelections.length; i++) {
  3799. if (this.IPQCSelections[i].state !== '待审核'){
  3800. tempData1 = tempData1 + this.IPQCSelections[i].inspectionNo + '、'
  3801. }
  3802. if (this.IPQCSelections[i].inspectionResult === '不合格' && (this.IPQCSelections[i].disposalMeasures === '' || this.IPQCSelections[i].disposalMeasures == null)) {
  3803. tempData2 = tempData2 + this.IPQCSelections[i].inspectionNo + '、'
  3804. }
  3805. }
  3806. if (tempData1 !== ''){
  3807. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3808. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  3809. confirmButtonText: '确定'
  3810. })
  3811. return false
  3812. }
  3813. if (tempData2 !== ''){
  3814. tempData2 = tempData2.substring(0, tempData2.length - 1)
  3815. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  3816. confirmButtonText: '确定'
  3817. })
  3818. return false
  3819. }
  3820. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.IPQCSelections.length + ` 条记录`, '提示', {
  3821. confirmButtonText: '确定',
  3822. cancelButtonText: '取消',
  3823. type: 'warning'
  3824. }).then(() => {
  3825. this.submitData.submitList = this.IPQCSelections
  3826. saveIPQCSubmitResult(this.submitData).then(({data}) => {
  3827. if (data && data.code === 0) {
  3828. this.getDataList()
  3829. this.IPQCSelections = []
  3830. this.$message({
  3831. message: '操作成功',
  3832. type: 'success',
  3833. duration: 1500,
  3834. onClose: () => {}
  3835. })
  3836. } else {
  3837. this.$alert(data.msg, '错误', {
  3838. confirmButtonText: '确定'
  3839. })
  3840. }
  3841. })
  3842. })
  3843. },
  3844. // 取消审核
  3845. cancelApproval () {
  3846. let tempData1 = '' // 记录不是已完成状态的单号
  3847. if (this.IPQCSelections.length === 0) {
  3848. this.$message.warning('请勾选要取消审核的检验单!')
  3849. return
  3850. }
  3851. for (let i = 0; i < this.IPQCSelections.length; i++) {
  3852. if (this.IPQCSelections[i].state !== '已完成') {
  3853. tempData1 = tempData1 + this.IPQCSelections[i].inspectionNo + '、'
  3854. }
  3855. }
  3856. if (tempData1 !== '') {
  3857. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3858. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  3859. return
  3860. }
  3861. this.$confirm(`确定取消审核该 ` + this.IPQCSelections.length + ` 条记录`, '提示', {
  3862. confirmButtonText: '确定',
  3863. cancelButtonText: '取消',
  3864. type: 'warning'
  3865. }).then(() => {
  3866. this.submitData.submitList = this.IPQCSelections
  3867. cancelApproval2(this.submitData).then(({data}) => {
  3868. if (data && data.code === 0) {
  3869. this.getDataList()
  3870. this.IPQCSelections = []
  3871. this.$message({
  3872. message: '操作成功',
  3873. type: 'success',
  3874. duration: 1500,
  3875. onClose: () => {}
  3876. })
  3877. } else {
  3878. this.$alert(data.msg, '错误', {
  3879. confirmButtonText: '确定'
  3880. })
  3881. }
  3882. })
  3883. })
  3884. },
  3885. // 子明细方法
  3886. // 表格的新增
  3887. rowClassName ({ row, rowIndex }) {
  3888. row.xh = rowIndex + 1
  3889. row.num = this.tableData.indexOf(row) + 1
  3890. },
  3891. // 单选框选中数据
  3892. handleDetailSelectionChange (selection) {
  3893. this.checkedDetail = selection
  3894. },
  3895. // 点击新增更多
  3896. handleAddBtn (td) {
  3897. checkIPQCIsSubmit(td).then(({data}) => {
  3898. if (data.flag !== 1) {
  3899. let obj = {
  3900. subDetailValue: '',
  3901. samplingLocation: '',
  3902. samplingLocationB: '',
  3903. subDetailValueB: '',
  3904. subDetailValueC: '',
  3905. subDetailValueD: '',
  3906. subDetailValueE: '',
  3907. }
  3908. this.tableData.push(obj)
  3909. } else {
  3910. this.$alert("记录已提交!", '错误', {
  3911. confirmButtonText: '确定'
  3912. })
  3913. }
  3914. })
  3915. },
  3916. // 批量新增操作
  3917. batchHandleAdd (td) {
  3918. checkIPQCIsSubmit(td).then(({data}) => {
  3919. if (data.flag !== 1) {
  3920. this.batchHandleAddModalFlag = true
  3921. } else {
  3922. this.$alert("记录已提交!", '错误', {
  3923. confirmButtonText: '确定'
  3924. })
  3925. }
  3926. })
  3927. },
  3928. // 批量新增行
  3929. batchHandleAddModal () {
  3930. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  3931. let obj = {
  3932. samplingLocation: this.batchAddData.samplingLocation,
  3933. samplingLocationB: this.batchAddData.samplingLocationB,
  3934. subDetailValue: '',
  3935. subDetailValueB: '',
  3936. subDetailValueC: '',
  3937. subDetailValueD: '',
  3938. subDetailValueE: '',
  3939. }
  3940. this.tableData.push(obj)
  3941. }
  3942. this.batchHandleAddModalFlag = false
  3943. },
  3944. // 回车事件
  3945. nextFocus1 (index) {
  3946. let a = `${index + 1}` + `a`
  3947. this.$nextTick(() => {
  3948. this.$refs[a].focus()
  3949. })
  3950. },
  3951. nextFocus2 (index) {
  3952. let a = `${index + 1}` + `b`
  3953. this.$nextTick(() => {
  3954. this.$refs[a].focus()
  3955. })
  3956. },
  3957. nextFocus3 (index) {
  3958. let a = `${index + 1}` + `c`
  3959. this.$nextTick(() => {
  3960. this.$refs[a].focus()
  3961. })
  3962. },
  3963. nextFocus4 (index) {
  3964. let a = `${index + 1}` + `d`
  3965. this.$nextTick(() => {
  3966. this.$refs[a].focus()
  3967. })
  3968. },
  3969. nextFocus5 (index) {
  3970. let a = `${index + 1}` + `e`
  3971. this.$nextTick(() => {
  3972. this.$refs[a].focus()
  3973. })
  3974. },
  3975. nextFocus6 (index) {
  3976. let a = `${index + 1}` + `f`
  3977. this.$nextTick(() => {
  3978. this.$refs[a].focus()
  3979. })
  3980. },
  3981. nextFocus7 (index) {
  3982. let a = `${index + 1}` + `g`
  3983. this.$nextTick(() => {
  3984. this.$refs[a].focus()
  3985. })
  3986. },
  3987. focusNextInput (index, type) {
  3988. let aaa = ''
  3989. if (this.detailList.length - 1 === index) {
  3990. aaa = `${type}0`
  3991. } else {
  3992. aaa = `${type}${index + 1}`
  3993. }
  3994. this.$nextTick(() => {
  3995. this.$refs[aaa].focus()
  3996. })
  3997. },
  3998. updateItemResult(row){
  3999. if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
  4000. return;
  4001. }
  4002. if (row.maxValue == null && row.minValue == null) {
  4003. if (row.numberValue!=row.defaultValue){
  4004. row.itemResult = 'N'
  4005. }
  4006. }else if (row.maxValue != null && row.minValue != null){
  4007. if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
  4008. row.itemResult = 'N'
  4009. }else {
  4010. row.itemResult = 'Y'
  4011. }
  4012. }else if(row.maxValue != null){
  4013. if ( row.numberValue>row.maxValue) {
  4014. row.itemResult = 'N'
  4015. }else {
  4016. row.itemResult = 'Y'
  4017. }
  4018. }else if(row.minValue != null){
  4019. if ( row.numberValue<row.minValue) {
  4020. row.itemResult = 'N'
  4021. }else {
  4022. row.itemResult = 'Y'
  4023. }
  4024. }
  4025. },
  4026. //删除
  4027. handleDeleteBtn (td) {
  4028. checkIPQCIsSubmit(td).then(({data}) => {
  4029. if (data.flag !== 1) {
  4030. if (this.checkedDetail.length === 0) {
  4031. this.$alert("请先选择要删除的数据", "提示", {
  4032. confirmButtonText: "确定",
  4033. })
  4034. } else {
  4035. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4036. confirmButtonText: "确定",
  4037. cancelButtonText: "取消",
  4038. type: "warning",
  4039. callback: (action) => {
  4040. if (action === "confirm") {
  4041. let val = this.checkedDetail
  4042. val.forEach((val, index) => {
  4043. this.tableData.splice(this.tableData.indexOf(val), 1)
  4044. if (this.templateTableData.length === 0) {
  4045. this.pageIndex2--
  4046. }
  4047. })
  4048. this.$message({
  4049. message: "删除成功!",
  4050. type: "success",
  4051. })
  4052. return
  4053. } else {
  4054. this.$message({
  4055. message: "已取消删除操作",
  4056. type: "warning",
  4057. })
  4058. return
  4059. }
  4060. },
  4061. })
  4062. }
  4063. } else {
  4064. this.$alert("记录已提交!", '错误', {
  4065. confirmButtonText: '确定'
  4066. })
  4067. }
  4068. })
  4069. },
  4070. // 新增子明细记录
  4071. saveSubDetailResult () {
  4072. for (let i = 0; i < this.tableData.length; i++) {
  4073. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  4074. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  4075. return
  4076. }
  4077. }
  4078. this.subDetailData.subDetailValues = this.tableData
  4079. this.subDetailVisiable = true
  4080. saveIPQCSubDetailed(this.subDetailData).then(({data}) => {
  4081. if (data && data.code === 0) {
  4082. if (data.count > 0) {
  4083. this.subDetailData.itemResult = 'N'
  4084. this.subDetailData.unqualifiedQuantity = data.count
  4085. }
  4086. if (this.subDetailData.subDetailValues.length > 0) {
  4087. this.subDetailData.subDetailRecordNum = 1
  4088. } else {
  4089. this.subDetailData.subDetailRecordNum = -1
  4090. this.subDetailData.unqualifiedQuantity = 0
  4091. this.subDetailData.itemResult = 'Y'
  4092. }
  4093. this.subDetailFlag = false
  4094. this.tableData = []
  4095. this.$message({
  4096. message: '操作成功',
  4097. type: 'success',
  4098. duration: 1500,
  4099. onClose: () => {}
  4100. })
  4101. } else {
  4102. this.$alert(data.msg, '错误', {
  4103. confirmButtonText: '确定'
  4104. })
  4105. }
  4106. }).finally(() => {
  4107. this.subDetailVisiable = false
  4108. })
  4109. },
  4110. // 检验结论改变事件
  4111. resultChange () {
  4112. if (this.detailData.inspectionResult === '不合格') {
  4113. this.detailData.passQty = 0
  4114. this.syncPassNotPassQtyFromPass()
  4115. } else if (this.detailData.inspectionResult === '合格') {
  4116. this.$set(this.detailData, 'notPassQty', 0)
  4117. this.syncPassNotPassQtyFromNotPass()
  4118. }
  4119. },
  4120. syncPassNotPassQtyFromPass () {
  4121. const samplingQty = Number(this.detailData.samplingQty)
  4122. const passQty = Number(this.detailData.passQty)
  4123. if (Number.isNaN(samplingQty) || Number.isNaN(passQty)) {
  4124. return
  4125. }
  4126. this.$set(this.detailData, 'notPassQty', samplingQty - passQty)
  4127. },
  4128. syncPassNotPassQtyFromNotPass () {
  4129. const samplingQty = Number(this.detailData.samplingQty)
  4130. const notPassQty = Number(this.detailData.notPassQty)
  4131. if (Number.isNaN(samplingQty) || Number.isNaN(notPassQty)) {
  4132. return
  4133. }
  4134. this.$set(this.detailData, 'passQty', samplingQty - notPassQty)
  4135. },
  4136. noPassQtyChange () {
  4137. const passQty = Number(this.detailData.passQty)
  4138. const samplingQty = Number(this.detailData.samplingQty)
  4139. if (Number.isNaN(passQty) || Number.isNaN(samplingQty)) {
  4140. return
  4141. }
  4142. if (passQty > samplingQty) {
  4143. this.$message.warning('合格数量不能大于抽样数量!')
  4144. this.$nextTick(() => {
  4145. this.$set(this.detailData, 'passQty', samplingQty)
  4146. this.syncPassNotPassQtyFromPass()
  4147. })
  4148. return
  4149. }
  4150. this.syncPassNotPassQtyFromPass()
  4151. },
  4152. noNotPassQtyChange () {
  4153. const notPassQty = Number(this.detailData.notPassQty)
  4154. const samplingQty = Number(this.detailData.samplingQty)
  4155. if (Number.isNaN(notPassQty) || Number.isNaN(samplingQty)) {
  4156. return
  4157. }
  4158. if (notPassQty > samplingQty) {
  4159. this.$message.warning('不合格数量不能大于抽样数量!')
  4160. this.$nextTick(() => {
  4161. this.$set(this.detailData, 'notPassQty', samplingQty)
  4162. this.syncPassNotPassQtyFromNotPass()
  4163. })
  4164. return
  4165. }
  4166. this.syncPassNotPassQtyFromNotPass()
  4167. },
  4168. // 校验用户是否收藏
  4169. favoriteIsOk () {
  4170. let userFavorite = {
  4171. userId: this.$store.state.user.id,
  4172. languageCode: this.$i18n.locale
  4173. }
  4174. userFavoriteList(userFavorite).then(({data}) => {
  4175. for (let i = 0; i < data.list.length; i++) {
  4176. if(this.$route.meta.menuId === data.list[i].menuId){
  4177. this.favorite = true
  4178. }
  4179. }
  4180. })
  4181. },
  4182. // 收藏 OR 取消收藏
  4183. favoriteFunction () {
  4184. let userFavorite = {
  4185. userId: this.$store.state.user.id,
  4186. functionId: this.$route.meta.menuId,
  4187. }
  4188. if (this.favorite) {
  4189. removeUserFavorite(userFavorite).then(({data}) => {
  4190. this.$message.success(data.msg)
  4191. this.favorite = false
  4192. })
  4193. } else {
  4194. // 收藏
  4195. saveUserFavorite(userFavorite).then(({data}) => {
  4196. this.$message.success(data.msg)
  4197. this.favorite = true
  4198. })
  4199. }
  4200. },
  4201. //导出excel
  4202. async createExportData () {
  4203. this.searchData.limit = -1
  4204. this.searchData.page = 1
  4205. await qcIPQCInspectionSearch(this.searchData).then(({data}) => {
  4206. this.exportList= data.page.list
  4207. })
  4208. return this.exportList
  4209. },
  4210. startDownload() {},
  4211. finishDownload() {},
  4212. fields () {
  4213. let json = "{"
  4214. this.columnList1.forEach((item, index) => {
  4215. if (index == this.columnList1.length - 1) {
  4216. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  4217. } else {
  4218. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  4219. }
  4220. })
  4221. json += "}"
  4222. let s = eval("(" + json + ")")
  4223. return s
  4224. },
  4225. // 动态列开始 获取 用户保存的 格式列
  4226. async getTableUserColumn (tableId, columnId) {
  4227. let queryTableUser = {
  4228. userId: this.$store.state.user.name,
  4229. functionId: this.$route.meta.menuId,
  4230. tableId: tableId,
  4231. status: true,
  4232. languageCode: this.$i18n.locale
  4233. }
  4234. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  4235. if (data.rows.length > 0) {
  4236. switch (columnId) {
  4237. case 1:
  4238. this.columnList1 = data.rows
  4239. break;
  4240. case 2:
  4241. this.detailColumnList = data.rows
  4242. break;
  4243. case 3:
  4244. this.seqDetailColumnList = data.rows
  4245. break;
  4246. }
  4247. } else {
  4248. this.getColumnList(tableId, columnId)
  4249. }
  4250. })
  4251. },
  4252. // 获取 tableDefault 列
  4253. async getColumnList (tableId, columnId) {
  4254. let queryTable= {
  4255. functionId: this.$route.meta.menuId,
  4256. tableId: tableId,
  4257. languageCode: this.$i18n.locale
  4258. }
  4259. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  4260. if (!data.rows.length == 0) {
  4261. switch (columnId) {
  4262. case 1:
  4263. this.columnList1 = data.rows
  4264. break;
  4265. case 2:
  4266. this.detailColumnList = data.rows
  4267. break;
  4268. case 3:
  4269. this.seqDetailColumnList = data.rows
  4270. break;
  4271. }
  4272. }
  4273. })
  4274. },
  4275. /**
  4276. * 明细导入后将返回值回传给父组件
  4277. * @param val
  4278. */
  4279. changeMyString (val) {
  4280. for (let i = 0; i < this.detailList.length; i++) {
  4281. if (val[this.detailList[i].itemNo] !== undefined) {
  4282. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  4283. if (val[this.detailList[i].itemNo] != null) {
  4284. this.detailList[i].subDetailRecordNum = 1
  4285. }
  4286. if (val[this.detailList[i].itemNo] > 0) {
  4287. this.detailList[i].itemResult = 'N'
  4288. }
  4289. }
  4290. }
  4291. },
  4292. searchSeqInfo () {
  4293. let tempData = {
  4294. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  4295. bu: this.modalData.bu,
  4296. seqNo: this.seqDetailData.seqNo,
  4297. orderNo: this.seqDetailData.orderNo,
  4298. sku: this.seqDetailData.sku,
  4299. partDesc: this.seqDetailData.partDesc,
  4300. partNo: this.seqDetailData.partNo,
  4301. operationDesc: this.seqDetailData.operationDesc,
  4302. status: this.seqDetailData.status
  4303. }
  4304. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  4305. this.seqInfoList = []
  4306. } else {
  4307. searchSeqInfo(tempData).then(({data}) => {
  4308. if (data && data.code === 0) {
  4309. this.seqInfoList = data.rows
  4310. } else {
  4311. this.$alert(data.msg, '错误', {
  4312. confirmButtonText: '确定'
  4313. })
  4314. }
  4315. })
  4316. }
  4317. },
  4318. closeDialog () {
  4319. this.seqDetailData = {
  4320. seqNo : '',
  4321. orderNo: '',
  4322. sku: '',
  4323. partNo: '',
  4324. partDesc: '',
  4325. operationDesc: '',
  4326. status: '下达'
  4327. }
  4328. this.seqInfoList = []
  4329. },
  4330. //获取按钮的权限数据
  4331. getButtonAuthData () {
  4332. let searchFlag = this.isAuth(this.menuId + ":search")
  4333. let checkFlag = this.isAuth(this.menuId + ":check")
  4334. let saveFlag = this.isAuth(this.menuId + ":save")
  4335. let deleteFlag = this.isAuth(this.menuId + ":delete")
  4336. let detailFlag = this.isAuth(this.menuId + ":detail")
  4337. let fileFlag = this.isAuth(this.menuId + ":file")
  4338. let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
  4339. //处理页面的权限数据
  4340. this.authSearch = !searchFlag
  4341. this.authCheck = !checkFlag
  4342. this.authSave = !saveFlag
  4343. this.authDelete = !deleteFlag
  4344. this.authDetail = !detailFlag
  4345. this.authFile = !fileFlag
  4346. this.authCancelCheck = !cancelCheckFlag
  4347. },
  4348. }
  4349. }
  4350. </script>
  4351. <style scoped>
  4352. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  4353. color: red;
  4354. font-weight: bold;
  4355. }
  4356. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  4357. color: rgb(103,194,58);
  4358. font-weight: bold;
  4359. }
  4360. .el-table /deep/ .cell{
  4361. height: auto;
  4362. line-height: 1.5;
  4363. }
  4364. </style>