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.

4301 lines
160 KiB

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