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.

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