XMLWAN 3 лет назад
Родитель
Сommit
2c36ce15ff

+ 2 - 2
config/dev.env.js Просмотреть файл

7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  BASE_API: '"http://localhost:9531"',
10
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  // BASE_API: '"http://localhost:9531"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',
14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js Просмотреть файл

29
 
29
 
30
     // host: 'xt.test.sgjyun.com',
30
     // host: 'xt.test.sgjyun.com',
31
     //  host: 'xt.kuyicloud.com',
31
     //  host: 'xt.kuyicloud.com',
32
-    // host: 'xt.test.sgjyun.com',
33
-    host: 'localhost',
32
+    host: 'xt.test.sgjyun.com',
33
+    // host: 'localhost',
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
34
     port: 9528, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
35
     autoOpenBrowser: true,
35
     autoOpenBrowser: true,
36
     errorOverlay: true,
36
     errorOverlay: true,

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

8
       type="primary"
8
       type="primary"
9
       >打印
9
       >打印
10
     </el-button>
10
     </el-button>
11
+   
12
+    <el-button
13
+      style="float: right;margin-right:10px"
14
+      size="small"
15
+      @click="exportListDetal"
16
+      type="primary"
17
+      >明细导出
18
+    </el-button>
11
 
19
 
12
     <el-button
20
     <el-button
13
       style="float: right;margin-right:10px"
21
       style="float: right;margin-right:10px"
14
       size="small"
22
       size="small"
15
       @click="exportList"
23
       @click="exportList"
16
       type="primary"
24
       type="primary"
17
-      >导出
25
+      >汇总导出
18
     </el-button>
26
     </el-button>
19
 
27
 
20
     <div class="cell clearfix">
28
     <div class="cell clearfix">
40
           v-model="start_time"
48
           v-model="start_time"
41
           prefix-icon="el-icon-date"
49
           prefix-icon="el-icon-date"
42
           :editable="false"
50
           :editable="false"
43
-          style="width: 196px;"
51
+          style="width: 150px;"
44
           type="date"
52
           type="date"
45
           placeholder="选择日期时间"
53
           placeholder="选择日期时间"
46
           align="right"
54
           align="right"
54
           v-model="end_time"
62
           v-model="end_time"
55
           prefix-icon="el-icon-date"
63
           prefix-icon="el-icon-date"
56
           :editable="false"
64
           :editable="false"
57
-          style="width: 196px;"
65
+          style="width: 150px;"
58
           type="date"
66
           type="date"
59
           placeholder="选择日期时间"
67
           placeholder="选择日期时间"
60
           align="right"
68
           align="right"
398
           return false;
406
           return false;
399
         } else {
407
         } else {
400
           this.total = response.data.data.total;
408
           this.total = response.data.data.total;
401
-          var total_price = ""
402
-         
403
-        
409
+          var total_price = 0
410
+          console.log("收据3233232",response.data.data.list)
404
           for (let i = 0; i < response.data.data.list.length; i++) {
411
           for (let i = 0; i < response.data.data.list.length; i++) {
412
+            total_price += parseInt(response.data.data.list[i].warehousing_count) * response.data.data.list[i].price
405
             this.tableList.push(response.data.data.list[i])
413
             this.tableList.push(response.data.data.list[i])
406
             var obj = response.data.data.list[i];
414
             var obj = response.data.data.list[i];
407
             obj["is_total"] = 0;
415
             obj["is_total"] = 0;
411
           this.cancelStockDate.push({
419
           this.cancelStockDate.push({
412
             warehousing_order: "合计",
420
             warehousing_order: "合计",
413
             is_total: 1,
421
             is_total: 1,
414
-            total: response.data.data.total_price,
422
+            total:total_price.toFixed(2),
415
             Warehousing: {
423
             Warehousing: {
416
               warehousing_time: 0
424
               warehousing_time: 0
417
             }
425
             }
747
     
755
     
748
       exportList(){
756
       exportList(){
749
   
757
   
750
-        console.log("hhhh",this.tableInfo)
751
-       
752
         for(let i=0;i<this.tableInfo.length;i++){
758
         for(let i=0;i<this.tableInfo.length;i++){
753
           this.tableInfo[i].index = i+1  
759
           this.tableInfo[i].index = i+1  
754
           this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].price).toFixed(2) 
760
           this.tableInfo[i].total_price = (this.tableInfo[i].warehousing_count * this.tableInfo[i].price).toFixed(2) 
769
             this.downloadLoading = false
775
             this.downloadLoading = false
770
         })
776
         })
771
       },
777
       },
778
+      exportListDetal(){
779
+        var obj = {index:"合计",total_price:0}
780
+        var total_price = 0
781
+        for(let i=0;i<this.cancelStockDate.length;i++){
782
+          this.cancelStockDate[i].index = i + 1
783
+          this.cancelStockDate[i].good_type_name = this.typeName(this.cancelStockDate[i].good_type_id)
784
+          this.cancelStockDate[i].good_name = this.typeNameOne(this.cancelStockDate[i].good_id)
785
+          this.cancelStockDate[i].specification_name = this.specificationName(this.cancelStockDate[i].good_id)
786
+          this.cancelStockDate[i].warehousing_time = this.getTime(this.cancelStockDate[i].Warehousing.warehousing_time)
787
+          this.cancelStockDate[i].user_name = this.getXuserName(this.cancelStockDate[i].Warehousing.creater)
788
+          this.cancelStockDate[i].total_price = (this.cancelStockDate[i].warehousing_count * this.cancelStockDate[i].price).toFixed(2)
789
+          total_price += this.cancelStockDate[i].warehousing_count * this.cancelStockDate[i].price
790
+        }
791
+        obj.total_price = total_price.toFixed(2)
792
+        this.cancelStockDate.push(obj)
793
+        import('@/vendor/Export2Excel').then(excel => {
794
+        const tHeader = ['序号','单据编号', '耗材类型', '耗材名称','规格型号','操作时间','制单人','进货价','数量','总价']
795
+        const filterVal = ['index','warehousing_count', 'good_type_name', 'good_name','specification_name','warehousing_time','user_name','price','warehousing_count','total_price']
796
+        console.log("hhhhhhhh",this.cancelStockDate)
797
+      
798
+        
799
+        const data = this.formatJson(filterVal, this.cancelStockDate)
800
+        console.log("data222222222",data)
801
+          excel.export_json_to_excel({
802
+            header: tHeader,
803
+            data,
804
+            filename: '耗材入库明细'
805
+          })
806
+            this.downloadLoading = false
807
+        })
808
+      },
772
      formatJson(filterVal, jsonData) {
809
      formatJson(filterVal, jsonData) {
773
         return jsonData.map(v => filterVal.map(j => v[j]));
810
         return jsonData.map(v => filterVal.map(j => v[j]));
774
      },
811
      },

+ 23 - 3
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Просмотреть файл

126
                       placeholder="请输入批号"
126
                       placeholder="请输入批号"
127
                       v-model="scope.row.batch_number"
127
                       v-model="scope.row.batch_number"
128
                     ></el-input> -->
128
                     ></el-input> -->
129
-                    <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
129
+                    <el-select v-model="scope.row.batch_number" filterable placeholder="请选择" >
130
                       <el-option
130
                       <el-option
131
                         v-for="(item,index) in numberList"
131
                         v-for="(item,index) in numberList"
132
                         :key="index"
132
                         :key="index"
155
                     type="number"
155
                     type="number"
156
                     v-model="scope.row.count"
156
                     v-model="scope.row.count"
157
                   ></el-input>
157
                   ></el-input>
158
-                  <el-select v-model="scope.row.max_unit" filterable placeholder="请选择单位" style="width:80px">
158
+                  <el-select v-model="scope.row.max_unit" filterable placeholder="请选择单位" style="width:80px" @change="changeUnit(scope.row)">
159
                     <el-option
159
                     <el-option
160
                       v-for="(option, index) in unitList"
160
                       v-for="(option, index) in unitList"
161
                       :key="index"
161
                       :key="index"
686
             this.recordInfo.recordData[i].max_unit = val.max_unit
686
             this.recordInfo.recordData[i].max_unit = val.max_unit
687
             this.recordInfo.recordData[i].min_number = val.min_number
687
             this.recordInfo.recordData[i].min_number = val.min_number
688
             this.recordInfo.recordData[i].min_unit = val.min_unit
688
             this.recordInfo.recordData[i].min_unit = val.min_unit
689
-          
689
+            this.recordInfo.recordData[i].min_price = val.min_price
690
             this.recordInfo.recordData[i].number = val.number
690
             this.recordInfo.recordData[i].number = val.number
691
+            this.recordInfo.recordData[i].unit = val.max_unit
691
             if(val.retail_price == 0){
692
             if(val.retail_price == 0){
692
               this.recordInfo.recordData[i].price = ""
693
               this.recordInfo.recordData[i].price = ""
693
             }else{
694
             }else{
719
              this.numberList = list
720
              this.numberList = list
720
            }
721
            }
721
         })
722
         })
723
+      },
724
+      changeUnit(val){
725
+        console.log("val2323232322323",val,this.recordInfo.recordData)
726
+        this.getDrugBatchNumber(val.drug_id)
727
+        for(let i=0;i<this.recordInfo.recordData.length;i++){
728
+          if(this.recordInfo.recordData[i].drug_id == val.drug_id){
729
+             if(this.recordInfo.recordData[i].unit == val.max_unit){
730
+                this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price
731
+             }
732
+             if(this.recordInfo.recordData[i].min_unit == val.min_unit){
733
+               this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].min_price
734
+             }
735
+          }
736
+          for(let j=0;j<this.numberList.length;j++){
737
+            if(this.recordInfo.recordData[i].batch_number == this.numberList[j].id){
738
+               this.recordInfo.recordData[i].batch_number = this.numberList[j].batch_number
739
+            }
740
+          }
741
+        }
722
       }
742
       }
723
   },
743
   },
724
   created() {
744
   created() {

+ 48 - 17
src/xt_pages/stock/drugs/inventory.vue Просмотреть файл

111
         <el-dialog
111
         <el-dialog
112
         title="药品盘点"
112
         title="药品盘点"
113
         :visible.sync="dialogVisible"
113
         :visible.sync="dialogVisible"
114
-        width="1200px">
114
+        width="1200px"
115
+        class="addDrugsDialog">
115
             <el-form :model="form" class="modifyDialog" label-width="120px">
116
             <el-form :model="form" class="modifyDialog" label-width="120px">
116
                 <el-form-item label="药品ID">
117
                 <el-form-item label="药品ID">
117
                     <el-input v-model="form.drug_id" :disabled="true"></el-input>
118
                     <el-input v-model="form.drug_id" :disabled="true"></el-input>
147
                 <el-form-item label="规格">
148
                 <el-form-item label="规格">
148
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
149
                     <el-input v-model="form.specification_name" :disabled="true"></el-input>
149
                 </el-form-item>
150
                 </el-form-item>
150
-                <!-- <el-form-item label="单位">
151
-                    <el-input v-model="form.warehousing_unit" :disabled="true"></el-input>
152
-                </el-form-item> -->
153
-                 <el-form-item prop="max_unit" label="单位">
154
-                    <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="单位" @change="changeMaxUnit">
151
+                <el-form-item label="进货价">
152
+                    <el-input v-model="form.last_price" :disabled="true"></el-input>
153
+                </el-form-item>
154
+                <el-form-item label="零售价">
155
+                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
156
+                </el-form-item>
157
+
158
+                <div style="width:100%;display:flex;">
159
+                    <el-form-item prop="dose" label="盘点数量" >
160
+                      <el-input v-model="form.count" type="number" style="width:160px;" placeholder="盘点数量"></el-input>
161
+                    </el-form-item>
162
+                    <el-form-item prop="dose_unit" class="noMargin">
163
+                      <el-select v-model="form.warehousing_unit" style="width:160px;" placeholder="最大单位">
155
                       <el-option
164
                       <el-option
156
                         v-for="(item,index) in getDataConfig('hemodialysis','units')"
165
                         v-for="(item,index) in getDataConfig('hemodialysis','units')"
157
                         :key="index"
166
                         :key="index"
159
                         :value="item.name">
168
                         :value="item.name">
160
                       </el-option>
169
                       </el-option>
161
                     </el-select>
170
                     </el-select>
162
-                </el-form-item>
163
-                <el-form-item label="进货价">
164
-                    <el-input v-model="form.last_price" :disabled="true"></el-input>
165
-                </el-form-item>
166
-                <el-form-item label="零售价">
167
-                    <el-input v-model="form.retail_price" :disabled="true"></el-input>
168
-                </el-form-item>
169
-                <el-form-item label="盘点数量">
170
-                    <el-input v-model="form.count"></el-input>
171
-                </el-form-item>
171
+                    </el-form-item>
172
+                    <el-form-item prop="min_count" class="noMargin">
173
+                     <el-input v-model="form.min_count"  style="width:160px;margin-left:10px" placeholder="盘点数量"></el-input>
174
+                    </el-form-item>
175
+                    <el-form-item prop="min_unit" class="noMargin">
176
+                     <el-select v-model="form.min_unit"  style="width:160px;" placeholder="最小单位">
177
+                      <el-option
178
+                        v-for="(item,index) in getDataConfig('hemodialysis','units')"
179
+                        :key="index"
180
+                        :label="item.name"
181
+                        :value="item.name">
182
+                      </el-option>
183
+                    </el-select>
184
+                    </el-form-item>
185
+                </div>
186
+
172
                 <el-form-item label="库存">
187
                 <el-form-item label="库存">
173
                     <el-input v-model="form.total" :disabled="true"></el-input>
188
                     <el-input v-model="form.total" :disabled="true"></el-input>
174
                 </el-form-item>
189
                 </el-form-item>
572
                 expiry_date:"",
587
                 expiry_date:"",
573
                 warehouse_info_id:"",
588
                 warehouse_info_id:"",
574
                 proof_count:"",
589
                 proof_count:"",
590
+                min_count:"",
591
+                min_unit:"",
575
             },
592
             },
576
             total: 0,
593
             total: 0,
577
             editdialogVisible:false,
594
             editdialogVisible:false,
1137
     mounted() {
1154
     mounted() {
1138
     },
1155
     },
1139
 };
1156
 };
1140
-</script>
1157
+</script>
1158
+<style lang="scss">
1159
+    .addDrugsDialog {
1160
+
1161
+      .el-dialog__body {
1162
+          padding-top: 0px;
1163
+      }
1164
+      .noMargin{
1165
+        .el-form-item__content{
1166
+          margin-left: 0 !important;
1167
+        }
1168
+      }
1169
+
1170
+    }
1171
+</style>

+ 19 - 2
src/xt_pages/stock/drugs/query.vue Просмотреть файл

178
   export default {
178
   export default {
179
     name: 'stockIn',
179
     name: 'stockIn',
180
     created() {
180
     created() {
181
-      
181
+      var start_time =  window.sessionStorage.getItem('start_time')
182
+      var end_time =  window.sessionStorage.getItem('end_time')
183
+      console.log("start_time",start_time,end_time)
184
+      if(start_time !=null){
185
+        this.start_time = start_time
186
+      }
187
+      if(end_time!=null){
188
+        this.end_time = end_time
189
+      }
190
+      window.sessionStorage.removeItem('start_time')
191
+      window.sessionStorage.removeItem('end_time')
182
       this.getlist()
192
       this.getlist()
183
       var drugCategory = getDictionaryDataConfig('system','drug_category')
193
       var drugCategory = getDictionaryDataConfig('system','drug_category')
184
       this.drugCategory.push(...drugCategory)
194
       this.drugCategory.push(...drugCategory)
363
       },
373
       },
364
   
374
   
365
     startTimeChange: function(val) {
375
     startTimeChange: function(val) {
376
+      window.sessionStorage.removeItem('start_time')
366
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
377
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
367
-      
368
       if (time > 0) {
378
       if (time > 0) {
369
         this.$message.error("开始时间不能大于结束时间");
379
         this.$message.error("开始时间不能大于结束时间");
370
         this.start_time = "";
380
         this.start_time = "";
374
       }
384
       }
375
     },
385
     },
376
     endTimeChange: function(val) {
386
     endTimeChange: function(val) {
387
+      window.sessionStorage.removeItem('end_time')
377
       var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
388
       var time = this.getTimestamp(val) - this.getTimestamp(this.start_time);
378
       if (time < 0) {
389
       if (time < 0) {
379
         this.$message.error("结束时间不能小于开始时间");
390
         this.$message.error("结束时间不能小于开始时间");
462
         this.getlist()
473
         this.getlist()
463
       },
474
       },
464
       printOrder(){
475
       printOrder(){
476
+        window.sessionStorage.setItem('start_time',this.start_time)
477
+        window.sessionStorage.setItem('end_time',this.end_time)
465
         this.$router.push({
478
         this.$router.push({
466
           name: "drugQueryPrint",
479
           name: "drugQueryPrint",
467
           query: {drug_type:this.drug_type,keyword:this.keywords,start_time:this.start_time,end_time:this.end_time,page:this.page,limit:this.limit}
480
           query: {drug_type:this.drug_type,keyword:this.keywords,start_time:this.start_time,end_time:this.end_time,page:this.page,limit:this.limit}
497
         }
510
         }
498
         var unit =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
511
         var unit =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
499
         var overPlus = this.getOverFlushInfo(val.drug_warehouse_info,val.max_unit,val.min_unit,val.min_number)
512
         var overPlus = this.getOverFlushInfo(val.drug_warehouse_info,val.max_unit,val.min_unit,val.min_number)
513
+        window.sessionStorage.setItem('start_time',this.start_time)
514
+        window.sessionStorage.setItem('end_time',this.end_time)
500
         this.$router.push({path:'/drugstock/in/drugstockflow?drug_id='+val.id+"&drug_name="+val.drug_name+"&manufacturer="+manufacturer_name+"&unit="+unit+"&min_number="+val.min_number+"&max_unit="+val.max_unit+"&min_unit="+val.min_unit+"&overPlus="+overPlus})
515
         this.$router.push({path:'/drugstock/in/drugstockflow?drug_id='+val.id+"&drug_name="+val.drug_name+"&manufacturer="+manufacturer_name+"&unit="+unit+"&min_number="+val.min_number+"&max_unit="+val.max_unit+"&min_unit="+val.min_unit+"&overPlus="+overPlus})
501
       },
516
       },
502
       handleBatch(val){
517
       handleBatch(val){
508
         }
523
         }
509
         var unit =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
524
         var unit =  val.dose + val.dose_unit +"*"+val.min_number+val.min_unit+"/"+val.max_unit
510
         var overPlus = this.getOverFlushInfo(val.drug_warehouse_info,val.max_unit,val.min_unit,val.min_number)
525
         var overPlus = this.getOverFlushInfo(val.drug_warehouse_info,val.max_unit,val.min_unit,val.min_number)
526
+        window.sessionStorage.setItem('start_time',this.start_time)
527
+        window.sessionStorage.setItem('end_time',this.end_time)
511
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+val.id+"&drug_name="+val.drug_name+"&manufacturer="+manufacturer_name+"&unit="+unit+"&min_number="+val.min_number+"&max_unit="+val.max_unit+"&min_unit="+val.min_unit+"&overPlus="+overPlus})
528
         this.$router.push({path:'/drugstock/in/drugbatchnumber?drug_id='+val.id+"&drug_name="+val.drug_name+"&manufacturer="+manufacturer_name+"&unit="+unit+"&min_number="+val.min_number+"&max_unit="+val.max_unit+"&min_unit="+val.min_unit+"&overPlus="+overPlus})
512
       },
529
       },
513
       getDrugCountList(){
530
       getDrugCountList(){

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

520
        }
520
        }
521
       specification_name = val.specification_name + "/" + val.packing_unit
521
       specification_name = val.specification_name + "/" + val.packing_unit
522
       var overCount  = this.getOverplus(val.xt_warehouse_info)
522
       var overCount  = this.getOverplus(val.xt_warehouse_info)
523
+      window.sessionStorage.setItem('start_time',this.start_time)
524
+      window.sessionStorage.setItem('end_time',this.end_time)
523
       this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
525
       this.$router.push({path:"/stock/in/stockflow?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
524
     },
526
     },
525
     toClickOne(val){
527
     toClickOne(val){
531
           }
533
           }
532
        }
534
        }
533
       specification_name = val.specification_name + "/" + val.packing_unit
535
       specification_name = val.specification_name + "/" + val.packing_unit
534
-       var overCount  = this.getOverplus(val.xt_warehouse_info)
536
+      var overCount  = this.getOverplus(val.xt_warehouse_info)
537
+      window.sessionStorage.setItem('start_time',this.start_time)
538
+      window.sessionStorage.setItem('end_time',this.end_time)
535
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
539
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name+"&specification_name="+specification_name+"&packing_unit="+val.packing_unit+"&overCount="+overCount})
536
     },
540
     },
537
     getStockDrugCount(){
541
     getStockDrugCount(){