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.

3975 lines
140 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. <!-- 配置项目设备 -->
  820. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
  821. <div class="rq">
  822. <el-table
  823. :height="350"
  824. :data="itemObjectList"
  825. border
  826. style="width: 100%">
  827. <el-table-column
  828. v-for="(item,index) in itemObjectColumnList" :key="index"
  829. :sortable="item.columnSortable"
  830. :prop="item.columnProp"
  831. :header-align="item.headerAlign"
  832. :show-overflow-tooltip="item.showOverflowTooltip"
  833. :align="item.align"
  834. :fixed="item.fixed===''?false:item.fixed"
  835. :min-width="item.columnWidth"
  836. :label="item.columnLabel">
  837. <template slot-scope="scope">
  838. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  839. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  840. </template>
  841. </el-table-column>
  842. <el-table-column
  843. header-align="center"
  844. align="center"
  845. min-width="100"
  846. label="设备">
  847. <template slot-scope="scope">
  848. <el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
  849. <el-option
  850. v-for = "i in scope.row.objectList"
  851. :key = "i.objectID"
  852. :label = "i.objectDesc"
  853. :value = "i.objectID">
  854. </el-option>
  855. </el-select>
  856. </template>
  857. </el-table-column>
  858. </el-table>
  859. </div>
  860. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  861. <el-button type="primary" @click="actionModal2">保存</el-button>
  862. <el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
  863. </el-footer>
  864. </el-dialog>
  865. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  866. <!-- 上传文件的modal -->
  867. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getDataList" v-drag></qcFAIUploadFile>
  868. <!-- 上传文件的modal -->
  869. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  870. <!-- 子明细导入 -->
  871. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  872. </div>
  873. </template>
  874. <script>
  875. import {
  876. qcIPQCInspectionSearch, // 查询IPQC的检验记录
  877. ipqcDetailSearch, // 查询IPQC的检验明细
  878. inspectorSearch, // 查询检验员
  879. ipqcRecordDelete, // 删除检验记录
  880. saveIPQCDetailedRecord, // 新增明细信息
  881. saveIPQCSubmitResult, // 审核
  882. saveIPQCSubDetailed, // 新增子明细信息
  883. selectIPQCSubDetailedRecord, // 子明细记录信息查询
  884. checkIPQCIsSubmit, // 检查是否已提交
  885. getOperationList, // 查询工序列表
  886. getResourceList, // 查询机台列表
  887. getPartList, // 查询物料列表
  888. saveOsInspection, // 新增检验记录
  889. queryController, // 检查动控
  890. queryTemplateList, // 获取检验模板列表
  891. getSpecialOperationList, // 获取特殊工序列表
  892. inspectionTypeSearch, // 搜索所有检验类型
  893. disposalMeasuresSearch, // 获取处置措施列表
  894. getRollNo, // 模糊查询标签号
  895. rollNoEnter, // 标签号回车事件
  896. queryPartList, // 查询物料集合
  897. umSearch, // 查询单位列表
  898. getSiteAndBuByUserName,
  899. searchSeqInfo, // 派工单号查询
  900. actionIPQCInspection, // 开始检验
  901. dataAcquisition, // 数据采集
  902. getResponsibleOperatorList, // 获取责任人列表
  903. getIPQCItemObjectList, // 查询项目设备
  904. } from "@/api/qc/qc.js"
  905. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  906. import Chooselist from '@/views/modules/common/Chooselist_eam'
  907. import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'
  908. import {
  909. deleteObjectFile,
  910. getUserRoleList, // 获取用户角色列表
  911. getOperatorList
  912. } from '@/api/eam/eam.js'
  913. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  914. import qcFAIUploadFile from "./qc_FAI_upload_file"
  915. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  916. import subDetailUpload from "./sub_detail_upload";
  917. /*上传文件的組件*/
  918. export default {
  919. components: {
  920. Chooselist,
  921. qcFAIUploadFile,
  922. comQcItemImageUploadFile,
  923. subDetailUpload
  924. },
  925. watch: {
  926. detailList: {
  927. deep: true,
  928. handler: function (newV, oldV) {
  929. let num = 0
  930. for (let i = 0; i < this.detailList.length; i++) {
  931. if (this.detailList[i].itemResult === 'N') {
  932. num++
  933. }
  934. }
  935. this.detailData.unqualifiedQty = num
  936. }
  937. },
  938. },
  939. data () {
  940. return {
  941. loadFlag: false,
  942. inspectionNo: '',
  943. fileFlag: false,
  944. fileContentList: [],
  945. // 是否收藏
  946. favorite: false,
  947. // 导出 start
  948. exportData: [],
  949. exportName: "IPQC检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  950. exportHeader: ["IPQC检验录入"],
  951. exportFooter: [],
  952. exportList: [],
  953. // 导出 end
  954. checkCompletedData:{
  955. inspectionNo: ''
  956. },
  957. submitData:{
  958. site: '',
  959. inspectionNo: '',
  960. submit_flag: '',
  961. inspectionResult: '',
  962. submitList: [],
  963. },
  964. tagNo:'',
  965. searchData: {
  966. site: '',
  967. userName: this.$store.state.user.name,
  968. inspectionNo: '',
  969. state: '',
  970. inspectionResult: '',
  971. orderNo: '',
  972. operationDesc: '',
  973. buDesc: '',
  974. startDate: '',
  975. endDate: '',
  976. startDate2: '',
  977. endDate2: '',
  978. inspectionTypeNo: '',
  979. partNo: '',
  980. partDesc: '',
  981. cinvSourceCode: '',
  982. sku: '',
  983. disposalMeasures: '',
  984. page: 1,
  985. limit: 10,
  986. seqNo: '',
  987. states: ['未开始','待检验'],
  988. },
  989. pageIndex: 1,
  990. pageSize: 20,
  991. totalPage: 0,
  992. height: 200,
  993. dataList: [],
  994. dataListSelections: [],
  995. modalData: {
  996. flag:'',
  997. site: '',
  998. bu: '',
  999. inspectionNo:'',
  1000. partNo: '',
  1001. partDesc: '',
  1002. inspectionTypeNo:'',
  1003. inspectionTypeName:'',
  1004. inspectorNo:'',
  1005. inspectorName:'',
  1006. submit_flag:'',
  1007. orderNo: '',
  1008. operationDesc: '',
  1009. operationNo: '',
  1010. resourceId: '',
  1011. resourceDesc: '',
  1012. rollQty: '',
  1013. seqNo: '',
  1014. batchRollNo: '',
  1015. spec: '',
  1016. sku: '',
  1017. cinvSourceCode: '',
  1018. qtyrequired: '',
  1019. lotsize:'',
  1020. specialRequirements: '',
  1021. templateId: '',
  1022. templateName: '',
  1023. specialTaskFlag: '',
  1024. workCenterNo: '',
  1025. rollNo: '',
  1026. umId: '',
  1027. umName: '',
  1028. sjzs: ''
  1029. },
  1030. // 展示列集
  1031. columnList1: [
  1032. {
  1033. userId: this.$store.state.user.name,
  1034. functionId: 301014,
  1035. serialNumber: '301014Table1BuDesc',
  1036. tableId: "301014Table1",
  1037. tableName: "IPQC检验记录表",
  1038. columnProp: 'buDesc',
  1039. headerAlign: "center",
  1040. align: "center",
  1041. columnLabel: 'BU',
  1042. columnHidden: false,
  1043. columnImage: false,
  1044. columnSortable: false,
  1045. sortLv: 0,
  1046. status: true,
  1047. fixed: '',
  1048. columnWidth: 100,
  1049. },
  1050. {
  1051. userId: this.$store.state.user.name,
  1052. functionId: 301014,
  1053. serialNumber: '301014Table1InspectionNo',
  1054. tableId: "301014Table1",
  1055. tableName: "IPQC检验记录表",
  1056. columnProp: 'inspectionNo',
  1057. headerAlign: "center",
  1058. align: "center",
  1059. columnLabel: '检验单号',
  1060. columnHidden: false,
  1061. columnImage: false,
  1062. columnSortable: false,
  1063. sortLv: 0,
  1064. status: true,
  1065. fixed: '',
  1066. columnWidth: 120,
  1067. },
  1068. {
  1069. userId: this.$store.state.user.name,
  1070. functionId: 301014,
  1071. serialNumber: '301014Table1BatchRollNo',
  1072. tableId: "301014Table1",
  1073. tableName: "IPQC检验记录表",
  1074. columnProp: 'batchRollNo',
  1075. headerAlign: "center",
  1076. align: "center",
  1077. columnLabel: '老卷号',
  1078. columnHidden: false,
  1079. columnImage: false,
  1080. columnSortable: false,
  1081. sortLv: 0,
  1082. status: true,
  1083. fixed: '',
  1084. columnWidth: 100,
  1085. },
  1086. {
  1087. userId: this.$store.state.user.name,
  1088. functionId: 301014,
  1089. serialNumber: '301014Table1RollNo',
  1090. tableId: "301014Table1",
  1091. tableName: "IPQC检验记录表",
  1092. columnProp: 'rollNo',
  1093. headerAlign: "center",
  1094. align: "center",
  1095. columnLabel: '标签条码',
  1096. columnHidden: false,
  1097. columnImage: false,
  1098. columnSortable: false,
  1099. sortLv: 0,
  1100. status: true,
  1101. fixed: '',
  1102. columnWidth: 100,
  1103. },
  1104. {
  1105. userId: this.$store.state.user.name,
  1106. functionId: 301014,
  1107. serialNumber: '301014Table1InspectionResult',
  1108. tableId: "301014Table1",
  1109. tableName: "IPQC检验记录表",
  1110. columnProp: 'inspectionResult',
  1111. headerAlign: "center",
  1112. align: "center",
  1113. columnLabel: '检验结论',
  1114. columnHidden: false,
  1115. columnImage: false,
  1116. columnSortable: false,
  1117. sortLv: 0,
  1118. status: true,
  1119. fixed: '',
  1120. columnWidth: 80,
  1121. },
  1122. {
  1123. userId: this.$store.state.user.name,
  1124. functionId: 301014,
  1125. serialNumber: '301014Table1DisposalMeasures',
  1126. tableId: "301014Table1",
  1127. tableName: "IPQC检验记录表",
  1128. columnProp: 'disposalMeasures',
  1129. headerAlign: "center",
  1130. align: "center",
  1131. columnLabel: '处置措施',
  1132. columnHidden: false,
  1133. columnImage: false,
  1134. columnSortable: false,
  1135. sortLv: 0,
  1136. status: true,
  1137. fixed: '',
  1138. columnWidth: 100,
  1139. },
  1140. {
  1141. userId: this.$store.state.user.name,
  1142. functionId: 301014,
  1143. serialNumber: '301014Table1InspectionTypeNo',
  1144. tableId: "301014Table1",
  1145. tableName: "IPQC检验记录表",
  1146. columnProp: 'inspectionTypeNo',
  1147. headerAlign: "center",
  1148. align: "center",
  1149. columnLabel: '检验类型',
  1150. columnHidden: false,
  1151. columnImage: false,
  1152. columnSortable: false,
  1153. sortLv: 0,
  1154. status: true,
  1155. fixed: '',
  1156. columnWidth: 80,
  1157. },
  1158. {
  1159. userId: this.$store.state.user.name,
  1160. functionId: 301014,
  1161. serialNumber: '301014Table1TaskDate',
  1162. tableId: "301014Table1",
  1163. tableName: "IPQC检验记录表",
  1164. columnProp: 'taskDate',
  1165. headerAlign: "center",
  1166. align: "center",
  1167. columnLabel: '送检日期',
  1168. columnHidden: false,
  1169. columnImage: false,
  1170. columnSortable: false,
  1171. sortLv: 0,
  1172. status: true,
  1173. fixed: '',
  1174. columnWidth: 120,
  1175. },
  1176. {
  1177. userId: this.$store.state.user.name,
  1178. functionId: 301014,
  1179. serialNumber: '301014Table1InspectionCycle',
  1180. tableId: "301014Table1",
  1181. tableName: "IPQC检验记录表",
  1182. columnProp: 'inspectionCycle',
  1183. headerAlign: "center",
  1184. align: "right",
  1185. columnLabel: '检验周期(h)',
  1186. columnHidden: false,
  1187. columnImage: false,
  1188. columnSortable: false,
  1189. sortLv: 0,
  1190. status: true,
  1191. fixed: '',
  1192. columnWidth: 80,
  1193. },
  1194. {
  1195. userId: this.$store.state.user.name,
  1196. functionId: 301014,
  1197. serialNumber: '301014Table1OrderNo',
  1198. tableId: "301014Table1",
  1199. tableName: "IPQC检验记录表",
  1200. columnProp: 'orderNo',
  1201. headerAlign: "center",
  1202. align: "center",
  1203. columnLabel: '工单号',
  1204. columnHidden: false,
  1205. columnImage: false,
  1206. columnSortable: false,
  1207. sortLv: 0,
  1208. status: true,
  1209. fixed: '',
  1210. columnWidth: 120,
  1211. },
  1212. {
  1213. userId: this.$store.state.user.name,
  1214. functionId: 301014,
  1215. serialNumber: '301014Table1SeqNo',
  1216. tableId: "301014Table1",
  1217. tableName: "IPQC检验记录表",
  1218. columnProp: 'seqNo',
  1219. headerAlign: "center",
  1220. align: "center",
  1221. columnLabel: '派工单号',
  1222. columnHidden: false,
  1223. columnImage: false,
  1224. columnSortable: false,
  1225. sortLv: 0,
  1226. status: true,
  1227. fixed: '',
  1228. columnWidth: 150,
  1229. },
  1230. {
  1231. userId: this.$store.state.user.name,
  1232. functionId: 301014,
  1233. serialNumber: '301014Table1OperationDesc',
  1234. tableId: "301014Table1",
  1235. tableName: "IPQC检验记录表",
  1236. columnProp: 'operationDesc',
  1237. headerAlign: "center",
  1238. align: "center",
  1239. columnLabel: '工序',
  1240. columnHidden: false,
  1241. columnImage: false,
  1242. columnSortable: false,
  1243. sortLv: 0,
  1244. status: true,
  1245. fixed: '',
  1246. columnWidth: 100,
  1247. },
  1248. {
  1249. userId: this.$store.state.user.name,
  1250. functionId: 301014,
  1251. serialNumber: '301014Table1ResourceDesc',
  1252. tableId: "301014Table1",
  1253. tableName: "IPQC检验记录表",
  1254. columnProp: 'resourceDesc',
  1255. headerAlign: "center",
  1256. align: "center",
  1257. columnLabel: '机台',
  1258. columnHidden: false,
  1259. columnImage: false,
  1260. columnSortable: false,
  1261. sortLv: 0,
  1262. status: true,
  1263. fixed: '',
  1264. columnWidth: 100,
  1265. },
  1266. {
  1267. userId: this.$store.state.user.name,
  1268. functionId: 301014,
  1269. serialNumber: '301014Table1PartNo',
  1270. tableId: "301014Table1",
  1271. tableName: "IPQC检验记录表",
  1272. columnProp: 'partNo',
  1273. headerAlign: "center",
  1274. align: "center",
  1275. columnLabel: '物料编码',
  1276. columnHidden: false,
  1277. columnImage: false,
  1278. columnSortable: false,
  1279. sortLv: 0,
  1280. status: true,
  1281. fixed: '',
  1282. columnWidth: 100,
  1283. },
  1284. {
  1285. userId: this.$store.state.user.name,
  1286. functionId: 301014,
  1287. serialNumber: '301014Table1Spec',
  1288. tableId: "301014Table1",
  1289. tableName: "IPQC检验记录表",
  1290. columnProp: 'spec',
  1291. headerAlign: "center",
  1292. align: "center",
  1293. columnLabel: '物料类别',
  1294. columnHidden: false,
  1295. columnImage: false,
  1296. columnSortable: false,
  1297. sortLv: 0,
  1298. status: true,
  1299. fixed: '',
  1300. columnWidth: 150,
  1301. },
  1302. {
  1303. userId: this.$store.state.user.name,
  1304. functionId: 301014,
  1305. serialNumber: '301014Table1cinvSourceCode',
  1306. tableId: "301014Table1",
  1307. tableName: "IPQC检验记录表",
  1308. columnProp: 'cinvSourceCode',
  1309. headerAlign: "center",
  1310. align: "center",
  1311. columnLabel: 'PN',
  1312. columnHidden: false,
  1313. columnImage: false,
  1314. columnSortable: false,
  1315. sortLv: 0,
  1316. status: true,
  1317. fixed: '',
  1318. columnWidth: 100,
  1319. },
  1320. {
  1321. userId: this.$store.state.user.name,
  1322. functionId: 301014,
  1323. serialNumber: '301014Table1Sku',
  1324. tableId: "301014Table1",
  1325. tableName: "IPQC检验记录表",
  1326. columnProp: 'sku',
  1327. headerAlign: "center",
  1328. align: "center",
  1329. columnLabel: 'SKU',
  1330. columnHidden: false,
  1331. columnImage: false,
  1332. columnSortable: false,
  1333. sortLv: 0,
  1334. status: true,
  1335. fixed: '',
  1336. columnWidth: 100,
  1337. },
  1338. {
  1339. userId: this.$store.state.user.name,
  1340. functionId: 301014,
  1341. serialNumber: '301014Table1PartDesc',
  1342. tableId: "301014Table1",
  1343. tableName: "IPQC检验记录表",
  1344. columnProp: 'partDesc',
  1345. headerAlign: "center",
  1346. align: "center",
  1347. columnLabel: '物料名称',
  1348. columnHidden: false,
  1349. columnImage: false,
  1350. columnSortable: false,
  1351. sortLv: 0,
  1352. status: true,
  1353. fixed: '',
  1354. columnWidth: 150,
  1355. },
  1356. {
  1357. userId: this.$store.state.user.name,
  1358. functionId: 301014,
  1359. serialNumber: '301014Table1RollQty',
  1360. tableId: "301014Table1",
  1361. tableName: "IPQC检验记录表",
  1362. columnProp: 'rollQty',
  1363. headerAlign: "center",
  1364. align: "right",
  1365. columnLabel: '送检数量',
  1366. columnHidden: false,
  1367. columnImage: false,
  1368. columnSortable: false,
  1369. sortLv: 0,
  1370. status: true,
  1371. fixed: '',
  1372. columnWidth: 80,
  1373. },
  1374. {
  1375. userId: this.$store.state.user.name,
  1376. functionId: 301014,
  1377. serialNumber: '301014Table1SamplingQty',
  1378. tableId: "301014Table1",
  1379. tableName: "IPQC检验记录表",
  1380. columnProp: 'samplingQty',
  1381. headerAlign: "center",
  1382. align: "right",
  1383. columnLabel: '抽样数量',
  1384. columnHidden: false,
  1385. columnImage: false,
  1386. columnSortable: false,
  1387. sortLv: 0,
  1388. status: true,
  1389. fixed: '',
  1390. columnWidth: 80,
  1391. },
  1392. {
  1393. userId: this.$store.state.user.name,
  1394. functionId: 301014,
  1395. serialNumber: '301014Table1UmName',
  1396. tableId: "301014Table1",
  1397. tableName: "IPQC检验记录表",
  1398. columnProp: 'umName',
  1399. headerAlign: "center",
  1400. align: "center",
  1401. columnLabel: '单位',
  1402. columnHidden: false,
  1403. columnImage: false,
  1404. columnSortable: false,
  1405. sortLv: 0,
  1406. status: true,
  1407. fixed: '',
  1408. columnWidth: 80,
  1409. },
  1410. {
  1411. userId: this.$store.state.user.name,
  1412. functionId: 301014,
  1413. serialNumber: '301014Table1InspectionRemark',
  1414. tableId: "301014Table1",
  1415. tableName: "IPQC检验记录表",
  1416. columnProp: 'inspectionRemark',
  1417. headerAlign: "center",
  1418. align: "center",
  1419. columnLabel: '质检备注',
  1420. columnHidden: false,
  1421. columnImage: false,
  1422. columnSortable: false,
  1423. sortLv: 0,
  1424. status: true,
  1425. fixed: '',
  1426. columnWidth: 120,
  1427. },
  1428. {
  1429. userId: this.$store.state.user.name,
  1430. functionId: 301014,
  1431. serialNumber: '301014Table1DisposalRemark',
  1432. tableId: "301014Table1",
  1433. tableName: "IPQC检验记录表",
  1434. columnProp: 'disposalRemark',
  1435. headerAlign: "center",
  1436. align: "center",
  1437. columnLabel: '处置说明',
  1438. columnHidden: false,
  1439. columnImage: false,
  1440. columnSortable: false,
  1441. sortLv: 0,
  1442. status: true,
  1443. fixed: '',
  1444. columnWidth: 120,
  1445. },
  1446. {
  1447. userId: this.$store.state.user.name,
  1448. functionId: 301014,
  1449. serialNumber: '301014Table1ActionDate',
  1450. tableId: "301014Table1",
  1451. tableName: "IPQC检验记录表",
  1452. columnProp: 'actionDate',
  1453. headerAlign: "center",
  1454. align: "center",
  1455. columnLabel: '开始检验时间',
  1456. columnHidden: false,
  1457. columnImage: false,
  1458. columnSortable: false,
  1459. sortLv: 0,
  1460. status: true,
  1461. fixed: '',
  1462. columnWidth: 150,
  1463. },
  1464. {
  1465. userId: this.$store.state.user.name,
  1466. functionId: 301014,
  1467. serialNumber: '301014Table1InspectorDate',
  1468. tableId: "301014Table1",
  1469. tableName: "IPQC检验记录表",
  1470. columnProp: 'inspectorDate',
  1471. headerAlign: "center",
  1472. align: "center",
  1473. columnLabel: '检验时间',
  1474. columnHidden: false,
  1475. columnImage: false,
  1476. columnSortable: false,
  1477. sortLv: 0,
  1478. status: true,
  1479. fixed: '',
  1480. columnWidth: 120,
  1481. },
  1482. {
  1483. userId: this.$store.state.user.name,
  1484. functionId: 301014,
  1485. serialNumber: '301014Table1InspectorName',
  1486. tableId: "301014Table1",
  1487. tableName: "IPQC检验记录表",
  1488. columnProp: 'inspectorName',
  1489. headerAlign: "center",
  1490. align: "center",
  1491. columnLabel: '质检员',
  1492. columnHidden: false,
  1493. columnImage: false,
  1494. columnSortable: false,
  1495. sortLv: 0,
  1496. status: true,
  1497. fixed: '',
  1498. columnWidth: 100,
  1499. },
  1500. {
  1501. userId: this.$store.state.user.name,
  1502. functionId: 301014,
  1503. serialNumber: '301014Table1SpecialRequirements',
  1504. tableId: "301014Table1",
  1505. tableName: "IPQC检验记录表",
  1506. columnProp: 'specialRequirements',
  1507. headerAlign: "center",
  1508. align: "center",
  1509. columnLabel: '特殊要求',
  1510. columnHidden: false,
  1511. columnImage: false,
  1512. columnSortable: false,
  1513. sortLv: 0,
  1514. status: true,
  1515. fixed: '',
  1516. columnWidth: 120,
  1517. },
  1518. ],
  1519. //项目清单
  1520. detailData: {
  1521. site: '',
  1522. buNo: '',
  1523. inspectionNo:'',
  1524. partNo:'',
  1525. partDesc:'',
  1526. rollQty:'',
  1527. samplingQty: '',
  1528. unqualifiedQty: 0,
  1529. unqualifiedQuantity:'',
  1530. disposalMeasures:'',
  1531. disposalRemark: '',
  1532. inspectionResult: '',
  1533. inspectorNo: '',
  1534. inspectorName: '',
  1535. inspectionRemark: '',
  1536. submitFlag: '',
  1537. cinvSourceCode: '',
  1538. sku: '',
  1539. spec: '',
  1540. umId: '',
  1541. umName: '',
  1542. operator: '',
  1543. operatorName: '',
  1544. responsiblePerson: '',
  1545. responsiblePersonName: ''
  1546. },
  1547. detailInformationFlag: false,
  1548. detailList: [],
  1549. saveInformationData: {
  1550. site: '',
  1551. buNo: '',
  1552. inspectionNo:'',
  1553. disposalMeasures: '',
  1554. disposalRemark: '',
  1555. inspectorNo: '',
  1556. inspectionRemark: '',
  1557. samplingQty: '',
  1558. rollQty: '',
  1559. itemList:[],
  1560. unqualifiedQty: '',
  1561. partNo: '',
  1562. partDesc: '',
  1563. operator: '',
  1564. operatorName: '',
  1565. responsiblePerson: '',
  1566. responsiblePersonName: '',
  1567. subDetailList: []
  1568. },
  1569. detailColumnList: [
  1570. {
  1571. userId: this.$store.state.user.name,
  1572. functionId: 301014,
  1573. serialNumber: '301014Table2ItemNo',
  1574. tableId: "301014Table2",
  1575. tableName: "检验单明细表",
  1576. columnProp: 'itemNo',
  1577. headerAlign: "center",
  1578. align: "center",
  1579. columnLabel: '检验项目编码',
  1580. columnHidden: false,
  1581. columnImage: false,
  1582. columnSortable: false,
  1583. sortLv: 0,
  1584. status: true,
  1585. fixed: '',
  1586. columnWidth: 120,
  1587. },
  1588. {
  1589. userId: this.$store.state.user.name,
  1590. functionId: 301014,
  1591. serialNumber: '301014Table2ItemDesc',
  1592. tableId: "301014Table2",
  1593. tableName: "检验单明细表",
  1594. columnProp: 'itemDesc',
  1595. headerAlign: "center",
  1596. align: "center",
  1597. columnLabel: '检验项目',
  1598. columnHidden: false,
  1599. columnImage: false,
  1600. columnSortable: false,
  1601. sortLv: 0,
  1602. status: true,
  1603. fixed: '',
  1604. columnWidth: 120,
  1605. },
  1606. {
  1607. userId: this.$store.state.user.name,
  1608. functionId: 301014,
  1609. serialNumber: '301014Table2SamplingLevelDesc',
  1610. tableId: "301014Table2",
  1611. tableName: "检验单明细表",
  1612. columnProp: 'samplingLevelDesc',
  1613. headerAlign: "center",
  1614. align: "center",
  1615. columnLabel: '检验水平',
  1616. columnHidden: false,
  1617. columnImage: false,
  1618. columnSortable: false,
  1619. sortLv: 0,
  1620. status: true,
  1621. fixed: '',
  1622. columnWidth: 120,
  1623. },
  1624. {
  1625. userId: this.$store.state.user.name,
  1626. functionId: 301014,
  1627. serialNumber: '301014Table2SamplingProgrammeDesc',
  1628. tableId: "301014Table2",
  1629. tableName: "检验单明细表",
  1630. columnProp: 'samplingProgrammeDesc',
  1631. headerAlign: "center",
  1632. align: "center",
  1633. columnLabel: '检验方案',
  1634. columnHidden: false,
  1635. columnImage: false,
  1636. columnSortable: false,
  1637. sortLv: 0,
  1638. status: true,
  1639. fixed: '',
  1640. columnWidth: 120,
  1641. },
  1642. {
  1643. userId: this.$store.state.user.name,
  1644. functionId: 301014,
  1645. serialNumber: '301014Table2MethodName',
  1646. tableId: "301014Table2",
  1647. tableName: "检验单明细表",
  1648. columnProp: 'methodName',
  1649. headerAlign: "center",
  1650. align: "center",
  1651. columnLabel: '检验方法',
  1652. columnHidden: false,
  1653. columnImage: false,
  1654. columnSortable: false,
  1655. sortLv: 0,
  1656. status: true,
  1657. fixed: '',
  1658. columnWidth: 120,
  1659. },
  1660. {
  1661. userId: this.$store.state.user.name,
  1662. functionId: 301014,
  1663. serialNumber: '301014Table2MethodRemark',
  1664. tableId: "301014Table2",
  1665. tableName: "检验单明细表",
  1666. columnProp: 'methodRemark',
  1667. headerAlign: "center",
  1668. align: "center",
  1669. columnLabel: '检验方法说明',
  1670. columnHidden: false,
  1671. columnImage: false,
  1672. columnSortable: false,
  1673. sortLv: 0,
  1674. status: true,
  1675. fixed: '',
  1676. columnWidth: 150,
  1677. },
  1678. {
  1679. userId: this.$store.state.user.name,
  1680. functionId: 301014,
  1681. serialNumber: '301014Table2ObjectDesc',
  1682. tableId: "301014Table2",
  1683. tableName: "检验单明细表",
  1684. columnProp: 'objectDesc',
  1685. headerAlign: "center",
  1686. align: "center",
  1687. columnLabel: '检测仪器',
  1688. columnHidden: false,
  1689. columnImage: false,
  1690. columnSortable: false,
  1691. sortLv: 0,
  1692. status: true,
  1693. fixed: '',
  1694. columnWidth: 120,
  1695. },
  1696. {
  1697. userId: this.$store.state.user.name,
  1698. functionId: 301014,
  1699. serialNumber: '301014Table2Aql',
  1700. tableId: "301014Table2",
  1701. tableName: "检验单明细表",
  1702. columnProp: 'aql',
  1703. headerAlign: "center",
  1704. align: "center",
  1705. columnLabel: 'AQL',
  1706. columnHidden: false,
  1707. columnImage: false,
  1708. columnSortable: false,
  1709. sortLv: 0,
  1710. status: true,
  1711. fixed: '',
  1712. columnWidth: 80,
  1713. },
  1714. {
  1715. userId: this.$store.state.user.name,
  1716. functionId: 301014,
  1717. serialNumber: '301014Table2Ac',
  1718. tableId: "301014Table2",
  1719. tableName: "检验单明细表",
  1720. columnProp: 'ac',
  1721. headerAlign: "center",
  1722. align: "center",
  1723. columnLabel: 'AC',
  1724. columnHidden: false,
  1725. columnImage: false,
  1726. columnSortable: false,
  1727. sortLv: 0,
  1728. status: true,
  1729. fixed: '',
  1730. columnWidth: 80,
  1731. },
  1732. {
  1733. userId: this.$store.state.user.name,
  1734. functionId: 301014,
  1735. serialNumber: '301014Table2Re',
  1736. tableId: "301014Table2",
  1737. tableName: "检验单明细表",
  1738. columnProp: 're',
  1739. headerAlign: "center",
  1740. align: "center",
  1741. columnLabel: 'RE',
  1742. columnHidden: false,
  1743. columnImage: false,
  1744. columnSortable: false,
  1745. sortLv: 0,
  1746. status: true,
  1747. fixed: '',
  1748. columnWidth: 80,
  1749. },
  1750. {
  1751. userId: this.$store.state.user.name,
  1752. functionId: 301014,
  1753. serialNumber: '301014Table2DefaultValue',
  1754. tableId: "301014Table2",
  1755. tableName: "检验单明细表",
  1756. columnProp: 'defaultValue',
  1757. headerAlign: "center",
  1758. align: "center",
  1759. columnLabel: '标准值',
  1760. columnHidden: false,
  1761. columnImage: false,
  1762. columnSortable: false,
  1763. sortLv: 0,
  1764. status: true,
  1765. fixed: '',
  1766. columnWidth: 100,
  1767. },
  1768. {
  1769. userId: this.$store.state.user.name,
  1770. functionId: 301014,
  1771. serialNumber: '301014Table2MaxValue',
  1772. tableId: "301014Table2",
  1773. tableName: "检验单明细表",
  1774. columnProp: 'maxValue',
  1775. headerAlign: "center",
  1776. align: "center",
  1777. columnLabel: '上限值',
  1778. columnHidden: false,
  1779. columnImage: false,
  1780. columnSortable: false,
  1781. sortLv: 0,
  1782. status: true,
  1783. fixed: '',
  1784. columnWidth: 100,
  1785. },
  1786. {
  1787. userId: this.$store.state.user.name,
  1788. functionId: 301014,
  1789. serialNumber: '301014Table2MinValue',
  1790. tableId: "301014Table2",
  1791. tableName: "检验单明细表",
  1792. columnProp: 'minValue',
  1793. headerAlign: "center",
  1794. align: "center",
  1795. columnLabel: '下限值',
  1796. columnHidden: false,
  1797. columnImage: false,
  1798. columnSortable: false,
  1799. sortLv: 0,
  1800. status: true,
  1801. fixed: '',
  1802. columnWidth: 100,
  1803. },
  1804. {
  1805. userId: this.$store.state.user.name,
  1806. functionId: 301014,
  1807. serialNumber: '301014Table2ValueType',
  1808. tableId: "301014Table2",
  1809. tableName: "检验单明细表",
  1810. columnProp: 'valueType',
  1811. headerAlign: "center",
  1812. align: "center",
  1813. columnLabel: '检测值类型',
  1814. columnHidden: false,
  1815. columnImage: false,
  1816. columnSortable: false,
  1817. sortLv: 0,
  1818. status: true,
  1819. fixed: '',
  1820. columnWidth: 80,
  1821. },
  1822. ],
  1823. fileColumnList: [
  1824. {
  1825. columnProp: 'fileName',
  1826. headerAlign: "center",
  1827. align: "center",
  1828. columnLabel: '文件名称',
  1829. columnHidden: false,
  1830. columnImage: false,
  1831. columnSortable: false,
  1832. sortLv: 0,
  1833. status: true,
  1834. fixed: '',
  1835. },
  1836. {
  1837. columnProp: 'createdBy',
  1838. headerAlign: "center",
  1839. align: 'center',
  1840. columnLabel: '上传人',
  1841. columnHidden: false,
  1842. columnImage: false,
  1843. columnSortable: true,
  1844. sortLv: 0,
  1845. status: true,
  1846. fixed: false
  1847. },
  1848. {
  1849. columnProp: 'createDate',
  1850. headerAlign: "center",
  1851. align: 'center',
  1852. columnLabel: '上传时间',
  1853. columnHidden: false,
  1854. columnImage: false,
  1855. columnSortable: true,
  1856. sortLv: 0,
  1857. status: true,
  1858. fixed: false
  1859. },
  1860. {
  1861. columnProp: 'orderRef3',
  1862. headerAlign: "center",
  1863. align: 'center',
  1864. columnLabel: '备注',
  1865. columnHidden: false,
  1866. columnImage: false,
  1867. columnSortable: true,
  1868. sortLv: 0,
  1869. status: true,
  1870. fixed: false
  1871. },
  1872. ],
  1873. // 派工单号
  1874. seqInfoList: [],
  1875. seqDetailFlag: false,
  1876. seqDetailData: {
  1877. orderNo: '',
  1878. seqNo: '',
  1879. sku: '',
  1880. cinvSourceCode:'',
  1881. partNo: '',
  1882. partDesc: '',
  1883. operationDesc: '',
  1884. qtyrequired: '',
  1885. lotsize: '',
  1886. status: '下达'
  1887. },
  1888. seqDetailColumnList: [
  1889. {
  1890. userId: this.$store.state.user.name,
  1891. functionId: 301014,
  1892. serialNumber: '301014Table3OrderNo',
  1893. tableId: "301014Table3",
  1894. tableName: "派工单号表",
  1895. fixed: '',
  1896. columnWidth: 80,
  1897. columnProp: 'orderNo',
  1898. headerAlign: "center",
  1899. align: "center",
  1900. columnLabel: '工单号',
  1901. columnHidden: false,
  1902. columnImage: false,
  1903. columnSortable: false,
  1904. sortLv: 0,
  1905. status: true,
  1906. },
  1907. {
  1908. userId: this.$store.state.user.name,
  1909. functionId: 301014,
  1910. serialNumber: '301014Table3SeqNo',
  1911. tableId: "301014Table3",
  1912. tableName: "派工单号表",
  1913. fixed: '',
  1914. columnWidth: 80,
  1915. columnProp: 'seqNo',
  1916. headerAlign: "center",
  1917. align: "center",
  1918. columnLabel: '派工单号',
  1919. columnHidden: false,
  1920. columnImage: false,
  1921. columnSortable: false,
  1922. sortLv: 0,
  1923. status: true,
  1924. },
  1925. {
  1926. userId: this.$store.state.user.name,
  1927. functionId: 301014,
  1928. serialNumber: '301014Table3Sku',
  1929. tableId: "301014Table3",
  1930. tableName: "派工单号表",
  1931. fixed: '',
  1932. columnWidth: 80,
  1933. columnProp: 'sku',
  1934. headerAlign: "center",
  1935. align: "center",
  1936. columnLabel: 'SKU',
  1937. columnHidden: false,
  1938. columnImage: false,
  1939. columnSortable: false,
  1940. sortLv: 0,
  1941. status: true,
  1942. },
  1943. {
  1944. userId: this.$store.state.user.name,
  1945. functionId: 301014,
  1946. serialNumber: '301014Table3PartNo',
  1947. tableId: "301014Table3",
  1948. tableName: "派工单号表",
  1949. fixed: '',
  1950. columnWidth: 80,
  1951. columnProp: 'partNo',
  1952. headerAlign: "center",
  1953. align: "center",
  1954. columnLabel: '物料编码',
  1955. columnHidden: false,
  1956. columnImage: false,
  1957. columnSortable: false,
  1958. sortLv: 0,
  1959. status: true,
  1960. },
  1961. {
  1962. userId: this.$store.state.user.name,
  1963. functionId: 301014,
  1964. serialNumber: '301014Table3PartDesc',
  1965. tableId: "301014Table3",
  1966. tableName: "派工单号表",
  1967. fixed: '',
  1968. columnWidth: 80,
  1969. columnProp: 'partDesc',
  1970. headerAlign: "center",
  1971. align: "center",
  1972. columnLabel: '物料名称',
  1973. columnHidden: false,
  1974. columnImage: false,
  1975. columnSortable: false,
  1976. sortLv: 0,
  1977. status: true,
  1978. },
  1979. {
  1980. userId: this.$store.state.user.name,
  1981. functionId: 301014,
  1982. serialNumber: '301014Table3Lotsize',
  1983. tableId: "301014Table3",
  1984. tableName: "派工单号表",
  1985. fixed: '',
  1986. columnWidth: 80,
  1987. columnProp: 'lotsize',
  1988. headerAlign: "center",
  1989. align: "center",
  1990. columnLabel: '工单数量',
  1991. columnHidden: false,
  1992. columnImage: false,
  1993. columnSortable: false,
  1994. sortLv: 0,
  1995. status: true,
  1996. },
  1997. {
  1998. userId: this.$store.state.user.name,
  1999. functionId: 301014,
  2000. serialNumber: '301014Table3Qtyrequired',
  2001. tableId: "301014Table3",
  2002. tableName: "派工单号表",
  2003. fixed: '',
  2004. columnWidth: 80,
  2005. columnProp: 'qtyrequired',
  2006. headerAlign: "center",
  2007. align: "center",
  2008. columnLabel: '派工数量',
  2009. columnHidden: false,
  2010. columnImage: false,
  2011. columnSortable: false,
  2012. sortLv: 0,
  2013. status: true,
  2014. },
  2015. {
  2016. userId: this.$store.state.user.name,
  2017. functionId: 301014,
  2018. serialNumber: '301014Table3OperationDesc',
  2019. tableId: "301014Table3",
  2020. tableName: "派工单号表",
  2021. fixed: '',
  2022. columnWidth: 80,
  2023. columnProp: 'operationDesc',
  2024. headerAlign: "center",
  2025. align: "center",
  2026. columnLabel: '工序',
  2027. columnHidden: false,
  2028. columnImage: false,
  2029. columnSortable: false,
  2030. sortLv: 0,
  2031. status: true,
  2032. }
  2033. ],
  2034. // 子明细数据对象
  2035. tableData: [],
  2036. checkedDetail: [],
  2037. subDetailFlag: false,
  2038. subDetailData: {
  2039. site: '',
  2040. buNo: '',
  2041. inspectionNo: '',
  2042. itemNo: '',
  2043. itemDesc: '',
  2044. defaultValue: '',
  2045. maxValue: '',
  2046. minValue: '',
  2047. valueTypeDb: '',
  2048. subDetailValues:[]
  2049. },
  2050. options: [],
  2051. modalDisableFlag: false,
  2052. modalFlag: false,
  2053. operationList: [],
  2054. resourceList: [],
  2055. partList: [],
  2056. IPQCSelections: [],
  2057. rules: {
  2058. seqNoType: [
  2059. {
  2060. required: true,
  2061. message: ' ',
  2062. trigger: 'change'
  2063. }
  2064. ],
  2065. orderNoType: [
  2066. {
  2067. required: true,
  2068. message: ' ',
  2069. trigger: 'change'
  2070. }
  2071. ],
  2072. operationDescType: [
  2073. {
  2074. required: true,
  2075. message: ' ',
  2076. trigger: 'change'
  2077. }
  2078. ],
  2079. resourceIdType: [
  2080. {
  2081. required: true,
  2082. message: ' ',
  2083. trigger: 'change'
  2084. }
  2085. ],
  2086. rollQtyType: [
  2087. {
  2088. required: true,
  2089. message: ' ',
  2090. trigger: 'change'
  2091. }
  2092. ],
  2093. inspectionTypeNoType: [
  2094. {
  2095. required: true,
  2096. message: ' ',
  2097. trigger: 'change'
  2098. }
  2099. ],
  2100. partNoType: [
  2101. {
  2102. required: true,
  2103. message: ' ',
  2104. trigger: 'change'
  2105. }
  2106. ],
  2107. umIdType: [
  2108. {
  2109. required: true,
  2110. message: ' ',
  2111. trigger: 'change'
  2112. }
  2113. ],
  2114. templateId: [
  2115. {
  2116. required: true,
  2117. message: ' ',
  2118. trigger: 'change'
  2119. }
  2120. ],
  2121. bu:[
  2122. {
  2123. required: true,
  2124. message: ' ',
  2125. trigger: 'change'
  2126. }
  2127. ]
  2128. },
  2129. batchHandleAddModalFlag: false,
  2130. batchAddData: {
  2131. samplingLocation: '',
  2132. samplingLocationB: '',
  2133. samplingNumber: ''
  2134. },
  2135. controlData: {},
  2136. templateData: {
  2137. site: '',
  2138. bu: '',
  2139. templateId: '',
  2140. templateName: '',
  2141. inspectionTypeNo: '',
  2142. inspectionTypeName: ''
  2143. },
  2144. partData: {
  2145. site: '',
  2146. bu: '',
  2147. partNo: '',
  2148. partDesc: '',
  2149. sku: '',
  2150. cinvSourceCode: '',
  2151. },
  2152. templateList: [],
  2153. templateModelFlag: false,
  2154. templateDetailList: [
  2155. {
  2156. columnProp: 'templateId',
  2157. headerAlign: "center",
  2158. align: "center",
  2159. columnLabel: '模板编码',
  2160. columnHidden: false,
  2161. columnImage: false,
  2162. columnSortable: false,
  2163. sortLv: 0,
  2164. status: true,
  2165. fixed: '',
  2166. },
  2167. {
  2168. columnProp: 'templateName',
  2169. headerAlign: "center",
  2170. align: "center",
  2171. columnLabel: '模板名称',
  2172. columnHidden: false,
  2173. columnImage: false,
  2174. columnSortable: false,
  2175. sortLv: 0,
  2176. status: true,
  2177. fixed: '',
  2178. },
  2179. {
  2180. columnProp: 'inspectionTypeName',
  2181. headerAlign: "center",
  2182. align: "center",
  2183. columnLabel: '检验类型',
  2184. columnHidden: false,
  2185. columnImage: false,
  2186. columnSortable: false,
  2187. sortLv: 0,
  2188. status: true,
  2189. fixed: '',
  2190. },
  2191. ],
  2192. partDetailList: [
  2193. {
  2194. columnProp: 'partNo',
  2195. headerAlign: "center",
  2196. align: "center",
  2197. columnLabel: '物料编码',
  2198. columnHidden: false,
  2199. columnImage: false,
  2200. columnSortable: false,
  2201. sortLv: 0,
  2202. status: true,
  2203. fixed: '',
  2204. },
  2205. {
  2206. columnProp: 'partDesc',
  2207. headerAlign: "center",
  2208. align: "center",
  2209. columnLabel: '物料名称',
  2210. columnHidden: false,
  2211. columnImage: false,
  2212. columnSortable: false,
  2213. sortLv: 0,
  2214. status: true,
  2215. fixed: '',
  2216. },
  2217. {
  2218. columnProp: 'sku',
  2219. headerAlign: "center",
  2220. align: "center",
  2221. columnLabel: 'SKU',
  2222. columnHidden: false,
  2223. columnImage: false,
  2224. columnSortable: false,
  2225. sortLv: 0,
  2226. status: true,
  2227. fixed: '',
  2228. },
  2229. {
  2230. columnProp: 'cinvSourceCode',
  2231. headerAlign: "center",
  2232. align: "center",
  2233. columnLabel: 'PN',
  2234. columnHidden: false,
  2235. columnImage: false,
  2236. columnSortable: false,
  2237. sortLv: 0,
  2238. status: true,
  2239. fixed: '',
  2240. }
  2241. ],
  2242. checked: false,
  2243. typeOptions: [],
  2244. disposalMeasuresOptions: [],
  2245. timeout: null,
  2246. partModelFlag: false,
  2247. umList: [],
  2248. userBuList: [],
  2249. authSearch: false,
  2250. authSave: false,
  2251. authCheck: false,
  2252. authDelete: false,
  2253. authDetail: false,
  2254. authFile: false,
  2255. menuId: this.$route.meta.menuId,
  2256. roleList: [],
  2257. operatorList: [],
  2258. operatorData: {
  2259. flag: '',
  2260. site: '',
  2261. bu: '',
  2262. adminID: '',
  2263. adminName: '',
  2264. roleName: '',
  2265. roleId: '',
  2266. userName: this.$store.state.user.name
  2267. },
  2268. operatorModelFlag: false,
  2269. dataListSelections2: [],
  2270. operatorDetailList: [
  2271. {
  2272. columnProp: 'adminID',
  2273. headerAlign: "center",
  2274. align: "center",
  2275. columnLabel: '用户账号',
  2276. columnHidden: false,
  2277. columnImage: false,
  2278. columnSortable: false,
  2279. sortLv: 0,
  2280. status: true,
  2281. fixed: '',
  2282. },
  2283. {
  2284. columnProp: 'adminName',
  2285. headerAlign: "center",
  2286. align: "center",
  2287. columnLabel: '用户名称',
  2288. columnHidden: false,
  2289. columnImage: false,
  2290. columnSortable: false,
  2291. sortLv: 0,
  2292. status: true,
  2293. fixed: '',
  2294. },
  2295. {
  2296. columnProp: 'email',
  2297. headerAlign: "center",
  2298. align: "center",
  2299. columnLabel: '邮箱',
  2300. columnHidden: false,
  2301. columnImage: false,
  2302. columnSortable: false,
  2303. sortLv: 0,
  2304. status: true,
  2305. fixed: '',
  2306. },
  2307. {
  2308. columnProp: 'phone',
  2309. headerAlign: "center",
  2310. align: "center",
  2311. columnLabel: '手机号',
  2312. columnHidden: false,
  2313. columnImage: false,
  2314. columnSortable: false,
  2315. sortLv: 0,
  2316. status: true,
  2317. fixed: '',
  2318. },
  2319. ],
  2320. acquisitionList: [],
  2321. ItemObjectModelFlag: false,
  2322. itemObjectList: [],
  2323. itemObjectColumnList: [
  2324. {
  2325. columnProp: 'itemNo',
  2326. headerAlign: "center",
  2327. align: "center",
  2328. columnLabel: '项目编码',
  2329. columnHidden: false,
  2330. columnImage: false,
  2331. status: true,
  2332. columnWidth: 120,
  2333. },
  2334. {
  2335. columnProp: 'itemDesc',
  2336. headerAlign: "center",
  2337. align: "left",
  2338. columnLabel: '项目名称',
  2339. columnHidden: false,
  2340. columnImage: false,
  2341. status: true,
  2342. columnWidth: 200,
  2343. },
  2344. ],
  2345. actionData: {
  2346. site: '',
  2347. buNo: '',
  2348. inspectionNo: ''
  2349. }
  2350. }
  2351. },
  2352. mounted () {
  2353. this.$nextTick(() => {
  2354. this.height = window.innerHeight - 210
  2355. })
  2356. },
  2357. created () {
  2358. // 按钮控制
  2359. this.getButtonAuthData()
  2360. // 获取用户的 site 和 bu
  2361. this.getSiteAndBuByUserName()
  2362. // 收藏
  2363. this.favoriteIsOk()
  2364. // 检验类型
  2365. this.inspectionTypeSearch()
  2366. // 处置措施
  2367. this.disposalMeasuresSearch()
  2368. // 单位
  2369. this.umSearch()
  2370. // 查看 质量任务生成规则控制 动控是否开启
  2371. this.queryController()
  2372. // 动态列
  2373. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2374. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2375. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2376. if (!this.authSearch) {
  2377. // 获取数据列表
  2378. this.getDataList()
  2379. }
  2380. // 获取用户角色
  2381. this.getUserRoleList()
  2382. },
  2383. methods: {
  2384. // 数据采集
  2385. dataAcquisition () {
  2386. this.loadFlag = true
  2387. let tempDate = {
  2388. site: this.detailData.site,
  2389. buNo: this.detailData.buNo,
  2390. inspectionNo: this.detailData.inspectionNo,
  2391. flag: 'ipqc'
  2392. }
  2393. dataAcquisition(tempDate).then(({data}) => {
  2394. if (data.code === 0) {
  2395. // this.acquisitionList = data.rows
  2396. this.changeMyString(data.rows)
  2397. this.$message({
  2398. message: '数据采集成功',
  2399. type: 'success',
  2400. duration: 1500
  2401. })
  2402. } else {
  2403. this.$message({
  2404. message: data.msg,
  2405. type: 'warning',
  2406. duration: 1500
  2407. })
  2408. }
  2409. this.loadFlag = false
  2410. })
  2411. },
  2412. // 获取用户角色
  2413. getUserRoleList () {
  2414. getUserRoleList().then(({data}) => {
  2415. if (data.code === 0) {
  2416. this.roleList = data.rows
  2417. } else {
  2418. this.roleList = []
  2419. }
  2420. })
  2421. },
  2422. // 获取协同人员列表
  2423. getOperatorList () {
  2424. this.operatorData.flag = '1'
  2425. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2426. if (this.roleList.length > 0) {
  2427. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2428. if (filterList.length > 0) {
  2429. this.operatorData.roleId = filterList[0].roleId
  2430. } else {
  2431. this.operatorData.roleId = this.roleList[0].roleId
  2432. }
  2433. } else {
  2434. this.operatorData.roleId = ''
  2435. }
  2436. // 先清空缓存选中
  2437. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2438. // 拿到选中的人员编号
  2439. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2440. getOperatorList(this.operatorData).then(({data}) => {
  2441. if (data && data.code === 0) {
  2442. this.operatorList = data.rows
  2443. this.operatorList.forEach(val => {
  2444. // 回显选中
  2445. if (tempDataList.includes(val.adminID)) {
  2446. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2447. }
  2448. })
  2449. this.operatorModelFlag = true
  2450. } else {
  2451. this.$alert(data.msg, '错误', {
  2452. confirmButtonText: '确定'
  2453. })
  2454. }
  2455. })
  2456. },
  2457. // 获取责任人员列表
  2458. getResponsiblePersonList () {
  2459. this.operatorData.flag = '2'
  2460. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2461. // 先清空缓存选中
  2462. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2463. // 拿到选中的人员编号
  2464. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2465. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2466. if (data && data.code === 0) {
  2467. this.operatorList = data.rows
  2468. this.operatorList.forEach(val => {
  2469. // 回显选中
  2470. if (tempDataList.includes(val.adminID)) {
  2471. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2472. }
  2473. })
  2474. this.operatorModelFlag = true
  2475. } else {
  2476. this.$alert(data.msg, '错误', {
  2477. confirmButtonText: '确定'
  2478. })
  2479. }
  2480. })
  2481. },
  2482. // 查询机修人员列表
  2483. getOperatorList2 () {
  2484. if (this.operatorData.flag === '1') {
  2485. // 拿到选中的人员编号
  2486. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2487. getOperatorList(this.operatorData).then(({data}) => {
  2488. if (data && data.code === 0) {
  2489. this.operatorList = data.rows
  2490. this.operatorList.forEach(val => {
  2491. // 回显选中的部门
  2492. if (tempDataList.includes(val.adminID)) {
  2493. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2494. }
  2495. })
  2496. } else {
  2497. this.operatorList = []
  2498. }
  2499. })
  2500. } else {
  2501. // 拿到选中的人员编号
  2502. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2503. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2504. if (data && data.code === 0) {
  2505. this.operatorList = data.rows
  2506. this.operatorList.forEach(val => {
  2507. // 回显选中的部门
  2508. if (tempDataList.includes(val.adminID)) {
  2509. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2510. }
  2511. })
  2512. } else {
  2513. this.operatorList = []
  2514. }
  2515. })
  2516. }
  2517. },
  2518. // 点击行选中复选框
  2519. operatorClickRow (row) {
  2520. this.$refs.operatorTable.toggleRowSelection(row)
  2521. },
  2522. // 多选
  2523. selectionChangeHandle2 (val) {
  2524. this.dataListSelections2 = val
  2525. },
  2526. // 确认多选协同人员
  2527. confirmOperator () {
  2528. if (this.dataListSelections2.length === 0) {
  2529. this.$message.warning('请勾选人员!')
  2530. return
  2531. }
  2532. if (this.operatorData.flag === '1') {
  2533. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2534. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2535. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2536. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2537. }
  2538. }
  2539. if (this.detailData.operator.charAt(0) === ';') {
  2540. this.detailData.operator = this.detailData.operator.substring(1)
  2541. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2542. }
  2543. } else {
  2544. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2545. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2546. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2547. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2548. }
  2549. }
  2550. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2551. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2552. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2553. }
  2554. }
  2555. this.operatorData = {
  2556. flag: '',
  2557. site: '',
  2558. bu: '',
  2559. adminID: '',
  2560. adminName: '',
  2561. roleName: '',
  2562. roleId: '',
  2563. userName: this.$store.state.user.name
  2564. }
  2565. this.operatorModelFlag = false
  2566. },
  2567. // bu内容改变事件
  2568. buChange () {
  2569. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  2570. this.modalData.templateId = ''
  2571. this.modalData.templateName = ''
  2572. } else { // 无工单检验
  2573. this.modalData.partNo = ''
  2574. this.modalData.partDesc = ''
  2575. this.modalData.spec = ''
  2576. this.modalData.sku = ''
  2577. this.modalData.cinvSourceCode = ''
  2578. this.modalData.templateId = ''
  2579. this.modalData.templateName = ''
  2580. }
  2581. },
  2582. // 获取用户的bu
  2583. getSiteAndBuByUserName () {
  2584. let tempData = {
  2585. username: this.$store.state.user.name,
  2586. }
  2587. getSiteAndBuByUserName(tempData).then(({data}) => {
  2588. if (data.code === 0) {
  2589. this.userBuList = data.rows
  2590. }
  2591. })
  2592. },
  2593. // ======= 正则校验 =======
  2594. handleInput (value, type) {
  2595. // 大于等于0,且只能输入4位小数
  2596. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  2597. if (val === null || val === undefined || val === '') {
  2598. val = 0
  2599. }
  2600. if (type === 1) {
  2601. this.detailData.unqualifiedQty = val
  2602. }
  2603. },
  2604. // 子明细导入
  2605. subDetailUpload () {
  2606. let currentData = {
  2607. flag: 'IPQC',
  2608. site: this.detailData.site,
  2609. buNo: this.detailData.buNo,
  2610. inspectionNo: this.detailData.inspectionNo
  2611. }
  2612. //打开组件 去做新增业务
  2613. this.$nextTick(() => {
  2614. this.$refs.subDetailUpload.init(currentData)
  2615. })
  2616. },
  2617. // 查询单位
  2618. umSearch () {
  2619. let tempData = {
  2620. site: this.$store.state.user.site,
  2621. active: 'Y'
  2622. }
  2623. umSearch(tempData).then(({data}) => {
  2624. if (data.code === 0) {
  2625. this.umList = data.rows
  2626. }
  2627. })
  2628. },
  2629. // 标签号回车事件
  2630. rollNoEnter () {
  2631. let tempData = {
  2632. site: '',
  2633. bu: this.modalData.bu,
  2634. rollNo: this.modalData.rollNo
  2635. }
  2636. rollNoEnter(tempData).then(({data}) => {
  2637. if (data && data.code === 0) {
  2638. this.operationList = data.rows
  2639. this.modalData.seqNo = data.rows[0].seqNo
  2640. this.modalData.orderNo = data.rows[0].orderNo
  2641. this.modalData.operationDesc = data.rows[0].operationDesc
  2642. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2643. this.modalData.resourceId = data.rows[0].resourceId
  2644. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2645. this.modalData.partNo = data.rows[0].partNo
  2646. this.modalData.partDesc = data.rows[0].partDesc
  2647. this.modalData.spec = data.rows[0].spec
  2648. this.modalData.sku = data.rows[0].sku
  2649. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2650. } else {
  2651. this.$alert(data.msg, '错误', {
  2652. confirmButtonText: '确定'
  2653. })
  2654. }
  2655. })
  2656. },
  2657. // input 模糊搜索
  2658. querySearchAsync (queryString, cb) {
  2659. clearTimeout(this.timeout)
  2660. let results = []
  2661. if (queryString === '') {
  2662. cb(results)
  2663. } else {
  2664. // 掉接口需要的参数
  2665. let find = {
  2666. rollNo: queryString, //上面输入框绑定的数据
  2667. site: this.$store.state.user.site,
  2668. }
  2669. // 这里去调后端的接口.根据自己接口的情况进行赋值
  2670. getRollNo(find).then(({data}) => {
  2671. if (data.code === 0) {
  2672. let result = data.rows
  2673. // 循环放到一个远程搜索需要的数组
  2674. for (let i = 0; i < result.length; i++) {
  2675. const element = result[i]
  2676. results.push({
  2677. value: element.rollNo,
  2678. seqNo: element.seqNo,
  2679. orderNo: element.orderNo
  2680. })
  2681. }
  2682. cb(results)
  2683. } else {
  2684. results = []
  2685. cb(results)
  2686. }
  2687. })
  2688. }
  2689. },
  2690. // 点击出现搜索后点击的每一项
  2691. handleSelect (item) {
  2692. this.modalData.rollNo = item.value
  2693. this.modalData.seqNo = item.seqNo
  2694. this.modalData.orderNo = item.orderNo
  2695. this.getOperationList()
  2696. //this.getPartList()
  2697. },
  2698. // 获取处置措施列表
  2699. disposalMeasuresSearch () {
  2700. let tempData = {
  2701. inspectionTypeNo: '101'
  2702. }
  2703. disposalMeasuresSearch(tempData).then(({data}) => {
  2704. if (data.code === 0) {
  2705. this.disposalMeasuresOptions = data.rows
  2706. }
  2707. })
  2708. },
  2709. // 查询检验类型
  2710. inspectionTypeSearch () {
  2711. let tempData = {
  2712. site: this.$store.state.user.site
  2713. }
  2714. inspectionTypeSearch(tempData).then(({data}) => {
  2715. if (data.code === 0) {
  2716. this.typeOptions = data.rows
  2717. this.typeOptions.forEach(val => {
  2718. if (val.inspectionTypeName.includes('IPQC')) {
  2719. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  2720. this.templateData.inspectionTypeName = val.inspectionTypeName
  2721. }
  2722. })
  2723. }
  2724. })
  2725. },
  2726. selectFlag () {
  2727. return true
  2728. },
  2729. // 单机选中
  2730. IPQCClickRow (row) {
  2731. this.$refs.IPQCTable.toggleRowSelection(row)
  2732. },
  2733. // 复选
  2734. selectionIPQC (val) {
  2735. this.IPQCSelections = val
  2736. },
  2737. //刷新派设备文档的列表
  2738. getFileContentData (row) {
  2739. let currentData = {
  2740. orderRef1: row.site,
  2741. orderRef2: row.inspectionNo,
  2742. orderRef4: row.buNo,
  2743. }
  2744. getFileContentList(currentData).then(({data}) => {
  2745. //区分请求成功和失败的状况
  2746. if (data && data.code === 200) {
  2747. this.fileContentList = data.rows
  2748. } else {
  2749. this.fileContentList = []
  2750. }
  2751. })
  2752. this.fileFlag = true
  2753. },
  2754. /*新增文件的modal*/
  2755. addUploadFileModal () {
  2756. let currentData = {
  2757. titleCon: 'IPQC文件上传',
  2758. site: this.detailData.site,
  2759. buNo: this.detailData.buNo,
  2760. createBy: this.$store.state.user.name,
  2761. inspectionNo: this.detailData.inspectionNo,
  2762. remark: '',
  2763. folder: 'qcIPQC',
  2764. }
  2765. //打开组件 去做新增业务
  2766. this.$nextTick(() => {
  2767. this.$refs.qcFAIUploadFile.init(currentData)
  2768. })
  2769. },
  2770. // 上传项目图片
  2771. uploadImageModal (row) {
  2772. let currentData = {
  2773. site: this.detailData.site,
  2774. buNo: this.detailData.buNo,
  2775. createBy: this.$store.state.user.name,
  2776. inspectionNo: this.detailData.inspectionNo,
  2777. itemNo: row.itemNo,
  2778. folder: 'IPQCItemImageFile'
  2779. }
  2780. //打开组件 去做新增业务
  2781. this.$nextTick(() => {
  2782. this.$refs.comQcItemImageUploadFile.init(currentData)
  2783. })
  2784. },
  2785. downloadFile (row) {
  2786. downLoadObjectFile(row).then(({data}) => {
  2787. // 不限制文件下载类型
  2788. const blob = new Blob([data], {type: "application/octet-stream"})
  2789. // 下载文件名称
  2790. const fileName = row.fileName
  2791. // a标签下载
  2792. const linkNode = document.createElement('a')
  2793. // a标签的download属性规定下载文件的名称
  2794. linkNode.download = fileName
  2795. linkNode.style.display = 'none'
  2796. // 生成一个Blob URL
  2797. linkNode.href = URL.createObjectURL(blob)
  2798. document.body.appendChild(linkNode)
  2799. // 模拟在按钮上的一次鼠标单击
  2800. linkNode.click()
  2801. // 释放URL 对象
  2802. URL.revokeObjectURL(linkNode.href)
  2803. document.body.removeChild(linkNode)
  2804. })
  2805. },
  2806. // 删除文件
  2807. deleteFile (row) {
  2808. let tempData = {
  2809. site: row.orderRef1,
  2810. inspectionNo: row.orderRef2,
  2811. buNo: row.orderRef4
  2812. }
  2813. this.$confirm('确定要删除此文件?', '提示', {
  2814. confirmButtonText: '确定',
  2815. cancelButtonText: '取消',
  2816. type: 'warning'
  2817. }).then(() => {
  2818. deleteObjectFile(row).then(({data}) => {
  2819. if (data && data.code === 0) {
  2820. this.getFileContentData(tempData)
  2821. this.$message({
  2822. message: '操作成功',
  2823. type: 'success',
  2824. duration: 1500,
  2825. onClose: () => {}
  2826. })
  2827. } else {
  2828. this.$alert(data.msg, '错误', {
  2829. confirmButtonText: '确定'
  2830. })
  2831. }
  2832. })
  2833. }).catch(() => {
  2834. })
  2835. },
  2836. // 查询检验员
  2837. inspectorSearch () {
  2838. inspectorSearch().then(({data}) => {
  2839. if (data.code === 0) {
  2840. this.options = data.rows
  2841. }
  2842. })
  2843. },
  2844. // 获取基础数据列表S
  2845. getBaseList (val,type) {
  2846. this.tagNo = val
  2847. this.$nextTick(() => {
  2848. let strVal = ''
  2849. if (val === 1052) {
  2850. this.searchSeqInfo()
  2851. this.seqDetailFlag = true
  2852. }
  2853. if (val === 505) {
  2854. strVal = this.modalData.resourceDesc
  2855. this.$refs.baseList.init(val, strVal)
  2856. }
  2857. // if (val === 206) {
  2858. // strVal = this.modalData.partNo
  2859. // this.$refs.baseList.init(val, strVal)
  2860. // }
  2861. })
  2862. },
  2863. /* 列表方法的回调 */
  2864. getBaseData (val) {
  2865. if (this.tagNo === 1052) {
  2866. this.modalData.seqNo = val.seqno
  2867. this.modalData.orderNo = val.orderno
  2868. this.modalData.operationDesc = ''
  2869. this.modalData.resourceId = ''
  2870. this.getOperationList()
  2871. //this.getPartList()
  2872. }
  2873. if (this.tagNo === 505) {
  2874. this.modalData.resourceId = val.resource_id
  2875. this.modalData.resourceDesc = val.resource_desc
  2876. }
  2877. // if (this.tagNo === 206) {
  2878. // this.modalData.partNo = val.part_no
  2879. // this.modalData.partDesc = val.part_desc
  2880. // // 获取物料的其他信息
  2881. // this.getPartInformation()
  2882. // }
  2883. },
  2884. // // 获取物料其它信息
  2885. // getPartInformation () {
  2886. // getPartInformation(this.modalData).then(({data}) => {
  2887. // if (data && data.code === 0) {
  2888. // this.modalData.spec = data.rows[0].spec
  2889. // this.modalData.sku = data.rows[0].sku
  2890. // } else {
  2891. // this.$alert(data.msg, '错误', {
  2892. // confirmButtonText: '确定'
  2893. // })
  2894. // }
  2895. // })
  2896. // },
  2897. // 获取工序列表
  2898. getOperationList () {
  2899. getOperationList(this.modalData).then(({data}) => {
  2900. if (data && data.code === 0) {
  2901. this.operationList = data.rows
  2902. this.modalData.operationDesc = data.rows[0].operationDesc
  2903. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2904. this.modalData.resourceId = data.rows[0].resourceId
  2905. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2906. this.modalData.partNo = data.rows[0].partNo
  2907. this.modalData.partDesc = data.rows[0].partDesc
  2908. this.modalData.spec = data.rows[0].spec
  2909. this.modalData.sku = data.rows[0].sku
  2910. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2911. this.modalData.operationDesc = data.rows[0].operationDesc
  2912. this.modalData.qtyrequired = data.rows[0].qtyrequired
  2913. this.modalData.lotsize = data.rows[0].lotsize
  2914. } else {
  2915. this.$alert(data.msg, '错误', {
  2916. confirmButtonText: '确定'
  2917. })
  2918. }
  2919. })
  2920. },
  2921. // 获取机台列表
  2922. getResourceList () {
  2923. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  2924. if (this.modalData.specialTaskFlag === 'Y') {
  2925. return
  2926. } else {
  2927. getResourceList(this.modalData).then(({data}) => {
  2928. if (data && data.code === 0) {
  2929. //this.resourceList = data.rows
  2930. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2931. this.modalData.resourceId = data.rows[0].resourceId
  2932. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2933. } else {
  2934. this.$alert(data.msg, '错误', {
  2935. confirmButtonText: '确定'
  2936. })
  2937. }
  2938. })
  2939. }
  2940. },
  2941. // 获取物料列表
  2942. getPartList () {
  2943. getPartList(this.modalData).then(({data}) => {
  2944. if (data && data.code === 0) {
  2945. this.partList = data.rows
  2946. this.modalData.partNo = this.partList[0].partNo
  2947. this.modalData.partDesc = this.partList[0].partDesc
  2948. this.modalData.spec = this.partList[0].spec
  2949. this.modalData.sku = this.partList[0].sku
  2950. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  2951. } else {
  2952. this.$alert(data.msg, '错误', {
  2953. confirmButtonText: '确定'
  2954. })
  2955. }
  2956. })
  2957. },
  2958. // 检查动控是否开启
  2959. queryController () {
  2960. let tempData = {
  2961. controlNo: '10004',
  2962. site: this.$store.state.user.site,
  2963. }
  2964. queryController(tempData).then(({data}) => {
  2965. if (data && data.code === 0) {
  2966. this.controlData = data.rows
  2967. } else {
  2968. this.$alert(data.msg, '错误', {
  2969. confirmButtonText: '确定'
  2970. })
  2971. }
  2972. })
  2973. },
  2974. addModal () {
  2975. this.modalData = {
  2976. flag: '1',
  2977. site: '',
  2978. bu: this.userBuList[0].buNo,
  2979. inspectionNo:'',
  2980. partNo: '',
  2981. partDesc: '',
  2982. inspectionTypeNo:'',
  2983. inspectionTypeName:'',
  2984. inspectorNo:'',
  2985. inspectorName:'',
  2986. submit_flag:'',
  2987. orderNo: '',
  2988. operationDesc: '',
  2989. operationNo: '',
  2990. resourceId: '',
  2991. resourceDesc: '',
  2992. rollQty: '',
  2993. seqNo: '',
  2994. batchRollNo: '',
  2995. spec: '',
  2996. sku: '',
  2997. cinvSourceCode: '',
  2998. specialRequirements: '',
  2999. templateId: '',
  3000. templateName: '',
  3001. specialTaskFlag: '',
  3002. workCenterNo: '',
  3003. rollNo: '',
  3004. umId: this.umList[0].umId,
  3005. umName: this.umList[0].umName,
  3006. sjzs: '',
  3007. }
  3008. this.operationList = []
  3009. this.resourceList = []
  3010. this.partList = []
  3011. this.modalDisableFlag = false
  3012. this.modalFlag = true
  3013. this.checked = false
  3014. },
  3015. // 获取检验模板列表
  3016. queryTemplateList () {
  3017. this.templateData.bu = this.modalData.bu
  3018. // 查询所有检验模板
  3019. queryTemplateList(this.templateData).then(({data}) => {
  3020. if (data && data.code === 0) {
  3021. this.templateList = data.rows
  3022. this.templateModelFlag = true
  3023. }else {
  3024. this.$alert(data.msg, '错误', {
  3025. confirmButtonText: '确定'
  3026. })
  3027. }
  3028. })
  3029. },
  3030. // 获取物料列表
  3031. queryPartList () {
  3032. this.partData.bu = this.modalData.bu
  3033. // 查询所有物料
  3034. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3035. this.partList = []
  3036. this.partModelFlag = true
  3037. } else {
  3038. queryPartList(this.partData).then(({data}) => {
  3039. if (data && data.code === 0) {
  3040. this.partList = data.rows
  3041. this.partModelFlag = true
  3042. }else {
  3043. this.$alert(data.msg, '错误', {
  3044. confirmButtonText: '确定'
  3045. })
  3046. }
  3047. })
  3048. }
  3049. },
  3050. // 选中检验模板
  3051. getRowData (row) {
  3052. this.modalData.templateId = row.templateId
  3053. this.modalData.templateName = row.templateName
  3054. this.templateModelFlag = false
  3055. },
  3056. // 选中派工单号
  3057. getRowData1 (row) {
  3058. this.modalData.sku = row.sku
  3059. this.modalData.partNo = row.partNo
  3060. this.modalData.partDesc = row.partDesc
  3061. this.modalData.orderNo = row.orderNo
  3062. this.modalData.seqNo = row.seqNo
  3063. this.modalData.lotsize = row.lotsize
  3064. this.modalData.operationDesc = row.operationDesc
  3065. this.modalData.qtyrequired = row.qtyrequired
  3066. this.modalData.rollQty = row.qtyrequired
  3067. this.modalData.sjzs = row.sjzs
  3068. this.getOperationList()
  3069. this.seqDetailFlag = false
  3070. },
  3071. // 选中物料
  3072. getRowData2 (row) {
  3073. this.modalData.partNo = row.partNo
  3074. this.modalData.partDesc = row.partDesc
  3075. this.modalData.sku = row.sku
  3076. this.modalData.spec = row.spec
  3077. this.modalData.cinvSourceCode = row.cinvSourceCode
  3078. this.partData = {
  3079. site: '',
  3080. bu: '',
  3081. partNo: '',
  3082. partDesc: '',
  3083. sku: '',
  3084. cinvSourceCode: '',
  3085. }
  3086. this.partModelFlag = false
  3087. },
  3088. // 是否新增特殊任务
  3089. changeSpecialTask () {
  3090. // 先重置数据
  3091. this.modalData = {
  3092. flag: '1',
  3093. site: '',
  3094. bu: this.userBuList[0].buNo,
  3095. inspectionNo:'',
  3096. partNo: '',
  3097. partDesc: '',
  3098. inspectionTypeNo:'',
  3099. inspectionTypeName:'',
  3100. inspectorNo:'',
  3101. inspectorName:'',
  3102. submit_flag:'',
  3103. orderNo: '',
  3104. operationDesc: '',
  3105. operationNo: '',
  3106. resourceId: '',
  3107. resourceDesc: '',
  3108. rollQty: '',
  3109. seqNo: '',
  3110. batchRollNo: '',
  3111. spec: '',
  3112. sku: '',
  3113. cinvSourceCode: '',
  3114. specialRequirements: '',
  3115. templateId: '',
  3116. templateName: '',
  3117. specialTaskFlag: '',
  3118. workCenterNo: '',
  3119. rollNo: '',
  3120. umId: this.umList[0].umId,
  3121. umName: this.umList[0].umName
  3122. }
  3123. // 获取选中框
  3124. let obj = document.getElementsByName('specialTask')
  3125. // 判断是否打勾
  3126. if (obj[0].checked) {
  3127. let tempData = {
  3128. site: '',
  3129. bu: this.modalData.bu
  3130. }
  3131. this.modalData.specialTaskFlag = 'Y'
  3132. // 获取特殊工序列表
  3133. getSpecialOperationList(tempData).then(({data}) => {
  3134. if (data && data.code === 0) {
  3135. this.operationList = data.rows
  3136. } else {
  3137. this.$alert(data.msg, '错误', {
  3138. confirmButtonText: '确定'
  3139. })
  3140. }
  3141. })
  3142. // 派工单和工单号赋值
  3143. this.modalData.seqNo = '000#1TSGD'
  3144. this.modalData.orderNo = '000#1'
  3145. } else {
  3146. this.operationList = []
  3147. this.modalData.specialTaskFlag = ''
  3148. }
  3149. },
  3150. // 新增IPQC巡检记录
  3151. saveData () {
  3152. if (this.modalData.bu === '' || this.modalData.bu == null) {
  3153. this.$message.warning('请选择BU!')
  3154. return
  3155. }
  3156. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  3157. this.$message.warning('请选择派工单!')
  3158. return
  3159. }
  3160. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  3161. this.$message.warning('请选择工单!')
  3162. return
  3163. }
  3164. if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
  3165. this.$message.warning('请选择检验类型!')
  3166. return
  3167. }
  3168. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  3169. this.$message.warning('请选择物料!')
  3170. return
  3171. }
  3172. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  3173. this.$message.warning('请选择工序!')
  3174. return
  3175. }
  3176. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  3177. this.$message.warning('请选择机台!')
  3178. return
  3179. }
  3180. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  3181. this.$message.warning('请填写送检数量!')
  3182. return
  3183. }
  3184. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3185. this.$message.warning('请选择单位!')
  3186. return
  3187. }
  3188. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  3189. this.$message.warning('请选择检验模板!')
  3190. return
  3191. }
  3192. if(this.modalData.flag === '1'){
  3193. saveOsInspection(this.modalData).then(({data}) => {
  3194. if (data && data.code === 0) {
  3195. this.getDataList()
  3196. this.operationList = []
  3197. this.resourceList = []
  3198. this.partList = []
  3199. this.modalFlag = false
  3200. this.$message({
  3201. message: '操作成功',
  3202. type: 'success',
  3203. duration: 1500,
  3204. onClose: () => {}
  3205. })
  3206. } else {
  3207. this.$alert(data.msg, '错误', {
  3208. confirmButtonText: '确定'
  3209. })
  3210. }
  3211. })
  3212. }
  3213. },
  3214. // 获取主信息数据列表
  3215. getDataList () {
  3216. this.searchData.limit = this.pageSize
  3217. this.searchData.page = this.pageIndex
  3218. qcIPQCInspectionSearch(this.searchData).then(({data}) => {
  3219. if (data.code === 0) {
  3220. this.dataList = data.page.list
  3221. this.pageIndex = data.page.currPage
  3222. this.pageSize = data.page.pageSize
  3223. this.totalPage = data.page.totalCount
  3224. }
  3225. })
  3226. },
  3227. // 每页数
  3228. sizeChangeHandle (val) {
  3229. this.pageSize = val
  3230. this.pageIndex = 1
  3231. this.getDataList()
  3232. },
  3233. // 当前页
  3234. currentChangeHandle (val) {
  3235. this.pageIndex = val
  3236. this.getDataList()
  3237. },
  3238. // 多选
  3239. selectionChangeHandle (val) {
  3240. this.dataListSelections = val
  3241. },
  3242. // 删除检验记录
  3243. deleteModal () {
  3244. if (this.IPQCSelections.length === 0) {
  3245. this.$alert('请勾选要删除的检验单!', '提示', {
  3246. confirmButtonText: '确定'
  3247. })
  3248. return false
  3249. }
  3250. this.$confirm(`是否删除该 `+ this.IPQCSelections.length +` 条检验记录?`, '提示', {
  3251. confirmButtonText: '确定',
  3252. cancelButtonText: '取消',
  3253. type: 'warning'
  3254. }).then(() => {
  3255. let tempData = {
  3256. site: this.$store.state.user.site,
  3257. submitList: this.IPQCSelections
  3258. }
  3259. ipqcRecordDelete(tempData).then(({data}) => {
  3260. if (data && data.code === 0) {
  3261. this.getDataList()
  3262. this.IPQCSelections = []
  3263. this.$message({
  3264. message: '操作成功',
  3265. type: 'success',
  3266. duration: 1500,
  3267. onClose: () => {}
  3268. })
  3269. } else {
  3270. this.$alert(data.msg, '错误', {
  3271. confirmButtonText: '确定'
  3272. })
  3273. }
  3274. })
  3275. }).catch(() => {
  3276. })
  3277. },
  3278. Transfer () {
  3279. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3280. this.$message.warning('请选择检验结论!')
  3281. return
  3282. }
  3283. // for (let i = 0; i < this.detailList.length; i++) {
  3284. // if(this.detailList[i].itemResult === '' || this.detailList[i].itemResult == null){
  3285. // this.detailList[i].itemResult = 'Y'
  3286. // }
  3287. // }
  3288. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3289. this.$message.warning('请选择处置措施!')
  3290. return
  3291. }
  3292. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3293. const flag = this.detailList.some(item => item.itemResult === 'N')
  3294. if (!flag) {
  3295. this.$message.warning('请选择不合格项目!')
  3296. return
  3297. }
  3298. }
  3299. if (this.detailData.inspectionResult !== '不合格') {
  3300. this.detailData.disposalMeasures = ''
  3301. this.detailData.disposalRemark = ''
  3302. }
  3303. this.saveDetailInformation()
  3304. },
  3305. // 新增明细信息
  3306. saveDetailInformation () {
  3307. this.saveInformationData.site = this.detailData.site
  3308. this.saveInformationData.buNo = this.detailData.buNo
  3309. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3310. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3311. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3312. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3313. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3314. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3315. this.saveInformationData.rollQty = this.detailData.rollQty
  3316. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3317. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3318. this.saveInformationData.partNo = this.detailData.partNo
  3319. this.saveInformationData.partDesc = this.detailData.partDesc
  3320. this.saveInformationData.operator = this.detailData.operator
  3321. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3322. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3323. // this.saveInformationData.subDetailList = this.acquisitionList
  3324. saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3325. if (data && data.code === 0) {
  3326. this.getDataList()
  3327. this.detailInformationFlag = false
  3328. this.$message({
  3329. message: '操作成功',
  3330. type: 'success',
  3331. duration: 1500,
  3332. onClose: () => {}
  3333. })
  3334. } else {
  3335. this.$alert(data.msg, '错误', {
  3336. confirmButtonText: '确定'
  3337. })
  3338. }
  3339. })
  3340. },
  3341. // 开始检验
  3342. actionModal (row) {
  3343. this.actionData = {
  3344. site: row.site,
  3345. buNo: row.buNo,
  3346. inspectionNo: row.inspectionNo
  3347. }
  3348. getIPQCItemObjectList(this.actionData).then(({data}) => {
  3349. if (data && data.code === 0) {
  3350. this.itemObjectList = data.rows
  3351. this.ItemObjectModelFlag = true
  3352. } else {
  3353. this.$alert(data.msg, '错误', {
  3354. confirmButtonText: '确定'
  3355. })
  3356. }
  3357. })
  3358. },
  3359. // 开始检验
  3360. actionModal2 () {
  3361. this.$confirm(`确认开始检验?`, '提示', {
  3362. confirmButtonText: '确定',
  3363. cancelButtonText: '取消',
  3364. type: 'warning'
  3365. }).then(() => {
  3366. let tempData = {
  3367. site: this.actionData.site,
  3368. buNo: this.actionData.buNo,
  3369. inspectionNo: this.actionData.inspectionNo,
  3370. actionBy: this.$store.state.user.name,
  3371. state: '待检验',
  3372. equipmentList: this.itemObjectList
  3373. }
  3374. actionIPQCInspection(tempData).then(({data}) => {
  3375. if (data && data.code === 0) {
  3376. this.getDataList()
  3377. this.$message({
  3378. message: '操作成功',
  3379. type: 'success',
  3380. duration: 1500,
  3381. onClose: () => {}
  3382. })
  3383. this.ItemObjectModelFlag = false
  3384. } else {
  3385. this.$alert(data.msg, '错误', {
  3386. confirmButtonText: '确定'
  3387. })
  3388. }
  3389. })
  3390. })
  3391. },
  3392. // 明细记录信息查询
  3393. detailModal (row) {
  3394. this.detailData.site = row.site
  3395. this.detailData.buNo = row.buNo
  3396. this.detailData.inspectionNo = row.inspectionNo
  3397. this.detailData.partNo = row.partNo
  3398. this.detailData.partDesc = row.partDesc
  3399. this.detailData.rollQty = row.rollQty
  3400. this.detailData.samplingQty = row.samplingQty
  3401. this.detailData.unqualifiedQty = row.unqualifiedQty
  3402. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3403. this.detailData.submitFlag = row.submitFlag
  3404. this.detailData.disposalMeasures = row.disposalMeasures
  3405. this.detailData.disposalRemark = row.disposalRemark
  3406. this.detailData.inspectionResult = row.inspectionResult
  3407. this.detailData.inspectorNo = row.inspectorNo
  3408. this.detailData.inspectorName = row.inspectorName
  3409. this.detailData.inspectionRemark = row.inspectionRemark
  3410. this.detailData.cinvSourceCode = row.cinvSourceCode
  3411. this.detailData.sku = row.sku
  3412. this.detailData.cinvSourceCode = row.cinvSourceCode
  3413. this.detailData.spec = row.spec
  3414. this.detailData.umId = row.umId
  3415. this.detailData.umName = row.umName
  3416. this.detailData.operator = row.operator
  3417. this.detailData.operatorName = row.operatorName
  3418. this.detailData.responsiblePerson = row.responsiblePerson
  3419. this.detailData.responsiblePersonName = row.responsiblePersonName
  3420. this.getInspectionFormData()
  3421. this.inspectorSearch()
  3422. // this.acquisitionList = []
  3423. this.detailInformationFlag = true
  3424. },
  3425. // 检验单明细
  3426. getInspectionFormData () {
  3427. ipqcDetailSearch(this.detailData).then(({data}) => {
  3428. if (data && data.code === 0) {
  3429. this.detailList = data.rows
  3430. } else {
  3431. this.detailList = []
  3432. }
  3433. })
  3434. },
  3435. // 子明细记录信息查询
  3436. subDetailModal (row) {
  3437. // this.subDetailData.inspectionNo = row.inspectionNo
  3438. // this.subDetailData.itemNo = row.itemNo
  3439. // this.subDetailData.itemDesc = row.itemDesc
  3440. // this.subDetailData.defaultValue = row.defaultValue
  3441. // this.subDetailData.maxValue = row.maxValue
  3442. // this.subDetailData.minValue = row.minValue
  3443. this.subDetailData = row
  3444. selectIPQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3445. this.tableData = data.rows
  3446. })
  3447. this.batchAddData = {
  3448. samplingLocation: '',
  3449. samplingLocationB: '',
  3450. samplingNumber: ''
  3451. }
  3452. this.subDetailFlag = true
  3453. },
  3454. // 审核按钮
  3455. submitResult () {
  3456. let tempData1 = '' // 记录不是待审核状态的单号
  3457. let tempData2 = '' // 记录处置措施未填写的单号
  3458. if (this.IPQCSelections.length === 0) {
  3459. this.$alert('请勾选要审核的检验单!', '提示', {
  3460. confirmButtonText: '确定'
  3461. })
  3462. return false
  3463. }
  3464. for (let i = 0; i < this.IPQCSelections.length; i++) {
  3465. if (this.IPQCSelections[i].state !== '待审核'){
  3466. tempData1 = tempData1 + this.IPQCSelections[i].inspectionNo + '、'
  3467. }
  3468. if (this.IPQCSelections[i].inspectionResult === '不合格' && (this.IPQCSelections[i].disposalMeasures === '' || this.IPQCSelections[i].disposalMeasures == null)) {
  3469. tempData2 = tempData2 + this.IPQCSelections[i].inspectionNo + '、'
  3470. }
  3471. }
  3472. if (tempData1 !== ''){
  3473. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3474. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  3475. confirmButtonText: '确定'
  3476. })
  3477. return false
  3478. }
  3479. if (tempData2 !== ''){
  3480. tempData2 = tempData2.substring(0, tempData2.length - 1)
  3481. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  3482. confirmButtonText: '确定'
  3483. })
  3484. return false
  3485. }
  3486. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.IPQCSelections.length + ` 条记录`, '提示', {
  3487. confirmButtonText: '确定',
  3488. cancelButtonText: '取消',
  3489. type: 'warning'
  3490. }).then(() => {
  3491. this.submitData.submitList = this.IPQCSelections
  3492. saveIPQCSubmitResult(this.submitData).then(({data}) => {
  3493. if (data && data.code === 0) {
  3494. this.getDataList()
  3495. this.IPQCSelections = []
  3496. this.$message({
  3497. message: '操作成功',
  3498. type: 'success',
  3499. duration: 1500,
  3500. onClose: () => {}
  3501. })
  3502. } else {
  3503. this.$alert(data.msg, '错误', {
  3504. confirmButtonText: '确定'
  3505. })
  3506. }
  3507. })
  3508. }).catch(() => {
  3509. })
  3510. },
  3511. // 子明细方法
  3512. // 表格的新增
  3513. rowClassName ({ row, rowIndex }) {
  3514. row.xh = rowIndex + 1;
  3515. },
  3516. // 单选框选中数据
  3517. handleDetailSelectionChange (selection) {
  3518. this.checkedDetail = selection
  3519. },
  3520. // 点击新增更多
  3521. handleAddBtn (td) {
  3522. checkIPQCIsSubmit(td).then(({data}) => {
  3523. if (data.flag !== 1) {
  3524. let obj = {}
  3525. obj.subDetailValue = ""
  3526. obj.samplingLocation = ""
  3527. this.tableData.push(obj)
  3528. } else {
  3529. this.$alert("记录已提交!", '错误', {
  3530. confirmButtonText: '确定'
  3531. })
  3532. }
  3533. })
  3534. },
  3535. // 批量新增操作
  3536. batchHandleAdd (td) {
  3537. checkIPQCIsSubmit(td).then(({data}) => {
  3538. if (data.flag !== 1) {
  3539. this.batchHandleAddModalFlag = true
  3540. } else {
  3541. this.$alert("记录已提交!", '错误', {
  3542. confirmButtonText: '确定'
  3543. })
  3544. }
  3545. })
  3546. },
  3547. // 批量新增行
  3548. batchHandleAddModal () {
  3549. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  3550. let obj = {}
  3551. obj.samplingLocation = this.batchAddData.samplingLocation
  3552. obj.samplingLocationB = this.batchAddData.samplingLocationB
  3553. obj.subDetailValue = ""
  3554. this.tableData.push(obj)
  3555. }
  3556. this.batchHandleAddModalFlag = false
  3557. },
  3558. // 回车事件
  3559. nextFocus1 (index) {
  3560. let a1 = `${index + 1}` + `a`
  3561. this.$nextTick(() => {
  3562. this.$refs[a1].focus()
  3563. })
  3564. },
  3565. nextFocus2 (index) {
  3566. let a2 = `${index + 1}` + `b`
  3567. this.$nextTick(() => {
  3568. this.$refs[a2].focus()
  3569. })
  3570. },
  3571. nextFocus3 (index) {
  3572. let a3 = `${index + 1}` + `c`
  3573. this.$nextTick(() => {
  3574. this.$refs[a3].focus()
  3575. })
  3576. },
  3577. focusNextInput (index, type) {
  3578. let aaa = ''
  3579. if (this.detailList.length - 1 === index) {
  3580. aaa = `${type}0`
  3581. } else {
  3582. aaa = `${type}${index + 1}`
  3583. }
  3584. this.$nextTick(() => {
  3585. this.$refs[aaa].focus()
  3586. })
  3587. },
  3588. //删除
  3589. handleDeleteBtn (td) {
  3590. checkIPQCIsSubmit(td).then(({data}) => {
  3591. if (data.flag !== 1) {
  3592. if (this.checkedDetail.length === 0) {
  3593. this.$alert("请先选择要删除的数据", "提示", {
  3594. confirmButtonText: "确定",
  3595. })
  3596. } else {
  3597. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  3598. confirmButtonText: "确定",
  3599. cancelButtonText: "取消",
  3600. type: "warning",
  3601. callback: (action) => {
  3602. if (action === "confirm") {
  3603. let val = this.checkedDetail
  3604. val.forEach((val, index) => {
  3605. this.tableData.forEach((v, i) => {
  3606. if (val.xh === v.xh) {
  3607. this.tableData.splice(i, 1);
  3608. }
  3609. })
  3610. })
  3611. this.$message({
  3612. message: "删除成功!",
  3613. type: "success",
  3614. })
  3615. return
  3616. } else {
  3617. this.$message({
  3618. message: "已取消删除操作",
  3619. type: "warning",
  3620. })
  3621. return
  3622. }
  3623. },
  3624. })
  3625. }
  3626. } else {
  3627. this.$alert("记录已提交!", '错误', {
  3628. confirmButtonText: '确定'
  3629. })
  3630. }
  3631. })
  3632. },
  3633. // 新增子明细记录
  3634. saveSubDetailResult () {
  3635. for (let i = 0; i < this.tableData.length; i++) {
  3636. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  3637. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  3638. return
  3639. }
  3640. }
  3641. this.subDetailData.subDetailValues = this.tableData
  3642. saveIPQCSubDetailed(this.subDetailData).then(({data}) => {
  3643. if (data && data.code === 0) {
  3644. if (data.count > 0) {
  3645. this.subDetailData.itemResult = 'N'
  3646. this.subDetailData.unqualifiedQuantity = data.count
  3647. }
  3648. if (this.subDetailData.subDetailValues.length > 0) {
  3649. this.subDetailData.subDetailRecordNum = 1
  3650. } else {
  3651. this.subDetailData.subDetailRecordNum = -1
  3652. this.subDetailData.unqualifiedQuantity = 0
  3653. this.subDetailData.itemResult = 'Y'
  3654. }
  3655. this.subDetailFlag = false
  3656. this.tableData = []
  3657. this.$message({
  3658. message: '操作成功',
  3659. type: 'success',
  3660. duration: 1500,
  3661. onClose: () => {}
  3662. })
  3663. } else {
  3664. this.$alert(data.msg, '错误', {
  3665. confirmButtonText: '确定'
  3666. })
  3667. }
  3668. })
  3669. },
  3670. // 校验用户是否收藏
  3671. favoriteIsOk () {
  3672. let userFavorite = {
  3673. userId: this.$store.state.user.id,
  3674. languageCode: this.$i18n.locale
  3675. }
  3676. userFavoriteList(userFavorite).then(({data}) => {
  3677. for (let i = 0; i < data.list.length; i++) {
  3678. if(this.$route.meta.menuId === data.list[i].menuId){
  3679. this.favorite = true
  3680. }
  3681. }
  3682. })
  3683. },
  3684. // 收藏 OR 取消收藏
  3685. favoriteFunction () {
  3686. let userFavorite = {
  3687. userId: this.$store.state.user.id,
  3688. functionId: this.$route.meta.menuId,
  3689. }
  3690. if (this.favorite) {
  3691. removeUserFavorite(userFavorite).then(({data}) => {
  3692. this.$message.success(data.msg)
  3693. this.favorite = false
  3694. })
  3695. } else {
  3696. // 收藏
  3697. saveUserFavorite(userFavorite).then(({data}) => {
  3698. this.$message.success(data.msg)
  3699. this.favorite = true
  3700. })
  3701. }
  3702. },
  3703. //导出excel
  3704. async createExportData () {
  3705. this.searchData.limit = -1
  3706. this.searchData.page = 1
  3707. await qcIPQCInspectionSearch(this.searchData).then(({data}) => {
  3708. this.exportList= data.page.list
  3709. })
  3710. return this.exportList
  3711. },
  3712. startDownload() {},
  3713. finishDownload() {},
  3714. fields () {
  3715. let json = "{"
  3716. this.columnList1.forEach((item, index) => {
  3717. if (index == this.columnList1.length - 1) {
  3718. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  3719. } else {
  3720. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  3721. }
  3722. })
  3723. json += "}"
  3724. let s = eval("(" + json + ")")
  3725. return s
  3726. },
  3727. // 动态列开始 获取 用户保存的 格式列
  3728. async getTableUserColumn (tableId, columnId) {
  3729. let queryTableUser = {
  3730. userId: this.$store.state.user.name,
  3731. functionId: this.$route.meta.menuId,
  3732. tableId: tableId,
  3733. status: true,
  3734. languageCode: this.$i18n.locale
  3735. }
  3736. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3737. if (data.rows.length > 0) {
  3738. //this.columnList1 = []
  3739. switch (columnId) {
  3740. case 1:
  3741. this.columnList1 = data.rows
  3742. break;
  3743. case 2:
  3744. this.detailColumnList = data.rows
  3745. break;
  3746. case 3:
  3747. this.seqDetailColumnList = data.rows
  3748. break;
  3749. // case 4:
  3750. // this.columnList3 = data.rows
  3751. // break;
  3752. }
  3753. } else {
  3754. this.getColumnList(tableId, columnId)
  3755. }
  3756. })
  3757. },
  3758. // 获取 tableDefault 列
  3759. async getColumnList (tableId, columnId) {
  3760. let queryTable= {
  3761. functionId: this.$route.meta.menuId,
  3762. tableId: tableId,
  3763. languageCode: this.$i18n.locale
  3764. }
  3765. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3766. if (!data.rows.length == 0) {
  3767. switch (columnId) {
  3768. case 1:
  3769. this.columnList1 = data.rows
  3770. break;
  3771. case 2:
  3772. this.detailColumnList = data.rows
  3773. break;
  3774. case 3:
  3775. this.seqDetailColumnList = data.rows
  3776. break;
  3777. // case 4:
  3778. // this.columnList3 = data.rows
  3779. // break;
  3780. }
  3781. } else {
  3782. // this.showDefault = true.
  3783. }
  3784. })
  3785. },
  3786. /**
  3787. * 明细导入后将返回值回传给父组件
  3788. * @param val
  3789. */
  3790. changeMyString (val) {
  3791. for (let i = 0; i < this.detailList.length; i++) {
  3792. if (val[this.detailList[i].itemNo] !== undefined) {
  3793. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  3794. if (val[this.detailList[i].itemNo] != null) {
  3795. this.detailList[i].subDetailRecordNum = 1
  3796. }
  3797. if (val[this.detailList[i].itemNo] > 0) {
  3798. this.detailList[i].itemResult = 'N'
  3799. }
  3800. }
  3801. }
  3802. },
  3803. searchSeqInfo () {
  3804. let tempData = {
  3805. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  3806. site: this.modalData.bu.at(0),
  3807. seqNo: this.seqDetailData.seqNo,
  3808. orderNo: this.seqDetailData.orderNo,
  3809. sku: this.seqDetailData.sku,
  3810. partDesc: this.seqDetailData.partDesc,
  3811. partNo: this.seqDetailData.partNo,
  3812. operationDesc: this.seqDetailData.operationDesc,
  3813. status: this.seqDetailData.status
  3814. }
  3815. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  3816. this.seqInfoList = []
  3817. } else {
  3818. searchSeqInfo(tempData).then(({data}) => {
  3819. if (data && data.code === 0) {
  3820. this.seqInfoList = data.rows
  3821. } else {
  3822. this.$alert(data.msg, '错误', {
  3823. confirmButtonText: '确定'
  3824. })
  3825. }
  3826. })
  3827. }
  3828. },
  3829. closeDialog () {
  3830. this.seqDetailData = {
  3831. seqNo : '',
  3832. orderNo: '',
  3833. sku: '',
  3834. partNo: '',
  3835. partDesc: '',
  3836. operationDesc: '',
  3837. status: '下达'
  3838. }
  3839. this.seqInfoList = []
  3840. },
  3841. //获取按钮的权限数据
  3842. getButtonAuthData () {
  3843. let searchFlag = this.isAuth(this.menuId+":search")
  3844. let checkFlag = this.isAuth(this.menuId+":check")
  3845. let saveFlag = this.isAuth(this.menuId+":save")
  3846. let deleteFlag = this.isAuth(this.menuId+":delete")
  3847. let detailFlag = this.isAuth(this.menuId+":detail")
  3848. let fileFlag = this.isAuth(this.menuId+":file")
  3849. //处理页面的权限数据
  3850. this.authSearch = !searchFlag
  3851. this.authCheck = !checkFlag
  3852. this.authSave = !saveFlag
  3853. this.authDelete = !deleteFlag
  3854. this.authDetail = !detailFlag
  3855. this.authFile = !fileFlag
  3856. },
  3857. }
  3858. }
  3859. </script>
  3860. <style scoped>
  3861. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  3862. color: red;
  3863. font-weight: bold;
  3864. }
  3865. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  3866. color: rgb(103,194,58);
  3867. font-weight: bold;
  3868. }
  3869. .numInput /deep/ .el-input__inner{
  3870. text-align: right;
  3871. }
  3872. .el-table /deep/ .cell{
  3873. height: auto;
  3874. line-height: 1.5;
  3875. }
  3876. </style>