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.

4037 lines
142 KiB

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