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.

3435 lines
121 KiB

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