Просмотр исходного кода

Merge branch '2022-10-17_vue_schedule_branch' of http://git.shengws.com/csx/Vue_New into 20220812

XMLWAN 1 год назад
Родитель
Сommit
b405806101

+ 8 - 0
src/api/stock.js Просмотреть файл

@@ -1072,3 +1072,11 @@ export function getwarehouseinfolist(params) {
1072 1072
     params: params
1073 1073
   })
1074 1074
 }
1075
+
1076
+export function getNewGoodWarehouseInfo(params) {
1077
+  return request({
1078
+    url: '/api/stock/getnewgoodwarehouseinfo',
1079
+    method: 'get',
1080
+    params: params
1081
+  })
1082
+}

+ 11 - 0
src/router/modules/stock.js Просмотреть файл

@@ -259,6 +259,17 @@ export default {
259 259
         noCache: true
260 260
       }
261 261
     },
262
+    {
263
+      path: '/stock/print/one',
264
+      component: () => import('@/xt_pages/stock/detail/printOne'),
265
+      hidden: true,
266
+      is_menu: false,
267
+      name: 'stock_print_one',
268
+      meta: {
269
+        title: '库存打印',
270
+        noCache: true
271
+      }
272
+    },
262 273
     {
263 274
       path: '/stock/user/detail',
264 275
       component: () => import('@/xt_pages/stock/stockUserDetail'),

+ 329 - 0
src/xt_pages/stock/detail/printOne.vue Просмотреть файл

@@ -0,0 +1,329 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" 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 class="order-yy-name">{{orgname}}</div>
12
+          <div class="order-title" v-if="type == 1">入库单</div>
13
+          <div style="float: left;margin-bottom: 10px;">{{getDateOne()}}</div>
14
+          <div style="float: right;margin-bottom: 10px;">{{getDateTwo()}}</div>
15
+
16
+
17
+
18
+          <table class="print-table" border="1">
19
+            <tbody>
20
+            <tr>
21
+              <td style="line-height: 50px" width="50">序号</td>
22
+              <td style="line-height: 50px" width="200">耗材名称</td>
23
+              <td style="line-height: 50px" width="200">规格型号</td>
24
+              <td style="line-height: 50px" width="80">数量</td>
25
+              <td style="line-height: 50px" width="50">单位</td>
26
+
27
+              <td style="line-height:50px" width="80">
28
+                进货价
29
+              </td>
30
+              <td style="line-height: 50px" width="80">总价</td>
31
+              <td style="line-height: 50px" width="80">备 注</td>
32
+            </tr>
33
+
34
+            <tr v-for="(item,index) in stockDatas" :key="item.id">
35
+              <td style="line-height: 50px">&nbsp;
36
+                {{index+1}}
37
+              </td>
38
+              <td style="line-height: 50px">
39
+              
40
+              </td>
41
+              <td style="line-height: 50px">
42
+               
43
+              </td>
44
+
45
+              <td style="line-height: 50px">
46
+               
47
+              </td>
48
+              <td style="line-height: 50px">
49
+               
50
+              </td>
51
+              <td style="line-height:50px">
52
+               
53
+              </td>
54
+              <td style="line-height:50px">
55
+               
56
+              </td>
57
+              <td style="line-height: 50px">
58
+                
59
+              </td>
60
+            </tr>
61
+            </tbody>
62
+          </table>
63
+          <table class="print-table" border="1">
64
+            <tr>
65
+              <td style="line-height: 50px"  width="50">合计</td>
66
+              <td style="line-height: 50px"  width="200"></td>
67
+              <td style="line-height: 50px"  width="200"></td>
68
+              <td style="line-height: 50px"  width="80"></td>
69
+              <td style="line-height: 50px"  width="50"></td>
70
+              <td style="line-height: 50px"   width="80"></td>
71
+              <td style="line-height: 50px"  width="80">
72
+              
73
+              </td>
74
+              <td style="line-height: 50px" width="80">
75
+
76
+              </td>
77
+            </tr>
78
+          </table>
79
+
80
+          <div style="display:flex;margin-top:20px;float:right;">
81
+            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
82
+            <div style="width:80px;">药材主任:</div><div style="width:100px;"></div>
83
+            <div style="width:50px;">会计:</div><div style="width:100px;"></div>
84
+            <div style="width:50px;">审核:</div><div style="width:100px;"></div>
85
+            <div style="width:70px;">制单人:</div><div style="width:100px;"></div>
86
+          </div>
87
+
88
+        </div>
89
+
90
+      </div>
91
+
92
+    </div>
93
+  </div>
94
+
95
+</template>
96
+
97
+<script>
98
+  import { getNewGoodWarehouseInfo } from '@/api/stock'
99
+  import { getDataConfig } from '@/utils/data'
100
+  import { jsGetAge, uParseTime } from '@/utils/tools'
101
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
102
+  import print from 'print-js'
103
+
104
+  export default {
105
+    name: 'dialysisPrintOrder',
106
+    components: {
107
+      BreadCrumb
108
+
109
+    },
110
+    data() {
111
+      return {
112
+        crumbs: [
113
+          { path: false, name: '出入库明细' },
114
+          { path: false, name: '打印单' }
115
+        ],
116
+        loading: false,
117
+        orgname: '',
118
+        queryParams: {
119
+          start_time: this.$route.query.start_time,
120
+          end_time: this.$route.query.end_time,
121
+          type: this.$route.query.type,
122
+          limit:this.$route.query.limit,
123
+          page:this.$route.query.page,
124
+          storehouse_id:this.$route.query.storehouse_id,
125
+          keywords:this.$route.query.keywords
126
+        },
127
+        totalPrice: 0,
128
+        stockDatas: [],
129
+        goodUnit: [],
130
+        type: this.$route.query.type,
131
+        start_time: this.$route.query.start_time,
132
+        end_time: this.$route.query.end_time,
133
+        stockTotal:[],
134
+        wareOutInfo:[],
135
+        org_id:this.$store.getters.xt_user.org.id,
136
+        informationList:[],
137
+        wareOutList:[],
138
+      }
139
+    },
140
+    methods:{
141
+      getDateOne(){
142
+
143
+        return "入库日期: "+this.start_time +"~"+this.end_time
144
+        
145
+
146
+      },
147
+      getDateTwo(){
148
+        var ptime = Math.round(new Date().getTime() / 1000)
149
+        return "打印单日期:"+uParseTime(ptime, '{y}-{m}-{d}')
150
+      },
151
+      getTime(value, temp) {
152
+        if (value == 0) {
153
+          return ''
154
+        }
155
+        if (value != undefined) {
156
+          return uParseTime(value, temp)
157
+        }
158
+        return ''
159
+      },
160
+      getlist(){
161
+        console.log("query23323223wo",this.queryParams)
162
+        getNewGoodWarehouseInfo(this.queryParams).then(response=>{
163
+
164
+        })
165
+      }
166
+    },
167
+    created() {
168
+      var xtuser = this.$store.getters.xt_user
169
+      this.orgname = xtuser.org.org_name
170
+      this.goodUnit = this.$store.getters.good_unit
171
+      this.getlist()
172
+    }
173
+
174
+  }
175
+</script>
176
+
177
+<style>
178
+  .dialysis-print-order {
179
+    width: 960px;
180
+    margin: 0 auto
181
+  }
182
+
183
+  .dialysis-print-order .order-yy-name {
184
+    margin: auto;
185
+    text-align: center;
186
+    font-size: 20px;
187
+    letter-spacing: 5px;
188
+  }
189
+
190
+  .dialysis-print-order .order-title {
191
+    margin: auto;
192
+    font-weight: 600;
193
+    text-align: center;
194
+    font-size: 22px;
195
+    padding: 10px 20px 20px 20px;
196
+  }
197
+
198
+  .dialysis-print-order .table-box {
199
+
200
+    width: 100%;
201
+    line-height: 23px;
202
+    font-size: 14px;
203
+  }
204
+
205
+  .dialysis-print-order .print-table {
206
+    width: 100%;
207
+    text-align: center;
208
+    border-collapse: collapse;
209
+    line-height: 40px;
210
+    font-size: 14px;
211
+  }
212
+
213
+  .dialysis-print-order .print-table-no {
214
+    width: 100%;
215
+    text-align: center;
216
+    border-collapse: collapse;
217
+    font-size: 14px;
218
+  }
219
+
220
+  .dialysis-print-order .under-line {
221
+    border-bottom: 1px solid #999;
222
+    width: 95%;
223
+    text-align: center;
224
+    margin-left: 2px;
225
+
226
+
227
+  }
228
+
229
+  .dialysis-print-order .title-box {
230
+    text-align: center;
231
+    font-size: 16px;
232
+  }
233
+
234
+  .dialysis-print-order .radio-lebel-box {
235
+    font-weight: 400;
236
+    cursor: pointer;
237
+  }
238
+
239
+  .dialysis-print-order .radio-no {
240
+    opacity: 0;
241
+    outline: none;
242
+    position: absolute;
243
+    margin: 0;
244
+    width: 0;
245
+    height: 0;
246
+    z-index: -1;
247
+  }
248
+
249
+  .dialysis-print-order .radio-inner {
250
+    white-space: nowrap;
251
+    cursor: pointer;
252
+    outline: none;
253
+    display: inline-block;
254
+    line-height: 1;
255
+    position: relative;
256
+    vertical-align: middle;
257
+  }
258
+
259
+  .dialysis-print-order .radio-fang {
260
+    display: inline-block;
261
+    position: relative;
262
+    border: 1px solid #000;
263
+    box-sizing: border-box;
264
+    width: 14px;
265
+    height: 14px;
266
+    background-color: #fff;
267
+    z-index: 1;
268
+    transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
269
+  }
270
+
271
+  .dialysis-print-order .is-checked-radio::after {
272
+    content: "√";
273
+    font-size: 15px;
274
+  }
275
+
276
+
277
+  .dialysis-print-order .print-table-no tr td {
278
+    padding: 8px 5px;
279
+    line-height: 25px;
280
+  }
281
+
282
+  .dialysis-print-order .print-table tr td {
283
+    padding: 1px 1px;
284
+    /*line-height: 25px;*/
285
+  }
286
+
287
+  .es-img {
288
+    height: 25px;
289
+  }
290
+
291
+  .advice-name {
292
+    text-align: left;
293
+  }
294
+
295
+  .advice-children {
296
+    display: flex;
297
+  }
298
+
299
+  .title-box-pro {
300
+    border: 0 #fff;
301
+    line-height: 25px;
302
+    height: 25px;
303
+    text-align: left;
304
+    padding-left: 10px !important;
305
+  }
306
+
307
+  .title-box-pro-tr {
308
+    border: 0 #fff;
309
+  }
310
+
311
+  .text-align-left {
312
+    text-align: left !important;
313
+    padding-left: 10px !important;
314
+    font-size: 14px !important;
315
+    line-height: 25px;
316
+  }
317
+
318
+  .print-table-tr-new td {
319
+    line-height: 20px !important;
320
+  }
321
+
322
+  .border-top-solid {
323
+    border: solid 1px #000;
324
+  }
325
+
326
+  .print-template-two tr {
327
+    line-height: 30px;
328
+  }
329
+</style>

+ 23 - 1
src/xt_pages/stock/detail/stockInDetail.vue Просмотреть файл

@@ -636,9 +636,13 @@ export default {
636 636
       return (r1 * r2) / Math.pow(10, m);
637 637
     },
638 638
     PrintAction: function() {
639
+
640
+      
639 641
       window.sessionStorage.setItem('start_time',this.start_time)
640 642
       window.sessionStorage.setItem('end_time',this.end_time)
641
-      this.$router.push({
643
+
644
+      if(this.org_id!=9671){
645
+        this.$router.push({
642 646
         path: "/stock/print",
643 647
         query: {
644 648
           type: 1,
@@ -649,6 +653,24 @@ export default {
649 653
           keywords:this.$router.keywords,
650 654
         }
651 655
       });
656
+      }
657
+      if(this.org_id == 9671){
658
+        console.log("进来")
659
+        this.$router.push({
660
+        path: "/stock/print/one",
661
+        query: {
662
+          type: 1,
663
+          start_time: this.start_time,
664
+          end_time: this.end_time,
665
+          limit:this.limit,
666
+          page:this.page,
667
+          keywords:searchKey,
668
+          storehouse_id:this.storehouse_id,
669
+          
670
+        }
671
+       });
672
+      }
673
+     
652 674
     },
653 675
    getPrintStockGood(){
654 676
      const params = {