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.

3966 lines
149 KiB

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