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

3742 lines
133 KiB

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