Selaa lähdekoodia

11月14日 库存扣减更新

XMLWAN 3 vuotta sitten
vanhempi
commit
4516598cd6

+ 1 - 0
src/lang/zh.js Näytä tiedosto

@@ -138,6 +138,7 @@ export default {
138 138
     stockQuery: '库存查询',
139 139
     supplyQuery: '供应商管理',
140 140
     purchaseOrderQuery: '购货订单',
141
+    goodOrderQuery: '购货单',
141 142
     addPurchaseOrder: '新增购货订单',
142 143
     workforce_template: '排班模板设置',
143 144
     statistics: '统计分析',

+ 8 - 1
src/router/modules/supply.js Näytä tiedosto

@@ -52,13 +52,20 @@ export default {
52 52
       isChild: true
53 53
     },
54 54
     {
55
-      path: '/purchase/order/edit',
55
+      path: '/purchase/order/print',
56 56
       component: () => import('@/xt_pages/supply/components/purchaseOrderPrint'),
57 57
       name: 'purchaseOrderPrint',
58 58
       meta: { title: 'purchaseOrderPrint', noCache: true },
59 59
       hidden: true,
60 60
       is_menu: false,
61 61
       isChild: true
62
+    },
63
+
64
+    {
65
+      path: 'good/order/query',
66
+      component: () => import('@/xt_pages/supply/goodOrderQuery'),
67
+      name: 'goodOrderQuery',
68
+      meta: { title: 'goodOrderQuery', noCache: true }
62 69
     }
63 70
 
64 71
   ]

+ 3 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderTen.vue Näytä tiedosto

@@ -640,7 +640,7 @@
640 640
                 </td> -->
641 641
                         <!-- <td width="10%" v-if="(advice.children && advice.children.length > 0 || advice.parent_id > 0) && advice.isShow == 2" ></td> -->
642 642
                         <td height="32px">
643
-                          <img v-if="advice.id > 0" style="height:20px;" src="https://images.shengws.com/FgnRnBcx1BgULJ1dn7VKzeBPEvtm" alt="" srcset="" />
643
+                          <!-- <img v-if="advice.id > 0" style="height:20px;" src="https://images.shengws.com/FgnRnBcx1BgULJ1dn7VKzeBPEvtm" alt="" srcset="" /> -->
644 644
                           <span v-if="setAdminUserES(advice.advice_doctor) == ''">{{ getAdminUser(advice.advice_doctor) }}</span>
645 645
                           <img style="height:20px;" :src="setAdminUserES(advice.advice_doctor)" alt="" srcset="" v-else />
646 646
                         </td>
@@ -1014,8 +1014,8 @@
1014 1014
                     <div class="inline_block" style="flex:1;">
1015 1015
                       治疗医生:
1016 1016
                       <div class="under_line" style="width: 80px">
1017
-                        <img style="height:20px;" src="https://images.shengws.com/FgnRnBcx1BgULJ1dn7VKzeBPEvtm" alt="" srcset="" />
1018
-                        <!--<img style="height:20px;" src="https://images.shengws.com/FgnRnBcx1BgULJ1dn7VKzeBPEvtm" alt="" srcset="">-->
1017
+                        <!-- <img style="height:20px;" src="https://images.shengws.com/FgnRnBcx1BgULJ1dn7VKzeBPEvtm" alt="" srcset="" /> -->
1018
+                       
1019 1019
                         <span v-if="setAdminUserES(prescription.prescription_doctor) == ''">{{ getAdminUser(prescription.prescription_doctor) }}</span>
1020 1020
                         <img style="height:20px;" :src="setAdminUserES(prescription.prescription_doctor)" alt="" srcset="" v-else />
1021 1021
                       </div>

+ 5 - 3
src/xt_pages/stock/drugs/drugStockOutOrder.vue Näytä tiedosto

@@ -224,7 +224,8 @@
224 224
           </el-table-column>
225 225
           <el-table-column label="出货单价" align="center">
226 226
             <template slot-scope="scope">
227
-              {{scope.row.price}}
227
+              <span v-if="scope.row.price > 0"> {{scope.row.price}}</span>
228
+              <span v-if="scope.row.price == 0"> {{scope.row.retail_price}}</span>
228 229
             </template>
229 230
           </el-table-column>
230 231
           <!-- <el-table-column label="拆零零售价" align="center">
@@ -234,7 +235,8 @@
234 235
           </el-table-column> -->
235 236
           <el-table-column label="总价" align="center">
236 237
             <template slot-scope="scope">
237
-              <span>{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.min_price).toFixed(2)}}</span>
238
+              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.min_price).toFixed(2)}}</span>
239
+              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price).toFixed(2)}}</span>
238 240
             </template>
239 241
           </el-table-column>
240 242
           <el-table-column label="生产厂家" align="center">
@@ -916,7 +918,7 @@ export default {
916 918
           this.tableShow = true
917 919
           this.tableList = []
918 920
           var list =  response.data.data.list
919
-     
921
+         
920 922
          this.manufacturerList = response.data.data.manufacturerList
921 923
          this.dealerList = response.data.data.dealerList
922 924
          var drugFlowList = response.data.data.drugFlowList

+ 32 - 2
src/xt_pages/supply/components/addPurchaseOrder.vue Näytä tiedosto

@@ -49,7 +49,7 @@
49 49
     </div>
50 50
     <div>
51 51
         <el-button size="small" type="primary" @click="savePurchaseOrder" v-show="showTwo">保存</el-button>
52
-        <el-button size="small" type="primary" @click="updatePurchaseOrder" v-show="showOne">打印</el-button>
52
+        <el-button size="small" type="primary" @click="toPrint()" v-show="showOne">打印</el-button>
53 53
         <el-button size="small" type="primary" @click="checkPurchaseOrder" v-show="showOne">审核</el-button>
54 54
         <el-button size="small" type="primary" @click="updatePurchaseOrder" v-show="showOne">修改</el-button>
55 55
     </div>
@@ -114,6 +114,22 @@
114 114
         </template>
115 115
     </el-table-column>
116 116
 
117
+    <el-table-column label="单位" align="center" width="120px">
118
+        <template slot="header" slot-scope="scope">
119
+            <span>单位<span style="color: red">*</span></span>
120
+        </template>
121
+        <template slot-scope="scope">
122
+          <el-select v-model="scope.row.supply_unit" style="width:160px;" filterable placeholder="请选择"  :disabled="disabled">
123
+                <el-option
124
+                    v-for="(item,index) in unitList"
125
+                    :key="index"
126
+                    :label="item.name"
127
+                    :value="item.name">
128
+                </el-option>
129
+            </el-select>
130
+        </template>
131
+    </el-table-column>
132
+
117 133
     <el-table-column label="购货单价" align="center" width="120px">
118 134
         <template slot-scope="scope">
119 135
         <el-input v-model="scope.row.supply_price" style="width:80px" :disabled="disabled"></el-input>
@@ -254,6 +270,10 @@ return {
254 270
    goodList:[],
255 271
    id:0,
256 272
    disabled:false,
273
+   unitList:[
274
+     {id:1,name:""},
275
+     {id:2,name:""}
276
+   ],
257 277
   };
258 278
 },
259 279
 methods:{
@@ -262,11 +282,13 @@ getInitOrder(){
262 282
     getInitOrder().then(response=>{
263 283
     if(response.data.state == 1){
264 284
         var drugList = response.data.data.drugList
285
+        
265 286
         this.manufactuerList = response.data.data.manufactuerList
266 287
         this.goodTypeList = response.data.data.goodTypeList
267 288
         this.drugTypeList = response.data.data.drugTypeList
268 289
         this.supplyList = response.data.data.supplyList
269 290
        for(let i=0;i<drugList.length;i++){
291
+          
270 292
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
271 293
             drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
272 294
           }
@@ -331,7 +353,7 @@ changeGoodName(val){
331 353
   this.currentIndex = val
332 354
 },
333 355
 changeName(val){
334
-    //var obj = {"id":0,"name":"合计","supply_name":"","supply_type":"","supply_specification_name":"","supply_total":"","supply_count":"","supply_price":"","supply_total_price":"","supply_manufacturer":"","supply_license_number":"","supply_remake":"","is_total":2}
356
+   console.log("val3233232322332",val)
335 357
    for(let i=0;i<this.recordInfo.tableList.length;i++){
336 358
     if(this.currentIndex == i){
337 359
         this.recordInfo.tableList[i].project_id = val.id
@@ -341,6 +363,7 @@ changeName(val){
341 363
         this.recordInfo.tableList[i].supply_type = val.supply_type
342 364
         this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name
343 365
         this.recordInfo.tableList[i].supply_total = val.supply_total
366
+        this.recordInfo.tableList[i].supply_unit = val.max_unit
344 367
         if(val.supply_count == NaN){
345 368
            this.recordInfo.tableList[i].supply_count = ""
346 369
         }else{
@@ -353,6 +376,7 @@ changeName(val){
353 376
         this.recordInfo.tableList[i].supply_license_number = val.supply_license_number
354 377
         this.recordInfo.tableList[i].supply_remake = val.supply_remake
355 378
         this.recordInfo.tableList[i].is_total = val.is_total
379
+        this.recordInfo.tableList[i].supply_unit = val.supply_unit
356 380
      }
357 381
     }
358 382
    
@@ -375,6 +399,7 @@ handleEdit(){
375 399
     tempObj['type'] = 0
376 400
     tempObj['is_total'] = 1
377 401
     tempObj["project_id"] = 0
402
+    tempObj["supply_unit"] = ""
378 403
     this.recordInfo.tableList.push(tempObj)
379 404
 },
380 405
 handleDelete: function(index, row) {
@@ -581,6 +606,10 @@ getTimes(time) {
581 606
     })
582 607
     .catch(() => {
583 608
     }) 
609
+  },
610
+  toPrint(){
611
+     var id = this.id
612
+     this.$router.push({path:"/purchase/order/print?&id="+id})  
584 613
   }
585 614
 },
586 615
 created(){
@@ -600,6 +629,7 @@ created(){
600 629
     tempObj['type'] = 0
601 630
     tempObj['is_total'] = 1
602 631
     tempObj["project_id"] = 0
632
+    tempObj["supply_unit"] = ""
603 633
     this.recordInfo.tableList.push(tempObj)
604 634
     this.getInitOrder()
605 635
 }

+ 2 - 1
src/xt_pages/supply/components/editPurchaseOrder.vue Näytä tiedosto

@@ -537,7 +537,8 @@ getTimes(time) {
537 537
     })  
538 538
   },
539 539
   toPrint(){
540
-      
540
+     var id = this.$route.query.id
541
+     this.$router.push({path:"/purchase/order/print?&id="+id})  
541 542
   }
542 543
 },
543 544
 created(){

+ 82 - 41
src/xt_pages/supply/components/purchaseOrderPrint.vue Näytä tiedosto

@@ -17,10 +17,16 @@
17 17
                     </div>
18 18
                     <div style="display:flex;justify-content: space-between;">
19 19
                       <div style="text-align:left;margin-bottom:1px;font-size: 18px;">
20
-                        单据编号:
20
+                        供应商:{{getSupplyName(supplier_id)}}
21 21
                       </div>
22
-                      <div style="text-align:right;margin-bottom:1px;font-size: 18px;">
23
-                        打印时间:{{time_now}}
22
+                      <div style="margin-bottom:1px;font-size: 18px;">
23
+                        单据日期:{{rate_of_concession}}
24
+                      </div>
25
+                      <div style="margin-bottom:1px;font-size: 18px;">
26
+                        单据编号:{{number}}
27
+                      </div>
28
+                      <div style="margin-bottom:1px;font-size: 18px;">
29
+                        币别:RMB
24 30
                       </div>
25 31
                     </div>
26 32
                     
@@ -41,8 +47,11 @@
41 47
                             </thead>
42 48
                             <tbody>
43 49
                                 <tr v-for='(item,index) in tableList' :key="index">
50
+                                    <td style="line-height:18px;"><span>{{index+ 1}}</span></td>
51
+                                    <td style="line-height:18px;"><span>{{item.supply_name}}</span></td>
44 52
                                     <td style="line-height:18px;"><span></span></td>
45
-                                    <td style="line-height:18px;"><span></span></td>
53
+                                    <td style="line-height:18px;"><span>{{item.count}}</span></td>
54
+                                    <td style="line-height:18px;"><span>{{item.price}}</span></td>
46 55
                                     <td style="line-height:18px;"><span></span></td>
47 56
                                     <td style="line-height:18px;"><span></span></td>
48 57
                                     <td style="line-height:18px;"><span></span></td>
@@ -50,17 +59,24 @@
50 59
                                 </tr>
51 60
                                 <tr>
52 61
                                   <td>合计</td>
53
-                                  <td colspan="12" style="text-align:right;">{{getAllPice(it.id).toFixed(2)}}</td>
62
+                                  <td colspan="12" style="text-align:right;"></td>
54 63
                                </tr>
55 64
                             </tbody>
56 65
                         </table>
57 66
 
58
-                        <div style="display:flex;margin-top:1px;float:right;">
59
-                            <div style="width:50px;">审批:</div><div style="width:100px;"></div>
60
-                            <div style="width:80px;" v-if='orgId != 10024'>药材主任:</div><div style="width:100px;"></div>
61
-                            <div style="width:50px;">会计:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
62
-                            <div style="width:50px;">审核:</div><div style="width:100px;"><span v-if='orgId == 10024'>徐立琼</span></div>
63
-                            <div style="width:70px;">制单人:</div><div style="width:100px;">{{ getXuserName(it.creater) }}</div>
67
+                        <div style="margin-top:1px;">
68
+                            <div style="width:100px;">折扣额:</div><div style="width:100px;"></div>
69
+                            <div style="width:100px;">折扣金额:</div><div style="width:100px;"><span></span></div>
70
+                            <div style="width:100px;">本次付款:</div><div style="width:100px;"><span></span></div>
71
+                            <div style="width:100px;">本次欠款:</div><div style="width:100px;"></div>
72
+                       </div>
73
+                        <div style="margin-top:1px;">
74
+                            <div style="width:100px;">备注</div><div style="width:100px;"></div>
75
+                       </div>
76
+                       <div style="margin-top:1px;">
77
+                            <div style="width:100px;">制单人:</div><div style="width:100px;"></div>
78
+                            <div style="width:100px;">收货人签字:</div><div style="width:100px;"><span></span></div>
79
+                            <div style="width:100px;">供应商签字:</div><div style="width:100px;"><span></span></div>
64 80
                        </div>
65 81
                     </div>
66 82
                 </div>
@@ -73,6 +89,7 @@
73 89
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
74 90
 
75 91
 import { fetchAllAdminUsers } from "@/api/doctor";
92
+import {getPurchaseOrderDetail} from "@/api/supply"
76 93
 import print from 'print-js'
77 94
 const moment = require('moment')
78 95
 import { uParseTime } from '@/utils/tools'
@@ -89,36 +106,19 @@ export default {
89 106
           ],
90 107
             isEdit: 0,
91 108
             checked: false,
92
-            signAndWeighBoxPatients: "sign-and-weigh-box-patients",
93
-            goodType: [],
94
-            goodInfo: [],
95
-            manufacturer: [],
96
-            dealer: [],
97
-            Warehouse: {
98
-                loading: false,
99
-                warehouseDate: [],
100
-                tableCurrentIndex: ""
101
-            },
102
-
103
-            WarehouseInfo: {
104
-                loading: false,
105
-                warehouseInfoDate: [],
106
-                warehouse: {}
107
-            },
109
+            signAndWeighBoxPatients: "sign-and-weigh-box-patients", 
108 110
             time_now:moment(new Date()).add('year',0).format("YYYY-MM-DD"),
109
-            allPrice:0,
110
-            page: 1,
111
-            limit: 10000,
112
-            keyword: "",
113
-            is_use:"",
114
-            good_kind:"",
115
-            is_charge:"",
116
-            list:[],
117 111
             orgName:'',
118 112
             orgId:'',
119 113
             adminUserOptions:[],
120
-            warehousingInfo:[],
121
-            warehousList:[]
114
+            tableList:[],
115
+            number:"",
116
+            id:"",
117
+            supplier_id:"",
118
+            rate_of_concession:"",
119
+            discount_amount:"",
120
+            supplyList:[],
121
+            document_date:"",
122 122
         }
123 123
     },
124 124
     methods:{
@@ -143,7 +143,14 @@ export default {
143 143
           return uParseTime(val, '{y}-{m}-{d}')
144 144
          }
145 145
       },
146
-     
146
+      fetchAllAdminUsers() {
147
+        fetchAllAdminUsers().then(response => {
148
+          if (response.data.state == 1) {
149
+            this.adminUserOptions = response.data.data.users
150
+
151
+          }
152
+        })
153
+      },
147 154
       getXuserName(id) {
148 155
         if (id <= 0) {
149 156
           return "";
@@ -167,14 +174,48 @@ export default {
167 174
         }
168 175
         return name;
169 176
       },
170
-      
177
+      getPurchaseOrderDetail(){
178
+        var id = this.$route.query.id
179
+        getPurchaseOrderDetail(id).then(response=>{
180
+        if(response.data.state == 1){
181
+            var info = response.data.data.info
182
+            this.is_check = info.is_check
183
+            this.number = info.number
184
+            this.id = info.id
185
+            this.supplier_id = info.supplier_id
186
+            this.rate_of_concession = info.rate_of_concession
187
+            this.discount_amount = info.discount_amount
188
+            this.document_date = info.document_date
189
+            var orderInfo = response.data.data.orderInfo
190
+            var supplyList = response.data.data.supplyList
191
+            this.supplyList = supplyList
192
+            for(let i=0;i<orderInfo.length;i++){
193
+                orderInfo[i].supply_count = orderInfo[i].count
194
+                orderInfo[i].supply_price = orderInfo[i].price
195
+                orderInfo[i].supply_remake = orderInfo[i].remark
196
+                orderInfo[i].type = orderInfo[i].is_source
197
+                orderInfo[i].project_id = orderInfo[i].project_id
198
+            }
199
+            console.log("orderINFO23323232",orderInfo)
200
+            this.tableList = orderInfo
201
+        }
202
+      })  
203
+    },
204
+    getSupplyName(id){
205
+      var name = ""
206
+      for(let i=0;i<this.supplyList.length;i++){
207
+        if(id == this.supplyList[i].id){
208
+          name = this.supplyList[i].supplier_name
209
+        }
210
+      }
211
+      return name
212
+    },
171 213
     },
172 214
     created(){
173 215
       this.orgName = this.$store.getters.xt_user.org.org_name;
174 216
       this.orgId = this.$store.getters.xt_user.org.id;
175
-      const order_id = this.$route.query.id;
176
-
177 217
       this.fetchAllAdminUsers()
218
+      this.getPurchaseOrderDetail()
178 219
     
179 220
     }
180 221
 }

+ 384 - 0
src/xt_pages/supply/goodOrderQuery.vue Näytä tiedosto

@@ -0,0 +1,384 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container ">
7
+      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8
+        <div>
9
+        
10
+          <el-date-picker
11
+            size="small"
12
+            v-model="start_time"
13
+            prefix-icon="el-icon-date"
14
+            :editable="false"
15
+            style="width: 196px;"
16
+            type="date"
17
+            placeholder="选择日期时间"
18
+            align="right"
19
+            format="yyyy-MM-dd"
20
+            value-format="yyyy-MM-dd"
21
+            @change="startTimeChange"
22
+           ></el-date-picker>-
23
+            <el-date-picker
24
+              size="small"
25
+              v-model="end_time"
26
+              prefix-icon="el-icon-date"
27
+              :editable="false"
28
+              style="width: 196px;"
29
+              type="date"
30
+              placeholder="选择日期时间"
31
+              align="right"
32
+              format="yyyy-MM-dd"
33
+              value-format="yyyy-MM-dd"
34
+              @change="endTimeChange"
35
+          ></el-date-picker>
36
+          <span>审核状态:</span>
37
+           <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
38
+            @change="changeTypeName">
39
+            <el-option
40
+                v-for="item in checkList"
41
+                :key="item.id"
42
+                :label="item.name"
43
+                :value="item.id">
44
+            </el-option>
45
+          </el-select>
46
+          <el-input
47
+            size="small"
48
+            style="width: 200px;margin-left:10px;"
49
+            class="filter-item"
50
+            v-model.trim="keywords"
51
+            placeholder="订单编号或供应商名称"
52
+          />
53
+          <el-button
54
+            size="small"
55
+            class="filter-item"
56
+            type="primary"
57
+            icon="el-icon-search"
58
+            @click="search"
59
+            >搜索</el-button
60
+          >
61
+        </div>
62
+        <div>
63
+          <el-button size="small" type="primary" @click="toAdd">新增</el-button>
64
+        </div>
65
+      </div>
66
+
67
+
68
+       <el-table
69
+        :row-style="{ color: '#303133' }"
70
+        :header-cell-style="{
71
+          backgroundColor: 'rgb(245, 247, 250)',
72
+          color: '#606266'
73
+        }"
74
+        :data="tableList"
75
+        :class="signAndWeighBoxPatients"
76
+        border
77
+      >
78
+        <el-table-column label="订单日期" align="center">
79
+          <template slot-scope="scope">
80
+            <span>{{getTimes(scope.row.document_date)}}</span>
81
+         </template>
82
+        </el-table-column>
83
+        <el-table-column label="订单编号" align="center">
84
+          <template slot-scope="scope">
85
+            <span>{{scope.row.number}}</span>
86
+          </template>
87
+        </el-table-column>
88
+        <el-table-column label="供应商" align="center">
89
+            <template slot-scope="scope">
90
+              <span>{{getName(scope.row.supplier_id)}}</span>
91
+            </template>
92
+         </el-table-column>
93
+        <el-table-column label="关联购货订单" align="center">
94
+          <template slot-scope="scope">
95
+            
96
+          </template>
97
+        </el-table-column>
98
+        <el-table-column label="购物金额" align="center">
99
+          <template slot-scope="scope">
100
+             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
101
+          </template>
102
+        </el-table-column>
103
+
104
+       <el-table-column label="数量" align="center">
105
+         <template slot-scope="scope">
106
+           {{getAllCount(scope.row.orderInfo)}}
107
+         </template>
108
+       </el-table-column>
109
+
110
+       <el-table-column label="订单状态" align="center">
111
+         <template slot-scope="scope">
112
+           <span v-if="scope.row.is_check == 2">未审核</span>
113
+           <span v-if="scope.row.is_check == 1">已审核</span>
114
+         </template>
115
+       </el-table-column>
116
+      
117
+        <el-table-column label="交货日期" align="center">
118
+         <template slot-scope="scope">
119
+           {{getTimes(scope.row.delivery_date)}}
120
+         </template>
121
+       </el-table-column>
122
+        
123
+    
124
+      <el-table-column label="制单人" align="center">
125
+         <template slot-scope="scope">
126
+          {{getDocName(scope.row.creater)}}
127
+         </template>
128
+       </el-table-column>
129
+
130
+      <el-table-column label="审核人" align="center">
131
+         <template slot-scope="scope">
132
+          {{getDocName(scope.row.checker)}}
133
+         </template>
134
+       </el-table-column>
135
+
136
+       <el-table-column label="操作" align="center" width="260px">
137
+          <template slot-scope="scope">
138
+              <el-button
139
+                icon="el-icon-edit-outline"
140
+                size="small"
141
+                type="primary"
142
+                @click="toClick(scope.row.id)"
143
+              >编辑
144
+              </el-button>
145
+              <el-button
146
+                icon="el-icon-delete"
147
+                size="small"
148
+                type="danger"
149
+                @click="toClickOne(scope.row)"
150
+              >删除
151
+              </el-button>
152
+          </template>
153
+        </el-table-column>
154
+      </el-table>
155
+      <el-pagination
156
+        @size-change="handleSizeChange"
157
+        @current-change="handleCurrentChange"
158
+        :page-sizes="[10, 50, 100,200,500,1000]"
159
+        :page-size="10"
160
+        background
161
+        align="right"
162
+        style="margin-top:20px;"
163
+        layout="total, sizes, prev, pager, next, jumper"
164
+        :total="total"
165
+      >
166
+      </el-pagination>
167
+
168
+    </div>
169
+  </div>
170
+</template>
171
+
172
+<script>
173
+import BreadCrumb from "@/xt_pages/components/bread-crumb";
174
+
175
+import {getAllSupply,getAllPurchaseOrderList} from "@/api/supply"
176
+import {uParseTime } from '@/utils/tools'
177
+export default {
178
+  name: "stockIn",
179
+   components: {
180
+     
181
+   },
182
+  components: {
183
+    BreadCrumb
184
+  },
185
+  data() {
186
+    return {
187
+      crumbs: [
188
+        { path: false, name: "采购管理" },
189
+        { path: "/spply/query", name: "购货单" }
190
+      ],
191
+      keywords: "",
192
+      total: 0,
193
+      multipleSelection: [],
194
+      signAndWeighBoxPatients: "sign-and-weigh-box-patients",
195
+      start_time: "",
196
+      end_time:new Date(),
197
+      page: 1,
198
+      limit: 10,
199
+      goodType: [],
200
+      goodInfo: [],
201
+      org_id:0,
202
+      types:[],
203
+      tableList:[],
204
+      type_name:"",
205
+      checkList:[
206
+        {id:0,name:"请选择"},
207
+        {id:1,name:"已审核"},
208
+        {id:2,name:"未审核"},
209
+      ],
210
+      supplyList:[],
211
+      check_id:0,
212
+      doctorList:[],
213
+    };
214
+  },
215
+  methods:{
216
+     toAdd(){
217
+       this.$router.push({path:"/purchase/order/add"})
218
+     },
219
+     changeTypeName(){
220
+
221
+     },
222
+     startTimeChange(){
223
+
224
+     },
225
+     endTimeChange(){
226
+
227
+     },
228
+     search(){
229
+
230
+     },
231
+     handleSizeChange(val){
232
+       this.limit = val
233
+       this.getlist()
234
+     },
235
+     handleCurrentChange(val){
236
+       this.page = val
237
+       this.getlist()
238
+     },
239
+     getAllSupply(){
240
+       getAllSupply().then(response=>{
241
+         if(response.data.state == 1){
242
+            var supplyList = response.data.data.supplyList
243
+            this.doctorList = response.data.data.doctorList
244
+            for(let i=0;i<supplyList.length;i++){
245
+              this.supplyList.push(supplyList[i])
246
+            }
247
+         }
248
+       })
249
+     },
250
+     changeTypeName(){
251
+
252
+     },
253
+     getTimes(time) {
254
+      if (time === '') {
255
+      return ''
256
+      }
257
+      return uParseTime(time, '{y}-{m}-{d}')
258
+     },
259
+     getlist(){
260
+        var params = {
261
+          check_id:this.check_id,
262
+          start_time:this.getTimes(this.start_time),
263
+          end_time:this.getTimes(this.end_time),
264
+          keyword:this.keywords,
265
+          page:this.page,
266
+          limit:this.limit,
267
+        }
268
+       getAllPurchaseOrderList(params).then(response=>{
269
+          if(response.data.state == 1){
270
+            var list = response.data.data.list 
271
+            console.log("list2332232323232",list)
272
+            this.tableList = list
273
+            var total = response.data.data.total
274
+            this.total = total
275
+          }
276
+       })
277
+     },
278
+     getName(id){
279
+       var name = ""
280
+       for(let i=0;i<this.supplyList.length;i++){
281
+         if(id == this.supplyList[i].id){
282
+           name = this.supplyList[i].supplier_name
283
+         }
284
+       }
285
+       return name
286
+     },
287
+     getDocName(id){
288
+      var user_name = ""
289
+      for(let i=0;i<this.doctorList.length;i++){
290
+        if(id == this.doctorList[i].admin_user_id){
291
+          user_name = this.doctorList[i].user_name
292
+        }
293
+      }
294
+      return user_name
295
+     },
296
+     getAllBuyPrice(arr){
297
+       var buy_price = 0
298
+       if(arr!=undefined && arr.length > 0){
299
+          for(let i=0;i<arr.length;i++){
300
+            buy_price += (arr[i].count * arr[i].price)
301
+          }
302
+       }
303
+       return buy_price.toFixed(2)
304
+     },
305
+     getAllCount(arr){
306
+       var count = ""
307
+        if(arr!=undefined && arr.length > 0){
308
+          for(let i=0;i<arr.length;i++){
309
+            count += arr[i].count
310
+          }
311
+       }
312
+       return count
313
+     },
314
+     toClick(id){
315
+       this.$router.push({path:"/purchase/order/edit?id="+id})
316
+     }
317
+  },
318
+  created() {
319
+    var now = new Date(); //当前日期 
320
+    var nowMonth = now.getMonth(); //当前月 
321
+    var nowYear = now.getFullYear(); //当前年 
322
+    //本月的开始时间
323
+    var monthStartDate = new Date(nowYear, nowMonth, 1); 
324
+    this.start_time = monthStartDate
325
+    this.org_id =  this.$store.getters.xt_user.org_id
326
+    this.getAllSupply()
327
+    this.getlist()
328
+  },
329
+ 
330
+};
331
+</script>
332
+
333
+<style rel="stylesheet/css" lang="scss" scoped>
334
+.information {
335
+  border: 1px #dcdfe6 solid;
336
+  padding: 30px 20px 30px 20px;
337
+
338
+  .border {
339
+    border-bottom: 1px #dcdfe6 solid;
340
+    margin: 0px 0 20px 0;
341
+  }
342
+}
343
+
344
+.title {
345
+  background: #409eff;
346
+  height: 44px;
347
+  line-height: 44px;
348
+  padding: 0 0 0 10px;
349
+  color: #fff;
350
+  margin: 0 0 10px 0;
351
+}
352
+
353
+.edit_separater {
354
+  border-top: 1px solid rgb(233, 233, 233);
355
+  margin-top: 15px;
356
+  margin-bottom: 15px;
357
+}
358
+</style>
359
+
360
+<style>
361
+.sign-and-weigh-box .sign-and-weigh-box-patients .cell {
362
+  font-size: 12px;
363
+}
364
+
365
+.sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
366
+  background: #6fb5fa;
367
+}
368
+
369
+.count {
370
+  color: #bd2c00;
371
+}
372
+.el-table td,
373
+.el-table th.is-leaf,
374
+.el-table--border,
375
+.el-table--group {
376
+  border-color: #d0d3da;
377
+}
378
+.el-table--border::after,
379
+.el-table--group::after,
380
+.el-table::before {
381
+  background-color: #d0d3da;
382
+}
383
+
384
+</style>

+ 1 - 1
src/xt_pages/supply/purchaseOrderQuery.vue Näytä tiedosto

@@ -186,7 +186,7 @@ export default {
186 186
     return {
187 187
       crumbs: [
188 188
         { path: false, name: "采购管理" },
189
-        { path: "/spply/query", name: "供应商管理" }
189
+        { path: "/spply/query", name: "购货订单" }
190 190
       ],
191 191
       keywords: "",
192 192
       total: 0,