Ver código fonte

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 anos atrás
pai
commit
6aa50bd77a
28 arquivos alterados com 264 adições e 142 exclusões
  1. 3 1
      src/lang/zh.js
  2. 1 0
      src/xt_pages/data/components/templateTable.vue
  3. 6 4
      src/xt_pages/data/druguseTemplate.vue
  4. 3 1
      src/xt_pages/data/template.vue
  5. 3 2
      src/xt_pages/stock/cancelStockOrderAdd.vue
  6. 4 3
      src/xt_pages/stock/cancelStockOrderEdit.vue
  7. 3 1
      src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue
  8. 2 1
      src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue
  9. 8 7
      src/xt_pages/stock/drugs/components/drugCancelDetail.vue
  10. 1 1
      src/xt_pages/stock/drugs/components/drugOutDetail.vue
  11. 3 2
      src/xt_pages/stock/drugs/drugBatchNumber.vue
  12. 1 1
      src/xt_pages/stock/drugs/drugCancelDetailPrint.vue
  13. 2 2
      src/xt_pages/stock/drugs/drugIndex.vue
  14. 3 1
      src/xt_pages/stock/drugs/drugStockFlow.vue
  15. 4 5
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  16. 3 2
      src/xt_pages/stock/drugs/drugStockInOrderAdd.vue
  17. 2 2
      src/xt_pages/stock/drugs/drugStockInOrderEdit.vue
  18. 103 73
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  19. 1 1
      src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue
  20. 70 15
      src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue
  21. 2 2
      src/xt_pages/stock/stockFlow.vue
  22. 2 2
      src/xt_pages/stock/stockInOrderAdd.vue
  23. 3 6
      src/xt_pages/stock/stockInOrderEdit.vue
  24. 18 3
      src/xt_pages/stock/stockOutOrder.vue
  25. 1 0
      src/xt_pages/stock/stockOutOrderAdd.vue
  26. 1 1
      src/xt_pages/stock/stockOutOrderEdit.vue
  27. 4 2
      src/xt_pages/upload/fast/FastProvince.vue
  28. 7 1
      src/xt_pages/user/components/PatientDetail.vue

+ 3 - 1
src/lang/zh.js Ver arquivo

355
     rescue_record: '抢救记录',
355
     rescue_record: '抢救记录',
356
     manage_ment: '设备管理',
356
     manage_ment: '设备管理',
357
     nursing_record: '透析护理记录',
357
     nursing_record: '透析护理记录',
358
-    special_record: '特殊记录'
358
+    special_record: '特殊记录',
359
+    template_summary: '治疗小结',
360
+    template_plan: '个性化方案'
359
   }
361
   }
360
 }
362
 }

+ 1 - 0
src/xt_pages/data/components/templateTable.vue Ver arquivo

354
         }
354
         }
355
 
355
 
356
         if (valid) {
356
         if (valid) {
357
+           
357
           createConfig(this.temp).then(response => {
358
           createConfig(this.temp).then(response => {
358
             if (!response.data) {
359
             if (!response.data) {
359
               // 由于mockjs 不支持自定义状态码只能这样hack
360
               // 由于mockjs 不支持自定义状态码只能这样hack

+ 6 - 4
src/xt_pages/data/druguseTemplate.vue Ver arquivo

1817
         })
1817
         })
1818
       },
1818
       },
1819
       handleSelect1(){
1819
       handleSelect1(){
1820
-
1820
+       this.templateForm.drug_id =  val.id
1821
       },
1821
       },
1822
-      handleSelect(){
1823
-
1822
+      handleSelect(val){
1823
+        console.log("val23232",val)
1824
+        this.templateForm.drug_id =  val.id
1824
       },
1825
       },
1825
       submitTemplate(formName) {
1826
       submitTemplate(formName) {
1826
 
1827
 
2376
           this.templateForm.week_days = this.templateForm.weekday.filter(function(s) {
2377
           this.templateForm.week_days = this.templateForm.weekday.filter(function(s) {
2377
             return s && s.trim()
2378
             return s && s.trim()
2378
           }).join(',')
2379
           }).join(',')
2380
+          this.templateForm.way = 1
2379
         }
2381
         }
2380
         console.log("编辑模板",this.templateForm)
2382
         console.log("编辑模板",this.templateForm)
2381
-
2383
+      
2382
         // 编辑创建医嘱模版
2384
         // 编辑创建医嘱模版
2383
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
2385
         CreateSingleAdviceTemplate(this.templateForm).then(response => {
2384
           if (response.data.state == 0) {
2386
           if (response.data.state == 0) {

+ 3 - 1
src/xt_pages/data/template.vue Ver arquivo

45
         { label: this.$t("data_config.nursing_record"), key: "nursing_record" },
45
         { label: this.$t("data_config.nursing_record"), key: "nursing_record" },
46
         { label: this.$t("data_config.special_record"), key: "special_record" },
46
         { label: this.$t("data_config.special_record"), key: "special_record" },
47
         { label: this.$t("data_config.course_disease"), key: "course_disease" },
47
         { label: this.$t("data_config.course_disease"), key: "course_disease" },
48
-        { label: this.$t("data_config.rescue_record"), key: "rescue_record" }
48
+        { label: this.$t("data_config.rescue_record"), key: "rescue_record" },
49
+        // { label: this.$t("data_config.template_summary"), key: "template_summary" },
50
+        // { label: this.$t("data_config.template_plan"), key: "template_plan" }
49
       ],
51
       ],
50
       activeName: "education",
52
       activeName: "education",
51
       createdTimes: 0
53
       createdTimes: 0

+ 3 - 2
src/xt_pages/stock/cancelStockOrderAdd.vue Ver arquivo

109
                 style="padding-top: 17px"
109
                 style="padding-top: 17px"
110
               >
110
               >
111
                 <el-input
111
                 <el-input
112
+                  oninput="value=value.replace(/\D|^0/g,'')"
112
                   placeholder="请输入退库数量"
113
                   placeholder="请输入退库数量"
113
                   type="number"
114
                   type="number"
114
                   v-model="scope.row.return_count"
115
                   v-model="scope.row.return_count"
128
                 style="padding-top: 17px"
129
                 style="padding-top: 17px"
129
               >
130
               >
130
                 <el-input
131
                 <el-input
131
-                 oninput="value=value.replace(/[^0-9.]/g,'')"
132
-                  placeholder="请输入退库数量"
132
+                 
133
+                  placeholder="请输入单价"
133
                   type="number"
134
                   type="number"
134
                   v-model="scope.row.price"
135
                   v-model="scope.row.price"
135
                 ></el-input>      
136
                 ></el-input>      

+ 4 - 3
src/xt_pages/stock/cancelStockOrderEdit.vue Ver arquivo

75
             <template slot-scope="scope">
75
             <template slot-scope="scope">
76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
76
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
77
                             style="padding-top: 17px">
77
                             style="padding-top: 17px">
78
-                <el-input type="number" v-model="scope.row.count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
78
+                <el-input type="number" v-model="scope.row.count"  oninput="value=value.replace(/\D|^0/g,'')"></el-input>
79
               </el-form-item>
79
               </el-form-item>
80
             </template>
80
             </template>
81
           </el-table-column>
81
           </el-table-column>
82
           <el-table-column width="150" align="center">
82
           <el-table-column width="150" align="center">
83
             <template slot="header" slot-scope="scope">
83
             <template slot="header" slot-scope="scope">
84
-              <span>退库单价<span style="color: red">*</span></span>
84
+              <span>单价<span style="color: red">*</span></span>
85
             </template>
85
             </template>
86
             <template slot-scope="scope">
86
             <template slot-scope="scope">
87
               <el-form-item
87
               <el-form-item
90
                 style="padding-top: 17px"
90
                 style="padding-top: 17px"
91
               >
91
               >
92
                 <el-input
92
                 <el-input
93
-                  placeholder="请输入退库数量"
93
+                  placeholder="请输入单价"
94
                   type="number"
94
                   type="number"
95
                   v-model="scope.row.price"
95
                   v-model="scope.row.price"
96
                 ></el-input>      
96
                 ></el-input>      
513
               'cancelStock': this.recordInfo.recordData
513
               'cancelStock': this.recordInfo.recordData
514
             }
514
             }
515
             console.log("parasm23232",params)
515
             console.log("parasm23232",params)
516
+         
516
             editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
517
             editCancelStockInfo(params, this.return_time, this.$route.query.id, this.$route.query.type,this.form.manufacturer,this.form.dealer).then(response => {
517
               if (response.data.state == 0) {
518
               if (response.data.state == 0) {
518
                 this.$message.error(response.data.msg)
519
                 this.$message.error(response.data.msg)

+ 3 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrderAdd.vue Ver arquivo

155
               >
155
               >
156
               <div style="display:flex;">
156
               <div style="display:flex;">
157
                 <el-input
157
                 <el-input
158
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
158
+                   oninput="value=value.replace(/\D|^0/g,'')"
159
                   style="width:100px"
159
                   style="width:100px"
160
                   placeholder="请输入退库数量"
160
                   placeholder="请输入退库数量"
161
                   type="number"
161
                   type="number"
691
         this.currentIndex = val
691
         this.currentIndex = val
692
       },
692
       },
693
       handleSelect(val){
693
       handleSelect(val){
694
+         console.log("val23232",val)
694
          this.getDrugBatchNumber(val.id)
695
          this.getDrugBatchNumber(val.id)
695
          for(let i=0;i<this.recordInfo.recordData.length;i++){
696
          for(let i=0;i<this.recordInfo.recordData.length;i++){
696
            if(i == this.currentIndex){
697
            if(i == this.currentIndex){
699
              this.recordInfo.recordData[i].drug_type = val.drug_type
700
              this.recordInfo.recordData[i].drug_type = val.drug_type
700
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
701
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
701
              this.recordInfo.recordData[i].last_price = val.last_price
702
              this.recordInfo.recordData[i].last_price = val.last_price
703
+             this.recordInfo.recordData[i].price = val.last_price
702
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
704
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
703
              this.recordInfo.recordData[i].number =  val.number
705
              this.recordInfo.recordData[i].number =  val.number
704
              this.recordInfo.recordData[i].max_unit = val.max_unit
706
              this.recordInfo.recordData[i].max_unit = val.max_unit

+ 2 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrderEdit.vue Ver arquivo

81
               >
81
               >
82
               <div style="display:flex;">
82
               <div style="display:flex;">
83
                 <el-input
83
                 <el-input
84
-                 oninput="value=value.replace(/[^0-9.]/g,'')"
84
+                 oninput="value=value.replace(/\D|^0/g,'')"
85
                   style="width:100px"
85
                   style="width:100px"
86
                   placeholder="请输入退库数量"
86
                   placeholder="请输入退库数量"
87
                   type="number"
87
                   type="number"
668
              this.recordInfo.recordData[i].drug_type = val.drug_type
668
              this.recordInfo.recordData[i].drug_type = val.drug_type
669
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
669
              this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
670
              this.recordInfo.recordData[i].last_price = val.last_price
670
              this.recordInfo.recordData[i].last_price = val.last_price
671
+             this.recordInfo.recordData[i].price = val.price
671
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
672
              this.recordInfo.recordData[i].manufacturer =  val.manufacturer
672
              this.recordInfo.recordData[i].number =  val.number
673
              this.recordInfo.recordData[i].number =  val.number
673
              this.recordInfo.recordData[i].max_unit = val.max_unit
674
              this.recordInfo.recordData[i].max_unit = val.max_unit

+ 8 - 7
src/xt_pages/stock/drugs/components/drugCancelDetail.vue Ver arquivo

67
 
67
 
68
     
68
     
69
 
69
 
70
-    <div class="cell clearfix">
70
+    <!-- <div class="cell clearfix">
71
       <label class="title"><span class="name">单据类型</span> : </label>
71
       <label class="title"><span class="name">单据类型</span> : </label>
72
       <el-select
72
       <el-select
73
         size="small"
73
         size="small"
84
         >
84
         >
85
         </el-option>
85
         </el-option>
86
       </el-select>
86
       </el-select>
87
-    </div>
88
-
87
+    </div> -->
88
+<!-- 
89
     <div class="cell clearfix">
89
     <div class="cell clearfix">
90
       <label class="title"><span class="name">其它</span> : </label>
90
       <label class="title"><span class="name">其它</span> : </label>
91
       <el-select
91
       <el-select
103
         >
103
         >
104
         </el-option>
104
         </el-option>
105
       </el-select>
105
       </el-select>
106
-    </div>
106
+    </div> -->
107
 
107
 
108
     <el-row :gutter="12" style="margin-top: 10px">
108
     <el-row :gutter="12" style="margin-top: 10px">
109
       <el-table
109
       <el-table
141
 
141
 
142
         <el-table-column label="规格型号" align="center">
142
         <el-table-column label="规格型号" align="center">
143
           <template slot-scope="scope">
143
           <template slot-scope="scope">
144
-            <span>{{scope.row.drug_spec}}</span>
144
+            <span>{{scope.row.dose}}{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}</span>
145
           </template>
145
           </template>
146
         </el-table-column>
146
         </el-table-column>
147
 
147
 
359
       getDrugCancelDetail(params).then(response=>{
359
       getDrugCancelDetail(params).then(response=>{
360
          if(response.data.state == 1){
360
          if(response.data.state == 1){
361
            var order =  response.data.data.order
361
            var order =  response.data.data.order
362
-           console.log("退库详细",order)
362
+           console.log("退库详细222222222222222222",order)
363
            this.tableData = order
363
            this.tableData = order
364
            this.tableList = order
364
            this.tableList = order
365
            var total = response.data.data.total
365
            var total = response.data.data.total
388
     exportList(){
388
     exportList(){
389
        for(let i=0;i<this.tableList.length;i++){
389
        for(let i=0;i<this.tableList.length;i++){
390
           this.tableList[i].index = i+1
390
           this.tableList[i].index = i+1
391
+          this.tableList[i].unit = this.tableList[i].dose + this.tableList[i].dose_unit + "*"+this.tableList[i].min_number + this.tableList[i].min_unit+"/"+this.tableList[i].max_unit
391
         }
392
         }
392
        import('@/vendor/Export2Excel').then(excel => {
393
        import('@/vendor/Export2Excel').then(excel => {
393
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
394
        const tHeader = ['序号','药品名称', '规格型号', '单位','数量','单价','备注']
394
-       const filterVal = ['index','drug_name', 'drug_spec', 'min_unit','count','price','remark']
395
+       const filterVal = ['index','drug_name', 'unit', 'min_unit','count','price','remark']
395
        
396
        
396
        const data = this.formatJson(filterVal, this.tableList)
397
        const data = this.formatJson(filterVal, this.tableList)
397
        console.log("data",data)
398
        console.log("data",data)

+ 1 - 1
src/xt_pages/stock/drugs/components/drugOutDetail.vue Ver arquivo

173
         </el-table-column>
173
         </el-table-column>
174
         <el-table-column label="总价" align="center">
174
         <el-table-column label="总价" align="center">
175
           <template slot-scope="scope">
175
           <template slot-scope="scope">
176
-            {{scope.row.total_price}}
176
+            {{scope.row.price * scope.row.count}}
177
           </template>
177
           </template>
178
         </el-table-column>
178
         </el-table-column>
179
       </el-table>
179
       </el-table>

+ 3 - 2
src/xt_pages/stock/drugs/drugBatchNumber.vue Ver arquivo

66
         </el-table-column>
66
         </el-table-column>
67
          <el-table-column prop="drug_name" label="批号" align="center">
67
          <el-table-column prop="drug_name" label="批号" align="center">
68
            <template slot-scope="scope">
68
            <template slot-scope="scope">
69
-              {{scope.row.number}}
69
+              {{scope.row.batch_number}}
70
            </template>
70
            </template>
71
         </el-table-column>
71
         </el-table-column>
72
          <el-table-column prop="drug_name" label="入库数量" align="center">
72
          <el-table-column prop="drug_name" label="入库数量" align="center">
73
            <template slot-scope="scope">
73
            <template slot-scope="scope">
74
-              {{scope.row.stock_max_number}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}}
74
+             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
75
+              <!-- {{scope.row.stock_max_number}}{{scope.row.max_unit}}{{scope.row.stock_min_number}}{{scope.row.min_unit}} -->
75
            </template>
76
            </template>
76
         </el-table-column>
77
         </el-table-column>
77
         <el-table-column prop="drug_name" label="进货单价" align="center">
78
         <el-table-column prop="drug_name" label="进货单价" align="center">

+ 1 - 1
src/xt_pages/stock/drugs/drugCancelDetailPrint.vue Ver arquivo

33
                 <span>{{item.drug_name}}</span>
33
                 <span>{{item.drug_name}}</span>
34
               </td>
34
               </td>
35
               <td style="line-height: 50px">
35
               <td style="line-height: 50px">
36
-                <span>{{item.drug_spec}}</span>
36
+                <span>{{item.dose}}{{item.dose_unit}}*{{item.min_number}}{{item.min_unit}}/{{item.max_unit}}</span>
37
               </td>
37
               </td>
38
               <td style="line-height: 50px">
38
               <td style="line-height: 50px">
39
                 <span>{{item.min_unit}}</span>
39
                 <span>{{item.min_unit}}</span>

+ 2 - 2
src/xt_pages/stock/drugs/drugIndex.vue Ver arquivo

15
           <el-tab-pane label="出库明细">
15
           <el-tab-pane label="出库明细">
16
             <drug-out-detail></drug-out-detail>
16
             <drug-out-detail></drug-out-detail>
17
           </el-tab-pane>
17
           </el-tab-pane>
18
-          <!-- <el-tab-pane label="退库明细">
18
+          <el-tab-pane label="退库明细">
19
             <drug-cancel-detail></drug-cancel-detail>
19
             <drug-cancel-detail></drug-cancel-detail>
20
-          </el-tab-pane> -->
20
+          </el-tab-pane>
21
 
21
 
22
         </el-tabs>
22
         </el-tabs>
23
       </div>
23
       </div>

+ 3 - 1
src/xt_pages/stock/drugs/drugStockFlow.vue Ver arquivo

170
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
170
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
171
       // this.getlist()
171
       // this.getlist()
172
       // this.getOutList()
172
       // this.getOutList()
173
-      // this.getDrugCountList()
173
+      this.getDrugCountList()
174
 
174
 
175
       this.getDrugFlow()
175
       this.getDrugFlow()
176
     },
176
     },
447
        if((count%min_number)!=0){
447
        if((count%min_number)!=0){
448
          str_min = count%min_number + min_unit
448
          str_min = count%min_number + min_unit
449
        }
449
        }
450
+       console.log("str2323222",str)
451
+       console.log("str22333333",str_min)
450
        return str+str_min
452
        return str+str_min
451
      },
453
      },
452
 
454
 

+ 4 - 5
src/xt_pages/stock/drugs/drugStockInOrder.vue Ver arquivo

847
         console.log("hhh23",this.exportList)
847
         console.log("hhh23",this.exportList)
848
          for(let i=0;i<this.exportList.length;i++){
848
          for(let i=0;i<this.exportList.length;i++){
849
            for(let j=0;j<this.drugTypeList.length;j++){
849
            for(let j=0;j<this.drugTypeList.length;j++){
850
-             if(this.exportList[i].drug_type == this.drugTypeList[j].value){
850
+             if(this.exportList[i].drug_type == this.drugTypeList[j].id){
851
                this.exportList[i].drug_type = this.drugTypeList[j].name
851
                this.exportList[i].drug_type = this.drugTypeList[j].name
852
              }
852
              }
853
            }
853
            }
854
          }
854
          }
855
-       
856
-       
855
+              
857
         const tHeader = ['药品名称','药品类型','规格&单位', '批号','入库数量','进货价','总价','生产厂家','生产日期','有效日期','经销商','批注文号','备注']
856
         const tHeader = ['药品名称','药品类型','规格&单位', '批号','入库数量','进货价','总价','生产厂家','生产日期','有效日期','经销商','批注文号','备注']
858
-        const filterVal = ['drug_name', 'drug_type','unit','number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','batch_number','remark']
857
+        const filterVal = ['drug_name', 'drug_type','unit','batch_number','warehousing_count','price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
859
          
858
          
860
      
859
      
861
         console.log("table",this.exportList)
860
         console.log("table",this.exportList)
862
-      
861
+        return
863
         const data = this.formatJson(filterVal, this.exportList)
862
         const data = this.formatJson(filterVal, this.exportList)
864
         excel.export_json_to_excel({
863
         excel.export_json_to_excel({
865
           header: tHeader,
864
           header: tHeader,

+ 3 - 2
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue Ver arquivo

124
               >
124
               >
125
               <div style="display:flex;">
125
               <div style="display:flex;">
126
                 <el-input
126
                 <el-input
127
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
127
+                  oninput="value=value.replace(/\D|^0/g,'')"
128
                   placeholder="请输入入库数量"
128
                   placeholder="请输入入库数量"
129
                   type="number"
129
                   type="number"
130
                   v-model="scope.row.warehousing_count"
130
                   v-model="scope.row.warehousing_count"
546
         tempObj['dose']= ''
546
         tempObj['dose']= ''
547
         tempObj['dose_unit']=''
547
         tempObj['dose_unit']=''
548
         tempObj['dealer'] = ''
548
         tempObj['dealer'] = ''
549
+        tempObj['last_price'] = ''
549
         this.recordInfo.recordData.push(tempObj)
550
         this.recordInfo.recordData.push(tempObj)
550
       }, handleDelete: function(index, row) {
551
       }, handleDelete: function(index, row) {
551
         if (this.recordInfo.recordData.length <= 1) {
552
         if (this.recordInfo.recordData.length <= 1) {
695
               'stockIn': this.recordInfo.recordData
696
               'stockIn': this.recordInfo.recordData
696
             }
697
             }
697
             console.log("params2222222",params)
698
             console.log("params2222222",params)
698
-            
699
+             
699
             postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
700
             postDrugWarehouse(params, this.warehousing_time, this.form.manufacturer, this.form.dealer, this.type).then(response => {
700
               if (response.data.state == 0) {
701
               if (response.data.state == 0) {
701
                 this.$message.error(response.data.msg)
702
                 this.$message.error(response.data.msg)

+ 2 - 2
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue Ver arquivo

189
               >
189
               >
190
                 <div style="display:flex;">
190
                 <div style="display:flex;">
191
                   <el-input
191
                   <el-input
192
-                    oninput="value=value.replace(/[^0-9.]/g,'')"
192
+                    oninput="value=value.replace(/\D|^0/g,'')"
193
                     placeholder="请输入入库数量"
193
                     placeholder="请输入入库数量"
194
                     type="number"
194
                     type="number"
195
                     v-model="scope.row.warehousing_count"
195
                     v-model="scope.row.warehousing_count"
676
             stockIn: this.recordInfo.recordData
676
             stockIn: this.recordInfo.recordData
677
           };
677
           };
678
           console.log("params22222222222",params)
678
           console.log("params22222222222",params)
679
-        
679
+          
680
           EditDrugWarehouse(
680
           EditDrugWarehouse(
681
             params,
681
             params,
682
             this.warehousing_time,
682
             this.warehousing_time,

+ 103 - 73
src/xt_pages/stock/drugs/drugStockOutOrder.vue Ver arquivo

225
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
225
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
226
             </template>
226
             </template>
227
           </el-table-column>
227
           </el-table-column>
228
-          <el-table-column label="批号" align="center">
228
+          <!-- <el-table-column label="批号" align="center">
229
             <template slot-scope="scope">
229
             <template slot-scope="scope">
230
               <span v-if="scope.row.batch_number!=''">{{scope.row.batch_number}}</span> 
230
               <span v-if="scope.row.batch_number!=''">{{scope.row.batch_number}}</span> 
231
              <span v-if="scope.row.batch_number == '0'"></span> 
231
              <span v-if="scope.row.batch_number == '0'"></span> 
232
             </template>
232
             </template>
233
-          </el-table-column>
233
+          </el-table-column> -->
234
           <el-table-column label="出库数量" align="center">
234
           <el-table-column label="出库数量" align="center">
235
             <template slot-scope="scope">
235
             <template slot-scope="scope">
236
-              {{getTotalCount(scope.row.drug_id)}}
236
+              <!-- {{getTotalCount(scope.row.drug_id)}} -->
237
+              {{getTotalCountOne(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}
237
             </template>
238
             </template>
238
           </el-table-column>
239
           </el-table-column>
239
           <el-table-column label="出货单价" align="center">
240
           <el-table-column label="出货单价" align="center">
306
               <span>序号</span>
307
               <span>序号</span>
307
             </template>
308
             </template>
308
             <template slot-scope="scope">
309
             <template slot-scope="scope">
309
-              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
310
-              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
310
+              <!-- <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
311
+              <span v-if="scope.row.is_total == 1">{{'合计'}}</span> -->
312
+              {{scope.$index+1}}
313
+            
311
             </template>
314
             </template>
312
           </el-table-column>
315
           </el-table-column>
313
 
316
 
316
               <span>使用人</span>
319
               <span>使用人</span>
317
             </template>
320
             </template>
318
             <template slot-scope="scope">
321
             <template slot-scope="scope">
319
-              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
320
-              <span  v-if="scope.row.is_total == 1"></span>
322
+              <!-- <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
323
+              <span  v-if="scope.row.is_total == 1"></span> -->
324
+              {{scope.row.user.name}}
321
             </template>
325
             </template>
322
           </el-table-column>
326
           </el-table-column>
323
           <el-table-column min-width="35" align="center">
327
           <el-table-column min-width="35" align="center">
326
             </template>
330
             </template>
327
             <template slot-scope="scope">
331
             <template slot-scope="scope">
328
               <span >{{scope.row.count}}{{scope.row.count_unit}}</span>
332
               <span >{{scope.row.count}}{{scope.row.count_unit}}</span>
329
-              <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span>
333
+              <!-- <span  v-if="scope.row.is_total == 1">{{scope.row.total}}</span> -->
330
             </template>
334
             </template>
331
           </el-table-column>
335
           </el-table-column>
332
 
336
 
335
               <span>使用时间</span>
339
               <span>使用时间</span>
336
             </template>
340
             </template>
337
             <template slot-scope="scope">
341
             <template slot-scope="scope">
338
-              <span  v-if="scope.row.is_total == 0">{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
342
+              <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
339
             </template>
343
             </template>
340
           </el-table-column>
344
           </el-table-column>
341
 
345
 
345
               <span>批次号</span>
349
               <span>批次号</span>
346
             </template>
350
             </template>
347
             <template slot-scope="scope">
351
             <template slot-scope="scope">
348
-              <span>{{getDrugBatchNumber(scope.row.id)}}</span>
352
+              <span>{{getDrugBatchNumber(scope.row.drug_id)}}</span>
349
             </template>
353
             </template>
350
           </el-table-column>
354
           </el-table-column>
351
-
355
+          
352
         </el-table>
356
         </el-table>
353
       </span>
357
       </span>
354
       <span slot="footer" class="dialog-footer">
358
       <span slot="footer" class="dialog-footer">
520
       drugOutList:[],
524
       drugOutList:[],
521
       outList:[],
525
       outList:[],
522
       userListOne:[],
526
       userListOne:[],
523
-      exportList:[]
527
+      exportList:[],
528
+      batchNumberList:[]
524
     };
529
     };
525
   },
530
   },
526
   methods: {
531
   methods: {
947
           this.tableShow = true
952
           this.tableShow = true
948
           this.tableList = []
953
           this.tableList = []
949
           var list =  response.data.data.list
954
           var list =  response.data.data.list
955
+          console.log("list2323232",list)
950
           var outList = response.data.data.outList
956
           var outList = response.data.data.outList
951
-          for(let i=0;i<outList.length;i++){
952
-              //如果都是最大单位,把最数量转为最小数量
953
-             if(outList[i].count_unit == outList[i].max_unit){
954
-                outList[i].count = outList[i].min_number * outList[i].count 
955
-             }
956
-          }
957
+          // for(let i=0;i<outList.length;i++){
958
+          //     //如果都是最大单位,把最数量转为最小数量
959
+          //    if(outList[i].count_unit == outList[i].max_unit){
960
+          //       outList[i].count = outList[i].min_number * outList[i].count 
961
+          //    }
962
+          // }
957
           this.outList = outList
963
           this.outList = outList
958
          console.log("outList222",outList)
964
          console.log("outList222",outList)
959
          this.manufacturerList = response.data.data.manufacturerList
965
          this.manufacturerList = response.data.data.manufacturerList
972
      })
978
      })
973
    },
979
    },
974
    toDetail(val){
980
    toDetail(val){
975
-     console.log("val",val)
981
+     this.userList = []
982
+     this.userListOne = []
976
      var params = {
983
      var params = {
977
        warehouse_out_id:val.warehouse_out_id,
984
        warehouse_out_id:val.warehouse_out_id,
978
        drug_id:val.drug_id,
985
        drug_id:val.drug_id,
979
        record_time:val.sys_record_time,
986
        record_time:val.sys_record_time,
980
      }
987
      }
981
-     this.userList = []
982
      getAutoDrugDetail(params).then(response=>{
988
      getAutoDrugDetail(params).then(response=>{
983
        if(response.data.state == 1){
989
        if(response.data.state == 1){
984
-        console.log("list23232323232",response.data.data.list)
985
-      
986
-        var total = 0
987
-        for (let i = 0; i < response.data.data.list.length; i++) {
988
-          var obj = response.data.data.list[i]
989
-          obj['is_total'] = 0
990
-          this.userList.push(obj)
991
-          var str = 0
992
-          var max_unit = ""
993
-          var min_unit = ""
994
-          var number = 0
995
-          var min_str = 0
996
-         for(let i=0;i<response.data.data.list.length;i++){
997
-             min_str = response.data.data.list[0].drug.min_str
998
-             max_unit = response.data.data.list[0].drug.max_unit
999
-             min_unit = response.data.data.list[0].drug.min_unit
1000
-             number = response.data.data.list[0].drug.min_number
1001
-           if(response.data.data.list[i].count_unit == response.data.data.list[i].drug.max_unit){
1002
-              response.data.data.list[i].count = response.data.data.list[i].count * response.data.data.list[i].drug.min_number
1003
-           }
1004
-         }
1005
-         var total_count = 0
1006
-         for(let i=0;i<response.data.data.list.length;i++){
1007
-            total_count += response.data.data.list[i].count 
1008
-         }
1009
-         console.log("总规格2323232",total_count,number)
1010
-         
1011
-        if(parseInt(total_count)!=0){
1012
-          str = parseInt(total_count/number)
1013
-         }
1014
-        if(parseInt(total_count)!=0){
1015
-          min_str =  parseInt(total_count)%number
1016
-        }
1017
         
990
         
1018
-        total = str + max_unit + min_str + min_unit
1019
-        console.log("h2hh2h323",str,min_str)
1020
- 
1021
-        }
1022
-        this.userList.push({
1023
-          is_total: 1,
1024
-          total: total,
1025
-        })
991
+        this.userList = response.data.data.list
992
+        
1026
         if(val.is_sys == 1){
993
         if(val.is_sys == 1){
994
+        
1027
           this.drugDialogVisible = true
995
           this.drugDialogVisible = true
1028
         }
996
         }
1029
         if(val.is_sys == 0){
997
         if(val.is_sys == 0){
998
+         
1030
           this.drugDialogVisibleTwo = true
999
           this.drugDialogVisibleTwo = true
1031
         }
1000
         }
1032
          var userListOne = response.data.data.outList
1001
          var userListOne = response.data.data.outList
1033
          console.log("手动出库2232332",userListOne)
1002
          console.log("手动出库2232332",userListOne)
1034
          this.userListOne = userListOne
1003
          this.userListOne = userListOne
1004
+         var  batchNumber = response.data.data.batchNumber
1005
+         console.log("出库详情",batchNumber)
1006
+         this.batchNumberList = batchNumber
1035
        }
1007
        }
1036
      })
1008
      })
1037
    },
1009
    },
1108
          }
1080
          }
1109
          return str + min_str
1081
          return str + min_str
1110
       },
1082
       },
1083
+      getTotalCountOne(id,min_number,max_unit,min_unit){
1084
+       
1085
+        for(let i=0;i<this.outList.length;i++){
1086
+          if(this.outList[i].count_unit == this.outList[i].max_unit){
1087
+            this.outList[i].total_count = this.outList[i].count * this.outList[i].min_number
1088
+          }
1089
+
1090
+         if(this.outList[i].count_unit == this.outList[i].min_unit){
1091
+            this.outList[i].total_count = this.outList[i].count
1092
+          }
1093
+       
1094
+        }
1095
+        console.log("我的",this.outList)
1096
+          let dataInfo = {};
1097
+          this.outList.forEach((item, index) => {
1098
+            let { drug_id } = item;
1099
+            if (!dataInfo[drug_id]) {
1100
+              dataInfo[drug_id] = {
1101
+                drug_id,
1102
+                child: [],
1103
+                total:0,
1104
+              };
1105
+            }
1106
+          });
1107
+        let list = Object.values(dataInfo);
1108
+        console.log("drug_id22222",list)
1109
+        for(let i=0;i<list.length;i++){
1110
+          for(let j=0;j<this.outList.length;j++){
1111
+            if(list[i].drug_id == this.outList[j].drug_id){
1112
+              list[i].child.push(this.outList[j])
1113
+            }
1114
+          }
1115
+        }
1116
+       var total = 0
1117
+       for(let i=0;i<list.length;i++){
1118
+        for(let j=0;j<list[i].child.length;j++){
1119
+           if(id == list[i].child[j].drug_id){
1120
+             total+= list[i].child[j].total_count
1121
+           }
1122
+        }
1123
+       }
1124
+      
1125
+      var str = ""
1126
+      var min_str = ""
1127
+      
1128
+      str = parseInt(total/min_number)+ max_unit
1129
+      min_str =  total%min_number + min_unit
1130
+
1131
+     return str + min_str
1132
+      
1133
+       
1134
+     },
1111
       getAllPrice(drug_id,price,min_price){
1135
       getAllPrice(drug_id,price,min_price){
1112
          var strprice = 0
1136
          var strprice = 0
1113
          var minstrprice = 0
1137
          var minstrprice = 0
1131
          return  total_price
1155
          return  total_price
1132
       },
1156
       },
1133
 
1157
 
1134
-      getDrugBatchNumber(id){
1158
+      // getDrugBatchNumber(id){
1135
         
1159
         
1136
-        var arr= []
1137
-        var batchNumber =[]
1160
+      //   var arr= []
1161
+      //   var batchNumber =[]
1138
         
1162
         
1139
-        for(let i=0;i<this.userList.length;i++){
1140
-           if(id == this.userList[i].id){
1141
-            arr.push(this.userList[i].drugwarehouseoutinfo)
1142
-           }
1143
-        }
1144
-        if(batchNumber.length > 0 ){
1145
-         for(let j=0;j<arr.length;j++){
1146
-           batchNumber.push(arr[j].batch_number)
1163
+      //   for(let i=0;i<this.userList.length;i++){
1164
+      //      if(id == this.userList[i].id){
1165
+      //        for(let j=0;j<this.userList[i].drugwarehouseoutinfo.length;j++){
1166
+      //           batchNumber.push(this.userList[i].drugwarehouseoutinfo[j].batch_number)
1167
+      //        }
1168
+      //      }
1169
+      //   }
1170
+      //   return batchNumber.join(",")
1171
+      // },
1172
+      getDrugBatchNumber(drugid){
1173
+        var arr = []
1174
+        for(let i=0;i<this.batchNumberList.length;i++){
1175
+          if(drugid == this.batchNumberList[i].drug_id){
1176
+            arr.push(this.batchNumberList[i].batch_number)
1147
           }
1177
           }
1148
         }
1178
         }
1149
-        return batchNumber.join(",")
1179
+        return arr.join(",")
1150
       },
1180
       },
1151
     
1181
     
1152
       getExportOutOrderDrugList(){
1182
       getExportOutOrderDrugList(){

+ 1 - 1
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue Ver arquivo

149
               >
149
               >
150
                 <div style="display:flex;">
150
                 <div style="display:flex;">
151
                   <el-input
151
                   <el-input
152
-                    oninput="value=value.replace(/[^0-9.]/g,'')"
152
+                     oninput="value=value.replace(/\D|^0/g,'')"
153
                     style="width:80px"
153
                     style="width:80px"
154
                     placeholder="请输入出库数量"
154
                     placeholder="请输入出库数量"
155
                     type="number"
155
                     type="number"

+ 70 - 15
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue Ver arquivo

90
               </template>
90
               </template>
91
                 <template slot-scope="scope">
91
                 <template slot-scope="scope">
92
                   <el-form-item style="padding-top: 20px">
92
                   <el-form-item style="padding-top: 20px">
93
-                    <el-input
93
+                    <!-- <el-input
94
                      :disabled="drug_show"
94
                      :disabled="drug_show"
95
                       placeholder="请输入批号"
95
                       placeholder="请输入批号"
96
                       v-model="scope.row.batch_number"
96
                       v-model="scope.row.batch_number"
97
-                    ></el-input>
97
+                    ></el-input> -->
98
+                    <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
99
+                      <el-option
100
+                        v-for="(item,index) in numberList"
101
+                        :key="index"
102
+                        :label="item.batch_number"
103
+                        :value="item.batch_number">
104
+                      </el-option>
105
+                    </el-select>
98
                   </el-form-item>
106
                   </el-form-item>
99
               </template>
107
               </template>
100
           </el-table-column>
108
           </el-table-column>
110
               >
118
               >
111
                 <div style="display:flex;">
119
                 <div style="display:flex;">
112
                   <el-input
120
                   <el-input
113
-                   oninput="value=value.replace(/[^0-9.]/g,'')"
121
+                   oninput="value=value.replace(/\D|^0/g,'')"
114
                    style="width:100px"
122
                    style="width:100px"
115
                    :disabled="drug_show"
123
                    :disabled="drug_show"
116
                     placeholder="请输入出库数量"
124
                     placeholder="请输入出库数量"
258
 <script>
266
 <script>
259
   import { uParseTime } from '@/utils/tools'
267
   import { uParseTime } from '@/utils/tools'
260
 
268
 
261
-  import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
269
+  import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID,getDrugBatchNumber } from '@/api/drug/drug_stock'
262
   import BreadCrumb from '../../components/bread-crumb'
270
   import BreadCrumb from '../../components/bread-crumb'
263
   import DrugsStockDialog from './drugsStockDialog/index'
271
   import DrugsStockDialog from './drugsStockDialog/index'
264
   import {postSearchDrugList } from "@/api/data"
272
   import {postSearchDrugList } from "@/api/data"
330
         manufacturerList:[],
338
         manufacturerList:[],
331
         drug_show:false,
339
         drug_show:false,
332
         unitList:[],
340
         unitList:[],
333
-        unitShow:true
341
+        unitShow:true,
342
+        numberList:[]
334
       }
343
       }
335
     },
344
     },
336
     methods: {
345
     methods: {
434
         tempObj['id'] = 0
443
         tempObj['id'] = 0
435
         tempObj['drug_id'] = 0
444
         tempObj['drug_id'] = 0
436
         tempObj['retail_price'] = ''
445
         tempObj['retail_price'] = ''
437
-
438
         tempObj['count'] = ''
446
         tempObj['count'] = ''
439
         tempObj['price'] = ''
447
         tempObj['price'] = ''
440
         tempObj['remark'] = ''
448
         tempObj['remark'] = ''
441
         tempObj['batch_number'] = ''
449
         tempObj['batch_number'] = ''
442
         tempObj['number'] = ''
450
         tempObj['number'] = ''
451
+        tempObj['count_unit'] = ""
452
+        tempObj['dealer'] = 0
453
+        tempObj['manufacturer'] = 0
443
         this.recordInfo.recordData.push(tempObj)
454
         this.recordInfo.recordData.push(tempObj)
444
       }, handleDelete: function(index, row) {
455
       }, handleDelete: function(index, row) {
445
         if(this.drug_show == true){
456
         if(this.drug_show == true){
470
           }).catch(() => {
481
           }).catch(() => {
471
           })
482
           })
472
         }
483
         }
473
-      }, getTime(val, temp) {
474
-        if (val != 0) {
475
-          return uParseTime(val, temp)
476
-        } else {
477
-          return ''
478
-        }
484
+      }, 
485
+      // getTime(val, temp) {
486
+      //   if (val != 0) {
487
+      //     return uParseTime(val, temp)
488
+      //   } else {
489
+      //     return ''
490
+      //   }
491
+      // },
492
+     getTime(val) {
493
+         if(val < 0){
494
+           return ""
495
+         }
496
+         if(val == ""){
497
+          return ""
498
+         }else {
499
+          return uParseTime(val, '{y}-{m}-{d}')
500
+         }
479
       },
501
       },
480
       showDialog(index, row) {
502
       showDialog(index, row) {
481
         this.currentIndex = index;
503
         this.currentIndex = index;
557
               'stockOut': this.recordInfo.recordData
579
               'stockOut': this.recordInfo.recordData
558
             }
580
             }
559
             console.log("params----",params)
581
             console.log("params----",params)
582
+           
560
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
583
             editDrugWarehouseoutInfo(params, this.warehouse_out_time, this.$route.query.id, this.$route.query.type, this.form.manufacturer, this.form.dealer).then(response => {
561
               if (response.data.state == 0) {
584
               if (response.data.state == 0) {
562
                 this.$message.error(response.data.msg)
585
                 this.$message.error(response.data.msg)
563
                 return false
586
                 return false
564
               } else {
587
               } else {
565
-                this.$message.success('保存成功')
566
-                this.$router.back(-1)
588
+                var msg = response.data.data.msg
589
+                var drug_name =  response.data.data.drug_name
590
+                console.log("drug_name",drug_name)
591
+                var dose = response.data.data.dose
592
+                console.log("dose",dose)
593
+                var dose_unit = response.data.data.dose_unit
594
+                console.log("dose_unit",dose_unit)
595
+                var min_number = response.data.data.min_number
596
+                console.log("min_number",min_number)
597
+                var min_unit =  response.data.data.min_unit
598
+                console.log("min_unit",min_unit)
599
+                var max_unit =  response.data.data.max_unit
600
+                console.log("max_unit",max_unit)
601
+                var str = drug_name + " " + dose + dose_unit + "*" + min_number + min_unit+"/"+max_unit
602
+                console.log("str22222222",str)
603
+              if(msg == 1){
604
+                this.$message.error(str + "库存不足,请入库")
605
+              }else{
606
+                this.$message.success("出库成功");
607
+                this.recordInfo.recordData = [];
608
+                this.$router.back(-1);
609
+              }
567
               }
610
               }
568
             })
611
             })
569
           } else {
612
           } else {
693
         this.currentIndex = val
736
         this.currentIndex = val
694
       },
737
       },
695
       handleSelect(val){
738
       handleSelect(val){
739
+         this.getDrugBatchNumber(val.id)
696
          for(let i=0;i<this.recordInfo.recordData.length;i++){
740
          for(let i=0;i<this.recordInfo.recordData.length;i++){
697
            if(i == this.currentIndex){
741
            if(i == this.currentIndex){
698
              this.recordInfo.recordData[i].drug_id  = val.id
742
              this.recordInfo.recordData[i].drug_id  = val.id
704
              this.recordInfo.recordData[i].number = val.number
748
              this.recordInfo.recordData[i].number = val.number
705
              this.recordInfo.recordData[i].max_unit = val.max_unit
749
              this.recordInfo.recordData[i].max_unit = val.max_unit
706
              this.recordInfo.recordData[i].min_unit = val.min_unit
750
              this.recordInfo.recordData[i].min_unit = val.min_unit
707
-           
708
            }
751
            }
709
         }
752
         }
710
         console.log("333333",this.recordInfo.recordData)
753
         console.log("333333",this.recordInfo.recordData)
715
      getDataConfig(module, filed_name){
758
      getDataConfig(module, filed_name){
716
        return getDataConfig(module, filed_name)
759
        return getDataConfig(module, filed_name)
717
      },
760
      },
761
+     getDrugBatchNumber(id){
762
+          var params = {
763
+            id:id
764
+          }
765
+        getDrugBatchNumber(params).then(response=>{
766
+           if(response.data.state == 1){
767
+             var list = response.data.data.list
768
+             console.log("list2222",list)
769
+             this.numberList = list
770
+           }
771
+        })
772
+      }
718
     },
773
     },
719
     created() {
774
     created() {
720
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
775
       this.drugTypeList = getDictionaryDataConfig('system','drug_type') 

+ 2 - 2
src/xt_pages/stock/stockFlow.vue Ver arquivo

87
            </template>
87
            </template>
88
         </el-table-column>
88
         </el-table-column>
89
      
89
      
90
-       <el-table-column label="是否退库" align="center">
90
+       <!-- <el-table-column label="是否退库" align="center">
91
          <template slot-scope="scope">
91
          <template slot-scope="scope">
92
            <span v-if="scope.row.is_edit == 2">是</span>
92
            <span v-if="scope.row.is_edit == 2">是</span>
93
            <span v-if="scope.row.is_edit ==1">否</span>   
93
            <span v-if="scope.row.is_edit ==1">否</span>   
94
          </template>
94
          </template>
95
-       </el-table-column>
95
+       </el-table-column> -->
96
 
96
 
97
        <el-table-column label="批次" align="center">
97
        <el-table-column label="批次" align="center">
98
          <template slot-scope="scope">
98
          <template slot-scope="scope">

+ 2 - 2
src/xt_pages/stock/stockInOrderAdd.vue Ver arquivo

101
             <template slot-scope="scope">
101
             <template slot-scope="scope">
102
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
102
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
103
                             :rules='tableRules.warehousing_count' style="padding-top: 20px">
103
                             :rules='tableRules.warehousing_count' style="padding-top: 20px">
104
-                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"  oninput="value=value.replace(/[^0-9.]/g,'')"></el-input>
104
+                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"  oninput="value=value.replace(/\D|^0/g,'')"></el-input>
105
                   {{scope.row.min_unit}}
105
                   {{scope.row.min_unit}}
106
               </el-form-item>
106
               </el-form-item>
107
             
107
             
167
             </template>
167
             </template>
168
             <template slot-scope="scope">
168
             <template slot-scope="scope">
169
               <el-form-item style="padding-top: 20px">
169
               <el-form-item style="padding-top: 20px">
170
-                <el-input placeholder="请输入批号" v-model="scope.row.license_number" ></el-input>
170
+                <el-input placeholder="请输入批准文号" v-model="scope.row.license_number" ></el-input>
171
               </el-form-item>
171
               </el-form-item>
172
             </template>
172
             </template>
173
           </el-table-column>
173
           </el-table-column>

+ 3 - 6
src/xt_pages/stock/stockInOrderEdit.vue Ver arquivo

198
                 style="padding-top: 20px"
198
                 style="padding-top: 20px"
199
               >
199
               >
200
                 <el-input
200
                 <el-input
201
-                  oninput="value=value.replace(/[^0-9.]/g,'')"
201
+                  oninput="value=value.replace(/\D|^0/g,'')"
202
                   placeholder="请输入入库数量"
202
                   placeholder="请输入入库数量"
203
                   type="number"
203
                   type="number"
204
                   v-model="scope.row.warehousing_count"
204
                   v-model="scope.row.warehousing_count"
272
             <template slot-scope="scope">
272
             <template slot-scope="scope">
273
               <el-form-item style="padding-top: 20px">
273
               <el-form-item style="padding-top: 20px">
274
                 <el-input
274
                 <el-input
275
-                  placeholder="请输入批号"
275
+                  placeholder="请输入批准文号"
276
                   v-model="scope.row.license_number"
276
                   v-model="scope.row.license_number"
277
                   
277
                   
278
                 ></el-input>
278
                 ></el-input>
525
       tempObj["remark"] = "";
525
       tempObj["remark"] = "";
526
       tempObj["dealer"] = "";
526
       tempObj["dealer"] = "";
527
       tempObj["manufacturer"] = "";
527
       tempObj["manufacturer"] = "";
528
-      tempObj["number"] = ""
529
       tempObj["license_number"] = ""
528
       tempObj["license_number"] = ""
530
       this.recordInfo.recordData.push(tempObj);
529
       this.recordInfo.recordData.push(tempObj);
531
     },
530
     },
672
             stockIn: this.recordInfo.recordData
671
             stockIn: this.recordInfo.recordData
673
           };
672
           };
674
           console.log("params2222",params)
673
           console.log("params2222",params)
675
-       
674
+        
676
           EditWarehouse(
675
           EditWarehouse(
677
             params,
676
             params,
678
             this.warehousing_time,
677
             this.warehousing_time,
831
               this.numberList.push(val.xt_warehouse_info[j])
830
               this.numberList.push(val.xt_warehouse_info[j])
832
             }
831
             }
833
             this.recordInfo.recordData[i].number = val.xt_warehouse_info[0].number
832
             this.recordInfo.recordData[i].number = val.xt_warehouse_info[0].number
834
-          }else{
835
-            this.recordInfo.recordData[i].number = ""
836
           }
833
           }
837
         }
834
         }
838
      
835
      

+ 18 - 3
src/xt_pages/stock/stockOutOrder.vue Ver arquivo

419
               <span>批次号</span>
419
               <span>批次号</span>
420
             </template>
420
             </template>
421
             <template slot-scope="scope">
421
             <template slot-scope="scope">
422
-               {{scope.row.number}}
422
+               <!-- {{scope.row.number}} -->
423
+               {{getBatchNumber(scope.row.patient_id,scope.row.good_id)}}
423
             </template>
424
             </template>
424
           </el-table-column>
425
           </el-table-column>
425
           <el-table-column min-width="35" align="center">
426
           <el-table-column min-width="35" align="center">
633
               <span>批次号</span>
634
               <span>批次号</span>
634
             </template>
635
             </template>
635
             <template slot-scope="scope">
636
             <template slot-scope="scope">
636
-              <span v-if="scope.row.is_total == 0">{{getNumber(scope.row.id)}}</span>
637
+              <!-- <span v-if="scope.row.is_total == 0">{{getNumber(scope.row.id)}}</span> -->
638
+               <span v-if="scope.row.is_total ==0">{{getBatchNumber(scope.row.patient_id,scope.row.good_id)}}</span>
637
             </template>
639
             </template>
638
           </el-table-column>
640
           </el-table-column>
639
 <!-- 
641
 <!-- 
806
       warehouse_out_time:"",
808
       warehouse_out_time:"",
807
       exportList:[],
809
       exportList:[],
808
       is_sys:0,
810
       is_sys:0,
809
-      infoList:[]
811
+      infoList:[],
812
+      stockFlowList:[]
810
     };
813
     };
811
   },
814
   },
812
   methods: {
815
   methods: {
1533
               var info = response.data.data.info
1536
               var info = response.data.data.info
1534
               this.infoList = info
1537
               this.infoList = info
1535
               console.log("info列表22222222",info)
1538
               console.log("info列表22222222",info)
1539
+              var stockflowlist = response.data.data.stockFlowList
1540
+              console.log("stockflowlist",stockflowlist)
1541
+              this.stockFlowList = stockflowlist
1536
               for (let i = 0; i < arrList.length; i++) {
1542
               for (let i = 0; i < arrList.length; i++) {
1537
                 var obj = arrList[i]
1543
                 var obj = arrList[i]
1538
                 obj['is_total'] = 0
1544
                 obj['is_total'] = 0
1657
     formatJson(filterVal, jsonData) {
1663
     formatJson(filterVal, jsonData) {
1658
     return jsonData.map(v => filterVal.map(j => v[j]));
1664
     return jsonData.map(v => filterVal.map(j => v[j]));
1659
    },
1665
    },
1666
+   getBatchNumber(patient_id,good_id){
1667
+     var arr = []
1668
+     for(let i=0;i<this.stockFlowList.length;i++){
1669
+        if(patient_id == this.stockFlowList[i].patient_id && good_id == this.stockFlowList[i].good_id){
1670
+           arr.push(this.stockFlowList[i].number)
1671
+        }
1672
+     }
1673
+     return arr.join(',')
1674
+   }
1660
   }
1675
   }
1661
 };
1676
 };
1662
 </script>
1677
 </script>

+ 1 - 0
src/xt_pages/stock/stockOutOrderAdd.vue Ver arquivo

146
                 style="padding-top: 17px"
146
                 style="padding-top: 17px"
147
               >
147
               >
148
                 <el-input
148
                 <el-input
149
+                 oninput="value=value.replace(/\D|^0/g,'')"
149
                   placeholder="请输入出库数量"
150
                   placeholder="请输入出库数量"
150
                   type="number"
151
                   type="number"
151
                   v-model="scope.row.count"
152
                   v-model="scope.row.count"

+ 1 - 1
src/xt_pages/stock/stockOutOrderEdit.vue Ver arquivo

139
             <template slot-scope="scope">
139
             <template slot-scope="scope">
140
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
140
               <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
141
                             style="padding-top: 17px">
141
                             style="padding-top: 17px">
142
-                <el-input type="number" v-model="scope.row.count"  :disabled="stockShow"></el-input>
142
+                <el-input type="number" v-model="scope.row.count"  :disabled="stockShow"   oninput="value=value.replace(/\D|^0/g,'')"></el-input>
143
               </el-form-item>
143
               </el-form-item>
144
             </template>
144
             </template>
145
           </el-table-column>
145
           </el-table-column>

+ 4 - 2
src/xt_pages/upload/fast/FastProvince.vue Ver arquivo

143
             <el-tab-pane label="抢救记录">
143
             <el-tab-pane label="抢救记录">
144
               <rescue-record :doctor_advices='doctor_advices' :patient='patient' :prescription='prescription'></rescue-record>
144
               <rescue-record :doctor_advices='doctor_advices' :patient='patient' :prescription='prescription'></rescue-record>
145
             </el-tab-pane>
145
             </el-tab-pane>
146
+             
146
           </el-tabs>
147
           </el-tabs>
147
         </div>
148
         </div>
148
       </div>
149
       </div>
160
   import dialysisParams from "../fast/dialysisParams"
161
   import dialysisParams from "../fast/dialysisParams"
161
   import dialysisSummary from "../fast/dialysisSummary"
162
   import dialysisSummary from "../fast/dialysisSummary"
162
   import rescueRecord from "../fast/rescueRecord"
163
   import rescueRecord from "../fast/rescueRecord"
163
-
164
+  
164
   import {
165
   import {
165
   getDialysisRecordInitData,
166
   getDialysisRecordInitData,
166
   getDialysisSchedules,
167
   getDialysisSchedules,
175
       treatInfo,
176
       treatInfo,
176
       dialysisParams,
177
       dialysisParams,
177
       dialysisSummary,
178
       dialysisSummary,
178
-      rescueRecord
179
+      rescueRecord,
180
+     
179
     },
181
     },
180
     data() {
182
     data() {
181
       return {
183
       return {

+ 7 - 1
src/xt_pages/user/components/PatientDetail.vue Ver arquivo

955
               <div class="proj">
955
               <div class="proj">
956
                 <span class="proj_title">日期:</span>
956
                 <span class="proj_title">日期:</span>
957
                 <!-- {{ getTime(patientPrint.created_time) }} -->
957
                 <!-- {{ getTime(patientPrint.created_time) }} -->
958
+                {{printDate}}
958
               </div>
959
               </div>
959
               <div class="proj"><span class="proj_title">医生签名:</span></div>
960
               <div class="proj"><span class="proj_title">医生签名:</span></div>
960
             </div>
961
             </div>
1134
       patientID: 0,
1135
       patientID: 0,
1135
       patientPrint: {},
1136
       patientPrint: {},
1136
       print_time: "",
1137
       print_time: "",
1137
-
1138
+      printDate:"",
1138
       rules: {
1139
       rules: {
1139
         contagions: [{ type: "array", required: false, trigger: "change" }],
1140
         contagions: [{ type: "array", required: false, trigger: "change" }],
1140
         avatar: [{ required: true, message: "请上传头像", trigger: "blur" }],
1141
         avatar: [{ required: true, message: "请上传头像", trigger: "blur" }],
1203
     this.getZones();
1204
     this.getZones();
1204
     var ptime = Math.round(new Date().getTime() / 1000);
1205
     var ptime = Math.round(new Date().getTime() / 1000);
1205
     // this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
1206
     // this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}');
1207
+
1208
+    var data = new Date();
1209
+    var month =data.getMonth() < 9 ? "0" + (data.getMonth() + 1) : data.getMonth() + 1;
1210
+    var date = data.getDate() <= 9 ? "0" + data.getDate() : data.getDate();
1211
+    this.printDate = data.getFullYear() + "-" + month + "-" + date;
1206
   },
1212
   },
1207
   methods: {
1213
   methods: {
1208
     getTime(val) {
1214
     getTime(val) {