sampleConfirmation.vue 48 KB

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