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.

3207 lines
113 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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
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">
  11. <el-form-item :label="'检验单号'">
  12. <el-input v-model="searchData.inspectionNo" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'物料编码'">
  15. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'SKU'">
  18. <el-input v-model="searchData.sku" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'物料名称'">
  21. <el-input v-model="searchData.partDesc" clearable style="width: 221px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'PN'">
  24. <el-input v-model="searchData.cinvSourceCode" clearable style="width: 120px"></el-input>
  25. </el-form-item>
  26. <el-form-item :label="'工单号'">
  27. <el-input v-model="searchData.orderNo" clearable style="width: 137px"></el-input>
  28. </el-form-item>
  29. <el-form-item :label="'工序'">
  30. <el-input v-model="searchData.operationDesc" clearable style="width: 108px"></el-input>
  31. </el-form-item>
  32. </el-form>
  33. <el-form :inline="true" label-position="top" :model="searchData">
  34. <el-form-item :label="'状态'">
  35. <el-select v-model="searchData.state" style="width: 120px">
  36. <el-option label="全部" value=""></el-option>
  37. <el-option label="待检验" value="待检验"></el-option>
  38. <el-option label="待审核" value="待审核"></el-option>
  39. <el-option label="已完成" value="已完成"></el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item :label="'检验结论'">
  43. <el-select v-model="searchData.inspectionResult" style="width: 120px">
  44. <el-option label="全部" value=""></el-option>
  45. <el-option label="合格" value="合格"></el-option>
  46. <el-option label="不合格" value="不合格"></el-option>
  47. </el-select>
  48. </el-form-item>
  49. <el-form-item :label="'处置措施'">
  50. <el-select v-model="searchData.disposalMeasures" style="width: 120px">
  51. <el-option label="全部" value=""></el-option>
  52. <el-option
  53. v-for = "i in disposalMeasuresOptions"
  54. :key = "i.id"
  55. :label = "i.disposalMeasures"
  56. :value = "i.disposalMeasures">
  57. </el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item :label="'检验时间'">
  61. <el-date-picker style="width: 170px" v-model="searchData.startDate" type="datetime"
  62. value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期">
  63. </el-date-picker>
  64. -
  65. <el-date-picker style="width: 170px" v-model="searchData.endDate" type="datetime"
  66. value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期">
  67. </el-date-picker>
  68. </el-form-item>
  69. <el-form-item :label="' '">
  70. <el-button type="primary" @click="getDataList()">查询</el-button>
  71. <el-button type="primary" @click="addModal()">新增</el-button>
  72. <el-button type="primary" @click="submitResult()">审核</el-button>
  73. <el-button type="primary" @click="deleteModal()">删除</el-button>
  74. <download-excel
  75. :fields="fields()"
  76. :data="exportData"
  77. type="xls"
  78. :name="exportName"
  79. :header="exportHeader"
  80. :footer="exportFooter"
  81. :fetch="createExportData"
  82. :before-generate="startDownload"
  83. :before-finish="finishDownload"
  84. worksheet="导出信息"
  85. class="el-button el-button--primary el-button--medium">
  86. {{ "导出" }}
  87. </download-excel>
  88. </el-form-item>
  89. </el-form>
  90. <!-- 检验记录展示列表 -->
  91. <el-table
  92. :height="height"
  93. :data="dataList"
  94. border
  95. ref="FAITable"
  96. @row-click="FAIClickRow"
  97. @selection-change="selectionFAI"
  98. v-loading="dataListLoading"
  99. style="width: 100%;">
  100. <el-table-column
  101. type="selection"
  102. header-align="center"
  103. align="center"
  104. :selectable="selectFlag"
  105. width="50">
  106. </el-table-column>
  107. <el-table-column
  108. prop="state"
  109. header-align="center"
  110. align="center"
  111. label="状态">
  112. <template slot-scope="scope">
  113. <div :style="{fontWeight:'bold', color: scope.row.state === '待检验' ? 'red' : scope.row.state === '待审核' ? '#ffa500e0' : scope.row.state === '已完成' ? '#3ac252' : ''}">
  114. {{scope.row.state}}
  115. </div>
  116. </template>
  117. </el-table-column>
  118. <el-table-column
  119. v-for="(item,index) in columnList1" :key="index"
  120. :sortable="item.columnSortable"
  121. :prop="item.columnProp"
  122. :header-align="item.headerAlign"
  123. :show-overflow-tooltip="item.showOverflowTooltip"
  124. :align="item.align"
  125. :fixed="item.fixed==''?false:item.fixed"
  126. :min-width="item.columnWidth"
  127. :label="item.columnLabel">
  128. <template slot-scope="scope">
  129. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  130. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  131. </template>
  132. </el-table-column>
  133. <el-table-column
  134. fixed="right"
  135. header-align="center"
  136. align="center"
  137. width="200"
  138. label="操作">
  139. <template slot-scope="scope">
  140. <a type="text" size="small" @click="detailModal(scope.row)">检验单</a>
  141. <a type="text" size="small" @click="getFileContentData(scope.row)">工作文件</a>
  142. </template>
  143. </el-table-column>
  144. </el-table>
  145. <!-- 分页-->
  146. <el-pagination
  147. @size-change="sizeChangeHandle"
  148. @current-change="currentChangeHandle"
  149. :current-page="pageIndex"
  150. :page-sizes="[20, 50, 100, 200, 500]"
  151. :page-size="pageSize"
  152. :total="totalPage"
  153. layout="total, sizes, prev, pager, next, jumper">
  154. </el-pagination>
  155. <!-- 新增检验记录 -->
  156. <el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
  157. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  158. <el-form-item label="BU" prop="bu" :rules="rules.bu">
  159. <el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">
  160. <el-option
  161. v-for = "i in userBuList"
  162. :key = "i.buNo"
  163. :label = "i.buNo"
  164. :value = "i.buNo">
  165. <span style="float: left;width: 100px">{{ i.sitename }}</span>
  166. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
  167. {{ i.buDesc }}
  168. </span>
  169. </el-option>
  170. </el-select>
  171. </el-form-item>
  172. <el-form-item label="标签号">
  173. <!-- <el-autocomplete v-if="this.modalData.specialTaskFlag === 'Y'" disabled style="width: 456px" size="mini" v-model="modalData.rollNo" clearable-->
  174. <!-- :fetch-suggestions="querySearchAsync" @select="handleSelect"-->
  175. <!-- placeholder="请输入标签号">-->
  176. <!-- </el-autocomplete>-->
  177. <!-- <el-autocomplete v-if="this.modalData.specialTaskFlag !== 'Y'" style="width: 456px" size="mini" v-model="modalData.rollNo" clearable-->
  178. <!-- :fetch-suggestions="querySearchAsync" @select="handleSelect"-->
  179. <!-- placeholder="请输入标签号">-->
  180. <!-- </el-autocomplete>-->
  181. <el-input v-if="this.modalData.specialTaskFlag === 'Y'" disabled v-model="modalData.rollNo" style="width: 221px"></el-input>
  182. <el-input v-if="this.modalData.specialTaskFlag !== 'Y'" v-model="modalData.rollNo" @keyup.native.enter="rollNoEnter" clearable style="width: 221px"></el-input>
  183. </el-form-item>
  184. </el-form>
  185. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  186. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && (this.modalData.rollNo == '' || this.modalData.rollNo == null)" prop="orderNo" :rules="rules.seqNoType">
  187. <span slot="label" @click="getBaseList(1052)"><a herf="#">派工单号</a></span>
  188. <el-input v-model="modalData.seqNo" style="width: 221px"></el-input>
  189. </el-form-item>
  190. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y' && this.modalData.rollNo != '' && this.modalData.rollNo != null" prop="orderNo" :rules="rules.seqNoType">
  191. <span slot="label">派工单号</span>
  192. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  193. </el-form-item>
  194. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" prop="orderNo" :rules="rules.seqNoType">
  195. <span slot="label">派工单号</span>
  196. <el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
  197. </el-form-item>
  198. <el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
  199. <el-input v-model="modalData.orderNo" style="width: 221px" disabled></el-input>
  200. </el-form-item>
  201. </el-form>
  202. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  203. <el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
  204. <el-select v-model="modalData.operationDesc" placeholder="请选择" style="width: 221px">
  205. <el-option
  206. v-for = "i in operationList"
  207. :key = "i.operationNo"
  208. :label = "i.operationDesc"
  209. :value = "i.operationDesc">
  210. </el-option>
  211. </el-select>
  212. </el-form-item>
  213. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y'" label="机台" prop="resourceId" :rules="rules.resourceIdType">
  214. <!-- <el-select v-model="modalData.resourceDesc" placeholder="请选择" style="width: 221px">-->
  215. <!-- <el-option-->
  216. <!-- v-for = "i in resourceList"-->
  217. <!-- :key = "i.resourceId"-->
  218. <!-- :label = "i.resourceDesc"-->
  219. <!-- :value = "i.resourceId">-->
  220. <!-- </el-option>-->
  221. <!-- </el-select>-->
  222. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  223. </el-form-item>
  224. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'">
  225. <span slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
  226. <el-input v-model="modalData.resourceDesc" style="width: 221px"></el-input>
  227. </el-form-item>
  228. </el-form>
  229. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  230. <el-form-item v-if="this.modalData.specialTaskFlag !== 'Y'" label="物料编码" prop="partNo" :rules="rules.partNoType">
  231. <el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
  232. </el-form-item>
  233. <el-form-item v-if="this.modalData.specialTaskFlag === 'Y'" :model="modalData">
  234. <span slot="label" @click="queryPartList()"><a herf="#">物料编码</a></span>
  235. <el-input v-model="modalData.partNo" style="width: 221px"></el-input>
  236. </el-form-item>
  237. <el-form-item label="物料名称">
  238. <el-input v-model="modalData.partDesc" readonly style="width: 221px"></el-input>
  239. </el-form-item>
  240. </el-form>
  241. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  242. <el-form-item label="物料类别">
  243. <el-input v-model="modalData.spec" readonly style="width: 221px"></el-input>
  244. </el-form-item>
  245. <el-form-item label="SKU">
  246. <el-input v-model="modalData.sku" readonly style="width: 221px"></el-input>
  247. </el-form-item>
  248. </el-form>
  249. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  250. <el-form-item prop="templateId" :rules="rules.templateId">
  251. <span v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList()"><a>检验模板</a></span>
  252. <span v-if="this.controlData.baseData === '未控制'" slot="label">检验模板</span>
  253. <el-input v-model="modalData.templateName" disabled style="width: 221px"></el-input>
  254. </el-form-item>
  255. <el-form-item label="送检数量:" prop="rollQty" :rules="rules.rollQtyType">
  256. <el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
  257. </el-form-item>
  258. <el-form-item label="单位" prop="umId" :rules="rules.umIdType">
  259. <el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
  260. <el-option
  261. v-for = "i in umList"
  262. :key = "i.umId"
  263. :label = "i.umName"
  264. :value = "i.umId">
  265. </el-option>
  266. </el-select>
  267. </el-form-item>
  268. </el-form>
  269. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  270. <el-form-item label="老卷号">
  271. <el-input v-model="modalData.batchRollNo" style="width: 221px"></el-input>
  272. </el-form-item>
  273. <el-form-item label="无工单检验">
  274. <input type="checkbox" name="specialTask" v-model="checked" @click="changeSpecialTask()"/>
  275. </el-form-item>
  276. </el-form>
  277. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  278. <el-form-item label="特殊要求">
  279. <el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  280. </el-form-item>
  281. </el-form>
  282. <el-footer style="height:40px;margin-top: 55px;text-align:center">
  283. <el-button type="primary" @click="saveData()">保存</el-button>
  284. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  285. </el-footer>
  286. </el-dialog>
  287. <!-- 检验单详情页 -->
  288. <el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
  289. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()">
  290. <el-form-item :label="'物料编码'">
  291. <el-input v-model="detailData.partNo" readonly style="width: 100px"></el-input>
  292. </el-form-item>
  293. <el-form-item :label="'物料类别'">
  294. <el-input v-model="detailData.spec" readonly style="width: 200px"></el-input>
  295. </el-form-item>
  296. <el-form-item :label="'PN'">
  297. <el-input v-model="detailData.cinvSourceCode" readonly style="width: 100px"></el-input>
  298. </el-form-item>
  299. <el-form-item :label="'SKU'">
  300. <el-input v-model="detailData.sku" readonly style="width: 100px"></el-input>
  301. </el-form-item>
  302. <el-form-item :label="'物料名称'">
  303. <el-input v-model="detailData.partDesc" readonly style="width: 200px"></el-input>
  304. </el-form-item>
  305. <el-form-item :label="'送检数量'">
  306. <el-input class="numInput" v-model="detailData.rollQty" type="number" style="width: 80px"></el-input>
  307. </el-form-item>
  308. <el-form-item :label="'抽样数量'">
  309. <el-input class="numInput" v-model="detailData.samplingQty" type="number" style="width: 80px"></el-input>
  310. </el-form-item>
  311. <el-form-item :label="'单位'">
  312. <el-input v-model="detailData.umName" readonly style="width: 80px"></el-input>
  313. </el-form-item>
  314. </el-form>
  315. <el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()">
  316. <el-form-item :label="'不合格项目数量'">
  317. <el-input class="numInput" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled type="number" style="width: 80px"></el-input>
  318. <el-input class="numInput" @input="handleInput(detailData.unqualifiedQty,1)" v-if="detailData.submitFlag != 'Y'" v-model="detailData.unqualifiedQty" type="number" style="width: 80px"></el-input>
  319. </el-form-item>
  320. <el-form-item :label="'处置措施'">
  321. <el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled style="width: 100px">
  322. <el-option
  323. v-for = "i in disposalMeasuresOptions"
  324. :key = "i.id"
  325. :label = "i.disposalMeasures"
  326. :value = "i.disposalMeasures">
  327. </el-option>
  328. </el-select>
  329. <el-select v-if="detailData.submitFlag != 'Y'" clearable v-model="detailData.disposalMeasures" style="width: 100px">
  330. <el-option
  331. v-for = "i in disposalMeasuresOptions"
  332. :key = "i.id"
  333. :label = "i.disposalMeasures"
  334. :value = "i.disposalMeasures">
  335. </el-option>
  336. </el-select>
  337. </el-form-item>
  338. <el-form-item :label="'处置说明'">
  339. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 200px"></el-input>
  340. <el-input v-if="detailData.submitFlag != 'Y'" v-model="detailData.disposalRemark" style="width: 200px"></el-input>
  341. </el-form-item>
  342. <el-form-item :label="'检验结论'">
  343. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择">
  344. <el-option label="合格" value="合格"></el-option>
  345. <el-option label="不合格" value="不合格"></el-option>
  346. </el-select>
  347. <el-select v-if="detailData.submitFlag != 'Y'" v-model="detailData.inspectionResult" style="width: 100px" placeholder="请选择">
  348. <el-option label="合格" value="合格"></el-option>
  349. <el-option label="不合格" value="不合格"></el-option>
  350. </el-select>
  351. </el-form-item>
  352. <el-form-item label="检验员">
  353. <el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectorNo" disabled placeholder="请选择" style="width: 100px">
  354. <el-option
  355. v-for = "i in options"
  356. :key = "i.inspectorNo"
  357. :label = "i.inspectorName"
  358. :value = "i.inspectorNo">
  359. </el-option>
  360. </el-select>
  361. <el-select v-if="detailData.submitFlag != 'Y'" v-model="detailData.inspectorNo" disabled placeholder="请选择" style="width: 100px">
  362. <el-option
  363. v-for = "i in options"
  364. :key = "i.inspectorNo"
  365. :label = "i.inspectorName"
  366. :value = "i.inspectorNo">
  367. </el-option>
  368. </el-select>
  369. </el-form-item>
  370. <el-form-item :label="'质检备注'">
  371. <el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled style="width: 280px"></el-input>
  372. <el-input v-if="detailData.submitFlag != 'Y'" v-model="detailData.inspectionRemark" style="width: 280px"></el-input>
  373. </el-form-item>
  374. <el-form-item :label="' '">
  375. <el-button type="primary" @click="addUploadFileModal()">上传文件</el-button>
  376. <el-button type="primary" icon="el-icon-upload" @click="subDetailUpload()">明细导入</el-button>
  377. </el-form-item>
  378. <el-form-item :label="' '"></el-form-item>
  379. </el-form>
  380. <!-- 展示列表 -->
  381. <div class="rq ">
  382. <el-table
  383. :height="500"
  384. :data="detailList"
  385. border
  386. v-loading="dataListLoading"
  387. style="width: 100%;">
  388. <el-table-column
  389. prop=""
  390. header-align="center"
  391. align="center"
  392. min-width="60"
  393. label="操作">
  394. <template slot-scope="scope">
  395. <el-button class="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button>
  396. </template>
  397. </el-table-column>
  398. <el-table-column
  399. v-for="(item,index) in detailColumnList" :key="index"
  400. :sortable="item.columnSortable"
  401. :prop="item.columnProp"
  402. :header-align="item.headerAlign"
  403. :show-overflow-tooltip="item.showOverflowTooltip"
  404. :align="item.align"
  405. :fixed="item.fixed==''?false:item.fixed"
  406. :min-width="item.columnWidth"
  407. :label="item.columnLabel">
  408. <template slot-scope="scope">
  409. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  410. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  411. </template>
  412. </el-table-column>
  413. <el-table-column
  414. prop=""
  415. header-align="center"
  416. align="right"
  417. min-width="80"
  418. label="实测值">
  419. <template slot-scope="scope">
  420. <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'T'" v-model="scope.row.textValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  421. <el-input :ref="`textValue${scope.$index}`" v-if="scope.row.valueTypeDb === 'N'" v-model="scope.row.numberValue" @keyup.enter.native="focusNextInput(scope.$index, 'textValue')" type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  422. </template>
  423. </el-table-column>
  424. <el-table-column
  425. prop=""
  426. header-align="center"
  427. align="center"
  428. min-width="80"
  429. label="检验明细">
  430. <template slot-scope="scope">
  431. <el-button v-if="scope.row.subDetailRecordNum <= 0" type="primary" @click="subDetailModal(scope.row) ">点击输入</el-button>
  432. <el-button v-if="scope.row.subDetailRecordNum > 0" type="success" @click="subDetailModal(scope.row) ">点击输入</el-button>
  433. </template>
  434. </el-table-column>
  435. <el-table-column
  436. prop=""
  437. header-align="center"
  438. align="right"
  439. min-width="80"
  440. label="抽样数量">
  441. <template slot-scope="scope">
  442. <el-input class="numInput" v-if="detailData.submitFlag == 'Y'" v-model="scope.row.samplingQty" disabled type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  443. <el-input class="numInput" :ref="`samplingQty${scope.$index}`" v-if="detailData.submitFlag != 'Y'" v-model="scope.row.samplingQty" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  444. </template>
  445. </el-table-column>
  446. <el-table-column
  447. prop=""
  448. header-align="center"
  449. align="right"
  450. min-width="80"
  451. label="不合格数量">
  452. <template slot-scope="scope">
  453. <el-input class="numInput" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled type="number" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  454. <el-input class="numInput" :ref="`unqualifiedQuantity${scope.$index}`" v-if="detailData.submitFlag != 'Y'" v-model="scope.row.unqualifiedQuantity" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  455. </template>
  456. </el-table-column>
  457. <el-table-column
  458. prop=""
  459. header-align="center"
  460. align="right"
  461. min-width="75"
  462. label="项目检验结论">
  463. <template slot-scope="scope">
  464. <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;padding: 0px" >
  465. <el-option label="合格" value="Y" style="color: green"></el-option>
  466. <el-option label="不合格" value="N" style="color: red"></el-option>
  467. </el-select>
  468. <el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag != 'Y'" v-model="scope.row.itemResult" style="height: 11px;padding: 0px" placeholder="合格">
  469. <el-option label="合格" value="Y" style="color: green"></el-option>
  470. <el-option label="不合格" value="N" style="color: red"></el-option>
  471. </el-select>
  472. </template>
  473. </el-table-column>
  474. </el-table>
  475. </div>
  476. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  477. <el-button type="primary" @click="Transfer()">保存</el-button>
  478. <el-button type="primary" @click="detailInformationFlag=false">关闭</el-button>
  479. </el-footer>
  480. </el-dialog>
  481. <!-- 派工单号 -->
  482. <el-dialog title="派工单号" @close="closeDialog" :close-on-click-modal="false" v-drag :visible.sync="seqDetailFlag" width="952px" height="273px">
  483. <el-form :inline="true" label-position="top" :model="seqDetailData" style="margin-left: 7px;margin-top: -5px;">
  484. <el-form-item label="工单号">
  485. <el-input v-model="seqDetailData.orderNo" clearable style="width: 137px"></el-input>
  486. </el-form-item>
  487. <el-form-item label="派工单号">
  488. <el-input v-model="seqDetailData.seqNo" clearable style="width: 137px"></el-input>
  489. </el-form-item>
  490. <el-form-item label="SKU">
  491. <el-input v-model="seqDetailData.sku" clearable style="width: 100px"></el-input>
  492. </el-form-item>
  493. <el-form-item label="物料编码">
  494. <el-input v-model="seqDetailData.partNo" clearable style="width: 137px"></el-input>
  495. </el-form-item>
  496. <el-form-item label="物料名称">
  497. <el-input v-model="seqDetailData.partDesc" clearable style="width: 137px"></el-input>
  498. </el-form-item>
  499. <el-form-item label="工序">
  500. <el-input v-model="seqDetailData.operationDesc" clearable style="width: 137px"></el-input>
  501. </el-form-item>
  502. <el-form-item>
  503. <el-button type="primary" @click="searchSeqInfo()" style="margin-top: 24px">查询</el-button>
  504. </el-form-item>
  505. </el-form>
  506. <el-table
  507. :height="400"
  508. :data="seqInfoList"
  509. @row-dblclick="getRowData1"
  510. border
  511. v-loading="dataListLoading"
  512. style="width: 100%;">
  513. <el-table-column
  514. prop="orderNo"
  515. header-align="center"
  516. align="center"
  517. label="工单号">
  518. </el-table-column>
  519. <el-table-column
  520. prop="seqNo"
  521. header-align="center"
  522. align="center"
  523. label="派工单号">
  524. </el-table-column>
  525. <el-table-column
  526. prop="sku"
  527. header-align="center"
  528. align="center"
  529. label="SKU">
  530. </el-table-column>
  531. <el-table-column
  532. prop="partNo"
  533. header-align="center"
  534. align="center"
  535. label="物料编码">
  536. </el-table-column>
  537. <el-table-column
  538. prop="partDesc"
  539. header-align="center"
  540. align="center"
  541. label="物料名称">
  542. </el-table-column>
  543. <el-table-column
  544. prop="lotsize"
  545. header-align="center"
  546. align="center"
  547. label="工单数量">
  548. </el-table-column>
  549. <el-table-column
  550. prop="qtyrequired"
  551. header-align="center"
  552. align="center"
  553. label="派工数量">
  554. </el-table-column>
  555. <el-table-column
  556. prop="operationDesc"
  557. header-align="center"
  558. align="center"
  559. label="工序">
  560. </el-table-column>
  561. </el-table>
  562. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  563. <el-button type="primary" @click="seqDetailFlag = false">关闭</el-button>
  564. </el-footer>
  565. </el-dialog>
  566. <!-- 子明细信息 -->
  567. <el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="572px">
  568. <el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
  569. <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBtn(subDetailData)">删除</el-button>
  570. <el-button type="primary" icon="el-icon-more" size="mini" @click="batchHandleAdd(subDetailData)">批量新增</el-button>
  571. <div class="rq ">
  572. <el-table
  573. :height="400"
  574. :data="tableData"
  575. border
  576. :row-class-name="rowClassName"
  577. @selection-change="handleDetailSelectionChange"
  578. style="width: 100%;">
  579. <el-table-column type="selection" align="center" width="50"></el-table-column>
  580. <el-table-column label="序号" align="center" prop="xh" width="50"></el-table-column>
  581. <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
  582. <template slot-scope="{row}">
  583. <el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
  584. <el-input :ref="`${row.xh-1}` + `a`" v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
  585. </template>
  586. </el-table-column>
  587. <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
  588. <template slot-scope="{row}">
  589. <el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
  590. <el-input :ref="`${row.xh-1}` + `b`" v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
  591. </template>
  592. </el-table-column>
  593. <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值" width="200">
  594. <template slot-scope="{row}">
  595. <el-input v-if="tableData[row.xh-1].isSubmit==='Y'" v-model="tableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
  596. <el-input :ref="`${row.xh-1}` + `c`" v-if="tableData[row.xh-1].isSubmit!='Y'" v-model="tableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
  597. </template>
  598. </el-table-column>
  599. </el-table>
  600. </div>
  601. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  602. <el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult()">保存</el-button>
  603. <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
  604. </el-footer>
  605. </el-dialog>
  606. <!-- 批量新增子明细操作-->
  607. <el-dialog title="批量新增" :close-on-click-modal="false" v-drag :visible.sync="batchHandleAddModalFlag" width="510px">
  608. <el-form :inline="true" label-position="top">
  609. <el-form-item :label="'默认抽样位置A'">
  610. <el-input v-model="batchAddData.samplingLocation" style="width: 150px"></el-input>
  611. </el-form-item>
  612. <el-form-item :label="'默认抽样位置B'">
  613. <el-input v-model="batchAddData.samplingLocationB" style="width: 150px"></el-input>
  614. </el-form-item>
  615. <el-form-item :label="'抽样数量'">
  616. <el-input type="number" v-model="batchAddData.samplingNumber" style="width: 150px"></el-input>
  617. </el-form-item>
  618. </el-form>
  619. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  620. <el-button type="primary" @click="batchHandleAddModal()">保存</el-button>
  621. <el-button type="primary" @click="batchHandleAddModalFlag=false">关闭</el-button>
  622. </el-footer>
  623. </el-dialog>
  624. <!-- 检验模板 -->
  625. <el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="templateModelFlag" width="520px">
  626. <div class="rq">
  627. <el-form :inline="true" label-position="top" :model="templateData">
  628. <el-form-item :label="'模板编码'">
  629. <el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
  630. </el-form-item>
  631. <el-form-item :label="'模板名称'">
  632. <el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
  633. </el-form-item>
  634. <el-form-item :label="'检验类型'">
  635. <el-select v-model="templateData.inspectionTypeNo" style="width: 100px">
  636. <el-option
  637. v-for = "i in typeOptions"
  638. :key = "i.inspectionTypeNo"
  639. :label = "i.inspectionTypeName"
  640. :value = "i.inspectionTypeNo">
  641. </el-option>
  642. </el-select>
  643. </el-form-item>
  644. <el-form-item :label="' '">
  645. <el-button type="primary" @click="queryTemplateList()">查询</el-button>
  646. </el-form-item>
  647. </el-form>
  648. <el-table
  649. :height="300"
  650. :data="templateList"
  651. @row-dblclick="getRowData"
  652. border
  653. v-loading="dataListLoading"
  654. style="width: 100%;">
  655. <el-table-column
  656. v-for="(item,index) in templateDetailList" :key="index"
  657. :sortable="item.columnSortable"
  658. :prop="item.columnProp"
  659. :header-align="item.headerAlign"
  660. :show-overflow-tooltip="item.showOverflowTooltip"
  661. :align="item.align"
  662. :fixed="item.fixed==''?false:item.fixed"
  663. :min-width="item.columnWidth"
  664. :label="item.columnLabel">
  665. <template slot-scope="scope">
  666. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  667. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  668. </template>
  669. </el-table-column>
  670. </el-table>
  671. </div>
  672. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  673. <el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
  674. </el-footer>
  675. </el-dialog>
  676. <!-- 物料 -->
  677. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="520px">
  678. <div class="rq">
  679. <el-form :inline="true" label-position="top" :model="partData">
  680. <el-form-item :label="'物料编码'">
  681. <el-input v-model="partData.partNo" clearable style="width: 115px"></el-input>
  682. </el-form-item>
  683. <el-form-item :label="'物料名称'">
  684. <el-input v-model="partData.partDesc" clearable style="width: 115px"></el-input>
  685. </el-form-item>
  686. <el-form-item :label="'SKU'">
  687. <el-input v-model="partData.sku" clearable style="width: 79px"></el-input>
  688. </el-form-item>
  689. <el-form-item :label="'PN'">
  690. <el-input v-model="partData.cinvSourceCode" clearable style="width: 79px"></el-input>
  691. </el-form-item>
  692. <el-form-item :label="' '">
  693. <el-button type="primary" @click="queryPartList()">查询</el-button>
  694. </el-form-item>
  695. </el-form>
  696. <el-table
  697. :height="300"
  698. :data="partList"
  699. @row-dblclick="getRowData2"
  700. border
  701. v-loading="dataListLoading"
  702. style="width: 100%;">
  703. <el-table-column
  704. v-for="(item,index) in partDetailList" :key="index"
  705. :sortable="item.columnSortable"
  706. :prop="item.columnProp"
  707. :header-align="item.headerAlign"
  708. :show-overflow-tooltip="item.showOverflowTooltip"
  709. :align="item.align"
  710. :fixed="item.fixed==''?false:item.fixed"
  711. :min-width="item.columnWidth"
  712. :label="item.columnLabel">
  713. <template slot-scope="scope">
  714. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  715. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  716. </template>
  717. </el-table-column>
  718. </el-table>
  719. </div>
  720. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  721. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  722. </el-footer>
  723. </el-dialog>
  724. <!-- 文件清单 -->
  725. <el-dialog title="文件清单" :close-on-click-modal="false" v-drag :visible.sync="fileFlag" width="800px">
  726. <el-table
  727. :height="350"
  728. :data="fileContentList"
  729. border
  730. v-loading="dataListLoading"
  731. style="width: 100%; ">
  732. <el-table-column
  733. v-for="(item,index) in fileColumnList" :key="index"
  734. :sortable="item.columnSortable"
  735. :prop="item.columnProp"
  736. :header-align="item.headerAlign"
  737. :show-overflow-tooltip="item.showOverflowTooltip"
  738. :align="item.align"
  739. :fixed="item.fixed==''?false:item.fixed"
  740. :min-width="item.columnWidth"
  741. :label="item.columnLabel">
  742. <template slot-scope="scope">
  743. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  744. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  745. </template>
  746. </el-table-column>
  747. <el-table-column
  748. fixed="right"
  749. header-align="center"
  750. align="center"
  751. width="100"
  752. label="操作">
  753. <template slot-scope="scope">
  754. <a @click="downloadFile(scope.row)">下载</a>
  755. <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
  756. </template>
  757. </el-table-column>
  758. </el-table>
  759. </el-dialog>
  760. <!-- chooseList模态框 -->
  761. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  762. <!-- 上传文件的modal -->
  763. <qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getDataList()" v-drag></qcFAIUploadFile>
  764. <!-- 上传文件的modal -->
  765. <comQcItemImageUploadFile ref="comQcItemImageUploadFile" @refreshPageTables2="getInspectionFormData()" v-drag></comQcItemImageUploadFile>
  766. <!-- 子明细导入 -->
  767. <subDetailUpload @changeEvent="changeMyString" ref="subDetailUpload" @refreshPageTables="getInspectionFormData()" v-drag></subDetailUpload>
  768. </div>
  769. </template>
  770. <script>
  771. import {
  772. qcFAIInspectionSearch, // 查询FAI的检验记录
  773. faiDetailSearch, // 查询FAI的检验明细
  774. inspectorSearch, // 查询检验员
  775. faiRecordDelete, // 删除检验记录
  776. saveFAIDetailedRecord, // 新增明细信息
  777. saveFAISubmitResult, // 审核
  778. saveFAISubDetailed, // 新增子明细信息
  779. selectFAISubDetailedRecord, // 子明细记录信息查询
  780. checkFAIIsSubmit, // 检查是否已提交
  781. getResourceList, // 查询机台列表
  782. getOperationList, // 查询工序列表
  783. getPartList, // 查询物料列表
  784. saveFAIInspection, // 新增FAI检验
  785. queryController, // 检查动控
  786. queryTemplateList, // 获取检验模板列表
  787. getSpecialOperationList, // 获取特殊工序列表
  788. inspectionTypeSearch, // 搜索所有检验类型
  789. disposalMeasuresSearch, // 获取处置措施列表
  790. getRollNo, // 模糊查询标签号
  791. rollNoEnter, // 标签号回车事件
  792. queryPartList, // 查询物料集合
  793. umSearch, // 查询单位列表
  794. getSiteAndBuByUserName,
  795. searchSeqInfo, // 派工单号查询
  796. } from "@/api/qc/qc.js"
  797. import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
  798. import Chooselist from '@/views/modules/common/Chooselist_eam'
  799. import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js'
  800. import {deleteObjectFile} from '@/api/eam/eam.js'
  801. import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
  802. import qcFAIUploadFile from "./qc_FAI_upload_file"
  803. import comQcItemImageUploadFile from "./com_qc_itemImage_upload_file"
  804. import subDetailUpload from "./sub_detail_upload"
  805. /*上传文件的組件*/
  806. export default {
  807. components: {
  808. Chooselist,
  809. qcFAIUploadFile,
  810. comQcItemImageUploadFile,
  811. subDetailUpload
  812. },
  813. watch: {
  814. detailList: {
  815. deep: true,
  816. handler: function (newV, oldV) {
  817. let num = 0
  818. for (let i = 0; i < this.detailList.length; i++) {
  819. if (this.detailList[i].itemResult === 'N') {
  820. num++
  821. }
  822. }
  823. this.detailData.unqualifiedQty = num
  824. }
  825. },
  826. },
  827. data () {
  828. return {
  829. inspectionNo: '',
  830. fileFlag: false,
  831. fileContentList: [],
  832. // 是否收藏
  833. favorite: false,
  834. // 导出 start
  835. exportData: [],
  836. exportName: "FAI检验录入" + this.dayjs().format('YYYYMMDDHHmmss'),
  837. exportHeader: ["FAI检验录入"],
  838. exportFooter: [],
  839. exportList: [],
  840. // 导出 end
  841. checkCompletedData: {
  842. inspectionNo: ''
  843. },
  844. submitData: {
  845. site: this.$store.state.user.site,
  846. inspectionNo: '',
  847. submit_flag: '',
  848. inspectionResult: '',
  849. submitList: [],
  850. },
  851. tagNo: '',
  852. searchData: {
  853. site: '',
  854. userName: this.$store.state.user.name,
  855. inspectionNo: '',
  856. state: '待检验',
  857. inspectionResult: '',
  858. orderNo: '',
  859. operationDesc: '',
  860. startDate: '',
  861. endDate: '',
  862. partNo: '',
  863. partDesc: '',
  864. cinvSourceCode: '',
  865. sku: '',
  866. disposalMeasures: '',
  867. page: 1,
  868. limit: 10,
  869. },
  870. pageIndex: 1,
  871. pageSize: 20,
  872. totalPage: 0,
  873. height: 200,
  874. dataList: [],
  875. dataListLoading: false,
  876. dataListSelections: [],
  877. modalData: {
  878. flag: '',
  879. site: '',
  880. bu: '',
  881. inspectionNo: '',
  882. partNo: '',
  883. partDesc: '',
  884. inspectionTypeNo: '106',
  885. inspectionTypeName: '',
  886. inspectorNo: '',
  887. inspectorName: '',
  888. submit_flag: '',
  889. seqNo: '',
  890. batchRollNo: '',
  891. spec: '',
  892. orderNo: '',
  893. sku: '',
  894. cinvSourceCode: '',
  895. qtyrequired: '',
  896. lotsize:'',
  897. operationDesc:'',
  898. specialRequirements: '',
  899. templateId: '',
  900. templateName: '',
  901. specialTaskFlag: '',
  902. workCenterNo: '',
  903. rollNo: '',
  904. umId: '',
  905. umName: ''
  906. },
  907. // 展示列集
  908. columnList1: [
  909. {
  910. userId: this.$store.state.user.name,
  911. functionId: 301007,
  912. serialNumber: '301007Table1BuDesc',
  913. tableId: "301007Table1",
  914. tableName: "FAI检验记录表",
  915. columnProp: 'buDesc',
  916. headerAlign: "center",
  917. align: "center",
  918. columnLabel: 'BU',
  919. columnHidden: false,
  920. columnImage: false,
  921. columnSortable: false,
  922. sortLv: 0,
  923. status: true,
  924. fixed: '',
  925. columnWidth: 100,
  926. },
  927. {
  928. userId: this.$store.state.user.name,
  929. functionId: 301007,
  930. serialNumber: '301007Table1InspectionNo',
  931. tableId: "301007Table1",
  932. tableName: "FAI检验记录表",
  933. columnProp: 'inspectionNo',
  934. headerAlign: "center",
  935. align: "center",
  936. columnLabel: '检验单号',
  937. columnHidden: false,
  938. columnImage: false,
  939. columnSortable: false,
  940. sortLv: 0,
  941. status: true,
  942. fixed: '',
  943. columnWidth: 120,
  944. },
  945. {
  946. userId: this.$store.state.user.name,
  947. functionId: 301007,
  948. serialNumber: '301007Table1BatchRollNo',
  949. tableId: "301007Table1",
  950. tableName: "FQC检验记录表",
  951. columnProp: 'batchRollNo',
  952. headerAlign: "center",
  953. align: "center",
  954. columnLabel: '老卷号',
  955. columnHidden: false,
  956. columnImage: false,
  957. columnSortable: false,
  958. sortLv: 0,
  959. status: true,
  960. fixed: '',
  961. columnWidth: 100,
  962. },
  963. {
  964. userId: this.$store.state.user.name,
  965. functionId: 301007,
  966. serialNumber: '301007Table1RollNo',
  967. tableId: "301007Table1",
  968. tableName: "FQC检验记录表",
  969. columnProp: 'rollNo',
  970. headerAlign: "center",
  971. align: "center",
  972. columnLabel: '标签条码',
  973. columnHidden: false,
  974. columnImage: false,
  975. columnSortable: false,
  976. sortLv: 0,
  977. status: true,
  978. fixed: '',
  979. columnWidth: 100,
  980. },
  981. {
  982. userId: this.$store.state.user.name,
  983. functionId: 301007,
  984. serialNumber: '301007Table1InspectionResult',
  985. tableId: "301007Table1",
  986. tableName: "FQC检验记录表",
  987. columnProp: 'inspectionResult',
  988. headerAlign: "center",
  989. align: "center",
  990. columnLabel: '检验结论',
  991. columnHidden: false,
  992. columnImage: false,
  993. columnSortable: false,
  994. sortLv: 0,
  995. status: true,
  996. fixed: '',
  997. columnWidth: 80,
  998. },
  999. {
  1000. userId: this.$store.state.user.name,
  1001. functionId: 301007,
  1002. serialNumber: '301007Table1DisposalMeasures',
  1003. tableId: "301007Table1",
  1004. tableName: "FQC检验记录表",
  1005. columnProp: 'disposalMeasures',
  1006. headerAlign: "center",
  1007. align: "center",
  1008. columnLabel: '处置措施',
  1009. columnHidden: false,
  1010. columnImage: false,
  1011. columnSortable: false,
  1012. sortLv: 0,
  1013. status: true,
  1014. fixed: '',
  1015. columnWidth: 100,
  1016. },
  1017. {
  1018. userId: this.$store.state.user.name,
  1019. functionId: 301007,
  1020. serialNumber: '301007Table1TaskDate',
  1021. tableId: "301007Table1",
  1022. tableName: "FQC检验记录表",
  1023. columnProp: 'taskDate',
  1024. headerAlign: "center",
  1025. align: "center",
  1026. columnLabel: '任务生成日期',
  1027. columnHidden: false,
  1028. columnImage: false,
  1029. columnSortable: false,
  1030. sortLv: 0,
  1031. status: true,
  1032. fixed: '',
  1033. columnWidth: 120,
  1034. },
  1035. {
  1036. userId: this.$store.state.user.name,
  1037. functionId: 301007,
  1038. serialNumber: '301007Table1InspectionCycle',
  1039. tableId: "301007Table1",
  1040. tableName: "FQC检验记录表",
  1041. columnProp: 'inspectionCycle',
  1042. headerAlign: "center",
  1043. align: "right",
  1044. columnLabel: '检验周期(h)',
  1045. columnHidden: false,
  1046. columnImage: false,
  1047. columnSortable: false,
  1048. sortLv: 0,
  1049. status: true,
  1050. fixed: '',
  1051. columnWidth: 80,
  1052. },
  1053. {
  1054. userId: this.$store.state.user.name,
  1055. functionId: 301007,
  1056. serialNumber: '301007Table1OrderNo',
  1057. tableId: "301007Table1",
  1058. tableName: "FQC检验记录表",
  1059. columnProp: 'orderNo',
  1060. headerAlign: "center",
  1061. align: "center",
  1062. columnLabel: '工单号',
  1063. columnHidden: false,
  1064. columnImage: false,
  1065. columnSortable: false,
  1066. sortLv: 0,
  1067. status: true,
  1068. fixed: '',
  1069. columnWidth: 120,
  1070. },
  1071. {
  1072. userId: this.$store.state.user.name,
  1073. functionId: 301007,
  1074. serialNumber: '301007Table1SeqNo',
  1075. tableId: "301007Table1",
  1076. tableName: "FQC检验记录表",
  1077. columnProp: 'seqNo',
  1078. headerAlign: "center",
  1079. align: "center",
  1080. columnLabel: '派工单号',
  1081. columnHidden: false,
  1082. columnImage: false,
  1083. columnSortable: false,
  1084. sortLv: 0,
  1085. status: true,
  1086. fixed: '',
  1087. columnWidth: 150,
  1088. },
  1089. {
  1090. userId: this.$store.state.user.name,
  1091. functionId: 301007,
  1092. serialNumber: '301007Table1OperationDesc',
  1093. tableId: "301007Table1",
  1094. tableName: "FQC检验记录表",
  1095. columnProp: 'operationDesc',
  1096. headerAlign: "center",
  1097. align: "center",
  1098. columnLabel: '工序',
  1099. columnHidden: false,
  1100. columnImage: false,
  1101. columnSortable: false,
  1102. sortLv: 0,
  1103. status: true,
  1104. fixed: '',
  1105. columnWidth: 100,
  1106. },
  1107. {
  1108. userId: this.$store.state.user.name,
  1109. functionId: 301007,
  1110. serialNumber: '301007Table1ResourceDesc',
  1111. tableId: "301007Table1",
  1112. tableName: "FQC检验记录表",
  1113. columnProp: 'resourceDesc',
  1114. headerAlign: "center",
  1115. align: "center",
  1116. columnLabel: '机台',
  1117. columnHidden: false,
  1118. columnImage: false,
  1119. columnSortable: false,
  1120. sortLv: 0,
  1121. status: true,
  1122. fixed: '',
  1123. columnWidth: 100,
  1124. },
  1125. {
  1126. userId: this.$store.state.user.name,
  1127. functionId: 301007,
  1128. serialNumber: '301007Table1PartNo',
  1129. tableId: "301007Table1",
  1130. tableName: "FQC检验记录表",
  1131. columnProp: 'partNo',
  1132. headerAlign: "center",
  1133. align: "center",
  1134. columnLabel: '物料编码',
  1135. columnHidden: false,
  1136. columnImage: false,
  1137. columnSortable: false,
  1138. sortLv: 0,
  1139. status: true,
  1140. fixed: '',
  1141. columnWidth: 100,
  1142. },
  1143. {
  1144. userId: this.$store.state.user.name,
  1145. functionId: 301007,
  1146. serialNumber: '301007Table1Spec',
  1147. tableId: "301007Table1",
  1148. tableName: "FQC检验记录表",
  1149. columnProp: 'spec',
  1150. headerAlign: "center",
  1151. align: "center",
  1152. columnLabel: '物料类别',
  1153. columnHidden: false,
  1154. columnImage: false,
  1155. columnSortable: false,
  1156. sortLv: 0,
  1157. status: true,
  1158. fixed: '',
  1159. columnWidth: 150,
  1160. },
  1161. {
  1162. userId: this.$store.state.user.name,
  1163. functionId: 301007,
  1164. serialNumber: '301007Table1CinvSourceCode',
  1165. tableId: "301007Table1",
  1166. tableName: "FQC检验记录表",
  1167. columnProp: 'cinvSourceCode',
  1168. headerAlign: "center",
  1169. align: "center",
  1170. columnLabel: 'PN',
  1171. columnHidden: false,
  1172. columnImage: false,
  1173. columnSortable: false,
  1174. sortLv: 0,
  1175. status: true,
  1176. fixed: '',
  1177. columnWidth: 100,
  1178. },
  1179. {
  1180. userId: this.$store.state.user.name,
  1181. functionId: 301007,
  1182. serialNumber: '301007Table1Sku',
  1183. tableId: "301007Table1",
  1184. tableName: "FQC检验记录表",
  1185. columnProp: 'sku',
  1186. headerAlign: "center",
  1187. align: "center",
  1188. columnLabel: 'SKU',
  1189. columnHidden: false,
  1190. columnImage: false,
  1191. columnSortable: false,
  1192. sortLv: 0,
  1193. status: true,
  1194. fixed: '',
  1195. columnWidth: 100,
  1196. },
  1197. {
  1198. userId: this.$store.state.user.name,
  1199. functionId: 301007,
  1200. serialNumber: '301007Table1PartDesc',
  1201. tableId: "301007Table1",
  1202. tableName: "FQC检验记录表",
  1203. columnProp: 'partDesc',
  1204. headerAlign: "center",
  1205. align: "center",
  1206. columnLabel: '物料名称',
  1207. columnHidden: false,
  1208. columnImage: false,
  1209. columnSortable: false,
  1210. sortLv: 0,
  1211. status: true,
  1212. fixed: '',
  1213. columnWidth: 150,
  1214. },
  1215. {
  1216. userId: this.$store.state.user.name,
  1217. functionId: 301007,
  1218. serialNumber: '301007Table1RollQty',
  1219. tableId: "301007Table1",
  1220. tableName: "FQC检验记录表",
  1221. columnProp: 'rollQty',
  1222. headerAlign: "center",
  1223. align: "right",
  1224. columnLabel: '送检数量',
  1225. columnHidden: false,
  1226. columnImage: false,
  1227. columnSortable: false,
  1228. sortLv: 0,
  1229. status: true,
  1230. fixed: '',
  1231. columnWidth: 80,
  1232. },
  1233. {
  1234. userId: this.$store.state.user.name,
  1235. functionId: 301007,
  1236. serialNumber: '301007Table1SamplingQty',
  1237. tableId: "301007Table1",
  1238. tableName: "FQC检验记录表",
  1239. columnProp: 'samplingQty',
  1240. headerAlign: "center",
  1241. align: "right",
  1242. columnLabel: '抽样数量',
  1243. columnHidden: false,
  1244. columnImage: false,
  1245. columnSortable: false,
  1246. sortLv: 0,
  1247. status: true,
  1248. fixed: '',
  1249. columnWidth: 80,
  1250. },
  1251. {
  1252. userId: this.$store.state.user.name,
  1253. functionId: 301007,
  1254. serialNumber: '301007Table1UmName',
  1255. tableId: "301007Table1",
  1256. tableName: "FQC检验记录表",
  1257. columnProp: 'umName',
  1258. headerAlign: "center",
  1259. align: "center",
  1260. columnLabel: '单位',
  1261. columnHidden: false,
  1262. columnImage: false,
  1263. columnSortable: false,
  1264. sortLv: 0,
  1265. status: true,
  1266. fixed: '',
  1267. columnWidth: 80,
  1268. },
  1269. {
  1270. userId: this.$store.state.user.name,
  1271. functionId: 301007,
  1272. serialNumber: '301007Table1InspectionRemark',
  1273. tableId: "301007Table1",
  1274. tableName: "FQC检验记录表",
  1275. columnProp: 'inspectionRemark',
  1276. headerAlign: "center",
  1277. align: "center",
  1278. columnLabel: '质检备注',
  1279. columnHidden: false,
  1280. columnImage: false,
  1281. columnSortable: false,
  1282. sortLv: 0,
  1283. status: true,
  1284. fixed: '',
  1285. columnWidth: 120,
  1286. },
  1287. {
  1288. userId: this.$store.state.user.name,
  1289. functionId: 301007,
  1290. serialNumber: '301007Table1DisposalRemark',
  1291. tableId: "301007Table1",
  1292. tableName: "FQC检验记录表",
  1293. columnProp: 'disposalRemark',
  1294. headerAlign: "center",
  1295. align: "center",
  1296. columnLabel: '处置说明',
  1297. columnHidden: false,
  1298. columnImage: false,
  1299. columnSortable: false,
  1300. sortLv: 0,
  1301. status: true,
  1302. fixed: '',
  1303. columnWidth: 120,
  1304. },
  1305. {
  1306. userId: this.$store.state.user.name,
  1307. functionId: 301007,
  1308. serialNumber: '301007Table1InspectorDate',
  1309. tableId: "301007Table1",
  1310. tableName: "FQC检验记录表",
  1311. columnProp: 'inspectorDate',
  1312. headerAlign: "center",
  1313. align: "center",
  1314. columnLabel: '检验时间',
  1315. columnHidden: false,
  1316. columnImage: false,
  1317. columnSortable: false,
  1318. sortLv: 0,
  1319. status: true,
  1320. fixed: '',
  1321. columnWidth: 120,
  1322. },
  1323. {
  1324. userId: this.$store.state.user.name,
  1325. functionId: 301007,
  1326. serialNumber: '301007Table1InspectorName',
  1327. tableId: "301007Table1",
  1328. tableName: "FQC检验记录表",
  1329. columnProp: 'inspectorName',
  1330. headerAlign: "center",
  1331. align: "center",
  1332. columnLabel: '质检员',
  1333. columnHidden: false,
  1334. columnImage: false,
  1335. columnSortable: false,
  1336. sortLv: 0,
  1337. status: true,
  1338. fixed: '',
  1339. columnWidth: 100,
  1340. },
  1341. {
  1342. userId: this.$store.state.user.name,
  1343. functionId: 301007,
  1344. serialNumber: '301007Table1SpecialRequirements',
  1345. tableId: "301007Table1",
  1346. tableName: "FQC检验记录表",
  1347. columnProp: 'specialRequirements',
  1348. headerAlign: "center",
  1349. align: "center",
  1350. columnLabel: '特殊要求',
  1351. columnHidden: false,
  1352. columnImage: false,
  1353. columnSortable: false,
  1354. sortLv: 0,
  1355. status: true,
  1356. fixed: '',
  1357. columnWidth: 120,
  1358. },
  1359. ],
  1360. //项目清单
  1361. detailData: {
  1362. site: '',
  1363. buNo: '',
  1364. inspectionNo:'',
  1365. partNo:'',
  1366. partDesc:'',
  1367. rollQty:'',
  1368. samplingQty: '',
  1369. unqualifiedQty: 0,
  1370. unqualifiedQuantity:'',
  1371. disposalMeasures:'',
  1372. disposalRemark: '',
  1373. inspectionResult: '',
  1374. inspectorNo: '',
  1375. inspectorName: '',
  1376. inspectionRemark: '',
  1377. submitFlag: '',
  1378. cinvSourceCode: '',
  1379. sku: '',
  1380. spec: '',
  1381. umId: '',
  1382. umName: ''
  1383. },
  1384. detailInformationFlag: false,
  1385. detailList: [],
  1386. saveInformationData: {
  1387. site: '',
  1388. buNo: '',
  1389. inspectionNo:'',
  1390. disposalMeasures: '',
  1391. disposalRemark: '',
  1392. inspectorNo: '',
  1393. inspectionRemark: '',
  1394. samplingQty: '',
  1395. rollQty: '',
  1396. itemList:[],
  1397. unqualifiedQty: ''
  1398. },
  1399. detailColumnList: [
  1400. {
  1401. userId: this.$store.state.user.name,
  1402. functionId: 301007,
  1403. serialNumber: '301007Table2ItemDesc',
  1404. tableId: "301007Table2",
  1405. tableName: "检验单明细表",
  1406. columnProp: 'itemDesc',
  1407. headerAlign: "center",
  1408. align: "center",
  1409. columnLabel: '检验项目',
  1410. columnHidden: false,
  1411. columnImage: false,
  1412. columnSortable: false,
  1413. sortLv: 0,
  1414. status: true,
  1415. fixed: '',
  1416. columnWidth: 120,
  1417. },
  1418. {
  1419. userId: this.$store.state.user.name,
  1420. functionId: 301007,
  1421. serialNumber: '301007Table2SamplingLevelDesc',
  1422. tableId: "301007Table2",
  1423. tableName: "检验单明细表",
  1424. columnProp: 'samplingLevelDesc',
  1425. headerAlign: "center",
  1426. align: "center",
  1427. columnLabel: '检验水平',
  1428. columnHidden: false,
  1429. columnImage: false,
  1430. columnSortable: false,
  1431. sortLv: 0,
  1432. status: true,
  1433. fixed: '',
  1434. columnWidth: 120,
  1435. },
  1436. {
  1437. userId: this.$store.state.user.name,
  1438. functionId: 301007,
  1439. serialNumber: '301007Table2SamplingProgrammeDesc',
  1440. tableId: "301007Table2",
  1441. tableName: "检验单明细表",
  1442. columnProp: 'samplingProgrammeDesc',
  1443. headerAlign: "center",
  1444. align: "center",
  1445. columnLabel: '检验方案',
  1446. columnHidden: false,
  1447. columnImage: false,
  1448. columnSortable: false,
  1449. sortLv: 0,
  1450. status: true,
  1451. fixed: '',
  1452. columnWidth: 120,
  1453. },
  1454. {
  1455. userId: this.$store.state.user.name,
  1456. functionId: 301007,
  1457. serialNumber: '301007Table2MethodName',
  1458. tableId: "301007Table2",
  1459. tableName: "检验单明细表",
  1460. columnProp: 'methodName',
  1461. headerAlign: "center",
  1462. align: "center",
  1463. columnLabel: '检验方法',
  1464. columnHidden: false,
  1465. columnImage: false,
  1466. columnSortable: false,
  1467. sortLv: 0,
  1468. status: true,
  1469. fixed: '',
  1470. columnWidth: 120,
  1471. },
  1472. {
  1473. userId: this.$store.state.user.name,
  1474. functionId: 301007,
  1475. serialNumber: '301007Table2MethodRemark',
  1476. tableId: "301007Table2",
  1477. tableName: "检验单明细表",
  1478. columnProp: 'methodRemark',
  1479. headerAlign: "center",
  1480. align: "center",
  1481. columnLabel: '检验方法说明',
  1482. columnHidden: false,
  1483. columnImage: false,
  1484. columnSortable: false,
  1485. sortLv: 0,
  1486. status: true,
  1487. fixed: '',
  1488. columnWidth: 150,
  1489. },
  1490. {
  1491. userId: this.$store.state.user.name,
  1492. functionId: 301007,
  1493. serialNumber: '301007Table2ObjectDesc',
  1494. tableId: "301007Table2",
  1495. tableName: "检验单明细表",
  1496. columnProp: 'objectDesc',
  1497. headerAlign: "center",
  1498. align: "center",
  1499. columnLabel: '检测仪器',
  1500. columnHidden: false,
  1501. columnImage: false,
  1502. columnSortable: false,
  1503. sortLv: 0,
  1504. status: true,
  1505. fixed: '',
  1506. columnWidth: 120,
  1507. },
  1508. {
  1509. userId: this.$store.state.user.name,
  1510. functionId: 301007,
  1511. serialNumber: '301007Table2Aql',
  1512. tableId: "301007Table2",
  1513. tableName: "检验单明细表",
  1514. columnProp: 'aql',
  1515. headerAlign: "center",
  1516. align: "right",
  1517. columnLabel: 'AQL',
  1518. columnHidden: false,
  1519. columnImage: false,
  1520. columnSortable: false,
  1521. sortLv: 0,
  1522. status: true,
  1523. fixed: '',
  1524. columnWidth: 80,
  1525. },
  1526. {
  1527. userId: this.$store.state.user.name,
  1528. functionId: 301007,
  1529. serialNumber: '301007Table2Ac',
  1530. tableId: "301007Table2",
  1531. tableName: "检验单明细表",
  1532. columnProp: 'ac',
  1533. headerAlign: "center",
  1534. align: "right",
  1535. columnLabel: 'AC',
  1536. columnHidden: false,
  1537. columnImage: false,
  1538. columnSortable: false,
  1539. sortLv: 0,
  1540. status: true,
  1541. fixed: '',
  1542. columnWidth: 80,
  1543. },
  1544. {
  1545. userId: this.$store.state.user.name,
  1546. functionId: 301007,
  1547. serialNumber: '301007Table2Re',
  1548. tableId: "301007Table2",
  1549. tableName: "检验单明细表",
  1550. columnProp: 're',
  1551. headerAlign: "center",
  1552. align: "right",
  1553. columnLabel: 'RE',
  1554. columnHidden: false,
  1555. columnImage: false,
  1556. columnSortable: false,
  1557. sortLv: 0,
  1558. status: true,
  1559. fixed: '',
  1560. columnWidth: 80,
  1561. },
  1562. {
  1563. userId: this.$store.state.user.name,
  1564. functionId: 301007,
  1565. serialNumber: '301007Table2DefaultValue',
  1566. tableId: "301007Table2",
  1567. tableName: "检验单明细表",
  1568. columnProp: 'defaultValue',
  1569. headerAlign: "center",
  1570. align: "right",
  1571. columnLabel: '标准值',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. columnSortable: false,
  1575. sortLv: 0,
  1576. status: true,
  1577. fixed: '',
  1578. columnWidth: 100,
  1579. },
  1580. {
  1581. userId: this.$store.state.user.name,
  1582. functionId: 301007,
  1583. serialNumber: '301007Table2MaxValue',
  1584. tableId: "301007Table2",
  1585. tableName: "检验单明细表",
  1586. columnProp: 'maxValue',
  1587. headerAlign: "center",
  1588. align: "right",
  1589. columnLabel: '上限值',
  1590. columnHidden: false,
  1591. columnImage: false,
  1592. columnSortable: false,
  1593. sortLv: 0,
  1594. status: true,
  1595. fixed: '',
  1596. columnWidth: 100,
  1597. },
  1598. {
  1599. userId: this.$store.state.user.name,
  1600. functionId: 301007,
  1601. serialNumber: '301007Table2MinValue',
  1602. tableId: "301007Table2",
  1603. tableName: "检验单明细表",
  1604. columnProp: 'minValue',
  1605. headerAlign: "center",
  1606. align: "right",
  1607. columnLabel: '下限值',
  1608. columnHidden: false,
  1609. columnImage: false,
  1610. columnSortable: false,
  1611. sortLv: 0,
  1612. status: true,
  1613. fixed: '',
  1614. columnWidth: 100,
  1615. },
  1616. {
  1617. userId: this.$store.state.user.name,
  1618. functionId: 301007,
  1619. serialNumber: '301007Table2ValueType',
  1620. tableId: "301007Table2",
  1621. tableName: "检验单明细表",
  1622. columnProp: 'valueType',
  1623. headerAlign: "center",
  1624. align: "center",
  1625. columnLabel: '检测值类型',
  1626. columnHidden: false,
  1627. columnImage: false,
  1628. columnSortable: false,
  1629. sortLv: 0,
  1630. status: true,
  1631. fixed: '',
  1632. columnWidth: 80,
  1633. },
  1634. ],
  1635. fileColumnList: [
  1636. {
  1637. columnProp: 'fileName',
  1638. headerAlign: "center",
  1639. align: "center",
  1640. columnLabel: '文件名称',
  1641. columnHidden: false,
  1642. columnImage: false,
  1643. columnSortable: false,
  1644. sortLv: 0,
  1645. status: true,
  1646. fixed: '',
  1647. },
  1648. {
  1649. columnProp: 'createdBy',
  1650. headerAlign: "center",
  1651. align: 'center',
  1652. columnLabel: '上传人',
  1653. columnHidden: false,
  1654. columnImage: false,
  1655. columnSortable: true,
  1656. sortLv: 0,
  1657. status: true,
  1658. fixed: false
  1659. },
  1660. {
  1661. columnProp: 'createDate',
  1662. headerAlign: "center",
  1663. align: 'center',
  1664. columnLabel: '上传时间',
  1665. columnHidden: false,
  1666. columnImage: false,
  1667. columnSortable: true,
  1668. sortLv: 0,
  1669. status: true,
  1670. fixed: false
  1671. },
  1672. {
  1673. columnProp: 'orderRef3',
  1674. headerAlign: "center",
  1675. align: 'center',
  1676. columnLabel: '备注',
  1677. columnHidden: false,
  1678. columnImage: false,
  1679. columnSortable: true,
  1680. sortLv: 0,
  1681. status: true,
  1682. fixed: false
  1683. },
  1684. ],
  1685. // 派工单号
  1686. seqInfoList: [],
  1687. seqDetailFlag: false,
  1688. seqDetailData: {
  1689. orderNo: '',
  1690. seqNo: '',
  1691. sku: '',
  1692. partNo: '',
  1693. partDesc:'',
  1694. operationDesc:'',
  1695. qtyrequired:'',
  1696. lotsize:''
  1697. },
  1698. // 子明细数据对象
  1699. tableData: [],
  1700. checkedDetail: [],
  1701. subDetailFlag: false,
  1702. subDetailData: {
  1703. site: '',
  1704. buNo: '',
  1705. inspectionNo: '',
  1706. itemNo: '',
  1707. itemDesc: '',
  1708. defaultValue: '',
  1709. maxValue: '',
  1710. minValue: '',
  1711. valueTypeDb: '',
  1712. subDetailValues:[]
  1713. },
  1714. options: [],
  1715. FAISelections: [],
  1716. modalFlag: false,
  1717. rules: {
  1718. orderNoType:[
  1719. {
  1720. required: true,
  1721. message: ' ',
  1722. trigger: 'change'
  1723. }
  1724. ],
  1725. operationDescType:[
  1726. {
  1727. required: true,
  1728. message: ' ',
  1729. trigger: 'change'
  1730. }
  1731. ],
  1732. resourceIdType:[
  1733. {
  1734. required: true,
  1735. message: ' ',
  1736. trigger: 'change'
  1737. }
  1738. ],
  1739. rollQtyType:[
  1740. {
  1741. required: true,
  1742. message: ' ',
  1743. trigger: 'change'
  1744. }
  1745. ],
  1746. seqNoType: [
  1747. {
  1748. required: true,
  1749. message: ' ',
  1750. trigger: 'change'
  1751. }
  1752. ],
  1753. partNoType: [
  1754. {
  1755. required: true,
  1756. message: ' ',
  1757. trigger: 'change'
  1758. }
  1759. ],
  1760. umIdType: [
  1761. {
  1762. required: true,
  1763. message: ' ',
  1764. trigger: 'change'
  1765. }
  1766. ],
  1767. templateId: [
  1768. {
  1769. required: true,
  1770. message: ' ',
  1771. trigger: 'change'
  1772. }
  1773. ],
  1774. bu:[
  1775. {
  1776. required: true,
  1777. message: ' ',
  1778. trigger: 'change'
  1779. }
  1780. ]
  1781. },
  1782. resourceList: [],
  1783. operationList: [],
  1784. partList: [],
  1785. batchHandleAddModalFlag: false,
  1786. batchAddData: {
  1787. samplingLocation: '',
  1788. samplingLocationB: '',
  1789. samplingNumber: ''
  1790. },
  1791. controlData: {},
  1792. templateData: {
  1793. site: '',
  1794. bu: '',
  1795. templateId: '',
  1796. templateName: '',
  1797. inspectionTypeNo: '',
  1798. inspectionTypeName: ''
  1799. },
  1800. templateList: [],
  1801. templateModelFlag: false,
  1802. templateDetailList: [
  1803. {
  1804. columnProp: 'templateId',
  1805. headerAlign: "center",
  1806. align: "center",
  1807. columnLabel: '模板编码',
  1808. columnHidden: false,
  1809. columnImage: false,
  1810. columnSortable: false,
  1811. sortLv: 0,
  1812. status: true,
  1813. fixed: '',
  1814. },
  1815. {
  1816. columnProp: 'templateName',
  1817. headerAlign: "center",
  1818. align: "center",
  1819. columnLabel: '模板名称',
  1820. columnHidden: false,
  1821. columnImage: false,
  1822. columnSortable: false,
  1823. sortLv: 0,
  1824. status: true,
  1825. fixed: '',
  1826. },
  1827. {
  1828. columnProp: 'inspectionTypeName',
  1829. headerAlign: "center",
  1830. align: "center",
  1831. columnLabel: '检验类型',
  1832. columnHidden: false,
  1833. columnImage: false,
  1834. columnSortable: false,
  1835. sortLv: 0,
  1836. status: true,
  1837. fixed: '',
  1838. },
  1839. ],
  1840. checked: false,
  1841. typeOptions: [],
  1842. disposalMeasuresOptions: [],
  1843. timeout: null,
  1844. partData: {
  1845. site: '',
  1846. bu: '',
  1847. partNo: '',
  1848. partDesc: '',
  1849. sku: '',
  1850. cinvSourceCode: '',
  1851. },
  1852. partDetailList: [
  1853. {
  1854. columnProp: 'partNo',
  1855. headerAlign: "center",
  1856. align: "center",
  1857. columnLabel: '物料编码',
  1858. columnHidden: false,
  1859. columnImage: false,
  1860. columnSortable: false,
  1861. sortLv: 0,
  1862. status: true,
  1863. fixed: '',
  1864. },
  1865. {
  1866. columnProp: 'partDesc',
  1867. headerAlign: "center",
  1868. align: "center",
  1869. columnLabel: '物料名称',
  1870. columnHidden: false,
  1871. columnImage: false,
  1872. columnSortable: false,
  1873. sortLv: 0,
  1874. status: true,
  1875. fixed: '',
  1876. },
  1877. {
  1878. columnProp: 'sku',
  1879. headerAlign: "center",
  1880. align: "center",
  1881. columnLabel: 'SKU',
  1882. columnHidden: false,
  1883. columnImage: false,
  1884. columnSortable: false,
  1885. sortLv: 0,
  1886. status: true,
  1887. fixed: '',
  1888. },
  1889. {
  1890. columnProp: 'cinvSourceCode',
  1891. headerAlign: "center",
  1892. align: "center",
  1893. columnLabel: 'PN',
  1894. columnHidden: false,
  1895. columnImage: false,
  1896. columnSortable: false,
  1897. sortLv: 0,
  1898. status: true,
  1899. fixed: '',
  1900. },
  1901. ],
  1902. partModelFlag: false,
  1903. umList: [],
  1904. userBuList: []
  1905. }
  1906. },
  1907. mounted () {
  1908. this.$nextTick(() => {
  1909. this.height = window.innerHeight - 210
  1910. })
  1911. },
  1912. created () {
  1913. // 获取用户的 site 和 bu
  1914. this.getSiteAndBuByUserName()
  1915. // 数据列表
  1916. this.getDataList()
  1917. // 收藏
  1918. this.favoriteIsOk()
  1919. // 检验类型
  1920. this.inspectionTypeSearch()
  1921. // 处置措施列表
  1922. this.disposalMeasuresSearch()
  1923. // 单位
  1924. this.umSearch()
  1925. // 查看 质量任务生成规则控制 动控是否开启
  1926. this.queryController()
  1927. // 动态列
  1928. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  1929. this.getTableUserColumn(this.$route.meta.menuId+'table2',2)
  1930. },
  1931. methods: {
  1932. // bu内容改变事件
  1933. buChange () {
  1934. if (this.modalData.specialTaskFlag !== 'Y') { // 正常检验
  1935. this.modalData.templateId = ''
  1936. this.modalData.templateName = ''
  1937. } else { // 无工单检验
  1938. this.modalData.partNo = ''
  1939. this.modalData.partDesc = ''
  1940. this.modalData.spec = ''
  1941. this.modalData.sku = ''
  1942. this.modalData.cinvSourceCode = ''
  1943. this.modalData.templateId = ''
  1944. this.modalData.templateName = ''
  1945. }
  1946. },
  1947. // 获取用户的bu
  1948. getSiteAndBuByUserName () {
  1949. let tempData = {
  1950. username: this.$store.state.user.name,
  1951. }
  1952. getSiteAndBuByUserName(tempData).then(({data}) => {
  1953. if (data.code === 0) {
  1954. this.userBuList = data.rows
  1955. }
  1956. })
  1957. },
  1958. // ======= 正则校验 =======
  1959. handleInput (value, type) {
  1960. // 大于等于0,且只能输入4位小数
  1961. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  1962. if (val == null || val == undefined || val == '') {
  1963. val = 0
  1964. }
  1965. if (type === 1) {
  1966. this.detailData.unqualifiedQty = val
  1967. }
  1968. },
  1969. // 子明细导入
  1970. subDetailUpload () {
  1971. let currentData = {
  1972. flag: 'FAI',
  1973. site: this.detailData.site,
  1974. buNo: this.detailData.buNo,
  1975. inspectionNo: this.detailData.inspectionNo
  1976. }
  1977. //打开组件 去做新增业务
  1978. this.$nextTick(() => {
  1979. this.$refs.subDetailUpload.init(currentData)
  1980. })
  1981. },
  1982. // 查询单位
  1983. umSearch () {
  1984. let tempData = {
  1985. site: this.$store.state.user.site,
  1986. active: 'Y'
  1987. }
  1988. umSearch(tempData).then(({data}) => {
  1989. if (data.code === 0) {
  1990. this.umList = data.rows
  1991. }
  1992. })
  1993. },
  1994. // 标签号回车事件
  1995. rollNoEnter () {
  1996. let tempData = {
  1997. site: '',
  1998. bu: this.modalData.bu,
  1999. rollNo: this.modalData.rollNo
  2000. }
  2001. rollNoEnter(tempData).then(({data}) => {
  2002. if (data && data.code === 0) {
  2003. this.operationList = data.rows
  2004. this.modalData.seqNo = data.rows[0].seqNo
  2005. this.modalData.orderNo = data.rows[0].orderNo
  2006. this.modalData.operationDesc = data.rows[0].operationDesc
  2007. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2008. this.modalData.resourceId = data.rows[0].resourceId
  2009. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2010. this.modalData.partNo = data.rows[0].partNo
  2011. this.modalData.partDesc = data.rows[0].partDesc
  2012. this.modalData.spec = data.rows[0].spec
  2013. this.modalData.sku = data.rows[0].sku
  2014. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2015. } else {
  2016. this.$alert(data.msg, '错误', {
  2017. confirmButtonText: '确定'
  2018. })
  2019. }
  2020. })
  2021. },
  2022. querySearchAsync (queryString, cb) {
  2023. clearTimeout(this.timeout)
  2024. let results = []
  2025. if (queryString === '') {
  2026. cb(results)
  2027. } else {
  2028. // 掉接口需要的参数
  2029. let find = {
  2030. rollNo: queryString, //上面输入框绑定的数据
  2031. site: this.$store.state.user.site,
  2032. }
  2033. // 这里去调后端的接口.根据自己接口的情况进行赋值
  2034. getRollNo(find).then(({data}) => {
  2035. if (data.code === 0) {
  2036. let result = data.rows
  2037. // 循环放到一个远程搜索需要的数组
  2038. for (let i = 0; i < result.length; i++) {
  2039. const element = result[i]
  2040. results.push({
  2041. value: element.rollNo,
  2042. seqNo: element.seqNo,
  2043. orderNo: element.orderNo
  2044. })
  2045. }
  2046. cb(results)
  2047. } else {
  2048. results = []
  2049. cb(results)
  2050. }
  2051. })
  2052. }
  2053. },
  2054. //点击出现搜索后点击的每一项
  2055. handleSelect (item) {
  2056. this.modalData.rollNo = item.value
  2057. this.modalData.seqNo = item.seqNo
  2058. this.modalData.orderNo = item.orderNo
  2059. this.getOperationList()
  2060. //this.getPartList()
  2061. },
  2062. // 获取处置措施列表
  2063. disposalMeasuresSearch () {
  2064. let tempData = {
  2065. inspectionTypeNo: '106'
  2066. }
  2067. disposalMeasuresSearch(tempData).then(({data}) => {
  2068. if (data.code === 0) {
  2069. this.disposalMeasuresOptions = data.rows
  2070. }
  2071. })
  2072. },
  2073. // 查询检验类型
  2074. inspectionTypeSearch () {
  2075. let tempData = {
  2076. site: this.$store.state.user.site
  2077. }
  2078. inspectionTypeSearch(tempData).then(({data}) => {
  2079. if (data.code === 0) {
  2080. this.typeOptions = data.rows
  2081. this.typeOptions.forEach(val => {
  2082. if (val.inspectionTypeName.includes('FAI')) {
  2083. this.templateData.inspectionTypeNo = val.inspectionTypeNo
  2084. this.templateData.inspectionTypeName = val.inspectionTypeName
  2085. }
  2086. })
  2087. }
  2088. })
  2089. },
  2090. // 获取基础数据列表S
  2091. getBaseList (val,type) {
  2092. this.tagNo = val
  2093. this.$nextTick(() => {
  2094. let strVal = ''
  2095. if (val === 1052) {
  2096. this.searchSeqInfo()
  2097. this.seqDetailFlag = true
  2098. }
  2099. if (val === 505) {
  2100. strVal = this.modalData.resourceDesc
  2101. this.$refs.baseList.init(val, strVal)
  2102. }
  2103. // if (val === 206) {
  2104. // strVal = this.modalData.partNo
  2105. // this.$refs.baseList.init(val, strVal)
  2106. // }
  2107. })
  2108. },
  2109. /* 列表方法的回调 */
  2110. getBaseData (val) {
  2111. if (this.tagNo === 1052) {
  2112. this.modalData.seqNo = val.seqno
  2113. this.modalData.orderNo = val.orderno
  2114. this.modalData.operationDesc = ''
  2115. this.modalData.resourceId = ''
  2116. this.getOperationList()
  2117. //this.getPartList()
  2118. }
  2119. if (this.tagNo === 505) {
  2120. this.modalData.resourceId = val.resource_id
  2121. this.modalData.resourceDesc = val.resource_desc
  2122. }
  2123. // if (this.tagNo === 206) {
  2124. // this.modalData.partNo = val.part_no
  2125. // this.modalData.partDesc = val.part_desc
  2126. // // 获取物料的其他信息
  2127. // this.getPartInformation()
  2128. // }
  2129. },
  2130. // // 获取物料其它信息
  2131. // getPartInformation () {
  2132. // getPartInformation(this.modalData).then(({data}) => {
  2133. // if (data && data.code === 0) {
  2134. // this.modalData.spec = data.rows[0].spec
  2135. // this.modalData.sku = data.rows[0].sku
  2136. // } else {
  2137. // this.$alert(data.msg, '错误', {
  2138. // confirmButtonText: '确定'
  2139. // })
  2140. // }
  2141. // })
  2142. // },
  2143. // 获取机台列表
  2144. getResourceList () {
  2145. // 判断是否为特殊任务,特殊任务的机台不随工序改变
  2146. if (this.modalData.specialTaskFlag === 'Y') {
  2147. return
  2148. } else {
  2149. getResourceList(this.modalData).then(({data}) => {
  2150. if (data && data.code === 0) {
  2151. //this.resourceList = data.rows
  2152. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2153. this.modalData.resourceId = data.rows[0].resourceId
  2154. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2155. } else {
  2156. this.$alert(data.msg, '错误', {
  2157. confirmButtonText: '确定'
  2158. })
  2159. }
  2160. })
  2161. }
  2162. },
  2163. // 获取工序列表
  2164. getOperationList () {
  2165. getOperationList(this.modalData).then(({data}) => {
  2166. if (data && data.code === 0) {
  2167. this.operationList = data.rows
  2168. this.modalData.operationDesc = data.rows[0].operationDesc
  2169. //this.getResourceList()
  2170. this.modalData.workCenterNo = data.rows[0].workCenterNo
  2171. this.modalData.resourceId = data.rows[0].resourceId
  2172. this.modalData.resourceDesc = data.rows[0].resourceDesc
  2173. this.modalData.partNo = data.rows[0].partNo
  2174. this.modalData.partDesc = data.rows[0].partDesc
  2175. this.modalData.spec = data.rows[0].spec
  2176. this.modalData.sku = data.rows[0].sku
  2177. this.modalData.cinvSourceCode = data.rows[0].cinvSourceCode
  2178. this.modalData.operationDesc = data.rows[0].operationDesc
  2179. this.modalData.qtyrequired = data.rows[0].qtyrequired
  2180. this.modalData.lotsize = data.rows[0].lotsize
  2181. } else {
  2182. this.$alert(data.msg, '错误', {
  2183. confirmButtonText: '确定'
  2184. })
  2185. }
  2186. })
  2187. },
  2188. // 获取物料列表
  2189. getPartList () {
  2190. getPartList(this.modalData).then(({data}) => {
  2191. if (data && data.code === 0) {
  2192. this.partList = data.rows
  2193. this.modalData.partNo = this.partList[0].partNo
  2194. this.modalData.partDesc = this.partList[0].partDesc
  2195. this.modalData.spec = this.partList[0].spec
  2196. this.modalData.sku = this.partList[0].sku
  2197. this.modalData.cinvSourceCode = this.partList[0].cinvSourceCode
  2198. } else {
  2199. this.$alert(data.msg, '错误', {
  2200. confirmButtonText: '确定'
  2201. })
  2202. }
  2203. })
  2204. },
  2205. // 是否新增特殊任务
  2206. changeSpecialTask () {
  2207. // 先重置数据
  2208. this.modalData = {
  2209. flag: '1',
  2210. site: '',
  2211. bu: this.userBuList[0].buNo,
  2212. inspectionNo: '',
  2213. partNo: '',
  2214. partDesc: '',
  2215. inspectionTypeNo: '',
  2216. inspectionTypeName: '',
  2217. inspectorNo: '',
  2218. inspectorName: '',
  2219. submit_flag: '',
  2220. orderNo: '',
  2221. operationDesc: '',
  2222. operationNo: '',
  2223. resourceId: '',
  2224. resourceDesc: '',
  2225. rollQty: '',
  2226. seqNo: '',
  2227. batchRollNo: '',
  2228. spec: '',
  2229. sku: '',
  2230. cinvSourceCode: '',
  2231. specialRequirements: '',
  2232. templateId: '',
  2233. templateName: '',
  2234. specialTaskFlag: '',
  2235. workCenterNo: '',
  2236. rollNo: '',
  2237. umId: this.umList[0].umId,
  2238. umName: this.umList[0].umName
  2239. }
  2240. // 获取选中框
  2241. let obj = document.getElementsByName('specialTask')
  2242. // 判断是否打勾
  2243. if (obj[0].checked) {
  2244. let tempData = {
  2245. site: '',
  2246. bu: this.modalData.bu
  2247. }
  2248. this.modalData.specialTaskFlag = 'Y'
  2249. // 获取特殊工序列表
  2250. getSpecialOperationList(tempData).then(({data}) => {
  2251. if (data && data.code === 0) {
  2252. this.operationList = data.rows
  2253. } else {
  2254. this.$alert(data.msg, '错误', {
  2255. confirmButtonText: '确定'
  2256. })
  2257. }
  2258. })
  2259. // 派工单和工单号赋值
  2260. this.modalData.seqNo = '000#1TSGD'
  2261. this.modalData.orderNo = '000#1'
  2262. } else {
  2263. this.operationList = []
  2264. this.modalData.specialTaskFlag = ''
  2265. }
  2266. },
  2267. // 新增FAI巡检记录
  2268. saveData () {
  2269. if (this.modalData.bu === '' || this.modalData.bu == null) {
  2270. this.$message.warning('请选择BU!')
  2271. return
  2272. }
  2273. if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
  2274. this.$message.warning('请选择派工单!')
  2275. return
  2276. }
  2277. if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
  2278. this.$message.warning('请选择工单!')
  2279. return
  2280. }
  2281. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.partNo === '' || this.modalData.partNo == null)) {
  2282. this.$message.warning('请选择物料!')
  2283. return
  2284. }
  2285. if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
  2286. this.$message.warning('请选择工序!')
  2287. return
  2288. }
  2289. if (this.modalData.specialTaskFlag !== 'Y' && (this.modalData.resourceId === '' || this.modalData.resourceId == null)) {
  2290. this.$message.warning('请选择机台!')
  2291. return
  2292. }
  2293. if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
  2294. this.$message.warning('请填写送检数量!')
  2295. return
  2296. }
  2297. if (this.modalData.umId === '' || this.modalData.umId == null) {
  2298. this.$message.warning('请选择单位!')
  2299. return
  2300. }
  2301. if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
  2302. this.$message.warning('请选择检验模板!')
  2303. return
  2304. }
  2305. if (this.modalData.flag === '1') {
  2306. saveFAIInspection(this.modalData).then(({data}) => {
  2307. if (data && data.code === 0) {
  2308. this.getDataList()
  2309. this.operationList = []
  2310. this.resourceList = []
  2311. this.partList = []
  2312. this.modalFlag = false
  2313. this.$message({
  2314. message: '操作成功',
  2315. type: 'success',
  2316. duration: 1500,
  2317. onClose: () => {}
  2318. })
  2319. } else {
  2320. this.$alert(data.msg, '错误', {
  2321. confirmButtonText: '确定'
  2322. })
  2323. }
  2324. })
  2325. }
  2326. },
  2327. // 检查动控是否开启
  2328. queryController () {
  2329. let tempData = {
  2330. controlNo: '10004',
  2331. site: this.$store.state.user.site,
  2332. }
  2333. queryController(tempData).then(({data}) => {
  2334. if (data && data.code === 0) {
  2335. this.controlData = data.rows
  2336. } else {
  2337. this.$alert(data.msg, '错误', {
  2338. confirmButtonText: '确定'
  2339. })
  2340. }
  2341. })
  2342. },
  2343. // 新增
  2344. addModal () {
  2345. this.modalData = {
  2346. flag: '1',
  2347. site: '',
  2348. bu: this.userBuList[0].buNo,
  2349. inspectionNo: '',
  2350. partNo: '',
  2351. partDesc: '',
  2352. inspectionTypeNo: '106',
  2353. inspectionTypeName: '',
  2354. inspectorNo: '',
  2355. inspectorName: '',
  2356. submit_flag: '',
  2357. orderNo: '',
  2358. operationDesc: '',
  2359. operationNo: '',
  2360. resourceId: '',
  2361. resourceDesc: '',
  2362. rollQty: '',
  2363. seqNo: '',
  2364. batchRollNo: '',
  2365. spec: '',
  2366. sku: '',
  2367. cinvSourceCode: '',
  2368. specialRequirements: '',
  2369. templateId: '',
  2370. templateName: '',
  2371. specialTaskFlag: '',
  2372. workCenterNo: '',
  2373. rollNo: '',
  2374. umId: this.umList[0].umId,
  2375. umName: this.umList[0].umName
  2376. }
  2377. this.operationList = []
  2378. this.resourceList = []
  2379. this.partList = []
  2380. this.modalFlag = true
  2381. this.checked = false
  2382. },
  2383. // 获取检验模板列表
  2384. queryTemplateList () {
  2385. this.templateData.bu = this.modalData.bu
  2386. // 查询所有检验模板
  2387. queryTemplateList(this.templateData).then(({data}) => {
  2388. if (data && data.code === 0) {
  2389. this.templateList = data.rows
  2390. this.templateModelFlag = true
  2391. }else {
  2392. this.$alert(data.msg, '错误', {
  2393. confirmButtonText: '确定'
  2394. })
  2395. }
  2396. })
  2397. },
  2398. // 获取物料列表
  2399. queryPartList () {
  2400. this.partData.bu = this.modalData.bu
  2401. // 查询所有物料
  2402. if (this.partData.partNo === '' && this.partData.partDesc === '' && this.partData.sku === '' && this.partData.cinvSourceCode === '') {
  2403. this.partList = []
  2404. this.partModelFlag = true
  2405. } else {
  2406. queryPartList(this.partData).then(({data}) => {
  2407. if (data && data.code === 0) {
  2408. this.partList = data.rows
  2409. this.partModelFlag = true
  2410. }else {
  2411. this.$alert(data.msg, '错误', {
  2412. confirmButtonText: '确定'
  2413. })
  2414. }
  2415. })
  2416. }
  2417. },
  2418. // 选中检验模板
  2419. getRowData (row) {
  2420. this.modalData.templateId = row.templateId
  2421. this.modalData.templateName = row.templateName
  2422. this.templateModelFlag = false
  2423. },
  2424. // 选中派工单号
  2425. getRowData1 (row) {
  2426. this.modalData.sku = row.sku
  2427. this.modalData.partNo = row.partNo
  2428. this.modalData.partDesc = row.partDesc
  2429. this.modalData.orderNo = row.orderNo
  2430. this.modalData.seqNo = row.seqNo
  2431. this.modalData.lotsize = row.lotsize
  2432. this.modalData.operationDesc = row.operationDesc
  2433. this.modalData.qtyrequired = row.qtyrequired
  2434. this.getOperationList()
  2435. this.seqDetailFlag = false
  2436. },
  2437. // 选中物料
  2438. getRowData2 (row) {
  2439. this.modalData.partNo = row.partNo
  2440. this.modalData.partDesc = row.partDesc
  2441. this.modalData.sku = row.sku
  2442. this.modalData.cinvSourceCode = row.cinvSourceCode
  2443. this.modalData.spec = row.spec
  2444. this.partData = {
  2445. site: '',
  2446. bu: '',
  2447. partNo: '',
  2448. partDesc: '',
  2449. sku: '',
  2450. cinvSourceCode: '',
  2451. }
  2452. this.partModelFlag = false
  2453. },
  2454. selectFlag () {
  2455. return true
  2456. },
  2457. // 单机选中
  2458. FAIClickRow (row) {
  2459. this.$refs.FAITable.toggleRowSelection(row)
  2460. },
  2461. // 复选
  2462. selectionFAI (val) {
  2463. this.FAISelections = val
  2464. },
  2465. //刷新派设备文档的列表
  2466. getFileContentData (row) {
  2467. let currentData = {
  2468. orderRef1: row.site,
  2469. orderRef2: row.inspectionNo,
  2470. orderRef4: row.buNo,
  2471. }
  2472. getFileContentList(currentData).then(({data}) => {
  2473. // 区分请求成功和失败的状况
  2474. if (data && data.code === 200) {
  2475. this.fileContentList = data.rows
  2476. } else {
  2477. this.fileContentList = []
  2478. }
  2479. })
  2480. this.fileFlag = true
  2481. },
  2482. /*新增文件的modal*/
  2483. addUploadFileModal () {
  2484. let currentData = {
  2485. titleCon: 'FAI文件上传',
  2486. site: this.detailData.site,
  2487. buNo: this.detailData.buNo,
  2488. createBy: this.$store.state.user.name,
  2489. inspectionNo: this.detailData.inspectionNo,
  2490. remark: '',
  2491. folder: 'qcFAI',
  2492. }
  2493. //打开组件 去做新增业务
  2494. this.$nextTick(() => {
  2495. this.$refs.qcFAIUploadFile.init(currentData)
  2496. })
  2497. },
  2498. // 上传项目图片
  2499. uploadImageModal (row) {
  2500. let currentData = {
  2501. site: this.detailData.site,
  2502. buNo: this.detailData.buNo,
  2503. createBy: this.$store.state.user.name,
  2504. inspectionNo: this.detailData.inspectionNo,
  2505. itemNo: row.itemNo,
  2506. folder: 'FAIItemImageFile'
  2507. }
  2508. //打开组件 去做新增业务
  2509. this.$nextTick(() => {
  2510. this.$refs.comQcItemImageUploadFile.init(currentData)
  2511. })
  2512. },
  2513. downloadFile (row) {
  2514. downLoadObjectFile(row)
  2515. .then(({data}) => {
  2516. // 不限制文件下载类型
  2517. const blob = new Blob([data], {type: "application/octet-stream"})
  2518. // 下载文件名称
  2519. const fileName = row.fileName
  2520. // a标签下载
  2521. const linkNode = document.createElement('a')
  2522. // a标签的download属性规定下载文件的名称
  2523. linkNode.download = fileName
  2524. linkNode.style.display = 'none'
  2525. // 生成一个Blob URL
  2526. linkNode.href = URL.createObjectURL(blob)
  2527. document.body.appendChild(linkNode)
  2528. // 模拟在按钮上的一次鼠标单击
  2529. linkNode.click()
  2530. // 释放URL 对象
  2531. URL.revokeObjectURL(linkNode.href)
  2532. document.body.removeChild(linkNode)
  2533. })
  2534. },
  2535. // 删除文件
  2536. deleteFile (row) {
  2537. let tempData = {
  2538. site: row.orderRef1,
  2539. inspectionNo: row.orderRef2
  2540. }
  2541. this.$confirm('确定要删除此文件?', '提示', {
  2542. confirmButtonText: '确定',
  2543. cancelButtonText: '取消',
  2544. type: 'warning'
  2545. }).then(() => {
  2546. deleteObjectFile(row).then(({data}) => {
  2547. if (data && data.code === 0) {
  2548. this.getFileContentData(tempData);
  2549. this.$message({
  2550. message: '操作成功',
  2551. type: 'success',
  2552. duration: 1500,
  2553. onClose: () => {}
  2554. })
  2555. } else {
  2556. this.$alert(data.msg, '错误', {
  2557. confirmButtonText: '确定'
  2558. })
  2559. }
  2560. })
  2561. }).catch(() => {
  2562. })
  2563. },
  2564. // 查询质检员信息列表
  2565. inspectorSearch () {
  2566. inspectorSearch().then(({data}) => {
  2567. if (data.code === 0) {
  2568. this.options = data.rows
  2569. }
  2570. })
  2571. },
  2572. // 获取主信息数据列表
  2573. getDataList () {
  2574. this.searchData.limit = this.pageSize
  2575. this.searchData.page = this.pageIndex
  2576. qcFAIInspectionSearch(this.searchData).then(({data}) => {
  2577. if (data.code === 0) {
  2578. this.dataList = data.page.list
  2579. this.pageIndex = data.page.currPage
  2580. this.pageSize = data.page.pageSize
  2581. this.totalPage = data.page.totalCount
  2582. }
  2583. this.dataListLoading = false
  2584. })
  2585. },
  2586. // 每页数
  2587. sizeChangeHandle (val) {
  2588. this.pageSize = val
  2589. this.pageIndex = 1
  2590. this.getDataList()
  2591. },
  2592. // 当前页
  2593. currentChangeHandle (val) {
  2594. this.pageIndex = val
  2595. this.getDataList()
  2596. },
  2597. // 多选
  2598. selectionChangeHandle (val) {
  2599. this.dataListSelections = val
  2600. },
  2601. // 删除检验记录
  2602. deleteModal () {
  2603. if (this.FAISelections.length === 0) {
  2604. this.$alert('请勾选要删除的检验单!', '提示', {
  2605. confirmButtonText: '确定'
  2606. })
  2607. return false
  2608. }
  2609. this.$confirm(`是否删除该 `+ this.FAISelections.length +` 条检验记录?`, '提示', {
  2610. confirmButtonText: '确定',
  2611. cancelButtonText: '取消',
  2612. type: 'warning'
  2613. }).then(() => {
  2614. let tempData = {
  2615. site: '',
  2616. submitList: this.FAISelections
  2617. }
  2618. faiRecordDelete(tempData).then(({data}) => {
  2619. if (data && data.code === 0) {
  2620. this.getDataList()
  2621. this.FAISelections = []
  2622. this.$message({
  2623. message: '操作成功',
  2624. type: 'success',
  2625. duration: 1500,
  2626. onClose: () => {}
  2627. })
  2628. } else {
  2629. this.$alert(data.msg, '错误', {
  2630. confirmButtonText: '确定'
  2631. })
  2632. }
  2633. })
  2634. }).catch(() => {
  2635. })
  2636. },
  2637. Transfer () {
  2638. if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
  2639. this.$message.warning('请选择检验结论!')
  2640. return
  2641. }
  2642. this.saveDetailInformation()
  2643. },
  2644. // 新增明细信息
  2645. saveDetailInformation () {
  2646. this.saveInformationData.site = this.detailData.site
  2647. this.saveInformationData.buNo = this.detailData.buNo
  2648. this.saveInformationData.inspectionNo = this.detailData.inspectionNo
  2649. this.saveInformationData.disposalMeasures = this.detailData.disposalMeasures
  2650. this.saveInformationData.disposalRemark = this.detailData.disposalRemark
  2651. this.saveInformationData.inspectorNo = this.$store.state.user.name
  2652. this.saveInformationData.inspectionResult = this.detailData.inspectionResult
  2653. this.saveInformationData.inspectionRemark = this.detailData.inspectionRemark
  2654. this.saveInformationData.rollQty = this.detailData.rollQty
  2655. this.saveInformationData.samplingQty = this.detailData.samplingQty
  2656. this.saveInformationData.unqualifiedQty = this.detailData.unqualifiedQty
  2657. this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
  2658. saveFAIDetailedRecord(this.saveInformationData).then(({data}) => {
  2659. if (data && data.code === 0) {
  2660. this.getDataList()
  2661. this.detailInformationFlag = false
  2662. this.$message({
  2663. message: '操作成功',
  2664. type: 'success',
  2665. duration: 1500,
  2666. onClose: () => {}
  2667. })
  2668. } else {
  2669. this.$alert(data.msg, '错误', {
  2670. confirmButtonText: '确定'
  2671. })
  2672. }
  2673. })
  2674. },
  2675. // 明细记录信息查询
  2676. detailModal (row) {
  2677. this.detailData.site = row.site
  2678. this.detailData.buNo = row.buNo
  2679. this.detailData.inspectionNo = row.inspectionNo
  2680. this.detailData.partNo = row.partNo
  2681. this.detailData.partDesc = row.partDesc
  2682. this.detailData.rollQty = row.rollQty
  2683. this.detailData.samplingQty = row.samplingQty
  2684. this.detailData.unqualifiedQty = row.unqualifiedQty
  2685. this.detailData.unqualifiedQuantity = row.unqualifiedQuantity
  2686. this.detailData.submitFlag = row.submitFlag
  2687. this.detailData.disposalMeasures = row.disposalMeasures
  2688. this.detailData.disposalRemark = row.disposalRemark
  2689. this.detailData.inspectionResult = row.inspectionResult
  2690. this.detailData.inspectorNo = row.inspectorNo
  2691. this.detailData.inspectorName = row.inspectorName
  2692. this.detailData.inspectionRemark = row.inspectionRemark
  2693. this.detailData.cinvSourceCode = row.cinvSourceCode
  2694. this.detailData.sku = row.sku
  2695. this.detailData.spec = row.spec
  2696. this.detailData.umId = row.umId
  2697. this.detailData.umName = row.umName
  2698. this.getInspectionFormData()
  2699. this.inspectorSearch()
  2700. this.detailInformationFlag = true
  2701. },
  2702. // 检验单明细
  2703. getInspectionFormData () {
  2704. faiDetailSearch(this.detailData).then(({data}) => {
  2705. if (data && data.code === 0) {
  2706. this.detailList = data.rows
  2707. } else {
  2708. this.detailList = []
  2709. }
  2710. })
  2711. },
  2712. // 子明细记录信息查询
  2713. subDetailModal (row) {
  2714. this.subDetailData = row
  2715. selectFAISubDetailedRecord(this.subDetailData).then(({data}) => {
  2716. this.tableData = data.rows
  2717. })
  2718. this.batchAddData = {
  2719. samplingLocation: '',
  2720. samplingLocationB: '',
  2721. samplingNumber: ''
  2722. }
  2723. this.subDetailFlag = true
  2724. },
  2725. // 审核按钮
  2726. submitResult () {
  2727. let tempData1 = '' // 记录不是待审核状态的单号
  2728. let tempData2 = '' // 记录处置措施未填写的单号
  2729. if (this.FAISelections.length === 0) {
  2730. this.$alert('请勾选要审核的检验单!', '提示', {
  2731. confirmButtonText: '确定'
  2732. })
  2733. return false
  2734. }
  2735. for (let i = 0; i < this.FAISelections.length; i++) {
  2736. if (this.FAISelections[i].state !== '待审核') {
  2737. tempData1 = tempData1 + this.FAISelections[i].inspectionNo + '、'
  2738. }
  2739. if (this.FAISelections[i].inspectionResult === '不合格' && (this.FAISelections[i].disposalMeasures === '' || this.FAISelections[i].disposalMeasures == null)) {
  2740. tempData2 = tempData2 + this.FAISelections[i].inspectionNo + '、'
  2741. }
  2742. }
  2743. if (tempData1 !== '') {
  2744. tempData1 = tempData1.substring(0, tempData1.length - 1)
  2745. this.$alert('检验单号 ' + tempData1 + ' 不是待审核状态!', '提示', {
  2746. confirmButtonText: '确定'
  2747. })
  2748. return false
  2749. }
  2750. if (tempData2 !== '') {
  2751. tempData2 = tempData2.substring(0, tempData2.length - 1)
  2752. this.$alert('检验单号 ' + tempData2 + ' 的处置措施未选择!', '提示', {
  2753. confirmButtonText: '确定'
  2754. })
  2755. return false
  2756. }
  2757. this.$confirm(`已确认单据信息无误,确定审核该 ` + this.FAISelections.length + ` 条记录`, '提示', {
  2758. confirmButtonText: '确定',
  2759. cancelButtonText: '取消',
  2760. type: 'warning'
  2761. }).then(() => {
  2762. this.submitData.submitList = this.FAISelections
  2763. saveFAISubmitResult(this.submitData).then(({data}) => {
  2764. if (data && data.code === 0) {
  2765. this.getDataList()
  2766. this.FAISelections = []
  2767. this.$message({
  2768. message: '操作成功',
  2769. type: 'success',
  2770. duration: 1500,
  2771. onClose: () => {}
  2772. })
  2773. } else {
  2774. this.$alert(data.msg, '错误', {
  2775. confirmButtonText: '确定'
  2776. })
  2777. }
  2778. })
  2779. }).catch(() => {
  2780. })
  2781. },
  2782. // 子明细方法
  2783. //表格的新增
  2784. rowClassName ({ row, rowIndex }) {
  2785. row.xh = rowIndex + 1
  2786. },
  2787. //单选框选中数据
  2788. handleDetailSelectionChange (selection) {
  2789. this.checkedDetail = selection
  2790. },
  2791. //点击新增更多
  2792. handleAddBtn (td) {
  2793. checkFAIIsSubmit(td).then(({data}) => {
  2794. if (data.flag !== 1) {
  2795. let obj = {}
  2796. obj.subDetailValue = ""
  2797. obj.samplingLocation = ""
  2798. this.tableData.push(obj)
  2799. } else {
  2800. this.$alert("记录已提交!", '错误', {
  2801. confirmButtonText: '确定'
  2802. })
  2803. }
  2804. })
  2805. },
  2806. // 批量新增操作
  2807. batchHandleAdd (td) {
  2808. checkFAIIsSubmit(td).then(({data}) => {
  2809. if (data.flag !== 1) {
  2810. this.batchHandleAddModalFlag = true
  2811. } else {
  2812. this.$alert("记录已提交!", '错误', {
  2813. confirmButtonText: '确定'
  2814. })
  2815. }
  2816. })
  2817. },
  2818. // 批量新增行
  2819. batchHandleAddModal () {
  2820. for (let i = 0; i < this.batchAddData.samplingNumber; i++) {
  2821. let obj = {}
  2822. obj.samplingLocation = this.batchAddData.samplingLocation
  2823. obj.samplingLocationB = this.batchAddData.samplingLocationB
  2824. obj.subDetailValue = ""
  2825. this.tableData.push(obj)
  2826. }
  2827. this.batchHandleAddModalFlag = false
  2828. },
  2829. // 回车事件
  2830. nextFocus1 (index) {
  2831. let a1 = `${index + 1}` + `a`
  2832. this.$nextTick(() => {
  2833. this.$refs[a1].focus()
  2834. })
  2835. },
  2836. nextFocus2 (index) {
  2837. let a2 = `${index + 1}` + `b`
  2838. this.$nextTick(() => {
  2839. this.$refs[a2].focus()
  2840. })
  2841. },
  2842. nextFocus3 (index) {
  2843. let a3 = `${index + 1}` + `c`
  2844. this.$nextTick(() => {
  2845. this.$refs[a3].focus()
  2846. })
  2847. },
  2848. focusNextInput(index, type) {
  2849. let aaa = ''
  2850. if (this.detailList.length - 1 === index) {
  2851. aaa = `${type}0`
  2852. } else {
  2853. aaa = `${type}${index + 1}`
  2854. }
  2855. this.$nextTick(() => {
  2856. this.$refs[aaa].focus()
  2857. })
  2858. },
  2859. //删除
  2860. handleDeleteBtn (td) {
  2861. checkFAIIsSubmit(td).then(({data}) => {
  2862. if (data.flag !== 1) {
  2863. if (this.checkedDetail.length === 0) {
  2864. this.$alert("请先选择要删除的数据", "提示", {
  2865. confirmButtonText: "确定",
  2866. })
  2867. } else {
  2868. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  2869. confirmButtonText: "确定",
  2870. cancelButtonText: "取消",
  2871. type: "warning",
  2872. callback: (action) => {
  2873. if (action === "confirm") {
  2874. let val = this.checkedDetail
  2875. val.forEach((val, index) => {
  2876. this.tableData.forEach((v, i) => {
  2877. if (val.xh === v.xh) {
  2878. this.tableData.splice(i, 1)
  2879. }
  2880. })
  2881. })
  2882. this.$message({
  2883. message: "删除成功!",
  2884. type: "success",
  2885. })
  2886. return
  2887. } else {
  2888. this.$message({
  2889. message: "已取消删除操作",
  2890. type: "warning",
  2891. })
  2892. return
  2893. }
  2894. },
  2895. })
  2896. }
  2897. } else {
  2898. this.$alert("记录已提交!", '错误', {
  2899. confirmButtonText: '确定'
  2900. })
  2901. }
  2902. })
  2903. },
  2904. // 新增子明细记录
  2905. saveSubDetailResult () {
  2906. for (let i = 0; i < this.tableData.length; i++) {
  2907. if (this.tableData[i].subDetailValue === '' || this.tableData[i].subDetailValue == null) {
  2908. this.$message.warning('序号' + (i+1) +'未填写实测值!')
  2909. return
  2910. }
  2911. }
  2912. this.subDetailData.subDetailValues = this.tableData
  2913. saveFAISubDetailed(this.subDetailData).then(({data}) => {
  2914. if (data && data.code === 0) {
  2915. if (data.count > 0) {
  2916. this.subDetailData.itemResult = 'N'
  2917. this.subDetailData.unqualifiedQuantity = data.count
  2918. }
  2919. if (this.subDetailData.subDetailValues.length > 0) {
  2920. this.subDetailData.subDetailRecordNum = 1
  2921. } else {
  2922. this.subDetailData.subDetailRecordNum = -1
  2923. this.subDetailData.unqualifiedQuantity = 0
  2924. this.subDetailData.itemResult = 'Y'
  2925. }
  2926. this.subDetailFlag = false
  2927. this.tableData = []
  2928. this.$message({
  2929. message: '操作成功',
  2930. type: 'success',
  2931. duration: 1500,
  2932. onClose: () => {}
  2933. })
  2934. } else {
  2935. this.$alert(data.msg, '错误', {
  2936. confirmButtonText: '确定'
  2937. })
  2938. }
  2939. })
  2940. },
  2941. // 校验用户是否收藏
  2942. favoriteIsOk () {
  2943. let userFavorite = {
  2944. userId: this.$store.state.user.id,
  2945. languageCode: this.$i18n.locale
  2946. }
  2947. userFavoriteList(userFavorite).then(({data}) => {
  2948. for (let i = 0; i < data.list.length; i++) {
  2949. if (this.$route.meta.menuId === data.list[i].menuId) {
  2950. this.favorite = true
  2951. }
  2952. }
  2953. })
  2954. },
  2955. // 收藏 OR 取消收藏
  2956. favoriteFunction () {
  2957. let userFavorite = {
  2958. userId: this.$store.state.user.id,
  2959. functionId: this.$route.meta.menuId,
  2960. }
  2961. if (this.favorite) {
  2962. removeUserFavorite(userFavorite).then(({data}) => {
  2963. this.$message.success(data.msg)
  2964. this.favorite = false
  2965. })
  2966. } else {
  2967. // 收藏
  2968. saveUserFavorite(userFavorite).then(({data}) => {
  2969. this.$message.success(data.msg)
  2970. this.favorite = true
  2971. })
  2972. }
  2973. },
  2974. //导出excel
  2975. async createExportData () {
  2976. this.searchData.limit = -1
  2977. this.searchData.page = 1
  2978. await qcFAIInspectionSearch(this.searchData).then(({data}) => {
  2979. this.exportList = data.page.list
  2980. })
  2981. return this.exportList
  2982. },
  2983. startDownload () {},
  2984. finishDownload () {},
  2985. fields () {
  2986. let json = "{"
  2987. this.columnList1.forEach((item, index) => {
  2988. if (index == this.columnList1.length - 1) {
  2989. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  2990. } else {
  2991. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  2992. }
  2993. })
  2994. json += "}"
  2995. let s = eval("(" + json + ")")
  2996. return s
  2997. },
  2998. // 动态列开始 获取 用户保存的 格式列
  2999. async getTableUserColumn (tableId, columnId) {
  3000. let queryTableUser = {
  3001. userId: this.$store.state.user.name,
  3002. functionId: this.$route.meta.menuId,
  3003. tableId: tableId,
  3004. status: true,
  3005. languageCode: this.$i18n.locale
  3006. }
  3007. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  3008. if (data.rows.length > 0) {
  3009. //this.columnList1 = []
  3010. switch (columnId) {
  3011. case 1:
  3012. this.columnList1 = data.rows
  3013. break;
  3014. case 2:
  3015. this.detailColumnList = data.rows
  3016. break;
  3017. // case 3:
  3018. // this.columnList2 = data.rows
  3019. // break;
  3020. // case 4:
  3021. // this.columnList3 = data.rows
  3022. // break;
  3023. }
  3024. } else {
  3025. this.getColumnList(tableId, columnId)
  3026. }
  3027. })
  3028. },
  3029. // 获取 tableDefault 列
  3030. async getColumnList (tableId, columnId) {
  3031. let queryTable = {
  3032. functionId: this.$route.meta.menuId,
  3033. tableId: tableId,
  3034. languageCode: this.$i18n.locale
  3035. }
  3036. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  3037. if (!data.rows.length == 0) {
  3038. switch (columnId) {
  3039. case 1:
  3040. this.columnList1 = data.rows
  3041. break;
  3042. case 2:
  3043. this.detailColumnList = data.rows
  3044. break;
  3045. // case 3:
  3046. // this.columnList2 = data.rows
  3047. // break;
  3048. // case 4:
  3049. // this.columnList3 = data.rows
  3050. // break;
  3051. }
  3052. } else {
  3053. // this.showDefault = true.
  3054. }
  3055. })
  3056. },
  3057. /**
  3058. * 明细导入后将返回值回传给父组件
  3059. * @param val
  3060. */
  3061. changeMyString (val) {
  3062. for (let i = 0; i < this.detailList.length; i++) {
  3063. if (val[this.detailList[i].itemNo] !== undefined) {
  3064. this.detailList[i].unqualifiedQuantity = val[this.detailList[i].itemNo]
  3065. if (val[this.detailList[i].itemNo] != null) {
  3066. this.detailList[i].subDetailRecordNum = 1
  3067. }
  3068. if (val[this.detailList[i].itemNo] > 0) {
  3069. this.detailList[i].itemResult = 'N'
  3070. }
  3071. }
  3072. }
  3073. },
  3074. searchSeqInfo () {
  3075. let tempData = {
  3076. site: this.$store.state.user.site,
  3077. seqNo: this.seqDetailData.seqNo,
  3078. orderNo: this.seqDetailData.orderNo,
  3079. sku: this.seqDetailData.sku,
  3080. partDesc: this.seqDetailData.partDesc,
  3081. partNo: this.seqDetailData.partNo,
  3082. operationDesc: this.seqDetailData.operationDesc
  3083. }
  3084. if (!this.seqDetailData.seqNo && !this.seqDetailData.orderNo && !this.seqDetailData.sku && !this.seqDetailData.partNo && !this.seqDetailData.partDesc && !this.seqDetailData.operationDesc){
  3085. this.seqInfoList = []
  3086. } else {
  3087. searchSeqInfo(tempData).then(({data}) => {
  3088. if (data && data.code === 0) {
  3089. this.seqInfoList = data.rows
  3090. } else {
  3091. this.$alert(data.msg, '错误', {
  3092. confirmButtonText: '确定'
  3093. })
  3094. }
  3095. })
  3096. }
  3097. },
  3098. closeDialog (){
  3099. this.seqDetailData = {
  3100. seqNo : '',
  3101. orderNo: '',
  3102. sku: '',
  3103. partNo: '',
  3104. partDesc: '',
  3105. operationDesc: ''
  3106. }
  3107. this.seqInfoList = []
  3108. }
  3109. },
  3110. }
  3111. </script>
  3112. <style scoped>
  3113. /deep/ .redElSelect .el-input--suffix .el-input__inner{
  3114. color: red;
  3115. font-weight: bold;
  3116. }
  3117. /deep/ .greenElSelect .el-input--suffix .el-input__inner{
  3118. color: rgb(103,194,58);
  3119. font-weight: bold;
  3120. }
  3121. .numInput /deep/ .el-input__inner{
  3122. text-align: right;
  3123. }
  3124. </style>