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

drugStockInOrderDetailPrint.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. <el-button size="small" icon="el-icon-printer" @click="printThisPage" type="primary">打印
  6. </el-button>
  7. </div>
  8. <div class="app-container ">
  9. <div id="dialysis-print-box">
  10. <div class="dialysis-print-order">
  11. <div style="font-size:22px;font-weight:bold;text-align:center;">{{ orgName }}</div>
  12. <div class="order-title" style="font-size:18px;padding-top:0;">药品入库登记表</div>
  13. <div style="float: left;margin-bottom: 1px;">单据编号:{{WarehouseInfo.warehouse.warehousing_order}}</div>
  14. <div style="float: right;margin-bottom: 1px;">{{getDateTwo()}}</div>
  15. <table class="print-table" border="1">
  16. <tbody>
  17. <tr>
  18. <td width="80">药品名称</td>
  19. <td style="line-height:18px;" width="80">注册证号/批准文号/备案凭证号</td>
  20. <td style="line-height:18px;" width="100">规格<br>型号</td>
  21. <td style="line-height:18px;" width="80">生产<br>厂商</td>
  22. <td style="line-height:18px;" width="80">单位</td>
  23. <td style="line-height:18px;" width="80">进货价</td>
  24. <td style="line-height:18px;" width="80">入库<br>数量</td>
  25. <td style="line-height:18px;" width="60">总价</td>
  26. <td style="line-height:18px;" width="80">批号</td>
  27. <td style="line-height:18px;" width="120">生产日期</td>
  28. <td style="line-height:18px;" width="120">有效日期</td>
  29. <td style="line-height:18px;" width="60">质检<br>意见</td>
  30. <td style="line-height:18px;" width="60">验收<br>结论</td>
  31. </tr>
  32. <tr v-for="(item,index) in WarehouseInfo.warehouseInfoDate" :key="item.id">
  33. <td style="line-height: 18px">
  34. <span v-if="item.drug_id != 0">{{item.drug.drug_name}}</span>
  35. </td>
  36. <td style="line-height: 18px">{{ item.remark }}</td>
  37. <td style="line-height: 18px">
  38. <span v-if="item.drug_id != 0">{{item.drug.dose}}{{item.drug.dose_unit}}*{{item.drug.min_number}}{{item.drug.min_unit}}/{{item.drug.max_unit}}</span>
  39. </td>
  40. <!-- <td style="line-height: 18px">{{ getManufacturer(item.manufacturer) }}</td> -->
  41. <td style="line-height: 18px">{{ getManufacturer(item.drug.id) }}</td>
  42. <td style="line-height: 18px">
  43. <span>{{item.drug.max_unit}}</span>
  44. </td>
  45. <td style="line-height:18px">
  46. {{item.price}}
  47. </td>
  48. <td style="line-height: 18px">
  49. <span>{{ item.warehousing_count }}</span>
  50. </td>
  51. <td style="line-height:18px">
  52. <span>{{(item.warehousing_count * item.price).toFixed(2)}}</span>
  53. </td>
  54. <td style="line-height:18px">{{ item.number }}</td>
  55. <td style="line-height:18px">{{ getTime(item.product_date)}}</td>
  56. <td style="line-height:18px">{{ getTime(item.expiry_date)}}</td>
  57. <td style="line-height:18px">正常<br>入库</td>
  58. <td style="line-height:18px">合格</td>
  59. </tr>
  60. <tr>
  61. <td>合计</td>
  62. <td colspan="12" style="text-align:right;">{{allPrice.toFixed(2)}}</td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <div style="display:flex;margin-top:1px;float:right;" v-if="orgId == 10024">
  67. <div style="width:50px;">审批:</div><div style="width:100px;"></div>
  68. <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
  69. <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
  70. <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
  71. </div>
  72. <div style="display:flex;margin-top:1px;float:right;" v-if="orgId !=10024">
  73. <div style="width:50px;">审批:</div><div style="width:100px;"></div>
  74. <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
  75. <div style="width:50px;">会计:</div><div style="width:100px;"></div>
  76. <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </template>
  83. <script>
  84. import { GetAllConfig,getPrintStockGood } from '@/api/stock'
  85. import { getDataConfig } from '@/utils/data'
  86. import { jsGetAge, uParseTime } from '@/utils/tools'
  87. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  88. import print from 'print-js'
  89. import {getDrugWarehouseInfoList} from "@/api/drug/drug_stock";
  90. import {getBaseDrugLibList} from '@/api/data'
  91. import { fetchAllAdminUsers } from "@/api/doctor";
  92. export default {
  93. name: 'dialysisPrintOrder',
  94. components: {
  95. BreadCrumb
  96. },
  97. data() {
  98. return {
  99. crumbs: [
  100. { path: false, name: '出入库明细' },
  101. { path: false, name: '打印单' }
  102. ],
  103. isEdit: 0,
  104. checked: false,
  105. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  106. goodType: [],
  107. goodInfo: [],
  108. manufacturer: [],
  109. dealer: [],
  110. Warehouse: {
  111. loading: false,
  112. warehouseDate: [],
  113. tableCurrentIndex: ""
  114. },
  115. WarehouseInfo: {
  116. loading: false,
  117. warehouseInfoDate: [],
  118. warehouse: {}
  119. },
  120. allPrice:0,
  121. start_time:"",
  122. end_time:"",
  123. list:[],
  124. is_use:"",
  125. is_charge:"",
  126. is_inject:"",
  127. page:1,
  128. limit:10000,
  129. keywords:"",
  130. orgName:'',
  131. orgId:'',
  132. adminUserOptions:[]
  133. }
  134. },
  135. methods: {
  136. getTime(val) {
  137. if(val < 0){
  138. return ""
  139. }
  140. if(val == ""){
  141. return ""
  142. }else {
  143. return uParseTime(val, '{y}-{m}-{d}')
  144. }
  145. },
  146. getDateOne(){
  147. return "入库日期: "+this.start_time +"~"+this.end_time
  148. },
  149. getDateTwo(){
  150. var ptime = Math.round(new Date().getTime() / 1000)
  151. return "打印单日期:"+uParseTime(ptime, '{y}-{m}-{d}')
  152. },
  153. getTime(value, temp) {
  154. if (value == 0) {
  155. return ''
  156. }
  157. if (value != undefined) {
  158. return uParseTime(value, temp)
  159. }
  160. return ''
  161. },
  162. printThisPage() {
  163. var ptime = Math.round(new Date().getTime() / 1000)
  164. this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
  165. const style = '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px} .dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 1px 5px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}'
  166. printJS({
  167. printable: 'dialysis-print-box',
  168. type: 'html',
  169. style: style,
  170. scanStyles: false
  171. })
  172. },
  173. getUnit(id){
  174. var name = ""
  175. for(let i=0;i<this.goodUnit.length;i++){
  176. if(this.goodUnit[i].id == id){
  177. name = this.goodUnit[i].name
  178. }
  179. }
  180. return name
  181. },
  182. GetOrderDetail: function(order_id) {
  183. const params = {
  184. id: order_id
  185. };
  186. getDrugWarehouseInfoList(params).then(response => {
  187. if (response.data.state == 0) {
  188. this.$message.error(response.data.msg);
  189. return false;
  190. } else {
  191. for (let i = 0; i < response.data.data.info.length; i++) {
  192. this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
  193. }
  194. console.log("数据源",this.WarehouseInfo.warehouseInfoDate)
  195. var total_price = 0
  196. for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
  197. total_price += this.WarehouseInfo.warehouseInfoDate[i].warehousing_count * this.WarehouseInfo.warehouseInfoDate[i].price
  198. }
  199. console.log("total_price",total_price)
  200. this.allPrice = total_price
  201. this.WarehouseInfo.warehouse = response.data.data.warehousing;
  202. }
  203. });
  204. },
  205. getList() {
  206. let params = {
  207. page: this.page,
  208. limit: this.limit,
  209. keyword: this.keywords,
  210. is_use: this.is_use,
  211. is_charge: this.is_charge,
  212. is_inject: this.is_inject
  213. }
  214. getBaseDrugLibList(params).then(response => {
  215. if (response.data.state == 0) {
  216. this.$message.error(response.data.msg)
  217. return false
  218. } else {
  219. this.total = response.data.data.total
  220. this.list = []
  221. for (let i = 0; i < response.data.data.list.length; i++) {
  222. this.list.push(response.data.data.list[i])
  223. }
  224. for(let j=0;j<this.list.length;j++){
  225. this.list[j].manufacturer_name = ""
  226. }
  227. for(let i=0;i<this.list.length;i++){
  228. for(let j=0;j<this.manufacturer.length;j++){
  229. if(this.list[i].manufacturer == this.manufacturer[j].id){
  230. this.list[i].manufacturer_name = this.manufacturer[j].manufacturer_name
  231. }
  232. }
  233. }
  234. console.log("list222222",this.list)
  235. }
  236. })
  237. },
  238. getUnit(id){
  239. var name = ""
  240. for(let i=0;i<this.list.length;i++){
  241. if(this.list[i].id == id){
  242. name = this.list[i].min_unit
  243. }
  244. }
  245. return name
  246. },
  247. // getManufacturer(id){
  248. // let name = ''
  249. // this.manufacturer.map(item => {
  250. // if(item.id == id){
  251. // name = item.manufacturer_name
  252. // }
  253. // })
  254. // return name
  255. // },
  256. getManufacturer(id){
  257. let name = ""
  258. for(let i=0;i<this.list.length;i++){
  259. if(id == this.list[i].id){
  260. name = this.list[i].manufacturer_name
  261. }
  262. }
  263. return name
  264. },
  265. GetConfigInfo: function() {
  266. GetAllConfig().then(response => {
  267. if (response.data.state == 0) {
  268. this.$message.error(response.data.msg);
  269. return false;
  270. } else {
  271. this.manufacturer = response.data.data.manufacturer;
  272. this.getList()
  273. }
  274. });
  275. },
  276. fetchAllAdminUsers() {
  277. fetchAllAdminUsers().then(response => {
  278. console.log(response);
  279. if (response.data.state == 1) {
  280. this.adminUserOptions = response.data.data.users;
  281. var alen = this.adminUserOptions.length;
  282. for (let index = 0; index < alen; index++) {
  283. if (this.adminUserOptions[index].user_type == 2) {
  284. // this.doctorOptions.push(this.adminUserOptions[index]);
  285. }
  286. }
  287. }
  288. });
  289. },
  290. getXuserName(id) {
  291. if (id <= 0) {
  292. return "";
  293. }
  294. var name = "";
  295. if (
  296. this.adminUserOptions == null ||
  297. typeof this.adminUserOptions.length === "undefined"
  298. ) {
  299. return name;
  300. }
  301. var leng = this.adminUserOptions.length;
  302. if (leng == 0) {
  303. return name;
  304. }
  305. for (let index = 0; index < leng; index++) {
  306. if (this.adminUserOptions[index].id == id) {
  307. name = this.adminUserOptions[index].name;
  308. break;
  309. }
  310. }
  311. return name;
  312. },
  313. },
  314. created() {
  315. this.orgName = this.$store.getters.xt_user.org.org_name;
  316. this.orgId = this.$store.getters.xt_user.org.id;
  317. this.fetchAllAdminUsers()
  318. this.GetConfigInfo()
  319. const order_id = this.$route.query.id;
  320. this.GetOrderDetail(order_id);
  321. this.getList()
  322. }
  323. }
  324. </script>
  325. <style>
  326. .dialysis-print-order {
  327. width: 960px;
  328. margin: 0 auto
  329. }
  330. .dialysis-print-order .order-yy-name {
  331. margin: auto;
  332. text-align: center;
  333. font-size: 20px;
  334. letter-spacing: 5px;
  335. }
  336. .dialysis-print-order .order-title {
  337. margin: auto;
  338. font-weight: 600;
  339. text-align: center;
  340. font-size: 22px;
  341. padding: 10px 20px 20px 20px;
  342. }
  343. .dialysis-print-order .table-box {
  344. width: 100%;
  345. line-height: 23px;
  346. font-size: 14px;
  347. }
  348. .dialysis-print-order .print-table {
  349. width: 100%;
  350. text-align: center;
  351. border-collapse: collapse;
  352. line-height: 40px;
  353. font-size: 14px;
  354. }
  355. .dialysis-print-order .print-table-no {
  356. width: 100%;
  357. text-align: center;
  358. border-collapse: collapse;
  359. font-size: 14px;
  360. }
  361. .dialysis-print-order .under-line {
  362. border-bottom: 1px solid #999;
  363. width: 95%;
  364. text-align: center;
  365. margin-left: 2px;
  366. }
  367. .dialysis-print-order .title-box {
  368. text-align: center;
  369. font-size: 16px;
  370. }
  371. .dialysis-print-order .radio-lebel-box {
  372. font-weight: 400;
  373. cursor: pointer;
  374. }
  375. .dialysis-print-order .radio-no {
  376. opacity: 0;
  377. outline: none;
  378. position: absolute;
  379. margin: 0;
  380. width: 0;
  381. height: 0;
  382. z-index: -1;
  383. }
  384. .dialysis-print-order .radio-inner {
  385. white-space: nowrap;
  386. cursor: pointer;
  387. outline: none;
  388. display: inline-block;
  389. line-height: 1;
  390. position: relative;
  391. vertical-align: middle;
  392. }
  393. .dialysis-print-order .radio-fang {
  394. display: inline-block;
  395. position: relative;
  396. border: 1px solid #000;
  397. box-sizing: border-box;
  398. width: 14px;
  399. height: 14px;
  400. background-color: #fff;
  401. z-index: 1;
  402. transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
  403. }
  404. .dialysis-print-order .is-checked-radio::after {
  405. content: "√";
  406. font-size: 15px;
  407. }
  408. .dialysis-print-order .print-table-no tr td {
  409. padding: 8px 5px;
  410. line-height: 25px;
  411. }
  412. .dialysis-print-order .print-table tr td {
  413. padding: 1px 1px;
  414. /*line-height: 25px;*/
  415. }
  416. .es-img {
  417. height: 25px;
  418. }
  419. .advice-name {
  420. text-align: left;
  421. }
  422. .advice-children {
  423. display: flex;
  424. }
  425. .title-box-pro {
  426. border: 0 #fff;
  427. line-height: 25px;
  428. height: 25px;
  429. text-align: left;
  430. padding-left: 10px !important;
  431. }
  432. .title-box-pro-tr {
  433. border: 0 #fff;
  434. }
  435. .text-align-left {
  436. text-align: left !important;
  437. padding-left: 10px !important;
  438. font-size: 14px !important;
  439. line-height: 25px;
  440. }
  441. .print-table-tr-new td {
  442. line-height: 20px !important;
  443. }
  444. .border-top-solid {
  445. border: solid 1px #000;
  446. }
  447. .print-template-two tr {
  448. line-height: 30px;
  449. }
  450. </style>