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.

4387 lines
157 KiB

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