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.

3872 lines
137 KiB

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