sampleConfirmation.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  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:150px;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. <div style="min-height: 600px;" @click.self="handleChange">
  27. <el-button @click="submitData('确认')" type="primary" style="float: right;margin: 5px;">样品确认</el-button>
  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="120px">
  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="230">
  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. <el-table-column
  328. label="报告复核员"
  329. width="130px">
  330. <template slot-scope="scope">
  331. <ibps-user-selector
  332. v-model="scope.row.bao_gao_shen_he_y"
  333. placeholder="请选择"
  334. type="user"
  335. store="id"
  336. />
  337. </template>
  338. </el-table-column> -->
  339. <el-table-column
  340. label="备注"
  341. width="180px">
  342. <template slot-scope="scope">
  343. <el-input
  344. v-model="scope.row.bei_zhu_"
  345. placeholder="请输入"
  346. type="text"
  347. :readonly="false"
  348. clearable
  349. />
  350. </template>
  351. </el-table-column>
  352. <el-table-column
  353. label="送样要求"
  354. width="180px">
  355. <template slot-scope="scope">
  356. <el-input
  357. v-model="scope.row.song_yang_yao_qiu"
  358. placeholder="请输入"
  359. type="text"
  360. :readonly="false"
  361. clearable
  362. />
  363. </template>
  364. </el-table-column>
  365. <el-table-column
  366. label="接样确认状态"
  367. width="130px">
  368. <template slot-scope="scope">
  369. <el-select v-model="scope.row.jie_yang_zhuang_t" placeholder="请选择">
  370. <el-option
  371. v-for="item in options"
  372. :key="item.value"
  373. :label="item.label"
  374. :value="item.value">
  375. </el-option>
  376. </el-select>
  377. </template>
  378. </el-table-column>
  379. <el-table-column label="功能">
  380. <template slot-scope="scope">
  381. <el-button
  382. size="small"
  383. type="danger"
  384. icon="el-icon-delete"
  385. @click="deleteData(scope.row.id_)"
  386. >删除</el-button>
  387. </template>
  388. </el-table-column>
  389. </el-table>
  390. <!-- <el-pagination
  391. layout="prev,pager,next"
  392. background
  393. @current-change="current_change"
  394. :current-page="currentPage"
  395. :pager-count="5"
  396. :page-size="10"
  397. :total="this.pageCount"
  398. ></el-pagination> -->
  399. </div>
  400. </el-dialog>
  401. </div>
  402. </template>
  403. <script>
  404. import sampleConfirmationJS from '../js/sampleConfirmationJS.js'
  405. import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
  406. import weizhiData from "./weizhiData.vue"
  407. import liuyangData from "./liuyangData.vue"
  408. // import IbpsUserSelector from '@/business/platform/org/selector'
  409. export default {
  410. components:{
  411. IbpsLinkData,
  412. weizhiData,
  413. liuyangData,
  414. // IbpsUserSelector
  415. },
  416. mixins:[sampleConfirmationJS],
  417. props:{scanVisible:Boolean},
  418. watch:{
  419. listData: {
  420. handler(val, oldName) {
  421. if(val.length>0){
  422. this.visible = true
  423. this.redar = false // 扫描后就让扫描组件隐藏
  424. }
  425. },
  426. deep: true,
  427. immediate: true
  428. },
  429. scanVisible:{
  430. handler(val, oldName) {
  431. if(val){
  432. this.redar = true // 扫码的组件 一开始先展示
  433. this.visible = false // 结果列表 一开始没扫描就不展示
  434. this.$nextTick(() => {
  435. this.$refs.redarInput.focus(); //聚焦input
  436. })
  437. this.listData = [] //清空列表
  438. }else{
  439. this.remRedar()
  440. }
  441. },
  442. deep: true,
  443. immediate: true
  444. }
  445. },
  446. data () {
  447. return {
  448. updateNum:1,
  449. visible:false,
  450. redar:false,
  451. facilityId:'',
  452. listData:[],
  453. options: [{
  454. value: '已确认',
  455. label: '已确认'
  456. }, {
  457. value: '未确认',
  458. label: '未确认'
  459. }],
  460. OriginalPosition:[],
  461. mjwtsqbAllResult:[],
  462. checkOptions:[{
  463. value:'完好',
  464. label:'完好'
  465. },{
  466. value:'残缺',
  467. label:'残缺'
  468. }],
  469. ifLY:[{
  470. value:'是',
  471. label:'是'
  472. },{
  473. value:'否',
  474. label:'否'
  475. }],
  476. sex:[{
  477. value:'男',
  478. label:'男'
  479. },{
  480. value:'女',
  481. label:'女'
  482. }],
  483. // OriginalPosition:[],
  484. pageCount:'',
  485. item:''
  486. // currentPage:1,
  487. // pageCount:''
  488. }
  489. },
  490. // methods:{
  491. // current_change(currentPage){
  492. // this.currentPage = currentPage
  493. // this.facilityData(currentPage)
  494. // }
  495. // }
  496. }
  497. </script>
  498. <style>
  499. .sample-scan .popContainer{
  500. position: fixed;
  501. top: 0;
  502. left: 0;
  503. right: 0;
  504. bottom: 0;
  505. z-index: 9999999;
  506. background: rgba(0,0,0,0.7);
  507. }
  508. </style>