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.

4105 lines
146 KiB

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