赫艾前端
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.

2634 lines
104 KiB

3 months ago
4 weeks ago
3 months ago
4 weeks ago
3 months ago
4 weeks ago
3 months ago
4 weeks ago
3 months ago
4 weeks ago
3 months ago
2 months ago
3 months ago
1 month ago
3 months ago
1 month ago
3 days ago
3 days ago
1 month ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
4 weeks ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
1 month ago
1 month ago
1 month ago
2 months ago
2 months ago
3 months ago
3 months ago
1 month ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item :label="'工厂编码'">
  6. <el-input v-model="searchData.site" clearable style="width: 140px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'检验单号'">
  9. <el-input v-model="searchData.inspectionNo" clearable style="width: 140px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'单据号'">
  12. <el-input v-model="searchData.poOrderNo" clearable style="width: 150px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'单据行号'">
  15. <el-input v-model="searchData.poItemNo" clearable style="width: 75px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'物料编码'">
  18. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'物料名称'">
  21. <el-input v-model="searchData.partDesc" clearable style="width: 200px"></el-input>
  22. </el-form-item>
  23. <!-- <el-form-item :label="'SKU'">
  24. <el-input v-model="searchData.sku" clearable style="width: 120px"></el-input>
  25. </el-form-item> -->
  26. <el-form-item :label="'PN'">
  27. <el-input v-model="searchData.cinvSourceCode" clearable style="width: 120px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="'规格型号'">
  30. <el-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
  31. </el-form-item>
  32. </el-form>
  33. <el-form :inline="true" label-position="top" :model="searchData">
  34. <el-form-item :label="'供应商'">
  35. <el-input v-model="searchData.supplierDesc" clearable style="width: 200px"></el-input>
  36. </el-form-item>
  37. <el-form-item :label="'质检员'">
  38. <el-input v-model="searchData.inspectorName" clearable style="width: 120px"></el-input>
  39. </el-form-item>
  40. <el-form-item :label="'状态'">
  41. <el-select v-model="searchData.states" multiple style="width: 340px">
  42. <el-option label="未开始" value="未开始"></el-option>
  43. <el-option label="待检验" value="待检验"></el-option>
  44. <el-option label="待审核" value="待审核"></el-option>
  45. <el-option label="已完成" value="已完成"></el-option>
  46. </el-select>
  47. </el-form-item>
  48. <el-form-item :label="'检验结论'">
  49. <el-select v-model="searchData.inspectionResult" clearable style="width: 80px">
  50. <el-option label="合格" value="合格"></el-option>
  51. <el-option label="不合格" value="不合格"></el-option>
  52. </el-select>
  53. </el-form-item>
  54. <el-form-item :label="'处置措施'">
  55. <el-select v-model="searchData.disposalMeasures" clearable style="width: 90px">
  56. <el-option
  57. v-for = "i in disposalMeasuresOptions"
  58. :key = "i.id"
  59. :label = "i.disposalMeasures"
  60. :value = "i.disposalMeasures">
  61. </el-option>
  62. </el-select>
  63. </el-form-item>
  64. <!-- <el-form-item :label="'采购类型'">
  65. <el-select v-model="searchData.orderType" clearable style="width: 90px">
  66. <el-option label="采购订单" value="采购订单"></el-option>
  67. <el-option label="委外订单" value="委外订单"></el-option>
  68. </el-select>
  69. </el-form-item> -->
  70. <el-form-item :label="'送检类型'">
  71. <el-select v-model="searchData.submissionType" clearable style="width: 90px">
  72. <el-option label="厂内使用" value="厂内使用"></el-option>
  73. <el-option label="外协使用" value="外协使用"></el-option>
  74. <el-option label="其他" value="其他"></el-option>
  75. </el-select>
  76. </el-form-item>
  77. </el-form>
  78. <el-form :inline="true" label-position="top" :model="searchData">
  79. <el-form-item :label="'送检日期'">
  80. <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>
  81. -
  82. <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>
  83. </el-form-item>
  84. <el-form-item :label="'检验时间'">
  85. <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>
  86. -
  87. <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>
  88. </el-form-item>
  89. <el-form-item :label="' '">
  90. <el-button v-if="!authSearch" type="primary" :loading="searchLoading" @click="getDataList">查询</el-button>
  91. <el-button v-if="!authCheck" type="primary" @click="submitResult">审核</el-button>
  92. <el-button v-if="!authCancelCheck" type="primary" @click="cancelApproval">取消审核</el-button>
  93. <el-button v-if="!authDelete" type="primary" @click="deleteModal">删除</el-button>
  94. <el-button v-if="!authOverLoad" type="primary" @click="overLoadModal">任务重载</el-button>
  95. <el-button type="primary" @click="printList">打印</el-button>
  96. <download-excel
  97. :fields="fields()"
  98. :data="exportData"
  99. type="xls"
  100. :name="exportName"
  101. :header="exportHeader"
  102. :footer="exportFooter"
  103. :fetch="createExportData"
  104. :before-generate="startDownload"
  105. :before-finish="finishDownload"
  106. worksheet="导出信息"
  107. class="el-button el-button--primary el-button--medium">
  108. {{ "导出" }}
  109. </download-excel>
  110. </el-form-item>
  111. </el-form>
  112. <!-- 检验记录展示列表 -->
  113. <el-table
  114. :height="height"
  115. :data="dataList"
  116. border
  117. ref="SQCTable"
  118. @row-click="SQCClickRow"
  119. @selection-change="selectionSQC"
  120. style="width: 100%;">
  121. <el-table-column
  122. type="selection"
  123. header-align="center"
  124. align="center"
  125. :selectable="selectFlag"
  126. width="50">
  127. </el-table-column>
  128. <el-table-column
  129. prop="state"
  130. header-align="center"
  131. align="center"
  132. label="状态">
  133. <template slot-scope="scope">
  134. <div :style="{fontWeight:'bold', color: scope.row.state === '待检验' ? 'red' : scope.row.state === '待审核' ? '#ffa500e0' : scope.row.state === '已完成' ? '#3ac252' : ''}">
  135. {{ scope.row.state }}
  136. </div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column
  140. v-for="(item,index) in columnList1" :key="index"
  141. :sortable="item.columnSortable"
  142. :prop="item.columnProp"
  143. :header-align="item.headerAlign"
  144. :show-overflow-tooltip="item.showOverflowTooltip"
  145. :align="item.align"
  146. :fixed="item.fixed===''?false:item.fixed"
  147. :min-width="item.columnWidth"
  148. :label="item.columnLabel">
  149. <template slot-scope="scope">
  150. <span v-if="!item.columnHidden">
  151. <template v-if="item.columnProp === 'pictureFlag'">
  152. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  153. </template>
  154. <template v-else>{{ scope.row[item.columnProp] }}</template>
  155. </span>
  156. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  157. </template>
  158. </el-table-column>
  159. <el-table-column
  160. fixed="right"
  161. header-align="center"
  162. align="center"
  163. width="130"
  164. label="操作">
  165. <template slot-scope="scope">
  166. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
  167. <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
  168. <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
  169. </template>
  170. </el-table-column>
  171. </el-table>
  172. <!-- 分页-->
  173. <el-pagination
  174. @size-change="sizeChangeHandle"
  175. @current-change="currentChangeHandle"
  176. :current-page="pageIndex"
  177. :page-sizes="[20, 50, 100, 200, 500]"
  178. :page-size="pageSize"
  179. :total="totalPage"
  180. layout="total, sizes, prev, pager, next, jumper">
  181. </el-pagination>
  182. <!-- 检验单详情 -->
  183. <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
  184. <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList">
  185. <el-form-item :label="'物料编码'">
  186. <el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
  187. </el-form-item>
  188. <el-form-item :label="'物料类别'">
  189. <el-input v-model="detailData.invdefinetype" readonly style="width: 100px"></el-input>
  190. </el-form-item>
  191. <el-form-item :label="'PN'">
  192. <el-input v-model="detailData.cinvSourceCode" readonly style="width: 100px"></el-input>
  193. </el-form-item>
  194. <el-form-item :label="'SKU'">
  195. <el-input v-model="detailData.sku" readonly style="width: 100px"></el-input>
  196. </el-form-item>
  197. <el-form-item :label="'物料名称'">
  198. <el-input v-model="detailData.partDesc" readonly style="width: 300px"></el-input>
  199. </el-form-item>
  200. <el-form-item :label="'单位'">
  201. <el-input v-model="detailData.umName" readonly style="width: 60px"></el-input>
  202. </el-form-item>
  203. <el-form-item>
  204. <span v-if="detailData.submitFlag === 'Y'" slot="label">协同人员</span>
  205. <span v-else style="cursor: pointer" slot="label" @click="getOperatorList"><a>协同人员</a></span>
  206. <el-input v-model="detailData.operatorName" readonly style="width: 150px"></el-input>
  207. </el-form-item>
  208. <el-form-item>
  209. <span v-if="detailData.submitFlag === 'Y'" slot="label">责任人</span>
  210. <span v-else style="cursor: pointer" slot="label" @click="getResponsiblePersonList"><a>责任人</a></span>
  211. <el-input v-model="detailData.responsiblePersonName" readonly style="width: 150px"></el-input>
  212. </el-form-item>
  213. </el-form>
  214. <el-form :inline="true" label-position="top" @keyup.enter.native="getDataList">
  215. <el-form-item :label="'送检数量'">
  216. <el-input-number :controls="false" :step="0" v-model="detailData.rollQty" style="width: 85px"></el-input-number>
  217. </el-form-item>
  218. <el-form-item :label="'抽样数量'">
  219. <el-input-number :controls="false" :step="0" v-model="detailData.samplingQty" style="width: 85px"></el-input-number>
  220. </el-form-item>
  221. <el-form-item :label="'合格数量'">
  222. <el-input-number :controls="false" :step="0" :min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled style="width: 85px"></el-input-number>
  223. <el-input-number :controls="false" :step="0" :min="0" v-else v-model="detailData.passQty" style="width: 85px"></el-input-number>
  224. </el-form-item>
  225. <el-form-item :label="'不合格数量'">
  226. <el-input-number :controls="false" :step="0" :min="0" v-model="detailData.notPassQty" disabled style="width: 85px"></el-input-number>
  227. </el-form-item>
  228. <el-form-item :label="'不合格项目数量'">
  229. <el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled style="width: 85px"></el-input-number>
  230. <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" style="width: 85px"></el-input-number>
  231. </el-form-item>
  232. <el-form-item :label="'批次合格数'">
  233. <el-input-number :controls="false" :step="0" :min="0" v-model="detailData.batchQualifiedQty" disabled style="width: 85px"></el-input-number>
  234. </el-form-item>
  235. <el-form-item :label="'批次不合格数'">
  236. <el-input-number :controls="false" :step="0" :min="0" v-model="detailData.notbatchQualifiedQty" disabled style="width: 85px"></el-input-number>
  237. </el-form-item>
  238. <el-form-item style="margin-top: 13px;margin-left: 365px">
  239. <el-button @click="getFileContentData(detailData)">
  240. <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>
  241. </el-button>
  242. <el-button @click="openSubDetailImport">
  243. <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>
  244. </el-button>
  245. </el-form-item>
  246. </el-form>
  247. <el-form :inline="true" label-position="top">
  248. <el-form-item :label="'检验结论'">
  249. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
  250. <el-option label="合格" value="合格"></el-option>
  251. <el-option label="不合格" value="不合格"></el-option>
  252. </el-select>
  253. <el-select v-else v-model="detailData.inspectionResult" @change="resultChange" style="width: 100px" placeholder="请选择">
  254. <el-option label="合格" value="合格"></el-option>
  255. <el-option label="不合格" value="不合格"></el-option>
  256. </el-select>
  257. </el-form-item>
  258. <el-form-item :label="'质检备注'">
  259. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 293px"></el-input>
  260. <el-input v-else v-model="detailData.inspectionRemark" style="width: 293px"></el-input>
  261. </el-form-item>
  262. <el-form-item v-show="detailData.inspectionResult === '不合格'" style="margin-top: 5px">
  263. <el-form-item :label="'处置措施'">
  264. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px">
  265. <el-option
  266. v-for="i in disposalMeasuresOptions"
  267. :key="i.id"
  268. :label="i.disposalMeasures"
  269. :value="i.disposalMeasures">
  270. </el-option>
  271. </el-select>
  272. <el-select v-else clearable v-model="detailData.disposalMeasures" style="width: 100px">
  273. <el-option
  274. v-for="i in disposalMeasuresOptions"
  275. :key="i.id"
  276. :label="i.disposalMeasures"
  277. :value="i.disposalMeasures">
  278. </el-option>
  279. </el-select>
  280. </el-form-item>
  281. <el-form-item :label="'处置说明'">
  282. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input>
  283. <el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input>
  284. </el-form-item>
  285. </el-form-item>
  286. </el-form>
  287. <div class="rq">
  288. <el-table
  289. :height="500"
  290. :data="detailList"
  291. border
  292. style="width: 100%;">
  293. <el-table-column
  294. prop=""
  295. header-align="center"
  296. align="center"
  297. :min-width="90"
  298. label="操作">
  299. <template slot-scope="scope">
  300. <el-button class="el-icon-picture" v-if="scope.row.imageDetailNum > 0" type="success" @click="uploadImageModal(scope.row)"></el-button>
  301. <el-button class="el-icon-picture" v-else type="primary" @click="uploadImageModal(scope.row)"></el-button>
  302. </template>
  303. </el-table-column>
  304. <el-table-column
  305. v-for="(item,index) in detailColumnList"
  306. :key="index"
  307. :sortable="item.columnSortable"
  308. :prop="item.columnProp"
  309. :header-align="item.headerAlign"
  310. :show-overflow-tooltip="item.showOverflowTooltip"
  311. :align="item.align"
  312. :fixed="item.fixed===''?false:item.fixed"
  313. :min-width="item.columnWidth"
  314. :label="item.columnLabel">
  315. <template slot-scope="scope">
  316. <span v-if="!item.columnHidden">
  317. <template v-if="item.columnProp === 'pictureFlag'">
  318. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  319. </template>
  320. <template v-else>{{ scope.row[item.columnProp] }}</template>
  321. </span>
  322. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  323. </template>
  324. </el-table-column>
  325. <el-table-column
  326. prop=""
  327. header-align="center"
  328. align="right"
  329. :min-width="80"
  330. label="实测值">
  331. <template slot-scope="scope">
  332. <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>
  333. <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>
  334. </template>
  335. </el-table-column>
  336. <el-table-column
  337. prop=""
  338. header-align="center"
  339. align="center"
  340. :min-width="80"
  341. label="检验明细">
  342. <template slot-scope="scope">
  343. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row)">点击输入</el-button>
  344. <el-button v-else type="primary" @click="subDetailModal(scope.row)">点击输入</el-button>
  345. </template>
  346. </el-table-column>
  347. <el-table-column
  348. prop=""
  349. header-align="center"
  350. align="right"
  351. :min-width="80"
  352. label="抽样数量">
  353. <template slot-scope="scope">
  354. <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>
  355. <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>
  356. </template>
  357. </el-table-column>
  358. <el-table-column
  359. prop=""
  360. header-align="center"
  361. align="right"
  362. :min-width="80"
  363. label="不合格数量">
  364. <template slot-scope="scope">
  365. <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>
  366. <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>
  367. </template>
  368. </el-table-column>
  369. <el-table-column
  370. prop=""
  371. header-align="center"
  372. align="center"
  373. :min-width="90"
  374. label="项目检验结论">
  375. <template slot-scope="scope">
  376. <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">
  377. <el-option label="合格" value="Y" style="color: green"></el-option>
  378. <el-option label="不合格" value="N" style="color: red"></el-option>
  379. </el-select>
  380. <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="合格">
  381. <el-option label="合格" value="Y" style="color: green"></el-option>
  382. <el-option label="不合格" value="N" style="color: red"></el-option>
  383. </el-select>
  384. </template>
  385. </el-table-column>
  386. </el-table>
  387. </div>
  388. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  389. <el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">分批保存</el-button>
  390. <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
  391. <el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="danger" :loading="transferLoadFlag" style="margin-left: 40px" @click="Transfer('2')">最终检验完成</el-button>
  392. </el-footer>
  393. </el-dialog>
  394. <!-- 子明细信息 -->
  395. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="1102px">
  396. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  397. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  398. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  399. <div class="rq">
  400. <el-table
  401. :height="400"
  402. :data="templateTableData"
  403. border
  404. v-loading="subDetailLoading"
  405. element-loading-text="拼命加载中"
  406. :row-class-name="rowClassName"
  407. @selection-change="handleDetailSelectionChange"
  408. style="width: 100%;">
  409. <el-table-column type="selection" align="center" width="40"></el-table-column>
  410. <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
  411. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
  412. <template slot-scope="{row}">
  413. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  414. <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>
  415. </template>
  416. </el-table-column>
  417. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
  418. <template slot-scope="{row}">
  419. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  420. <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>
  421. </template>
  422. </el-table-column>
  423. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
  424. <template slot-scope="{row}">
  425. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
  426. <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>
  427. </template>
  428. </el-table-column>
  429. <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
  430. <template slot-scope="{row}">
  431. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
  432. <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>
  433. </template>
  434. </el-table-column>
  435. <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
  436. <template slot-scope="{row}">
  437. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
  438. <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>
  439. </template>
  440. </el-table-column>
  441. <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
  442. <template slot-scope="{row}">
  443. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
  444. <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>
  445. </template>
  446. </el-table-column>
  447. <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
  448. <template slot-scope="{row}">
  449. <el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
  450. <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>
  451. </template>
  452. </el-table-column>
  453. </el-table>
  454. <el-pagination
  455. @size-change="sizeChangeHandle2"
  456. @current-change="currentChangeHandle2"
  457. :current-page="pageIndex2"
  458. :page-sizes="[20, 50, 100, 200, 500]"
  459. :page-size="pageSize2"
  460. :total="tableData.length"
  461. layout="total, sizes, prev, pager, next, jumper">
  462. </el-pagination>
  463. </div>
  464. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  465. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" :loading="subDetailVisiable" @click="saveSubDetailResult">保存</el-button>
  466. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  467. </el-footer>
  468. </el-dialog>
  469. <!-- 人员清单 -->
  470. <el-dialog title="人员清单" :close-on-click-modal="false" v-drag :visible.sync="operatorModelFlag" width="820px">
  471. <div class="rq">
  472. <el-form :inline="true" label-position="top" :model="operatorData">
  473. <el-form-item v-if="operatorData.flag !== '2'" :label="'所属角色'">
  474. <el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px">
  475. <el-option
  476. v-for="i in roleList"
  477. :key="i.roleId"
  478. :label="i.roleName"
  479. :value="i.roleId">
  480. </el-option>
  481. </el-select>
  482. </el-form-item>
  483. <el-form-item :label="'用户编码'">
  484. <el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input>
  485. </el-form-item>
  486. <el-form-item :label="'用户姓名'">
  487. <el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input>
  488. </el-form-item>
  489. <el-form-item :label="' '">
  490. <el-button type="primary" @click="getOperatorList2">查询</el-button>
  491. </el-form-item>
  492. </el-form>
  493. <el-table
  494. :height="300"
  495. :data="operatorList"
  496. ref="operatorTable"
  497. @row-click="operatorClickRow"
  498. @selection-change="selectionChangeHandle2"
  499. border
  500. style="width: 100%;">
  501. <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
  502. <el-table-column
  503. v-for="(item,index) in operatorDetailList"
  504. :key="index"
  505. :sortable="item.columnSortable"
  506. :prop="item.columnProp"
  507. :header-align="item.headerAlign"
  508. :show-overflow-tooltip="item.showOverflowTooltip"
  509. :align="item.align"
  510. :fixed="item.fixed===''?false:item.fixed"
  511. :min-width="item.columnWidth"
  512. :label="item.columnLabel">
  513. <template slot-scope="scope">
  514. <span v-if="!item.columnHidden">
  515. <template v-if="item.columnProp === 'pictureFlag'">
  516. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  517. </template>
  518. <template v-else>{{ scope.row[item.columnProp] }}</template>
  519. </span>
  520. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  521. </template>
  522. </el-table-column>
  523. </el-table>
  524. </div>
  525. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  526. <el-button type="primary" @click="confirmOperator">确认</el-button>
  527. <el-button type="primary" @click="operatorModelFlag = false">关闭</el-button>
  528. </el-footer>
  529. </el-dialog>
  530. <!-- 配置项目设备 -->
  531. <el-dialog title="检验项目" :close-on-click-modal="false" v-drag :visible.sync="ItemObjectModelFlag" width="666px">
  532. <div class="rq">
  533. <el-table :height="350" :data="itemObjectList" border style="width: 100%">
  534. <el-table-column
  535. v-for="(item,index) in itemObjectColumnList"
  536. :key="index"
  537. :sortable="item.columnSortable"
  538. :prop="item.columnProp"
  539. :header-align="item.headerAlign"
  540. :show-overflow-tooltip="item.showOverflowTooltip"
  541. :align="item.align"
  542. :fixed="item.fixed===''?false:item.fixed"
  543. :min-width="item.columnWidth"
  544. :label="item.columnLabel">
  545. <template slot-scope="scope">
  546. <span v-if="!item.columnHidden">
  547. <template v-if="item.columnProp === 'pictureFlag'">
  548. <span :style="{ color: scope.row[item.columnProp] === 'Y' ? 'red' : '' }">{{ scope.row[item.columnProp] === 'Y' ? '是' : scope.row[item.columnProp] === 'N' ? '否' : scope.row[item.columnProp] }}</span>
  549. </template>
  550. <template v-else>{{ scope.row[item.columnProp] }}</template>
  551. </span>
  552. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  553. </template>
  554. </el-table-column>
  555. <el-table-column header-align="center" align="center" :min-width="100" label="设备">
  556. <template slot-scope="scope">
  557. <el-select v-model="scope.row.equipmentNo" style="height: 11px" placeholder="请选择设备">
  558. <el-option
  559. v-for="i in scope.row.objectList"
  560. :key="i.objectID"
  561. :label="i.objectDesc"
  562. :value="i.objectID">
  563. </el-option>
  564. </el-select>
  565. </template>
  566. </el-table-column>
  567. </el-table>
  568. </div>
  569. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  570. <el-button type="primary" @click="actionModal2">保存</el-button>
  571. <el-button type="primary" @click="ItemObjectModelFlag=false">关闭</el-button>
  572. </el-footer>
  573. </el-dialog>
  574. <!-- 批量新增子明细 -->
  575. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  576. <el-form :inline="true" label-position="top">
  577. <el-form-item :label="'默认抽样位置A'">
  578. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  579. </el-form-item>
  580. <el-form-item :label="'默认抽样位置B'">
  581. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  582. </el-form-item>
  583. <el-form-item :label="'抽样数量'">
  584. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  585. </el-form-item>
  586. </el-form>
  587. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  588. <el-button type="primary" @click="batchHandleAddModal">保存</el-button>
  589. <el-button type="primary" @click="batchHandleAddModalFlag=false">关闭</el-button>
  590. </el-footer>
  591. </el-dialog>
  592. <!-- 文件清单 -->
  593. <el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
  594. <el-form :inline="true" label-position="top">
  595. <el-form-item v-if="detailInformationFlag">
  596. <el-button type="primary" @click="addUploadFileModal">上传文件</el-button>
  597. </el-form-item>
  598. </el-form>
  599. <sqc-file-table :columns="fileColumnList" :data-list="fileContentList" :query-loading="fileLoading" @refresh="getFileContentData(detailData)"></sqc-file-table>
  600. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  601. <el-button type="primary" @click="fileFlag = false">关闭</el-button>
  602. </el-footer>
  603. </el-dialog>
  604. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  605. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="()=>{this.getFileContentData(this.detailData)}" v-drag></qcFAIUploadFile>
  606. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData" v-drag></comQcItemImageUploadFile>
  607. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData" v-drag></subDetailUpload>
  608. <qr-code ref="qrCode"></qr-code>
  609. </div>
  610. </template>
  611. <script>
  612. import {
  613. qcSQCInspectionSearch,
  614. sqcDetailSearch,
  615. inspectorSearch,
  616. selectSQCSubDetailedRecord,
  617. saveSQCDetailedRecord,
  618. checkSQCIsSubmit,
  619. saveSQCSubDetailed,
  620. saveSQCSubmitResult,
  621. sqcRecordDelete,
  622. disposalMeasuresSearch,
  623. sqcRecordOverLoad,
  624. actionSQCInspection,
  625. getResponsibleOperatorList,
  626. getSQCItemObjectList,
  627. cancelSQCApproval,
  628. } from "@/api/qc/qc.js"
  629. import Chooselist from '@/views/modules/common/Chooselist_eam'
  630. import {getInspectionFile} from '@/api/eam/eam_object_list.js'
  631. import {
  632. getUserRoleList,
  633. getOperatorList
  634. } from '@/api/eam/eam.js'
  635. import {qcPrint} from '@/api/qc/qcPrint.js'
  636. import qcFAIUploadFile from "./qc_FAI_upload_file"
  637. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  638. import subDetailUpload from "./sub_detail_upload"
  639. import QrCode from "../common/QrCode.vue";
  640. import SqcFileTable from "./SQCFileTable.vue";
  641. export default {
  642. components: {
  643. SqcFileTable,
  644. QrCode,
  645. Chooselist,
  646. qcFAIUploadFile,
  647. comQcItemImageUploadFile,
  648. subDetailUpload
  649. },
  650. computed: {
  651. templateTableData () {
  652. let start = (this.pageIndex2 - 1) * this.pageSize2
  653. let end = start + this.pageSize2
  654. if (end > this.tableData.length){
  655. end = this.tableData.length
  656. }
  657. return this.tableData.slice(start,end)
  658. }
  659. },
  660. watch: {
  661. detailData: {
  662. deep: true,
  663. handler: function () {
  664. const roll = Number(this.detailData.rollQty) || 0
  665. const samp = Number(this.detailData.samplingQty) || 0
  666. const pass = Number(this.detailData.passQty) || 0
  667. this.detailData.notPassQty = samp - pass
  668. if (this.detailData.inspectionResult === '不合格') {
  669. if (this.detailData.disposalMeasures === '让步接收' || this.detailData.disposalMeasures === '') {
  670. this.detailData.batchQualifiedQty = roll
  671. } else if (this.detailData.disposalMeasures === '挑选使用') {
  672. this.detailData.batchQualifiedQty = roll - (Number(this.detailData.notPassQty) || 0)
  673. } else {
  674. this.detailData.batchQualifiedQty = 0
  675. }
  676. } else {
  677. this.detailData.batchQualifiedQty = roll
  678. }
  679. this.detailData.notbatchQualifiedQty = roll - (Number(this.detailData.batchQualifiedQty) || 0)
  680. }
  681. },
  682. detailList: {
  683. deep: true,
  684. handler: function () {
  685. let num2 = 0
  686. for (let i = 0; i < this.detailList.length; i++) {
  687. if (this.detailList[i].itemResult === 'N') {
  688. num2++
  689. }
  690. }
  691. this.detailData.unqualifiedQty = num2
  692. }
  693. }
  694. },
  695. data () {
  696. return {
  697. exportData: [],
  698. exportName: "SQC检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  699. exportHeader: ["SQC检验录入"],
  700. exportFooter: [],
  701. // 其他数据结构沿用原页面(避免功能缺失),仅替换接口与显示文案
  702. searchData: {
  703. page: 1,
  704. limit: 20,
  705. site: '',
  706. inspectionNo: '',
  707. states: [],
  708. inspectionResult: '',
  709. partNo: '',
  710. partDesc: '',
  711. supplierDesc: '',
  712. inspectorName: '',
  713. startDate: null,
  714. endDate: null,
  715. startDate2: null,
  716. endDate2: null,
  717. poOrderNo: '',
  718. poItemNo: '',
  719. orderType: '',
  720. submissionType: '',
  721. cinvSourceCode: '',
  722. sku: '',
  723. spec: '',
  724. disposalMeasures: ''
  725. },
  726. dataList: [],
  727. detailList: [],
  728. detailData: {
  729. site: '',
  730. buNo: '',
  731. inspectionNo: '',
  732. partNo: '',
  733. partDesc: '',
  734. rollQty: '',
  735. samplingQty: 0,
  736. unqualifiedQty: 0,
  737. unqualifiedQuantity: '',
  738. disposalMeasures: '',
  739. disposalRemark: '',
  740. inspectionResult: '',
  741. inspectorNo: '',
  742. inspectorName: '',
  743. inspectionRemark: '',
  744. submitFlag: '',
  745. cinvSourceCode: '',
  746. sku: '',
  747. invdefinetype: '',
  748. umId: '',
  749. umName: '',
  750. operator: '',
  751. operatorName: '',
  752. responsiblePerson: '',
  753. responsiblePersonName: '',
  754. state: '',
  755. passQty: 0,
  756. notPassQty: 0,
  757. batchQualifiedQty: 0,
  758. notbatchQualifiedQty: 0
  759. },
  760. saveInformationData: {
  761. site: '',
  762. buNo: '',
  763. inspectionNo: '',
  764. disposalMeasures: '',
  765. disposalRemark: '',
  766. inspectorNo: '',
  767. inspectionRemark: '',
  768. samplingQty: '',
  769. rollQty: '',
  770. itemList: [],
  771. unqualifiedQty: '',
  772. partNo: '',
  773. partDesc: '',
  774. operator: '',
  775. operatorName: '',
  776. responsiblePerson: '',
  777. responsiblePersonName: '',
  778. subDetailList: [],
  779. type: '',
  780. passQty: '',
  781. notPassQty: '',
  782. batchQualifiedQty: ''
  783. },
  784. fileFlag: false,
  785. fileColumnList: [
  786. {
  787. columnProp: 'fileName',
  788. headerAlign: 'center',
  789. align: 'center',
  790. columnLabel: '文件名称',
  791. columnHidden: false,
  792. columnImage: false,
  793. columnSortable: false,
  794. sortLv: 0,
  795. status: true,
  796. fixed: ''
  797. },
  798. {
  799. columnProp: 'createdBy',
  800. headerAlign: 'center',
  801. align: 'center',
  802. columnLabel: '上传人',
  803. columnHidden: false,
  804. columnImage: false,
  805. columnSortable: true,
  806. sortLv: 0,
  807. status: true,
  808. fixed: false
  809. },
  810. {
  811. columnProp: 'createDate',
  812. headerAlign: 'center',
  813. align: 'center',
  814. columnLabel: '上传时间',
  815. columnHidden: false,
  816. columnImage: false,
  817. columnSortable: true,
  818. sortLv: 0,
  819. status: true,
  820. fixed: false
  821. },
  822. {
  823. columnProp: 'orderRef3',
  824. headerAlign: 'center',
  825. align: 'center',
  826. columnLabel: '备注',
  827. columnHidden: false,
  828. columnImage: false,
  829. columnSortable: true,
  830. sortLv: 0,
  831. status: true,
  832. fixed: false
  833. }
  834. ],
  835. fileContentList: [],
  836. fileLoading: false,
  837. detailInformationFlag: false,
  838. pageIndex: 1,
  839. pageSize: 20,
  840. totalPage: 0,
  841. pageIndex2: 1,
  842. pageSize2: 20,
  843. tableData: [],
  844. columnList1: [
  845. {
  846. userId: this.$store.state.user.name,
  847. functionId: 301015,
  848. serialNumber: '301015Table1BuDesc',
  849. tableId: "301015Table1",
  850. tableName: "SQC检验记录表",
  851. columnProp: 'site',
  852. headerAlign: "center",
  853. align: "center",
  854. columnLabel: '工厂编号',
  855. columnHidden: false,
  856. columnImage: false,
  857. columnSortable: false,
  858. sortLv: 0,
  859. status: true,
  860. fixed: '',
  861. columnWidth: 100,
  862. },
  863. {
  864. userId: this.$store.state.user.name,
  865. functionId: 301015,
  866. serialNumber: '301015Table1InspectionNo',
  867. tableId: "301015Table1",
  868. tableName: "SQC检验记录表",
  869. columnProp: 'inspectionNo',
  870. headerAlign: "center",
  871. align: "center",
  872. columnLabel: '检验单号',
  873. columnHidden: false,
  874. columnImage: false,
  875. columnSortable: false,
  876. sortLv: 0,
  877. status: true,
  878. fixed: '',
  879. columnWidth: 120,
  880. },
  881. {
  882. userId: this.$store.state.user.name,
  883. functionId: 301015,
  884. serialNumber: '301015Table1PartNo',
  885. tableId: "301015Table1",
  886. tableName: "SQC检验记录表",
  887. columnProp: 'partNo',
  888. headerAlign: "center",
  889. align: "center",
  890. columnLabel: '物料编码',
  891. columnHidden: false,
  892. columnImage: false,
  893. columnSortable: false,
  894. sortLv: 0,
  895. status: true,
  896. fixed: '',
  897. columnWidth: 120,
  898. },
  899. {
  900. userId: this.$store.state.user.name,
  901. functionId: 301015,
  902. serialNumber: '301015Table1Spec',
  903. tableId: "301015Table1",
  904. tableName: "SQC检验记录表",
  905. columnProp: 'spec',
  906. headerAlign: "center",
  907. align: "left",
  908. columnLabel: '规格型号',
  909. columnHidden: false,
  910. columnImage: false,
  911. columnSortable: false,
  912. sortLv: 0,
  913. status: true,
  914. fixed: '',
  915. columnWidth: 120,
  916. },
  917. {
  918. userId: this.$store.state.user.name,
  919. functionId: 301015,
  920. serialNumber: '301015Table1PartDesc',
  921. tableId: "301015Table1",
  922. tableName: "SQC检验记录表",
  923. columnProp: 'partDesc',
  924. headerAlign: "center",
  925. align: "left",
  926. columnLabel: '物料名称',
  927. columnHidden: false,
  928. columnImage: false,
  929. columnSortable: false,
  930. sortLv: 0,
  931. status: true,
  932. fixed: '',
  933. columnWidth: 300,
  934. },
  935. {
  936. userId: this.$store.state.user.name,
  937. functionId: 301015,
  938. serialNumber: '301015Table1RollNo',
  939. tableId: "301015Table1",
  940. tableName: "SQC检验记录表",
  941. columnProp: 'rollNo',
  942. headerAlign: "center",
  943. align: "center",
  944. columnLabel: '标签条码',
  945. columnHidden: false,
  946. columnImage: false,
  947. columnSortable: false,
  948. sortLv: 0,
  949. status: true,
  950. fixed: '',
  951. columnWidth: 150,
  952. },
  953. {
  954. userId: this.$store.state.user.name,
  955. functionId: 301015,
  956. serialNumber: '301015Table1InspectionResult',
  957. tableId: "301015Table1",
  958. tableName: "SQC检验记录表",
  959. columnProp: 'inspectionResult',
  960. headerAlign: "center",
  961. align: "center",
  962. columnLabel: '检验结论',
  963. columnHidden: false,
  964. columnImage: false,
  965. columnSortable: false,
  966. sortLv: 0,
  967. status: true,
  968. fixed: '',
  969. columnWidth: 100,
  970. },
  971. {
  972. userId: this.$store.state.user.name,
  973. functionId: 301015,
  974. serialNumber: '301015Table1DisposalMeasures',
  975. tableId: "301015Table1",
  976. tableName: "SQC检验记录表",
  977. columnProp: 'disposalMeasures',
  978. headerAlign: "center",
  979. align: "center",
  980. columnLabel: '处置措施',
  981. columnHidden: false,
  982. columnImage: false,
  983. columnSortable: false,
  984. sortLv: 0,
  985. status: true,
  986. fixed: '',
  987. columnWidth: 100,
  988. },
  989. {
  990. userId: this.$store.state.user.name,
  991. functionId: 301015,
  992. serialNumber: '301015Table1TaskDate',
  993. tableId: "301015Table1",
  994. tableName: "SQC检验记录表",
  995. columnProp: 'taskDate',
  996. headerAlign: "center",
  997. align: "center",
  998. columnLabel: '送检日期',
  999. columnHidden: false,
  1000. columnImage: false,
  1001. columnSortable: false,
  1002. sortLv: 0,
  1003. status: true,
  1004. fixed: '',
  1005. columnWidth: 130,
  1006. },
  1007. {
  1008. userId: this.$store.state.user.name,
  1009. functionId: 301015,
  1010. serialNumber: '301015Table1InspectionCycle',
  1011. tableId: "301015Table1",
  1012. tableName: "SQC检验记录表",
  1013. columnProp: 'inspectionCycle',
  1014. headerAlign: "center",
  1015. align: "right",
  1016. columnLabel: '检验周期(h)',
  1017. columnHidden: false,
  1018. columnImage: false,
  1019. columnSortable: false,
  1020. sortLv: 0,
  1021. status: true,
  1022. fixed: '',
  1023. columnWidth: 100,
  1024. },
  1025. {
  1026. userId: this.$store.state.user.name,
  1027. functionId: 301015,
  1028. serialNumber: '301015Table1OrderNo',
  1029. tableId: "301015Table1",
  1030. tableName: "SQC检验记录表",
  1031. columnProp: 'orderNo',
  1032. headerAlign: "center",
  1033. align: "left",
  1034. columnLabel: '工单号',
  1035. columnHidden: false,
  1036. columnImage: false,
  1037. columnSortable: false,
  1038. sortLv: 0,
  1039. status: true,
  1040. fixed: '',
  1041. columnWidth: 150,
  1042. },
  1043. {
  1044. userId: this.$store.state.user.name,
  1045. functionId: 301015,
  1046. serialNumber: '301015Table1SeqNo',
  1047. tableId: "301015Table1",
  1048. tableName: "SQC检验记录表",
  1049. columnProp: 'seqNo',
  1050. headerAlign: "center",
  1051. align: "left",
  1052. columnLabel: '派工单号',
  1053. columnHidden: false,
  1054. columnImage: false,
  1055. columnSortable: false,
  1056. sortLv: 0,
  1057. status: true,
  1058. fixed: '',
  1059. columnWidth: 150,
  1060. },
  1061. {
  1062. userId: this.$store.state.user.name,
  1063. functionId: 301015,
  1064. serialNumber: '301015Table1OperationDesc',
  1065. tableId: "301015Table1",
  1066. tableName: "SQC检验记录表",
  1067. columnProp: 'operationDesc',
  1068. headerAlign: "center",
  1069. align: "left",
  1070. columnLabel: '工序',
  1071. columnHidden: false,
  1072. columnImage: false,
  1073. columnSortable: false,
  1074. sortLv: 0,
  1075. status: true,
  1076. fixed: '',
  1077. columnWidth: 120,
  1078. },
  1079. {
  1080. userId: this.$store.state.user.name,
  1081. functionId: 301015,
  1082. serialNumber: '301015Table1ResourceDesc',
  1083. tableId: "301015Table1",
  1084. tableName: "SQC检验记录表",
  1085. columnProp: 'resourceDesc',
  1086. headerAlign: "center",
  1087. align: "left",
  1088. columnLabel: '机台',
  1089. columnHidden: false,
  1090. columnImage: false,
  1091. columnSortable: false,
  1092. sortLv: 0,
  1093. status: true,
  1094. fixed: '',
  1095. columnWidth: 120,
  1096. },
  1097. {
  1098. userId: this.$store.state.user.name,
  1099. functionId: 301015,
  1100. serialNumber: '301015Table1Sku',
  1101. tableId: "301015Table1",
  1102. tableName: "SQC检验记录表",
  1103. columnProp: 'sku',
  1104. headerAlign: "center",
  1105. align: "center",
  1106. columnLabel: 'SKU',
  1107. columnHidden: false,
  1108. columnImage: false,
  1109. columnSortable: false,
  1110. sortLv: 0,
  1111. status: true,
  1112. fixed: '',
  1113. columnWidth: 120,
  1114. },
  1115. {
  1116. userId: this.$store.state.user.name,
  1117. functionId: 301015,
  1118. serialNumber: '301015Table1CinvSourceCode',
  1119. tableId: "301015Table1",
  1120. tableName: "SQC检验记录表",
  1121. columnProp: 'cinvSourceCode',
  1122. headerAlign: "center",
  1123. align: "center",
  1124. columnLabel: 'PN',
  1125. columnHidden: false,
  1126. columnImage: false,
  1127. columnSortable: false,
  1128. sortLv: 0,
  1129. status: true,
  1130. fixed: '',
  1131. columnWidth: 120,
  1132. },
  1133. {
  1134. userId: this.$store.state.user.name,
  1135. functionId: 301015,
  1136. serialNumber: '301015Table1Invdefinetype',
  1137. tableId: "301015Table1",
  1138. tableName: "SQC检验记录表",
  1139. columnProp: 'invdefinetype',
  1140. headerAlign: "center",
  1141. align: "left",
  1142. columnLabel: '物料类别',
  1143. columnHidden: false,
  1144. columnImage: false,
  1145. columnSortable: false,
  1146. sortLv: 0,
  1147. status: true,
  1148. fixed: '',
  1149. columnWidth: 120,
  1150. },
  1151. {
  1152. userId: this.$store.state.user.name,
  1153. functionId: 301015,
  1154. serialNumber: '301015Table1RollQty',
  1155. tableId: "301015Table1",
  1156. tableName: "SQC检验记录表",
  1157. columnProp: 'rollQty',
  1158. headerAlign: "center",
  1159. align: "right",
  1160. columnLabel: '送检数量',
  1161. columnHidden: false,
  1162. columnImage: false,
  1163. columnSortable: false,
  1164. sortLv: 0,
  1165. status: true,
  1166. fixed: '',
  1167. columnWidth: 100,
  1168. },
  1169. {
  1170. userId: this.$store.state.user.name,
  1171. functionId: 301015,
  1172. serialNumber: '301015Table1SamplingQty',
  1173. tableId: "301015Table1",
  1174. tableName: "SQC检验记录表",
  1175. columnProp: 'samplingQty',
  1176. headerAlign: "center",
  1177. align: "right",
  1178. columnLabel: '抽样数量',
  1179. columnHidden: false,
  1180. columnImage: false,
  1181. columnSortable: false,
  1182. sortLv: 0,
  1183. status: true,
  1184. fixed: '',
  1185. columnWidth: 100,
  1186. },
  1187. {
  1188. userId: this.$store.state.user.name,
  1189. functionId: 301015,
  1190. serialNumber: '301015Table1UmName',
  1191. tableId: "301015Table1",
  1192. tableName: "SQC检验记录表",
  1193. columnProp: 'umName',
  1194. headerAlign: "center",
  1195. align: "center",
  1196. columnLabel: '单位',
  1197. columnHidden: false,
  1198. columnImage: false,
  1199. columnSortable: false,
  1200. sortLv: 0,
  1201. status: true,
  1202. fixed: '',
  1203. columnWidth: 100,
  1204. },
  1205. {
  1206. userId: this.$store.state.user.name,
  1207. functionId: 301015,
  1208. serialNumber: '301015Table1InspectionRemark',
  1209. tableId: "301015Table1",
  1210. tableName: "SQC检验记录表",
  1211. columnProp: 'inspectionRemark',
  1212. headerAlign: "center",
  1213. align: "left",
  1214. columnLabel: '质检备注',
  1215. columnHidden: false,
  1216. columnImage: false,
  1217. columnSortable: false,
  1218. sortLv: 0,
  1219. status: true,
  1220. fixed: '',
  1221. columnWidth: 200,
  1222. },
  1223. {
  1224. userId: this.$store.state.user.name,
  1225. functionId: 301015,
  1226. serialNumber: '301015Table1DisposalRemark',
  1227. tableId: "301015Table1",
  1228. tableName: "SQC检验记录表",
  1229. columnProp: 'disposalRemark',
  1230. headerAlign: "center",
  1231. align: "left",
  1232. columnLabel: '处置说明',
  1233. columnHidden: false,
  1234. columnImage: false,
  1235. columnSortable: false,
  1236. sortLv: 0,
  1237. status: true,
  1238. fixed: '',
  1239. columnWidth: 200,
  1240. },
  1241. {
  1242. userId: this.$store.state.user.name,
  1243. functionId: 301015,
  1244. serialNumber: '301015Table1ActionDate',
  1245. tableId: "301015Table1",
  1246. tableName: "SQC检验记录表",
  1247. columnProp: 'actionDate',
  1248. headerAlign: "center",
  1249. align: "center",
  1250. columnLabel: '开始检验时间',
  1251. columnHidden: false,
  1252. columnImage: false,
  1253. columnSortable: false,
  1254. sortLv: 0,
  1255. status: true,
  1256. fixed: '',
  1257. columnWidth: 170,
  1258. },
  1259. {
  1260. userId: this.$store.state.user.name,
  1261. functionId: 301015,
  1262. serialNumber: '301015Table1InspectorDate',
  1263. tableId: "301015Table1",
  1264. tableName: "SQC检验记录表",
  1265. columnProp: 'inspectorDate',
  1266. headerAlign: "center",
  1267. align: "center",
  1268. columnLabel: '检验时间',
  1269. columnHidden: false,
  1270. columnImage: false,
  1271. columnSortable: false,
  1272. sortLv: 0,
  1273. status: true,
  1274. fixed: '',
  1275. columnWidth: 170,
  1276. },
  1277. {
  1278. userId: this.$store.state.user.name,
  1279. functionId: 301015,
  1280. serialNumber: '301015Table1InspectorName',
  1281. tableId: "301015Table1",
  1282. tableName: "SQC检验记录表",
  1283. columnProp: 'inspectorName',
  1284. headerAlign: "center",
  1285. align: "center",
  1286. columnLabel: '质检员',
  1287. columnHidden: false,
  1288. columnImage: false,
  1289. columnSortable: false,
  1290. sortLv: 0,
  1291. status: true,
  1292. fixed: '',
  1293. columnWidth: 100,
  1294. },
  1295. {
  1296. userId: this.$store.state.user.name,
  1297. functionId: 301015,
  1298. serialNumber: '301015Table1SpecialRequirements',
  1299. tableId: "301015Table1",
  1300. tableName: "SQC检验记录表",
  1301. columnProp: 'specialRequirements',
  1302. headerAlign: "center",
  1303. align: "left",
  1304. columnLabel: '特殊要求',
  1305. columnHidden: false,
  1306. columnImage: false,
  1307. columnSortable: false,
  1308. sortLv: 0,
  1309. status: true,
  1310. fixed: '',
  1311. columnWidth: 200,
  1312. },
  1313. ],
  1314. detailColumnList: [
  1315. {
  1316. userId: this.$store.state.user.name,
  1317. functionId: 301015,
  1318. serialNumber: '301015Table2ItemNo',
  1319. tableId: '301015Table2',
  1320. tableName: '检验单明细表',
  1321. columnProp: 'itemNo',
  1322. headerAlign: 'center',
  1323. align: 'center',
  1324. columnLabel: '检验项目编码',
  1325. columnHidden: false,
  1326. columnImage: false,
  1327. columnSortable: false,
  1328. sortLv: 0,
  1329. status: true,
  1330. fixed: '',
  1331. columnWidth: 120
  1332. },
  1333. {
  1334. userId: this.$store.state.user.name,
  1335. functionId: 301015,
  1336. serialNumber: '301015Table2ItemDesc',
  1337. tableId: '301015Table2',
  1338. tableName: '检验单明细表',
  1339. columnProp: 'itemDesc',
  1340. headerAlign: 'center',
  1341. align: 'left',
  1342. columnLabel: '检验项目名称',
  1343. columnHidden: false,
  1344. columnImage: false,
  1345. columnSortable: false,
  1346. sortLv: 0,
  1347. status: true,
  1348. fixed: '',
  1349. columnWidth: 150
  1350. },
  1351. {
  1352. userId: this.$store.state.user.name,
  1353. functionId: 301015,
  1354. serialNumber: '301015Table2SamplingLevelDesc',
  1355. tableId: '301015Table2',
  1356. tableName: '检验单明细表',
  1357. columnProp: 'samplingLevelDesc',
  1358. headerAlign: 'center',
  1359. align: 'left',
  1360. columnLabel: '检验水平',
  1361. columnHidden: false,
  1362. columnImage: false,
  1363. columnSortable: false,
  1364. sortLv: 0,
  1365. status: true,
  1366. fixed: '',
  1367. columnWidth: 120
  1368. },
  1369. {
  1370. userId: this.$store.state.user.name,
  1371. functionId: 301015,
  1372. serialNumber: '301015Table2SamplingProgrammeDesc',
  1373. tableId: '301015Table2',
  1374. tableName: '检验单明细表',
  1375. columnProp: 'samplingProgrammeDesc',
  1376. headerAlign: 'center',
  1377. align: 'left',
  1378. columnLabel: '检验方案',
  1379. columnHidden: false,
  1380. columnImage: false,
  1381. columnSortable: false,
  1382. sortLv: 0,
  1383. status: true,
  1384. fixed: '',
  1385. columnWidth: 120
  1386. },
  1387. {
  1388. userId: this.$store.state.user.name,
  1389. functionId: 301015,
  1390. serialNumber: '301015Table2MethodName',
  1391. tableId: '301015Table2',
  1392. tableName: '检验单明细表',
  1393. columnProp: 'methodName',
  1394. headerAlign: 'center',
  1395. align: 'left',
  1396. columnLabel: '检验方法',
  1397. columnHidden: false,
  1398. columnImage: false,
  1399. columnSortable: false,
  1400. sortLv: 0,
  1401. status: true,
  1402. fixed: '',
  1403. columnWidth: 120
  1404. },
  1405. {
  1406. userId: this.$store.state.user.name,
  1407. functionId: 301015,
  1408. serialNumber: '301015Table2MethodRemark',
  1409. tableId: '301015Table2',
  1410. tableName: '检验单明细表',
  1411. columnProp: 'methodRemark',
  1412. headerAlign: 'center',
  1413. align: 'left',
  1414. columnLabel: '检验方法说明',
  1415. columnHidden: false,
  1416. columnImage: false,
  1417. columnSortable: false,
  1418. sortLv: 0,
  1419. status: true,
  1420. fixed: '',
  1421. columnWidth: 200
  1422. },
  1423. {
  1424. userId: this.$store.state.user.name,
  1425. functionId: 301015,
  1426. serialNumber: '301015Table2ObjectDesc',
  1427. tableId: '301015Table2',
  1428. tableName: '检验单明细表',
  1429. columnProp: 'objectDesc',
  1430. headerAlign: 'center',
  1431. align: 'center',
  1432. columnLabel: '检测仪器',
  1433. columnHidden: false,
  1434. columnImage: false,
  1435. columnSortable: false,
  1436. sortLv: 0,
  1437. status: true,
  1438. fixed: '',
  1439. columnWidth: 120
  1440. },
  1441. {
  1442. userId: this.$store.state.user.name,
  1443. functionId: 301006,
  1444. serialNumber: '301006Table2ObjectDesc',
  1445. tableId: "301006Table2",
  1446. tableName: "检验单明细表",
  1447. columnProp: 'pictureFlag',
  1448. headerAlign: "center",
  1449. align: "center",
  1450. columnLabel: '图片是否必填',
  1451. columnHidden: false,
  1452. columnImage: false,
  1453. columnSortable: false,
  1454. sortLv: 0,
  1455. status: true,
  1456. fixed: '',
  1457. columnWidth: 120,
  1458. },
  1459. {
  1460. userId: this.$store.state.user.name,
  1461. functionId: 301015,
  1462. serialNumber: '301015Table2Aql',
  1463. tableId: '301015Table2',
  1464. tableName: '检验单明细表',
  1465. columnProp: 'aql',
  1466. headerAlign: 'center',
  1467. align: 'right',
  1468. columnLabel: 'AQL',
  1469. columnHidden: false,
  1470. columnImage: false,
  1471. columnSortable: false,
  1472. sortLv: 0,
  1473. status: true,
  1474. fixed: '',
  1475. columnWidth: 100
  1476. },
  1477. {
  1478. userId: this.$store.state.user.name,
  1479. functionId: 301015,
  1480. serialNumber: '301015Table2Ac',
  1481. tableId: '301015Table2',
  1482. tableName: '检验单明细表',
  1483. columnProp: 'ac',
  1484. headerAlign: 'center',
  1485. align: 'right',
  1486. columnLabel: 'AC',
  1487. columnHidden: false,
  1488. columnImage: false,
  1489. columnSortable: false,
  1490. sortLv: 0,
  1491. status: true,
  1492. fixed: '',
  1493. columnWidth: 100
  1494. },
  1495. {
  1496. userId: this.$store.state.user.name,
  1497. functionId: 301015,
  1498. serialNumber: '301015Table2Re',
  1499. tableId: '301015Table2',
  1500. tableName: '检验单明细表',
  1501. columnProp: 're',
  1502. headerAlign: 'center',
  1503. align: 'right',
  1504. columnLabel: 'RE',
  1505. columnHidden: false,
  1506. columnImage: false,
  1507. columnSortable: false,
  1508. sortLv: 0,
  1509. status: true,
  1510. fixed: '',
  1511. columnWidth: 100
  1512. },
  1513. {
  1514. userId: this.$store.state.user.name,
  1515. functionId: 301015,
  1516. serialNumber: '301015Table2DefaultValue',
  1517. tableId: '301015Table2',
  1518. tableName: '检验单明细表',
  1519. columnProp: 'defaultValue',
  1520. headerAlign: 'center',
  1521. align: 'right',
  1522. columnLabel: '标准值',
  1523. columnHidden: false,
  1524. columnImage: false,
  1525. columnSortable: false,
  1526. sortLv: 0,
  1527. status: true,
  1528. fixed: '',
  1529. columnWidth: 100
  1530. },
  1531. {
  1532. userId: this.$store.state.user.name,
  1533. functionId: 301015,
  1534. serialNumber: '301015Table2MaxValue',
  1535. tableId: '301015Table2',
  1536. tableName: '检验单明细表',
  1537. columnProp: 'maxValue',
  1538. headerAlign: 'center',
  1539. align: 'right',
  1540. columnLabel: '上限值',
  1541. columnHidden: false,
  1542. columnImage: false,
  1543. columnSortable: false,
  1544. sortLv: 0,
  1545. status: true,
  1546. fixed: '',
  1547. columnWidth: 100
  1548. },
  1549. {
  1550. userId: this.$store.state.user.name,
  1551. functionId: 301015,
  1552. serialNumber: '301015Table2MinValue',
  1553. tableId: '301015Table2',
  1554. tableName: '检验单明细表',
  1555. columnProp: 'minValue',
  1556. headerAlign: 'center',
  1557. align: 'right',
  1558. columnLabel: '下限值',
  1559. columnHidden: false,
  1560. columnImage: false,
  1561. columnSortable: false,
  1562. sortLv: 0,
  1563. status: true,
  1564. fixed: '',
  1565. columnWidth: 100
  1566. },
  1567. {
  1568. userId: this.$store.state.user.name,
  1569. functionId: 301015,
  1570. serialNumber: '301015Table2ValueType',
  1571. tableId: '301015Table2',
  1572. tableName: '检验单明细表',
  1573. columnProp: 'valueType',
  1574. headerAlign: 'center',
  1575. align: 'center',
  1576. columnLabel: '检测值类型',
  1577. columnHidden: false,
  1578. columnImage: false,
  1579. columnSortable: false,
  1580. sortLv: 0,
  1581. status: true,
  1582. fixed: '',
  1583. columnWidth: 100
  1584. }
  1585. ],
  1586. loadFlag: false,
  1587. transferLoadFlag: false,
  1588. menuId: this.$route.meta.menuId,
  1589. submitData: {
  1590. site: '',
  1591. inspectionNo: '',
  1592. submit_flag: '',
  1593. inspectionResult: '',
  1594. submitList: [],
  1595. updateBy: this.$store.state.user.name,
  1596. type: 'sqc'
  1597. },
  1598. subDetailFlag: false,
  1599. subDetailData: {
  1600. site: '',
  1601. buNo: '',
  1602. inspectionNo: '',
  1603. itemNo: '',
  1604. itemDesc: '',
  1605. defaultValue: '',
  1606. maxValue: '',
  1607. minValue: '',
  1608. valueTypeDb: '',
  1609. subDetailValues: [],
  1610. page: 1,
  1611. limit: 10
  1612. },
  1613. checkedDetail: [],
  1614. subDetailVisiable: false,
  1615. subDetailLoading: false,
  1616. batchHandleAddModalFlag: false,
  1617. batchAddData: {
  1618. samplingLocation: '',
  1619. samplingLocationB: '',
  1620. samplingNumber: ''
  1621. },
  1622. operatorModelFlag: false,
  1623. operatorData: {
  1624. flag: '',
  1625. site: '',
  1626. bu: '',
  1627. adminID: '',
  1628. adminName: '',
  1629. roleName: '',
  1630. roleId: '',
  1631. userName: this.$store.state.user.name
  1632. },
  1633. operatorList: [],
  1634. roleList: [],
  1635. dataListSelections2: [],
  1636. operatorDetailList: [
  1637. {
  1638. columnProp: 'adminID',
  1639. headerAlign: 'center',
  1640. align: 'center',
  1641. columnLabel: '用户账号',
  1642. columnHidden: false,
  1643. columnImage: false,
  1644. columnSortable: false,
  1645. sortLv: 0,
  1646. status: true,
  1647. fixed: ''
  1648. },
  1649. {
  1650. columnProp: 'adminName',
  1651. headerAlign: 'center',
  1652. align: 'center',
  1653. columnLabel: '用户名称',
  1654. columnHidden: false,
  1655. columnImage: false,
  1656. columnSortable: false,
  1657. sortLv: 0,
  1658. status: true,
  1659. fixed: ''
  1660. },
  1661. {
  1662. columnProp: 'email',
  1663. headerAlign: 'center',
  1664. align: 'center',
  1665. columnLabel: '邮箱',
  1666. columnHidden: false,
  1667. columnImage: false,
  1668. columnSortable: false,
  1669. sortLv: 0,
  1670. status: true,
  1671. fixed: ''
  1672. },
  1673. {
  1674. columnProp: 'phone',
  1675. headerAlign: 'center',
  1676. align: 'center',
  1677. columnLabel: '手机号',
  1678. columnHidden: false,
  1679. columnImage: false,
  1680. columnSortable: false,
  1681. sortLv: 0,
  1682. status: true,
  1683. fixed: ''
  1684. }
  1685. ],
  1686. ItemObjectModelFlag: false,
  1687. itemObjectList: [],
  1688. itemObjectColumnList: [
  1689. {
  1690. columnProp: 'itemNo',
  1691. headerAlign: 'center',
  1692. align: 'center',
  1693. columnLabel: '项目编码',
  1694. columnHidden: false,
  1695. columnImage: false,
  1696. status: true,
  1697. columnWidth: 120
  1698. },
  1699. {
  1700. columnProp: 'itemDesc',
  1701. headerAlign: 'center',
  1702. align: 'left',
  1703. columnLabel: '项目名称',
  1704. columnHidden: false,
  1705. columnImage: false,
  1706. status: true,
  1707. columnWidth: 200
  1708. }
  1709. ],
  1710. actionData: {
  1711. site: '',
  1712. buNo: '',
  1713. inspectionNo: ''
  1714. },
  1715. options: [],
  1716. height: 500,
  1717. searchLoading: false,
  1718. disposalMeasuresOptions: [],
  1719. authSearch: false,
  1720. authCheck: false,
  1721. authCancelCheck: false,
  1722. authDelete: false,
  1723. authOverLoad: false,
  1724. authDetail: false,
  1725. authFile: false,
  1726. // selections
  1727. submitList: [],
  1728. // file upload folder
  1729. fileFolder: 'qcSQC',
  1730. }
  1731. },
  1732. methods: {
  1733. // 下方方法体直接复用原页面结构:仅把接口换成 SQC 接口
  1734. getDataList () {
  1735. this.searchLoading = true
  1736. this.searchData.page = this.pageIndex
  1737. this.searchData.limit = this.pageSize
  1738. qcSQCInspectionSearch(this.searchData).then(({data}) => {
  1739. this.searchLoading = false
  1740. if (data && data.code === 0) {
  1741. this.dataList = data.page.list || []
  1742. this.totalPage = data.page.totalCount || 0
  1743. } else {
  1744. this.dataList = []
  1745. this.totalPage = 0
  1746. }
  1747. }).catch(() => {
  1748. this.searchLoading = false
  1749. })
  1750. },
  1751. SQCClickRow (row) {
  1752. this.detailData = row
  1753. this.$refs.SQCTable.toggleRowSelection(row)
  1754. },
  1755. selectionSQC (rows) {
  1756. this.submitList = rows
  1757. },
  1758. detailModal (row) {
  1759. this.detailData.site = row.site
  1760. this.detailData.buNo = row.buNo
  1761. this.detailData.inspectionNo = row.inspectionNo
  1762. this.detailData.partNo = row.partNo
  1763. this.detailData.partDesc = row.partDesc
  1764. this.detailData.rollQty = row.rollQty
  1765. this.detailData.samplingQty = row.samplingQty
  1766. this.detailData.unqualifiedQty = row.unqualifiedQty
  1767. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  1768. this.detailData.submitFlag = row.submitFlag
  1769. this.detailData.disposalMeasures = row.disposalMeasures
  1770. this.detailData.disposalRemark = row.disposalRemark
  1771. this.detailData.inspectionResult = row.inspectionResult
  1772. this.detailData.inspectorNo = row.inspectorNo
  1773. this.detailData.inspectorName = row.inspectorName
  1774. this.detailData.inspectionRemark = row.inspectionRemark
  1775. this.detailData.cinvSourceCode = row.cinvSourceCode
  1776. this.detailData.sku = row.sku
  1777. this.detailData.invdefinetype = row.invdefinetype
  1778. this.detailData.umId = row.umId
  1779. this.detailData.umName = row.umName
  1780. this.detailData.operator = row.operator
  1781. this.detailData.operatorName = row.operatorName
  1782. this.detailData.responsiblePerson = row.responsiblePerson
  1783. this.detailData.responsiblePersonName = row.responsiblePersonName
  1784. this.detailData.state = row.state
  1785. if (row.state === '待检验') {
  1786. this.detailData.passQty = row.samplingQty
  1787. } else {
  1788. this.detailData.passQty = row.passQty != null ? row.passQty : 0
  1789. this.detailData.notPassQty = row.notPassQty != null ? row.notPassQty : 0
  1790. }
  1791. this.detailData.batchQualifiedQty = row.batchQualifiedQty != null ? row.batchQualifiedQty : 0
  1792. this.getInspectionFormData()
  1793. this.inspectorSearch()
  1794. this.detailInformationFlag = true
  1795. },
  1796. getInspectionFormData () {
  1797. sqcDetailSearch(this.detailData).then(({data}) => {
  1798. if (data && data.code === 0) {
  1799. this.detailList = data.rows || []
  1800. } else {
  1801. this.detailList = []
  1802. }
  1803. })
  1804. },
  1805. actionModal (row) {
  1806. this.actionData = {
  1807. site: row.site,
  1808. buNo: row.buNo,
  1809. inspectionNo: row.inspectionNo
  1810. }
  1811. getSQCItemObjectList(this.actionData).then(({data}) => {
  1812. if (data && data.code === 0) {
  1813. if (!data.rows || data.rows.length === 0) {
  1814. this.itemObjectList = []
  1815. this.actionModal2()
  1816. } else {
  1817. this.itemObjectList = data.rows
  1818. this.ItemObjectModelFlag = true
  1819. }
  1820. } else {
  1821. this.$message.warning((data && data.msg) || '获取检验项目失败')
  1822. }
  1823. })
  1824. },
  1825. actionModal2 () {
  1826. this.$confirm(`确认开始检验?`, '提示', {
  1827. confirmButtonText: '确定',
  1828. cancelButtonText: '取消',
  1829. type: 'warning'
  1830. }).then(() => {
  1831. let tempData = {
  1832. site: this.actionData.site,
  1833. buNo: this.actionData.buNo,
  1834. inspectionNo: this.actionData.inspectionNo,
  1835. actionBy: this.$store.state.user.name,
  1836. state: '待检验',
  1837. equipmentList: this.itemObjectList || []
  1838. }
  1839. actionSQCInspection(tempData).then(({data}) => {
  1840. if (data && data.code === 0) {
  1841. this.getDataList()
  1842. this.$message.success('操作成功')
  1843. this.ItemObjectModelFlag = false
  1844. } else {
  1845. this.$message.warning(data.msg || '操作失败')
  1846. }
  1847. })
  1848. }).catch(() => {})
  1849. },
  1850. Transfer (type) {
  1851. if (type === '2') {
  1852. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  1853. this.$message.warning('请选择检验结论!')
  1854. return
  1855. }
  1856. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  1857. this.$message.warning('请选择处置措施!')
  1858. return
  1859. }
  1860. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  1861. const flag = this.detailList.some(item => item.itemResult === 'N')
  1862. if (!flag) {
  1863. this.$message.warning('请选择不合格项目!')
  1864. return
  1865. }
  1866. }
  1867. if (this.detailData.inspectionResult !== '不合格') {
  1868. this.detailData.disposalMeasures = ''
  1869. this.detailData.disposalRemark = ''
  1870. }
  1871. const picRequiredRow = this.detailList.find(
  1872. item => item.pictureFlag === 'Y' && !(Number(item.imageDetailNum) > 0)
  1873. )
  1874. if (picRequiredRow) {
  1875. this.$message.warning(`项目编码:${picRequiredRow.itemNo || ''}图片必填,请检查!`)
  1876. return
  1877. }
  1878. }
  1879. if (this.detailData.passQty > this.detailData.rollQty) {
  1880. this.$message.warning('合格数量不能大于送检数量!')
  1881. return
  1882. }
  1883. this.saveDetailInformation(type)
  1884. },
  1885. saveDetailInformation (type, options = {}) {
  1886. const keepDetailOpen = options.keepDetailOpen === true
  1887. this.saveInformationData.site = this.detailData.site
  1888. this.saveInformationData.buNo = this.detailData.buNo
  1889. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  1890. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  1891. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  1892. this.saveInformationData.inspectorNo = this.$store.state.user.name
  1893. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  1894. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  1895. this.saveInformationData.rollQty = this.detailData.rollQty
  1896. this.saveInformationData.samplingQty = this.detailData.samplingQty
  1897. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  1898. this.saveInformationData.partNo = this.detailData.partNo
  1899. this.saveInformationData.partDesc = this.detailData.partDesc
  1900. this.saveInformationData.operator = this.detailData.operator
  1901. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  1902. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  1903. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  1904. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  1905. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  1906. this.saveInformationData.type = type
  1907. this.transferLoadFlag = true
  1908. saveSQCDetailedRecord(this.saveInformationData).then(({data}) => {
  1909. if (data && data.code === 0) {
  1910. this.getDataList()
  1911. if (keepDetailOpen) {
  1912. this.getInspectionFormData()
  1913. if (!options.skipSuccessMessage) {
  1914. this.$message.success('操作成功')
  1915. }
  1916. } else {
  1917. this.detailInformationFlag = false
  1918. this.$message.success('操作成功')
  1919. }
  1920. if (typeof options.afterSuccess === 'function') {
  1921. options.afterSuccess()
  1922. }
  1923. } else {
  1924. this.$message.warning((data && data.msg) || '操作失败')
  1925. }
  1926. this.transferLoadFlag = false
  1927. }).catch(() => {
  1928. this.transferLoadFlag = false
  1929. })
  1930. },
  1931. disposalMeasuresSearch () {
  1932. disposalMeasuresSearch({ inspectionTypeNo: '105' }).then(({data}) => {
  1933. if (data && data.code === 0) {
  1934. this.disposalMeasuresOptions = data.rows
  1935. }
  1936. })
  1937. },
  1938. getButtonAuthData () {
  1939. let searchFlag = this.isAuth(this.menuId + ':search')
  1940. let checkFlag = this.isAuth(this.menuId + ':check')
  1941. let deleteFlag = this.isAuth(this.menuId + ':delete')
  1942. let detailFlag = this.isAuth(this.menuId + ':detail')
  1943. let fileFlag = this.isAuth(this.menuId + ':file')
  1944. let cancelCheckFlag = this.isAuth(this.menuId + ':cancelCheck')
  1945. let overLoadFlag = this.isAuth(this.menuId + ':overLoad')
  1946. this.authSearch = !searchFlag
  1947. this.authCheck = !checkFlag
  1948. this.authDelete = !deleteFlag
  1949. this.authOverLoad = !overLoadFlag
  1950. this.authDetail = !detailFlag
  1951. this.authFile = !fileFlag
  1952. this.authCancelCheck = !cancelCheckFlag
  1953. },
  1954. getUserRoleList () {
  1955. getUserRoleList().then(({data}) => {
  1956. if (data && data.code === 0) {
  1957. this.roleList = data.rows
  1958. } else {
  1959. this.roleList = []
  1960. }
  1961. })
  1962. },
  1963. getOperatorList () {
  1964. this.operatorData.flag = '1'
  1965. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  1966. this.$nextTick(() => {
  1967. if (this.$refs.operatorTable) {
  1968. this.$refs.operatorTable.clearSelection()
  1969. }
  1970. })
  1971. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  1972. getOperatorList(this.operatorData).then(({data}) => {
  1973. if (data && data.code === 0) {
  1974. this.operatorList = data.rows
  1975. this.operatorList.forEach(val => {
  1976. if (tempDataList.includes(val.adminID)) {
  1977. this.$nextTick(() => this.$refs.operatorTable && this.$refs.operatorTable.toggleRowSelection(val, true))
  1978. }
  1979. })
  1980. this.operatorModelFlag = true
  1981. } else {
  1982. this.$message.warning((data && data.msg) || '加载人员失败')
  1983. }
  1984. })
  1985. },
  1986. getResponsiblePersonList () {
  1987. this.operatorData.flag = '2'
  1988. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  1989. this.$nextTick(() => {
  1990. if (this.$refs.operatorTable) {
  1991. this.$refs.operatorTable.clearSelection()
  1992. }
  1993. })
  1994. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  1995. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  1996. if (data && data.code === 0) {
  1997. this.operatorList = data.rows
  1998. this.operatorList.forEach(val => {
  1999. if (tempDataList.includes(val.adminID)) {
  2000. this.$nextTick(() => this.$refs.operatorTable && this.$refs.operatorTable.toggleRowSelection(val, true))
  2001. }
  2002. })
  2003. this.operatorModelFlag = true
  2004. } else {
  2005. this.$message.warning((data && data.msg) || '加载责任人失败')
  2006. }
  2007. })
  2008. },
  2009. getOperatorList2 () {
  2010. if (this.operatorData.flag === '1') {
  2011. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2012. getOperatorList(this.operatorData).then(({data}) => {
  2013. if (data && data.code === 0) {
  2014. this.operatorList = data.rows
  2015. this.operatorList.forEach(val => {
  2016. if (tempDataList.includes(val.adminID)) {
  2017. this.$nextTick(() => this.$refs.operatorTable && this.$refs.operatorTable.toggleRowSelection(val, true))
  2018. }
  2019. })
  2020. } else {
  2021. this.operatorList = []
  2022. }
  2023. })
  2024. } else {
  2025. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2026. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2027. if (data && data.code === 0) {
  2028. this.operatorList = data.rows
  2029. this.operatorList.forEach(val => {
  2030. if (tempDataList.includes(val.adminID)) {
  2031. this.$nextTick(() => this.$refs.operatorTable && this.$refs.operatorTable.toggleRowSelection(val, true))
  2032. }
  2033. })
  2034. } else {
  2035. this.operatorList = []
  2036. }
  2037. })
  2038. }
  2039. },
  2040. operatorClickRow (row) {
  2041. this.$refs.operatorTable.toggleRowSelection(row)
  2042. },
  2043. selectionChangeHandle2 (val) {
  2044. this.dataListSelections2 = val
  2045. },
  2046. confirmOperator () {
  2047. if (this.dataListSelections2.length === 0) {
  2048. this.$message.warning('请勾选人员!')
  2049. return
  2050. }
  2051. if (this.operatorData.flag === '1') {
  2052. this.detailData.operator = ''
  2053. this.detailData.operatorName = ''
  2054. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2055. this.detailData.operatorName = this.detailData.operatorName + ';' + this.dataListSelections2[i].adminName
  2056. this.detailData.operator = this.detailData.operator + ';' + this.dataListSelections2[i].adminID
  2057. }
  2058. if (this.detailData.operator.charAt(0) === ';') {
  2059. this.detailData.operator = this.detailData.operator.substring(1)
  2060. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2061. }
  2062. } else {
  2063. this.detailData.responsiblePerson = ''
  2064. this.detailData.responsiblePersonName = ''
  2065. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2066. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ';' + this.dataListSelections2[i].adminName
  2067. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ';' + this.dataListSelections2[i].adminID
  2068. }
  2069. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2070. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2071. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2072. }
  2073. }
  2074. this.operatorData = {
  2075. flag: '',
  2076. site: '',
  2077. bu: '',
  2078. adminID: '',
  2079. adminName: '',
  2080. roleName: '',
  2081. roleId: '',
  2082. userName: this.$store.state.user.name
  2083. }
  2084. this.operatorModelFlag = false
  2085. },
  2086. openSubDetailImport () {
  2087. let currentData = {
  2088. flag: 'SQC',
  2089. site: this.detailData.site,
  2090. buNo: this.detailData.buNo,
  2091. inspectionNo: this.detailData.inspectionNo
  2092. }
  2093. this.$nextTick(() => {
  2094. this.$refs.subDetailUpload.init(currentData)
  2095. })
  2096. },
  2097. subDetailModal (row) {
  2098. this.subDetailLoading = true
  2099. this.subDetailData = row
  2100. this.pageIndex2 = 1
  2101. selectSQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  2102. if (data && data.code === 0) {
  2103. this.tableData = data.rows || []
  2104. }
  2105. this.subDetailLoading = false
  2106. }).catch(() => {
  2107. this.subDetailLoading = false
  2108. })
  2109. this.batchAddData = {
  2110. samplingLocation: '',
  2111. samplingLocationB: '',
  2112. samplingNumber: ''
  2113. }
  2114. this.subDetailFlag = true
  2115. },
  2116. rowClassName ({ row, rowIndex }) {
  2117. row.xh = rowIndex + 1
  2118. row.num = this.tableData.indexOf(row) + 1
  2119. },
  2120. handleDetailSelectionChange (selection) {
  2121. this.checkedDetail = selection
  2122. },
  2123. handleAddBtn (td) {
  2124. checkSQCIsSubmit(td).then(({data}) => {
  2125. if (data && data.flag !== 1) {
  2126. this.tableData.push({
  2127. subDetailValue: '',
  2128. samplingLocation: '',
  2129. samplingLocationB: '',
  2130. subDetailValueB: '',
  2131. subDetailValueC: '',
  2132. subDetailValueD: '',
  2133. subDetailValueE: ''
  2134. })
  2135. } else {
  2136. this.$message.warning('记录已提交!')
  2137. }
  2138. })
  2139. },
  2140. batchHandleAdd (td) {
  2141. checkSQCIsSubmit(td).then(({data}) => {
  2142. if (data && data.flag !== 1) {
  2143. this.batchHandleAddModalFlag = true
  2144. } else {
  2145. this.$message.warning('记录已提交!')
  2146. }
  2147. })
  2148. },
  2149. batchHandleAddModal () {
  2150. const n = parseInt(this.batchAddData.samplingNumber, 10) || 0
  2151. for (let i = 0; i < n; i++) {
  2152. this.tableData.push({
  2153. samplingLocation: this.batchAddData.samplingLocation,
  2154. samplingLocationB: this.batchAddData.samplingLocationB,
  2155. subDetailValue: '',
  2156. subDetailValueB: '',
  2157. subDetailValueC: '',
  2158. subDetailValueD: '',
  2159. subDetailValueE: ''
  2160. })
  2161. }
  2162. this.batchHandleAddModalFlag = false
  2163. },
  2164. handleDeleteBtn (td) {
  2165. checkSQCIsSubmit(td).then(({data}) => {
  2166. if (data && data.flag !== 1) {
  2167. if (this.checkedDetail.length === 0) {
  2168. this.$message.warning('请先选择要删除的数据')
  2169. } else {
  2170. this.$confirm('是否确认删除该子明细记录?', '提示', {
  2171. confirmButtonText: '确定',
  2172. cancelButtonText: '取消',
  2173. type: 'warning'
  2174. }).then(() => {
  2175. this.checkedDetail.forEach((val) => {
  2176. this.tableData.splice(this.tableData.indexOf(val), 1)
  2177. if (this.templateTableData.length === 0) {
  2178. this.pageIndex2--
  2179. }
  2180. })
  2181. this.$message.success('删除成功!')
  2182. }).catch(() => {})
  2183. }
  2184. } else {
  2185. this.$message.warning('记录已提交!')
  2186. }
  2187. })
  2188. },
  2189. saveSubDetailResult () {
  2190. for (let i = 0; i < this.tableData.length; i++) {
  2191. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  2192. this.$message.warning('序号' + (i + 1) + '未填写实测值!')
  2193. return
  2194. }
  2195. }
  2196. this.subDetailData.subDetailValues = this.tableData
  2197. this.subDetailVisiable = true
  2198. saveSQCSubDetailed(this.subDetailData).then(({data}) => {
  2199. if (data && data.code === 0) {
  2200. if (data.count > 0) {
  2201. this.subDetailData.itemResult = 'N'
  2202. this.subDetailData.unqualifiedQuantity = data.count
  2203. }
  2204. if (this.subDetailData.subDetailValues.length > 0) {
  2205. this.subDetailData.subDetailRecordNum = 1
  2206. } else {
  2207. this.subDetailData.subDetailRecordNum = -1
  2208. this.subDetailData.unqualifiedQuantity = 0
  2209. this.subDetailData.itemResult = 'Y'
  2210. }
  2211. this.subDetailFlag = false
  2212. this.tableData = []
  2213. this.$message.success('操作成功')
  2214. } else {
  2215. this.$message.warning((data && data.msg) || '操作失败')
  2216. }
  2217. }).finally(() => {
  2218. this.subDetailVisiable = false
  2219. })
  2220. },
  2221. resultChange () {
  2222. if (this.detailData.inspectionResult === '不合格') {
  2223. this.detailData.passQty = 0
  2224. }
  2225. },
  2226. uploadImageModal (row) {
  2227. const openImage = () => {
  2228. let currentData = {
  2229. site: this.detailData.site,
  2230. buNo: this.detailData.buNo,
  2231. createBy: this.$store.state.user.name,
  2232. inspectionNo: this.detailData.inspectionNo,
  2233. itemNo: row.itemNo,
  2234. folder: 'SQCItemImageFile'
  2235. }
  2236. this.$nextTick(() => {
  2237. this.$refs.comQcItemImageUploadFile.init(currentData)
  2238. })
  2239. }
  2240. if (this.detailData.state !== '待检验') {
  2241. openImage()
  2242. return
  2243. }
  2244. if (this.detailData.passQty > this.detailData.rollQty) {
  2245. this.$message.warning('合格数量不能大于送检数量!')
  2246. return
  2247. }
  2248. this.saveDetailInformation('1', {
  2249. keepDetailOpen: true,
  2250. skipSuccessMessage: true,
  2251. afterSuccess: openImage
  2252. })
  2253. },
  2254. inspectorSearch () {
  2255. inspectorSearch().then(({data}) => {
  2256. if (data && data.code === 0) {
  2257. this.options = data.rows
  2258. }
  2259. })
  2260. },
  2261. nextFocus1 (index) {
  2262. let a = `${index + 1}` + `a`
  2263. this.$nextTick(() => {
  2264. this.$refs[a] && this.$refs[a].focus()
  2265. })
  2266. },
  2267. nextFocus2 (index) {
  2268. let a = `${index + 1}` + `b`
  2269. this.$nextTick(() => {
  2270. this.$refs[a] && this.$refs[a].focus()
  2271. })
  2272. },
  2273. nextFocus3 (index) {
  2274. let a = `${index + 1}` + `c`
  2275. this.$nextTick(() => {
  2276. this.$refs[a] && this.$refs[a].focus()
  2277. })
  2278. },
  2279. nextFocus4 (index) {
  2280. let a = `${index + 1}` + `d`
  2281. this.$nextTick(() => {
  2282. this.$refs[a] && this.$refs[a].focus()
  2283. })
  2284. },
  2285. nextFocus5 (index) {
  2286. let a = `${index + 1}` + `e`
  2287. this.$nextTick(() => {
  2288. this.$refs[a] && this.$refs[a].focus()
  2289. })
  2290. },
  2291. nextFocus6 (index) {
  2292. let a = `${index + 1}` + `f`
  2293. this.$nextTick(() => {
  2294. this.$refs[a] && this.$refs[a].focus()
  2295. })
  2296. },
  2297. nextFocus7 (index) {
  2298. let a = `${index + 1}` + `g`
  2299. this.$nextTick(() => {
  2300. this.$refs[a] && this.$refs[a].focus()
  2301. })
  2302. },
  2303. focusNextInput (index, type) {
  2304. let aaa = ''
  2305. if (this.detailList.length - 1 === index) {
  2306. aaa = `${type}0`
  2307. } else {
  2308. aaa = `${type}${index + 1}`
  2309. }
  2310. this.$nextTick(() => {
  2311. this.$refs[aaa] && this.$refs[aaa].focus()
  2312. })
  2313. },
  2314. updateItemResult (row) {
  2315. if (row.maxValue == null && row.minValue == null && row.defaultValue == null) {
  2316. return
  2317. }
  2318. if (row.maxValue == null && row.minValue == null) {
  2319. if (row.numberValue != row.defaultValue) {
  2320. row.itemResult = 'N'
  2321. }
  2322. } else if (row.maxValue != null && row.minValue != null) {
  2323. if (row.numberValue > row.maxValue || row.numberValue < row.minValue) {
  2324. row.itemResult = 'N'
  2325. } else {
  2326. row.itemResult = 'Y'
  2327. }
  2328. } else if (row.maxValue != null) {
  2329. if (row.numberValue > row.maxValue) {
  2330. row.itemResult = 'N'
  2331. } else {
  2332. row.itemResult = 'Y'
  2333. }
  2334. } else if (row.minValue != null) {
  2335. if (row.numberValue < row.minValue) {
  2336. row.itemResult = 'N'
  2337. } else {
  2338. row.itemResult = 'Y'
  2339. }
  2340. }
  2341. },
  2342. sizeChangeHandle2 (val) {
  2343. this.pageSize2 = val
  2344. },
  2345. currentChangeHandle2 (val) {
  2346. this.pageIndex2 = val
  2347. },
  2348. changeMyString (val) {
  2349. for (let i = 0; i < this.detailList.length; i++) {
  2350. if (val[this.detailList[i].itemNo] !== undefined) {
  2351. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  2352. if (val[this.detailList[i].itemNo] != null) {
  2353. this.detailList[i].subDetailRecordNum = 1
  2354. }
  2355. if (val[this.detailList[i].itemNo] > 0) {
  2356. this.detailList[i].itemResult = 'N'
  2357. }
  2358. }
  2359. }
  2360. },
  2361. // 每页数
  2362. sizeChangeHandle (val) {
  2363. this.pageSize = val
  2364. this.pageIndex = 1
  2365. this.getDataList()
  2366. },
  2367. // 当前页
  2368. currentChangeHandle (val) {
  2369. this.pageIndex = val
  2370. this.getDataList()
  2371. },
  2372. // 是否允许勾选
  2373. selectFlag (row) {
  2374. // 取消审核需要勾选“已完成”记录,因此这里不做行级限制
  2375. return true
  2376. },
  2377. fields () {
  2378. let json = '{'
  2379. this.columnList1.forEach((item, index) => {
  2380. if (index === this.columnList1.length - 1) {
  2381. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2382. } else {
  2383. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2384. }
  2385. })
  2386. json += '}'
  2387. return eval('(' + json + ')')
  2388. },
  2389. async createExportData () {
  2390. const q = JSON.parse(JSON.stringify(this.searchData || {}))
  2391. q.page = 1
  2392. q.limit = -1
  2393. const { data } = await qcSQCInspectionSearch(q)
  2394. if (data && data.code === 0 && data.page && data.page.list) {
  2395. this.exportData = data.page.list
  2396. return this.exportData
  2397. }
  2398. this.exportData = []
  2399. return []
  2400. },
  2401. startDownload () {},
  2402. finishDownload () {},
  2403. // 审核(与 IPQC 一致:仅「待审核」可审)
  2404. submitResult () {
  2405. if (!this.submitList || this.submitList.length === 0) {
  2406. this.$message.warning('请勾选要审核的检验单!')
  2407. return
  2408. }
  2409. let tempData1 = ''
  2410. let tempData2 = ''
  2411. for (let i = 0; i < this.submitList.length; i++) {
  2412. if (this.submitList[i].state !== '待审核') {
  2413. tempData1 = tempData1 + this.submitList[i].inspectionNo + '、'
  2414. }
  2415. if (this.submitList[i].inspectionResult === '不合格' && (this.submitList[i].disposalMeasures === '' || this.submitList[i].disposalMeasures == null)) {
  2416. tempData2 = tempData2 + this.submitList[i].inspectionNo + '、'
  2417. }
  2418. }
  2419. if (tempData1 !== '') {
  2420. tempData1 = tempData1.substring(0, tempData1.length - 1)
  2421. this.$message.warning('检验单号 ' + tempData1 + ' 不是待审核状态!')
  2422. return
  2423. }
  2424. if (tempData2 !== '') {
  2425. tempData2 = tempData2.substring(0, tempData2.length - 1)
  2426. this.$message.warning('检验单号 ' + tempData2 + ' 的处置措施未选择!')
  2427. return
  2428. }
  2429. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.submitList.length + ` 条记录`, '提示', {
  2430. confirmButtonText: '确定',
  2431. cancelButtonText: '取消',
  2432. type: 'warning'
  2433. }).then(() => {
  2434. this.submitData.submitList = this.submitList
  2435. saveSQCSubmitResult(this.submitData).then(({data}) => {
  2436. if (data && data.code === 0) {
  2437. this.getDataList()
  2438. this.submitList = []
  2439. this.$message.success('操作成功')
  2440. } else {
  2441. this.$message.warning((data && data.msg) || '操作失败')
  2442. }
  2443. })
  2444. }).catch(() => {})
  2445. },
  2446. // 取消审核
  2447. cancelApproval () {
  2448. let tempData1 = '' // 记录不是已完成状态的单号
  2449. if (!this.submitList || this.submitList.length === 0) {
  2450. this.$message.warning('请勾选要取消审核的检验单!')
  2451. return
  2452. }
  2453. for (let i = 0; i < this.submitList.length; i++) {
  2454. if (this.submitList[i].state !== '已完成') {
  2455. tempData1 = tempData1 + this.submitList[i].inspectionNo + '、'
  2456. }
  2457. }
  2458. if (tempData1 !== '') {
  2459. tempData1 = tempData1.substring(0, tempData1.length - 1)
  2460. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  2461. return
  2462. }
  2463. this.$confirm(`确定取消审核该 ` + this.submitList.length + ` 条记录`, '提示', {
  2464. confirmButtonText: '确定',
  2465. cancelButtonText: '取消',
  2466. type: 'warning'
  2467. }).then(() => {
  2468. this.submitData.submitList = this.submitList
  2469. cancelSQCApproval(this.submitData).then(({data}) => {
  2470. if (data && data.code === 0) {
  2471. this.getDataList()
  2472. this.submitList = []
  2473. this.$message({
  2474. message: '操作成功',
  2475. type: 'success',
  2476. duration: 1500,
  2477. onClose: () => {}
  2478. })
  2479. } else {
  2480. this.$message.warning(data.msg || '操作失败')
  2481. }
  2482. })
  2483. }).catch(() => {})
  2484. },
  2485. // 删除
  2486. deleteModal () {
  2487. if (!this.submitList || this.submitList.length === 0) {
  2488. this.$message.warning('请勾选要删除的检验单!')
  2489. return
  2490. }
  2491. this.$confirm(`确认删除选中的检验单?`, '提示', {
  2492. confirmButtonText: '确定',
  2493. cancelButtonText: '取消',
  2494. type: 'warning'
  2495. }).then(() => {
  2496. sqcRecordDelete({ submitList: this.submitList }).then(({data}) => {
  2497. if (data && data.code === 0) {
  2498. this.$message.success('操作成功')
  2499. this.getDataList()
  2500. } else {
  2501. this.$message.warning(data.msg || '操作失败')
  2502. }
  2503. })
  2504. }).catch(() => {})
  2505. },
  2506. // 任务重载
  2507. overLoadModal () {
  2508. if (!this.submitList || this.submitList.length === 0) {
  2509. this.$message.warning('请勾选要重载的检验单!')
  2510. return
  2511. }
  2512. this.$confirm(`确认重载选中的检验单?`, '提示', {
  2513. confirmButtonText: '确定',
  2514. cancelButtonText: '取消',
  2515. type: 'warning'
  2516. }).then(() => {
  2517. sqcRecordOverLoad({ submitList: this.submitList }).then(({data}) => {
  2518. if (data && data.code === 0) {
  2519. this.$message.success('操作成功')
  2520. this.getDataList()
  2521. } else {
  2522. this.$message.warning(data.msg || '操作失败')
  2523. }
  2524. })
  2525. }).catch(() => {})
  2526. },
  2527. printList () {
  2528. if (!this.submitList || this.submitList.length === 0) {
  2529. this.$message.warning('请勾选要打印的检验单!')
  2530. return
  2531. }
  2532. const inspectionNos = this.$refs.qrCode.init(this.submitList.map(item => item.inspectionNo))
  2533. for (let i = 0; i < inspectionNos.length; i++) {
  2534. this.submitList[i].qrCode = inspectionNos[i]
  2535. }
  2536. qcPrint(this.submitList)
  2537. },
  2538. // 文件清单
  2539. getFileContentData (row) {
  2540. const r = row || this.detailData || {}
  2541. let currentData = {
  2542. orderRef1: r.site,
  2543. orderRef2: r.inspectionNo,
  2544. orderRef4: r.buNo,
  2545. partNo: r.partNo
  2546. }
  2547. this.fileLoading = true
  2548. getInspectionFile(currentData).then(({data}) => {
  2549. if (data && data.code === 0) {
  2550. this.fileContentList = data.rows || []
  2551. } else {
  2552. this.fileContentList = []
  2553. }
  2554. this.fileLoading = false
  2555. }).catch(() => {
  2556. this.fileLoading = false
  2557. })
  2558. this.fileFlag = true
  2559. },
  2560. // 新增文件
  2561. addUploadFileModal () {
  2562. let currentData = {
  2563. titleCon: 'SQC文件上传',
  2564. site: this.detailData.site,
  2565. buNo: this.detailData.buNo,
  2566. createBy: this.$store.state.user.name,
  2567. inspectionNo: this.detailData.inspectionNo,
  2568. remark: '',
  2569. folder: this.fileFolder,
  2570. }
  2571. this.$nextTick(() => {
  2572. this.$refs.qcFAIUploadFile.init(currentData)
  2573. })
  2574. },
  2575. getBaseData () {},
  2576. },
  2577. created () {
  2578. this.getButtonAuthData()
  2579. this.disposalMeasuresSearch()
  2580. if (!this.authSearch) {
  2581. this.getDataList()
  2582. }
  2583. this.getUserRoleList()
  2584. },
  2585. mounted () {
  2586. this.$nextTick(() => {
  2587. this.height = window.innerHeight - 250
  2588. })
  2589. }
  2590. }
  2591. </script>
  2592. <style scoped>
  2593. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  2594. color: red;
  2595. font-weight: bold;
  2596. }
  2597. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  2598. color: rgb(103,194,58);
  2599. font-weight: bold;
  2600. }
  2601. .el-table /deep/ .cell{
  2602. height: auto;
  2603. line-height: 1.5;
  2604. }
  2605. </style>