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.

2913 lines
103 KiB

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