XMLWAN 3 years ago
parent
commit
aee2ea8312

+ 2 - 2
config/index.js View File

@@ -27,10 +27,10 @@ module.exports = {
27 27
     // can be overwritten by process.env.HOST
28 28
     // if you want dev by ip, please set host: '0.0.0.0'
29 29
 
30
-     // host: 'xt.test.sgjyun.com',
30
+    host: 'xt.test.sgjyun.com',
31 31
     //  host: 'xt.kuyicloud.com',
32 32
     // host: 'xt.test.sgjyun.com',
33
-    host: 'localhost',
33
+    // host: 'localhost',
34 34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35 35
     autoOpenBrowser: true,
36 36
     errorOverlay: true,

+ 9 - 6
src/router/index_路由未分离前.js View File

@@ -604,7 +604,7 @@ export const xt_asyncRouterMap = [
604 604
         name: 'weight',
605 605
         meta: { title: 'weight', noCache: true }
606 606
       },
607
-   
607
+
608 608
       {
609 609
         path: '/patients/patient/:id/dialysisRecord',
610 610
         component: () => import('@/xt_pages/user/dialysisRecord'),
@@ -860,21 +860,24 @@ export const xt_asyncRouterMap = [
860 860
         hidden: true,
861 861
         is_menu: false,
862 862
         meta: { title: 'stockOutOrderAdd', noCache: true }
863
-      }, {
863
+      },
864
+      {
864 865
         path: '/stock/out/detail',
865 866
         component: () => import('@/xt_pages/stock/stockOutDetail'),
866 867
         name: 'stockOutDetail',
867 868
         hidden: true,
868 869
         is_menu: false,
869 870
         meta: { title: 'stockOutDetail', noCache: true }
870
-      }, {
871
+      },
872
+      {
871 873
         path: '/stock/cancel/add',
872 874
         component: () => import('@/xt_pages/stock/cancelStockOrderAdd'),
873 875
         name: 'cancelStockOrderAdd',
874 876
         hidden: true,
875 877
         is_menu: false,
876 878
         meta: { title: 'cancelStockOrderAdd', noCache: true }
877
-      }, {
879
+      },
880
+      {
878 881
         path: '/stock/cancel/detail',
879 882
         component: () => import('@/xt_pages/stock/cancelStockDetail'),
880 883
         name: 'cancelStockDetail',
@@ -887,8 +890,8 @@ export const xt_asyncRouterMap = [
887 890
         component: () => import('@/xt_pages/stock/index'),
888 891
         name: 'config',
889 892
         meta: { title: 'config' }
890
-      },
891
-     
893
+      }
894
+
892 895
     ]
893 896
   },
894 897
   {

+ 52 - 43
src/router/modules/drugs.js View File

@@ -13,40 +13,40 @@ export default {
13 13
   },
14 14
   children: [
15 15
     {
16
-        path: '/stock/drugs/stock/query',
17
-        component: () => import('@/xt_pages/stock/drugs/query'),
18
-        name: 'drugsQuery',
19
-        meta: { title: 'drugsQuery', noCache: true }
16
+      path: '/stock/drugs/stock/query',
17
+      component: () => import('@/xt_pages/stock/drugs/query'),
18
+      name: 'drugsQuery',
19
+      meta: { title: 'drugsQuery', noCache: true }
20 20
     },
21 21
     {
22
-        path: '/stock/drugs/stock/in',
23
-        component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),
24
-        name: 'drugsStockIn',
25
-        meta: { title: 'drugsStockIn', noCache: true }
22
+      path: '/stock/drugs/stock/in',
23
+      component: () => import('@/xt_pages/stock/drugs/drugStockInOrder'),
24
+      name: 'drugsStockIn',
25
+      meta: { title: 'drugsStockIn', noCache: true }
26 26
     },
27 27
     {
28
-        path: '/stock/drugs/stock/out',
29
-        component: () => import('@/xt_pages/stock/drugs/drugStockOutOrder'),
30
-        name: 'drugsStockOut',
31
-        meta: { title: 'drugsStockOut', noCache: true }
28
+      path: '/stock/drugs/stock/out',
29
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrder'),
30
+      name: 'drugsStockOut',
31
+      meta: { title: 'drugsStockOut', noCache: true }
32 32
     },
33 33
     {
34
-        path: '/stock/drugs/stock/return',
35
-        component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
-        name: 'drugsStockReturn',
37
-        meta: { title: 'drugsStockReturn', noCache: true }
34
+      path: '/stock/drugs/stock/return',
35
+      component: () => import('@/xt_pages/stock/drugs/drugSalesReturnOrder'),
36
+      name: 'drugsStockReturn',
37
+      meta: { title: 'drugsStockReturn', noCache: true }
38 38
     },
39 39
     {
40
-        path: '/stock/drugs/stock/cancel',
41
-        component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
-        name: 'drugsStockCancel',
43
-        meta: { title: 'drugsStockCancel', noCache: true }
40
+      path: '/stock/drugs/stock/cancel',
41
+      component: () => import('@/xt_pages/stock/drugs/cancelDrugStockOrder'),
42
+      name: 'drugsStockCancel',
43
+      meta: { title: 'drugsStockCancel', noCache: true }
44 44
     },
45 45
     {
46
-      path:'/stock/drugs/stock/detail',
47
-      component:()=>import('@/xt_pages/stock/drugs/drugIndex'),
48
-      name:'drugDetail',
49
-      meta:{title:'明细查询',noCache:true}
46
+      path: '/stock/drugs/stock/detail',
47
+      component: () => import('@/xt_pages/stock/drugs/drugIndex'),
48
+      name: 'drugDetail',
49
+      meta: { title: '明细查询', noCache: true }
50 50
     },
51 51
     // {
52 52
     //     path: '/stock/drugs/stock/adjustPrice',
@@ -122,7 +122,7 @@ export default {
122 122
       hidden: true,
123 123
       is_menu: false,
124 124
       meta: { title: 'cancelDrugStockOrderAdd', noCache: true }
125
-    },{
125
+    }, {
126 126
       path: '/drugstock/cancel/detail',
127 127
       component: () => import('@/xt_pages/stock/drugs/cancelDrugStockDetail'),
128 128
       name: 'cancelDrugStockDetail',
@@ -139,31 +139,40 @@ export default {
139 139
       meta: { title: 'drugStockUserDetail', noCache: true }
140 140
     },
141 141
 
142
-    //编辑药品入库单
142
+    // 编辑药品入库单
143 143
     {
144
-      path:'/drugstock/in/order/edit',
145
-      component:()=>import('@/xt_pages/stock/drugs/drugStockInOrderEdit'),
146
-      name:'drugStockInOrderEdit',
147
-      hidden:true,
148
-      is_menu:false,
144
+      path: '/drugstock/in/order/edit',
145
+      component: () => import('@/xt_pages/stock/drugs/drugStockInOrderEdit'),
146
+      name: 'drugStockInOrderEdit',
147
+      hidden: true,
148
+      is_menu: false,
149 149
       meta: { title: 'drugStockInOrderEdit', noCache: true }
150 150
     },
151 151
 
152 152
     {
153
-      path:'/drugstock/in/drugstockflow',
154
-      component:()=>import('@/xt_pages/stock/drugs/drugStockFlow'),
155
-      name:"drugStockFlow",
156
-      hidden:true,
157
-      is_menu:false,
158
-      meta:{title:"drugStockFlow",noCache:true}
153
+      path: '/drugstock/in/drugstockflow',
154
+      component: () => import('@/xt_pages/stock/drugs/drugStockFlow'),
155
+      name: 'drugStockFlow',
156
+      hidden: true,
157
+      is_menu: false,
158
+      meta: { title: 'drugStockFlow', noCache: true }
159
+    },
160
+    {
161
+      path: '/drugstock/in/drugbatchnumber',
162
+      component: () => import('@/xt_pages/stock/drugs/drugBatchNumber'),
163
+      name: 'drugBatchNumber',
164
+      hidden: true,
165
+      is_menu: false,
166
+      meta: { title: 'drugBatchNumber', noCache: true }
159 167
     },
160 168
     {
161
-      path:'/drugstock/in/drugbatchnumber',
162
-      component:()=>import('@/xt_pages/stock/drugs/drugBatchNumber'),
163
-      name:"drugBatchNumber",
164
-      hidden:true,
165
-      is_menu:false,
166
-      meta:{title:"drugBatchNumber",noCache:true}
169
+      path: '/stock/stockoutorderedit',
170
+      component: () => import('@/xt_pages/stock/stockOutOrderEdit'),
171
+      name: 'stockOutOrderEdit',
172
+      hidden: true,
173
+      is_menu: false,
174
+      meta: { title: 'stockOutOrderEdit', noCache: true }
167 175
     }
176
+
168 177
   ]
169 178
 }

+ 6 - 3
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue View File

@@ -1308,13 +1308,16 @@
1308 1308
                 type: 'success',
1309 1309
                 duration: 2000
1310 1310
               })
1311
+              var msg = response.data.data.msg
1312
+              if(msg == "ok"){
1313
+                 this.$message.error("请入库,库存不足")
1314
+              }
1315
+            
1311 1316
               var exid = response.data.data.advice.id
1312 1317
               if (response.data.data.advice.parent_id > 0) {
1313 1318
                 exid = response.data.data.advice.parent_id
1314 1319
               }
1315
-              // if (this.currentRow.parent_id > 0) {
1316
-              //     exid = this.currentRow.parent_id;
1317
-              // }
1320
+             
1318 1321
               this.currentRow.execution_state = 1
1319 1322
               this.currentRow.execution_staff =
1320 1323
                 response.data.data.advice.execution_staff

+ 6 - 21
src/xt_pages/stock/stockOutOrder.vue View File

@@ -552,22 +552,6 @@ export default {
552 552
     nowMonth = nowDate.getMonth() + 1;
553 553
     nowDay = nowDate.getDate();
554 554
 
555
-
556
-      
557
-    // var date1 = new Date();
558
-    // var date2 = new Date(date1);
559
-
560
-    // //-30为30天前,+30可以获得30天后的日期
561
-    // date2.setDate(date1.getDate() - 30);
562
-
563
-    // //30天前(月份判断是否小于10,小于10的前面+0)
564
-    // var agoDay = `${date2.getFullYear()}-${date2.getMonth() + 1<10?`0${date2.getMonth() + 1}`:date2.getMonth() + 1}-${date2.getDate()}`;
565
-      
566
-    // //当前日期
567
-    // var nowDay = `${date1.getFullYear()}-${date1.getMonth() + 1<10?`0${date1.getMonth() + 1}`:date1.getMonth() + 1}-${date1.getDate()}`;
568
-
569
-    //  this.start_time = agoDay
570
-    //  console.log("333333332222",this.start_time)
571 555
     this.start_time =
572 556
       nowYear +
573 557
       "-" +
@@ -815,11 +799,12 @@ export default {
815 799
       }
816 800
     },
817 801
     handleEdit: function(index, row) {
818
-      
819
-      this.$router.push({
820
-        name: "stockOutDetail",
821
-        query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
822
-      });
802
+      // this.$router.push({
803
+      //   name: "stockOutDetail",
804
+      //   query: { id: row.id, type: this.type,warehouse_out_time:row.warehouse_out_time }
805
+      // });
806
+      this.$router.push({path:'/stock/stockoutorderedit?id='+row.id})
807
+       
823 808
     },
824 809
     handleDelete: function(index, row) {
825 810
       const ids = [];

+ 2 - 3
src/xt_pages/stock/stockOutOrderAdd.vue View File

@@ -140,7 +140,6 @@
140 140
                   placeholder="请输入商品类型"
141 141
                   v-model="scope.row.good_type_id"
142 142
                   :value="typeName(scope.row.good_type_id)"
143
-                  @focus="showDialog(scope.$index, scope.row)"
144 143
                 ></el-input>
145 144
               </el-form-item>
146 145
             </template>
@@ -654,9 +653,9 @@ export default {
654 653
             this.recordInfo.recordData[i].price = val.buy_price
655 654
             this.recordInfo.recordData[i].specification_name = val.specification_name
656 655
             this.recordInfo.recordData[i].good_id = val.id
657
-          }
658
-        }
656
+         }
659 657
       }
658
+    }
660 659
   },
661 660
   created() {
662 661
     var nowDate = new Date();

+ 101 - 16
src/xt_pages/stock/stockOutOrderEdit.vue View File

@@ -13,13 +13,7 @@
13 13
 
14 14
     <div class="app-container">
15 15
 
16
-      <!--<stock-in-dialog-->
17
-        <!--ref="dialog"-->
18
-        <!--:propForm="propForm"-->
19
-        <!--:visibility="isVisibility"-->
20
-        <!--v-on:dialog-comfirm="comfirm"-->
21
-        <!--v-on:dialog-cancle="cancle"-->
22
-      <!--&gt;</stock-in-dialog>-->
16
+  
23 17
       <stock-in-dialog
24 18
         ref="dialog"
25 19
         :propForm="propForm"
@@ -69,22 +63,61 @@
69 63
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
70 64
         >
71 65
 
72
-          <el-table-column min-width="35" align="center">
73
-
66
+       
67
+          <el-table-column width="150" align="center">
68
+              <template slot="header" slot-scope="scope">
69
+                <span>耗材名称</span>
70
+              </template>
71
+
72
+              <template slot-scope="scope">
73
+                <el-form-item style="padding-top: 15px">
74
+                  <el-autocomplete
75
+                      class="checkSearch"
76
+                      popper-class="my-autocomplete"
77
+                      v-model="scope.row.good_name"
78
+                      :fetch-suggestions="querySearchAsync"
79
+                      :trigger-on-focus="false"
80
+                      placeholder="请输入病人名字"
81
+                      @select="handleSelect"
82
+                      @input="changeGoodName(scope.$index)"
83
+                      style="width:150px;"
84
+                    >
85
+                      <i class="el-icon-search el-input__icon" slot="suffix"></i>
86
+                    <template slot-scope="{ item }">
87
+                      <div class="name">{{ item.good_name }}</div>
88
+                    </template>
89
+                  </el-autocomplete>
90
+                </el-form-item>
91
+              </template>
92
+            </el-table-column>
93
+           <el-table-column width="150" align="center">
74 94
             <template slot="header" slot-scope="scope">
75 95
               <span>耗材类型<span style="color: red">*</span></span>
76 96
             </template>
77 97
 
78 98
             <template slot-scope="scope">
79 99
               <el-form-item style="padding-top: 15px">
80
-                <el-input placeholder="请输入商品类型" v-model="scope.row.good_type_id"
81
-                          :value="typeName(scope.row.good_type_id)"
82
-                          @focus="showDialog(scope.$index, scope.row)"></el-input>
100
+                <el-input
101
+                  placeholder="请输入商品类型"
102
+                  v-model="scope.row.good_type_id"
103
+                  :value="typeName(scope.row.good_type_id)"
104
+                ></el-input>
83 105
               </el-form-item>
84 106
             </template>
85 107
           </el-table-column>
86 108
           
87
-          <el-table-column min-width="35" align="center">
109
+             
110
+          <el-table-column width="150" align="center">
111
+            <template slot="header" slot-scope="scope">
112
+              <span>规格&&单位<span style="color: red">*</span></span>
113
+            </template>
114
+            <template slot-scope="scope">
115
+              <el-form-item style="padding-top: 15px">
116
+                <el-input v-model="scope.row.name"></el-input>
117
+              </el-form-item>
118
+            </template>
119
+          </el-table-column>
120
+          <!-- <el-table-column min-width="35" align="center">
88 121
             <template slot="header" slot-scope="scope">
89 122
               <span>规格名称<span style="color: red">*</span></span>
90 123
             </template>
@@ -97,7 +130,7 @@
97 130
               </el-form-item>
98 131
 
99 132
             </template>
100
-          </el-table-column>
133
+          </el-table-column> -->
101 134
 
102 135
 
103 136
           <el-table-column min-width="23" align="center">
@@ -171,13 +204,13 @@
171 204
 <script>
172 205
   import { uParseTime } from '@/utils/tools'
173 206
 
174
-  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID } from '@/api/stock'
207
+  import { deleteWarehouseOutInfo, editWarehouseoutInfo, getSalesReturnConfig, getWarehouseOutInfo,GetAllConfig,GetAllGoodInfoByID,postSearchGoodList } from '@/api/stock'
175 208
   import BreadCrumb from '../components/bread-crumb'
176 209
   import StockInDialog from './Dialog/stockInDialog'
177 210
 
178 211
   export default {
179 212
     components: { StockInDialog, BreadCrumb},
180
-    name: 'salesReturnEdit',
213
+    name: 'stockOutOrderEdit',
181 214
 
182 215
     data() {
183 216
       return {
@@ -443,6 +476,8 @@
443 476
             const params = {
444 477
               'stockOut': this.recordInfo.recordData
445 478
             }
479
+            console.log("9999999",stockOut)
480
+            return
446 481
             editWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
447 482
               if (response.data.state == 0) {
448 483
                 this.$message.error(response.data.msg)
@@ -465,9 +500,12 @@
465 500
             this.$message.error(response.data.msg)
466 501
             return false
467 502
           } else {
503
+            console.log("详情",response.data.data.list)
468 504
             for (let i = 0; i < response.data.data.list.length; i++) {
469 505
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
470 506
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
507
+              response.data.data.list[i].good_name = response.data.data.list[i].GoodInfo.good_name
508
+              response.data.data.list[i].name = response.data.data.list[i].GoodInfo.good_name + "*" + response.data.data.list[i].GoodInfo.specification_name
471 509
               this.recordInfo.recordData.push(response.data.data.list[i])
472 510
             }
473 511
             this.warehouseOut = response.data.data.info
@@ -497,7 +535,54 @@
497 535
         this.propForm.manufacturer = val
498 536
       }, changeDealer(val) {
499 537
         this.propForm.dealer = val
538
+      },
539
+       querySearchAsync(keyword, cb) {
540
+      let key = '';
541
+      if (keyword != undefined) {
542
+        key = keyword
500 543
       }
544
+      console.log("keyrowrd",key)
545
+      postSearchGoodList(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          
548
+            var list = response.data.data.list
549
+            this.goodList = list
550
+            var manufacturerList = response.data.data.manufacturerList
551
+            this.manufacturerList = manufacturerList
552
+            for(let i=0;i<this.goodList.length;i++){
553
+              for(let j=0;j<this.manufacturerList.length;j++){
554
+                if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
555
+                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
556
+                }
557
+              }
558
+            }
559
+          
560
+            cb(this.goodList)
561
+        } else {
562
+          cb([])
563
+        }
564
+      })
565
+    },
566
+    changeGoodName(val){
567
+      this.currentIndex = val
568
+    },
569
+    handleSelect(val){
570
+      console.log("val",val)
571
+        for(let i=0;i<this.recordInfo.recordData.length;i++){
572
+          if(this.currentIndex == i){
573
+            this.recordInfo.recordData[i].good_type_id = val.id
574
+            this.recordInfo.recordData[i].good_name = val.good_name
575
+            this.recordInfo.recordData[i].good_type_id = val.good_type_id
576
+            this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit +"/"+val.packing_unit
577
+            // this.recordInfo.recordData[i].number =  val.number
578
+            this.recordInfo.recordData[i].manufacturer = val.manufacturer
579
+            this.recordInfo.recordData[i].remark = val.remark
580
+            this.recordInfo.recordData[i].price = val.buy_price
581
+            this.recordInfo.recordData[i].specification_name = val.specification_name
582
+            this.recordInfo.recordData[i].good_id = val.id
583
+         }
584
+      }
585
+    }
501 586
     },
502 587
     created() {
503 588
       this.GetConfigInfo()