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.

4163 lines
156 KiB

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