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.

4162 lines
155 KiB

11 months ago
11 months ago
5 months ago
1 year ago
5 months ago
1 year ago
5 months ago
5 months ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item :label="'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" :loading="subDetailVisiable" @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. subDetailVisiable: false,
  2364. }
  2365. },
  2366. mounted () {
  2367. this.$nextTick(() => {
  2368. this.height = window.innerHeight - 250
  2369. })
  2370. },
  2371. created () {
  2372. // 按钮控制
  2373. this.getButtonAuthData()
  2374. // 获取用户的 site 和 bu
  2375. this.getSiteAndBuByUserName()
  2376. // 获取用户的 site 和 bu
  2377. this.getSiteAndBuByUserName2()
  2378. // 收藏
  2379. this.favoriteIsOk()
  2380. // 检验类型
  2381. this.inspectionTypeSearch()
  2382. // 处置措施
  2383. this.disposalMeasuresSearch()
  2384. // 单位
  2385. this.umSearch()
  2386. // 查看 质量任务生成规则控制 动控是否开启
  2387. this.queryController()
  2388. // 动态列
  2389. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2390. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  2391. this.getTableUserColumn(this.$route.meta.menuId+'table3',3)
  2392. if (!this.authSearch) {
  2393. // 获取数据列表
  2394. this.getDataList()
  2395. }
  2396. // 获取用户角色
  2397. this.getUserRoleList()
  2398. },
  2399. methods: {
  2400. // 获取用户的bu
  2401. getSiteAndBuByUserName2 () {
  2402. let tempData = {
  2403. username: this.$store.state.user.name,
  2404. }
  2405. getSiteAndBuByUserName2(tempData).then(({data}) => {
  2406. if (data.code === 0) {
  2407. this.buList = data.rows
  2408. }
  2409. })
  2410. },
  2411. // 批量打印标签
  2412. printList () {
  2413. if (this.FAISelections.length === 0) {
  2414. this.$message.warning('请勾选要打印的检验单!')
  2415. return
  2416. }
  2417. const inspectionNos = this.$refs.qrCode.init(this.FAISelections.map(item => item.inspectionNo))
  2418. for (let i = 0; i < inspectionNos.length; i++) {
  2419. this.FAISelections[i].qrCode = inspectionNos[i]
  2420. }
  2421. qcPrint(this.FAISelections)
  2422. },
  2423. // 数据采集
  2424. dataAcquisition () {
  2425. this.loadFlag = true
  2426. let tempDate = {
  2427. site: this.detailData.site,
  2428. buNo: this.detailData.buNo,
  2429. inspectionNo: this.detailData.inspectionNo,
  2430. flag: 'fqc'
  2431. }
  2432. dataAcquisition(tempDate).then(({data}) => {
  2433. if (data.code === 0) {
  2434. // this.acquisitionList = data.rows
  2435. this.changeMyString(data.rows)
  2436. this.$message({
  2437. message: '数据采集成功',
  2438. type: 'success',
  2439. duration: 1500
  2440. })
  2441. } else {
  2442. this.$message({
  2443. message: data.msg,
  2444. type: 'warning',
  2445. duration: 1500
  2446. })
  2447. }
  2448. this.loadFlag = false
  2449. })
  2450. },
  2451. // 根据项目数据采集
  2452. dataAcquisitionByItem (row) {
  2453. this.loadFlag = true
  2454. let tempDate = {
  2455. site: row.site,
  2456. buNo: row.buNo,
  2457. inspectionNo: row.inspectionNo,
  2458. templateId: row.templateId,
  2459. itemNo: row.itemNo,
  2460. flag: 'fqc'
  2461. }
  2462. dataAcquisitionByItem(tempDate).then(({data}) => {
  2463. if (data.code === 0) {
  2464. this.changeMyString(data.rows)
  2465. this.$message({
  2466. message: '数据采集成功',
  2467. type: 'success',
  2468. duration: 1500
  2469. })
  2470. } else {
  2471. this.$message({
  2472. message: data.msg,
  2473. type: 'warning',
  2474. duration: 1500
  2475. })
  2476. }
  2477. this.loadFlag = false
  2478. })
  2479. },
  2480. // 获取用户角色
  2481. getUserRoleList () {
  2482. getUserRoleList().then(({data}) => {
  2483. if (data.code === 0) {
  2484. this.roleList = data.rows
  2485. } else {
  2486. this.roleList = []
  2487. }
  2488. })
  2489. },
  2490. // 获取协同人员列表
  2491. getOperatorList () {
  2492. this.operatorData.flag = '1'
  2493. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2494. if (this.roleList.length > 0) {
  2495. let filterList = this.roleList.filter(item => item.roleName === '机修人员')
  2496. if (filterList.length > 0) {
  2497. this.operatorData.roleId = filterList[0].roleId
  2498. } else {
  2499. this.operatorData.roleId = this.roleList[0].roleId
  2500. }
  2501. } else {
  2502. this.operatorData.roleId = ''
  2503. }
  2504. // 先清空缓存选中
  2505. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2506. // 拿到选中的人员编号
  2507. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2508. getOperatorList(this.operatorData).then(({data}) => {
  2509. if (data && data.code === 0) {
  2510. this.operatorList = data.rows
  2511. this.operatorList.forEach(val => {
  2512. // 回显选中
  2513. if (tempDataList.includes(val.adminID)) {
  2514. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2515. }
  2516. })
  2517. this.operatorModelFlag = true
  2518. } else {
  2519. this.$alert(data.msg, '错误', {
  2520. confirmButtonText: '确定'
  2521. })
  2522. }
  2523. })
  2524. },
  2525. // 获取责任人员列表
  2526. getResponsiblePersonList () {
  2527. this.operatorData.flag = '2'
  2528. this.operatorData.bu = this.detailData.site + '_' + this.detailData.buNo
  2529. // 先清空缓存选中
  2530. this.$nextTick(() => this.$refs.operatorTable.clearSelection())
  2531. // 拿到选中的人员编号
  2532. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2533. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2534. if (data && data.code === 0) {
  2535. this.operatorList = data.rows
  2536. this.operatorList.forEach(val => {
  2537. // 回显选中
  2538. if (tempDataList.includes(val.adminID)) {
  2539. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2540. }
  2541. })
  2542. this.operatorModelFlag = true
  2543. } else {
  2544. this.$alert(data.msg, '错误', {
  2545. confirmButtonText: '确定'
  2546. })
  2547. }
  2548. })
  2549. },
  2550. // 查询机修人员列表
  2551. getOperatorList2 () {
  2552. if (this.operatorData.flag === '1') {
  2553. // 拿到选中的人员编号
  2554. let tempDataList = (this.detailData.operator == null ? '' : this.detailData.operator).split(';')
  2555. getOperatorList(this.operatorData).then(({data}) => {
  2556. if (data && data.code === 0) {
  2557. this.operatorList = data.rows
  2558. this.operatorList.forEach(val => {
  2559. // 回显选中的部门
  2560. if (tempDataList.includes(val.adminID)) {
  2561. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2562. }
  2563. })
  2564. } else {
  2565. this.operatorList = []
  2566. }
  2567. })
  2568. } else {
  2569. // 拿到选中的人员编号
  2570. let tempDataList = (this.detailData.responsiblePerson == null ? '' : this.detailData.responsiblePerson).split(';')
  2571. getResponsibleOperatorList(this.operatorData).then(({data}) => {
  2572. if (data && data.code === 0) {
  2573. this.operatorList = data.rows
  2574. this.operatorList.forEach(val => {
  2575. // 回显选中的部门
  2576. if (tempDataList.includes(val.adminID)) {
  2577. this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true))
  2578. }
  2579. })
  2580. } else {
  2581. this.operatorList = []
  2582. }
  2583. })
  2584. }
  2585. },
  2586. // 点击行选中复选框
  2587. operatorClickRow (row) {
  2588. this.$refs.operatorTable.toggleRowSelection(row)
  2589. },
  2590. // 多选
  2591. selectionChangeHandle2 (val) {
  2592. this.dataListSelections2 = val
  2593. },
  2594. // 确认多选协同人员
  2595. confirmOperator () {
  2596. if (this.dataListSelections2.length === 0) {
  2597. this.$message.warning('请勾选人员!')
  2598. return
  2599. }
  2600. if (this.operatorData.flag === '1') {
  2601. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2602. if (!this.detailData.operator.split(';').includes(this.dataListSelections2[i].adminID)) {
  2603. this.detailData.operatorName = this.detailData.operatorName + ";" + this.dataListSelections2[i].adminName
  2604. this.detailData.operator = this.detailData.operator + ";" + this.dataListSelections2[i].adminID
  2605. }
  2606. }
  2607. if (this.detailData.operator.charAt(0) === ';') {
  2608. this.detailData.operator = this.detailData.operator.substring(1)
  2609. this.detailData.operatorName = this.detailData.operatorName.substring(1)
  2610. }
  2611. } else {
  2612. for (let i = 0; i < this.dataListSelections2.length; i++) {
  2613. if (!this.detailData.responsiblePerson.split(';').includes(this.dataListSelections2[i].adminID)) {
  2614. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName + ";" + this.dataListSelections2[i].adminName
  2615. this.detailData.responsiblePerson = this.detailData.responsiblePerson + ";" + this.dataListSelections2[i].adminID
  2616. }
  2617. }
  2618. if (this.detailData.responsiblePerson.charAt(0) === ';') {
  2619. this.detailData.responsiblePerson = this.detailData.responsiblePerson.substring(1)
  2620. this.detailData.responsiblePersonName = this.detailData.responsiblePersonName.substring(1)
  2621. }
  2622. }
  2623. this.operatorData = {
  2624. flag: '',
  2625. site: '',
  2626. bu: '',
  2627. adminID: '',
  2628. adminName: '',
  2629. roleName: '',
  2630. roleId: '',
  2631. userName: this.$store.state.user.name
  2632. }
  2633. this.operatorModelFlag = false
  2634. },
  2635. // bu内容改变事件
  2636. buChange () {
  2637. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  2638. this.modalData.templateId = ''
  2639. this.modalData.templateName = ''
  2640. } else { // 无工单检验
  2641. this.modalData.partNo = ''
  2642. this.modalData.partDesc = ''
  2643. this.modalData.invdefinetype = ''
  2644. this.modalData.sku = ''
  2645. this.modalData.cinvSourceCode = ''
  2646. this.modalData.templateId = ''
  2647. this.modalData.templateName = ''
  2648. }
  2649. },
  2650. // 获取用户的bu
  2651. getSiteAndBuByUserName () {
  2652. let tempData = {
  2653. username: this.$store.state.user.name,
  2654. }
  2655. getSiteAndBuByUserName(tempData).then(({data}) => {
  2656. if (data.code === 0) {
  2657. this.userBuList = data.rows
  2658. }
  2659. })
  2660. },
  2661. // 子明细导入
  2662. subDetailUpload () {
  2663. let currentData = {
  2664. flag: 'FQC',
  2665. site: this.detailData.site,
  2666. buNo: this.detailData.buNo,
  2667. inspectionNo: this.detailData.inspectionNo
  2668. }
  2669. //打开组件 去做新增业务
  2670. this.$nextTick(() => {
  2671. this.$refs.subDetailUpload.init(currentData)
  2672. })
  2673. },
  2674. // 查询单位
  2675. umSearch () {
  2676. let tempData = {
  2677. site: this.$store.state.user.site,
  2678. active: 'Y'
  2679. }
  2680. umSearch(tempData).then(({data}) => {
  2681. if (data.code === 0) {
  2682. this.umList = data.rows
  2683. }
  2684. })
  2685. },
  2686. // 标签号回车事件
  2687. rollNoEnter () {
  2688. const regex = /\(08\)(.*)/
  2689. const result = this.modalData.rollNo.match(regex)
  2690. let tempData = {
  2691. site: '',
  2692. bu: this.modalData.bu,
  2693. rollNo: result == null ? this.modalData.rollNo : result[1]
  2694. }
  2695. rollNoEnter(tempData).then(({data}) => {
  2696. if (data && data.code === 0) {
  2697. this.operationList = data.rows
  2698. this.modalData.seqNo = data.rows[0].seqNo
  2699. this.modalData.orderNo = data.rows[0].orderNo
  2700. this.modalData.operationDesc = data.rows[0].operationDesc
  2701. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2702. this.modalData.resourceId = data.rows[0].resourceId
  2703. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2704. this.modalData.partNo = data.rows[0].partNo
  2705. this.modalData.partDesc = data.rows[0].partDesc
  2706. this.modalData.invdefinetype = data.rows[0].invdefinetype
  2707. this.modalData.sku = data.rows[0].sku
  2708. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2709. } else {
  2710. this.$alert(data.msg, '错误', {
  2711. confirmButtonText: '确定'
  2712. })
  2713. }
  2714. })
  2715. },
  2716. querySearchAsync (queryString, cb) {
  2717. clearTimeout(this.timeout)
  2718. let results = []
  2719. if (queryString === '') {
  2720. cb(results)
  2721. } else {
  2722. // 掉接口需要的参数
  2723. let find = {
  2724. rollNo: queryString, //上面输入框绑定的数据
  2725. site: this.$store.state.user.site,
  2726. }
  2727. // 这里去调后端的接口.根据自己接口的情况进行赋值
  2728. getRollNo(find).then(({data}) => {
  2729. if (data.code === 0) {
  2730. let result = data.rows
  2731. // 循环放到一个远程搜索需要的数组
  2732. for (let i = 0; i < result.length; i++) {
  2733. const element = result[i]
  2734. results.push({
  2735. value: element.rollNo,
  2736. seqNo: element.seqNo,
  2737. orderNo: element.orderNo
  2738. })
  2739. }
  2740. cb(results)
  2741. } else {
  2742. results = []
  2743. cb(results)
  2744. }
  2745. })
  2746. }
  2747. },
  2748. // 点击出现搜索后点击的每一项
  2749. handleSelect (item) {
  2750. this.modalData.rollNo = item.value
  2751. this.modalData.seqNo = item.seqNo
  2752. this.modalData.orderNo = item.orderNo
  2753. this.getOperationList()
  2754. //this.getPartList()
  2755. },
  2756. // 获取处置措施列表
  2757. disposalMeasuresSearch () {
  2758. let tempData = {
  2759. inspectionTypeNo: '107'
  2760. }
  2761. disposalMeasuresSearch(tempData).then(({data}) => {
  2762. if (data.code === 0) {
  2763. this.disposalMeasuresOptions = data.rows
  2764. }
  2765. })
  2766. },
  2767. // 查询检验类型
  2768. inspectionTypeSearch () {
  2769. let tempData = {
  2770. site: this.$store.state.user.site
  2771. }
  2772. inspectionTypeSearch(tempData).then(({data}) => {
  2773. if (data.code === 0) {
  2774. this.typeOptions = data.rows
  2775. this.typeOptions.forEach(val => {
  2776. if (val.inspectionTypeName.includes('FQC')) {
  2777. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  2778. this.templateData.inspectionTypeName = val.inspectionTypeName
  2779. }
  2780. })
  2781. }
  2782. })
  2783. },
  2784. // 获取基础数据列表S
  2785. getBaseList (val,type) {
  2786. this.tagNo = val
  2787. this.$nextTick(() => {
  2788. let strVal = ''
  2789. if (val === 1052) {
  2790. this.searchSeqInfo()
  2791. this.seqDetailFlag = true
  2792. }
  2793. if (val === 505) {
  2794. strVal = this.modalData.resourceDesc
  2795. this.$refs.baseList.init(val, strVal)
  2796. }
  2797. // if (val === 206) {
  2798. // strVal = this.modalData.partNo
  2799. // this.$refs.baseList.init(val, strVal)
  2800. // }
  2801. })
  2802. },
  2803. /* 列表方法的回调 */
  2804. getBaseData (val) {
  2805. if (this.tagNo === 1052) {
  2806. this.modalData.seqNo = val.seqno
  2807. this.modalData.orderNo = val.orderno
  2808. this.modalData.operationDesc = ''
  2809. this.modalData.resourceId = ''
  2810. this.getOperationList()
  2811. //this.getPartList()
  2812. }
  2813. if (this.tagNo === 505) {
  2814. this.modalData.resourceId = val.resource_id
  2815. this.modalData.resourceDesc = val.resource_desc
  2816. }
  2817. // if (this.tagNo === 206) {
  2818. // this.modalData.partNo = val.part_no
  2819. // this.modalData.partDesc = val.part_desc
  2820. // // 获取物料的其他信息
  2821. // this.getPartInformation()
  2822. // }
  2823. },
  2824. // // 获取物料其它信息
  2825. // getPartInformation () {
  2826. // getPartInformation(this.modalData).then(({data}) => {
  2827. // if (data && data.code === 0) {
  2828. // this.modalData.spec = data.rows[0].spec
  2829. // this.modalData.sku = data.rows[0].sku
  2830. // } else {
  2831. // this.$alert(data.msg, '错误', {
  2832. // confirmButtonText: '确定'
  2833. // })
  2834. // }
  2835. // })
  2836. // },
  2837. // 获取机台列表
  2838. getResourceList () {
  2839. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  2840. if (this.modalData.specialTaskFlag === 'Y') {
  2841. return
  2842. } else {
  2843. getResourceList(this.modalData).then(({data}) => {
  2844. if (data && data.code === 0) {
  2845. //this.resourceList = data.rows
  2846. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2847. this.modalData.resourceId = data.rows[0].resourceId
  2848. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2849. } else {
  2850. this.$alert(data.msg, '错误', {
  2851. confirmButtonText: '确定'
  2852. })
  2853. }
  2854. })
  2855. }
  2856. },
  2857. // 获取工序列表
  2858. getOperationList () {
  2859. getOperationList(this.modalData).then(({data}) => {
  2860. if (data && data.code === 0) {
  2861. this.operationList = data.rows
  2862. this.modalData.operationDesc = data.rows[0].operationDesc
  2863. //this.getResourceList()
  2864. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2865. this.modalData.resourceId = data.rows[0].resourceId
  2866. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2867. this.modalData.partNo = data.rows[0].partNo
  2868. this.modalData.partDesc = data.rows[0].partDesc
  2869. this.modalData.invdefinetype = data.rows[0].invdefinetype
  2870. this.modalData.sku = data.rows[0].sku
  2871. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2872. this.modalData.operationDesc = data.rows[0].operationDesc
  2873. this.modalData.qtyrequired = data.rows[0].qtyrequired
  2874. this.modalData.lotsize = data.rows[0].lotsize
  2875. } else {
  2876. this.$alert(data.msg, '错误', {
  2877. confirmButtonText: '确定'
  2878. })
  2879. }
  2880. })
  2881. },
  2882. // 获取物料列表
  2883. getPartList () {
  2884. getPartList(this.modalData).then(({data}) => {
  2885. if (data && data.code === 0) {
  2886. this.partList = data.rows
  2887. this.modalData.partNo = this.partList[0].partNo
  2888. this.modalData.partDesc = this.partList[0].partDesc
  2889. this.modalData.invdefinetype = this.partList[0].invdefinetype
  2890. this.modalData.sku = this.partList[0].sku
  2891. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  2892. } else {
  2893. this.$alert(data.msg, '错误', {
  2894. confirmButtonText: '确定'
  2895. })
  2896. }
  2897. })
  2898. },
  2899. // 是否新增特殊任务
  2900. changeSpecialTask () {
  2901. // 先重置数据
  2902. this.modalData = {
  2903. flag: '1',
  2904. site: '',
  2905. bu: this.userBuList[0].buNo,
  2906. inspectionNo: '',
  2907. partNo: '',
  2908. partDesc: '',
  2909. inspectionTypeNo: '',
  2910. inspectionTypeName: '',
  2911. inspectorNo: '',
  2912. inspectorName: '',
  2913. submit_flag: '',
  2914. orderNo: '',
  2915. operationDesc: '',
  2916. operationNo: '',
  2917. resourceId: '',
  2918. resourceDesc: '',
  2919. rollQty: '',
  2920. seqNo: '',
  2921. batchRollNo: '',
  2922. invdefinetype: '',
  2923. sku: '',
  2924. cinvSourceCode: '',
  2925. specialRequirements: '',
  2926. templateId: '',
  2927. templateName: '',
  2928. specialTaskFlag: '',
  2929. workCenterNo: '',
  2930. rollNo: '',
  2931. umId: this.umList[0].umId,
  2932. umName: this.umList[0].umName
  2933. }
  2934. // 获取选中框
  2935. let obj = document.getElementsByName('specialTask')
  2936. // 判断是否打勾
  2937. if (obj[0].checked) {
  2938. let tempData = {
  2939. site: '',
  2940. bu: this.modalData.bu
  2941. }
  2942. this.modalData.specialTaskFlag = 'Y'
  2943. // 获取特殊工序列表
  2944. getSpecialOperationList(tempData).then(({data}) => {
  2945. if (data && data.code === 0) {
  2946. this.operationList = data.rows
  2947. } else {
  2948. this.$alert(data.msg, '错误', {
  2949. confirmButtonText: '确定'
  2950. })
  2951. }
  2952. })
  2953. // 派工单和工单号赋值
  2954. this.modalData.seqNo = '000#1TSGD'
  2955. this.modalData.orderNo = '000#1'
  2956. } else {
  2957. this.operationList = []
  2958. this.modalData.specialTaskFlag = ''
  2959. }
  2960. },
  2961. // 新增FAI巡检记录
  2962. saveData () {
  2963. if (this.modalData.bu === '' || this.modalData.bu == null) {
  2964. this.$message.warning('请选择BU!')
  2965. return
  2966. }
  2967. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  2968. this.$message.warning('请选择派工单!')
  2969. return
  2970. }
  2971. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  2972. this.$message.warning('请选择工单!')
  2973. return
  2974. }
  2975. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  2976. this.$message.warning('请选择物料!')
  2977. return
  2978. }
  2979. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  2980. this.$message.warning('请选择工序!')
  2981. return
  2982. }
  2983. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  2984. this.$message.warning('请选择机台!')
  2985. return
  2986. }
  2987. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  2988. this.$message.warning('请填写送检数量!')
  2989. return
  2990. }
  2991. if (this.modalData.umId === '' || this.modalData.umId == null) {
  2992. this.$message.warning('请选择单位!')
  2993. return
  2994. }
  2995. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  2996. this.$message.warning('请选择检验模板!')
  2997. return
  2998. }
  2999. this.saveLoading = true
  3000. if (this.modalData.flag === '1') {
  3001. saveFQCInspection(this.modalData).then(({data}) => {
  3002. if (data && data.code === 0) {
  3003. this.getDataList()
  3004. this.operationList = []
  3005. this.resourceList = []
  3006. this.partList = []
  3007. this.modalFlag = false
  3008. this.$message({
  3009. message: '操作成功',
  3010. type: 'success',
  3011. duration: 1500,
  3012. onClose: () => {}
  3013. })
  3014. } else {
  3015. this.$alert(data.msg, '错误', {
  3016. confirmButtonText: '确定'
  3017. })
  3018. }
  3019. this.saveLoading = false
  3020. }).catch(()=>{
  3021. this.saveLoading = false
  3022. })
  3023. }
  3024. },
  3025. // 检查动控是否开启
  3026. queryController () {
  3027. let tempData = {
  3028. controlNo: '10004',
  3029. site: this.$store.state.user.site,
  3030. }
  3031. queryController(tempData).then(({data}) => {
  3032. if (data && data.code === 0) {
  3033. this.controlData = data.rows
  3034. } else {
  3035. this.$alert(data.msg, '错误', {
  3036. confirmButtonText: '确定'
  3037. })
  3038. }
  3039. })
  3040. },
  3041. // 新增
  3042. addModal () {
  3043. this.modalData = {
  3044. flag: '1',
  3045. site: '',
  3046. bu: this.userBuList[0].buNo,
  3047. inspectionNo: '',
  3048. partNo: '',
  3049. partDesc: '',
  3050. inspectionTypeNo: '107',
  3051. inspectionTypeName: '',
  3052. inspectorNo: '',
  3053. inspectorName: '',
  3054. submit_flag: '',
  3055. orderNo: '',
  3056. operationDesc: '',
  3057. operationNo: '',
  3058. resourceId: '',
  3059. resourceDesc: '',
  3060. rollQty: '',
  3061. seqNo: '',
  3062. batchRollNo: '',
  3063. invdefinetype: '',
  3064. sku: '',
  3065. cinvSourceCode: '',
  3066. specialRequirements: '',
  3067. templateId: '',
  3068. templateName: '',
  3069. specialTaskFlag: '',
  3070. workCenterNo: '',
  3071. rollNo: '',
  3072. umId: this.umList[0].umId,
  3073. umName: this.umList[0].umName,
  3074. sjzs: '',
  3075. }
  3076. this.operationList = []
  3077. this.resourceList = []
  3078. this.partList = []
  3079. this.modalFlag = true
  3080. this.checked = false
  3081. },
  3082. // 获取检验模板列表
  3083. queryTemplateList () {
  3084. this.templateData.bu = this.modalData.bu
  3085. // 查询所有检验模板
  3086. queryTemplateList(this.templateData).then(({data}) => {
  3087. if (data && data.code === 0) {
  3088. this.templateList = data.rows
  3089. this.templateModelFlag = true
  3090. }else {
  3091. this.$alert(data.msg, '错误', {
  3092. confirmButtonText: '确定'
  3093. })
  3094. }
  3095. })
  3096. },
  3097. // 获取物料列表
  3098. queryPartList () {
  3099. this.partData.bu = this.modalData.bu
  3100. // 查询所有物料
  3101. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  3102. this.partList = []
  3103. this.partModelFlag = true
  3104. } else {
  3105. queryPartList(this.partData).then(({data}) => {
  3106. if (data && data.code === 0) {
  3107. this.partList = data.rows
  3108. this.partModelFlag = true
  3109. } else {
  3110. this.$alert(data.msg, '错误', {
  3111. confirmButtonText: '确定'
  3112. })
  3113. }
  3114. })
  3115. }
  3116. },
  3117. // 选中检验模板
  3118. getRowData (row) {
  3119. this.modalData.templateId = row.templateId
  3120. this.modalData.templateName = row.templateName
  3121. this.templateModelFlag = false
  3122. },
  3123. // 选中派工单号
  3124. getRowData1 (row) {
  3125. this.modalData.sku = row.sku
  3126. this.modalData.partNo = row.partNo
  3127. this.modalData.partDesc = row.partDesc
  3128. this.modalData.cinvSourceCode = row.cinvSourceCode
  3129. this.modalData.orderNo = row.orderNo
  3130. this.modalData.seqNo = row.seqNo
  3131. this.modalData.lotsize = row.lotsize
  3132. this.modalData.operationDesc = row.operationDesc
  3133. this.modalData.qtyrequired = row.qtyrequired
  3134. this.modalData.rollQty = row.qtyrequired
  3135. this.modalData.sjzs = row.sjzs
  3136. this.getOperationList()
  3137. //查询物料对应的模板
  3138. let params = {
  3139. site: this.modalData.bu.split('_')[0],
  3140. buNo: this.modalData.bu.split('_')[1],
  3141. partNo: this.modalData.partNo,
  3142. attributeNo: this.modalData.partNo,
  3143. partDesc: this.modalData.partDesc,
  3144. attributeType: 'A',
  3145. inspectionTypeNo: '107'
  3146. }
  3147. searchPartAttributeDetails(params).then(({data}) => {
  3148. if (data.total = 1){
  3149. this.modalData.templateId = data.rows[0].templateId
  3150. this.modalData.templateName = data.rows[0].templateName
  3151. }
  3152. })
  3153. this.seqDetailFlag = false
  3154. },
  3155. // 选中物料
  3156. getRowData2 (row) {
  3157. this.modalData.partNo = row.partNo
  3158. this.modalData.partDesc = row.partDesc
  3159. this.modalData.sku = row.sku
  3160. this.modalData.cinvSourceCode = row.cinvSourceCode
  3161. this.modalData.invdefinetype = row.invdefinetype
  3162. this.partData = {
  3163. site: '',
  3164. bu: '',
  3165. partNo: '',
  3166. partDesc: '',
  3167. sku: '',
  3168. cinvSourceCode: ''
  3169. }
  3170. this.partModelFlag = false
  3171. },
  3172. selectFlag () {
  3173. return true
  3174. },
  3175. // 单机选中
  3176. FAIClickRow (row) {
  3177. this.$refs.FAITable.toggleRowSelection(row)
  3178. },
  3179. // 复选
  3180. selectionFAI (val) {
  3181. this.FAISelections = val
  3182. },
  3183. // 刷新派设备文档的列表
  3184. getFileContentData (row) {
  3185. let currentData = {
  3186. orderRef1: row.site,
  3187. orderRef2: row.inspectionNo,
  3188. orderRef4: row.buNo,
  3189. partNo: row.partNo
  3190. }
  3191. this.fileLoading = true
  3192. getInspectionFile(currentData).then(({data}) => {
  3193. //区分请求成功和失败的状况
  3194. if (data && data.code === 0) {
  3195. this.fileContentList = data.rows
  3196. } else {
  3197. this.fileContentList = []
  3198. }
  3199. this.fileLoading = false
  3200. }).catch(()=>{
  3201. this.fileLoading = false
  3202. })
  3203. this.fileFlag = true
  3204. },
  3205. // 新增文件的modal
  3206. addUploadFileModal () {
  3207. let currentData = {
  3208. titleCon: 'FQC文件上传',
  3209. site: this.detailData.site,
  3210. buNo: this.detailData.buNo,
  3211. createBy: this.$store.state.user.name,
  3212. inspectionNo: this.detailData.inspectionNo,
  3213. remark: '',
  3214. folder: 'qcFQC',
  3215. }
  3216. //打开组件 去做新增业务
  3217. this.$nextTick(() => {
  3218. this.$refs.qcFAIUploadFile.init(currentData)
  3219. })
  3220. },
  3221. // 上传项目图片
  3222. uploadImageModal (row) {
  3223. let currentData = {
  3224. site: this.detailData.site,
  3225. buNo: this.detailData.buNo,
  3226. createBy: this.$store.state.user.name,
  3227. inspectionNo: this.detailData.inspectionNo,
  3228. itemNo: row.itemNo,
  3229. folder: 'FQCItemImageFile'
  3230. }
  3231. //打开组件 去做新增业务
  3232. this.$nextTick(() => {
  3233. this.$refs.comQcItemImageUploadFile.init(currentData)
  3234. })
  3235. },
  3236. // 查询检验类型
  3237. inspectorSearch () {
  3238. inspectorSearch().then(({data}) => {
  3239. if (data.code === 0) {
  3240. this.options = data.rows
  3241. }
  3242. })
  3243. },
  3244. // 获取主信息数据列表
  3245. getDataList () {
  3246. this.searchLoading = true
  3247. this.searchData.limit = this.pageSize
  3248. this.searchData.page = this.pageIndex
  3249. qcFQCInspectionSearch(this.searchData).then(({data}) => {
  3250. if (data.code === 0) {
  3251. this.dataList = data.page.list
  3252. this.pageIndex = data.page.currPage
  3253. this.pageSize = data.page.pageSize
  3254. this.totalPage = data.page.totalCount
  3255. this.searchLoading = false
  3256. } else {
  3257. this.searchLoading = false
  3258. }
  3259. }).catch(()=>{
  3260. this.searchLoading = false
  3261. })
  3262. },
  3263. // 每页数
  3264. sizeChangeHandle (val) {
  3265. this.pageSize = val
  3266. this.pageIndex = 1
  3267. this.getDataList()
  3268. },
  3269. // 当前页
  3270. currentChangeHandle (val) {
  3271. this.pageIndex = val
  3272. this.getDataList()
  3273. },
  3274. // 子明细每页数
  3275. sizeChangeHandle2 (val) {
  3276. this.pageSize2 = val
  3277. },
  3278. // 子明细当前页
  3279. currentChangeHandle2 (val) {
  3280. this.pageIndex2 = val
  3281. },
  3282. // 多选
  3283. selectionChangeHandle (val) {
  3284. this.dataListSelections = val
  3285. },
  3286. // 删除检验记录
  3287. deleteModal () {
  3288. if (this.FAISelections.length === 0) {
  3289. this.$alert('请勾选要删除的检验单!', '提示', {
  3290. confirmButtonText: '确定'
  3291. })
  3292. return false
  3293. }
  3294. this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', {
  3295. confirmButtonText: '确定',
  3296. cancelButtonText: '取消',
  3297. type: 'warning'
  3298. }).then(() => {
  3299. let tempData = {
  3300. site: '',
  3301. submitList: this.FAISelections
  3302. }
  3303. fqcRecordDelete(tempData).then(({data}) => {
  3304. if (data && data.code === 0) {
  3305. this.getDataList()
  3306. this.FAISelections = []
  3307. this.$message({
  3308. message: '操作成功',
  3309. type: 'success',
  3310. duration: 1500,
  3311. onClose: () => {}
  3312. })
  3313. } else {
  3314. this.$alert(data.msg, '错误', {
  3315. confirmButtonText: '确定'
  3316. })
  3317. }
  3318. })
  3319. }).catch(() => {
  3320. })
  3321. },
  3322. Transfer (type) {
  3323. if (type === '2') {
  3324. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  3325. this.$message.warning('请选择检验结论!')
  3326. return
  3327. }
  3328. if (this.detailData.inspectionResult === '不合格' && (this.detailData.disposalMeasures == null || this.detailData.disposalMeasures === '')) {
  3329. this.$message.warning('请选择处置措施!')
  3330. return
  3331. }
  3332. if (this.detailList.length > 0 && this.detailData.inspectionResult === '不合格') {
  3333. const flag = this.detailList.some(item => item.itemResult === 'N')
  3334. if (!flag) {
  3335. this.$message.warning('请选择不合格项目!')
  3336. return
  3337. }
  3338. }
  3339. if (this.detailData.inspectionResult !== '不合格') {
  3340. this.detailData.disposalMeasures = ''
  3341. this.detailData.disposalRemark = ''
  3342. }
  3343. }
  3344. this.saveDetailInformation(type)
  3345. },
  3346. // 新增明细信息
  3347. saveDetailInformation (type) {
  3348. this.saveInformationData.site = this.detailData.site
  3349. this.saveInformationData.buNo = this.detailData.buNo
  3350. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  3351. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  3352. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  3353. this.saveInformationData.inspectorNo = this.$store.state.user.name
  3354. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  3355. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  3356. this.saveInformationData.rollQty = this.detailData.rollQty
  3357. this.saveInformationData.samplingQty = this.detailData.samplingQty
  3358. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  3359. this.saveInformationData.partNo = this.detailData.partNo
  3360. this.saveInformationData.partDesc = this.detailData.partDesc
  3361. this.saveInformationData.operator = this.detailData.operator
  3362. this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
  3363. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  3364. this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
  3365. this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
  3366. this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
  3367. this.saveInformationData.type = type
  3368. this.transferLoadFlag = true
  3369. // this.saveInformationData.subDetailList = this.acquisitionList
  3370. saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
  3371. if (data && data.code === 0) {
  3372. this.getDataList()
  3373. this.detailInformationFlag = false
  3374. this.$message({
  3375. message: '操作成功',
  3376. type: 'success',
  3377. duration: 1500,
  3378. onClose: () => {}
  3379. })
  3380. } else {
  3381. this.$alert(data.msg, '错误', {
  3382. confirmButtonText: '确定'
  3383. })
  3384. }
  3385. this.transferLoadFlag = false
  3386. }).catch(()=>{
  3387. this.transferLoadFlag = false
  3388. })
  3389. },
  3390. // 开始检验
  3391. actionModal (row) {
  3392. this.actionData = {
  3393. site: row.site,
  3394. buNo: row.buNo,
  3395. inspectionNo: row.inspectionNo
  3396. }
  3397. getFQCItemObjectList(this.actionData).then(({data}) => {
  3398. if (data && data.code === 0) {
  3399. if (data.rows.length === 0) {
  3400. this.actionModal2()
  3401. } else {
  3402. this.itemObjectList = data.rows
  3403. this.ItemObjectModelFlag = true
  3404. }
  3405. } else {
  3406. this.$alert(data.msg, '错误', {
  3407. confirmButtonText: '确定'
  3408. })
  3409. }
  3410. })
  3411. },
  3412. // 开始检验
  3413. actionModal2 () {
  3414. this.$confirm(`确认开始检验?`, '提示', {
  3415. confirmButtonText: '确定',
  3416. cancelButtonText: '取消',
  3417. type: 'warning'
  3418. }).then(() => {
  3419. let tempData = {
  3420. site: this.actionData.site,
  3421. buNo: this.actionData.buNo,
  3422. inspectionNo: this.actionData.inspectionNo,
  3423. actionBy: this.$store.state.user.name,
  3424. state: '待检验',
  3425. equipmentList: this.itemObjectList
  3426. }
  3427. actionFQCInspection(tempData).then(({data}) => {
  3428. if (data && data.code === 0) {
  3429. this.getDataList()
  3430. this.$message({
  3431. message: '操作成功',
  3432. type: 'success',
  3433. duration: 1500,
  3434. onClose: () => {}
  3435. })
  3436. this.ItemObjectModelFlag = false
  3437. } else {
  3438. this.$alert(data.msg, '错误', {
  3439. confirmButtonText: '确定'
  3440. })
  3441. }
  3442. })
  3443. })
  3444. },
  3445. // 明细记录信息查询
  3446. detailModal (row) {
  3447. this.detailData.site = row.site
  3448. this.detailData.buNo = row.buNo
  3449. this.detailData.inspectionNo = row.inspectionNo
  3450. this.detailData.partNo = row.partNo
  3451. this.detailData.partDesc = row.partDesc
  3452. this.detailData.rollQty = row.rollQty
  3453. this.detailData.samplingQty = row.samplingQty
  3454. this.detailData.unqualifiedQty = row.unqualifiedQty
  3455. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  3456. this.detailData.submitFlag = row.submitFlag
  3457. this.detailData.disposalMeasures = row.disposalMeasures
  3458. this.detailData.disposalRemark = row.disposalRemark
  3459. this.detailData.inspectionResult = row.inspectionResult
  3460. this.detailData.inspectorNo = row.inspectorNo
  3461. this.detailData.inspectorName = row.inspectorName
  3462. this.detailData.inspectionRemark = row.inspectionRemark
  3463. this.detailData.cinvSourceCode = row.cinvSourceCode
  3464. this.detailData.sku = row.sku
  3465. this.detailData.invdefinetype = row.invdefinetype
  3466. this.detailData.umId = row.umId
  3467. this.detailData.umName = row.umName
  3468. this.detailData.operator = row.operator
  3469. this.detailData.operatorName = row.operatorName
  3470. this.detailData.responsiblePerson = row.responsiblePerson
  3471. this.detailData.responsiblePersonName = row.responsiblePersonName
  3472. this.detailData.state = row.state
  3473. if (row.state === '待检验') {
  3474. this.detailData.passQty = row.samplingQty
  3475. } else {
  3476. this.detailData.passQty = row.passQty
  3477. this.detailData.notPassQty = row.notPassQty
  3478. }
  3479. this.detailData.batchQualifiedQty = row.batchQualifiedQty
  3480. this.getInspectionFormData()
  3481. this.inspectorSearch()
  3482. // this.acquisitionList = []
  3483. this.detailInformationFlag = true
  3484. },
  3485. // 检验单明细
  3486. getInspectionFormData () {
  3487. fqcDetailSearch(this.detailData).then(({data}) => {
  3488. if (data && data.code === 0) {
  3489. this.detailList = data.rows
  3490. } else {
  3491. this.detailList = []
  3492. }
  3493. })
  3494. },
  3495. // 子明细记录信息查询
  3496. subDetailModal (row) {
  3497. this.subDetailLoading = true
  3498. this.subDetailData = row
  3499. this.pageIndex2 = 1
  3500. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3501. if (data.code === 0) {
  3502. this.tableData = data.rows
  3503. }
  3504. this.subDetailLoading = false
  3505. }).catch(()=>{
  3506. this.subDetailLoading = false
  3507. })
  3508. this.batchAddData = {
  3509. samplingLocation: '',
  3510. samplingLocationB: '',
  3511. samplingNumber: ''
  3512. }
  3513. this.subDetailFlag = true
  3514. },
  3515. // 子明细分页查询
  3516. subDetailModal2 () {
  3517. selectFQCSubDetailedRecord(this.subDetailData).then(({data}) => {
  3518. if (data.code === 0) {
  3519. this.tableData = data.rows
  3520. }
  3521. })
  3522. },
  3523. // 审核按钮
  3524. submitResult () {
  3525. let tempData1 = '' // 记录不是待审核状态的单号
  3526. let tempData2 = '' // 记录处置措施未填写的单号
  3527. if (this.FAISelections.length === 0) {
  3528. this.$alert('请勾选要审核的检验单!', '提示', {
  3529. confirmButtonText: '确定'
  3530. })
  3531. return false
  3532. }
  3533. for (let i = 0; i < this.FAISelections.length; i++) {
  3534. if (this.FAISelections[i].state !== '待审核'){
  3535. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  3536. }
  3537. if (this.FAISelections[i].inspectionResult === '不合格' && (this.FAISelections[i].disposalMeasures ==='' || this.FAISelections[i].disposalMeasures == null)) {
  3538. tempData2 = tempData2 + this.FAISelections[i].inspectionNo + '、'
  3539. }
  3540. }
  3541. if (tempData1 !== ''){
  3542. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3543. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  3544. confirmButtonText: '确定'
  3545. })
  3546. return false
  3547. }
  3548. if (tempData2 !== ''){
  3549. tempData2 = tempData2.substring(0, tempData2.length - 1)
  3550. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  3551. confirmButtonText: '确定'
  3552. })
  3553. return false
  3554. }
  3555. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  3556. confirmButtonText: '确定',
  3557. cancelButtonText: '取消',
  3558. type: 'warning'
  3559. }).then(() => {
  3560. this.submitData.submitList = this.FAISelections
  3561. saveFQCSubmitResult(this.submitData).then(({data}) => {
  3562. if (data && data.code ==0) {
  3563. this.getDataList()
  3564. this.FAISelections = []
  3565. this.$message({
  3566. message: '操作成功',
  3567. type: 'success',
  3568. duration: 1500,
  3569. onClose: () => {
  3570. }
  3571. })
  3572. } else {
  3573. this.$alert(data.msg, '错误', {
  3574. confirmButtonText: '确定'
  3575. })
  3576. }
  3577. })
  3578. })
  3579. },
  3580. // 取消审核
  3581. cancelApproval () {
  3582. let tempData1 = '' // 记录不是已完成状态的单号
  3583. if (this.FAISelections.length === 0) {
  3584. this.$message.warning('请勾选要取消审核的检验单!')
  3585. return
  3586. }
  3587. for (let i = 0; i < this.FAISelections.length; i++) {
  3588. if (this.FAISelections[i].state !== '已完成') {
  3589. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  3590. }
  3591. }
  3592. if (tempData1 !== '') {
  3593. tempData1 = tempData1.substring(0, tempData1.length - 1)
  3594. this.$message.warning('检验单号 ' + tempData1 + ' ,不是已完成状态!')
  3595. return
  3596. }
  3597. this.$confirm(`确定取消审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  3598. confirmButtonText: '确定',
  3599. cancelButtonText: '取消',
  3600. type: 'warning'
  3601. }).then(() => {
  3602. this.submitData.submitList = this.FAISelections
  3603. cancelApproval2(this.submitData).then(({data}) => {
  3604. if (data && data.code === 0) {
  3605. this.getDataList()
  3606. this.FAISelections = []
  3607. this.$message({
  3608. message: '操作成功',
  3609. type: 'success',
  3610. duration: 1500,
  3611. onClose: () => {}
  3612. })
  3613. } else {
  3614. this.$alert(data.msg, '错误', {
  3615. confirmButtonText: '确定'
  3616. })
  3617. }
  3618. })
  3619. })
  3620. },
  3621. // 子明细方法
  3622. //表格的新增
  3623. rowClassName ({ row, rowIndex }) {
  3624. row.xh = rowIndex + 1
  3625. row.num = this.tableData.indexOf(row) + 1
  3626. },
  3627. //单选框选中数据
  3628. handleDetailSelectionChange (selection) {
  3629. this.checkedDetail = selection
  3630. },
  3631. //点击新增更多
  3632. handleAddBtn (td) {
  3633. checkFQCIsSubmit(td).then(({data}) => {
  3634. if (data.flag !== 1) {
  3635. let obj = {
  3636. subDetailValue: '',
  3637. samplingLocation: '',
  3638. samplingLocationB: '',
  3639. subDetailValueB: '',
  3640. subDetailValueC: '',
  3641. subDetailValueD: '',
  3642. subDetailValueE: '',
  3643. }
  3644. this.tableData.push(obj)
  3645. } else {
  3646. this.$alert("记录已提交!", '错误', {
  3647. confirmButtonText: '确定'
  3648. })
  3649. }
  3650. })
  3651. },
  3652. // 批量新增操作
  3653. batchHandleAdd (td) {
  3654. checkFQCIsSubmit(td).then(({data}) => {
  3655. if (data.flag !== 1) {
  3656. this.batchHandleAddModalFlag = true
  3657. } else {
  3658. this.$alert("记录已提交!", '错误', {
  3659. confirmButtonText: '确定'
  3660. })
  3661. }
  3662. })
  3663. },
  3664. // 批量新增行
  3665. batchHandleAddModal () {
  3666. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  3667. let obj = {
  3668. samplingLocation: this.batchAddData.samplingLocation,
  3669. samplingLocationB: this.batchAddData.samplingLocationB,
  3670. subDetailValue: '',
  3671. subDetailValueB: '',
  3672. subDetailValueC: '',
  3673. subDetailValueD: '',
  3674. subDetailValueE: '',
  3675. }
  3676. this.tableData.push(obj)
  3677. }
  3678. this.batchHandleAddModalFlag = false
  3679. },
  3680. // 回车事件
  3681. nextFocus1 (index) {
  3682. let a1 = `${index + 1}` + `a`
  3683. this.$nextTick(() => {
  3684. this.$refs[a1].focus()
  3685. })
  3686. },
  3687. nextFocus2 (index) {
  3688. let a2 = `${index + 1}` + `b`
  3689. this.$nextTick(() => {
  3690. this.$refs[a2].focus()
  3691. })
  3692. },
  3693. nextFocus3 (index) {
  3694. let a3 = `${index + 1}` + `c`
  3695. this.$nextTick(() => {
  3696. this.$refs[a3].focus()
  3697. })
  3698. },
  3699. nextFocus4 (index) {
  3700. let a = `${index + 1}` + `d`
  3701. this.$nextTick(() => {
  3702. this.$refs[a].focus()
  3703. })
  3704. },
  3705. nextFocus5 (index) {
  3706. let a = `${index + 1}` + `e`
  3707. this.$nextTick(() => {
  3708. this.$refs[a].focus()
  3709. })
  3710. },
  3711. nextFocus6 (index) {
  3712. let a = `${index + 1}` + `f`
  3713. this.$nextTick(() => {
  3714. this.$refs[a].focus()
  3715. })
  3716. },
  3717. nextFocus7 (index) {
  3718. let a = `${index + 1}` + `g`
  3719. this.$nextTick(() => {
  3720. this.$refs[a].focus()
  3721. })
  3722. },
  3723. focusNextInput (index, type) {
  3724. let aaa = ''
  3725. if (this.detailList.length - 1 === index) {
  3726. aaa = `${type}0`
  3727. } else {
  3728. aaa = `${type}${index + 1}`
  3729. }
  3730. this.$nextTick(() => {
  3731. this.$refs[aaa].focus()
  3732. })
  3733. },
  3734. updateItemResult(row){
  3735. if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
  3736. this.$message.success("tuichu")
  3737. return;
  3738. }
  3739. if (row.maxValue == null && row.minValue == null) {
  3740. if (row.numberValue!=row.defaultValue){
  3741. row.itemResult = 'N'
  3742. }
  3743. }else if (row.maxValue != null && row.minValue != null){
  3744. if (row.numberValue>row.maxValue ||row.numberValue<row.minValue){
  3745. row.itemResult = 'N'
  3746. }else {
  3747. row.itemResult = 'Y'
  3748. }
  3749. }else if(row.maxValue != null){
  3750. if ( row.numberValue>row.maxValue) {
  3751. row.itemResult = 'N'
  3752. }else {
  3753. row.itemResult = 'Y'
  3754. }
  3755. }else if(row.minValue != null){
  3756. if ( row.numberValue<row.minValue) {
  3757. row.itemResult = 'N'
  3758. }else {
  3759. row.itemResult = 'Y'
  3760. }
  3761. }
  3762. },
  3763. //删除
  3764. handleDeleteBtn (td) {
  3765. checkFQCIsSubmit(td).then(({data}) => {
  3766. if (data.flag !== 1) {
  3767. if (this.checkedDetail.length === 0) {
  3768. this.$alert("请先选择要删除的数据", "提示", {
  3769. confirmButtonText: "确定",
  3770. });
  3771. } else {
  3772. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  3773. confirmButtonText: "确定",
  3774. cancelButtonText: "取消",
  3775. type: "warning",
  3776. callback: (action) => {
  3777. if (action === "confirm") {
  3778. let val = this.checkedDetail;
  3779. val.forEach((val, index) => {
  3780. this.tableData.splice(this.tableData.indexOf(val), 1)
  3781. if (this.templateTableData.length === 0) {
  3782. this.pageIndex2--
  3783. }
  3784. })
  3785. this.$message({
  3786. message: "删除成功!",
  3787. type: "success",
  3788. })
  3789. return
  3790. } else {
  3791. this.$message({
  3792. message: "已取消删除操作",
  3793. type: "warning",
  3794. })
  3795. return
  3796. }
  3797. },
  3798. })
  3799. }
  3800. } else {
  3801. this.$alert("记录已提交!", '错误', {
  3802. confirmButtonText: '确定'
  3803. })
  3804. }
  3805. })
  3806. },
  3807. // 新增子明细记录
  3808. saveSubDetailResult () {
  3809. for (let i = 0; i < this.tableData.length; i++) {
  3810. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  3811. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  3812. return
  3813. }
  3814. }
  3815. this.subDetailData.subDetailValues = this.tableData
  3816. this.subDetailVisiable = true
  3817. saveFQCSubDetailed(this.subDetailData).then(({data}) => {
  3818. if (data && data.code === 0) {
  3819. if (data.count > 0) {
  3820. this.subDetailData.itemResult = 'N'
  3821. this.subDetailData.unqualifiedQuantity = data.count
  3822. }
  3823. if (this.subDetailData.subDetailValues.length > 0) {
  3824. this.subDetailData.subDetailRecordNum = 1
  3825. } else {
  3826. this.subDetailData.subDetailRecordNum = -1
  3827. this.subDetailData.unqualifiedQuantity = 0
  3828. this.subDetailData.itemResult = 'Y'
  3829. }
  3830. this.subDetailFlag = false
  3831. this.tableData = []
  3832. this.$message({
  3833. message: '操作成功',
  3834. type: 'success',
  3835. duration: 1500,
  3836. onClose: () => {}
  3837. })
  3838. } else {
  3839. this.$alert(data.msg, '错误', {
  3840. confirmButtonText: '确定'
  3841. })
  3842. }
  3843. }).finally(() => {
  3844. this.subDetailVisiable = false
  3845. })
  3846. },
  3847. // 检验结论改变事件
  3848. resultChange () {
  3849. if (this.detailData.inspectionResult === '不合格') {
  3850. this.detailData.passQty = 0
  3851. }
  3852. },
  3853. // 校验用户是否收藏
  3854. favoriteIsOk () {
  3855. let userFavorite = {
  3856. userId: this.$store.state.user.id,
  3857. languageCode: this.$i18n.locale
  3858. }
  3859. userFavoriteList(userFavorite).then(({data}) => {
  3860. for (let i = 0; i < data.list.length; i++) {
  3861. if (this.$route.meta.menuId === data.list[i].menuId) {
  3862. this.favorite = true
  3863. }
  3864. }
  3865. })
  3866. },
  3867. // 收藏 OR 取消收藏
  3868. favoriteFunction () {
  3869. let userFavorite = {
  3870. userId: this.$store.state.user.id,
  3871. functionId: this.$route.meta.menuId,
  3872. }
  3873. if (this.favorite) {
  3874. removeUserFavorite(userFavorite).then(({data}) => {
  3875. this.$message.success(data.msg)
  3876. this.favorite = false
  3877. })
  3878. } else {
  3879. // 收藏
  3880. saveUserFavorite(userFavorite).then(({data}) => {
  3881. this.$message.success(data.msg)
  3882. this.favorite = true
  3883. })
  3884. }
  3885. },
  3886. //导出excel
  3887. async createExportData () {
  3888. this.searchData.limit = -1
  3889. this.searchData.page = 1
  3890. await qcFQCInspectionSearch(this.searchData).then(({data}) => {
  3891. this.exportList= data.page.list
  3892. })
  3893. return this.exportList
  3894. },
  3895. startDownload() {},
  3896. finishDownload() {},
  3897. fields () {
  3898. let json = "{"
  3899. this.columnList1.forEach((item, index) => {
  3900. if (index === this.columnList1.length - 1) {
  3901. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  3902. } else {
  3903. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  3904. }
  3905. })
  3906. json += "}"
  3907. let s = eval("(" + json + ")")
  3908. return s
  3909. },
  3910. // 动态列开始 获取 用户保存的 格式列
  3911. async getTableUserColumn (tableId, columnId) {
  3912. let queryTableUser = {
  3913. userId: this.$store.state.user.name,
  3914. functionId: this.$route.meta.menuId,
  3915. tableId: tableId,
  3916. status: true,
  3917. languageCode: this.$i18n.locale
  3918. }
  3919. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3920. if (data.rows.length > 0) {
  3921. //this.columnList1 = []
  3922. switch (columnId) {
  3923. case 1:
  3924. this.columnList1 = data.rows
  3925. break;
  3926. case 2:
  3927. this.detailColumnList = data.rows
  3928. break;
  3929. case 3:
  3930. this.seqDetailColumnList = data.rows
  3931. break;
  3932. // case 4:
  3933. // this.columnList3 = data.rows
  3934. // break;
  3935. }
  3936. } else {
  3937. this.getColumnList(tableId, columnId)
  3938. }
  3939. })
  3940. },
  3941. // 获取 tableDefault 列
  3942. async getColumnList (tableId, columnId) {
  3943. let queryTable = {
  3944. functionId: this.$route.meta.menuId,
  3945. tableId: tableId,
  3946. languageCode: this.$i18n.locale
  3947. }
  3948. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3949. if (!data.rows.length == 0) {
  3950. switch (columnId) {
  3951. case 1:
  3952. this.columnList1 = data.rows
  3953. break;
  3954. case 2:
  3955. this.detailColumnList = data.rows
  3956. break;
  3957. case 3:
  3958. this.seqDetailColumnList = data.rows
  3959. break;
  3960. // case 4:
  3961. // this.columnList3 = data.rows
  3962. // break;
  3963. }
  3964. } else {
  3965. // this.showDefault = true.
  3966. }
  3967. })
  3968. },
  3969. /**
  3970. * 明细导入后将返回值回传给父组件
  3971. * @param val
  3972. */
  3973. changeMyString (val) {
  3974. for (let i = 0; i < this.detailList.length; i++) {
  3975. if (val[this.detailList[i].itemNo] !== undefined) {
  3976. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  3977. if (val[this.detailList[i].itemNo] != null) {
  3978. this.detailList[i].subDetailRecordNum = 1
  3979. }
  3980. if (val[this.detailList[i].itemNo] > 0) {
  3981. this.detailList[i].itemResult = 'N'
  3982. }
  3983. }
  3984. }
  3985. },
  3986. searchSeqInfo () {
  3987. let tempData = {
  3988. // 取modalData.bu中index为0的字符作为site 例:2_01-Label 取2
  3989. bu: this.modalData.bu,
  3990. seqNo: this.seqDetailData.seqNo,
  3991. orderNo: this.seqDetailData.orderNo,
  3992. sku: this.seqDetailData.sku,
  3993. partDesc: this.seqDetailData.partDesc,
  3994. partNo: this.seqDetailData.partNo,
  3995. operationDesc: this.seqDetailData.operationDesc,
  3996. status: this.seqDetailData.status
  3997. }
  3998. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  3999. this.seqInfoList = []
  4000. } else {
  4001. searchSeqInfo(tempData).then(({data}) => {
  4002. if (data && data.code === 0) {
  4003. this.seqInfoList = data.rows
  4004. } else {
  4005. this.$alert(data.msg, '错误', {
  4006. confirmButtonText: '确定'
  4007. })
  4008. }
  4009. })
  4010. }
  4011. },
  4012. closeDialog () {
  4013. this.seqDetailData = {
  4014. seqNo : '',
  4015. orderNo: '',
  4016. sku: '',
  4017. partNo: '',
  4018. partDesc:'',
  4019. operationDesc: '',
  4020. status: '下达'
  4021. }
  4022. this.seqInfoList = []
  4023. },
  4024. //获取按钮的权限数据
  4025. getButtonAuthData () {
  4026. let searchFlag = this.isAuth(this.menuId + ":search")
  4027. let checkFlag = this.isAuth(this.menuId + ":check")
  4028. let saveFlag = this.isAuth(this.menuId + ":save")
  4029. let deleteFlag = this.isAuth(this.menuId + ":delete")
  4030. let detailFlag = this.isAuth(this.menuId + ":detail")
  4031. let fileFlag = this.isAuth(this.menuId + ":file")
  4032. let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
  4033. //处理页面的权限数据
  4034. this.authSearch = !searchFlag
  4035. this.authCheck = !checkFlag
  4036. this.authSave = !saveFlag
  4037. this.authDelete = !deleteFlag
  4038. this.authDetail = !detailFlag
  4039. this.authFile = !fileFlag
  4040. this.authCancelCheck = !cancelCheckFlag
  4041. },
  4042. }
  4043. }
  4044. </script>
  4045. <style scoped>
  4046. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  4047. color: red;
  4048. font-weight: bold;
  4049. }
  4050. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  4051. color: rgb(103,194,58);
  4052. font-weight: bold;
  4053. }
  4054. .el-table /deep/ .cell{
  4055. height: auto;
  4056. line-height: 1.5;
  4057. }
  4058. </style>