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.

4050 lines
145 KiB

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