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.

4158 lines
155 KiB

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