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

stockInOrderDetailPrint.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-row style="float:right;">
  6. <el-col :span="24">
  7. <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
  8. </el-col>
  9. </el-row>
  10. </div>
  11. <div class="app-container" style="background-color: white;">
  12. <div id="print_content">
  13. <div class="print_main_content">
  14. <div class="order_title_panl">
  15. <div style="font-size:22px;font-weight:bold;">{{ orgName }}</div>
  16. <span style="font-weight:500;font-size:18px;">耗材入库登记单</span>
  17. </div>
  18. <div style="text-align:right;margin-bottom:20px;font-size: 18px;">
  19. 打印时间:{{time_now}}
  20. </div>
  21. <div class="table_panel">
  22. <table class="table">
  23. <thead>
  24. <tr>
  25. <td style="line-height:18px;" width="80">耗材<br>名称</td>
  26. <td style="line-height:18px;" width="80">注册证号/批准文号/备案凭证号</td>
  27. <td style="line-height:18px;" width="80">规格<br>型号</td>
  28. <td style="line-height:18px;" width="80">生产<br>厂商</td>
  29. <td style="line-height:18px;" width="80">单位</td>
  30. <td style="line-height:18px;" width="80">进货价</td>
  31. <td style="line-height:18px;" width="80">入库<br>数量</td>
  32. <td style="line-height:18px;" width="60">总价</td>
  33. <td style="line-height:18px;" width="80">批号</td>
  34. <td style="line-height:18px;" width="120">生产日期</td>
  35. <td style="line-height:18px;" width="120">有效日期</td>
  36. <td style="line-height:18px;" width="60">质检<br>意见</td>
  37. <td style="line-height:18px;" width="60">验收<br>结论</td>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <tr v-for='(item,index) in WarehouseInfo.warehouseInfoDate' :key="index">
  42. <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getTypeNameOne(item.good_id)}}</span></td>
  43. <td style="line-height:18px;">{{ item.remark }}</td>
  44. <td style="line-height:18px;"><span v-if="item.good_id != 0">{{getSpecificationName(item.good_id)}}</span></td>
  45. <td style="line-height:18px;">{{ getManufacturer(item.manufacturer) }}</td>
  46. <td style="line-height:18px;"><span v-if="item.good_id!=0">{{getUnit(item.good_id)}}</span></td>
  47. <td style="line-height:18px;">{{item.price}}</td>
  48. <td style="line-height:18px;">{{item.warehousing_count}}</td>
  49. <td style="line-height:18px;">{{(item.warehousing_count*item.price).toFixed(2)}}</td>
  50. <td style="line-height:18px;">{{ item.number }}</td>
  51. <td style="line-height:18px;">{{ item.product_date | parseTime("{y}-{m}-{d}") }}</td>
  52. <td style="line-height:18px;">{{ item.expiry_date | parseTime("{y}-{m}-{d}") }}</td>
  53. <td style="line-height:18px;">正常<br>入库</td>
  54. <td style="line-height:18px;">合格</td>
  55. </tr>
  56. <tr>
  57. <td>合计</td>
  58. <td colspan="12" style="text-align:right;">{{allPrice.toFixed(2)}}</td>
  59. </tr>
  60. </tbody>
  61. </table>
  62. <div style="display:flex;margin-top:20px;float:right;">
  63. <div style="width:50px;">审批:</div><div style="width:100px;"></div>
  64. <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
  65. <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
  66. <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
  67. <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(this.WarehouseInfo.warehouse.creater) }}</div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  77. import {
  78. GetAllConfig,
  79. getWarehouseInfoList,
  80. getGoodInfoList
  81. } from "@/api/stock";
  82. import { fetchAllAdminUsers } from "@/api/doctor";
  83. import print from 'print-js'
  84. const moment = require('moment')
  85. export default {
  86. components:{
  87. BreadCrumb
  88. },
  89. data(){
  90. return{
  91. crumbs: [
  92. { path: false, name: '库存管理' },
  93. { path: false, name: '耗材管理' },
  94. { path: false, name: '入库单打印' },
  95. ],
  96. isEdit: 0,
  97. checked: false,
  98. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  99. goodType: [],
  100. goodInfo: [],
  101. manufacturer: [],
  102. dealer: [],
  103. Warehouse: {
  104. loading: false,
  105. warehouseDate: [],
  106. tableCurrentIndex: ""
  107. },
  108. WarehouseInfo: {
  109. loading: false,
  110. warehouseInfoDate: [],
  111. warehouse: {}
  112. },
  113. time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
  114. allPrice:0,
  115. page: 1,
  116. limit: 10000,
  117. keyword: "",
  118. is_use:"",
  119. good_kind:"",
  120. is_charge:"",
  121. list:[],
  122. orgName:'',
  123. orgId:'',
  124. adminUserOptions:[]
  125. }
  126. },
  127. methods:{
  128. printAction: function() {
  129. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 1px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 16px; padding: 10px 5px; white-space: pre-line;} .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
  130. printJS({
  131. printable: 'print_content',
  132. type: 'html',
  133. documentTitle: ' ',
  134. style: style,
  135. scanStyles: false
  136. })
  137. },
  138. GetConfigInfo: function() {
  139. GetAllConfig().then(response => {
  140. if (response.data.state == 0) {
  141. this.$message.error(response.data.msg);
  142. return false;
  143. } else {
  144. this.manufacturer = response.data.data.manufacturer;
  145. this.dealer = response.data.data.dealer;
  146. this.goodInfo = response.data.data.goodInfo;
  147. this.goodType = response.data.data.goodType;
  148. }
  149. });
  150. },
  151. GetOrderDetail: function(order_id) {
  152. const params = {
  153. id: order_id
  154. };
  155. getWarehouseInfoList(params).then(response => {
  156. if (response.data.state == 0) {
  157. this.$message.error(response.data.msg);
  158. return false;
  159. } else {
  160. var obj = ""
  161. for (let i = 0; i < response.data.data.info.length; i++) {
  162. this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
  163. }
  164. this.WarehouseInfo.warehouse = response.data.data.warehousing;
  165. var total_price = 0
  166. for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
  167. total_price += this.WarehouseInfo.warehouseInfoDate[i].warehousing_count * this.WarehouseInfo.warehouseInfoDate[i].price
  168. }
  169. this.allPrice = total_price
  170. console.log("total_price",total_price)
  171. console.log("数据222222222",this.WarehouseInfo.warehouseInfoDate)
  172. }
  173. });
  174. },
  175. getSpecificationName: function(id) {
  176. let name = "";
  177. for (let i = 0; i < this.goodInfo.length; i++) {
  178. if (this.goodInfo[i].id == id) {
  179. name = this.goodInfo[i].specification_name;
  180. }
  181. }
  182. return name;
  183. },
  184. getTypeName: function(id) {
  185. let name = "";
  186. for (let i = 0; i < this.goodType.length; i++) {
  187. if (this.goodType[i].id == id) {
  188. name = this.goodType[i].type_name;
  189. }
  190. }
  191. return name;
  192. },
  193. getTypeNameOne:function(id){
  194. let name = "";
  195. for (let i = 0; i < this.goodInfo.length; i++) {
  196. if (this.goodInfo[i].id == id) {
  197. name = this.goodInfo[i].good_name;
  198. }
  199. }
  200. return name;
  201. },
  202. getList() {
  203. this.goodInfo.loading = true
  204. let params = {
  205. page: this.page,
  206. limit: this.limit,
  207. keyword: this.keywords,
  208. is_use:this.is_use,
  209. good_kind:this.good_kind,
  210. is_charge: this.is_charge,
  211. }
  212. getGoodInfoList(params).then(response => {
  213. if (response.data.state == 0) {
  214. this.$message.error(response.data.msg)
  215. return false
  216. } else {
  217. this.list = []
  218. for (let i = 0; i < response.data.data.list.length; i++) {
  219. this.list.push(response.data.data.list[i])
  220. }
  221. console.log("list22222",this.list)
  222. }
  223. })
  224. },
  225. getUnit(id){
  226. var name = ""
  227. for(let i=0;i<this.list.length;i++){
  228. if(id == this.list[i].id){
  229. name = this.list[i].good_unit
  230. }
  231. }
  232. return this.getGoodUnit(name)
  233. },
  234. getGoodUnit(id){
  235. for (let i = 0; i <this.$store.getters.good_unit.length; i++ ){
  236. if(id == this.$store.getters.good_unit[i].id){
  237. return this.$store.getters.good_unit[i].name
  238. }
  239. }
  240. return ""
  241. },
  242. getManufacturer(id){
  243. let name = ''
  244. this.manufacturer.map(item => {
  245. if(item.id == id){
  246. name = item.manufacturer_name
  247. }
  248. })
  249. return name
  250. },
  251. fetchAllAdminUsers() {
  252. fetchAllAdminUsers().then(response => {
  253. console.log(response);
  254. if (response.data.state == 1) {
  255. this.adminUserOptions = response.data.data.users;
  256. var alen = this.adminUserOptions.length;
  257. for (let index = 0; index < alen; index++) {
  258. if (this.adminUserOptions[index].user_type == 2) {
  259. // this.doctorOptions.push(this.adminUserOptions[index]);
  260. }
  261. }
  262. }
  263. });
  264. },
  265. getXuserName(id) {
  266. if (id <= 0) {
  267. return "";
  268. }
  269. var name = "";
  270. if (
  271. this.adminUserOptions == null ||
  272. typeof this.adminUserOptions.length === "undefined"
  273. ) {
  274. return name;
  275. }
  276. var leng = this.adminUserOptions.length;
  277. if (leng == 0) {
  278. return name;
  279. }
  280. for (let index = 0; index < leng; index++) {
  281. if (this.adminUserOptions[index].id == id) {
  282. name = this.adminUserOptions[index].name;
  283. break;
  284. }
  285. }
  286. return name;
  287. },
  288. },
  289. created(){
  290. this.orgName = this.$store.getters.xt_user.org.org_name;
  291. this.orgId = this.$store.getters.xt_user.org.id;
  292. const order_id = this.$route.query.id;
  293. this.fetchAllAdminUsers()
  294. this.GetConfigInfo();
  295. this.GetOrderDetail(order_id);
  296. this.getList()
  297. }
  298. }
  299. </script>
  300. <style rel="stylesheet/scss" lang="scss" scoped>
  301. .print_main_content {
  302. background-color: white;
  303. max-width: 1500px;
  304. margin: 0 auto;
  305. padding: 0 0 20px 0;
  306. .order_title_panl {
  307. text-align: center;
  308. .main_title {
  309. font-size: 18px;
  310. line-height: 40px;
  311. font-weight: 500;
  312. }
  313. }
  314. .table_panel {
  315. .table {
  316. width: 100%;
  317. border: 1px solid;
  318. border-collapse: collapse;
  319. padding: 2px;
  320. thead {
  321. tr {
  322. td {
  323. border: 1px solid;
  324. text-align: center;
  325. font-size: 18px;
  326. padding: 1px 5px;
  327. }
  328. }
  329. }
  330. tbody {
  331. tr {
  332. td {
  333. border: 1px solid;
  334. text-align: center;
  335. font-size: 18px;
  336. padding: 10px 5px;
  337. white-space: pre-line;
  338. .proj {
  339. padding: 5px 0;
  340. text-align: left;
  341. .proj_title {
  342. font-size: 16px;
  343. font-weight: 500;
  344. line-height: 25px;
  345. }
  346. .proj_item {
  347. font-size: 15px;
  348. line-height: 20px;
  349. .zone_name {
  350. font-weight: 500;
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. </style>