Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

objectRegistration.vue 42KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074
  1. <template>
  2. <div id="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container">
  7. <div style="float: left; margin-bottom: 10px;">
  8. <el-date-picker
  9. v-model="startvalue"
  10. type="date"
  11. placeholder="选择日期"
  12. style="width: 150px;"
  13. value-format="yyyy-MM-dd"
  14. >
  15. </el-date-picker>
  16. <span>-</span>
  17. <el-date-picker
  18. v-model="endvalue"
  19. type="date"
  20. placeholder="选择日期"
  21. style="width: 150px;"
  22. value-format="yyyy-MM-dd"
  23. >
  24. </el-date-picker>
  25. <el-button type="primary" style="margin-left: 10px;" @click="toSeach">搜索</el-button>
  26. </div>
  27. <div style="float:right;margin-bottom:10px;">
  28. <el-button type="primary" @click="printCard">打印</el-button>
  29. <el-button type="primary" @click="dialogFormVisible = true">新增</el-button>
  30. </div>
  31. <div>
  32. <el-table :data="tableData" border style="width: 100%">
  33. <el-table-column prop="fenopda" label="登记日期" align="center" min-width="60">
  34. <template slot-scope="scope">
  35. {{getTimes(scope.row.record_date) }}
  36. </template>
  37. </el-table-column>
  38. <el-table-column prop="fenopda" label="品名型号" align="center" min-width="60">
  39. <template slot-scope="scope">
  40. {{ scope.row.model_number }}
  41. </template>
  42. </el-table-column>
  43. <el-table-column prop="fenopda" label="使用数量" align="center" min-width="60">
  44. <template slot-scope="scope">
  45. {{ scope.row.user_count }}
  46. </template>
  47. </el-table-column>
  48. <el-table-column prop="fenopda" label="生产日期" align="center" min-width="60">
  49. <template slot-scope="scope">
  50. {{getTimes(scope.row.product_date) }}
  51. </template>
  52. </el-table-column>
  53. <el-table-column prop="fenopda" label="失效日期" align="center" min-width="60">
  54. <template slot-scope="scope">
  55. {{getTimes(scope.row.expiry_date) }}
  56. </template>
  57. </el-table-column>
  58. <el-table-column prop="fenopda" label="包装标识(完整,清晰,无破损不清)" align="center" min-width="60">
  59. <template slot-scope="scope">
  60. <span v-if="scope.row.packaging_identification == 1">✔</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column prop="fenopda" label="经手人" align="center" min-width="60">
  64. <template slot-scope="scope">
  65. {{getName(scope.row.destroy_people) }}
  66. </template>
  67. </el-table-column>
  68. <el-table-column prop="fenopda" label="销毁数量" align="center" min-width="60">
  69. <template slot-scope="scope">
  70. {{ scope.row.destroy_nubmer }}
  71. </template>
  72. </el-table-column>
  73. <el-table-column prop="fenopda" label="销毁方式(交医疗废物处理机构)" align="center" min-width="60">
  74. <template slot-scope="scope">
  75. <span v-if="scope.row.destroy_way == 1">✔</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="fenopda" label="负责人" align="center" min-width="60">
  79. <template slot-scope="scope">
  80. {{getName(scope.row.leader) }}
  81. </template>
  82. </el-table-column>
  83. <el-table-column prop="city" label="操作" align="center" min-width="100">
  84. <template slot-scope="scope">
  85. <el-button
  86. size="mini"
  87. type="primary"
  88. @click="handleEdit(scope.row.id)">编辑</el-button>
  89. <el-button
  90. size="mini"
  91. type="danger"
  92. @click="handleDelete(scope.row.id)">删除</el-button>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. <el-pagination
  97. :page-sizes="[500, 1000, 1500, 2000,2500]"
  98. :page-size="500"
  99. background
  100. style="margin-top:20px;float: right"
  101. layout="total, sizes, prev, pager, next, jumper"
  102. :total="total"
  103. @size-change="handleSizeChange"
  104. @current-change="handleCurrentChange"
  105. >
  106. </el-pagination>
  107. </div>
  108. <!-- 新增 -->
  109. <el-dialog
  110. title="新增"
  111. :visible.sync="dialogFormVisible"
  112. width="55%">
  113. <el-form :model="form" ref="form">
  114. <el-row :span="24">
  115. <el-col :span="8">
  116. <el-form-item label="登记日期:" label-width="110px" prop="record_date">
  117. <el-date-picker
  118. value-format="yyyy-MM-dd"
  119. v-model="form.record_date"
  120. type="date"
  121. placeholder="选择日期时间"
  122. style="width: 150px;"
  123. @change="changeModelNumber">
  124. </el-date-picker>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8">
  128. <el-form-item label="品名、型号:" label-width="110px" prop="record_date">
  129. <!-- <el-input v-model="form.model_number" style="width: 150px;"></el-input> -->
  130. <el-select v-model="form.model_number" filterable placeholder="请选择" @change="changeModelNumber">
  131. <el-option
  132. v-for="item in goodList"
  133. :key="item.id"
  134. :label="item.specification_name"
  135. :value="item.id">
  136. </el-option>
  137. </el-select>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="8">
  141. <el-form-item label="使用数量:" label-width="110px" prop="record_date">
  142. <el-input v-model="form.user_count" style="width: 150px;"></el-input>
  143. </el-form-item>
  144. </el-col>
  145. </el-row>
  146. <el-row :span="24">
  147. <el-col :span="8">
  148. <el-form-item label="生产日期:" label-width="110px" prop="record_date" >
  149. <el-date-picker
  150. value-format="yyyy-MM-dd"
  151. v-model="form.product_date"
  152. type="date"
  153. placeholder="选择日期时间"
  154. style="width: 150px;">
  155. </el-date-picker>
  156. </el-form-item>
  157. </el-col>
  158. <el-col :span="8">
  159. <el-form-item label="失效日期:" label-width="110px" prop="record_date">
  160. <el-date-picker
  161. value-format="yyyy-MM-dd"
  162. v-model="form.expiry_date"
  163. type="date"
  164. placeholder="选择日期时间"
  165. style="width: 150px;">
  166. </el-date-picker>
  167. </el-form-item>
  168. </el-col>
  169. <el-col :span="8">
  170. <el-form-item label="包装标识(完整,清晰,无破损不清):" label-width="250px" prop="record_date">
  171. <el-checkbox v-model="form.packaging_identification"></el-checkbox>
  172. </el-form-item>
  173. </el-col>
  174. </el-row>
  175. <el-row :span="24">
  176. <el-col :span="8">
  177. <el-form-item label="经手人:" label-width="110px" prop="record_date" >
  178. <el-select v-model="form.destroy_people" placeholder="请选择" filterable >
  179. <el-option
  180. v-for="(item,index) in docList"
  181. :key="index"
  182. :label="item.user_name"
  183. :value="item.admin_user_id"
  184. style="width:150x">
  185. </el-option>
  186. </el-select>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="8">
  190. <el-form-item label="销毁数量:" label-width="110px" prop="record_date">
  191. <el-input v-model="form.destroy_nubmer" style="width:150x"></el-input>
  192. </el-form-item>
  193. </el-col>
  194. <el-col :span="8">
  195. <el-form-item label="销毁方式(交医疗废物处理机构):" label-width="250px" prop="destroy_way">
  196. <el-checkbox v-model="form.destroy_way"></el-checkbox>
  197. </el-form-item>
  198. </el-col>
  199. </el-row>
  200. <el-row :span="24">
  201. <el-col :span="8">
  202. <el-form-item label="负责人:" label-width="110px" prop="record_date" >
  203. <el-select v-model="form.leader" placeholder="请选择" filterable>
  204. <el-option
  205. v-for="(item,index) in docList"
  206. :key="index"
  207. :label="item.user_name"
  208. :value="item.admin_user_id"
  209. style="width:150x">
  210. </el-option>
  211. </el-select>
  212. </el-form-item>
  213. </el-col>
  214. </el-row>
  215. </el-form>
  216. <span slot="footer" class="dialog-footer">
  217. <el-button @click="dialogFormVisible = false">取 消</el-button>
  218. <el-button type="primary" @click="saveObjectRegistration('form')">确 定</el-button>
  219. </span>
  220. </el-dialog>
  221. <!-- 编辑 -->
  222. <el-dialog
  223. title="新增"
  224. :visible.sync="editDialogFormVisible"
  225. width="55%">
  226. <el-form :model="form" ref="form">
  227. <el-row :span="24">
  228. <el-col :span="8">
  229. <el-form-item label="登记日期:" label-width="110px" prop="record_date" >
  230. <el-date-picker
  231. value-format="yyyy-MM-dd"
  232. v-model="form.record_date"
  233. type="date"
  234. placeholder="选择日期时间"
  235. style="width: 150px;"
  236. @change="changeModelNumber">
  237. </el-date-picker>
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="8">
  241. <el-form-item label="品名、型号:" label-width="110px" prop="model_number">
  242. <!-- <el-input v-model="form.model_number" style="width: 150px;"></el-input> -->
  243. <el-select v-model="form.model_number" filterable placeholder="请选择" @change="changeModelNumber">
  244. <el-option
  245. v-for="item in goodList"
  246. :key="item.id"
  247. :label="item.specification_name"
  248. :value="item.id">
  249. </el-option>
  250. </el-select>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="8">
  254. <el-form-item label="使用数量:" label-width="110px" prop="user_count">
  255. <el-input v-model="form.user_count" style="width: 150px;"></el-input>
  256. </el-form-item>
  257. </el-col>
  258. </el-row>
  259. <el-row :span="24">
  260. <el-col :span="8">
  261. <el-form-item label="生产日期:" label-width="110px" prop="product_date" >
  262. <el-date-picker
  263. value-format="yyyy-MM-dd"
  264. v-model="form.product_date"
  265. type="date"
  266. placeholder="选择日期时间"
  267. style="width: 150px;">
  268. </el-date-picker>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="8">
  272. <el-form-item label="失效日期:" label-width="110px" prop="expiry_date">
  273. <el-date-picker
  274. value-format="yyyy-MM-dd"
  275. v-model="form.expiry_date"
  276. type="date"
  277. placeholder="选择日期时间"
  278. style="width: 150px;">
  279. </el-date-picker>
  280. </el-form-item>
  281. </el-col>
  282. <el-col :span="8">
  283. <el-form-item label="包装标识(完整,清晰,无破损不清):" label-width="250px" prop="packaging_identification">
  284. <el-checkbox v-model="form.packaging_identification"></el-checkbox>
  285. </el-form-item>
  286. </el-col>
  287. </el-row>
  288. <el-row :span="24">
  289. <el-col :span="8">
  290. <el-form-item label="经手人:" label-width="110px" prop="destroy_people" >
  291. <el-select v-model="form.destroy_people" placeholder="请选择" filterable>
  292. <el-option
  293. v-for="(item,index) in docList"
  294. :key="index"
  295. :label="item.user_name"
  296. :value="item.admin_user_id"
  297. style="width:150x">
  298. </el-option>
  299. </el-select>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="8">
  303. <el-form-item label="销毁数量:" label-width="110px" prop="destroy_nubmer">
  304. <el-input v-model="form.destroy_nubmer" style="width:150x"></el-input>
  305. </el-form-item>
  306. </el-col>
  307. <el-col :span="8">
  308. <el-form-item label="销毁方式(交医疗废物处理机构):" label-width="250px" prop="destroy_way">
  309. <el-checkbox v-model="form.destroy_way"></el-checkbox>
  310. </el-form-item>
  311. </el-col>
  312. </el-row>
  313. <el-row :span="24">
  314. <el-col :span="8">
  315. <el-form-item label="负责人:" label-width="110px" prop="leader" >
  316. <el-select v-model="form.leader" placeholder="请选择" filterable>
  317. <el-option
  318. v-for="(item,index) in docList"
  319. :key="index"
  320. :label="item.user_name"
  321. :value="item.admin_user_id"
  322. style="width:150x">
  323. </el-option>
  324. </el-select>
  325. </el-form-item>
  326. </el-col>
  327. </el-row>
  328. </el-form>
  329. <span slot="footer" class="dialog-footer">
  330. <el-button @click="editDialogFormVisible = false">取 消</el-button>
  331. <el-button type="primary" @click="UpdateObjectRegistration('form')">确 定</el-button>
  332. </span>
  333. </el-dialog>
  334. <div hidden="hidden">
  335. <div id="print-card-info" v-show="hiddenShow">
  336. <div>
  337. <h1 style="text-align: center;">一次性无菌医疗器械使用前检查、用后销毁记录</h1>
  338. <div>
  339. <table border="1" style="text-align: center;margin: auto;border-collapse: collapse;">
  340. <tr>
  341. <td>登记日期</td>
  342. <td>品名型号</td>
  343. <td>使用数量</td>
  344. <td>生产日期</td>
  345. <td>失效日期</td>
  346. <td>包装标识(完整,清晰,无破损不清)</td>
  347. <td>经手人</td>
  348. <td>销毁数量</td>
  349. <td>销毁方式(交医疗废物处理机构)</td>
  350. <td>负责人</td>
  351. </tr>
  352. <tr v-for="(item,index) in tableData" :key="index">
  353. <td>{{getTimes(item.record_date) }}</td>
  354. <td>{{ item.model_number }}</td>
  355. <td>{{ item.user_count }}</td>
  356. <td>{{ getTimes(item.product_date) }}</td>
  357. <td>{{ getTimes(item.expiry_date) }}</td>
  358. <td>
  359. <span v-if="item.packaging_identification == 1">√</span>
  360. </td>
  361. <td>
  362. <span v-if="setAdminUserES(item.destroy_people?item.destroy_people:item.destroy_people) == ''">
  363. {{getName(item.destroy_people)}}
  364. </span>
  365. <span v-else>
  366. <img style="height:30px;" :src="setAdminUserES(item.destroy_people?item.destroy_people:item.destroy_people)" alt="" srcset="">
  367. </span>
  368. </td>
  369. <td>{{ item.destroy_nubmer }}</td>
  370. <td>
  371. <span v-if="item.destroy_way == 1">√</span>
  372. </td>
  373. <td>
  374. <span v-if="setAdminUserES(item.leader?item.leader:item.leader) == ''">
  375. {{getName(item.leader)}}
  376. </span>
  377. <span v-else>
  378. <img style="height:30px;" :src="setAdminUserES(item.leader?item.leader:item.leader)" alt="" srcset="">
  379. </span>
  380. </td>
  381. </tr>
  382. </table>
  383. </div>
  384. </div>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. </template>
  390. <script>
  391. import print from "print-js";
  392. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  393. import {
  394. getAllDoctorList,
  395. saveObjectRegistration,
  396. getRegistrationDisInfectList,
  397. getObjectRegistrationByIdList,
  398. UpdateObjectRegistration,
  399. deleteObjectRegistration,
  400. getRegistGoodInforList,
  401. getRegistNumber
  402. } from "@/api/device"
  403. import { uParseTime } from '@/utils/tools'
  404. const moment = require('moment')
  405. export default {
  406. name: 'airDisinfect',
  407. components: {
  408. BreadCrumb
  409. },
  410. data() {
  411. return {
  412. crumbs: [
  413. { path: false, name: '院感管理' },
  414. { path: false, name: '透析室医疗器械记录表' }
  415. ],
  416. dialogFormVisible:false,
  417. editDialogFormVisible:false,
  418. startvalue:'',
  419. endvalue:'',
  420. form: {
  421. id:0,
  422. record_date:moment(new Date()).add('year',0).format("YYYY-MM-DD"), //创建日期
  423. model_number:"",
  424. user_count:"",
  425. product_date:"",
  426. expiry_date:"",
  427. packaging_identification:"",
  428. destroy_people:this.$store.getters.xt_user.user.id,
  429. destroy_nubmer:"",
  430. destroy_way:"",
  431. leader:this.$store.getters.xt_user.user.id
  432. },
  433. // value1:'',
  434. docList:[],
  435. options:[
  436. {id:1,name:"正常"},
  437. {id:2,name:"撤销"}
  438. ],
  439. airRules: {
  440. created_time:[{required:true,message:"请选择创建时间",trigger:"blur"}],
  441. start_time:[{required:true,message:"请选择开始时间",trigger:"blur"}],
  442. end_time:[{required:true,message:"请选择结束时间",trigger:"blur"}]
  443. },
  444. limit:10,
  445. page:1,
  446. total:0,
  447. tableData: [],
  448. hiddenShow:false,
  449. disInfectionWaterList:[
  450. { id: 1, name: "0.22%季铵盐" },
  451. { id: 2, name: "500mg/l含氯消毒剂" },
  452. { id: 3, name: "1000mg/l含氯消毒剂" },
  453. { id: 4, name: "1500mg/l含氯消毒剂" },
  454. { id: 5, name: "消毒湿巾" },
  455. { id:6, name:"75%酒精"}
  456. ],
  457. DisinfectionMode: [
  458. { id: 1, name: "擦拭" },
  459. { id: 2, name: "浸泡" },
  460. { id: 3, name: "喷洒" }
  461. ],
  462. operators: [],
  463. operatorMaps:{},
  464. goodList:[],
  465. }
  466. },
  467. created(){
  468. this.getRegistGoodInforList()
  469. this.getAllDoctorList()
  470. this.getlist()
  471. },
  472. methods:{
  473. printCard() {
  474. this.hiddenShow = true;
  475. var ptime = Math.round(new Date().getTime() / 1000);
  476. this.print_time = uParseTime(ptime, "{y}年{m}月{d}日");
  477. const style =
  478. "@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0;font-size:15px } .print_main_content .order_title { text-align: center; font-size: 15px; line-height: 50px;} .print_main_content table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px;font-size:15px } .print_main_content table tbody tr td { border: 1px solid; text-align: center; padding: 10px 8px;font-size:15px } .td_proj_title { font-size: 15px; line-height: 25px;} .td_proj_content { font-size: 15px; line-height: 25px; } .td_align_left { text-align: left; } .print_footnote_panel { font-size: 15px; line-height: 40px; } .print_footnote_panel .proj { display: inline-block; width: 49%; } .print_footnote_panel .proj}";
  479. setTimeout(() => {
  480. printJS({
  481. printable: "print-card-info",
  482. type: "html",
  483. style: style,
  484. scanStyles: false
  485. });
  486. }, 1);
  487. },
  488. getTimes(time) {
  489. return uParseTime(time, '{y}-{m}-{d}')
  490. },
  491. getTimeTwo(time) {
  492. return uParseTime(time, '{h}:{i}')
  493. },
  494. getTimeThree(time) {
  495. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  496. },
  497. getName(creator){
  498. var name = ""
  499. for(let i=0;i<this.docList.length;i++){
  500. if(creator == this.docList[i].admin_user_id){
  501. name = this.docList[i].user_name
  502. }
  503. }
  504. return name
  505. },
  506. getAllDoctorList(){
  507. getAllDoctorList().then(response=>{
  508. if(response.data.state == 1){
  509. var list = response.data.data.list
  510. console.log("list222222",list)
  511. this.docList = list
  512. this.operators = response.data.data.operators
  513. }
  514. })
  515. },
  516. saveObjectTableDisinfect(formName){
  517. this.$refs[formName].validate((valid=>{
  518. if(valid){
  519. if(this.form.first_is_check!=""){
  520. this.form.first_is_check = parseInt(this.form.first_is_check)
  521. }else{
  522. this.form.first_is_check=0
  523. }
  524. if(this.form.sencond_is_check!=""){
  525. this.form.sencond_is_check = parseInt(this.form.sencond_is_check)
  526. }else{
  527. this.form.sencond_is_check=0
  528. }
  529. if(this.form.third_is_check!=""){
  530. this.form.third_is_check = parseInt(this.form.third_is_check)
  531. }else{
  532. this.form.third_is_check = 0
  533. }
  534. if(this.form.fourth_is_check!=""){
  535. this.form.fourth_is_check = parseInt(this.form.fourth_is_check)
  536. }else{
  537. this.form.fourth_is_check =0
  538. }
  539. if(this.form.last_is_check!=""){
  540. this.form.last_is_check = parseInt(this.form.last_is_check)
  541. }else{
  542. this.form.last_is_check = 0
  543. }
  544. if(this.form.first_modifications!=""){
  545. this.form.first_modifications = parseInt(this.form.first_modifications)
  546. }else{
  547. this.form.first_modifications=0
  548. }
  549. if(this.form.sencond_modifications!=""){
  550. this.form.sencond_modifications = parseInt(this.form.sencond_modifications)
  551. }else{
  552. this.form.sencond_modifications=0
  553. }
  554. if(this.form.third_modifications!=""){
  555. this.form.third_modifications = parseInt(this.form.third_modifications)
  556. }else{
  557. this.form.third_modifications = 0
  558. }
  559. if(this.form.fourth_modifications!=""){
  560. this.form.fourth_modifications = parseInt(this.form.fourth_modifications)
  561. }else{
  562. this.form.fourth_modifications =0
  563. }
  564. if(this.form.last_modifications!=""){
  565. this.form.last_modifications = parseInt(this.form.last_modifications)
  566. }else{
  567. this.form.last_modifications = 0
  568. }
  569. if(this.form.first_start_time == null){
  570. this.form.first_start_time = ""
  571. }
  572. if(this.form.first_end_time == null){
  573. this.form.first_end_time = ""
  574. }
  575. if(this.form.sencond_start_time == null){
  576. this.form.sencond_start_time = ""
  577. }
  578. if(this.form.sencond_end_time == null){
  579. this.form.sencond_end_time = ""
  580. }
  581. if(this.form.third_start_time == null){
  582. this.form.third_start_time = ""
  583. }
  584. if(this.form.third_end_time == null){
  585. this.form.third_end_time = ""
  586. }
  587. if(this.form.fourth_start_time == null){
  588. this.form.fourth_start_time = ""
  589. }
  590. if(this.form.fourth_end_time == null){
  591. this.form.fourth_end_time = ""
  592. }
  593. if(this.form.last_start_time == null){
  594. this.form.last_start_time = ""
  595. }
  596. if(this.form.last_end_time == null){
  597. this.form.last_end_time = ""
  598. }
  599. console.log("param23333333333333333",this.form)
  600. saveObjectTableDisinfect(this.form).then(response=>{
  601. if(response.data.state == 1){
  602. var objectDisinfect = response.data.data.objectDisinfect
  603. this.$message.success("保存成功!")
  604. this.dialogFormVisible = false
  605. this.getlist()
  606. }
  607. })
  608. }
  609. }))
  610. },
  611. getlist(){
  612. var params = {
  613. start_time:this.startvalue,
  614. end_time:this.endvalue,
  615. limit:this.limit,
  616. page:this.page,
  617. }
  618. getRegistrationDisInfectList(params).then(response=>{
  619. if(response.data.state == 1){
  620. var list = response.data.data.list
  621. this.tableData = list
  622. this.total = response.data.data.total
  623. }
  624. })
  625. },
  626. handleEdit(id){
  627. getObjectRegistrationByIdList(id).then(response=>{
  628. if(response.data.state == 1){
  629. var list = response.data.data.list
  630. console.log("list",list)
  631. this.form.id = list.id
  632. this.form.record_date = this.getTimes(list.record_date)
  633. this.form.model_number = list.model_number
  634. this.form.user_count = list.user_count
  635. this.form.product_date = this.getTimes(list.product_date)
  636. this.form.expiry_date = this.getTimes(list.expiry_date)
  637. if(list.packaging_identification == 1){
  638. this.form.packaging_identification = true
  639. }else{
  640. this.form.packaging_identification = false
  641. }
  642. this.form.destroy_people = list.destroy_people
  643. this.form.destroy_nubmer = list.destroy_nubmer
  644. if(list.destroy_way == 1){
  645. this.form.destroy_way = true
  646. }else{
  647. this.form.destroy_way = false
  648. }
  649. this.form.leader = list.leader
  650. this.editDialogFormVisible = true
  651. }
  652. })
  653. },
  654. UpdateObjectRegistration(formName){
  655. this.$refs[formName].validate((valid=>{
  656. if(valid){
  657. var destroy_way_one = 0
  658. if(this.form.destroy_way == true){
  659. destroy_way_one = 1
  660. }
  661. if(this.form.destroy_way == false){
  662. destroy_way_one = 2
  663. }
  664. var packaging_identification_one = 0
  665. if(this.form.packaging_identification ==true ){
  666. packaging_identification_one = 1
  667. }
  668. if(this.form.packaging_identification ==false ){
  669. packaging_identification_one = 2
  670. }
  671. var model_number = ""
  672. for(let i=0;i<this.goodList.length;i++){
  673. if(this.form.model_number == this.goodList[i].id){
  674. model_number = this.goodList[i].specification_name
  675. }
  676. }
  677. var params = {
  678. id:this.form.id,
  679. record_date:this.form.record_date,
  680. model_number:model_number,
  681. user_count:this.form.user_count.toString(),
  682. product_date:this.form.product_date,
  683. expiry_date:this.form.expiry_date,
  684. packaging_identification:packaging_identification_one,
  685. destroy_people:this.form.destroy_people,
  686. destroy_nubmer:this.form.destroy_nubmer.toString(),
  687. destroy_way:destroy_way_one,
  688. leader:this.form.leader,
  689. }
  690. console.log("param223322323wo",params)
  691. UpdateObjectRegistration(params).then(response=>{
  692. if(response.data.state == 1){
  693. var registration = response.data.data.registration
  694. this.$message.success("保存成功!")
  695. this.editDialogFormVisible = false
  696. this.getlist()
  697. }
  698. })
  699. }
  700. }))
  701. },
  702. handleDelete(id){
  703. deleteObjectRegistration(id).then(response=>{
  704. if(response.data.state ==1){
  705. var msg = response.data.data.msg
  706. this.$message.success("删除成功!")
  707. this.getlist()
  708. }
  709. })
  710. },
  711. firststartime(val){
  712. this.form.first_start_time = val
  713. this.form.first_disinfection_time = this.firstdisinfection_time
  714. },
  715. firstendtime(val){
  716. this.form.first_disinfection_time = this.firstdisinfection_time
  717. this.form.first_end_time = val
  718. },
  719. sencondstarttime(val){
  720. this.form.sencond_start_time = val
  721. this.form.sencond_disinfection_time = this.senconddisinfection_time
  722. },
  723. sencondendtime(val){
  724. this.form.sencond_end_time = val
  725. this.form.sencond_disinfection_time = this.senconddisinfection_time
  726. },
  727. thirdstarttime(val){
  728. this.form.third_start_time = val
  729. this.form.third_disinfection_time = this.thirddisinfection_time
  730. },
  731. thirdendtime(val){
  732. this.form.third_end_time = val
  733. this.form.third_disinfection_time = this.thirddisinfection_time
  734. },
  735. fourthstarttime(val){
  736. this.form.fourth_start_time = val
  737. this.form.fourth_disinfection_time = this.fourthdisinfection_time
  738. },
  739. fourthendtime(val){
  740. this.form.fourth_end_time = val
  741. this.form.fourth_disinfection_time = this.fourthdisinfection_time
  742. },
  743. laststarttime(val){
  744. this.form.last_start_time = val
  745. this.form.last_disinfection_time = this.lastdisinfection_time
  746. },
  747. lastendtime(val){
  748. this.form.last_end_time = val
  749. this.form.last_disinfection_time = this.lastdisinfection_time
  750. },
  751. setAdminUserES(id) {
  752. if (id === 0) {
  753. return ''
  754. }
  755. var user_name = ""
  756. for(let i=0;i<this.operators.length;i++){
  757. if(id == this.operators[i].admin_user_id){
  758. user_name = this.operators[i].url
  759. }
  760. }
  761. return user_name
  762. // if (id in this.operatorMaps) {
  763. // return this.operatorMaps[id].url
  764. // } else {
  765. // return ''
  766. // }
  767. },
  768. handleSizeChange(val) {
  769. this.limit = val;
  770. this.getlist()
  771. },
  772. handleCurrentChange(val) {
  773. this.page = val;
  774. this.getlist()
  775. },
  776. saveObjectRegistration(formName){
  777. this.$refs[formName].validate((valid=>{
  778. if(valid){
  779. var destroy_way_one = 0
  780. if(this.form.destroy_way == true){
  781. destroy_way_one = 1
  782. }
  783. if(this.form.destroy_way == false){
  784. destroy_way_one = 2
  785. }
  786. var packaging_identification_one = 0
  787. if(this.form.packaging_identification ==true ){
  788. packaging_identification_one = 1
  789. }
  790. if(this.form.packaging_identification ==false ){
  791. packaging_identification_one = 2
  792. }
  793. var model_number = ""
  794. for(let i=0;i<this.goodList.length;i++){
  795. if(this.form.model_number == this.goodList[i].id){
  796. model_number = this.goodList[i].specification_name
  797. }
  798. }
  799. var params = {
  800. record_date:this.form.record_date,
  801. model_number:model_number,
  802. user_count:this.form.user_count.toString(),
  803. product_date:this.form.product_date,
  804. expiry_date:this.form.expiry_date,
  805. packaging_identification:packaging_identification_one,
  806. destroy_people:this.form.destroy_people,
  807. destroy_nubmer:this.form.destroy_nubmer.toString(),
  808. destroy_way:destroy_way_one,
  809. leader:this.form.leader,
  810. }
  811. console.log("param223322323wo",params)
  812. saveObjectRegistration(params).then(response=>{
  813. if(response.data.state ==1){
  814. var registration = response.data.data.registration
  815. this.dialogFormVisible = false
  816. this.$message.success("保存成功!")
  817. this.getlist()
  818. }
  819. })
  820. }
  821. }))
  822. },
  823. toSeach(){
  824. this.getlist()
  825. },
  826. getRegistGoodInforList(){
  827. getRegistGoodInforList().then(response=>{
  828. if(response.data.state == 1){
  829. var goodList = response.data.data.list
  830. this.goodList = goodList
  831. }
  832. })
  833. },
  834. changeModelNumber(val){
  835. console.log("val23233223",val)
  836. getRegistNumber(val,this.form.record_date).then(response=>{
  837. if(response.data.state ==1 ){
  838. var list = response.data.data.list
  839. var count = 0
  840. if(list!=null && list.length >0){
  841. for(let i=0;i<list.length;i++){
  842. count +=list[i].count
  843. }
  844. }
  845. this.form.user_count = ""
  846. this.form.user_count = count
  847. }
  848. })
  849. }
  850. }
  851. }
  852. </script>
  853. <style lang="scss" scoped>
  854. .airForm{
  855. display: flex;
  856. justify-content: space-between;
  857. flex-wrap: wrap;
  858. .el-form-item{
  859. width:33%;
  860. }
  861. .el-date-editor.el-input, .el-date-editor.el-input__inner{
  862. width: 200px;
  863. }
  864. .el-input{
  865. width: 200px;
  866. }
  867. .el-select{
  868. width: 200px;
  869. }
  870. .form_title{
  871. width: 100%;
  872. margin-bottom: 10px;
  873. span{
  874. font-size: 20px;
  875. font-weight: bold;
  876. }
  877. }
  878. }
  879. </style>
  880. <style lang="scss">
  881. #main-contain{
  882. .app-container{
  883. // display: flex;
  884. // justify-content: space-between;
  885. // flex-wrap: wrap;
  886. .tab_air{
  887. // 斜杠表格
  888. .el-table{
  889. th{
  890. padding: 0px !important;
  891. }
  892. tr:first-of-type th:first-of-type div.cell {
  893. text-align: right;/*上边文字靠右*/
  894. }
  895. tr:last-of-type th:first-of-type div.cell {
  896. text-align: left;/*下边文字靠左*/
  897. }
  898. tr:first-of-type th:first-of-type:before {
  899. content: "";
  900. position: absolute;
  901. width: 1px;
  902. height: 100px;/*斜线的长度*/
  903. top: 0;
  904. left: 75px;
  905. background-color: rgb(172, 171, 171);
  906. opacity: 1.2;
  907. display: block;
  908. transform: rotate(-47deg);/*调整斜线的角度*/
  909. -webkit-transform-origin: top;
  910. transform-origin: top;
  911. }
  912. tr:nth-of-type(2) th:nth-of-type(1):before{
  913. content: "";
  914. position: absolute;
  915. width: 1px;
  916. height: 80px;/*斜线的长度*/
  917. top: 0;
  918. left: 100px;
  919. background-color: rgb(172, 171, 171);
  920. opacity: 1.2;
  921. display: block;
  922. transform: rotate(-47deg);/*调整斜线的角度*/
  923. -webkit-transform-origin: top;
  924. transform-origin: top;
  925. }
  926. tr:last-of-type th:first-of-type:before {
  927. content: "";
  928. position: absolute;
  929. width: 1px;
  930. height: 80px;/*斜线的长度*/
  931. top: 0;
  932. left: 125px;
  933. background-color: rgb(172, 171, 171);
  934. opacity: 1.2;
  935. display: block;
  936. transform: rotate(-48deg);/*调整斜线的角度*/
  937. -webkit-transform-origin: top;
  938. transform-origin: top;
  939. }
  940. tr:nth-of-type(2) th:nth-of-type(1):after{
  941. content: "";
  942. position: absolute;
  943. width: 1px;
  944. height: 80px;/*斜线的长度*/
  945. top: 8px;
  946. left: 0px;
  947. background-color: rgb(172, 171, 171);
  948. opacity: 1.2;
  949. display: block;
  950. transform: rotate(-76deg);/*调整斜线的角度*/
  951. -webkit-transform-origin: top;
  952. transform-origin: top;
  953. }
  954. tr:last-of-type th:first-of-type:after {
  955. content: "";
  956. position: absolute;
  957. width: 1px;
  958. height: 92px;/*斜线的长度*/
  959. top: 0;
  960. left: 59px;
  961. background-color: rgb(172, 171, 171);
  962. opacity: 1.2;
  963. display: block;
  964. transform: rotate(-76deg);/*调整斜线的角度*/
  965. -webkit-transform-origin: top;
  966. transform-origin: top;
  967. }
  968. }
  969. .el-table--border th, .el-table__fixed-right-patch {
  970. border-bottom: none !important;
  971. }
  972. .el-table td .cell, .el-table th .cell {
  973. padding: 0 5px !important;
  974. }
  975. .el-table .cell {
  976. white-space: pre-line;
  977. }
  978. }
  979. }
  980. }
  981. ::-webkit-scrollbar{
  982. height: 15px;
  983. }
  984. </style>