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.

3212 lines
113 KiB

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