浏览代码

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

see999 3 年前
父节点
当前提交
510a833ca2

+ 8 - 0
src/api/stock.js 查看文件

641
     params: params
641
     params: params
642
   })
642
   })
643
 }
643
 }
644
+
645
+export function getOrderDetailById(params) {
646
+  return request({
647
+    url: '/api/good/getorderdetaibyid',
648
+    method: 'Get',
649
+    params: params
650
+  })
651
+}

+ 9 - 0
src/router/modules/drugs.js 查看文件

199
       hidden: true,
199
       hidden: true,
200
       is_menu: false,
200
       is_menu: false,
201
       meta: { title: 'stockBatchNumber' }
201
       meta: { title: 'stockBatchNumber' }
202
+    },
203
+    {
204
+      path: '/drug/out/drugstockoutorderedit',
205
+      component: () => import('@/xt_pages/stock/drugs/drugStockOutOrderEdit'),
206
+      name: 'drugStockOutOrderEdit',
207
+      hidden: true,
208
+      is_menu: false,
209
+      meta: { title: 'drugStockOutOrderEdit' }
210
+
202
     }
211
     }
203
 
212
 
204
   ]
213
   ]

+ 1 - 27
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue 查看文件

24
       </div>
24
       </div>
25
 
25
 
26
 
26
 
27
-      <!--<el-table-->
28
-      <!--:header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"-->
29
-      <!--:data="other_doctor_advices"-->
30
-      <!--border-->
31
-      <!--style="width: 100%"-->
32
-      <!--ref="advices_list"-->
33
-      <!--@row-click="cellMouseEnter"-->
34
-      <!--:row-class-name="tableRowClassName"-->
35
-      <!--:span-method="objectSpanMethod"-->
36
-      <!--:cell-class-name="adviceNameShow"-->
37
-      <!--:modal-append-to-body="false"-->
38
-      <!--highlight-current-row-->
39
-      <!--@current-change="handleCurrentChange"-->
40
-      <!--&gt;-->
41
-
42
-      <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">-->
43
-      <!--<template slot-scope="scope">-->
44
-      <!--<span class="el-dropdown-link">-->
45
-      <!--{{ getAdviceContent(scope.row, 1)-->
46
-      <!--}}-->
47
-      <!--<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
48
-      <!--</span>-->
49
-      <!--</template>-->
50
-      <!--</el-table-column>-->
51
-
52
-
53
-      <!--</el-table>-->
27
+      
54
       <el-form
28
       <el-form
55
         ref="adForm"
29
         ref="adForm"
56
         :rules="adRules"
30
         :rules="adRules"

+ 7 - 2
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue 查看文件

693
             adviceNames: [],
693
             adviceNames: [],
694
             advice_doctor: this.groupForm.advice_doctor,
694
             advice_doctor: this.groupForm.advice_doctor,
695
             remark: this.groupForm.remark,
695
             remark: this.groupForm.remark,
696
-            parent_id: this.groupForm.parent_id
696
+            parent_id: this.groupForm.parent_id,
697
+            id:this.groupForm.id,
697
           };
698
           };
698
          
699
          
699
           var adviceNames = [];
700
           var adviceNames = [];
700
           for (const index in this.groupForm.adviceNames) {
701
           for (const index in this.groupForm.adviceNames) {
701
             adviceNames.unshift(this.groupForm.adviceNames[index]);
702
             adviceNames.unshift(this.groupForm.adviceNames[index]);
702
           }
703
           }
704
+          for(let i=0;i<adviceNames.length;i++){
705
+            adviceNames[i].template_id = "888888888"
706
+          }
703
           submitForm.adviceNames = adviceNames;
707
           submitForm.adviceNames = adviceNames;
704
           let mode = "1";
708
           let mode = "1";
705
           
709
           
729
              }
733
              }
730
           }
734
           }
731
           console.log("2222",submitForm)
735
           console.log("2222",submitForm)
732
-          
736
+  
733
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
737
           CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
734
             response => {
738
             response => {
735
               if (response.data.state == 0) {
739
               if (response.data.state == 0) {
1684
   created(){
1688
   created(){
1685
     //获取自备药
1689
     //获取自备药
1686
     this.getSelfMedicalList()
1690
     this.getSelfMedicalList()
1691
+    console.log("模板数据",this.adviceTemplates)
1687
   }
1692
   }
1688
 };
1693
 };
1689
 </script>
1694
 </script>

+ 1 - 1
src/xt_pages/stock/drugs/drugStockInOrderAdd.vue 查看文件

98
               <span>药品类型</span>
98
               <span>药品类型</span>
99
             </template>
99
             </template>
100
              <template slot-scope="scope">
100
              <template slot-scope="scope">
101
-               <el-select 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"

+ 5 - 4
src/xt_pages/stock/drugs/drugStockOutOrder.vue 查看文件

667
     },
667
     },
668
 
668
 
669
     handleEdit: function(index, row) {
669
     handleEdit: function(index, row) {
670
-      this.$router.push({
671
-        name: "drugStockOutDetail",
672
-        query: { id: row.id, type: this.type }
673
-      });
670
+      // this.$router.push({
671
+      //   name: "drugStockOutDetail",
672
+      //   query: { id: row.id, type: this.type }
673
+      // });
674
+      this.$router.push({path:"/drug/out/drugstockoutorderedit?id="+row.id+"&type="+this.type})
674
     },
675
     },
675
     // handleSearch(id,time,warehouse_out_order_number){
676
     // handleSearch(id,time,warehouse_out_order_number){
676
     //   this.warehousingOutInfo.warehousingOutData = []
677
     //   this.warehousingOutInfo.warehousingOutData = []

+ 6 - 47
src/xt_pages/stock/drugs/drugStockOutOrderAdd.vue 查看文件

25
     </div>
25
     </div>
26
 
26
 
27
     <div class="app-container">
27
     <div class="app-container">
28
-    <!---->
29
-      <!--<stock-in-dialog-->
30
-        <!--ref="dialog" :propForm="propForm"-->
31
-        <!--:visibility="isVisibility"-->
32
-        <!--v-on:dialog-comfirm="comfirm"-->
33
-        <!--v-on:dialog-cancle="cancle"-->
34
-      <!--&gt;</stock-in-dialog>-->
28
+  
35
 
29
 
36
       <drugs-stock-dialog
30
       <drugs-stock-dialog
37
         ref="dialog" :propForm="propForm"
31
         ref="dialog" :propForm="propForm"
57
         ></el-date-picker>
51
         ></el-date-picker>
58
       </div>
52
       </div>
59
 
53
 
60
-      <div class="cell clearfix">
54
+      <!-- <div class="cell clearfix">
61
         <label class="title"><span class="name">经销商</span> : </label>
55
         <label class="title"><span class="name">经销商</span> : </label>
62
         <el-select
56
         <el-select
63
           size="small"
57
           size="small"
75
           >
69
           >
76
           </el-option>
70
           </el-option>
77
         </el-select>
71
         </el-select>
78
-      </div>
72
+      </div> -->
79
 
73
 
80
-      <div class="cell clearfix">
74
+      <!-- <div class="cell clearfix">
81
         <label class="title"><span class="name">厂商</span> : </label>
75
         <label class="title"><span class="name">厂商</span> : </label>
82
         <el-select
76
         <el-select
83
           size="small"
77
           size="small"
95
           >
89
           >
96
           </el-option>
90
           </el-option>
97
         </el-select>
91
         </el-select>
98
-      </div>
92
+      </div> -->
99
 
93
 
100
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
94
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
101
         <el-table
95
         <el-table
216
             </template>
210
             </template>
217
           </el-table-column>
211
           </el-table-column>
218
 
212
 
219
-        
220
-         
221
-          
222
-          <!-- <el-table-column width="80" align="center">
223
-            <template slot="header" slot-scope="scope">
224
-              <span>单位<span style="color: red">*</span></span>
225
-            </template>
226
-            <template slot-scope="scope">
227
-              <el-select v-model="scope.row.min_unit" style="width:100px;" placeholder="请选择">
228
-                <el-option
229
-                  v-for="(item,index) in getDataConfig('hemodialysis','units')"
230
-                  :key="index"
231
-                  :label="item.name"
232
-                  :value="item.name">
233
-                </el-option>
234
-              </el-select>
235
-            </template>
236
-          </el-table-column>
237
-          -->
238
-
239
-          
240
-
241
           <el-table-column label="总价" width="80" align="center">
213
           <el-table-column label="总价" width="80" align="center">
242
             <template slot-scope="scope">
214
             <template slot-scope="scope">
243
               {{ calculate(scope.row.last_price * scope.row.count) }}
215
               {{ calculate(scope.row.last_price * scope.row.count) }}
244
             </template>
216
             </template>
245
           </el-table-column>
217
           </el-table-column>
246
-
247
-
248
-          <!-- <el-table-column label="零售价" align="center" width="150">
249
-            <template slot-scope="scope">
250
-              {{ scope.row.retail_price }}
251
-            </template>
252
-          </el-table-column>
253
-
254
-          <el-table-column label="零价总价" align="center" width="150">
255
-            <template slot-scope="scope">
256
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
257
-            </template>
258
-          </el-table-column> -->
259
-          
218
+   
260
           <el-table-column label="生产厂家" width="140" align="center">
219
           <el-table-column label="生产厂家" width="140" align="center">
261
             <template slot-scope="scope">
220
             <template slot-scope="scope">
262
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
221
                <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">

+ 208 - 50
src/xt_pages/stock/drugs/drugStockOutOrderEdit.vue 查看文件

38
       >
38
       >
39
       </drugs-stock-dialog>
39
       </drugs-stock-dialog>
40
 
40
 
41
-      <div class="cell clearfix">
41
+      <!-- <div class="cell clearfix">
42
         <label class="title"><span class="name">出库时间</span> : </label>
42
         <label class="title"><span class="name">出库时间</span> : </label>
43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
43
         <el-date-picker size="small" v-model="warehouse_out_time" prefix-icon="el-icon-date" :editable="false"
44
                         style="width: 196px;"
44
                         style="width: 196px;"
45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
45
                         type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
46
                         value-format="yyyy-MM-dd"></el-date-picker>
46
                         value-format="yyyy-MM-dd"></el-date-picker>
47
-      </div>
47
+      </div> -->
48
 
48
 
49
 
49
 
50
-      <div class="cell clearfix">
50
+      <!-- <div class="cell clearfix">
51
         <label class="title"><span class="name">经销商</span> : </label>
51
         <label class="title"><span class="name">经销商</span> : </label>
52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
52
         <el-select size="small" v-model="form.dealer" clearable placeholder="请选择经销商" @change="changeDealer">
53
           <el-option
53
           <el-option
57
             :value="option.id">
57
             :value="option.id">
58
           </el-option>
58
           </el-option>
59
         </el-select>
59
         </el-select>
60
-      </div>
61
-
60
+      </div> -->
62
 
61
 
62
+<!-- 
63
       <div class="cell clearfix">
63
       <div class="cell clearfix">
64
         <label class="title"><span class="name">厂商</span> : </label>
64
         <label class="title"><span class="name">厂商</span> : </label>
65
 
65
 
71
             :value="option.id">
71
             :value="option.id">
72
           </el-option>
72
           </el-option>
73
         </el-select>
73
         </el-select>
74
-      </div>
74
+      </div> -->
75
 
75
 
76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
76
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
77
         <el-table :data="recordInfo.recordData" :class="signAndWeighBoxPatients" style="width: 100%" border
85
 
85
 
86
             <template slot-scope="scope">
86
             <template slot-scope="scope">
87
               <el-form-item style="padding-top: 15px">
87
               <el-form-item style="padding-top: 15px">
88
-                <el-input
89
-                  placeholder="请输入药品名称"
90
-                  v-model="scope.row.drug_id"
91
-                  :value="typeName(scope.row.drug_id)"
92
-                  @focus="showDialog(scope.$index, scope.row)"
93
-                ></el-input>
88
+                 <el-autocomplete
89
+                    class="checkSearch"
90
+                    popper-class="my-autocomplete"
91
+                    v-model="scope.row.drug_name"
92
+                    :fetch-suggestions="querySearchAsync"
93
+                    :trigger-on-focus="false"
94
+                    placeholder="请输入药品名称"
95
+                    @select="handleSelect"
96
+                    @input="changeDrugName(scope.$index)"
97
+                    style="width:160px;"
98
+                  >
99
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
100
+                  <template slot-scope="{ item }">
101
+                    <div class="name">{{ item.drug_name + item.dose + "*"+ item.dose_unit +item.min_number + item.min_unit +"/" + item.max_unit}}</div>
102
+                  </template>
103
+                 </el-autocomplete>
94
               </el-form-item>
104
               </el-form-item>
95
             </template>
105
             </template>
96
           </el-table-column>
106
           </el-table-column>
97
-          <el-table-column align="center" width="200">
107
+          <el-table-column align="center" width="140">
98
             <template slot="header" slot-scope="scope">
108
             <template slot="header" slot-scope="scope">
99
-              <span>规格名称<span style="color: red">*</span></span>
109
+              <span>药品类型</span>
110
+            </template>
111
+             <template slot-scope="scope">
112
+               <el-select v-model="scope.row.drug_type" filterable placeholder="请选择厂商">
113
+                <el-option
114
+                  v-for="(option, index) in drugTypeList"
115
+                  :key="index"
116
+                  :label="option.name"
117
+                  :value="option.id">
118
+                </el-option>
119
+               </el-select>
120
+            </template>
121
+          </el-table-column>
122
+          <el-table-column align="center" width="140">
123
+            <template slot="header" slot-scope="scope">
124
+              <span>规格&单位</span>
100
             </template>
125
             </template>
101
             <template slot-scope="scope">
126
             <template slot-scope="scope">
102
-              <el-form-item style="padding-top: 15px">
127
+              <el-form-item style="padding-top: 20px">
103
                 <el-input
128
                 <el-input
104
-                  placeholder="请输入规格名称"
105
-                  v-model="scope.row.drug_id"
106
-                  :value="specificationName(scope.row.drug_id)"
107
-                  @focus="showDialog(scope.$index, scope.row)"
129
+                  :disabled="true"
130
+                  placeholder="请输入规格&单位"
131
+                  v-model="scope.row.name"
108
                 ></el-input>
132
                 ></el-input>
109
               </el-form-item>
133
               </el-form-item>
110
             </template>
134
             </template>
111
           </el-table-column>
135
           </el-table-column>
112
-
113
-
114
-          <el-table-column min-width="23" align="center">
136
+         <el-table-column align="center" width="150">
137
+            <template slot="header" slot-scope="scope" >
138
+                  <span>批号</span>
139
+              </template>
140
+                <template slot-scope="scope">
141
+                  <el-form-item style="padding-top: 20px">
142
+                    <el-input
143
+                      placeholder="请输入批号"
144
+                      v-model="scope.row.batch_number"
145
+                    ></el-input>
146
+                  </el-form-item>
147
+              </template>
148
+          </el-table-column>
149
+           <el-table-column width="120" align="center">
115
             <template slot="header" slot-scope="scope">
150
             <template slot="header" slot-scope="scope">
116
-              <span>进价<span style="color: red">*</span></span>
151
+              <span>出库数量<span style="color: red">*</span></span>
117
             </template>
152
             </template>
118
             <template slot-scope="scope">
153
             <template slot-scope="scope">
119
-              <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
120
-              <el-form-item :prop="'recordData.' + scope.$index + '.price'" :rules='tableRules.price'
121
-                            style="padding-top: 17px">
122
-                <el-input type="number" v-model="scope.row.price"></el-input>
154
+              <el-form-item
155
+                :prop="'recordData.' + scope.$index + '.count'"
156
+                :rules="tableRules.count"
157
+                style="padding-top: 20px"
158
+              >
159
+                <div style="display:flex;">
160
+                  <el-input
161
+                    placeholder="请输入出库数量"
162
+                    type="number"
163
+                    v-model="scope.row.count"
164
+                  ></el-input>
165
+                  {{scope.row.packing_unit}}
166
+                </div>
123
               </el-form-item>
167
               </el-form-item>
124
-
125
-
168
+              
126
             </template>
169
             </template>
127
           </el-table-column>
170
           </el-table-column>
128
-
129
-          <el-table-column min-width="23" align="center">
171
+         <el-table-column width="120" align="center">
130
             <template slot="header" slot-scope="scope">
172
             <template slot="header" slot-scope="scope">
131
-              <span>出库数量<span style="color: red">*</span></span>
173
+              <span>出货价<span style="color: red">*</span></span>
132
             </template>
174
             </template>
133
             <template slot-scope="scope">
175
             <template slot-scope="scope">
134
-              <el-form-item :prop="'recordData.' + scope.$index + '.count'" :rules='tableRules.count'
135
-                            style="padding-top: 17px">
136
-                <el-input type="number" v-model="scope.row.count"></el-input>
176
+            
177
+              <el-form-item
178
+                :prop="'recordData.' + scope.$index + '.last_price'"
179
+                :rules="tableRules.last_price"
180
+                style="padding-top: 20px"
181
+              >
182
+                <el-input
183
+                  placeholder="请输入出货价"
184
+                  type="number"
185
+                  v-model="scope.row.last_price"
186
+                ></el-input>
137
               </el-form-item>
187
               </el-form-item>
138
             </template>
188
             </template>
139
           </el-table-column>
189
           </el-table-column>
140
-
141
-          <el-table-column label="进价总价" min-width="20" align="center">
190
+           <el-table-column label="总价" width="80" align="center">
142
             <template slot-scope="scope">
191
             <template slot-scope="scope">
143
-              {{calculate(scope.row.price*scope.row.count)}}
192
+              {{ calculate(scope.row.last_price * scope.row.count) }}
144
             </template>
193
             </template>
145
           </el-table-column>
194
           </el-table-column>
146
-
147
-
148
-          <el-table-column label="零价" align="center" width="150">
195
+          <el-table-column label="生产厂家" width="140" align="center">
149
             <template slot-scope="scope">
196
             <template slot-scope="scope">
150
-              {{ scope.row.retail_price }}
197
+               <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
198
+                <el-option
199
+                  v-for="(option, index) in manufacturerList"
200
+                  :key="index"
201
+                  :label="option.manufacturer_name"
202
+                  :value="option.id">
203
+                </el-option>
204
+               </el-select>
151
             </template>
205
             </template>
152
           </el-table-column>
206
           </el-table-column>
153
-
154
-          <el-table-column label="零价总价" align="center" width="150">
207
+            <el-table-column label="生产日期" width="180" align="center">
155
             <template slot-scope="scope">
208
             <template slot-scope="scope">
156
-              {{ calculate(scope.row.retail_price * scope.row.count) }}
209
+              <el-date-picker
210
+                prefix-icon="el-icon-date"
211
+                style="width: 145px"
212
+                v-model="scope.row.product_date"
213
+                type="date"
214
+                placeholder="选择日期时间"
215
+                format="yyyy-MM-dd"
216
+                value-format="yyyy-MM-dd"
217
+              ></el-date-picker>
218
+            </template>
219
+          </el-table-column>
220
+          <el-table-column label="有效日期" width="180" align="center">
221
+            <template slot-scope="scope">
222
+              <el-date-picker
223
+                prefix-icon="el-icon-date"
224
+                style="width: 145px"
225
+                v-model="scope.row.expiry_date"
226
+                type="date"
227
+                placeholder="选择日期时间"
228
+                format="yyyy-MM-dd"
229
+                value-format="yyyy-MM-dd"
230
+              ></el-date-picker>
231
+            </template>
232
+          </el-table-column>
233
+           <el-table-column align="center" width="150" label="批准文号">
234
+            <template slot-scope="scope">
235
+              <el-form-item style="padding-top: 20px">
236
+                <el-input
237
+                  placeholder="请输入批准文号"
238
+                  v-model="scope.row.number"
239
+                ></el-input>
240
+              </el-form-item>
157
             </template>
241
             </template>
158
           </el-table-column>
242
           </el-table-column>
159
 
243
 
160
-
161
-          <el-table-column label="备注" min-width="20" align="center">
244
+          <el-table-column label="备注" width="120" align="center">
162
             <template slot-scope="scope">
245
             <template slot-scope="scope">
163
               <el-input v-model="scope.row.remark"></el-input>
246
               <el-input v-model="scope.row.remark"></el-input>
164
             </template>
247
             </template>
165
           </el-table-column>
248
           </el-table-column>
249
+
166
           <el-table-column label="操作" align="center" min-width="20">
250
           <el-table-column label="操作" align="center" min-width="20">
167
             <template slot-scope="scope">
251
             <template slot-scope="scope">
168
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
252
               <el-tooltip class="item" effect="dark" content="新增" placement="top">
200
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
284
   import { deleteDrugWarehouseOutInfo, editDrugWarehouseoutInfo, getDrugSalesReturnConfig, getDrugWarehouseOutInfo,GetAllConfig,GetAllDrugInfoByID } from '@/api/drug/drug_stock'
201
   import BreadCrumb from '../../components/bread-crumb'
285
   import BreadCrumb from '../../components/bread-crumb'
202
   import DrugsStockDialog from './drugsStockDialog/index'
286
   import DrugsStockDialog from './drugsStockDialog/index'
203
-
287
+  import {postSearchDrugList } from "@/api/data"
288
+  import { getDictionaryDataConfig } from "@/utils/data";
204
   export default {
289
   export default {
205
     components: { DrugsStockDialog, BreadCrumb},
290
     components: { DrugsStockDialog, BreadCrumb},
206
     name: 'salesReturnEdit',
291
     name: 'salesReturnEdit',
264
         dealer: [],
349
         dealer: [],
265
         goodType: [],
350
         goodType: [],
266
         goodInfo:[],
351
         goodInfo:[],
352
+        drugTypeList:[],
353
+        manufacturerList:[]
267
       }
354
       }
268
     },
355
     },
269
     methods: {
356
     methods: {
474
             return false
561
             return false
475
           }
562
           }
476
         })
563
         })
477
-      }, GetOrderDetail: function(order_id) {
564
+      }, 
565
+      GetOrderDetail: function(order_id) {
478
         const params = {
566
         const params = {
479
           'id': order_id
567
           'id': order_id
480
         }
568
         }
483
             this.$message.error(response.data.msg)
571
             this.$message.error(response.data.msg)
484
             return false
572
             return false
485
           } else {
573
           } else {
574
+             console.log("list222222",response.data.data.list)
575
+            var manulist = response.data.data.manulist
486
             for (let i = 0; i < response.data.data.list.length; i++) {
576
             for (let i = 0; i < response.data.data.list.length; i++) {
577
+              response.data.data.list[i].drug_name = response.data.data.list[i].drug.drug_name,
578
+              response.data.data.list[i].drug_type = response.data.data.list[i].drug.drug_type
579
+              response.data.data.list[i].name = response.data.data.list[i].drug.dose + response.data.data.list[i].drug.dose_unit +"*"+response.data.data.list[i].drug.min_number+response.data.data.list[i].drug.min_unit + "/" + response.data.data.list[i].drug.max_unit
580
+              response.data.data.list[i].last_price = response.data.data.list[i].drug.last_price.toString()
581
+              response.data.data.list[i].number = response.data.data.list[i].drug.number
582
+              response.data.data.list[i].manufacturer = response.data.data.list[i].drug.manufacturer
487
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
583
               response.data.data.list[i].price = response.data.data.list[i].price.toString()
488
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
584
               response.data.data.list[i].retail_price = response.data.data.list[i].retail_price.toString()
489
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
585
               response.data.data.list[i].count = response.data.data.list[i].count.toString()
490
               this.recordInfo.recordData.push(response.data.data.list[i])
586
               this.recordInfo.recordData.push(response.data.data.list[i])
491
             }
587
             }
588
+             for(let j=0;j<this.recordInfo.recordData.length;j++){
589
+               for(let i=0;i<manulist.length;i++){
590
+                  if(this.recordInfo.recordData[j].manufacturer == manulist[i].id){
591
+                     this.recordInfo.recordData[j].manufacturer = manulist[i].manufacturer_name
592
+                  }
593
+               }
594
+              }
595
+
492
             this.warehouseOut = response.data.data.info
596
             this.warehouseOut = response.data.data.info
493
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
597
             this.warehouse_out_time = this.getTime(this.warehouseOut.warehouse_out_time, '{y}-{m}-{d}')
494
             this.form.manufacturer = this.warehouseOut.manufacturer
598
             this.form.manufacturer = this.warehouseOut.manufacturer
517
         this.propForm.manufacturer = val
621
         this.propForm.manufacturer = val
518
       }, changeDealer(val) {
622
       }, changeDealer(val) {
519
         this.propForm.dealer = val
623
         this.propForm.dealer = val
520
-      }
624
+      },
625
+      querySearchAsync(keyword, cb) {
626
+        let key = '';
627
+        if (keyword != undefined) {
628
+          key = keyword
629
+        }
630
+        let searchArray = [];
631
+        postSearchDrugList(key).then(response => {
632
+          if (response.data.state == 1) {
633
+            searchArray = response.data.data.list;
634
+            
635
+             var list = response.data.data.list
636
+             console.log("猎豹22222222222",list)
637
+
638
+             this.drugList = list
639
+             var manufacturerList = response.data.data.manufacturerList
640
+             this.manufacturerList = manufacturerList
641
+             for(let i=0;i<this.drugList.length;i++){
642
+             
643
+                for(let j=0;j<this.manufacturerList.length;j++){
644
+                  if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
645
+                     this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
646
+                  }
647
+                }
648
+             }
649
+           
650
+             cb(this.drugList)
651
+          } else {
652
+            cb([])
653
+          }
654
+        })
655
+      },
656
+     changeDrugName(val){
657
+        this.currentIndex = val
658
+      },
659
+      handleSelect(val){
660
+         for(let i=0;i<this.recordInfo.recordData.length;i++){
661
+           if(i == this.currentIndex){
662
+             this.recordInfo.recordData[i].drug_id  = val.id
663
+             this.recordInfo.recordData[i].drug_name = val.drug_name
664
+             this.recordInfo.recordData[i].drug_type = val.drug_type
665
+             this.recordInfo.recordData[i].name  = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
666
+             this.recordInfo.recordData[i].last_price = val.last_price
667
+             this.recordInfo.recordData[i].manufacturer =  val.manufacturer
668
+             this.recordInfo.recordData[i].batch_number = val.number
669
+             this.recordInfo.recordData[i].max_unit = val.max_unit
670
+             this.recordInfo.recordData[i].min_unit = val.min_unit
671
+           }
672
+        }
673
+        console.log("333333",this.recordInfo.recordData)
674
+      },
675
+      getDictionaryDataConfig(module, filed_name) {
676
+        return getDictionaryDataConfig(module, filed_name)
677
+      },
521
     },
678
     },
522
     created() {
679
     created() {
680
+      this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
523
       this.GetConfigInfo()
681
       this.GetConfigInfo()
524
       this.propForm.goodUnit = this.$store.getters.good_unit
682
       this.propForm.goodUnit = this.$store.getters.good_unit
525
       const order_id = this.$route.query.id
683
       const order_id = this.$route.query.id

+ 8 - 26
src/xt_pages/stock/stockBatchNumber.vue 查看文件

166
       }
166
       }
167
     },
167
     },
168
     methods:{
168
     methods:{
169
-    
170
-     
171
        handleSizeChange(val) {
169
        handleSizeChange(val) {
172
         this.limit = val
170
         this.limit = val
173
-        this.GetAllDrugStockQueryList()
171
+        this.getlist()
174
       },
172
       },
175
       handleCurrentChange(val) {
173
       handleCurrentChange(val) {
176
         this.page = val
174
         this.page = val
177
-        this.GetAllDrugStockQueryList()
175
+        this.getlist()
178
       },
176
       },
179
         
177
         
180
     startTimeChange: function(val) {
178
     startTimeChange: function(val) {
184
         this.$message.error("开始时间不能大于结束时间");
182
         this.$message.error("开始时间不能大于结束时间");
185
         this.start_time = "";
183
         this.start_time = "";
186
       } else {
184
       } else {
187
-        this.GetAllDrugStockQueryList();
185
+        this.getlist()
188
       }
186
       }
189
     },
187
     },
190
     endTimeChange: function(val) {
188
     endTimeChange: function(val) {
193
         this.$message.error("结束时间不能小于开始时间");
191
         this.$message.error("结束时间不能小于开始时间");
194
         this.end_time = "";
192
         this.end_time = "";
195
       } else {
193
       } else {
196
-        this.GetAllDrugStockQueryList();
194
+       this.getlist()
197
       }
195
       }
198
      },
196
      },
199
      changeDrug(){},
197
      changeDrug(){},
238
          }
236
          }
239
       })
237
       })
240
      },
238
      },
241
-    //  getOutList(){
242
-    //   var params= {
243
-    //       limit:this.limit,
244
-    //       page:this.page,
245
-    //       id:this.$route.query.id,
246
-    //       start_time:this.start_time,
247
-    //       end_time:this.end_time, 
248
-    //     } 
249
-    //    getStockOutList(params).then(response=>{
250
-    //       if(response.data.state == 1){
251
-    //          var outlist = response.data.data.outList
252
-    //          console.log("出库数据",outlist)
253
-    //          for(let i=0;i<outlist.length;i++){
254
-    //            outlist[i].stock_way = 2
255
-    //            this.tableList.push(outlist[i])
256
-    //          }
257
-    //          console.log("hhhhhhhhhhh",this.tableList)
258
-    //       }
259
-    //    })  
260
-    //  }
239
+     getTimestamp(time) {
240
+      // 把时间日期转成时间戳
241
+      return new Date(time).getTime() / 1000;
242
+     },
261
     }
243
     }
262
   }
244
   }
263
 </script>
245
 </script>

+ 75 - 38
src/xt_pages/stock/stockFlow.vue 查看文件

6
     <div class="app-container ">
6
     <div class="app-container ">
7
       <div class="cell clearfix">
7
       <div class="cell clearfix">
8
        耗材名称:{{this.$route.query.good_name}}
8
        耗材名称:{{this.$route.query.good_name}}
9
-       <!-- 库存:
10
-       厂家: -->
9
+       库存:{{getInCount(this.$route.query.id)}}
10
+       <!-- 厂家:{{this.$route.query.manufacturer}}
11
+       规格: -->
11
       </div>
12
       </div>
12
       <div class="cell clearfix">
13
       <div class="cell clearfix">
13
         <span>日期查询:</span>
14
         <span>日期查询:</span>
38
               @change="endTimeChange"
39
               @change="endTimeChange"
39
           ></el-date-picker>
40
           ></el-date-picker>
40
 
41
 
41
-        <span>出入库方式:</span>
42
-        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
42
+        <!-- <span>出入库方式:</span> -->
43
+        <!-- <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
43
             <el-option
44
             <el-option
44
               v-for="(item,index) in stockType"
45
               v-for="(item,index) in stockType"
45
               :key="index"
46
               :key="index"
46
               :label="item.name"
47
               :label="item.name"
47
               :value="item.id">
48
               :value="item.id">
48
             </el-option>
49
             </el-option>
49
-        </el-select>
50
+        </el-select> -->
50
         
51
         
51
         
52
         
52
       </div>
53
       </div>
84
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
              <span v-if="scope.row.stock_way == 2 && scope.row.count!=0">{{scope.row.count}}</span>
85
            </template>
86
            </template>
86
         </el-table-column>
87
         </el-table-column>
87
-         <el-table-column prop="drug_name" label="库存剩余量"  align="center">
88
+         <el-table-column prop="drug_name" label="剩余库存量"  align="center">
88
            <template slot-scope="scope">
89
            <template slot-scope="scope">
89
-             <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span>
90
+             <!-- <span v-if="scope.row.stock_way == 4 && scope.row.stock_count!=0">{{scope.row.stock_count}} </span> -->
91
+              {{getInCount(scope.row.good_id)- getOutCount(scope.row.good_id) - getAutoCount(scope.row.good_id)}}
90
            </template>
92
            </template>
91
         </el-table-column>
93
         </el-table-column>
92
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
94
         <el-table-column prop="drug_name" label="进/出货单价"  align="center">
133
 <script>
135
 <script>
134
   import { uParseTime } from '@/utils/tools'
136
   import { uParseTime } from '@/utils/tools'
135
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
137
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
136
-  import {getStockInList,getStockOutList} from "@/api/drug/drug_stock";
138
+  import {getStockInList} from "@/api/drug/drug_stock";
139
+  import {getStockDrugCount} from "@/api/stock"
137
   export default {
140
   export default {
138
     name: 'stockIn',
141
     name: 'stockIn',
139
     created() {
142
     created() {
140
-    //   var drugCategory = getDictionaryDataConfig('system','drug_category')
141
-    //   this.drugCategory.push(...drugCategory)
142
-    //   this.drugTypeList = getDictionaryDataConfig('system','drug_type') 
143
+     
143
       this.getlist()
144
       this.getlist()
144
-      this.getOutList()
145
+      this.getStockDrugCount()
146
+
145
     },
147
     },
146
     components: {
148
     components: {
147
       BreadCrumb
149
       BreadCrumb
184
           {id:2,name:"自动出库"},
186
           {id:2,name:"自动出库"},
185
           {id:3,name:"入库"},
187
           {id:3,name:"入库"},
186
         ],
188
         ],
187
-      
189
+        countList:[],
190
+        outCountList:[],
191
+        autoCountList:[],
192
+        keywords:"",
193
+        obj:{},
188
       }
194
       }
189
     },
195
     },
190
     methods:{
196
     methods:{
192
      
198
      
193
        handleSizeChange(val) {
199
        handleSizeChange(val) {
194
         this.limit = val
200
         this.limit = val
195
-        this.GetAllDrugStockQueryList()
201
+        this.getlist()
196
       },
202
       },
197
       handleCurrentChange(val) {
203
       handleCurrentChange(val) {
198
         this.page = val
204
         this.page = val
199
-        this.GetAllDrugStockQueryList()
205
+        this.getlist()
200
       },
206
       },
201
         
207
         
202
     startTimeChange: function(val) {
208
     startTimeChange: function(val) {
206
         this.$message.error("开始时间不能大于结束时间");
212
         this.$message.error("开始时间不能大于结束时间");
207
         this.start_time = "";
213
         this.start_time = "";
208
       } else {
214
       } else {
209
-        this.GetAllDrugStockQueryList();
215
+        this.getlist()
210
       }
216
       }
211
     },
217
     },
212
     endTimeChange: function(val) {
218
     endTimeChange: function(val) {
215
         this.$message.error("结束时间不能小于开始时间");
221
         this.$message.error("结束时间不能小于开始时间");
216
         this.end_time = "";
222
         this.end_time = "";
217
       } else {
223
       } else {
218
-        this.GetAllDrugStockQueryList();
224
+       this.getlist()
219
       }
225
       }
220
      },
226
      },
221
-     changeDrug(){},
222
      getManufacturer(id){
227
      getManufacturer(id){
223
        var name = ""
228
        var name = ""
224
        for(let i=0;i<this.manufacturerList.length;i++){
229
        for(let i=0;i<this.manufacturerList.length;i++){
262
          }
267
          }
263
       })
268
       })
264
      },
269
      },
265
-    //  getOutList(){
266
-    //   var params= {
267
-    //       limit:this.limit,
268
-    //       page:this.page,
269
-    //       id:this.$route.query.id,
270
-    //       start_time:this.start_time,
271
-    //       end_time:this.end_time, 
272
-    //     } 
273
-    //    getStockOutList(params).then(response=>{
274
-    //       if(response.data.state == 1){
275
-    //          var outlist = response.data.data.outList
276
-    //          console.log("出库数据",outlist)
277
-    //          for(let i=0;i<outlist.length;i++){
278
-    //            outlist[i].stock_way = 2
279
-    //            this.tableList.push(outlist[i])
280
-    //          }
281
-    //          console.log("hhhhhhhhhhh",this.tableList)
282
-    //       }
283
-    //    })  
284
-    //  }
270
+    getStockDrugCount(){
271
+        var params ={
272
+          keywords: this.keywords,
273
+          start_time:this.start_time,
274
+          end_time:this.end_time,
275
+        }
276
+      getStockDrugCount(params).then(response=>{
277
+         if(response.data.state == 1){
278
+           var count = response.data.data.count
279
+           console.log("详情入库统计",count)
280
+           this.countList = count
281
+           var outlist = response.data.data.outList
282
+           console.log("详情出库数量",outlist)
283
+           this.outCountList = outlist
284
+           var autoCount = response.data.data.autoCount
285
+           console.log("详情自动出库",autoCount)
286
+           this.autoCountList = autoCount
287
+         }
288
+      })
289
+    },
290
+    getInCount(id){
291
+      var count= ""
292
+      for(let i=0;i<this.countList.length;i++){
293
+          if(id == this.countList[i].good_id){
294
+              count = this.countList[i].count
295
+          }
296
+        }
297
+        return count
298
+        },
299
+      getOutCount(id){
300
+        console.log("id222",id)
301
+        var count = ""
302
+        for(let i=0;i<this.outCountList.length;i++){
303
+          if(id == this.outCountList[i].good_id){
304
+            count = this.outCountList[i].count
305
+          }
306
+        }
307
+        return count
308
+      },
309
+      getAutoCount(id){
310
+        var count= ""
311
+        for(let i=0;i<this.autoCountList.length;i++){
312
+          if(id == this.autoCountList[i].good_id){
313
+            count = this.outCountList[i].count
314
+          }
315
+        }
316
+        return count
317
+      },
318
+     getTimestamp(time) {
319
+      // 把时间日期转成时间戳
320
+      return new Date(time).getTime() / 1000;
321
+     },
285
     }
322
     }
286
   }
323
   }
287
 </script>
324
 </script>

+ 34 - 5
src/xt_pages/stock/stockOutOrder.vue 查看文件

232
         
232
         
233
         <el-table-column label="出库数量" align="center">
233
         <el-table-column label="出库数量" align="center">
234
           <template slot-scope="scope">
234
           <template slot-scope="scope">
235
-            {{ scope.row.count}}
235
+           <span v-if="scope.row.is_sys == 0">{{ scope.row.count}}</span> 
236
+           <span v-if="scope.row.is_sys == 1">{{getOutStockCount(scope.row.good_id)}}</span> 
236
           </template>
237
           </template>
237
         </el-table-column>
238
         </el-table-column>
238
 
239
 
277
         </el-table-column>
278
         </el-table-column>
278
         <el-table-column label="操作" align="center">
279
         <el-table-column label="操作" align="center">
279
           <template slot-scope="scope">
280
           <template slot-scope="scope">
280
-            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetail(scope.row.id)">使用明细</span>
281
+            <span v-if="scope.row.is_sys == 1"  style="color: #589ff8" @click="GetOrderDetailById(scope.row)">使用明细</span>
281
           </template>
282
           </template>
282
         </el-table-column>
283
         </el-table-column>
283
       </el-table>  
284
       </el-table>  
697
   deleteWarehouseOutInfo,
698
   deleteWarehouseOutInfo,
698
   GetAllGoodInfoByID,
699
   GetAllGoodInfoByID,
699
   editWarehouseoutInfo,
700
   editWarehouseoutInfo,
700
-  getOrderDetailByOrderId
701
+  getOrderDetailByOrderId,
702
+  getOrderDetailById
701
 } from "@/api/stock";
703
 } from "@/api/stock";
702
 import BreadCrumb from "../components/bread-crumb";
704
 import BreadCrumb from "../components/bread-crumb";
703
 import StockInDialog from './Dialog/stockInDialog'
705
 import StockInDialog from './Dialog/stockInDialog'
1521
         })
1523
         })
1522
       }, 
1524
       }, 
1523
      
1525
      
1524
-     
1525
-
1526
+      GetOrderDetailById(val){
1527
+         this.userList =[]
1528
+         var params = {
1529
+           good_id:val.good_id,
1530
+           record_time:val.sys_record_time,
1531
+          }
1532
+         getOrderDetailById(params).then(response=>{
1533
+            if(response.data.state == 1){
1534
+              var total = 0
1535
+              var list = response.data.data.list
1536
+              var arrList =  this.unique(list)
1537
+              for (let i = 0; i < arrList.length; i++) {
1538
+                var obj = arrList[i]
1539
+                obj['is_total'] = 0
1540
+                this.userList.push(obj)
1541
+                total = total + arrList[i].count
1542
+              }
1543
+              this.userList.push({
1544
+                is_total: 1,
1545
+                total: total,
1546
+              })
1547
+              // this.type_name = this.userList[0].type.type_name
1548
+              // this.specification_name = this.userList[0].info.specification_name
1549
+              console.log("详情数据区",this.userList)
1550
+              this.editdialogVisibleThree = true
1551
+            }
1552
+         })
1553
+      },
1554
+    
1526
   }
1555
   }
1527
 };
1556
 };
1528
 </script>
1557
 </script>

+ 10 - 3
src/xt_pages/stock/stockQuery.vue 查看文件

108
        </el-table-column>
108
        </el-table-column>
109
        <el-table-column label="出库数量" align="center">
109
        <el-table-column label="出库数量" align="center">
110
          <template slot-scope="scope">
110
          <template slot-scope="scope">
111
-           <span>{{getOutCount(scope.row.good_id)+getAutoCount(scope.row.good_id)}}</span>
111
+           <span>{{getOutCount(scope.row.good_id) + getAutoCount(scope.row.good_id)}}</span>
112
 
112
 
113
          </template>
113
          </template>
114
        </el-table-column>
114
        </el-table-column>
261
 
261
 
262
          }
262
          }
263
 
263
 
264
-        console.log("数据2222222",this.WarehouseInfo.warehouseInfoDate)
264
+       
265
       });
265
       });
266
     },
266
     },
267
 
267
 
455
        return name
455
        return name
456
     },
456
     },
457
     toClick(val){
457
     toClick(val){
458
-      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name})
458
+       var manufacturer_name = ""
459
+       for(let i=0;i<this.manufacturerList.length;i++){
460
+          if(val.manufacturer == this.manufacturerList[i].id){
461
+            manufacturer_name = this.manufacturerList[i].manufacturer_name  
462
+          }
463
+       }
464
+      console.log("厂家22222",manufacturer_name)
465
+      this.$router.push({path:"/stock/in/stockflow?id="+val.good_id+"&good_name="+val.good_name+"&manufacturer="+manufacturer_name})
459
     },
466
     },
460
     toClickOne(val){
467
     toClickOne(val){
461
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})
468
       this.$router.push({path:"/stock/in/stockbatchnumber?id="+val.good_id+"&good_name="+val.good_name})