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.

3608 lines
139 KiB

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