disqualification.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <!-- 不合格品审理单 -->
  2. <template>
  3. <div>
  4. <template v-if="!updateVisible && !disposeVisible && !verifyVisible">
  5. <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
  6. <el-form-item label="物料名称">
  7. <el-input
  8. v-model="dataForm.productName"
  9. placeholder="请输入物料名称"
  10. clearable
  11. />
  12. </el-form-item>
  13. <el-form-item label="生产批次号">
  14. <el-input
  15. v-model="dataForm.batchNumber"
  16. placeholder="请输入批次号"
  17. clearable
  18. />
  19. </el-form-item>
  20. <el-form-item label="任务单编码">
  21. <el-input
  22. v-model="dataForm.orderCode"
  23. placeholder="请输入任务单编码"
  24. clearable
  25. />
  26. </el-form-item>
  27. <el-form-item>
  28. <el-button @click="search()">查询</el-button>
  29. </el-form-item>
  30. </el-form>
  31. <el-table
  32. :data="dataList"
  33. border
  34. v-loading="dataListLoading"
  35. style="width: 100%"
  36. >
  37. <el-table-column
  38. label="序号"
  39. type="index"
  40. width="50"
  41. align="center"
  42. ></el-table-column>
  43. <el-table-column
  44. prop="invoicesCode"
  45. header-align="center"
  46. align="center"
  47. width="120"
  48. :show-tooltip-when-overflow="true"
  49. label="审理编码"
  50. >
  51. </el-table-column>
  52. <el-table-column
  53. prop="orderCode"
  54. header-align="center"
  55. align="center"
  56. width="140"
  57. :show-tooltip-when-overflow="true"
  58. label="任务单编码"
  59. >
  60. </el-table-column>
  61. <el-table-column
  62. prop="batchNumber"
  63. header-align="center"
  64. align="center"
  65. width="120"
  66. :show-tooltip-when-overflow="true"
  67. label="批次号"
  68. >
  69. </el-table-column>
  70. <el-table-column
  71. prop="productName"
  72. header-align="center"
  73. align="center"
  74. width="120"
  75. :show-tooltip-when-overflow="true"
  76. label="物料名称"
  77. >
  78. </el-table-column>
  79. <el-table-column
  80. prop="productNumber"
  81. header-align="center"
  82. align="center"
  83. width="120"
  84. :show-tooltip-when-overflow="true"
  85. label="生产编号"
  86. >
  87. </el-table-column>
  88. <el-table-column
  89. prop="techName"
  90. header-align="center"
  91. align="center"
  92. width="120"
  93. :show-tooltip-when-overflow="true"
  94. label="工艺名称"
  95. >
  96. </el-table-column>
  97. <el-table-column
  98. prop="nodeName"
  99. header-align="center"
  100. align="center"
  101. width="120"
  102. :show-tooltip-when-overflow="true"
  103. label="检验工序节点"
  104. >
  105. </el-table-column>
  106. <el-table-column
  107. prop="disqualificationNodeName"
  108. header-align="center"
  109. align="center"
  110. width="120"
  111. :show-tooltip-when-overflow="true"
  112. label="发生工序节点"
  113. >
  114. </el-table-column>
  115. <el-table-column
  116. prop="cnt"
  117. header-align="center"
  118. align="center"
  119. :show-tooltip-when-overflow="true"
  120. label="交检数量"
  121. >
  122. </el-table-column>
  123. <el-table-column
  124. prop="disqualificationCnt"
  125. header-align="center"
  126. align="center"
  127. width="100"
  128. :show-tooltip-when-overflow="true"
  129. label="不合格数量"
  130. >
  131. </el-table-column>
  132. <el-table-column
  133. fixed="right"
  134. prop="measureStateStr"
  135. header-align="center"
  136. align="center"
  137. :show-tooltip-when-overflow="true"
  138. label="处理状态"
  139. >
  140. </el-table-column>
  141. <el-table-column
  142. prop="approver"
  143. header-align="center"
  144. align="center"
  145. width="120"
  146. :show-tooltip-when-overflow="true"
  147. label="当前审理人"
  148. >
  149. </el-table-column>
  150. <el-table-column
  151. prop="responsibleName"
  152. header-align="center"
  153. align="center"
  154. width="120"
  155. :show-tooltip-when-overflow="true"
  156. label="责任人"
  157. >
  158. </el-table-column>
  159. <el-table-column
  160. prop="disposeAnalyse"
  161. header-align="center"
  162. align="center"
  163. width="100"
  164. :show-tooltip-when-overflow="true"
  165. label="处理分析"
  166. >
  167. </el-table-column>
  168. <el-table-column
  169. prop="analyseName"
  170. header-align="center"
  171. align="center"
  172. width="120"
  173. :show-tooltip-when-overflow="true"
  174. label="处理分析人"
  175. >
  176. </el-table-column>
  177. <el-table-column
  178. prop="disposeMeasure"
  179. header-align="center"
  180. align="center"
  181. width="140"
  182. :show-tooltip-when-overflow="true"
  183. label="处置措施"
  184. >
  185. </el-table-column>
  186. <el-table-column
  187. prop="measureName"
  188. header-align="center"
  189. align="center"
  190. width="120"
  191. :show-tooltip-when-overflow="true"
  192. label="处置措施人"
  193. >
  194. </el-table-column>
  195. <el-table-column
  196. prop="verifyConclusion"
  197. header-align="center"
  198. align="center"
  199. width="140"
  200. :show-tooltip-when-overflow="true"
  201. label="验证结论"
  202. >
  203. </el-table-column>
  204. <el-table-column
  205. prop="verifyName"
  206. header-align="center"
  207. align="center"
  208. width="120"
  209. :show-tooltip-when-overflow="true"
  210. label="验证人"
  211. >
  212. </el-table-column>
  213. <el-table-column
  214. prop="creatorName"
  215. header-align="center"
  216. align="center"
  217. width="120"
  218. :show-tooltip-when-overflow="true"
  219. label="检验员"
  220. >
  221. </el-table-column>
  222. <el-table-column
  223. prop="createTime"
  224. header-align="center"
  225. align="center"
  226. width="160"
  227. label="检验时间"
  228. >
  229. </el-table-column>
  230. <el-table-column
  231. fixed="right"
  232. prop="approveStateStr"
  233. header-align="center"
  234. align="center"
  235. width="120"
  236. :show-tooltip-when-overflow="true"
  237. label="审理评审状态"
  238. >
  239. </el-table-column>
  240. <el-table-column
  241. prop="reworkCnt"
  242. header-align="center"
  243. align="center"
  244. width="100"
  245. :show-tooltip-when-overflow="true"
  246. label="返工数量"
  247. >
  248. </el-table-column>
  249. <el-table-column
  250. prop="repairCnt"
  251. header-align="center"
  252. align="center"
  253. width="100"
  254. :show-tooltip-when-overflow="true"
  255. label="返修数量"
  256. >
  257. </el-table-column>
  258. <el-table-column
  259. prop="damageCnt"
  260. header-align="center"
  261. align="center"
  262. width="140"
  263. :show-tooltip-when-overflow="true"
  264. label="不合格/报损数量"
  265. >
  266. </el-table-column>
  267. <el-table-column
  268. prop="concessionCnt"
  269. header-align="center"
  270. align="center"
  271. width="120"
  272. :show-tooltip-when-overflow="true"
  273. label="让步接收数量"
  274. >
  275. </el-table-column>
  276. <el-table-column
  277. prop="releaseList"
  278. header-align="center"
  279. align="center"
  280. width="100"
  281. :show-tooltip-when-overflow="true"
  282. label="顾客放行表"
  283. >
  284. <template slot-scope="scope">
  285. <el-button
  286. :disabled="
  287. !scope.row.releaseList || scope.row.releaseList.length === 0
  288. "
  289. type="text"
  290. size="small"
  291. @click="attachDetails(scope.row.releaseList)"
  292. >查看</el-button
  293. >
  294. </template>
  295. </el-table-column>
  296. <el-table-column
  297. prop="attachList"
  298. header-align="center"
  299. align="center"
  300. :show-tooltip-when-overflow="true"
  301. label="附件"
  302. >
  303. <template slot-scope="scope">
  304. <el-button
  305. :disabled="
  306. !scope.row.attachList || scope.row.attachList.length === 0
  307. "
  308. type="text"
  309. size="small"
  310. @click="attachDetails(scope.row.attachList)"
  311. >查看</el-button
  312. >
  313. </template>
  314. </el-table-column>
  315. <el-table-column
  316. fixed="right"
  317. header-align="center"
  318. align="center"
  319. width="150"
  320. label="操作"
  321. >
  322. <template slot-scope="scope">
  323. <el-button
  324. v-if="isAuth('disqualification:invoices:update')"
  325. type="text"
  326. size="small"
  327. @click="updateHandle(scope.row)"
  328. >编辑</el-button
  329. >
  330. <el-button
  331. v-if="isAuth('disqualification:invoices:updateDispose')"
  332. type="text"
  333. size="small"
  334. @click="disposeHandle(scope.row)"
  335. >处理</el-button
  336. >
  337. <el-button
  338. v-if="isAuth('disqualification:invoices:updateVerify')"
  339. type="text"
  340. size="small"
  341. @click="verifyHandle(scope.row)"
  342. >验证</el-button
  343. >
  344. </template>
  345. </el-table-column>
  346. </el-table>
  347. <el-pagination
  348. @size-change="sizeChangeHandle"
  349. @current-change="currentChangeHandle"
  350. :current-page="pageIndex"
  351. :page-sizes="[10, 20, 50, 100]"
  352. :page-size="pageSize"
  353. :total="totalPage"
  354. layout="total, sizes, prev, pager, next, jumper"
  355. >
  356. </el-pagination>
  357. </template>
  358. <quality-disqualification-update ref="update" v-if="updateVisible" @onChose="onChose" />
  359. <quality-disqualification-dispose ref="dispose" v-if="disposeVisible" @onChose="onChose" />
  360. <quality-disqualification-verify ref="verify" v-if="verifyVisible" @onChose="onChose" />
  361. </div>
  362. </template>
  363. <script>
  364. import {getDisList} from '@/api/quality'
  365. import QualityDisqualificationUpdate from './disqualification-update'
  366. import QualityDisqualificationDispose from './disqualification-dispose'
  367. import QualityDisqualificationVerify from './disqualification-verify'
  368. import {approveStateOption, measureStateOption} from '@/utils/enums'
  369. export default {
  370. name: 'quality-disqualification',
  371. components: {QualityDisqualificationUpdate, QualityDisqualificationDispose, QualityDisqualificationVerify},
  372. data () {
  373. return {
  374. updateVisible: false,
  375. disposeVisible: false,
  376. verifyVisible: false,
  377. approveStateOption: approveStateOption,
  378. measureStateOption: measureStateOption,
  379. dataForm: {},
  380. dataList: [],
  381. pageIndex: 1,
  382. pageSize: 10,
  383. totalPage: 0,
  384. dataListLoading: false
  385. }
  386. },
  387. mounted () {},
  388. created () {
  389. this.search()
  390. },
  391. methods: {
  392. onChose () {
  393. this.updateVisible = false
  394. this.disposeVisible = false
  395. this.verifyVisible = false
  396. },
  397. search () {
  398. this.pageIndex = 1
  399. this.getDataList()
  400. },
  401. // 每页数
  402. sizeChangeHandle (val) {
  403. this.pageSize = val
  404. this.pageIndex = 1
  405. this.getDataList()
  406. },
  407. // 当前页
  408. currentChangeHandle (val) {
  409. this.pageIndex = val
  410. this.getDataList()
  411. },
  412. getDataList () {
  413. this.dataListLoading = true
  414. let param = {
  415. current: this.pageIndex,
  416. size: this.pageSize,
  417. batchNumber: this.dataForm.batchNumber,
  418. productName: this.dataForm.productName
  419. }
  420. getDisList(param).then(({ data }) => {
  421. if (data && data.code === '200') {
  422. this.dataList = data.data.records
  423. this.totalPage = Number(data.data.total)
  424. this.dataList.forEach(item => {
  425. let option = this.approveStateOption.find(t => t.value === item.approveState)
  426. if (option != null) {
  427. item.approveStateStr = option.label
  428. }
  429. let measure = this.measureStateOption.find(t => t.value === item.state)
  430. if (measure != null) {
  431. item.measureStateStr = measure.label
  432. }
  433. })
  434. } else {
  435. this.dataList = []
  436. this.totalPage = 0
  437. }
  438. this.dataListLoading = false
  439. })
  440. },
  441. updateHandle (item) {
  442. this.updateVisible = true
  443. this.$nextTick(() => {
  444. this.$refs.update.init(item)
  445. })
  446. },
  447. disposeHandle (item) {
  448. this.disposeVisible = true
  449. this.$nextTick(() => {
  450. this.$refs.dispose.init(item)
  451. })
  452. },
  453. verifyHandle (item) {
  454. this.verifyVisible = true
  455. this.$nextTick(() => {
  456. this.$refs.verify.init(item.invoicesId)
  457. })
  458. }
  459. }
  460. }
  461. </script>
  462. <style lang="scss" scoped>
  463. </style>