Browse Source

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

csx 3 years ago
parent
commit
33b9bc6692

+ 8 - 0
src/api/stock.js View File

625
     params: params
625
     params: params
626
   })
626
   })
627
 }
627
 }
628
+
629
+export function getStockDrugCount(params) {
630
+  return request({
631
+    url: '/api/good/getstockdrugcount',
632
+    method: 'get',
633
+    params: params
634
+  })
635
+}

+ 35 - 2
src/xt_pages/data/components/addDrugs.vue View File

663
         this.form.intro = ''
663
         this.form.intro = ''
664
       },
664
       },
665
       show(id, obj) {
665
       show(id, obj) {
666
-
667
         this.unitList = []
666
         this.unitList = []
668
         this.packingUnit = []
667
         this.packingUnit = []
669
         var arr =  getDataConfig('hemodialysis','units')
668
         var arr =  getDataConfig('hemodialysis','units')
672
             this.unitList.push(arr[i])
671
             this.unitList.push(arr[i])
673
             this.packingUnit.push(arr[i])
672
             this.packingUnit.push(arr[i])
674
           }
673
           }
675
-          if(obj.max_unit == arr[i].name){
674
+          if(obj.dose_unit == arr[i].name){
676
             this.unitList.push(arr[i])
675
             this.unitList.push(arr[i])
676
+          }
677
+          if(obj.max_unit == arr[i].name){
677
             this.packingUnit.push(arr[i])
678
             this.packingUnit.push(arr[i])
678
           } 
679
           } 
680
+
681
+          let idArr = []
682
+          this.unitList.map(item => {
683
+            idArr.push(item.id)
684
+          })
685
+          if(idArr.indexOf(obj.drug_dose_unit) == -1){
686
+            if(obj.drug_dose_unit == arr[i].id){
687
+              this.unitList.push(arr[i])
688
+            }
689
+          }
690
+          let packingIdArr = []
691
+          this.packingUnit.map(item => {
692
+            packingIdArr.push(item.id)
693
+          })
694
+          if(packingIdArr.indexOf(obj.prescribing_number_unit) == -1){
695
+            if(obj.prescribing_number_unit == arr[i].id || obj.prescribing_number_unit == arr[i].name){
696
+              this.packingUnit.push(arr[i])
697
+            }
698
+          }
679
         }
699
         }
700
+        let ojb = {};
701
+        this.unitList = this.unitList.reduce(function(prevArr, currentItem) {
702
+          //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值
703
+          ojb[currentItem.name] ? '' : ojb[currentItem.name] = true && prevArr.push(currentItem);
704
+          return prevArr
705
+        }, [])
706
+
707
+        let newojb = {};
708
+        this.packingUnit = this.packingUnit.reduce(function(prevArr, currentItem) {
709
+          //利用对象的键名无法重复的特点,mch_id是唯一区别的属性值
710
+          newojb[currentItem.name] ? '' : newojb[currentItem.name] = true && prevArr.push(currentItem);
711
+          return prevArr
712
+        }, [])
680
         console.log('this.unitList',this.unitList)
713
         console.log('this.unitList',this.unitList)
681
         this.getInitializtion()
714
         this.getInitializtion()
682
         this.getlist()
715
         this.getlist()

+ 1 - 1
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue View File

566
           </el-col>
566
           </el-col>
567
           
567
           
568
           <el-col :span="8">
568
           <el-col :span="8">
569
-            <el-form-item label="预计进食量:" v-if="isShow('预计进食量')">
569
+            <el-form-item label="预计进食量(g):" v-if="isShow('预计进食量')">
570
              <el-input v-model="assessmentBeforeDislysis.estimated_food_intake"></el-input>
570
              <el-input v-model="assessmentBeforeDislysis.estimated_food_intake"></el-input>
571
             </el-form-item>
571
             </el-form-item>
572
           </el-col>
572
           </el-col>

+ 4 - 4
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

578
             </el-form-item>
578
             </el-form-item>
579
           </el-col>
579
           </el-col>
580
 
580
 
581
-          <el-col :span="8" v-if="isShow('超滤率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35) ">
581
+          <el-col :span="8" v-if="isShow('超滤率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38) ">
582
             <el-form-item label="超滤率(ml/h)">
582
             <el-form-item label="超滤率(ml/h)">
583
               <el-input v-model="form.ultrafiltration_rate"></el-input>
583
               <el-input v-model="form.ultrafiltration_rate"></el-input>
584
             </el-form-item>
584
             </el-form-item>
585
           </el-col>
585
           </el-col>
586
-          <el-col :span="8" v-if="isShow('超滤率') && template_id != 6 && template_id != 10 && template_id != 11 && template_id != 12 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id != 29 && template_id != 30 && template_id != 31 && template_id != 34 && template_id != 35">
586
+          <el-col :span="8" v-if="isShow('超滤率') && template_id != 6 && template_id != 10 && template_id != 11 && template_id != 12 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id != 29 && template_id != 30 && template_id != 31 && template_id != 34 && template_id != 35 && template_id != 38">
587
             <el-form-item label="超滤率(L/h)">
587
             <el-form-item label="超滤率(L/h)">
588
               <el-input v-model="form.ultrafiltration_rate"></el-input>
588
               <el-input v-model="form.ultrafiltration_rate"></el-input>
589
             </el-form-item>
589
             </el-form-item>
591
 
591
 
592
           <el-col
592
           <el-col
593
             :span="8"
593
             :span="8"
594
-            v-if=" isShow('超滤量') && (template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || org_id == 9555) " >
594
+            v-if=" isShow('超滤量') && (template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || org_id == 9555) " >
595
             <el-form-item label="超滤量(ml):">
595
             <el-form-item label="超滤量(ml):">
596
               <el-input v-model="form.ultrafiltration_volume"></el-input>
596
               <el-input v-model="form.ultrafiltration_volume"></el-input>
597
             </el-form-item>
597
             </el-form-item>
599
 
599
 
600
           <el-col
600
           <el-col
601
             :span="8"
601
             :span="8"
602
-            v-if=" isShow('超滤量') && template_id != 6 && template_id !=9 && template_id != 10 && template_id != 11 && template_id != 12 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id!=27 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && org_id !=9555" >
602
+            v-if=" isShow('超滤量') && template_id != 6 && template_id !=9 && template_id != 10 && template_id != 11 && template_id != 12 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id!=27 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && org_id !=9555" >
603
             <el-form-item label="超滤量(L):">
603
             <el-form-item label="超滤量(L):">
604
               <el-input v-model="form.ultrafiltration_volume"></el-input>
604
               <el-input v-model="form.ultrafiltration_volume"></el-input>
605
             </el-form-item>
605
             </el-form-item>

+ 1 - 30
src/xt_pages/dialysis/template/DialysisPrintOrderThirtyEight.vue View File

85
           <div class="widthLength25">附加重物量:{{ predialysis.additional_weight ? predialysis.additional_weight : 0 }} Kg</div>
85
           <div class="widthLength25">附加重物量:{{ predialysis.additional_weight ? predialysis.additional_weight : 0 }} Kg</div>
86
           <div class="widthLength25">透前体重:{{ predialysis.weight_before ? predialysis.weight_before : "" }} Kg</div>
86
           <div class="widthLength25">透前体重:{{ predialysis.weight_before ? predialysis.weight_before : "" }} Kg</div>
87
           <div class="widthLength25">干体重:{{ predialysis.dry_weight ? predialysis.dry_weight : "" }} Kg</div>
87
           <div class="widthLength25">干体重:{{ predialysis.dry_weight ? predialysis.dry_weight : "" }} Kg</div>
88
-          <div class="widthLength25">预计进食量:{{ predialysis.estimated_food_intake ? predialysis.estimated_food_intake : '无' }}</div>
88
+          <div class="widthLength25">预计进食量:{{ predialysis.estimated_food_intake ? predialysis.estimated_food_intake + ' g' : '无' }}</div>
89
       </div>
89
       </div>
90
       <div class="lineHeight">
90
       <div class="lineHeight">
91
           其他:{{ predialysis.remark ? predialysis.remark : '' }}
91
           其他:{{ predialysis.remark ? predialysis.remark : '' }}
169
             <td colspan="3" style="width:130px;height:40px">执行时间</td>
169
             <td colspan="3" style="width:130px;height:40px">执行时间</td>
170
             <td colspan="2" style="width:130px;height:40px">核对护士</td>
170
             <td colspan="2" style="width:130px;height:40px">核对护士</td>
171
             <td colspan="2" style="width:108px;height:40px">执行护士</td>
171
             <td colspan="2" style="width:108px;height:40px">执行护士</td>
172
-            <td colspan="2" style="width:108px;height:40px">带教学生</td>
173
           </tr>
172
           </tr>
174
 
173
 
175
           <tr v-for="(advice, advice_index) in tableAdvice" style="height:30px">
174
           <tr v-for="(advice, advice_index) in tableAdvice" style="height:30px">
211
               </span>
210
               </span>
212
               <img style="height:20px;" :src="setAdminUserES(advice.execution_staff)" alt srcset v-else />
211
               <img style="height:20px;" :src="setAdminUserES(advice.execution_staff)" alt srcset v-else />
213
             </td>
212
             </td>
214
-            <td colspan="2"><span v-if="advice.start_time">无</span></td>
215
           </tr>
213
           </tr>
216
         </tbody>
214
         </tbody>
217
       </table>
215
       </table>
260
               <img class="es-img" style="height:20px;" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse)" alt="" srcset="" v-else>
258
               <img class="es-img" style="height:20px;" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.start_nurse)" alt="" srcset="" v-else>
261
             </span>
259
             </span>
262
           </div>
260
           </div>
263
-          <div style="width:16%;">学生:无</div>
264
       </div>
261
       </div>
265
       <div class="lineHeight">治疗过程中检测记录:血压检测部位:{{ monitors && monitors[0] ? monitors[0].blood_pressure_monitoring_site : '' }}</div>
262
       <div class="lineHeight">治疗过程中检测记录:血压检测部位:{{ monitors && monitors[0] ? monitors[0].blood_pressure_monitoring_site : '' }}</div>
266
       <table class="print-table" border="1">
263
       <table class="print-table" border="1">
413
               <img class="es-img" style="height:20px;" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.finish_nurse)" alt="" srcset="" v-else>
410
               <img class="es-img" style="height:20px;" :src="setAdminUserES(dialysisOrder==null?0:dialysisOrder.finish_nurse)" alt="" srcset="" v-else>
414
             </span>
411
             </span>
415
           </div>
412
           </div>
416
-          <div style="width:16%;">学生:无</div>
417
-          <div style="width:16%;">带教老师:无</div>
418
       </div>
413
       </div>
419
       <div class="lineHeight">
414
       <div class="lineHeight">
420
           病程记录:
415
           病程记录:
883
           if (prescription.anticoagulant == 7) {
878
           if (prescription.anticoagulant == 7) {
884
             prescription.anticoagulant = "低分子肝素钠";
879
             prescription.anticoagulant = "低分子肝素钠";
885
           }
880
           }
886
-          if (prescription.blood_access === 1) {
887
-            prescription.blood_access = "正常";
888
-          }
889
-          if (prescription.blood_access === 2) {
890
-            prescription.blood_access = "震颤";
891
-          }
892
-          if (prescription.blood_access === 3) {
893
-            prescription.blood_access = "堵塞";
894
-          }
895
-          if (prescription.blood_access === 4) {
896
-            prescription.blood_access = "血肿";
897
-          }
898
-          if (prescription.blood_access === 5) {
899
-            prescription.blood_access = "淤血";
900
-          }
901
-          if (prescription.blood_access === 6) {
902
-            prescription.blood_access = "感染";
903
-          }
904
-          if (prescription.blood_access === 7) {
905
-            prescription.blood_access = "自体内瘘";
906
-          }
907
-          if (prescription.blood_access === 8) {
908
-            prescription.blood_access = "人工血管内瘘";
909
-          }
910
           if (prescription.replacement_way === 1) {
881
           if (prescription.replacement_way === 1) {
911
             prescription.replacement_way = "前置换";
882
             prescription.replacement_way = "前置换";
912
           }
883
           }

+ 17 - 18
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue View File

73
             </template>
73
             </template>
74
 
74
 
75
             <template slot-scope="scope">
75
             <template slot-scope="scope">
76
-              <el-form-item style="padding-top: 15px">
76
+              <el-form-item style="padding-top: 20px">
77
                   <el-autocomplete
77
                   <el-autocomplete
78
                     class="checkSearch"
78
                     class="checkSearch"
79
                     popper-class="my-autocomplete"
79
                     popper-class="my-autocomplete"
93
               </el-form-item>
93
               </el-form-item>
94
             </template>
94
             </template>
95
           </el-table-column>
95
           </el-table-column>
96
-           <el-table-column align="center" width="200">
96
+           <el-table-column align="center" width="140">
97
             <template slot="header" slot-scope="scope">
97
             <template slot="header" slot-scope="scope">
98
               <span>药品类型</span>
98
               <span>药品类型</span>
99
             </template>
99
             </template>
100
              <template slot-scope="scope">
100
              <template slot-scope="scope">
101
-               <el-select size="small" v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
101
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
102
                 <el-option
102
                 <el-option
103
                   v-for="(option, index) in drugTypeList"
103
                   v-for="(option, index) in drugTypeList"
104
                   :key="index"
104
                   :key="index"
108
                </el-select>
108
                </el-select>
109
             </template>
109
             </template>
110
           </el-table-column>
110
           </el-table-column>
111
-          <el-table-column align="center" width="200">
111
+          <el-table-column align="center" width="140">
112
             <template slot="header" slot-scope="scope">
112
             <template slot="header" slot-scope="scope">
113
               <span>规格&单位</span>
113
               <span>规格&单位</span>
114
             </template>
114
             </template>
115
             <template slot-scope="scope">
115
             <template slot-scope="scope">
116
-              <el-form-item style="padding-top: 15px">
116
+              <el-form-item style="padding-top: 20px">
117
                 <el-input
117
                 <el-input
118
                   :disabled="true"
118
                   :disabled="true"
119
                   placeholder="请输入规格&单位"
119
                   placeholder="请输入规格&单位"
122
               </el-form-item>
122
               </el-form-item>
123
             </template>
123
             </template>
124
           </el-table-column>
124
           </el-table-column>
125
-         <el-table-column align="center" width="200">
125
+         <el-table-column align="center" width="150">
126
           <template slot="header" slot-scope="scope" >
126
           <template slot="header" slot-scope="scope" >
127
                 <span>批号</span>
127
                 <span>批号</span>
128
             </template>
128
             </template>
129
               <template slot-scope="scope">
129
               <template slot-scope="scope">
130
-                <el-form-item style="padding-top: 15px">
130
+                <el-form-item style="padding-top: 20px">
131
                   <el-input
131
                   <el-input
132
                     placeholder="请输入批号"
132
                     placeholder="请输入批号"
133
                     v-model="scope.row.lot_number"
133
                     v-model="scope.row.lot_number"
136
               </template>
136
               </template>
137
          </el-table-column>
137
          </el-table-column>
138
 
138
 
139
-         <el-table-column align="center" width="180">
139
+         <el-table-column align="center" width="120">
140
             <template slot="header" slot-scope="scope">
140
             <template slot="header" slot-scope="scope">
141
               <span>入库数量<span style="color: red">*</span></span>
141
               <span>入库数量<span style="color: red">*</span></span>
142
             </template>
142
             </template>
144
               <el-form-item
144
               <el-form-item
145
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
145
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
146
                 :rules="tableRules.warehousing_count"
146
                 :rules="tableRules.warehousing_count"
147
-                style="padding-top: 17px"
147
+                style="padding-top: 20px"
148
               >
148
               >
149
                 <el-input
149
                 <el-input
150
                   placeholder="请输入入库数量"
150
                   placeholder="请输入入库数量"
151
                   type="number"
151
                   type="number"
152
                   v-model="scope.row.warehousing_count"
152
                   v-model="scope.row.warehousing_count"
153
-                  style="width:100px"
154
                 ></el-input>
153
                 ></el-input>
155
                 {{scope.row.max_unit}}
154
                 {{scope.row.max_unit}}
156
               </el-form-item>
155
               </el-form-item>
157
             </template>
156
             </template>
158
           </el-table-column>
157
           </el-table-column>
159
        
158
        
160
-          <el-table-column align="center" width="150">
159
+          <el-table-column align="center" width="120">
161
             <template slot="header" slot-scope="scope">
160
             <template slot="header" slot-scope="scope">
162
               <span>进货单价(元)<span style="color: red">*</span></span>
161
               <span>进货单价(元)<span style="color: red">*</span></span>
163
             </template>
162
             </template>
165
               <el-form-item
164
               <el-form-item
166
                 :prop="'recordData.' + scope.$index + '.price'"
165
                 :prop="'recordData.' + scope.$index + '.price'"
167
                 :rules="tableRules.last_price"
166
                 :rules="tableRules.last_price"
168
-                style="padding-top: 17px"
167
+                style="padding-top: 20px"
169
               >
168
               >
170
                 <el-input
169
                 <el-input
171
                   style="width:100px"
170
                   style="width:100px"
178
             </template>
177
             </template>
179
           </el-table-column>
178
           </el-table-column>
180
 
179
 
181
-          <el-table-column label="总价(元)" align="center" width="150">
180
+          <el-table-column label="总价(元)" align="center" width="80">
182
             <template slot-scope="scope">
181
             <template slot-scope="scope">
183
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
182
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
184
             </template>
183
             </template>
185
           </el-table-column>
184
           </el-table-column>
186
 
185
 
187
-          <el-table-column label="生产厂家" width="250" align="center">
186
+          <el-table-column label="生产厂家" width="140" align="center">
188
             <template slot-scope="scope">
187
             <template slot-scope="scope">
189
-               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
188
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
190
                 <el-option
189
                 <el-option
191
                   v-for="(option, index) in manufacturerList"
190
                   v-for="(option, index) in manufacturerList"
192
                   :key="index"
191
                   :key="index"
198
           </el-table-column>
197
           </el-table-column>
199
  
198
  
200
 
199
 
201
-          <el-table-column label="生产日期" width="250" align="center">
200
+          <el-table-column label="生产日期" width="180" align="center">
202
             <template slot-scope="scope">
201
             <template slot-scope="scope">
203
               <el-date-picker
202
               <el-date-picker
204
                 prefix-icon="el-icon-date"
203
                 prefix-icon="el-icon-date"
211
               ></el-date-picker>
210
               ></el-date-picker>
212
             </template>
211
             </template>
213
           </el-table-column>
212
           </el-table-column>
214
-          <el-table-column label="有效日期" width="250" align="center">
213
+          <el-table-column label="有效日期" width="180" align="center">
215
             <template slot-scope="scope">
214
             <template slot-scope="scope">
216
               <el-date-picker
215
               <el-date-picker
217
                 prefix-icon="el-icon-date"
216
                 prefix-icon="el-icon-date"
227
         
226
         
228
         <el-table-column align="center" width="150" label="批准文号">
227
         <el-table-column align="center" width="150" label="批准文号">
229
             <template slot-scope="scope">
228
             <template slot-scope="scope">
230
-              <el-form-item>
229
+              <el-form-item style="padding-top: 20px">
231
                 <el-input
230
                 <el-input
232
                   placeholder="请输入批准文号"
231
                   placeholder="请输入批准文号"
233
                   v-model="scope.row.batch_number"
232
                   v-model="scope.row.batch_number"

+ 24 - 23
src/xt_pages/stock/drugs/drugStockInOrderEdit.vue View File

114
             </template>
114
             </template>
115
 
115
 
116
             <template slot-scope="scope">
116
             <template slot-scope="scope">
117
-              <el-form-item style="padding-top: 15px">
117
+              <el-form-item style="padding-top: 20px">
118
                  <el-autocomplete
118
                  <el-autocomplete
119
                     class="checkSearch"
119
                     class="checkSearch"
120
                     popper-class="my-autocomplete"
120
                     popper-class="my-autocomplete"
134
               </el-form-item>
134
               </el-form-item>
135
             </template>
135
             </template>
136
           </el-table-column>
136
           </el-table-column>
137
-         <el-table-column align="center" width="200">
137
+         <el-table-column align="center" width="140">
138
             <template slot="header" slot-scope="scope">
138
             <template slot="header" slot-scope="scope">
139
               <span>药品类型</span>
139
               <span>药品类型</span>
140
             </template>
140
             </template>
141
              <template slot-scope="scope">
141
              <template slot-scope="scope">
142
-               <el-select size="small" v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
142
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
143
                 <el-option
143
                 <el-option
144
                   v-for="(option, index) in drugTypeList"
144
                   v-for="(option, index) in drugTypeList"
145
                   :key="index"
145
                   :key="index"
149
                </el-select>
149
                </el-select>
150
             </template>
150
             </template>
151
           </el-table-column>
151
           </el-table-column>
152
-          <el-table-column align="center" width="200">
152
+          <el-table-column align="center" width="140">
153
             <template slot="header" slot-scope="scope">
153
             <template slot="header" slot-scope="scope">
154
               <span>规格&单位</span>
154
               <span>规格&单位</span>
155
             </template>
155
             </template>
156
             <template slot-scope="scope">
156
             <template slot-scope="scope">
157
-              <el-form-item style="padding-top: 15px">
157
+              <el-form-item style="padding-top: 20px">
158
                 <el-input
158
                 <el-input
159
                   :disabled="true"
159
                   :disabled="true"
160
                   placeholder="请输入规格&单位"
160
                   placeholder="请输入规格&单位"
163
               </el-form-item>
163
               </el-form-item>
164
             </template>
164
             </template>
165
           </el-table-column>
165
           </el-table-column>
166
-          <el-table-column align="center" width="200">
166
+          <el-table-column align="center" width="140">
167
             <template slot="header" slot-scope="scope" >
167
             <template slot="header" slot-scope="scope" >
168
               <span>批号</span>
168
               <span>批号</span>
169
               </template>
169
               </template>
170
                 <template slot-scope="scope">
170
                 <template slot-scope="scope">
171
-                  <el-form-item style="padding-top: 15px">
171
+                  <el-form-item style="padding-top: 20px">
172
                     <el-input
172
                     <el-input
173
                       placeholder="请输入批号"
173
                       placeholder="请输入批号"
174
                       v-model="scope.row.lot_number"
174
                       v-model="scope.row.lot_number"
177
                 </template>
177
                 </template>
178
           </el-table-column>
178
           </el-table-column>
179
                    
179
                    
180
-         <el-table-column align="center" width="180">
180
+         <el-table-column align="center" width="120">
181
             <template slot="header" slot-scope="scope">
181
             <template slot="header" slot-scope="scope">
182
               <span>入库数量<span style="color: red">*</span></span>
182
               <span>入库数量<span style="color: red">*</span></span>
183
             </template>
183
             </template>
185
               <el-form-item
185
               <el-form-item
186
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
186
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
187
                 :rules="tableRules.warehousing_count"
187
                 :rules="tableRules.warehousing_count"
188
-                style="padding-top: 17px"
188
+                style="padding-top: 20px;"
189
               >
189
               >
190
-                <el-input
191
-                  placeholder="请输入入库数量"
192
-                  type="number"
193
-                  v-model="scope.row.warehousing_count"
194
-                  style="width:100px"
195
-                ></el-input>
196
-                {{scope.row.max_unit}}
190
+                <div style="display:flex;">
191
+                  <el-input
192
+                    placeholder="请输入入库数量"
193
+                    type="number"
194
+                    v-model="scope.row.warehousing_count"
195
+                  ></el-input>
196
+                  {{scope.row.max_unit}}
197
+                </div>
197
               </el-form-item>
198
               </el-form-item>
198
             </template>
199
             </template>
199
           </el-table-column>
200
           </el-table-column>
200
-          <el-table-column>
201
+          <el-table-column width="120">
201
             <template slot="header" slot-scope="scope">
202
             <template slot="header" slot-scope="scope">
202
                 <span>进货单价(元)<span style="color: red">*</span></span>
203
                 <span>进货单价(元)<span style="color: red">*</span></span>
203
               </template>
204
               </template>
205
                 <el-form-item
206
                 <el-form-item
206
                   :prop="'recordData.' + scope.$index + '.price'"
207
                   :prop="'recordData.' + scope.$index + '.price'"
207
                   :rules="tableRules.last_price"
208
                   :rules="tableRules.last_price"
208
-                  style="padding-top: 17px"
209
+                  style="padding-top: 20px"
209
                 >
210
                 >
210
                   <el-input
211
                   <el-input
211
                     style="width:100px"
212
                     style="width:100px"
218
               </template>
219
               </template>
219
           </el-table-column>
220
           </el-table-column>
220
 
221
 
221
-          <el-table-column label="总价(元)" align="center" width="150">
222
+          <el-table-column label="总价(元)" align="center" width="80">
222
             <template slot-scope="scope">
223
             <template slot-scope="scope">
223
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
224
               {{ calculate(scope.row.last_price * scope.row.warehousing_count) }} 
224
             </template>
225
             </template>
225
           </el-table-column>
226
           </el-table-column>
226
          
227
          
227
-          <el-table-column label="生产厂家" width="250" align="center">
228
+          <el-table-column label="生产厂家" width="140" align="center">
228
             <template slot-scope="scope">
229
             <template slot-scope="scope">
229
-               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
230
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
230
                 <el-option
231
                 <el-option
231
                   v-for="(option, index) in manufacturerList"
232
                   v-for="(option, index) in manufacturerList"
232
                   :key="index"
233
                   :key="index"
237
             </template>
238
             </template>
238
           </el-table-column>
239
           </el-table-column>
239
 
240
 
240
-          <el-table-column label="生产日期" width="250" align="center">
241
+          <el-table-column label="生产日期" width="180" align="center">
241
             <template slot-scope="scope">
242
             <template slot-scope="scope">
242
               <el-date-picker
243
               <el-date-picker
243
                 prefix-icon="el-icon-date"
244
                 prefix-icon="el-icon-date"
252
           </el-table-column>
253
           </el-table-column>
253
 
254
 
254
 
255
 
255
-         <el-table-column label="有效日期" width="250" align="center">
256
+         <el-table-column label="有效日期" width="180" align="center">
256
             <template slot-scope="scope">
257
             <template slot-scope="scope">
257
               <el-date-picker
258
               <el-date-picker
258
                 prefix-icon="el-icon-date"
259
                 prefix-icon="el-icon-date"

+ 30 - 27
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue View File

48
           v-model="warehouse_out_time"
48
           v-model="warehouse_out_time"
49
           prefix-icon="el-icon-date"
49
           prefix-icon="el-icon-date"
50
           :editable="false"
50
           :editable="false"
51
-          style="width: 196px;"
51
+          style="width: 200px;"
52
           type="date"
52
           type="date"
53
           placeholder="选择日期时间"
53
           placeholder="选择日期时间"
54
           align="right"
54
           align="right"
65
           filterable
65
           filterable
66
           placeholder="请选择经销商"
66
           placeholder="请选择经销商"
67
           @change="changeDealer"
67
           @change="changeDealer"
68
+          style="width: 200px;"
68
         >
69
         >
69
           <el-option
70
           <el-option
70
             v-for="(option, index) in dealer"
71
             v-for="(option, index) in dealer"
84
           filterable
85
           filterable
85
           placeholder="请选择厂商"
86
           placeholder="请选择厂商"
86
           @change="changeManufacturer"
87
           @change="changeManufacturer"
88
+          style="width: 200px;"
87
         >
89
         >
88
           <el-option
90
           <el-option
89
             v-for="(option, index) in manufacturer"
91
             v-for="(option, index) in manufacturer"
110
             </template>
112
             </template>
111
 
113
 
112
             <template slot-scope="scope">
114
             <template slot-scope="scope">
113
-              <el-form-item style="padding-top: 15px">
115
+              <el-form-item style="padding-top: 20px">
114
                 <el-autocomplete
116
                 <el-autocomplete
115
                     class="checkSearch"
117
                     class="checkSearch"
116
                     popper-class="my-autocomplete"
118
                     popper-class="my-autocomplete"
130
               </el-form-item>
132
               </el-form-item>
131
             </template>
133
             </template>
132
           </el-table-column>
134
           </el-table-column>
133
-          <el-table-column align="center" width="200">
135
+          <el-table-column align="center" width="140">
134
             <template slot="header" slot-scope="scope">
136
             <template slot="header" slot-scope="scope">
135
               <span>药品类型</span>
137
               <span>药品类型</span>
136
             </template>
138
             </template>
137
              <template slot-scope="scope">
139
              <template slot-scope="scope">
138
-               <el-select size="small" v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
140
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
139
                 <el-option
141
                 <el-option
140
                   v-for="(option, index) in drugTypeList"
142
                   v-for="(option, index) in drugTypeList"
141
                   :key="index"
143
                   :key="index"
145
                </el-select>
147
                </el-select>
146
             </template>
148
             </template>
147
           </el-table-column>
149
           </el-table-column>
148
-          <el-table-column align="center" width="200">
150
+          <el-table-column align="center" width="140">
149
             <template slot="header" slot-scope="scope">
151
             <template slot="header" slot-scope="scope">
150
               <span>规格&单位<span style="color: red">*</span></span>
152
               <span>规格&单位<span style="color: red">*</span></span>
151
             </template>
153
             </template>
152
             <template slot-scope="scope">
154
             <template slot-scope="scope">
153
-              <el-form-item style="padding-top: 15px">
155
+              <el-form-item style="padding-top: 20px">
154
                 <el-input
156
                 <el-input
155
                   :disabled="true"
157
                   :disabled="true"
156
                   placeholder="请输入规格&单位"
158
                   placeholder="请输入规格&单位"
159
               </el-form-item>
161
               </el-form-item>
160
             </template>
162
             </template>
161
           </el-table-column>
163
           </el-table-column>
162
-          <el-table-column align="center" width="200">
164
+          <el-table-column align="center" width="150">
163
             <template slot="header" slot-scope="scope" >
165
             <template slot="header" slot-scope="scope" >
164
                   <span>批号</span>
166
                   <span>批号</span>
165
               </template>
167
               </template>
166
                 <template slot-scope="scope">
168
                 <template slot-scope="scope">
167
-                  <el-form-item style="padding-top: 15px">
169
+                  <el-form-item style="padding-top: 20px">
168
                     <el-input
170
                     <el-input
169
                       placeholder="请输入批号"
171
                       placeholder="请输入批号"
170
                       v-model="scope.row.batch_number"
172
                       v-model="scope.row.batch_number"
172
                   </el-form-item>
174
                   </el-form-item>
173
               </template>
175
               </template>
174
           </el-table-column>
176
           </el-table-column>
175
-          <el-table-column width="180" align="center">
177
+          <el-table-column width="120" align="center">
176
             <template slot="header" slot-scope="scope">
178
             <template slot="header" slot-scope="scope">
177
               <span>出库数量<span style="color: red">*</span></span>
179
               <span>出库数量<span style="color: red">*</span></span>
178
             </template>
180
             </template>
180
               <el-form-item
182
               <el-form-item
181
                 :prop="'recordData.' + scope.$index + '.count'"
183
                 :prop="'recordData.' + scope.$index + '.count'"
182
                 :rules="tableRules.count"
184
                 :rules="tableRules.count"
183
-                style="padding-top: 17px"
185
+                style="padding-top: 20px"
184
               >
186
               >
185
-                <el-input
186
-                  placeholder="请输入出库数量"
187
-                  type="number"
188
-                  v-model="scope.row.count"
189
-                  style="width:100px"
190
-                ></el-input>
191
-                {{scope.row.packing_unit}}
187
+                <div style="display:flex;">
188
+                  <el-input
189
+                    placeholder="请输入出库数量"
190
+                    type="number"
191
+                    v-model="scope.row.count"
192
+                  ></el-input>
193
+                  {{scope.row.packing_unit}}
194
+                </div>
192
               </el-form-item>
195
               </el-form-item>
193
               
196
               
194
             </template>
197
             </template>
195
           </el-table-column>
198
           </el-table-column>
196
-          <el-table-column width="100" align="center">
199
+          <el-table-column width="120" align="center">
197
             <template slot="header" slot-scope="scope">
200
             <template slot="header" slot-scope="scope">
198
               <span>出货价<span style="color: red">*</span></span>
201
               <span>出货价<span style="color: red">*</span></span>
199
             </template>
202
             </template>
202
               <el-form-item
205
               <el-form-item
203
                 :prop="'recordData.' + scope.$index + '.last_price'"
206
                 :prop="'recordData.' + scope.$index + '.last_price'"
204
                 :rules="tableRules.last_price"
207
                 :rules="tableRules.last_price"
205
-                style="padding-top: 17px"
208
+                style="padding-top: 20px"
206
               >
209
               >
207
                 <el-input
210
                 <el-input
208
                   placeholder="请输入出货价"
211
                   placeholder="请输入出货价"
235
 
238
 
236
           
239
           
237
 
240
 
238
-          <el-table-column label="总价" width="100" align="center">
241
+          <el-table-column label="总价" width="80" align="center">
239
             <template slot-scope="scope">
242
             <template slot-scope="scope">
240
               {{ calculate(scope.row.last_price * scope.row.count) }}
243
               {{ calculate(scope.row.last_price * scope.row.count) }}
241
             </template>
244
             </template>
254
             </template>
257
             </template>
255
           </el-table-column> -->
258
           </el-table-column> -->
256
           
259
           
257
-             <el-table-column label="生产厂家" width="250" align="center">
260
+          <el-table-column label="生产厂家" width="140" align="center">
258
             <template slot-scope="scope">
261
             <template slot-scope="scope">
259
-               <el-select size="small" v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
262
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
260
                 <el-option
263
                 <el-option
261
                   v-for="(option, index) in manufacturerList"
264
                   v-for="(option, index) in manufacturerList"
262
                   :key="index"
265
                   :key="index"
268
           </el-table-column>
271
           </el-table-column>
269
  
272
  
270
 
273
 
271
-          <el-table-column label="生产日期" width="250" align="center">
274
+          <el-table-column label="生产日期" width="180" align="center">
272
             <template slot-scope="scope">
275
             <template slot-scope="scope">
273
               <el-date-picker
276
               <el-date-picker
274
                 prefix-icon="el-icon-date"
277
                 prefix-icon="el-icon-date"
281
               ></el-date-picker>
284
               ></el-date-picker>
282
             </template>
285
             </template>
283
           </el-table-column>
286
           </el-table-column>
284
-          <el-table-column label="有效日期" width="250" align="center">
287
+          <el-table-column label="有效日期" width="180" align="center">
285
             <template slot-scope="scope">
288
             <template slot-scope="scope">
286
               <el-date-picker
289
               <el-date-picker
287
                 prefix-icon="el-icon-date"
290
                 prefix-icon="el-icon-date"
297
         
300
         
298
         <el-table-column align="center" width="150" label="批准文号">
301
         <el-table-column align="center" width="150" label="批准文号">
299
             <template slot-scope="scope">
302
             <template slot-scope="scope">
300
-              <el-form-item>
303
+              <el-form-item style="padding-top: 20px">
301
                 <el-input
304
                 <el-input
302
                   placeholder="请输入批准文号"
305
                   placeholder="请输入批准文号"
303
                   v-model="scope.row.number"
306
                   v-model="scope.row.number"
306
             </template>
309
             </template>
307
           </el-table-column>
310
           </el-table-column>
308
 
311
 
309
-          <el-table-column label="备注" width="80" align="center">
312
+          <el-table-column label="备注" width="120" align="center">
310
             <template slot-scope="scope">
313
             <template slot-scope="scope">
311
               <el-input v-model="scope.row.remark"></el-input>
314
               <el-input v-model="scope.row.remark"></el-input>
312
             </template>
315
             </template>
313
           </el-table-column>
316
           </el-table-column>
314
 
317
 
315
-          <el-table-column label="操作" align="center" width="150">
318
+          <el-table-column label="操作" align="center" width="150" fixed="right">
316
             <template slot-scope="scope">
319
             <template slot-scope="scope">
317
               <el-tooltip
320
               <el-tooltip
318
                 class="item"
321
                 class="item"

+ 20 - 42
src/xt_pages/stock/drugs/query.vue View File

41
             </el-option>
41
             </el-option>
42
         </el-select>
42
         </el-select>
43
          <el-date-picker
43
          <el-date-picker
44
-            size="small"
45
             v-model="start_time"
44
             v-model="start_time"
46
             prefix-icon="el-icon-date"
45
             prefix-icon="el-icon-date"
47
             :editable="false"
46
             :editable="false"
54
             @change="startTimeChange"
53
             @change="startTimeChange"
55
            ></el-date-picker>-
54
            ></el-date-picker>-
56
             <el-date-picker
55
             <el-date-picker
57
-              size="small"
58
               v-model="end_time"
56
               v-model="end_time"
59
               prefix-icon="el-icon-date"
57
               prefix-icon="el-icon-date"
60
               :editable="false"
58
               :editable="false"
67
               @change="endTimeChange"
65
               @change="endTimeChange"
68
           ></el-date-picker>
66
           ></el-date-picker>
69
           <el-input
67
           <el-input
70
-            size="small"
71
             style="width: 200px;"
68
             style="width: 200px;"
72
             class="filter-item"
69
             class="filter-item"
73
             v-model.trim="keywords"
70
             v-model.trim="keywords"
83
           </el-button>
80
           </el-button>
84
       </div>
81
       </div>
85
       
82
       
86
-       <el-table
87
-        :data="tableList"
88
-        border
89
-        style="width: 100%">
83
+       <el-table :data="tableList" border style="width: 100%">
90
         <!-- <el-table-column prop="date" label="药品编号" width="180">
84
         <!-- <el-table-column prop="date" label="药品编号" width="180">
91
            <template  slot-scope="scope">
85
            <template  slot-scope="scope">
92
               
86
               
93
            </template>
87
            </template>
94
         </el-table-column> -->
88
         </el-table-column> -->
95
-        <el-table-column prop="drug_type" label="药品类型" width="180">
89
+        <el-table-column prop="drug_type" label="药品类型" width="180" align="center">
96
            <template slot-scope="scope">
90
            <template slot-scope="scope">
97
              {{getDrugType(scope.row.drug_type)}}
91
              {{getDrugType(scope.row.drug_type)}}
98
            </template>
92
            </template>
99
         </el-table-column>
93
         </el-table-column>
100
-        <el-table-column prop="drug_name" label="药品名称">
94
+        <el-table-column prop="drug_name" label="药品名称" align="center">
101
            <template slot-scope="scope">
95
            <template slot-scope="scope">
102
              {{scope.row.drug_name}}
96
              {{scope.row.drug_name}}
103
            </template>
97
            </template>
104
         </el-table-column>
98
         </el-table-column>
105
-        <el-table-column prop="drug_name" label="规格&&单位">
99
+        <el-table-column prop="drug_name" label="规格&&单位" align="center">
106
            <template slot-scope="scope">
100
            <template slot-scope="scope">
107
              {{scope.row.dose + scope.row.dose_unit +"*"+scope.row.min_number+scope.row.min_unit+"/"+scope.row.max_unit}}
101
              {{scope.row.dose + scope.row.dose_unit +"*"+scope.row.min_number+scope.row.min_unit+"/"+scope.row.max_unit}}
108
            </template>
102
            </template>
109
         </el-table-column>
103
         </el-table-column>
110
-         <el-table-column prop="drug_name" label="进货单价">
104
+         <el-table-column prop="drug_name" label="进货单价" align="center">
111
            <template slot-scope="scope">
105
            <template slot-scope="scope">
112
              {{scope.row.last_price}}
106
              {{scope.row.last_price}}
113
            </template>
107
            </template>
114
         </el-table-column>
108
         </el-table-column>
115
-         <el-table-column prop="drug_name" label="厂家">
109
+         <el-table-column prop="drug_name" label="厂家" align="center">
116
            <template slot-scope="scope">
110
            <template slot-scope="scope">
117
              {{getManufacturerList(scope.row.manufacturer)}}
111
              {{getManufacturerList(scope.row.manufacturer)}}
118
            </template>
112
            </template>
119
         </el-table-column>
113
         </el-table-column>
120
-        <el-table-column prop="drug_name" label="剩余库存量">
114
+        <el-table-column prop="drug_name" label="剩余库存量" align="center">
121
            <template slot-scope="scope">
115
            <template slot-scope="scope">
122
             <span v-if="scope.row.stock_max_number!=''">
116
             <span v-if="scope.row.stock_max_number!=''">
123
               {{scope.row.stock_max_number}}{{scope.row.max_unit}}
117
               {{scope.row.stock_max_number}}{{scope.row.max_unit}}
127
             </span> 
121
             </span> 
128
            </template>
122
            </template>
129
         </el-table-column>
123
         </el-table-column>
130
-        <el-table-column prop="drug_name" label="操作">
124
+        <el-table-column prop="drug_name" label="操作" align="center">
131
           <template slot-scope="scope">
125
           <template slot-scope="scope">
132
-            <el-tooltip
133
-              class="item"
134
-              effect="dark"
135
-              content="库存流水"
136
-              placement="top"
137
-            >
138
-              <el-button
139
-                size="small"
140
-                type="primary"
141
-                icon="el-icon-edit-outline"
142
-                @click="handleDetail(scope.row.drug_id)"
143
-              >
144
-              </el-button>
145
-            </el-tooltip>
146
-            <el-tooltip
147
-              class="item"
148
-              effect="dark"
149
-              content="批次"
150
-              placement="top"
151
-            >
152
-              <el-button
153
-                size="small"
154
-                type="primary"
155
-                icon="el-icon-edit-outline"
156
-                @click="handleBatch(scope.row.drug_id)"
157
-              >
158
-              </el-button>
159
-            </el-tooltip>
126
+            <el-button
127
+              size="small"
128
+              type="primary"
129
+              @click="handleDetail(scope.row.drug_id)"
130
+            >库存流水
131
+            </el-button>
132
+            <el-button
133
+              size="small"
134
+              type="primary"
135
+              @click="handleBatch(scope.row.drug_id)"
136
+            >批次
137
+            </el-button>
160
           </template>
138
           </template>
161
         </el-table-column>
139
         </el-table-column>
162
        </el-table>
140
        </el-table>

+ 18 - 7
src/xt_pages/stock/stockInOrder.vue View File

71
           @change="changeAllSelected"
71
           @change="changeAllSelected"
72
           >全选</el-checkbox
72
           >全选</el-checkbox
73
         >
73
         >
74
-        <el-button size="small" icon="el-icon-delete" @click="batchDelete"
75
-          >删除</el-button
76
-        >
74
+        <el-button size="small" icon="el-icon-delete" @click="batchDelete">删除</el-button>
75
+
76
+        <el-button size="small" type="primary" @click="toPrint">打印</el-button>
77
       </div>
77
       </div>
78
 
78
 
79
       <el-table
79
       <el-table
188
     </div>
188
     </div>
189
 
189
 
190
 
190
 
191
-   <div v-show="tableShow" style="margin-bottom:10px">
191
+   <div v-show="tableShow" style="margin-top:80px">
192
       <el-table
192
       <el-table
193
         :data="tableList"
193
         :data="tableList"
194
         :class="signAndWeighBoxPatients"
194
         :class="signAndWeighBoxPatients"
204
           color: '#606266'
204
           color: '#606266'
205
         }"
205
         }"
206
       >
206
       >
207
-       <el-table-column align="center" type="selection" width="55">
208
-       </el-table-column>
207
+       <!-- <el-table-column align="center" type="selection" width="55">
208
+       </el-table-column> -->
209
 
209
 
210
        <el-table-column label="耗材名称" align="center">
210
        <el-table-column label="耗材名称" align="center">
211
           <template slot-scope="scope">
211
           <template slot-scope="scope">
790
       drug_id:1,
790
       drug_id:1,
791
       tableShow:false,
791
       tableShow:false,
792
       tableList:[],
792
       tableList:[],
793
-      isVisibility:false
793
+      isVisibility:false,
794
+      order_id:0,
794
     };
795
     };
795
     
796
     
796
   
797
   
1119
       }
1120
       }
1120
     },
1121
     },
1121
     select(selection) {
1122
     select(selection) {
1123
+      this.order_id = selection[0].id
1124
+      console.log("selection",selection)
1122
       this.selectedTableData = selection;
1125
       this.selectedTableData = selection;
1126
+
1123
     },
1127
     },
1124
     batchDelete() {
1128
     batchDelete() {
1125
       if (this.selectedTableData.length <= 0) {
1129
       if (this.selectedTableData.length <= 0) {
1465
 
1469
 
1466
       this.propForm.goodType = [];
1470
       this.propForm.goodType = [];
1467
     },
1471
     },
1472
+    toPrint(){
1473
+      if(this.order_id == 0){
1474
+        this.$message.error("请勾选入库单")
1475
+      }else{
1476
+        this.$router.push("/stock/in/detail/print?id="+this.order_id)
1477
+      }
1478
+    }
1468
   }
1479
   }
1469
 };
1480
 };
1470
 </script>
1481
 </script>

+ 15 - 15
src/xt_pages/stock/stockInOrderAdd.vue View File

76
                   >
76
                   >
77
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
77
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
78
                   <template slot-scope="{ item }">
78
                   <template slot-scope="{ item }">
79
-                    <div class="name">{{ item.good_name }}</div>
79
+                    <div class="name">{{ item.good_name +"  " +item.specification_name }}</div>
80
                   </template>
80
                   </template>
81
                  </el-autocomplete>
81
                  </el-autocomplete>
82
             </template>
82
             </template>
83
           </el-table-column>
83
           </el-table-column>
84
-          <el-table-column align="center" width="200">
84
+          <el-table-column align="center" width="140">
85
             
85
             
86
             <template slot="header" slot-scope="scope">
86
             <template slot="header" slot-scope="scope">
87
               <span>耗材类型<span style="color: red">*</span></span>
87
               <span>耗材类型<span style="color: red">*</span></span>
88
             </template>
88
             </template>
89
      
89
      
90
             <template slot-scope="scope">
90
             <template slot-scope="scope">
91
-              <el-form-item style="padding-top: 15px;margin-left: 10px;margin-right: 10px">
91
+              <el-form-item style="padding-top: 20px;">
92
                 <el-input placeholder="请输入耗材类型" v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)"></el-input>
92
                 <el-input placeholder="请输入耗材类型" v-model="scope.row.good_type_id" :value="typeName(scope.row.good_type_id)"></el-input>
93
               </el-form-item>
93
               </el-form-item>
94
             </template>
94
             </template>
95
           </el-table-column>
95
           </el-table-column>
96
-          <el-table-column align="center" width="200">
96
+          <el-table-column align="center" width="140">
97
             
97
             
98
             <template slot="header" slot-scope="scope">
98
             <template slot="header" slot-scope="scope">
99
               <span>规格&单位<span style="color: red">*</span></span>
99
               <span>规格&单位<span style="color: red">*</span></span>
100
             </template>
100
             </template>
101
             <template slot-scope="scope">
101
             <template slot-scope="scope">
102
 
102
 
103
-              <el-form-item style="padding-top: 15px">
103
+              <el-form-item style="padding-top: 20px">
104
                 <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
104
                 <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
105
               </el-form-item>
105
               </el-form-item>
106
 
106
 
112
               <span>批号</span>
112
               <span>批号</span>
113
             </template>
113
             </template>
114
             <template slot-scope="scope">
114
             <template slot-scope="scope">
115
-              <el-form-item style="padding-top: 17px">
115
+              <el-form-item style="padding-top: 20px">
116
                 <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
116
                 <el-input placeholder="请输入批号" v-model="scope.row.number"></el-input>
117
               </el-form-item>
117
               </el-form-item>
118
 
118
 
120
           </el-table-column>
120
           </el-table-column>
121
 
121
 
122
 
122
 
123
-          <el-table-column align="center" width="180">
123
+          <el-table-column align="center" width="120">
124
             <template slot="header" slot-scope="scope">
124
             <template slot="header" slot-scope="scope">
125
               <span>入库数量<span style="color: red">*</span></span>
125
               <span>入库数量<span style="color: red">*</span></span>
126
             </template>
126
             </template>
127
             <template slot-scope="scope">
127
             <template slot-scope="scope">
128
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
128
               <el-form-item :prop="'recordData.' + scope.$index + '.warehousing_count'"
129
-                            :rules='tableRules.warehousing_count' style="padding-top: 17px">
130
-                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count" style="width:120px"></el-input>
129
+                            :rules='tableRules.warehousing_count' style="padding-top: 20px">
130
+                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"></el-input>
131
                   {{scope.row.min_unit}}
131
                   {{scope.row.min_unit}}
132
               </el-form-item>
132
               </el-form-item>
133
             
133
             
134
             </template>
134
             </template>
135
           </el-table-column>
135
           </el-table-column>
136
 
136
 
137
-          <el-table-column align="center" width="150">
137
+          <el-table-column align="center" width="120">
138
             <template slot="header" slot-scope="scope">
138
             <template slot="header" slot-scope="scope">
139
               <span>进货单价<span style="color: red">*</span></span>
139
               <span>进货单价<span style="color: red">*</span></span>
140
             </template>
140
             </template>
141
             <template slot-scope="scope">
141
             <template slot-scope="scope">
142
             
142
             
143
               <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
143
               <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
144
-                            style="padding-top: 17px">
144
+                            style="padding-top: 20px">
145
                 <el-input placeholder="请输入单价" type="number" v-model="scope.row.price"></el-input>
145
                 <el-input placeholder="请输入单价" type="number" v-model="scope.row.price"></el-input>
146
               </el-form-item>
146
               </el-form-item>
147
 
147
 
149
             </template>
149
             </template>
150
           </el-table-column>
150
           </el-table-column>
151
 
151
 
152
-          <el-table-column label="总价" align="center" width="150">
152
+          <el-table-column label="总价" align="center" width="80">
153
             <template slot-scope="scope">
153
             <template slot-scope="scope">
154
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
154
               {{calculate(scope.row.price*scope.row.warehousing_count)}}
155
             </template>
155
             </template>
168
             </template>
168
             </template>
169
           </el-table-column>
169
           </el-table-column>
170
         
170
         
171
-          <el-table-column label="生产日期" align="center" width="250">
171
+          <el-table-column label="生产日期" align="center" width="180">
172
             <template slot-scope="scope">
172
             <template slot-scope="scope">
173
-              <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.product_date"
173
+              <el-date-picker prefix-icon="el-icon-date" v-model="scope.row.product_date" style="width: 145px"
174
                               type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
174
                               type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
175
                               value-format="yyyy-MM-dd">
175
                               value-format="yyyy-MM-dd">
176
               </el-date-picker>
176
               </el-date-picker>
177
 
177
 
178
             </template>
178
             </template>
179
           </el-table-column>
179
           </el-table-column>
180
-          <el-table-column label="有效日期" align="center" width="250">
180
+          <el-table-column label="有效日期" align="center" width="180">
181
             <template slot-scope="scope">
181
             <template slot-scope="scope">
182
               <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
182
               <el-date-picker prefix-icon="el-icon-date" style="width: 145px" v-model="scope.row.expiry_date"
183
                               type="date" placeholder="选择日期时间" format="yyyy-MM-dd"
183
                               type="date" placeholder="选择日期时间" format="yyyy-MM-dd"

+ 20 - 19
src/xt_pages/stock/stockInOrderEdit.vue View File

40
           v-model="warehousing_time"
40
           v-model="warehousing_time"
41
           prefix-icon="el-icon-date"
41
           prefix-icon="el-icon-date"
42
           :editable="false"
42
           :editable="false"
43
-          style="width: 196px;"
43
+          style="width: 200px;"
44
           type="date"
44
           type="date"
45
           placeholder="选择日期时间"
45
           placeholder="选择日期时间"
46
           align="right"
46
           align="right"
50
         </el-date-picker>
50
         </el-date-picker>
51
       </div>
51
       </div>
52
 
52
 
53
-      <div class="cell clearfix">
53
+      <!-- <div class="cell clearfix">
54
         <label class="title"><span class="name">经销商</span> : </label>
54
         <label class="title"><span class="name">经销商</span> : </label>
55
         <el-select
55
         <el-select
56
           size="small"
56
           size="small"
57
           v-model="form.dealer"
57
           v-model="form.dealer"
58
           clearable
58
           clearable
59
           placeholder="请选择经销商"
59
           placeholder="请选择经销商"
60
+          style="width: 200px;"
60
         >
61
         >
61
           <el-option
62
           <el-option
62
             v-for="(option, index) in dealer"
63
             v-for="(option, index) in dealer"
66
           >
67
           >
67
           </el-option>
68
           </el-option>
68
         </el-select>
69
         </el-select>
69
-      </div>
70
+      </div> -->
70
 
71
 
71
-      <div class="cell clearfix">
72
+      <!-- <div class="cell clearfix">
72
         <label class="title"><span class="name">厂商</span> : </label>
73
         <label class="title"><span class="name">厂商</span> : </label>
73
 
74
 
74
         <el-select
75
         <el-select
76
           v-model="form.manufacturer"
77
           v-model="form.manufacturer"
77
           clearable
78
           clearable
78
           placeholder="请选择厂商"
79
           placeholder="请选择厂商"
80
+          style="width: 200px;"
79
         >
81
         >
80
           <el-option
82
           <el-option
81
             v-for="(option, index) in manufacturer"
83
             v-for="(option, index) in manufacturer"
85
           >
87
           >
86
           </el-option>
88
           </el-option>
87
         </el-select>
89
         </el-select>
88
-      </div>
90
+      </div> -->
89
 
91
 
90
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
92
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
91
         <el-table
93
         <el-table
115
                   >
117
                   >
116
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
118
                     <i class="el-icon-search el-input__icon" slot="suffix"></i>
117
                   <template slot-scope="{ item }">
119
                   <template slot-scope="{ item }">
118
-                    <div class="name">{{ item.good_name }}</div>
120
+                    <div class="name">{{ item.good_name +" " + item.specification_name}}</div>
119
                   </template>
121
                   </template>
120
                  </el-autocomplete>
122
                  </el-autocomplete>
121
             </template>
123
             </template>
122
           </el-table-column>
124
           </el-table-column>
123
-          <el-table-column align="center" width="200">
125
+          <el-table-column align="center" width="140">
124
             <template slot="header" slot-scope="scope">
126
             <template slot="header" slot-scope="scope">
125
               <span>耗材类型<span style="color: red">*</span></span>
127
               <span>耗材类型<span style="color: red">*</span></span>
126
             </template>
128
             </template>
127
 
129
 
128
             <template slot-scope="scope">
130
             <template slot-scope="scope">
129
-              <el-form-item style="padding-top: 15px">
131
+              <el-form-item style="padding-top: 20px">
130
                 <el-input
132
                 <el-input
131
                   placeholder="请输入耗材类型"
133
                   placeholder="请输入耗材类型"
132
                   v-model="scope.row.good_type_id"
134
                   v-model="scope.row.good_type_id"
135
               </el-form-item>
137
               </el-form-item>
136
             </template>
138
             </template>
137
           </el-table-column>
139
           </el-table-column>
138
-          <el-table-column align="center" width="200">
140
+          <el-table-column align="center" width="140">
139
             
141
             
140
             <template slot="header" slot-scope="scope">
142
             <template slot="header" slot-scope="scope">
141
               <span>规格&单位<span style="color: red">*</span></span>
143
               <span>规格&单位<span style="color: red">*</span></span>
142
             </template>
144
             </template>
143
             <template slot-scope="scope">
145
             <template slot-scope="scope">
144
 
146
 
145
-              <el-form-item style="padding-top: 15px">
147
+              <el-form-item style="padding-top: 20px">
146
                 <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
148
                 <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
147
               </el-form-item>
149
               </el-form-item>
148
 
150
 
164
             </template>
166
             </template>
165
           </el-table-column> -->
167
           </el-table-column> -->
166
 
168
 
167
-          <el-table-column align="center" width="150">
169
+          <el-table-column align="center" width="120">
168
             <template slot="header" slot-scope="scope">
170
             <template slot="header" slot-scope="scope">
169
               <span>单价<span style="color: red">*</span></span>
171
               <span>单价<span style="color: red">*</span></span>
170
             </template>
172
             </template>
173
               <el-form-item
175
               <el-form-item
174
                 :prop="'recordData.' + scope.$index + '.price'"
176
                 :prop="'recordData.' + scope.$index + '.price'"
175
                 :rules="tableRules.price"
177
                 :rules="tableRules.price"
176
-                style="padding-top: 17px"
178
+                style="padding-top: 20px"
177
               >
179
               >
178
                 <el-input
180
                 <el-input
179
                   placeholder="请输入单价"
181
                   placeholder="请输入单价"
184
             </template>
186
             </template>
185
           </el-table-column>
187
           </el-table-column>
186
 
188
 
187
-          <el-table-column align="center" width="180">
189
+          <el-table-column align="center" width="120">
188
             <template slot="header" slot-scope="scope">
190
             <template slot="header" slot-scope="scope">
189
               <span>入库数量<span style="color: red">*</span></span>
191
               <span>入库数量<span style="color: red">*</span></span>
190
             </template>
192
             </template>
193
               <el-form-item
195
               <el-form-item
194
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
196
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
195
                 :rules="tableRules.warehousing_count"
197
                 :rules="tableRules.warehousing_count"
196
-                style="padding-top: 17px"
198
+                style="padding-top: 20px"
197
               >
199
               >
198
                 <el-input
200
                 <el-input
199
                   placeholder="请输入入库数量"
201
                   placeholder="请输入入库数量"
200
                   type="number"
202
                   type="number"
201
                   v-model="scope.row.warehousing_count"
203
                   v-model="scope.row.warehousing_count"
202
-                  style="width:120px"
203
                 ></el-input>
204
                 ></el-input>
204
                 {{scope.row.min_unit}}
205
                 {{scope.row.min_unit}}
205
               </el-form-item>
206
               </el-form-item>
206
             </template>
207
             </template>
207
           </el-table-column>
208
           </el-table-column>
208
-          <el-table-column label="总价" align="center" width="150">
209
+          <el-table-column label="总价" align="center" width="80">
209
             <template slot-scope="scope">
210
             <template slot-scope="scope">
210
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
211
               {{ calculate(scope.row.price * scope.row.warehousing_count) }}
211
             </template>
212
             </template>
216
               <span>批号</span>
217
               <span>批号</span>
217
             </template>
218
             </template>
218
             <template slot-scope="scope">
219
             <template slot-scope="scope">
219
-              <el-form-item>
220
+              <el-form-item style="padding-top: 20px">
220
                 <el-input
221
                 <el-input
221
                   placeholder="请输入批号"
222
                   placeholder="请输入批号"
222
                   v-model="scope.row.number"
223
                   v-model="scope.row.number"
225
             </template>
226
             </template>
226
           </el-table-column>
227
           </el-table-column>
227
 
228
 
228
-          <el-table-column label="生产日期" width="250" align="center">
229
+          <el-table-column label="生产日期" width="180" align="center">
229
             <template slot-scope="scope">
230
             <template slot-scope="scope">
230
               <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
231
               <!--{{scope.row.product_date | parseTime("{y}-{m}-{d}")}}-->
231
               <el-date-picker
232
               <el-date-picker
239
               ></el-date-picker>
240
               ></el-date-picker>
240
             </template>
241
             </template>
241
           </el-table-column>
242
           </el-table-column>
242
-          <el-table-column label="有效日期" width="250" align="center">
243
+          <el-table-column label="有效日期" width="180" align="center">
243
             <template slot-scope="scope">
244
             <template slot-scope="scope">
244
               <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
245
               <!--{{ scope.row.expiry_date | parseTime("{y}-{m}-{d}")}}-->
245
               <el-date-picker
246
               <el-date-picker

+ 89 - 11
src/xt_pages/stock/stockOutOrder.vue View File

275
             {{ scope.row.remark }}
275
             {{ scope.row.remark }}
276
           </template>
276
           </template>
277
         </el-table-column>
277
         </el-table-column>
278
-       
278
+        <el-table-column label="操作" align="center">
279
+          <template slot-scope="scope">
280
+            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
+          </template>
282
+        </el-table-column>
279
       </el-table>  
283
       </el-table>  
280
     
284
     
281
   </div>
285
   </div>
379
 
383
 
380
             <el-table-column label="" align="center"  >
384
             <el-table-column label="" align="center"  >
381
               <template slot-scope="scope" v-if="scope.row.is_sys == 1">
385
               <template slot-scope="scope" v-if="scope.row.is_sys == 1">
382
-              <div style="color: #589ff8" @click="jump(scope.row.id)">使用明细</div>
386
+              <div style="color: #589ff8" @click="GetOrderDetailThree(scope.row.id)">使用明细</div>
383
               </template>
387
               </template>
384
             </el-table-column>
388
             </el-table-column>
385
              
389
              
398
   <!-- 使用明细查询 -->
402
   <!-- 使用明细查询 -->
399
    <el-dialog
403
    <el-dialog
400
     title="出库单详情"
404
     title="出库单详情"
401
-    :visible.sync="editdialogVisible"
405
+    :visible.sync="editdialogVisibleTwo"
402
     width="80%">
406
     width="80%">
403
     <span>
407
     <span>
404
       <div class="filter-container">
408
       <div class="filter-container">
405
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
409
         <span style="font-size: 18px;color: #606266">商品使用明细</span>
406
       </div>
410
       </div>
407
      
411
      
408
-      <div class="cell clearfix">
412
+      <!-- <div class="cell clearfix">
409
         <span style="width: 300px;color: #606266">商品类型: {{type_name}} </span>
413
         <span style="width: 300px;color: #606266">商品类型: {{type_name}} </span>
410
         <span style="width: 300px;color: #606266">规格名称: {{specification_name}}</span>
414
         <span style="width: 300px;color: #606266">规格名称: {{specification_name}}</span>
411
-      </div>
415
+      </div> -->
412
 
416
 
413
        <el-row :gutter="12" style="margin-top: 10px">
417
        <el-row :gutter="12" style="margin-top: 10px">
414
         <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 80%"
418
         <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 80%"
597
       </span>
601
       </span>
598
   </el-dialog>
602
   </el-dialog>
599
    
603
    
604
+  
605
+    <el-dialog
606
+      title="出库明细"
607
+      :visible.sync="editdialogVisibleTwo"
608
+      width="60%">
609
+      <span>
610
+         <div class="app-container">
611
+
612
+      <div class="filter-container">
613
+        <span style="font-size: 18px;color: #606266">商品使用明细</span>
614
+      </div>
615
+
616
+       <!-- <div class="cell clearfix">
617
+        <span style="width: 300px;color: #606266">商品类型: {{userList[0].type.type_name}} </span>
618
+        <span style="width: 300px;color: #606266">规格名称: {{userList[0].info.specification_name}}</span>
619
+      </div> -->
620
+
621
+      <el-row :gutter="12" style="margin-top: 10px">
622
+      <el-table :data="userList" :class="signAndWeighBoxPatients" style="width: 50%"
623
+              border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}">
624
+          <el-table-column min-width="35" align="center">
625
+            <template slot="header" slot-scope="scope">
626
+              <span>序号</span>
627
+            </template>
628
+            <template slot-scope="scope">
629
+              <span v-if="scope.row.is_total == 0">{{scope.$index+1}}</span>
630
+              <span v-if="scope.row.is_total == 1">{{'合计'}}</span>
631
+            </template>
632
+          </el-table-column>
633
+
634
+          <el-table-column min-width="35" align="center">
635
+            <template slot="header" slot-scope="scope">
636
+              <span>使用人</span>
637
+            </template>
638
+            <template slot-scope="scope">
639
+              <span v-if="scope.row.is_total == 0">{{scope.row.user.name}}</span>
640
+              <span v-if="scope.row.is_total == 1"></span>
641
+            </template>
642
+          </el-table-column>
643
+          <el-table-column min-width="35" align="center">
644
+            <template slot="header" slot-scope="scope">
645
+              <span>使用数量</span>
646
+            </template>
647
+            <template slot-scope="scope">
648
+              <span v-if="scope.row.is_total == 0">{{scope.row.count}}</span>
649
+              <span  v-if="scope.row.is_total == 1">{{scope.row.total}} </span>
650
+
651
+            </template>
652
+          </el-table-column>
653
+          <el-table-column min-width="35" align="center">
654
+            <template slot="header" slot-scope="scope">
655
+              <span>使用时间</span>
656
+            </template>
657
+            <template slot-scope="scope">
658
+              <span>{{scope.row.ctime | parseTime('{y}-{m}-{d} {h}:{i}')}} </span>
659
+
660
+            </template>
661
+          </el-table-column>
662
+
663
+        </el-table>
664
+      </el-row>
665
+    </div>
666
+      </span>
667
+      <span slot="footer" class="dialog-footer">
668
+        <el-button @click="editdialogVisibleTwo = false">取 消</el-button>
669
+        <el-button type="primary" @click="editdialogVisibleTwo = false">确 定</el-button>
670
+      </span>
671
+    </el-dialog>
600
 
672
 
601
    <stock-in-dialog
673
    <stock-in-dialog
602
         ref="dialog"
674
         ref="dialog"
738
       good_type_id:"",
810
       good_type_id:"",
739
       tableShow:false,
811
       tableShow:false,
740
       tableList:[],
812
       tableList:[],
813
+      dialogVisibleTwo:false,
814
+      userList:[],
815
+      editdialogVisibleTwo:false
741
     };
816
     };
742
   },
817
   },
743
   methods: {
818
   methods: {
1030
             this.tableShow = true
1105
             this.tableShow = true
1031
             for (let i = 0; i < response.data.data.list.length; i++) {
1106
             for (let i = 0; i < response.data.data.list.length; i++) {
1032
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1107
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1033
-
1108
+              console.log("表格00000000",this.tableList)
1034
               this.tableList.push(response.data.data.list[i])
1109
               this.tableList.push(response.data.data.list[i])
1035
             }
1110
             }
1036
             this.warehousingOutInfo.info = response.data.data.info
1111
             this.warehousingOutInfo.info = response.data.data.info
1105
               is_total: 1,
1180
               is_total: 1,
1106
               total: total,
1181
               total: total,
1107
             })
1182
             })
1108
-            this.type_name = this.userList[0].type.type_name
1109
-            this.specification_name = this.userList[0].info.specification_name
1183
+            // this.type_name = this.userList[0].type.type_name
1184
+            // this.specification_name = this.userList[0].info.specification_name
1110
             console.log("详情数据区",this.userList)
1185
             console.log("详情数据区",this.userList)
1111
-            this.editdialogVisible = true
1186
+            this.editdialogVisibleTwo = true
1112
           }
1187
           }
1113
         })
1188
         })
1114
       },
1189
       },
1202
             }
1277
             }
1203
             this.warehouseOut = response.data.data.info
1278
             this.warehouseOut = response.data.data.info
1204
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
1279
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
1205
-            this.form.manufacturer = this.warehouseOut.manufacturer
1206
-            this.form.dealer = this.warehouseOut.dealer
1280
+            // this.form.manufacturer = this.warehouseOut.manufacturer
1281
+            // this.form.dealer = this.warehouseOut.dealer
1207
             this.editDialogVisible = true
1282
             this.editDialogVisible = true
1208
           }
1283
           }
1209
 
1284
 
1427
           }
1502
           }
1428
         })
1503
         })
1429
       }, 
1504
       }, 
1505
+     
1506
+     
1507
+
1430
   }
1508
   }
1431
 };
1509
 };
1432
 </script>
1510
 </script>

+ 12 - 10
src/xt_pages/stock/stockOutOrderAdd.vue View File

45
           v-model="warehouse_out_time"
45
           v-model="warehouse_out_time"
46
           prefix-icon="el-icon-date"
46
           prefix-icon="el-icon-date"
47
           :editable="false"
47
           :editable="false"
48
-          style="width: 196px;"
48
+          style="width: 200px;"
49
           type="date"
49
           type="date"
50
           placeholder="选择日期时间"
50
           placeholder="选择日期时间"
51
           align="right"
51
           align="right"
62
           filterable
62
           filterable
63
           placeholder="请选择经销商"
63
           placeholder="请选择经销商"
64
           @change="changeDealer"
64
           @change="changeDealer"
65
+          style="width: 200px;"
65
         >
66
         >
66
           <el-option
67
           <el-option
67
             v-for="(option, index) in dealer"
68
             v-for="(option, index) in dealer"
81
           filterable
82
           filterable
82
           placeholder="请选择厂商"
83
           placeholder="请选择厂商"
83
           @change="changeManufacturer"
84
           @change="changeManufacturer"
85
+          style="width: 200px;"
84
         >
86
         >
85
           <el-option
87
           <el-option
86
             v-for="(option, index) in manufacturer"
88
             v-for="(option, index) in manufacturer"
101
           max-height="450"
103
           max-height="450"
102
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
104
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
103
         >
105
         >
104
-         <el-table-column width="150" align="center">
106
+         <el-table-column width="200" align="center">
105
             <template slot="header" slot-scope="scope">
107
             <template slot="header" slot-scope="scope">
106
               <span>耗材名称</span>
108
               <span>耗材名称</span>
107
             </template>
109
             </template>
108
 
110
 
109
             <template slot-scope="scope">
111
             <template slot-scope="scope">
110
-              <el-form-item style="padding-top: 15px">
112
+              <el-form-item style="padding-top: 20px">
111
                 <el-autocomplete
113
                 <el-autocomplete
112
                     class="checkSearch"
114
                     class="checkSearch"
113
                     popper-class="my-autocomplete"
115
                     popper-class="my-autocomplete"
127
               </el-form-item>
129
               </el-form-item>
128
             </template>
130
             </template>
129
           </el-table-column>
131
           </el-table-column>
130
-          <el-table-column  width="150" align="center">
132
+          <el-table-column  width="140" align="center">
131
             <template slot="header" slot-scope="scope">
133
             <template slot="header" slot-scope="scope">
132
               <span>耗材类型</span>
134
               <span>耗材类型</span>
133
             </template>
135
             </template>
135
             <template slot-scope="scope">
137
             <template slot-scope="scope">
136
              
138
              
137
 
139
 
138
-              <el-form-item style="padding-top: 15px">
140
+              <el-form-item style="padding-top: 20px">
139
                 <el-input
141
                 <el-input
140
                   placeholder="请输入商品类型"
142
                   placeholder="请输入商品类型"
141
                   v-model="scope.row.good_type_id"
143
                   v-model="scope.row.good_type_id"
146
           </el-table-column>
148
           </el-table-column>
147
       
149
       
148
           
150
           
149
-          <el-table-column width="150" align="center">
151
+          <el-table-column width="140" align="center">
150
             <template slot="header" slot-scope="scope">
152
             <template slot="header" slot-scope="scope">
151
               <span>规格&&单位<span style="color: red">*</span></span>
153
               <span>规格&&单位<span style="color: red">*</span></span>
152
             </template>
154
             </template>
153
             <template slot-scope="scope">
155
             <template slot-scope="scope">
154
-              <el-form-item style="padding-top: 15px">
156
+              <el-form-item style="padding-top: 20px">
155
                 <el-input v-model="scope.row.name"></el-input>
157
                 <el-input v-model="scope.row.name"></el-input>
156
               </el-form-item>
158
               </el-form-item>
157
             </template>
159
             </template>
193
               <el-form-item
195
               <el-form-item
194
                 :prop="'recordData.' + scope.$index + '.price'"
196
                 :prop="'recordData.' + scope.$index + '.price'"
195
                 :rules="tableRules.price"
197
                 :rules="tableRules.price"
196
-                style="padding-top: 17px"
198
+                style="padding-top: 20px"
197
               >
199
               >
198
                 <el-input
200
                 <el-input
199
                   placeholder="请输入单价"
201
                   placeholder="请输入单价"
206
 
208
 
207
 
209
 
208
 
210
 
209
-          <el-table-column label="总价"  width="150" align="center">
211
+          <el-table-column label="总价"  width="80" align="center">
210
             <template slot-scope="scope">
212
             <template slot-scope="scope">
211
               {{ calculate(scope.row.price * scope.row.count) }}
213
               {{ calculate(scope.row.price * scope.row.count) }}
212
             </template>
214
             </template>
260
             </template>
262
             </template>
261
           </el-table-column>
263
           </el-table-column>
262
 
264
 
263
-          <el-table-column label="操作" align="center" min-width="20" width="150">
265
+          <el-table-column label="操作" align="center" min-width="150">
264
             <template slot-scope="scope">
266
             <template slot-scope="scope">
265
               <el-tooltip
267
               <el-tooltip
266
                 class="item"
268
                 class="item"

+ 9 - 10
src/xt_pages/stock/stockOutOrderEdit.vue View File

26
       <div class="cell clearfix">
26
       <div class="cell clearfix">
27
         <label class="title"><span class="name">出库时间</span> : </label>
27
         <label class="title"><span class="name">出库时间</span> : </label>
28
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
28
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
29
-                        style="width: 196px;"
29
+                        style="width: 200px;"
30
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
30
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
31
                         value-format="yyyy-MM-dd"></el-date-picker>
31
                         value-format="yyyy-MM-dd"></el-date-picker>
32
       </div>
32
       </div>
34
 
34
 
35
       <div class="cell clearfix">
35
       <div class="cell clearfix">
36
         <label class="title"><span class="name">经销商</span> : </label>
36
         <label class="title"><span class="name">经销商</span> : </label>
37
-        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
37
+        <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer" style="width: 200px;">
38
           <el-option
38
           <el-option
39
             v-for="(option, index) in dealer"
39
             v-for="(option, index) in dealer"
40
             :key="index"
40
             :key="index"
47
 
47
 
48
       <div class="cell clearfix">
48
       <div class="cell clearfix">
49
         <label class="title"><span class="name">厂商</span> : </label>
49
         <label class="title"><span class="name">厂商</span> : </label>
50
-
51
-        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer">
50
+        <el-select size="small" v-model="form.manufacturer" clearable placeholder="请选择厂商" @change="changeManufacturer" style="width: 200px;">
52
           <el-option
51
           <el-option
53
             v-for="(option, index) in manufacturer"
52
             v-for="(option, index) in manufacturer"
54
             :key="index"
53
             :key="index"
64
         >
63
         >
65
 
64
 
66
        
65
        
67
-          <el-table-column width="150" align="center">
66
+          <el-table-column width="200" align="center">
68
               <template slot="header" slot-scope="scope">
67
               <template slot="header" slot-scope="scope">
69
                 <span>耗材名称</span>
68
                 <span>耗材名称</span>
70
               </template>
69
               </template>
71
 
70
 
72
               <template slot-scope="scope">
71
               <template slot-scope="scope">
73
-                <el-form-item style="padding-top: 15px">
72
+                <el-form-item style="padding-top: 20px">
74
                   <el-autocomplete
73
                   <el-autocomplete
75
                       class="checkSearch"
74
                       class="checkSearch"
76
                       popper-class="my-autocomplete"
75
                       popper-class="my-autocomplete"
90
                 </el-form-item>
89
                 </el-form-item>
91
               </template>
90
               </template>
92
             </el-table-column>
91
             </el-table-column>
93
-           <el-table-column width="150" align="center">
92
+           <el-table-column width="140" align="center">
94
             <template slot="header" slot-scope="scope">
93
             <template slot="header" slot-scope="scope">
95
               <span>耗材类型<span style="color: red">*</span></span>
94
               <span>耗材类型<span style="color: red">*</span></span>
96
             </template>
95
             </template>
97
 
96
 
98
             <template slot-scope="scope">
97
             <template slot-scope="scope">
99
-              <el-form-item style="padding-top: 15px">
98
+              <el-form-item style="padding-top: 20px">
100
                 <el-input
99
                 <el-input
101
                   placeholder="请输入商品类型"
100
                   placeholder="请输入商品类型"
102
                   v-model="scope.row.good_type_id"
101
                   v-model="scope.row.good_type_id"
107
           </el-table-column>
106
           </el-table-column>
108
           
107
           
109
              
108
              
110
-          <el-table-column width="150" align="center">
109
+          <el-table-column width="140" align="center">
111
             <template slot="header" slot-scope="scope">
110
             <template slot="header" slot-scope="scope">
112
               <span>规格&&单位<span style="color: red">*</span></span>
111
               <span>规格&&单位<span style="color: red">*</span></span>
113
             </template>
112
             </template>
114
             <template slot-scope="scope">
113
             <template slot-scope="scope">
115
-              <el-form-item style="padding-top: 15px">
114
+              <el-form-item style="padding-top: 20px">
116
                 <el-input v-model="scope.row.name"></el-input>
115
                 <el-input v-model="scope.row.name"></el-input>
117
               </el-form-item>
116
               </el-form-item>
118
             </template>
117
             </template>

+ 87 - 40
src/xt_pages/stock/stockQuery.vue View File

62
           <el-button size="small" type="primary" @click="toPrint">打印</el-button>
62
           <el-button size="small" type="primary" @click="toPrint">打印</el-button>
63
         </div>
63
         </div>
64
       </div>
64
       </div>
65
-      
65
+
66
 
66
 
67
       <!-- <el-table
67
       <!-- <el-table
68
         :row-style="{ color: '#303133' }"
68
         :row-style="{ color: '#303133' }"
185
             {{scope.row.price}}
185
             {{scope.row.price}}
186
           </template>
186
           </template>
187
         </el-table-column>
187
         </el-table-column>
188
-        <el-table-column label="厂商">
188
+        <el-table-column label="厂商" align="center">
189
           <template slot-scope="scope">
189
           <template slot-scope="scope">
190
            {{getManufacture(scope.row.manufacturer)}}
190
            {{getManufacture(scope.row.manufacturer)}}
191
           </template>
191
           </template>
192
         </el-table-column>
192
         </el-table-column>
193
-       <el-table-column label="剩余库存量">
193
+       <el-table-column label="入库数量" align="center">
194
+         <template slot-scope="scope">
195
+          <span>{{getInCount(scope.row.good_id)}}</span>
196
+         </template>
197
+       </el-table-column>
198
+       <el-table-column label="出库数量" align="center">
199
+         <template slot-scope="scope">
200
+           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
201
+
202
+         </template>
203
+       </el-table-column>
204
+      
205
+       <el-table-column label="剩余库存量" align="center">
194
          <template slot-scope="scope">
206
          <template slot-scope="scope">
195
-          <span v-if="scope.row.stock_count!=0">{{scope.row.stock_count}}</span>
207
+           {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
196
          </template>
208
          </template>
197
        </el-table-column>
209
        </el-table-column>
198
        <el-table-column label="操作" align="center" width="260px">
210
        <el-table-column label="操作" align="center" width="260px">
199
           <template slot-scope="scope">
211
           <template slot-scope="scope">
200
-            <el-tooltip
201
-              class="item"
202
-              effect="dark"
203
-              content="库存流水"
204
-              placement="top"
205
-            >
206
               <el-button
212
               <el-button
207
                 size="small"
213
                 size="small"
208
                 type="primary"
214
                 type="primary"
209
-                icon="el-icon-edit-outline"
210
                 @click="toClick(scope.row)"
215
                 @click="toClick(scope.row)"
211
-              >
216
+              >库存流水
212
               </el-button>
217
               </el-button>
213
-            </el-tooltip>
214
-
215
-            <el-tooltip
216
-              class="item"
217
-              type="primary"
218
-              content="批次"
219
-              placement="top"
220
-            >
221
               <el-button
218
               <el-button
222
                 size="small"
219
                 size="small"
223
                 type="primary"
220
                 type="primary"
224
-                icon="el-icon-edit-outline"
225
                 @click="toClickOne(scope.row)"
221
                 @click="toClickOne(scope.row)"
226
-              >
222
+              >批次
227
               </el-button>
223
               </el-button>
228
-            </el-tooltip>
229
           </template>
224
           </template>
230
         </el-table-column>
225
         </el-table-column>
231
       </el-table>
226
       </el-table>
252
   GetAllGoodInfo,
247
   GetAllGoodInfo,
253
   GetAllGoodType,
248
   GetAllGoodType,
254
   getAllStockQueryList,
249
   getAllStockQueryList,
255
-  getAllStockList
250
+  getAllStockList,
251
+  getStockDrugCount
256
 } from "@/api/stock";
252
 } from "@/api/stock";
257
 
253
 
258
 export default {
254
 export default {
262
     this.GetAllGoodInfo();
258
     this.GetAllGoodInfo();
263
     this.GetAllGoodType();
259
     this.GetAllGoodType();
264
     this.getlist()
260
     this.getlist()
261
+    this.getStockDrugCount()
265
   },
262
   },
266
   components: {
263
   components: {
267
     BreadCrumb
264
     BreadCrumb
291
       type_name:0,
288
       type_name:0,
292
       types:[],
289
       types:[],
293
       tableList:[],
290
       tableList:[],
294
-      manufacturerList:[]
291
+      manufacturerList:[],
292
+      countList:[],
293
+      outCountList:[],
294
+      autoCountList:[],
295
     };
295
     };
296
   },
296
   },
297
   methods: {
297
   methods: {
305
         end_time:this.end_time,
305
         end_time:this.end_time,
306
         type_name:this.type_name,
306
         type_name:this.type_name,
307
       };
307
       };
308
-     
308
+
309
       this.WarehouseInfo.loading = true;
309
       this.WarehouseInfo.loading = true;
310
       this.WarehouseInfo.warehouseInfoDate = [];
310
       this.WarehouseInfo.warehouseInfoDate = [];
311
       getAllStockQueryList(Params).then(response => {
311
       getAllStockQueryList(Params).then(response => {
321
           }
321
           }
322
         }
322
         }
323
         console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
323
         console.log("数据源头",this.WarehouseInfo.warehouseInfoDate)
324
-         
324
+
325
          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
325
          for(let i=0;i<this.WarehouseInfo.warehouseInfoDate.length;i++){
326
             this.WarehouseInfo.warehouseInfoDate[i].type_name = this.WarehouseInfo.warehouseInfoDate[i].type.type_name
326
             this.WarehouseInfo.warehouseInfoDate[i].type_name = this.WarehouseInfo.warehouseInfoDate[i].type.type_name
327
 
327
 
349
 
349
 
350
 
350
 
351
          }
351
          }
352
-        
352
+
353
         console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
353
         console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
354
       });
354
       });
355
     },
355
     },
369
             this.goodType.push(response.data.data.goodType[i]);
369
             this.goodType.push(response.data.data.goodType[i]);
370
             this.types.push(response.data.data.goodType[i])
370
             this.types.push(response.data.data.goodType[i])
371
           }
371
           }
372
-          
372
+
373
           console.log("商品类型",this.types)
373
           console.log("商品类型",this.types)
374
         }
374
         }
375
       });
375
       });
391
     },
391
     },
392
     handleSizeChange(val) {
392
     handleSizeChange(val) {
393
       this.limit = val;
393
       this.limit = val;
394
-     
394
+
395
       this.getlist()
395
       this.getlist()
396
     },
396
     },
397
     handleCurrentChange(val) {
397
     handleCurrentChange(val) {
403
     },
403
     },
404
     startTimeChange: function(val) {
404
     startTimeChange: function(val) {
405
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
405
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
406
-      
406
+
407
       if (time > 0) {
407
       if (time > 0) {
408
         this.$message.error("开始时间不能大于结束时间");
408
         this.$message.error("开始时间不能大于结束时间");
409
         this.start_time = "";
409
         this.start_time = "";
421
         this.end_time = val
421
         this.end_time = val
422
          this.getlist()
422
          this.getlist()
423
       }
423
       }
424
-     
424
+
425
     },
425
     },
426
     stockInCount: function(row) {
426
     stockInCount: function(row) {
427
       let total = 0;
427
       let total = 0;
438
       return total;
438
       return total;
439
     },
439
     },
440
     stockOutCount: function(row) {
440
     stockOutCount: function(row) {
441
-      
441
+
442
       let total = 0;
442
       let total = 0;
443
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
443
       for (let i = 0; i < row.query_warehouseout_info.length; i++) {
444
         total = total + row.query_warehouseout_info[i].count;
444
         total = total + row.query_warehouseout_info[i].count;
461
     },
461
     },
462
 
462
 
463
     exportList(){
463
     exportList(){
464
-      
464
+
465
          import('@/vendor/Export2Excel').then(excel => {
465
          import('@/vendor/Export2Excel').then(excel => {
466
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
466
          const tHeader = ['商品编码', '耗材名称', '耗材类型','规格型号','入库数量','进货价','入库退货','实际入库','出库数量','出库退库','实际出库','剩余库存']
467
-         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus'] 
467
+         const filterVal = ['good_code', 'good_name', 'type_name','specification_name','stockInCount','price','salesReturnCount','realCount','stockOutCount','cancelStockCount','realOutCount','overplus']
468
          const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
468
          const data = this.formatJson(filterVal, this.WarehouseInfo.warehouseInfoDate)
469
          console.log("data",data)
469
          console.log("data",data)
470
-         
470
+
471
          excel.export_json_to_excel({
471
          excel.export_json_to_excel({
472
            header: tHeader,
472
            header: tHeader,
473
            data,
473
            data,
484
       },
484
       },
485
       toPrint(){
485
       toPrint(){
486
         this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name+"&page="+this.page+"&limit="+this.limit)
486
         this.$router.push("/stock/stockprint?start_time="+this.start_time+"&end_time="+this.end_time+"&keyword="+this.keywords+"&type_name="+this.type_name+"&page="+this.page+"&limit="+this.limit)
487
-        
487
+
488
       },
488
       },
489
 
489
 
490
       getUnit(id){
490
       getUnit(id){
491
-        
491
+
492
         var name = ""
492
         var name = ""
493
         for(let i=0;i<this.$store.getters.good_unit.length;i++){
493
         for(let i=0;i<this.$store.getters.good_unit.length;i++){
494
            if(id == this.$store.getters.good_unit[i].id){
494
            if(id == this.$store.getters.good_unit[i].id){
495
               name = this.$store.getters.good_unit[i].name
495
               name = this.$store.getters.good_unit[i].name
496
-           } 
496
+           }
497
         }
497
         }
498
         return name
498
         return name
499
       },
499
       },
548
     },
548
     },
549
     toClickOne(val){
549
     toClickOne(val){
550
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
550
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
551
-    }
551
+    },
552
+    getStockDrugCount(){
553
+        var params ={
554
+          keywords: this.keywords,
555
+          start_time:this.start_time,
556
+          end_time:this.end_time,
557
+        }
558
+      getStockDrugCount(params).then(response=>{
559
+         if(response.data.state == 1){
560
+           var count = response.data.data.count
561
+           console.log("入库统计",count)
562
+           this.countList = count
563
+           var outlist = response.data.data.outList
564
+           console.log("出库数量",outlist)
565
+           this.outCountList = outlist
566
+           var autoCount = response.data.data.autoCount
567
+           console.log("autoCount",autoCount)
568
+           this.autoCountList = autoCount
569
+         }
570
+      })
571
+    },
572
+    getInCount(id){
573
+      var count= ""
574
+     for(let i=0;i<this.countList.length;i++){
575
+      if(id == this.countList[i].good_id){
576
+          count = this.countList[i].count
577
+      }
578
+     }
579
+     return count
580
+    },
581
+    getOutCount(id){
582
+      var count = ""
583
+      for(let i=0;i<this.outCountList.length;i++){
584
+         if(id == this.outCountList[i].good_id){
585
+           count = this.outCountList[i].count
586
+         }
587
+      }
588
+      return count
589
+    },
590
+   getAutoCount(id){
591
+     var count= ""
592
+     for(let i=0;i<this.autoCountList.length;i++){
593
+       if(id == this.autoCountList[i].good_id){
594
+         count = this.outCountList[i].count
595
+       }
596
+     }
597
+     return count
598
+   }
552
   }
599
   }
553
 };
600
 };
554
 </script>
601
 </script>