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

4348 lines
154 KiB

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