mainqaq před 3 roky
rodič
revize
399b162589

+ 0 - 509
src/xt_pages/supply/components/goodOrderPrint.vue Zobrazit soubor

@@ -1,509 +0,0 @@
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
8
-            size="small"
9
-            icon="el-icon-printer"
10
-            type="primary"
11
-            @click="printAction"
12
-            >打印</el-button
13
-          >
14
-        </el-col>
15
-      </el-row>
16
-    </div>
17
-    <div class="app-container" style="background-color: white">
18
-      <div id="print_content">
19
-        <div class="print_main_content">
20
-          <div class="order_title_panl">
21
-            <div style="font-size: 22px; font-weight: bold">{{ orgName }}</div>
22
-            <span style="font-weight: 500; font-size: 18px">采购单</span>
23
-          </div>
24
-          <div style="display: flex; justify-content: space-between">
25
-            <div style="text-align: left; margin-bottom: 1px; font-size: 18px">
26
-              供应商:
27
-                {{ getSupplyName(supplier_id) }}
28
-            </div>
29
-            <div style="margin-bottom: 1px; font-size: 18px">
30
-             单据日期:{{ getTimes(document_date) }}
31
-            </div>
32
-            <div style="margin-bottom: 1px; font-size: 18px">
33
-              单据编号:
34
-              {{ good_number }}
35
-            </div>
36
-            <div style="margin-bottom: 1px; font-size: 18px">币别:RMB</div>
37
-          </div>
38
-
39
-          <div class="table_panel">
40
-            <table class="table">
41
-              <thead>
42
-                <tr>
43
-                  <td style="line-height: 18px" width="80">序号</td>
44
-                  <td style="line-height: 18px" width="80">商品</td>
45
-                  <td style="line-height: 18px" width="80">单位</td>
46
-                  <td style="line-height: 18px" width="80">数量</td>
47
-                  <td style="line-height: 18px" width="80">采购单价</td>
48
-                  <td style="line-height: 18px" width="60">采购金额</td>
49
-                </tr>
50
-              </thead>
51
-              <tbody>
52
-                <tr v-for="(item, index) in tableList" :key="index">
53
-                  <td style="line-height: 18px">
54
-                    <span>{{ index + 1 }}</span>
55
-                  </td>
56
-                  <td style="line-height: 18px">
57
-                    <span>{{ item.name }}</span>
58
-                  </td>
59
-                  <td style="line-height: 18px">
60
-                   <span>{{ item.supply_unit }}</span>
61
-                  </td>
62
-                  <td style="line-height: 18px">
63
-                    <span>{{ item.count }}</span>
64
-                  </td>
65
-                  <td style="line-height: 18px">
66
-                    <span>{{ item.price }}</span>
67
-                  </td>
68
-                  <td style="line-height: 18px">
69
-                    <span>{{(item.count * item.price).toFixed(2)}}</span>
70
-                  </td>
71
-                </tr>
72
-                <tr>
73
-                  <td colspan="3" style="line-height: 18px">合计</td>
74
-                  <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
75
-                  <td colspan="1" style="line-height: 18px"></td>
76
-                  <td style="line-height: 18px">{{getAllPriceOne()}}</td>
77
-                </tr>
78
-                 <tr>
79
-                  <td colspan="9" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
80
-                </tr>
81
-              </tbody>
82
-            </table>
83
-          </div>
84
-          <div
85
-            style="
86
-              width: 100%;
87
-              display: flex;
88
-              flex: 1;
89
-              justify-content: flex-start;
90
-              flex-wrap: wrap;
91
-            "
92
-          >
93
-            <div
94
-              style="
95
-                width: 25%;
96
-                text-align: left;
97
-                margin-bottom: 1px;
98
-                font-size: 18px;
99
-              "
100
-            >
101
-              优惠率:<span v-if="rate_of_concession>0">{{rate_of_concession}}%</span>
102
-            </div>
103
-            <div
104
-              style="
105
-                width: 25%;
106
-                text-align: left;
107
-                margin-bottom: 1px;
108
-                font-size: 18px;
109
-              "
110
-            >
111
-              优惠金额:<span v-if="discount_amount>0">{{discount_amount}}</span>
112
-            </div>
113
-            <div
114
-              style="
115
-                width: 25%;
116
-                text-align: left;
117
-                margin-bottom: 1px;
118
-                font-size: 18px;
119
-              "
120
-            >
121
-              本次付款:<span v-if="payment>0">{{payment}}</span>
122
-            </div>
123
-            <div
124
-              style="
125
-                width: 25%;
126
-                text-align: left;
127
-                margin-bottom: 1px;
128
-                font-size: 18px;
129
-              "
130
-            >
131
-              本次欠款:<span v-if="arrearage>0">{{arrearage}}</span>
132
-            </div>
133
-            <div
134
-              style="
135
-                width: 100%;
136
-                text-align: left;
137
-                margin-bottom: 1px;
138
-                font-size: 18px;
139
-              "
140
-            >
141
-              备注:{{return_remark}}
142
-            </div>
143
-            <div
144
-              style="
145
-                width: 25%;
146
-                text-align: left;
147
-                margin-bottom: 1px;
148
-                font-size: 18px;
149
-              "
150
-            >
151
-              制单人:{{getXuserName(creater)}}
152
-            </div>
153
-            <div
154
-              style="
155
-                width: 25%;
156
-                text-align: left;
157
-                margin-bottom: 1px;
158
-                font-size: 18px;
159
-              "
160
-            >
161
-              收货人签字:
162
-            </div>
163
-            <div
164
-              style="
165
-                width: 25%;
166
-                text-align: left;
167
-                margin-bottom: 1px;
168
-                font-size: 18px;
169
-              "
170
-            >
171
-              供应商签字:
172
-            </div>
173
-          </div>
174
-     
175
-        </div>
176
-      </div>
177
-    </div>
178
-  </div>
179
-</template>
180
-
181
-<script>
182
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
183
-
184
-import { fetchAllAdminUsers } from "@/api/doctor";
185
-import { getGoodOrderDetail } from "@/api/supply";
186
-import print from "print-js";
187
-import { getLodop } from "@/assets/LodopFuncs";
188
-const moment = require("moment");
189
-import { uParseTime } from "@/utils/tools";
190
-export default {
191
-  components: {
192
-    BreadCrumb,
193
-  },
194
-  data() {
195
-    return {
196
-      size: "medium ",
197
-      crumbs: [
198
-        { path: false, name: "库存管理" },
199
-        { path: false, name: "耗材管理" },
200
-        { path: false, name: "入库单打印" },
201
-      ],
202
-      isEdit: 0,
203
-      checked: false,
204
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
205
-      time_now: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
206
-      orgName: "",
207
-      orgId: "",
208
-      adminUserOptions: [],
209
-      tableList: [],
210
-      good_number: "",
211
-      id: "",
212
-      supplier_id: "",
213
-      rate_of_concession: "",
214
-      discount_amount: "",
215
-      supplyList: [],
216
-      document_date: "",
217
-      warehouse_out_id:"",
218
-      return_remark: "",
219
-      warehousing_id: 0,
220
-      number: "",
221
-      drugList: [],
222
-      goodList: [],
223
-      arrearage:"",
224
-      payment:"",
225
-      creater:"",
226
-
227
-    };
228
-  },
229
-  methods: {
230
-    printAction: function () {
231
-      const style =
232
-        "@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: 14px; padding: 1px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 12px; 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; } }";
233
-      printJS({
234
-        printable: "print_content",
235
-        type: "html",
236
-        documentTitle: "  ",
237
-        style: style,
238
-        scanStyles: false,
239
-      });
240
-    },
241
-    // 打印功能
242
-    btnClickPrint: function () {
243
-      let LODOP = getLodop(); //调用getLodop获取LODOP对象
244
-      LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_整页缩放打印输出");
245
-
246
-      LODOP.ADD_PRINT_BARCODE(15, 15, 300, 300, "QRCode", "xxxxxxxxxxxxx");
247
-      LODOP.SET_PRINT_STYLEA(0, "Stretch", 1); //(可变形)扩展缩放模式
248
-      LODOP.PREVIEW(); //预览(预览打印无脚标)
249
-      // LODOP.PRINT();  //打印
250
-      LODOP.RINT_DESIGN();
251
-    },
252
-
253
-    getTime(val) {
254
-      if (val < 0) {
255
-        return "";
256
-      }
257
-      if (val == "") {
258
-        return "";
259
-      } else {
260
-        return uParseTime(val, "{y}-{m}-{d}");
261
-      }
262
-    },
263
-    fetchAllAdminUsers() {
264
-      fetchAllAdminUsers().then((response) => {
265
-        if (response.data.state == 1) {
266
-          this.adminUserOptions = response.data.data.users;
267
-        }
268
-      });
269
-    },
270
-    getXuserName(id) {
271
-      if (id <= 0) {
272
-        return "";
273
-      }
274
-      var name = "";
275
-      if (
276
-        this.adminUserOptions == null ||
277
-        typeof this.adminUserOptions.length === "undefined"
278
-      ) {
279
-        return name;
280
-      }
281
-      var leng = this.adminUserOptions.length;
282
-      if (leng == 0) {
283
-        return name;
284
-      }
285
-      for (let index = 0; index < leng; index++) {
286
-        if (this.adminUserOptions[index].id == id) {
287
-          name = this.adminUserOptions[index].name;
288
-          break;
289
-        }
290
-      }
291
-      return name;
292
-    },
293
- 
294
-    getSupplyName(id) {
295
-      var name = "";
296
-      for (let i = 0; i < this.supplyList.length; i++) {
297
-        if (id == this.supplyList[i].id) {
298
-          name = this.supplyList[i].supplier_name;
299
-        }
300
-      }
301
-      return name;
302
-    },
303
-    getGoodOrderDetail() {
304
-      var id = this.$route.query.id;
305
-      getGoodOrderDetail(id).then((response) => {
306
-        if (response.data.state == 1) {
307
-          var out = response.data.data.out;
308
-          this.supplyList = response.data.data.supplyList,
309
-          this.is_check = out.is_check;
310
-          this.id = out.id;
311
-          this.supplier_id = out.supplier_id;
312
-          this.rate_of_concession = out.rate_of_concession;
313
-          this.discount_amount = out.discount_amount;
314
-          this.payment = out.payment;
315
-          this.arrearage = out.arrearage;
316
-          this.good_number = out.good_number;
317
-          this.return_remark = out.return_remake;
318
-          this.document_date = out.document_date;
319
-          this.creater = out.creater
320
-          var orderInfo = response.data.data.list;
321
-          for (let i = 0; i < orderInfo.length; i++) {
322
-            orderInfo[i].id = orderInfo[i].id
323
-            orderInfo[i].supply_count = orderInfo[i].count;
324
-            orderInfo[i].supply_price = orderInfo[i].price;
325
-            orderInfo[i].supply_remake = orderInfo[i].remark;
326
-            orderInfo[i].type = orderInfo[i].is_source;
327
-            orderInfo[i].project_id = orderInfo[i].project_id;
328
-            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
329
-            orderInfo[i].order_number = orderInfo[i].order_number;
330
-            orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2);
331
-            this.tableList = orderInfo;
332
-         }
333
-        }
334
-      });
335
-    },
336
-    getTimes(time) {
337
-      if (time === "") {
338
-        return "";
339
-      }
340
-      return uParseTime(time, "{y}-{m}-{d}");
341
-    },
342
-    getAllCount(){
343
-      var total = 0
344
-      for(let i=0;i<this.tableList.length;i++){
345
-         total +=this.tableList[i].count
346
-      }  
347
-      if(total > 0){
348
-       return total
349
-      }else{
350
-        return ""
351
-      } 
352
-    },
353
-    getAllPrice() {
354
-      var total_price = 0;
355
-      for (let i = 0; i < this.tableList.length; i++) {
356
-        total_price +=(this.tableList[i].price *this.tableList[i].count)
357
-      }
358
-      this.total_price = total_price;
359
-      if(total_price > 0){
360
-         return this.smallToBIG(total_price.toFixed(2));
361
-      }else{
362
-        return ""
363
-      }
364
-     
365
-    },
366
-    getAllPriceOne() {
367
-      var total_price = 0;
368
-      for (let i = 0; i < this.tableList.length; i++) {
369
-        total_price +=(this.tableList[i].price *this.tableList[i].count)
370
-      }
371
-      this.total_price = total_price;
372
-      if(total_price > 0){
373
-         return total_price.toFixed(2);
374
-      }else{
375
-        return ""
376
-      }
377
-     
378
-    },
379
-     smallToBIG(price) {
380
-        let fraction = ['角', '分'];
381
-        let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
382
-        let unit = [['元.', '万,', '亿,'], ['', '拾', '佰', '仟']];
383
-        let head = price < 0 ? '欠' : '';
384
-        price = Math.abs(price);
385
-        console.log("price",price)
386
-        let upper = '';
387
-        for (let i = 0; i < fraction.length; i++) {
388
-          upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
389
-        }
390
-        upper = upper || '整';
391
-        console.log("price",upper)
392
-        price = Math.floor(price);
393
-        for (let i = 0; i < unit[0].length && price > 0; i++) {
394
-          let p = '';
395
-          for (let j = 0; j < unit[1].length && price > 0; j++) {
396
-            p = digit[price % 10] + unit[1][j] + p;
397
-            price = Math.floor(price / 10);
398
-          }
399
-          upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
400
-        }
401
-        console.log("head",head)
402
-        var zhongwen = head + upper.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
403
-        console.log("23322323",zhongwen)
404
-        var ztr = zhongwen.replaceAll(".","");
405
-        console.log("ztr",ztr)
406
-        return ztr
407
-      },
408
-  },
409
-  created() {
410
-    this.orgName = this.$store.getters.xt_user.org.org_name;
411
-    this.orgId = this.$store.getters.xt_user.org.id;
412
-    this.fetchAllAdminUsers();
413
-    //获取购货单列表
414
-    this.getGoodOrderDetail();
415
-  },
416
-};
417
-</script>
418
-
419
-
420
-<style rel="stylesheet/scss" lang="scss" scoped>
421
-.print_main_content {
422
-  background-color: white;
423
-  max-width: 1500px;
424
-  margin: 0 auto;
425
-  padding: 0 0 20px 0;
426
-
427
-  .order_title_panl {
428
-    text-align: center;
429
-
430
-    .main_title {
431
-      font-size: 18px;
432
-      line-height: 40px;
433
-      font-weight: 500;
434
-    }
435
-  }
436
-  .table_panel {
437
-    .table {
438
-      width: 100%;
439
-      border: 1px solid;
440
-      border-collapse: collapse;
441
-      padding: 2px;
442
-
443
-      thead {
444
-        tr {
445
-          td {
446
-            border: 1px solid;
447
-            text-align: center;
448
-            font-size: 18px;
449
-            padding: 1px 5px;
450
-          }
451
-        }
452
-      }
453
-      tbody {
454
-        tr {
455
-          td {
456
-            border: 1px solid;
457
-            text-align: center;
458
-            font-size: 18px;
459
-            padding: 10px 5px;
460
-            white-space: pre-line;
461
-            .proj {
462
-              padding: 5px 0;
463
-              text-align: left;
464
-
465
-              .proj_title {
466
-                font-size: 16px;
467
-                font-weight: 500;
468
-                line-height: 25px;
469
-              }
470
-
471
-              .proj_item {
472
-                font-size: 15px;
473
-                line-height: 20px;
474
-
475
-                .zone_name {
476
-                  font-weight: 500;
477
-                }
478
-              }
479
-            }
480
-          }
481
-        }
482
-      }
483
-    }
484
-  }
485
-}
486
-
487
-.description {
488
-  width: 100%;
489
-  display: flex;
490
-  flex: 1;
491
-  justify-content: flex-start;
492
-  flex-wrap: wrap;
493
-  .content {
494
-    width: 25%;
495
-    text-align: left;
496
-    margin-bottom: 1px;
497
-    font-size: 18px;
498
-  }
499
-  .content_1 {
500
-    width: 100%;
501
-    text-align: left;
502
-    margin-bottom: 1px;
503
-    font-size: 18px;
504
-  }
505
-  // .content_2{
506
-  //   width: 33%;
507
-  // }
508
-}
509
-</style>

+ 0 - 515
src/xt_pages/supply/components/goodReturnPrint.vue Zobrazit soubor

@@ -1,515 +0,0 @@
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
8
-            size="small"
9
-            icon="el-icon-printer"
10
-            type="primary"
11
-            @click="printAction"
12
-            >打印</el-button
13
-          >
14
-        </el-col>
15
-      </el-row>
16
-    </div>
17
-    <div class="app-container" style="background-color: white">
18
-      <div id="print_content">
19
-        <div class="print_main_content">
20
-          <div class="order_title_panl">
21
-            <div style="font-size: 22px; font-weight: bold">{{ orgName }}</div>
22
-            <span style="font-weight: 500; font-size: 18px">采购退货单</span>
23
-          </div>
24
-          <div style="display: flex; justify-content: space-between">
25
-            <div style="text-align: left; margin-bottom: 1px; font-size: 18px">
26
-              供应商:
27
-                {{ getSupplyName(supplier_id) }}
28
-            </div>
29
-            <div style="margin-bottom: 1px; font-size: 18px">
30
-             单据日期:{{ getTimes(document_date) }}
31
-            </div>
32
-            <div style="margin-bottom: 1px; font-size: 18px">
33
-              单据编号:
34
-              {{ number }}
35
-            </div>
36
-            <div style="margin-bottom: 1px; font-size: 18px">币别:RMB</div>
37
-          </div>
38
-
39
-          <div class="table_panel">
40
-            <table class="table">
41
-              <thead>
42
-                <tr>
43
-                  <td style="line-height: 18px" width="80">序号</td>
44
-                  <td style="line-height: 18px" width="80">商品</td>
45
-                  <td style="line-height: 18px" width="80">单位</td>
46
-                  <td style="line-height: 18px" width="80">数量</td>
47
-                  <td style="line-height: 18px" width="80">采购单价</td>
48
-                  <td style="line-height: 18px" width="80">折扣率</td>
49
-                  <td style="line-height: 18px" width="80">折扣额</td>
50
-                  <td style="line-height: 18px" width="60">采购金额</td>
51
-                 
52
-                </tr>
53
-              </thead>
54
-              <tbody>
55
-                <tr v-for="(item, index) in tableList" :key="index">
56
-                  <td style="line-height: 18px">
57
-                    <span>{{ index + 1 }}</span>
58
-                  </td>
59
-                  <td style="line-height: 18px">
60
-                    <span>{{ item.name }}</span>
61
-                  </td>
62
-                  <td style="line-height: 18px">
63
-                   <span>{{ item.supply_unit }}</span>
64
-                  </td>
65
-                  <td style="line-height: 18px">
66
-                    <span>{{ item.supply_count }}</span>
67
-                  </td>
68
-                  <td style="line-height: 18px">
69
-                    <span>{{ item.price }}</span>
70
-                  </td>
71
-                  <td style="line-height: 18px">
72
-                    <span v-if="item.deposit_rate >0">{{item.deposit_rate}}</span>
73
-                  </td>
74
-                  <td style="line-height: 18px">
75
-                    <span v-if="(item.supply_count * item.price*item.deposit_rate) >0">{{(item.supply_count * item.price *item.deposit_rate/100).toFixed(2)}}</span>
76
-                  </td>
77
-                  <td style="line-height: 18px">
78
-                    <span v-if="(item.supply_count * item.price) >0">{{(item.supply_count * item.price).toFixed(2)}}</span>
79
-                  </td>
80
-                 
81
-                
82
-                </tr>
83
-                <tr>
84
-                  <td colspan="3" style="line-height: 18px">合计</td>
85
-                  <td colspan="1" style="line-height: 18px">{{getAllCount()}}</td>
86
-                  <td colspan="3" style="line-height: 18px"></td>
87
-                  <td style="line-height: 18px">{{getAllPriceTwo()}}</td>
88
-                </tr>
89
-                 <tr>
90
-                  <td colspan="9" style="line-height: 18px;text-align: left;">合计  金额大写 {{getAllPrice()}}</td>
91
-                </tr>
92
-              </tbody>
93
-            </table>
94
-          </div>
95
-          <div
96
-            style="
97
-              width: 100%;
98
-              display: flex;
99
-              flex: 1;
100
-              justify-content: flex-start;
101
-              flex-wrap: wrap;
102
-            "
103
-          >
104
-            <div
105
-              style="
106
-                width: 25%;
107
-                text-align: left;
108
-                margin-bottom: 1px;
109
-                font-size: 18px;
110
-              "
111
-            >
112
-              优惠金额:<span v-if="discount_amount>0">{{discount_amount}}</span>
113
-            </div>
114
-            <div
115
-              style="
116
-                width: 25%;
117
-                text-align: left;
118
-                margin-bottom: 1px;
119
-                font-size: 18px;
120
-              "
121
-            >
122
-              本次退款:<span v-if="payment>0" >{{payment}}</span>
123
-            </div>
124
-            <div
125
-              style="
126
-                width: 25%;
127
-                text-align: left;
128
-                margin-bottom: 1px;
129
-                font-size: 18px;
130
-              "
131
-            >
132
-              本次欠款:<span v-if="arrearage >0">{{arrearage}}</span>
133
-            </div>
134
-            <div
135
-              style="
136
-                width: 100%;
137
-                text-align: left;
138
-                margin-bottom: 1px;
139
-                font-size: 18px;
140
-              "
141
-            >
142
-              备注:{{return_remark}}
143
-            </div>
144
-            <div
145
-              style="
146
-                width: 25%;
147
-                text-align: left;
148
-                margin-bottom: 1px;
149
-                font-size: 18px;
150
-              "
151
-            >
152
-              制单人:{{getXuserName(creater)}}
153
-            </div>
154
-            <div
155
-              style="
156
-                width: 25%;
157
-                text-align: left;
158
-                margin-bottom: 1px;
159
-                font-size: 18px;
160
-              "
161
-            >
162
-              收货人签字:
163
-            </div>
164
-            <div
165
-              style="
166
-                width: 25%;
167
-                text-align: left;
168
-                margin-bottom: 1px;
169
-                font-size: 18px;
170
-              "
171
-            >
172
-              供应商签字:
173
-            </div>
174
-          </div>
175
-     
176
-        </div>
177
-      </div>
178
-    </div>
179
-  </div>
180
-</template>
181
-
182
-<script>
183
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
184
-
185
-import { fetchAllAdminUsers } from "@/api/doctor";
186
-import { getGoodReturnDetail } from "@/api/supply";
187
-import print from "print-js";
188
-import { getLodop } from "@/assets/LodopFuncs";
189
-const moment = require("moment");
190
-import { uParseTime } from "@/utils/tools";
191
-export default {
192
-  components: {
193
-    BreadCrumb,
194
-  },
195
-  data() {
196
-    return {
197
-      size: "medium ",
198
-      crumbs: [
199
-        { path: false, name: "库存管理" },
200
-        { path: false, name: "耗材管理" },
201
-        { path: false, name: "入库单打印" },
202
-      ],
203
-      isEdit: 0,
204
-      checked: false,
205
-      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
206
-      time_now: moment(new Date()).add("year", 0).format("YYYY-MM-DD"),
207
-      orgName: "",
208
-      orgId: "",
209
-      adminUserOptions: [],
210
-      tableList: [],
211
-      number: "",
212
-      id: "",
213
-      supplier_id: "",
214
-      rate_of_concession: "",
215
-      discount_amount: "",
216
-      supplyList: [],
217
-      document_date: "",
218
-      warehouse_out_id:"",
219
-      return_remark: "",
220
-      warehousing_id: 0,
221
-      number: "",
222
-      drugList: [],
223
-      goodList: [],
224
-      arrearage:"",
225
-      payment:"",
226
-      creater:"",
227
-    };
228
-  },
229
-  methods: {
230
-    printAction: function () {
231
-      const style =
232
-        "@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: 14px; padding: 1px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 12px; 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; } }";
233
-      printJS({
234
-        printable: "print_content",
235
-        type: "html",
236
-        documentTitle: "  ",
237
-        style: style,
238
-        scanStyles: false,
239
-      });
240
-    },
241
-    // 打印功能
242
-    btnClickPrint: function () {
243
-      let LODOP = getLodop(); //调用getLodop获取LODOP对象
244
-      LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_整页缩放打印输出");
245
-
246
-      LODOP.ADD_PRINT_BARCODE(15, 15, 300, 300, "QRCode", "xxxxxxxxxxxxx");
247
-      LODOP.SET_PRINT_STYLEA(0, "Stretch", 1); //(可变形)扩展缩放模式
248
-      LODOP.PREVIEW(); //预览(预览打印无脚标)
249
-      // LODOP.PRINT();  //打印
250
-      LODOP.RINT_DESIGN();
251
-    },
252
-
253
-    getTime(val) {
254
-      if (val < 0) {
255
-        return "";
256
-      }
257
-      if (val == "") {
258
-        return "";
259
-      } else {
260
-        return uParseTime(val, "{y}-{m}-{d}");
261
-      }
262
-    },
263
-    fetchAllAdminUsers() {
264
-      fetchAllAdminUsers().then((response) => {
265
-        if (response.data.state == 1) {
266
-          this.adminUserOptions = response.data.data.users;
267
-        }
268
-      });
269
-    },
270
-    getXuserName(id) {
271
-      if (id <= 0) {
272
-        return "";
273
-      }
274
-      var name = "";
275
-      if (
276
-        this.adminUserOptions == null ||
277
-        typeof this.adminUserOptions.length === "undefined"
278
-      ) {
279
-        return name;
280
-      }
281
-      var leng = this.adminUserOptions.length;
282
-      if (leng == 0) {
283
-        return name;
284
-      }
285
-      for (let index = 0; index < leng; index++) {
286
-        if (this.adminUserOptions[index].id == id) {
287
-          name = this.adminUserOptions[index].name;
288
-          break;
289
-        }
290
-      }
291
-      return name;
292
-    },
293
- 
294
-    getSupplyName(id) {
295
-      var name = "";
296
-      for (let i = 0; i < this.supplyList.length; i++) {
297
-        if (id == this.supplyList[i].id) {
298
-          name = this.supplyList[i].supplier_name;
299
-        }
300
-      }
301
-      return name;
302
-    },
303
-    getGoodReturnDetail() {
304
-      var id = this.$route.query.id;
305
-      getGoodReturnDetail(id).then((response) => {
306
-        if (response.data.state == 1) {
307
-          var out = response.data.data.cancelDetail;
308
-          this.supplyList = response.data.data.supplyList
309
-          this.warehouse_out_id = out.warehouse_out_id;
310
-          this.number = out.number;
311
-          this.is_check = out.is_check;
312
-          this.id = out.id;
313
-          this.supplier_id = out.supplier_id;
314
-          this.rate_of_concession = out.rate_of_concession;
315
-          this.discount_amount = out.discount_amount;
316
-          this.payment = out.payment;
317
-          this.arrearage = out.arrearage;
318
-          this.creater= out.creater,
319
-          this.return_remark = out.return_remark
320
-          this.document_date = out.document_date;
321
-          var orderInfo = response.data.data.orderCancelDetail;
322
-          for (let i = 0; i < orderInfo.length; i++) {
323
-            orderInfo[i].id = orderInfo[i].id;
324
-            orderInfo[i].supply_count = orderInfo[i].supply_count;
325
-            orderInfo[i].supply_price = orderInfo[i].price;
326
-            orderInfo[i].supply_remake = orderInfo[i].remark;
327
-            orderInfo[i].type = orderInfo[i].is_source;
328
-            orderInfo[i].project_id = orderInfo[i].project_id;
329
-            orderInfo[i].supply_unit = orderInfo[i].supply_unit;
330
-            orderInfo[i].order_number = orderInfo[i].order_number;
331
-            orderInfo[i].good_number = orderInfo[i].good_number;
332
-            orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2);
333
-            orderInfo[i].supply_expiry_date = orderInfo[i].supply_expiry_date;
334
-            orderInfo[i].supply_product_date = orderInfo[i].supply_product_date;
335
-          }
336
-
337
-          this.tableList = [];
338
-          this.tableList = orderInfo;
339
-        }
340
-      });
341
-    },
342
-    getTimes(time) {
343
-      if (time === "") {
344
-        return "";
345
-      }
346
-      return uParseTime(time, "{y}-{m}-{d}");
347
-    },
348
-    getAllCount(){
349
-      var total = 0
350
-      for(let i=0;i<this.tableList.length;i++){
351
-         total +=this.tableList[i].supply_count
352
-      }  
353
-      if(total > 0){
354
-       return total
355
-      }else{
356
-        return ""
357
-      } 
358
-    },
359
-    getAllPrice() {
360
-      var total_price = 0;
361
-      for (let i = 0; i < this.tableList.length; i++) {
362
-        total_price +=(this.tableList[i].price *this.tableList[i].supply_count - (this.tableList[i].price * this.tableList[i].supply_count*this.tableList[i].deposit_rate/100))
363
-      }
364
-      this.total_price = total_price;
365
-      if(total_price > 0){
366
-         return this.smallToBIG(total_price.toFixed(2));
367
-      }else{
368
-        return ""
369
-      }
370
-     
371
-    },
372
-   getAllPriceTwo() {
373
-      var total_price = 0;
374
-      for (let i = 0; i < this.tableList.length; i++) {
375
-        total_price +=(this.tableList[i].price *this.tableList[i].supply_count - (this.tableList[i].price * this.tableList[i].supply_count*this.tableList[i].deposit_rate/100))
376
-      }
377
-      this.total_price = total_price;
378
-      if(total_price > 0){
379
-         return total_price.toFixed(2);
380
-      }else{
381
-        return ""
382
-      }
383
-     
384
-    },
385
-     smallToBIG(price) {
386
-        let fraction = ['角', '分'];
387
-        let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
388
-        let unit = [['元.', '万,', '亿,'], ['', '拾', '佰', '仟']];
389
-        let head = price < 0 ? '欠' : '';
390
-        price = Math.abs(price);
391
-        console.log("price",price)
392
-        let upper = '';
393
-        for (let i = 0; i < fraction.length; i++) {
394
-          upper += (digit[Math.floor(price * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
395
-        }
396
-        upper = upper || '整';
397
-        console.log("price",upper)
398
-        price = Math.floor(price);
399
-        for (let i = 0; i < unit[0].length && price > 0; i++) {
400
-          let p = '';
401
-          for (let j = 0; j < unit[1].length && price > 0; j++) {
402
-            p = digit[price % 10] + unit[1][j] + p;
403
-            price = Math.floor(price / 10);
404
-          }
405
-          upper = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + upper;
406
-        }
407
-        console.log("head",head)
408
-        var zhongwen = head + upper.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
409
-        console.log("23322323",zhongwen)
410
-        var ztr = zhongwen.replaceAll(".","");
411
-        console.log("ztr",ztr)
412
-        return ztr
413
-      },
414
-  },
415
-  created() {
416
-    this.orgName = this.$store.getters.xt_user.org.org_name;
417
-    this.orgId = this.$store.getters.xt_user.org.id;
418
-    this.fetchAllAdminUsers();
419
-    //获取购货单列表
420
-    this.getGoodReturnDetail();
421
-  },
422
-};
423
-</script>
424
-
425
-
426
-<style rel="stylesheet/scss" lang="scss" scoped>
427
-.print_main_content {
428
-  background-color: white;
429
-  max-width: 1500px;
430
-  margin: 0 auto;
431
-  padding: 0 0 20px 0;
432
-
433
-  .order_title_panl {
434
-    text-align: center;
435
-
436
-    .main_title {
437
-      font-size: 18px;
438
-      line-height: 40px;
439
-      font-weight: 500;
440
-    }
441
-  }
442
-  .table_panel {
443
-    .table {
444
-      width: 100%;
445
-      border: 1px solid;
446
-      border-collapse: collapse;
447
-      padding: 2px;
448
-
449
-      thead {
450
-        tr {
451
-          td {
452
-            border: 1px solid;
453
-            text-align: center;
454
-            font-size: 18px;
455
-            padding: 1px 5px;
456
-          }
457
-        }
458
-      }
459
-      tbody {
460
-        tr {
461
-          td {
462
-            border: 1px solid;
463
-            text-align: center;
464
-            font-size: 18px;
465
-            padding: 10px 5px;
466
-            white-space: pre-line;
467
-            .proj {
468
-              padding: 5px 0;
469
-              text-align: left;
470
-
471
-              .proj_title {
472
-                font-size: 16px;
473
-                font-weight: 500;
474
-                line-height: 25px;
475
-              }
476
-
477
-              .proj_item {
478
-                font-size: 15px;
479
-                line-height: 20px;
480
-
481
-                .zone_name {
482
-                  font-weight: 500;
483
-                }
484
-              }
485
-            }
486
-          }
487
-        }
488
-      }
489
-    }
490
-  }
491
-}
492
-
493
-.description {
494
-  width: 100%;
495
-  display: flex;
496
-  flex: 1;
497
-  justify-content: flex-start;
498
-  flex-wrap: wrap;
499
-  .content {
500
-    width: 25%;
501
-    text-align: left;
502
-    margin-bottom: 1px;
503
-    font-size: 18px;
504
-  }
505
-  .content_1 {
506
-    width: 100%;
507
-    text-align: left;
508
-    margin-bottom: 1px;
509
-    font-size: 18px;
510
-  }
511
-  // .content_2{
512
-  //   width: 33%;
513
-  // }
514
-}
515
-</style>