sampleConfirmation.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. <!-- 样品接收确认 -->
  2. <template>
  3. <div class="sample-scan">
  4. <!-- 扫码接收的输入框-->
  5. <el-input v-model="facilityId" ref="redarInput" @change="facilityData(facilityId)"
  6. style="z-index: -999;"></el-input>
  7. <!-- <el-button type="primary" @click="openRedar" >
  8. 測試</el-button> -->
  9. <!-- 扫码操作组件-->
  10. <div class="popContainer" v-if="redar" @click="remRedar">
  11. <dv-decoration-12 style="width:150px;height:150px;margin:0 auto;top: 35%;">
  12. <span style=" color: #66D9EF;">开启扫描设备连接-样品接收确认</span>
  13. </dv-decoration-12>
  14. </div>
  15. <el-dialog width="75%" top="5vh" :modal-append-to-body='false' title=" 样品手动接收确认操作 - 确认样品数量及相关信息 (如果扫描无结果,请点击除标题外的空白处,恢复扫码功能)
  16. 如有修改样品类型规格等信息,请前往质量管理-客户反馈-客户沟通模块填写客户沟通记录表" @close="closeDialog" :before-close="handleClose"
  17. :visible.sync="visible"> <!-- 表单是否显示 -->
  18. <div style="height: 600px;overflow: auto;" @click.self="handleChange">
  19. <el-form label-position="top" size="mini" :model="listData" label-width="100px">
  20. <div v-for="(item, index) in listData">
  21. <el-row>
  22. <div class="dynamic-form-table">
  23. <div class="dynamic-form-table__block panel panel-info">
  24. <div class="panel-heading ibps-clearfix">
  25. <!--块模式:工具栏-->
  26. <div class="ibps-fl dynamic-form-table__label">
  27. 样品No:{{ index + 1 }}
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </el-row>
  33. <div style="padding: 10px 20px;">
  34. <el-row>
  35. <el-col :span="6">
  36. <el-form-item label="样品编号">
  37. <el-input v-model="item.yang_pin_bian_hao" readonly="true"></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="6">
  41. <el-form-item label="样品名称">
  42. <el-input v-model="item.yang_pin_ming_che" readonly="true"></el-input>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="6">
  46. <el-form-item label="样品总数">
  47. <el-input v-model="item.yang_pin_zong_shu" readonly="true"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :span="6">
  51. <el-form-item label="本次确认数量" required>
  52. <el-input v-model="item.jie_yang_shu_lian"></el-input>
  53. </el-form-item>
  54. </el-col>
  55. </el-row>
  56. <div v-if="item.yang_pin_lei_xing">
  57. <div>
  58. <el-alert
  59. title="样品类型①信息"
  60. type="success">
  61. </el-alert>
  62. </div>
  63. <el-row>
  64. <el-col :span="8">
  65. <el-form-item label="样品类型(一)">
  66. <!-- <el-input v-model="item.yang_pin_lei_xing " ></el-input> -->
  67. <template slot-scope="scope">
  68. <el-select v-model="item.yang_pin_lei_xing" placeholder="请选择" filterable
  69. allow-create>
  70. <el-option v-for="item in sampleTypes" :key="item.value" :label="item.label"
  71. :value="item.value">
  72. </el-option>
  73. </el-select>
  74. </template>
  75. </el-form-item>
  76. </el-col>
  77. <el-col :span="8">
  78. <el-form-item label="样品运输条件(一)">
  79. <!-- <el-input v-model="item.yang_ben_yun_shu_" ></el-input> -->
  80. <template slot-scope="scope">
  81. <el-select v-model="item.yang_ben_yun_shu_" placeholder="请选择" filterable
  82. allow-create>
  83. <el-option v-for="item in sampleTransportationConditions" :key="item.value"
  84. :label="item.label" :value="item.value">
  85. </el-option>
  86. </el-select>
  87. </template>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="8">
  91. <el-form-item label="样品数量(一)">
  92. <el-input v-model="item.shu_liang_" @change="changeShuLiang(index)"></el-input>
  93. </el-form-item>
  94. </el-col>
  95. </el-row>
  96. <el-row>
  97. <el-col :span="8">
  98. <el-form-item label="样品规格(一)">
  99. <template slot-scope="scope">
  100. <el-select
  101. v-model="item.yang_pin_gui_ge_"
  102. placeholder="请选择"
  103. filterable
  104. allow-create
  105. @change="changeGuiGe(index,0)">
  106. <el-option v-for="item in sampleSpecifications" :key="item.value"
  107. :label="item.label" :value="item.value">
  108. </el-option>
  109. </el-select>
  110. </template>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="8">
  114. <el-form-item label="单位(一)" v-if="UnitFlag" required>
  115. <el-input v-model="item.dan_wei_yi"></el-input>
  116. </el-form-item>
  117. </el-col>
  118. <el-col :span="8">
  119. <el-form-item label="样品存放位置(一)" required>
  120. <template slot-scope="scope">
  121. <weizhiData v-model="item.shou_yang_wei_zhi_yi" />
  122. </template>
  123. </el-form-item>
  124. </el-col>
  125. </el-row>
  126. <!--每种类型对应的留样数量和留样存放位置-->
  127. <el-row>
  128. <el-col :span="8">
  129. <el-form-item label="是否留样" class="zzj">
  130. <template slot-scope="scope">
  131. <el-select v-model="item.shi_fou_liu_yang_yi" placeholder="请选择"
  132. @change="ifLiuYangChange(index,0)">
  133. <el-option v-for="item in ifLY" :key="item.value" :label="item.label"
  134. :value="item.value">
  135. </el-option>
  136. </el-select>
  137. </template>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="8">
  141. <el-form-item label="留样数量(一)" required class="zzj">
  142. <template slot-scope="scope">
  143. <el-input v-model="item.liu_yang_shu_lian_yi"></el-input>
  144. </template>
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="8">
  148. <el-form-item label="留样存放位置(一)" required>
  149. <template slot-scope="scope">
  150. <liuyangData v-model="item.liu_yang_wei_zhi_yi" ref="LyPositionOne" />
  151. </template>
  152. </el-form-item>
  153. </el-col>
  154. </el-row>
  155. </div>
  156. <div v-if="item.flag2">
  157. <div>
  158. <el-alert
  159. title="样品类型②信息"
  160. type="success">
  161. </el-alert>
  162. </div>
  163. <el-row>
  164. <el-col :span="8">
  165. <el-form-item label="样品类型(二)">
  166. <!-- <el-input v-model="item.yang_pin_lei_er_" ></el-input> -->
  167. <template slot-scope="scope">
  168. <el-select v-model="item.yang_pin_lei_er_" placeholder="请选择" filterable
  169. allow-create>
  170. <el-option v-for="item in sampleTypes" :key="item.value" :label="item.label"
  171. :value="item.value">
  172. </el-option>
  173. </el-select>
  174. </template>
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="8">
  178. <el-form-item label="样品运输条件(二)">
  179. <!-- <el-input v-model="item.yang_pin_yun_shu_" ></el-input> -->
  180. <template slot-scope="scope">
  181. <el-select v-model="item.yang_pin_yun_shu_" placeholder="请选择" filterable
  182. allow-create>
  183. <el-option v-for="item in sampleTransportationConditions" :key="item.value"
  184. :label="item.label" :value="item.value">
  185. </el-option>
  186. </el-select>
  187. </template>
  188. </el-form-item>
  189. </el-col>
  190. <el-col :span="8">
  191. <el-form-item label="样品数量(二)">
  192. <el-input v-model="item.shu_liang_er_" @change="changeShuLiang(index)"></el-input>
  193. </el-form-item>
  194. </el-col>
  195. </el-row>
  196. <el-row>
  197. <el-col :span="8">
  198. <el-form-item label="样品规格(二)">
  199. <!-- <el-input v-model="item.yang_pin_gui_ge_e" ></el-input> -->
  200. <template slot-scope="scope">
  201. <el-select v-model="item.yang_pin_gui_ge_e" placeholder="请选择" filterable
  202. allow-create @change="changeGuiGe(index,1)">
  203. <el-option v-for="item in sampleSpecifications" :key="item.value"
  204. :label="item.label" :value="item.value">
  205. </el-option>
  206. </el-select>
  207. </template>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="8">
  211. <el-form-item label="单位(二)" v-if="UnitFlag" required>
  212. <el-input v-model="item.dan_wei_er"></el-input>
  213. </el-form-item>
  214. </el-col>
  215. <el-col :span="8">
  216. <el-form-item label="样品存放位置(二)" required>
  217. <template slot-scope="scope">
  218. <weizhiData v-model="item.shou_yang_wei_zhi_er" />
  219. </template>
  220. </el-form-item>
  221. </el-col>
  222. </el-row>
  223. <!--每种类型对应的留样数量和留样存放位置-->
  224. <el-row>
  225. <el-col :span="8">
  226. <el-form-item label="是否留样" class="zzj">
  227. <template slot-scope="scope">
  228. <el-select v-model="item.shi_fou_liu_yang_er" placeholder="请选择"
  229. @change="ifLiuYangChange(index,1)">
  230. <el-option v-for="item in ifLY" :key="item.value" :label="item.label"
  231. :value="item.value">
  232. </el-option>
  233. </el-select>
  234. </template>
  235. </el-form-item>
  236. </el-col>
  237. <el-col :span="8">
  238. <el-form-item label="留样数量(二)" required class="zzj">
  239. <template slot-scope="scope">
  240. <el-input v-model="item.liu_yang_shu_lian_er"></el-input>
  241. </template>
  242. </el-form-item>
  243. </el-col>
  244. <el-col :span="8">
  245. <el-form-item label="留样存放位置(二)" required>
  246. <template slot-scope="scope">
  247. <liuyangData v-model="item.liu_yang_wei_zhi_er" ref="LyPositionTwo" />
  248. </template>
  249. </el-form-item>
  250. </el-col>
  251. </el-row>
  252. </div>
  253. <div v-if="item.flag3">
  254. <div>
  255. <el-alert
  256. title="样品类型③信息"
  257. type="success">
  258. </el-alert>
  259. </div>
  260. <el-row>
  261. <el-col :span="8">
  262. <el-form-item label="样品类型(三)">
  263. <!-- <el-input v-model="item.yang_pin_lei_san_" ></el-input> -->
  264. <template slot-scope="scope">
  265. <el-select v-model="item.yang_pin_lei_san_" placeholder="请选择" filterable
  266. allow-create>
  267. <el-option v-for="item in sampleTypes" :key="item.value" :label="item.label"
  268. :value="item.value">
  269. </el-option>
  270. </el-select>
  271. </template>
  272. </el-form-item>
  273. </el-col>
  274. <el-col :span="8">
  275. <el-form-item label="样品运输条件(三)">
  276. <!-- <el-input v-model="item.yang_pin_yun_san" ></el-input> -->
  277. <template slot-scope="scope">
  278. <el-select v-model="item.yang_pin_yun_san" placeholder="请选择" filterable
  279. allow-create>
  280. <el-option v-for="item in sampleTransportationConditions" :key="item.value"
  281. :label="item.label" :value="item.value">
  282. </el-option>
  283. </el-select>
  284. </template>
  285. </el-form-item>
  286. </el-col>
  287. <el-col :span="8">
  288. <el-form-item label="样品数量(三)">
  289. <el-input v-model="item.shu_liang_san_" @change="changeShuLiang(index)"></el-input>
  290. </el-form-item>
  291. </el-col>
  292. </el-row>
  293. <el-row>
  294. <el-col :span="8">
  295. <el-form-item label="样品规格(三)">
  296. <!-- <el-input v-model="item.yang_pin_gui_ge_s" ></el-input> -->
  297. <template slot-scope="scope">
  298. <el-select v-model="item.yang_pin_gui_ge_s" placeholder="请选择" filterable
  299. allow-create @change="changeGuiGe(index,2)">
  300. <el-option v-for="item in sampleSpecifications" :key="item.value"
  301. :label="item.label" :value="item.value">
  302. </el-option>
  303. </el-select>
  304. </template>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="8">
  308. <el-form-item label="单位(三)" v-if="UnitFlag" required>
  309. <el-input v-model="item.dan_wei_san"></el-input>
  310. </el-form-item>
  311. </el-col>
  312. <el-col :span="8">
  313. <el-form-item label="样品存放位置(三)" required>
  314. <template slot-scope="scope">
  315. <weizhiData v-model="item.shou_yang_wei_zhi_san" />
  316. </template>
  317. </el-form-item>
  318. </el-col>
  319. </el-row>
  320. <!--每种类型对应的留样数量和留样存放位置-->
  321. <el-row>
  322. <el-col :span="8">
  323. <el-form-item label="是否留样" class="zzj">
  324. <template slot-scope="scope">
  325. <el-select v-model="item.shi_fou_liu_yang_san" placeholder="请选择"
  326. @change="ifLiuYangChange(index,2)">
  327. <el-option v-for="item in ifLY" :key="item.value" :label="item.label"
  328. :value="item.value">
  329. </el-option>
  330. </el-select>
  331. </template>
  332. </el-form-item>
  333. </el-col>
  334. <el-col :span="8">
  335. <el-form-item label="留样数量(三)" required class="zzj">
  336. <template slot-scope="scope">
  337. <el-input v-model="item.liu_yang_shu_lian_san"></el-input>
  338. </template>
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="8">
  342. <el-form-item label="留样存放位置(三)" required>
  343. <template slot-scope="scope">
  344. <liuyangData v-model="item.liu_yang_wei_zhi_san" ref="LyPositionThree" />
  345. </template>
  346. </el-form-item>
  347. </el-col>
  348. </el-row>
  349. </div>
  350. <div v-if="item.flag4">
  351. <div>
  352. <el-alert
  353. title="样品类型④信息"
  354. type="success">
  355. </el-alert>
  356. </div>
  357. <el-row>
  358. <el-col :span="8">
  359. <el-form-item label="样品类型(四)">
  360. <!-- <el-input v-model="item.yang_pin_lei_si_" ></el-input> -->
  361. <template slot-scope="scope">
  362. <el-select v-model="item.yang_pin_lei_si_" placeholder="请选择" filterable
  363. allow-create>
  364. <el-option v-for="item in sampleTypes" :key="item.value" :label="item.label"
  365. :value="item.value">
  366. </el-option>
  367. </el-select>
  368. </template>
  369. </el-form-item>
  370. </el-col>
  371. <el-col :span="8">
  372. <el-form-item label="样品运输条件(四)">
  373. <!-- <el-input v-model="item.yang_pin_yun_si_" ></el-input> -->
  374. <template slot-scope="scope">
  375. <el-select v-model="item.yang_pin_yun_si_" placeholder="请选择" filterable
  376. allow-create>
  377. <el-option v-for="item in sampleTransportationConditions" :key="item.value"
  378. :label="item.label" :value="item.value">
  379. </el-option>
  380. </el-select>
  381. </template>
  382. </el-form-item>
  383. </el-col>
  384. <el-col :span="8">
  385. <el-form-item label="样品数量(四)">
  386. <el-input v-model="item.shu_liang_si_" @change="changeShuLiang(index)"></el-input>
  387. </el-form-item>
  388. </el-col>
  389. </el-row>
  390. <el-row>
  391. <el-col :span="8">
  392. <el-form-item label="样品规格(四)">
  393. <!-- <el-input v-model="item.yang_pin_gui_si_" ></el-input> -->
  394. <template slot-scope="scope">
  395. <el-select v-model="item.yang_pin_gui_si_" placeholder="请选择" filterable
  396. allow-create @change="changeGuiGe(index,3)">
  397. <el-option v-for="item in sampleSpecifications" :key="item.value"
  398. :label="item.label" :value="item.value">
  399. </el-option>
  400. </el-select>
  401. </template>
  402. </el-form-item>
  403. </el-col>
  404. <el-col :span="8">
  405. <el-form-item label="单位(四)" v-if="UnitFlag" required>
  406. <el-input v-model="item.dan_wei_si"></el-input>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="8">
  410. <el-form-item label="样品存放位置(四)" required>
  411. <template slot-scope="scope">
  412. <weizhiData v-model="item.shou_yang_wei_zhi_si" />
  413. </template>
  414. </el-form-item>
  415. </el-col>
  416. </el-row>
  417. <!--每种类型对应的留样数量和留样存放位置 -->
  418. <el-row>
  419. <el-col :span="8">
  420. <el-form-item label="是否留样" class="zzj">
  421. <template slot-scope="scope">
  422. <el-select v-model="item.shi_fou_liu_yang_si" placeholder="请选择"
  423. @change="ifLiuYangChange(index,3)">
  424. <el-option v-for="item in ifLY" :key="item.value" :label="item.label"
  425. :value="item.value">
  426. </el-option>
  427. </el-select>
  428. </template>
  429. </el-form-item>
  430. </el-col>
  431. <el-col :span="8">
  432. <el-form-item label="留样数量(四)" required class="zzj">
  433. <template slot-scope="scope">
  434. <el-input v-model="item.liu_yang_shu_lian_si"></el-input>
  435. </template>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="8">
  439. <el-form-item label="留样存放位置(四)" required>
  440. <template slot-scope="scope">
  441. <liuyangData v-model="item.liu_yang_wei_zhi_si" ref="LyPositionFour" />
  442. </template>
  443. </el-form-item>
  444. </el-col>
  445. </el-row>
  446. </div>
  447. <div>
  448. <el-alert
  449. title="样品信息配置"
  450. type="warning"
  451. description="上面样品单位自动截取样品规格中被 / 与 * 包裹着的字符,如果样品规格中不存在匹配的字符,则需要手动填写">
  452. </el-alert>
  453. </div>
  454. <el-row>
  455. <el-col :span="8">
  456. <el-form-item label="留样日期">
  457. <template slot-scope="scope">
  458. <el-date-picker v-model="item.liu_yang_ri_qi_" type="date"
  459. value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="请选择"
  460. :readonly="false" :clearable="true" @change="liuyanRiQiChange(item, index)" />
  461. </template>
  462. </el-form-item>
  463. </el-col>
  464. <el-col :span="8">
  465. <el-form-item label="留样期限至">
  466. <template slot-scope="scope">
  467. <el-date-picker v-model="item.liu_yang_qi_xian" type="date"
  468. value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="请选择"
  469. :readonly="false" :clearable="true" />
  470. </template>
  471. </el-form-item>
  472. </el-col>
  473. <el-col :span="6">
  474. <el-form-item label="验收结果">
  475. <template slot-scope="scope">
  476. <el-select v-model="item.yan_shou_jie_guo_" placeholder="请选择">
  477. <el-option v-for="item in checkOptions" :key="item.value"
  478. :label="item.label" :value="item.value">
  479. </el-option>
  480. </el-select>
  481. </template>
  482. </el-form-item>
  483. </el-col>
  484. </el-row>
  485. <el-row>
  486. <el-col :span="8">
  487. <el-form-item label="返样日期">
  488. <template slot-scope="scope">
  489. <el-date-picker v-model="item.fan_yang_ri_qi_" type="date"
  490. value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="请选择"
  491. :readonly="false" :clearable="true" />
  492. </template>
  493. </el-form-item>
  494. </el-col>
  495. <el-col :span="8">
  496. <el-form-item label="返样接样人">
  497. <template slot-scope="scope">
  498. <el-input v-model="item.fan_yang_jyr" placeholder="请输入" type="text"
  499. :readonly="false" clearable />
  500. </template>
  501. </el-form-item>
  502. </el-col>
  503. <el-col :span="8">
  504. <el-form-item label="是否加急">
  505. <el-input v-model="item.chu_ju_bao_gao_ya" readonly="true" ></el-input>
  506. </el-form-item>
  507. </el-col>
  508. </el-row>
  509. <el-row>
  510. <el-col :span="8">
  511. <el-form-item label="姓名">
  512. <template slot-scope="scope">
  513. <el-input v-model="item.xing_ming_" placeholder="请输入" type="text"
  514. :readonly="false" clearable />
  515. </template>
  516. </el-form-item>
  517. </el-col>
  518. <el-col :span="8">
  519. <el-form-item label="性别">
  520. <template slot-scope="scope">
  521. <el-select v-model="item.xing_bie_" placeholder="请选择">
  522. <el-option v-for="item in sex" :key="item.value" :label="item.label"
  523. :value="item.value">
  524. </el-option>
  525. </el-select>
  526. </template>
  527. </el-form-item>
  528. </el-col>
  529. <el-col :span="8">
  530. <el-form-item label="年龄">
  531. <template slot-scope="scope">
  532. <el-input v-model="item.nian_ling_" placeholder="请输入" type="text"
  533. :readonly="false" clearable />
  534. </template>
  535. </el-form-item>
  536. </el-col>
  537. </el-row>
  538. <el-row>
  539. <el-col :span="8">
  540. <el-form-item label="备注">
  541. <template slot-scope="scope">
  542. <el-input v-model="item.bei_zhu_" placeholder="请输入" type="text"
  543. :readonly="false" clearable />
  544. </template>
  545. </el-form-item>
  546. </el-col>
  547. <el-col :span="8">
  548. <el-form-item label="送样要求">
  549. <template slot-scope="scope">
  550. <el-input v-model="item.song_yang_yao_qiu" placeholder="请输入" type="text"
  551. :readonly="false" clearable />
  552. </template>
  553. </el-form-item>
  554. </el-col>
  555. <el-col :span="7">
  556. <el-form-item label="接样确认状态">
  557. <template slot-scope="scope">
  558. <el-select v-model="item.jie_yang_zhuang_t" placeholder="请选择">
  559. <el-option v-for="item in options" :key="item.value" :label="item.label"
  560. :value="item.value">
  561. </el-option>
  562. </el-select>
  563. </template>
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="1">
  567. <el-form-item label="功能">
  568. <template slot-scope="scope">
  569. <el-button size="small" type="danger" icon="el-icon-delete"
  570. @click="deleteData(item.id_)">删除</el-button>
  571. </template>
  572. </el-form-item>
  573. </el-col>
  574. </el-row>
  575. <el-row>
  576. </el-row>
  577. </div>
  578. </div>
  579. </el-form>
  580. </div>
  581. <span slot="footer" class="dialog-footer">
  582. <el-button @click="visible = false">取 消</el-button>
  583. <el-button @click="submitData('确认')" type="primary">样品确认</el-button>
  584. </span>
  585. </el-dialog>
  586. </div>
  587. </template>
  588. <script>
  589. import sampleConfirmationJS from '../js/sampleConfirmationJS.js'
  590. import IbpsLinkData from '@/business/platform/data/templaterender/link-data'
  591. import weizhiData from "./weizhiData.vue"
  592. import liuyangData from "./liuyangData.vue"
  593. import * as dayjs from 'dayjs'
  594. export default {
  595. components: {
  596. IbpsLinkData,
  597. weizhiData,
  598. liuyangData,
  599. },
  600. mixins: [sampleConfirmationJS],
  601. props: { scanVisible: Boolean },
  602. watch: {
  603. listData: {
  604. handler(val, oldName) {
  605. if (val.length > 0) {
  606. this.visible = true
  607. this.redar = false // 扫描后就让扫描组件隐藏
  608. }
  609. },
  610. deep: true,
  611. immediate: true
  612. },
  613. scanVisible: {
  614. handler(val, oldName) {
  615. if (val) {
  616. this.redar = true // 扫码的组件 一开始先展示
  617. this.visible = false // 结果列表 一开始没扫描就不展示
  618. this.$nextTick(() => {
  619. this.$refs.redarInput.focus(); //聚焦input
  620. })
  621. this.listData = [] //清空列表
  622. } else {
  623. this.remRedar()
  624. }
  625. },
  626. deep: true,
  627. immediate: true
  628. }
  629. },
  630. data() {
  631. return {
  632. updateNum: 1,
  633. visible: false,
  634. redar: false,
  635. facilityId: '',
  636. listData: [],
  637. options: [{
  638. value: '已确认',
  639. label: '已确认'
  640. }, {
  641. value: '未确认',
  642. label: '未确认'
  643. }],
  644. checkOptions: [{
  645. value: '完好',
  646. label: '完好'
  647. }, {
  648. value: '残缺',
  649. label: '残缺'
  650. }],
  651. ifLY: [{
  652. value: '是',
  653. label: '是'
  654. }, {
  655. value: '否',
  656. label: '否'
  657. }],
  658. sex: [{
  659. value: '男',
  660. label: '男'
  661. }, {
  662. value: '女',
  663. label: '女'
  664. }],
  665. sampleTypes: [],
  666. sampleSpecifications: [],
  667. sampleTransportationConditions: [{
  668. value: '常温',
  669. label: '常温'
  670. }, {
  671. value: '冰袋(2-8℃)',
  672. label: '冰袋(2-8℃)'
  673. }, {
  674. value: '干冰',
  675. label: '干冰'
  676. }, {
  677. value: '液氮',
  678. label: '液氮'
  679. }, {
  680. value: '其它',
  681. label: '其它'
  682. }],
  683. pageCount: '',
  684. item: '',
  685. flag: true,
  686. UnitFlag : true
  687. }
  688. },
  689. methods: {
  690. msgTips(msg) {
  691. this.$message({
  692. message: msg,
  693. type: "error"
  694. })
  695. },
  696. /** 留样日期选择时 联动 留样期限时间更新 */
  697. liuyanRiQiChange(item, index) {
  698. if (item.liu_yang_ri_qi_ === undefined || item.liu_yang_ri_qi_ === null) {
  699. item.xiao_hui_ri_qi_ = ""
  700. item.liu_yang_qi_xian = ""
  701. } else {
  702. this.flag = false
  703. let curTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 10).replace('T', ' ')
  704. if (item.liu_yang_ri_qi_ < curTime) {
  705. this.msgTips("留样日期不得早于收样日期")
  706. }
  707. // let itemData = dayjs(item.liu_yang_ri_qi_).add(7,'day').format("YYYY-MM-DD")
  708. let val = dayjs(item.liu_yang_ri_qi_).add(3, 'month').format("YYYY-MM-DD")
  709. // item.xiao_hui_ri_qi_ = itemData
  710. item.xiao_hui_ri_qi_ = ""
  711. item.liu_yang_qi_xian = val
  712. this.flag = true
  713. }
  714. },
  715. /** 改变数量时 计算总数 */
  716. changeShuLiang(index) {
  717. let item = this.listData[index]
  718. let total = parseInt(item.shu_liang_ || 0) + parseInt(item.shu_liang_er_ || 0) + parseInt(item.shu_liang_san_ || 0) + parseInt(item.shu_liang_si_ || 0)
  719. item.yang_pin_zong_shu = total
  720. item.jie_yang_shu_lian = total
  721. },
  722. /** 页面触发是否留样按钮执行判断事件 */
  723. ifLiuYangChange(index,LYIndex) {
  724. let item = this.listData[index]
  725. let ifLYArgs = ['shi_fou_liu_yang_yi','shi_fou_liu_yang_er','shi_fou_liu_yang_san','shi_fou_liu_yang_si']
  726. let LYShuLiangArgs = ['liu_yang_shu_lian_yi','liu_yang_shu_lian_er','liu_yang_shu_lian_san','liu_yang_shu_lian_si']
  727. let positionArgs = ['LyPositionOne','LyPositionTwo','LyPositionThree','LyPositionThree']
  728. if (item[ifLYArgs[LYIndex]] == '否') {
  729. item[LYShuLiangArgs[LYIndex]] = null
  730. this.$refs[positionArgs[LYIndex]][0].clearPosition()
  731. this.commonJudgeLiuYangState(item)
  732. } else {
  733. item[LYShuLiangArgs[LYIndex]] = ' ml/支×1支'
  734. // todo 把位置填写并显示?
  735. }
  736. },
  737. /** 判断该样品是否四种类型都 不留样,则置空 留样日期、留样期限 */
  738. commonJudgeLiuYangState(item) {
  739. if(item.shi_fou_liu_yang_yi == '否'){
  740. let LYFlag = true
  741. let flagArgs = ['flag2','flag3','flag4']
  742. let shiFouLYArgs = ['shi_fou_liu_yang_er','shi_fou_liu_yang_san','shi_fou_liu_yang_si']
  743. flagArgs.forEach((element,i) => {
  744. if(item[element] === true && item[shiFouLYArgs[i]] === '是'){
  745. LYFlag = false
  746. }
  747. });
  748. if(LYFlag){
  749. item.liu_yang_ri_qi_ = null
  750. item.liu_yang_qi_xian = null
  751. }
  752. }
  753. },
  754. /* 规格触发事件:匹配规格中 被 / 和 * 包裹的字符串,并赋值给单位字段展示 */
  755. changeGuiGe(index,specificationIndex){
  756. this.UnitFlag = false
  757. let SpecificationsArgs = ['yang_pin_gui_ge_','yang_pin_gui_ge_e','yang_pin_gui_ge_s','yang_pin_gui_si_']
  758. let UnitArgs = ['dan_wei_yi','dan_wei_er','dan_wei_san','dan_wei_si']
  759. let unit = this.handleSpecificationsToUnit(this.listData[index][SpecificationsArgs[specificationIndex]])
  760. this.listData[index][UnitArgs[specificationIndex]] = unit
  761. this.UnitFlag = true
  762. },
  763. /** 匹配表达式,符合则返回值,否则返回空字符串 */
  764. handleSpecificationsToUnit(val){
  765. const regex = /[\/\*]([^\/*]*)[\/\*]/
  766. return val.match(regex) ? val.match(regex)[1] : ''
  767. }
  768. }
  769. }
  770. </script>
  771. <style lang="less" scoped>
  772. /deep/ .el-form-item__label,
  773. /deep/ .el-input__inner {
  774. color: none;
  775. }
  776. .sample-scan .popContainer {
  777. position: fixed;
  778. top: 0;
  779. left: 0;
  780. right: 0;
  781. bottom: 0;
  782. z-index: 9999999;
  783. background: rgba(0, 0, 0, 0.7);
  784. }
  785. // .dynamic-form-table__label:before {
  786. // content: '*';
  787. // color: #F56C6C;
  788. // }
  789. .dynamic-form-table__label {
  790. color: #F56C6C;
  791. font-size: 18px;
  792. line-height: 40px;
  793. font-weight: bold;
  794. }
  795. /**必须设置.el-form-item__label为none */
  796. /deep/.zzj .el-form-item__content .el-input__inner {
  797. color: #e60c14;
  798. }
  799. /deep/.el-form-item__content {
  800. display: inline-block;
  801. }
  802. /deep/.el-form-item__label {
  803. padding: 0;
  804. margin-right: 5px;
  805. width: 120px;
  806. }
  807. /deep/.el-input__inner {
  808. border-top: none !important;
  809. border-left: none !important;
  810. border-right: none !important;
  811. border-radius: 0;
  812. }
  813. /deep/.jiaji {
  814. // color: #F56C6C;
  815. // font-size: 18px;
  816. // line-height: 40px;
  817. // font-weight: bold;
  818. }
  819. /deep/.el-dialog__title {
  820. line-height: 24px;
  821. color: #e60c14;
  822. font-weight: 600;
  823. }
  824. </style>