manualConfirmation.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. <!-- 样品接收确认 -->
  2. <template>
  3. <div class="sample-scan">
  4. <!-- 扫码接收的输入框-->
  5. <el-input
  6. v-model="facilityId"
  7. ref="redarInput"
  8. @change="facilityData(facilityId)"
  9. style="z-index: -999;"
  10. ></el-input>
  11. <!-- <el-button type="primary" @click="openRedar" >
  12. 測試</el-button> -->
  13. <!-- 扫码操作组件-->
  14. <div class="popContainer" v-if="redar" @click="remRedar">
  15. <dv-decoration-12 style="width:150px;height:100px;margin:0 auto;top: 35%;">
  16. <span style=" color: #66D9EF;">开启扫描设备连接-样品接收确认</span>
  17. </dv-decoration-12>
  18. </div>
  19. <el-dialog
  20. width="90%"
  21. :modal-append-to-body='false'
  22. title=" 样品手动接收确认操作 - 确认样品数量及相关信息 - 【位置根据是否留样二选一进行选择】"
  23. @close="closeDialog"
  24. :before-close = "handleClose"
  25. :visible.sync="visible"
  26. > <!-- 表单是否显示 -->
  27. <div style="min-height: 600px;" @click.self="handleChange">
  28. <el-button @click="submitData('确认')" type="primary" style="float: right;margin: 5px;">样品确认</el-button>
  29. <el-table
  30. :data="listData"
  31. stripe
  32. style="width: 100%">
  33. <el-table-column
  34. prop="yang_pin_bian_hao"
  35. label="样品编号"
  36. width="150px">
  37. </el-table-column>
  38. <el-table-column
  39. prop="yang_pin_ming_che"
  40. label="样品名称">
  41. </el-table-column>
  42. <el-table-column
  43. prop="yang_pin_zong_shu"
  44. label="样品总数"
  45. width="180px">
  46. </el-table-column>
  47. <el-table-column
  48. label="本次确认数量"
  49. width="150px">
  50. <template slot-scope="scope">
  51. <el-input-number
  52. v-model="scope.row.jie_yang_shu_lian"
  53. controls-position="right"
  54. @change="handleChange"
  55. :min="1" :max="9999">
  56. </el-input-number>
  57. </template>
  58. </el-table-column>
  59. <el-table-column
  60. prop="yang_pin_lei_xing"
  61. label="样品类型(一)"
  62. width="150px">
  63. </el-table-column>
  64. <el-table-column
  65. prop="yang_ben_yun_shu_"
  66. label="样品运输条件(一)"
  67. width="150px">
  68. </el-table-column>
  69. <el-table-column
  70. prop="shu_liang_"
  71. label="样品数量(一)"
  72. width="150px">
  73. </el-table-column>
  74. <el-table-column
  75. prop="yang_pin_gui_ge_"
  76. label="样品规格(一)"
  77. width="150px">
  78. </el-table-column>
  79. <el-table-column
  80. prop="yang_pin_lei_er_"
  81. label="样品类型(二)"
  82. width="150px">
  83. </el-table-column>
  84. <el-table-column
  85. prop="yang_pin_yun_shu_"
  86. label="样品运输条件(二)"
  87. width="150px">
  88. </el-table-column>
  89. <el-table-column
  90. prop="shu_liang_er_"
  91. label="样品数量(二)"
  92. width="150px">
  93. </el-table-column>
  94. <el-table-column
  95. prop="yang_pin_gui_ge_e"
  96. label="样品规格(二)"
  97. width="150px">
  98. </el-table-column>
  99. <el-table-column
  100. prop="yang_pin_lei_san_"
  101. label="样品类型(三)"
  102. width="150px">
  103. </el-table-column>
  104. <el-table-column
  105. prop="yang_pin_yun_san"
  106. label="样品运输条件(三)"
  107. width="150px">
  108. </el-table-column>
  109. <el-table-column
  110. prop="shu_liang_san_"
  111. label="样品数量(三)"
  112. width="150px">
  113. </el-table-column>
  114. <el-table-column
  115. prop="yang_pin_gui_ge_s"
  116. label="样品规格(三)"
  117. width="150px">
  118. </el-table-column>
  119. <el-table-column
  120. prop="yang_pin_lei_si_"
  121. label="样品类型(四)"
  122. width="150px">
  123. </el-table-column>
  124. <el-table-column
  125. prop="yang_pin_yun_si_"
  126. label="样品运输条件(四)"
  127. width="150px">
  128. </el-table-column>
  129. <el-table-column
  130. prop="shu_liang_si_"
  131. label="样品数量(四)"
  132. width="150px">
  133. </el-table-column>
  134. <el-table-column
  135. prop="yang_pin_gui_si_"
  136. label="样品规格(四)"
  137. width="150px">
  138. </el-table-column>
  139. <el-table-column
  140. label="是否留样"
  141. width="80px">
  142. <template slot-scope="scope">
  143. <el-select v-model="scope.row.shi_fou_liu_yang_" placeholder="请选择">
  144. <el-option
  145. v-for="item in ifLY"
  146. :key="item.value"
  147. :label="item.label"
  148. :value="item.value">
  149. </el-option>
  150. </el-select>
  151. </template>
  152. </el-table-column>
  153. <el-table-column
  154. label="样品存放位置"
  155. width="200px"
  156. >
  157. <template slot-scope="scope">
  158. <!-- <ibps-link-data
  159. v-model="scope.row.shou_yang_wei_zhi"
  160. template-key = "lhypwzztzly"
  161. /> -->
  162. <weizhiData v-model="scope.row.shou_yang_wei_zhi"/>
  163. </template>
  164. </el-table-column>
  165. <el-table-column
  166. label="留样存放位置"
  167. width="200px">
  168. <template slot-scope="scope">
  169. <!-- <ibps-link-data
  170. v-model="scope.row.liu_yang_wei_zhi_"
  171. template-key = "lhypwzztzly"
  172. /> -->
  173. <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/>
  174. </template>
  175. </el-table-column>
  176. <el-table-column
  177. label="验收结果"
  178. width="120px">
  179. <template slot-scope="scope">
  180. <el-select v-model="scope.row.yan_shou_jie_guo_" placeholder="请选择">
  181. <el-option
  182. v-for="item in checkOptions"
  183. :key="item.value"
  184. :label="item.label"
  185. :value="item.value">
  186. </el-option>
  187. </el-select>
  188. </template>
  189. </el-table-column>
  190. <el-table-column
  191. label="留样日期"
  192. width="230px">
  193. <template slot-scope="scope">
  194. <el-date-picker
  195. v-model="scope.row.liu_yang_ri_qi_"
  196. type="date"
  197. value-format="yyyy-MM-dd"
  198. format="yyyy-MM-dd"
  199. placeholder="请选择"
  200. :readonly="false"
  201. :clearable="true"
  202. />
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. label="留样数量"
  207. width="150px">
  208. <template slot-scope="scope">
  209. <el-input-number
  210. v-model="scope.row.liu_yang_shu_lian"
  211. controls-position="right"
  212. @change="handleChange"
  213. :min="1" :max="9999">
  214. </el-input-number>
  215. </template>
  216. </el-table-column>
  217. <el-table-column
  218. label="留样期限至"
  219. width="230px">
  220. <template slot-scope="scope">
  221. <el-date-picker
  222. v-model="scope.row.liu_yang_qi_xian"
  223. type="date"
  224. value-format="yyyy-MM-dd"
  225. format="yyyy-MM-dd"
  226. placeholder="请选择"
  227. :readonly="false"
  228. :clearable="true"
  229. />
  230. </template>
  231. </el-table-column>
  232. <el-table-column
  233. label="销毁日期"
  234. width="230px">
  235. <template slot-scope="scope">
  236. <el-date-picker
  237. v-model="scope.row.xiao_hui_ri_qi_"
  238. type="date"
  239. value-format="yyyy-MM-dd"
  240. format="yyyy-MM-dd"
  241. placeholder="请选择"
  242. :readonly="false"
  243. :clearable="true"
  244. />
  245. </template>
  246. </el-table-column>
  247. <el-table-column
  248. label="返样日期"
  249. width="230px">
  250. <template slot-scope="scope">
  251. <el-date-picker
  252. v-model="scope.row.fan_yang_ri_qi_"
  253. type="date"
  254. value-format="yyyy-MM-dd"
  255. format="yyyy-MM-dd"
  256. placeholder="请选择"
  257. :readonly="false"
  258. :clearable="true"
  259. />
  260. </template>
  261. </el-table-column>
  262. <el-table-column
  263. label="返样接样人"
  264. width="150px">
  265. <template slot-scope="scope">
  266. <el-input
  267. v-model="scope.row.fan_yang_jyr"
  268. placeholder="请输入"
  269. type="text"
  270. :readonly="false"
  271. clearable
  272. />
  273. </template>
  274. </el-table-column>
  275. <el-table-column
  276. label="姓名"
  277. width="150px">
  278. <template slot-scope="scope">
  279. <el-input
  280. v-model="scope.row.xing_ming_"
  281. placeholder="请输入"
  282. type="text"
  283. :readonly="false"
  284. clearable
  285. />
  286. </template>
  287. </el-table-column>
  288. <el-table-column
  289. label="性别"
  290. width="150px">
  291. <template slot-scope="scope">
  292. <el-select v-model="scope.row.xing_bie_" placeholder="请选择">
  293. <el-option
  294. v-for="item in sex"
  295. :key="item.value"
  296. :label="item.label"
  297. :value="item.value">
  298. </el-option>
  299. </el-select>
  300. </template>
  301. </el-table-column>
  302. <el-table-column
  303. label="年龄"
  304. width="130px">
  305. <template slot-scope="scope">
  306. <el-input
  307. v-model="scope.row.nian_ling_"
  308. placeholder="请输入"
  309. type="text"
  310. :readonly="false"
  311. clearable
  312. />
  313. </template>
  314. </el-table-column>
  315. <el-table-column
  316. label="报告编制员"
  317. width="130px">
  318. <template slot-scope="scope">
  319. <ibps-user-selector
  320. v-model="scope.row.bao_gao_bian_zhi_"
  321. placeholder="请选择"
  322. type="user"
  323. store="id"
  324. />
  325. </template>
  326. </el-table-column>
  327. <!--
  328. :multiple="true" -->
  329. <el-table-column
  330. label="报告复核员"
  331. width="130px">
  332. <template slot-scope="scope">
  333. <ibps-user-selector
  334. v-model="scope.row.bao_gao_shen_he_y"
  335. placeholder="请选择"
  336. type="user"
  337. store="id"
  338. />
  339. </template>
  340. </el-table-column>
  341. <el-table-column
  342. label="备注"
  343. width="180px">
  344. <template slot-scope="scope">
  345. <el-input
  346. v-model="scope.row.bei_zhu_"
  347. placeholder="请输入"
  348. type="text"
  349. :readonly="false"
  350. clearable
  351. />
  352. </template>
  353. </el-table-column>
  354. <el-table-column
  355. label="送样要求"
  356. width="180px">
  357. <template slot-scope="scope">
  358. <el-input
  359. v-model="scope.row.song_yang_yao_qiu"
  360. placeholder="请输入"
  361. type="text"
  362. :readonly="false"
  363. clearable
  364. />
  365. </template>
  366. </el-table-column>
  367. <el-table-column
  368. label="接样确认状态"
  369. width="130px">
  370. <template slot-scope="scope">
  371. <el-select v-model="scope.row.jie_yang_zhuang_t" placeholder="请选择">
  372. <el-option
  373. v-for="item in options"
  374. :key="item.value"
  375. :label="item.label"
  376. :value="item.value">
  377. </el-option>
  378. </el-select>
  379. </template>
  380. </el-table-column>
  381. <el-table-column label="功能">
  382. <template slot-scope="scope">
  383. <el-button
  384. size="small"
  385. type="danger"
  386. icon="el-icon-delete"
  387. @click="deleteData(scope.row.id_)"
  388. >删除</el-button>
  389. </template>
  390. </el-table-column>
  391. </el-table>
  392. <el-pagination
  393. layout="prev,pager,next"
  394. background
  395. @current-change="current_change"
  396. :current-page="currentPage"
  397. :pager-count="5"
  398. :page-size="10"
  399. :total="this.pageCount"
  400. ></el-pagination>
  401. </div>
  402. </el-dialog>
  403. </div>
  404. </template>
  405. <script>
  406. import manualConfirmationJS from '../js/manualConfirmationJS.js'
  407. import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
  408. import weizhiData from "./weizhiData.vue"
  409. import liuyangData from "./liuyangData.vue"
  410. import IbpsUserSelector from '@/business/platform/org/selector'
  411. export default {
  412. components:{
  413. IbpsLinkData,
  414. weizhiData,
  415. liuyangData,
  416. IbpsUserSelector
  417. },
  418. mixins:[manualConfirmationJS],
  419. props:{scanVisible:Boolean},
  420. watch:{
  421. listData: {
  422. handler(val, oldName) {
  423. if(val.length>0){
  424. this.visible = true
  425. this.redar = false // 扫描后就让扫描组件隐藏
  426. }
  427. },
  428. deep: true,
  429. immediate: true
  430. },
  431. scanVisible:{
  432. handler(val, oldName) {
  433. if(val){
  434. this.redar = false // 扫码的组件 一开始先展示
  435. this.visible = true // 结果列表 一开始没扫描就不展示
  436. this.$nextTick(() => {
  437. this.$refs.redarInput.focus(); //聚焦input
  438. })
  439. this.listData = [] //清空列表
  440. }else{
  441. this.remRedar()
  442. }
  443. },
  444. deep: true,
  445. immediate: true
  446. }
  447. },
  448. created() {
  449. this.facilityData(1)
  450. },
  451. data () {
  452. return {
  453. updateNum:1,
  454. visible:false,
  455. redar:false,
  456. facilityId:'',
  457. listData:[],
  458. currentPage:1,
  459. options: [{
  460. value: '已确认',
  461. label: '已确认'
  462. }, {
  463. value: '未确认',
  464. label: '未确认'
  465. }],
  466. checkOptions:[{
  467. value:'完好',
  468. label:'完好'
  469. },{
  470. value:'残缺',
  471. label:'残缺'
  472. }],
  473. ifLY:[{
  474. value:'是',
  475. label:'是'
  476. },{
  477. value:'否',
  478. label:'否'
  479. }],
  480. sex:[{
  481. value:'男',
  482. label:'男'
  483. },{
  484. value:'女',
  485. label:'女'
  486. }],
  487. // OriginalPosition:[],
  488. mjwtsqbAllResult:[],
  489. pageCount:1,
  490. item:''
  491. }
  492. },
  493. methods:{
  494. current_change(currentPage){
  495. this.currentPage = currentPage
  496. this.facilityData(currentPage)
  497. }
  498. }
  499. }
  500. </script>
  501. <style>
  502. .sample-scan .popContainer{
  503. position: fixed;
  504. top: 0;
  505. left: 0;
  506. right: 0;
  507. bottom: 0;
  508. z-index: 9999999;
  509. background: rgba(0,0,0,0.7);
  510. }
  511. </style>