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

stockOutOrderDetailPrint.vue 13KB

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