manualConfirmation.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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. > <!-- 表单是否显示 -->
  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. width="150px">
  42. </el-table-column>
  43. <el-table-column
  44. prop="yang_pin_zong_shu"
  45. label="收样数量"
  46. width="130px">
  47. </el-table-column>
  48. <el-table-column
  49. label="本次确认数量"
  50. width="150px">
  51. <template slot-scope="scope">
  52. <el-input-number
  53. v-model="scope.row.jie_yang_shu_lian"
  54. controls-position="right"
  55. @change="handleChange"
  56. :min="1" :max="9999">
  57. </el-input-number>
  58. </template>
  59. </el-table-column>
  60. <el-table-column
  61. prop="fu_kuan_fang_shi_"
  62. label="是否加急"
  63. width="150px">
  64. </el-table-column>
  65. <el-table-column
  66. prop="yang_pin_lei_xy_"
  67. label="样品类型(一)"
  68. width="150px">
  69. </el-table-column>
  70. <el-table-column
  71. prop="cun_chu_yao_qiu_"
  72. label="样品运输条件(一)"
  73. width="150px">
  74. </el-table-column>
  75. <el-table-column
  76. prop="shu_liang_"
  77. label="样品数量(一)"
  78. width="150px">
  79. </el-table-column>
  80. <el-table-column
  81. prop="yang_pin_gui_ge_y"
  82. label="样品规格(一)"
  83. width="150px">
  84. </el-table-column>
  85. <el-table-column
  86. prop="yang_pin_lei_xe"
  87. label="样品类型(二)"
  88. width="150px">
  89. </el-table-column>
  90. <el-table-column
  91. prop="cun_chu_yao_qiu_q"
  92. label="样品运输条件(二)"
  93. width="150px">
  94. </el-table-column>
  95. <el-table-column
  96. prop="yang_pin_shu_lian"
  97. label="样品数量(二)"
  98. width="150px">
  99. </el-table-column>
  100. <el-table-column
  101. prop="yang_pin_gui_ge_e"
  102. label="样品规格(二)"
  103. width="150px">
  104. </el-table-column>
  105. <el-table-column
  106. prop="yang_pin_lei_xs"
  107. label="样品类型(三)"
  108. width="150px">
  109. </el-table-column>
  110. <el-table-column
  111. prop="yun_shu_tiao_jian"
  112. label="样品运输条件(三)"
  113. width="150px">
  114. </el-table-column>
  115. <el-table-column
  116. prop="yang_pin_shu_ls"
  117. label="样品数量(三)"
  118. width="150px">
  119. </el-table-column>
  120. <el-table-column
  121. prop="yang_pin_gui_ge_s"
  122. label="样品规格(三)"
  123. width="150px">
  124. </el-table-column>
  125. <el-table-column
  126. prop="yang_pin_lei_xsi"
  127. label="样品类型(四)"
  128. width="150px">
  129. </el-table-column>
  130. <el-table-column
  131. prop="yun_shu_tiao_jsi"
  132. label="样品运输条件(四)"
  133. width="150px">
  134. </el-table-column>
  135. <el-table-column
  136. prop="yang_pin_shu_lsi"
  137. label="样品数量(四)"
  138. width="150px">
  139. </el-table-column>
  140. <el-table-column
  141. prop="yang_pin_gui_ge_i"
  142. label="样品规格(四)"
  143. width="150px">
  144. </el-table-column>
  145. <el-table-column
  146. prop="shi_fou_liu_yang_"
  147. label="是否留样"
  148. width="100px"
  149. fixed="right"
  150. align="center">
  151. </el-table-column>
  152. <el-table-column
  153. label="样品存放位置"
  154. width="200px"
  155. fixed="right"
  156. >
  157. <template slot-scope="scope">
  158. <!-- <ibps-link-data
  159. v-model="scope.row.shou_yang_wei_zhi"
  160. template-key = "mjyphjwzjztzly"
  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. fixed="right">
  169. <template slot-scope="scope">
  170. <!-- <ibps-link-data
  171. v-model="scope.row.liu_yang_wei_zhi_"
  172. template-key = "mjyphjwzjztzly"
  173. /> -->
  174. <liuyangData v-model="scope.row.liu_yang_wei_zhi_"/>
  175. </template>
  176. </el-table-column>
  177. <el-table-column
  178. label="接样确认状态"
  179. width="130px"
  180. fixed="right">
  181. <template slot-scope="scope">
  182. <el-select v-model="scope.row.jie_yang_zhuang_t" placeholder="请选择">
  183. <el-option
  184. v-for="item in options"
  185. :key="item.value"
  186. :label="item.label"
  187. :value="item.value">
  188. </el-option>
  189. </el-select>
  190. </template>
  191. </el-table-column>
  192. <el-table-column label="功能" fixed="right">
  193. <template slot-scope="scope">
  194. <el-button
  195. size="small"
  196. type="danger"
  197. icon="el-icon-delete"
  198. @click="deleteData(scope.row.id_)"
  199. >删除</el-button>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. <el-pagination
  204. layout="prev,pager,next"
  205. background
  206. @current-change="current_change"
  207. :current-page="currentPage"
  208. :pager-count="5"
  209. :page-size="10"
  210. :total="this.pageCount"
  211. ></el-pagination>
  212. </div>
  213. </el-dialog>
  214. </div>
  215. </template>
  216. <script>
  217. import manualConfirmationJS from '../js/manualConfirmationJS.js'
  218. import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
  219. import weizhiData from "./weizhiData.vue"
  220. import liuyangData from "./liuyangData.vue"
  221. export default {
  222. components:{
  223. IbpsLinkData,
  224. weizhiData,
  225. liuyangData,
  226. },
  227. mixins:[manualConfirmationJS],
  228. props:{scanVisible:Boolean},
  229. watch:{
  230. listData: {
  231. handler(val, oldName) {
  232. if(val.length>0){
  233. this.visible = true
  234. this.redar = false // 扫描后就让扫描组件隐藏
  235. }
  236. },
  237. deep: true,
  238. immediate: true
  239. },
  240. scanVisible:{
  241. handler(val, oldName) {
  242. if(val){
  243. this.redar = false // 扫码的组件 一开始先展示
  244. this.visible = true // 结果列表 一开始没扫描就不展示
  245. this.$nextTick(() => {
  246. this.$refs.redarInput.focus(); //聚焦input
  247. })
  248. this.listData = [] //清空列表
  249. }else{
  250. this.remRedar()
  251. }
  252. },
  253. deep: true,
  254. immediate: true
  255. }
  256. },
  257. created() {
  258. this.facilityData(1)
  259. },
  260. data () {
  261. return {
  262. updateNum:1,
  263. visible:false,
  264. redar:false,
  265. facilityId:'',
  266. currentPage:1,
  267. listData:[],
  268. options: [{
  269. value: '已确认',
  270. label: '已确认'
  271. }, {
  272. value: '未确认',
  273. label: '未确认'
  274. }],
  275. OriginalPosition:[],
  276. mjwtsqbAllResult:[],
  277. pageCount:1,
  278. item:''
  279. }
  280. },
  281. methods:{
  282. current_change(currentPage){
  283. this.currentPage = currentPage
  284. this.facilityData(currentPage)
  285. }
  286. }
  287. }
  288. </script>
  289. <style>
  290. .sample-scan .popContainer{
  291. position: fixed;
  292. top: 0;
  293. left: 0;
  294. right: 0;
  295. bottom: 0;
  296. z-index: 9999999;
  297. background: rgba(0,0,0,0.7);
  298. }
  299. </style>