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.

4019 lines
142 KiB

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