XMLWAN 3 years ago
parent
commit
3cd3afeb66

+ 2 - 2
config/index.js View File

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

+ 34 - 45
src/api/stock.js View File

121
 }
121
 }
122
 
122
 
123
 export function createGoodInfo(params) {
123
 export function createGoodInfo(params) {
124
-  console.log("prams",params)
124
+  console.log('prams', params)
125
   return request({
125
   return request({
126
     url: '/api/stock/good/info/create',
126
     url: '/api/stock/good/info/create',
127
     method: 'post',
127
     method: 'post',
387
 }
387
 }
388
 
388
 
389
 export function EditWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
389
 export function EditWarehouse(params, warehousing_time, id, type, manufacturer_id, dealer_id) {
390
-  console.log("params",params)
391
-  console.log("warehousing",warehousing_time)
392
-  console.log("id",id)
393
-  console.log("type",type)
394
-  console.log("manufacturer_id",manufacturer_id)
395
-  console.log("dealer_id",dealer_id)
396
   return request({
390
   return request({
397
     url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
391
     url: '/api/warehouse/edit?warehousing_time=' + warehousing_time + '&id=' + id + '&type=' + type + '&manufacturer_id=' + manufacturer_id + '&dealer_id=' + dealer_id,
398
     method: 'post',
392
     method: 'post',
567
   })
561
   })
568
 }
562
 }
569
 
563
 
570
-
571
-export function PostSearchStock(keyword,params){
572
-  
564
+export function PostSearchStock(keyword, params) {
573
   return request({
565
   return request({
574
-    url:'/api/warehouseout/postsearchstock?keyword='+keyword,
575
-    method:"get",
576
-    params:params
566
+    url: '/api/warehouseout/postsearchstock?keyword=' + keyword,
567
+    method: 'get',
568
+    params: params
577
   })
569
   })
578
 }
570
 }
579
 
571
 
580
-export function GetOutStockTotalCount(params){
581
-  
572
+export function GetOutStockTotalCount(params) {
582
   return request({
573
   return request({
583
-    url:"/api/warehouseout/getoutstocktotalcount",
584
-    method:"get",
585
-    params:params
574
+    url: '/api/warehouseout/getoutstocktotalcount',
575
+    method: 'get',
576
+    params: params
586
   })
577
   })
587
 }
578
 }
588
 
579
 
589
-export function postGoodInformation(params){
590
-  console.log("PARMAS22",params)
580
+export function postGoodInformation(params) {
581
+  console.log('PARMAS22', params)
591
   return request({
582
   return request({
592
-    url:"/api/good/postgoodinformation",
593
-    method:"Post",
594
-    data:params,
583
+    url: '/api/good/postgoodinformation',
584
+    method: 'Post',
585
+    data: params
595
   })
586
   })
596
 }
587
 }
597
 
588
 
598
-export function postDrugInformation(params){
599
-  
589
+export function postDrugInformation(params) {
600
   return request({
590
   return request({
601
-    url:"/api/good/postdruginformation",
602
-    method:"post",
603
-    data:params
591
+    url: '/api/good/postdruginformation',
592
+    method: 'post',
593
+    data: params
604
   })
594
   })
605
 }
595
 }
606
 
596
 
607
-export function getInitializtion(params){
597
+export function getInitializtion(params) {
608
   return request({
598
   return request({
609
-    url:"/api/good/initializtion",
610
-    method:"get",
611
-    params:params
599
+    url: '/api/good/initializtion',
600
+    method: 'get',
601
+    params: params
612
   })
602
   })
613
 }
603
 }
614
 
604
 
615
-export function getWarehouseOrderInfoList(params){
616
-   return request({
617
-      url:"/api/good/getwarehouseorderinfolist",
618
-      method:"get",
619
-      params:params
620
-   })
621
-} 
605
+export function getWarehouseOrderInfoList(params) {
606
+  return request({
607
+    url: '/api/good/getwarehouseorderinfolist',
608
+    method: 'get',
609
+    params: params
610
+  })
611
+}
622
 
612
 
623
-export function postSearchGoodList(keyword,params){
624
-  
613
+export function postSearchGoodList(keyword, params) {
625
   return request({
614
   return request({
626
-    url:"/api/good/postsearchgoodlist?keyword="+keyword,
627
-    method:"Get",
628
-    params:params
615
+    url: '/api/good/postsearchgoodlist?keyword=' + keyword,
616
+    method: 'Get',
617
+    params: params
629
   })
618
   })
630
-}
619
+}

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

832
         hidden: true,
832
         hidden: true,
833
         is_menu: false,
833
         is_menu: false,
834
         meta: { title: 'stockInOrderAdd' }
834
         meta: { title: 'stockInOrderAdd' }
835
-      }, {
835
+      },
836
+      {
836
         path: '/stock/in/detail',
837
         path: '/stock/in/detail',
837
         component: () => import('@/xt_pages/stock/stockInDetail'),
838
         component: () => import('@/xt_pages/stock/stockInDetail'),
838
         name: 'stockInDetail',
839
         name: 'stockInDetail',

+ 8 - 0
src/router/modules/drugs.js View File

172
       hidden: true,
172
       hidden: true,
173
       is_menu: false,
173
       is_menu: false,
174
       meta: { title: 'stockOutOrderEdit', noCache: true }
174
       meta: { title: 'stockOutOrderEdit', noCache: true }
175
+    },
176
+    {
177
+      path: '/stock/in/order/edit',
178
+      component: () => import('@/xt_pages/stock/stockInOrderEdit'),
179
+      name: 'stockInOrderEdit',
180
+      hidden: true,
181
+      is_menu: false,
182
+      meta: { title: 'stockInOrderEdit' }
175
     }
183
     }
176
 
184
 
177
   ]
185
   ]

+ 127 - 51
src/xt_pages/stock/stockInOrder.vue View File

90
           backgroundColor: 'rgb(245, 247, 250)',
90
           backgroundColor: 'rgb(245, 247, 250)',
91
           color: '#606266'
91
           color: '#606266'
92
         }"
92
         }"
93
+       @current-change="handleSearch"
93
       >
94
       >
94
         <el-table-column align="center" type="selection" width="55">
95
         <el-table-column align="center" type="selection" width="55">
95
         </el-table-column>
96
         </el-table-column>
126
 
127
 
127
         <el-table-column label="操作" align="center" width="260px">
128
         <el-table-column label="操作" align="center" width="260px">
128
           <template slot-scope="scope">
129
           <template slot-scope="scope">
129
-            <el-tooltip
130
+            <!-- <el-tooltip
130
               class="item"
131
               class="item"
131
               effect="dark"
132
               effect="dark"
132
               content="详情"
133
               content="详情"
139
                 @click="handleSearch(scope.row.id)"
140
                 @click="handleSearch(scope.row.id)"
140
               >
141
               >
141
               </el-button>
142
               </el-button>
142
-            </el-tooltip>
143
+            </el-tooltip> -->
143
             <el-tooltip
144
             <el-tooltip
144
               class="item"
145
               class="item"
145
               effect="dark"
146
               effect="dark"
187
     </div>
188
     </div>
188
 
189
 
189
 
190
 
191
+   <div v-show="tableShow" style="margin-bottom:10px">
192
+      <el-table
193
+        :data="tableList"
194
+        :class="signAndWeighBoxPatients"
195
+        style="width: 100%"
196
+        border
197
+        highlight-current-row
198
+        v-loading="Warehouse.loading"
199
+        ref="multipleTable"
200
+        @selection-change="select"
201
+        :row-style="{ color: '#303133' }"
202
+        :header-cell-style="{
203
+          backgroundColor: 'rgb(245, 247, 250)',
204
+          color: '#606266'
205
+        }"
206
+      >
207
+       <el-table-column align="center" type="selection" width="55">
208
+       </el-table-column>
209
+
210
+       <el-table-column label="耗材名称" align="center">
211
+          <template slot-scope="scope">
212
+            {{ scope.row.GoodInfo.good_name }}
213
+          </template>
214
+        </el-table-column>
215
+      
216
+        <el-table-column label="耗材类型" align="center">
217
+          <template slot-scope="scope">
218
+            {{  getTypeName(scope.row.GoodInfo.good_type_id)}}
219
+          </template>
220
+        </el-table-column>
221
+
222
+
223
+       <el-table-column label="规格&单位" align="center">
224
+          <template slot-scope="scope">
225
+            {{ scope.row.GoodInfo.specification_name}} * {{scope.row.GoodInfo.min_number}}{{scope.row.GoodInfo.min_unit}}
226
+          </template>
227
+        </el-table-column>
228
+
229
+
230
+       <el-table-column label="批号" align="center">
231
+          <template slot-scope="scope">
232
+            {{ scope.row.number}}
233
+          </template>
234
+        </el-table-column>
235
+        
236
+        <el-table-column label="入库数量" align="center">
237
+          <template slot-scope="scope">
238
+            {{ scope.row.warehousing_count}}
239
+          </template>
240
+        </el-table-column>
241
+
242
+
243
+        <el-table-column label="进货价" align="center">
244
+          <template slot-scope="scope">
245
+            {{ scope.row.price}}
246
+          </template>
247
+        </el-table-column>
248
+
249
+
250
+       <el-table-column label="总价" align="center">
251
+          <template slot-scope="scope">
252
+            {{ (scope.row.warehousing_count * scope.row.price).toFixed(2)}}
253
+          </template>
254
+        </el-table-column>
255
+
256
+
257
+         <el-table-column label="生产厂家" align="center">
258
+          <template slot-scope="scope">
259
+            {{ getManufactuerName(scope.row.GoodInfo.manufacturer)}}
260
+          </template>
261
+        </el-table-column>
262
+
263
+        <el-table-column label="生产日期" align="center">
264
+          <template slot-scope="scope">
265
+            {{ getTime(scope.row.product_date)}}
266
+          </template>
267
+        </el-table-column>
268
+
269
+
270
+       <el-table-column label="有效期" align="center">
271
+          <template slot-scope="scope">
272
+            {{ getTime(scope.row.expiry_date)}}
273
+          </template>
274
+        </el-table-column>
275
+
276
+        <el-table-column label="备注" align="center">
277
+          <template slot-scope="scope">
278
+            {{ scope.row.remark }}
279
+          </template>
280
+        </el-table-column>
281
+       
282
+      </el-table>
283
+    </div>
284
+
190
 
285
 
191
     <el-dialog
286
     <el-dialog
192
       title="详情"
287
       title="详情"
596
       "-" +
691
       "-" +
597
       (nowDay < 10 ? "0" + nowDay : nowDay);
692
       (nowDay < 10 ? "0" + nowDay : nowDay);
598
      
693
      
599
-  
600
-    // var date1 = new Date();
601
-    // var date2 = new Date(date1);
602
-
603
-    // //-30为30天前,+30可以获得30天后的日期
604
-    // date2.setDate(date1.getDate() - 30);
605
-
606
-    // //30天前(月份判断是否小于10,小于10的前面+0)
607
-    // var agoDay = `${date2.getFullYear()}-${date2.getMonth() + 1<10?`0${date2.getMonth() + 1}`:date2.getMonth() + 1}-${date2.getDate()}`;
608
-      
609
-    // //当前日期
610
-    // var nowDay = `${date1.getFullYear()}-${date1.getMonth() + 1<10?`0${date1.getMonth() + 1}`:date1.getMonth() + 1}-${date1.getDate()}`;
611
-
612
-    //  this.start_time = agoDay
613
-    //  console.log("333333332222",this.start_time)
614
-
615
-      // this.warehousing_time =
616
-      //   nowYear +
617
-      //   '-' +
618
-      //   (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
619
-      //   '-' +
620
-      //   (nowDay < 10 ? '0' + nowDay : nowDay)
621
-
622
-    
623
     this.GetWarehouse();
694
     this.GetWarehouse();
624
     this.GetConfigInfo();
695
     this.GetConfigInfo();
625
     this.fetchAllAdminUsers();
696
     this.fetchAllAdminUsers();
714
       },
785
       },
715
         isCreated: 1,
786
         isCreated: 1,
716
         isVisibility: false,
787
         isVisibility: false,
717
-        drug_id:1
788
+       drug_id:1,
718
       },
789
       },
790
+      drug_id:1,
791
+      tableShow:false,
792
+      tableList:[],
793
+      isVisibility:false
719
     };
794
     };
720
-
795
+    
721
   
796
   
722
   },
797
   },
723
   methods: {
798
   methods: {
992
       }
1067
       }
993
     },
1068
     },
994
     handleEdit: function(index, row) {
1069
     handleEdit: function(index, row) {
995
-      this.$router.push({
996
-        name: "stockInDetail",
997
-        query: { id: row.id, type: this.type }
998
-      });
1070
+      // this.$router.push({
1071
+      //   name: "stockInDetail",
1072
+      //   query: { id: row.id, type: this.type }
1073
+      // });
1074
+      this.$router.push({path:"/stock/in/order/edit?id="+row.id})
999
     },
1075
     },
1000
     handleDelete: function(index, row) {
1076
     handleDelete: function(index, row) {
1001
       const ids = [];
1077
       const ids = [];
1089
         .catch(() => {});
1165
         .catch(() => {});
1090
     },
1166
     },
1091
 
1167
 
1092
-    handleSearch(id){
1093
-      this.WarehouseInfo.warehouseInfoDate = [];
1094
-      this.GetOrderDetail(id)
1095
-      this.drug_id = id
1096
-      this.dialogVisible = true
1168
+    // handleSearch(id){
1169
+    //   this.WarehouseInfo.warehouseInfoDate = [];
1170
+    //   this.GetOrderDetail(id)
1171
+    //   this.drug_id = id
1172
+    //   this.dialogVisible = true
1173
+    // },
1174
+
1175
+    handleSearch(val){
1176
+      this.tableList= []
1177
+      this.GetOrderDetail(val.id)
1178
+      this.drug_id = val.id 
1179
+
1097
     },
1180
     },
1098
 
1181
 
1099
     GetOrderDetail: function(id) {
1182
     GetOrderDetail: function(id) {
1105
           this.$message.error(response.data.msg);
1188
           this.$message.error(response.data.msg);
1106
           return false;
1189
           return false;
1107
         } else {
1190
         } else {
1108
-          
1191
+          this.tableShow = true
1109
           for (let i = 0; i < response.data.data.info.length; i++) {
1192
           for (let i = 0; i < response.data.data.info.length; i++) {
1110
             this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
1193
             this.WarehouseInfo.warehouseInfoDate.push(response.data.data.info[i]);
1111
-            response.data.data.info[i].product_date = this.getTime(
1112
-              response.data.data.info[i].product_date,
1113
-              "{y}-{m}-{d}"
1114
-            );
1115
-            response.data.data.info[i].expiry_date = this.getTime(
1116
-              response.data.data.info[i].expiry_date,
1117
-              "{y}-{m}-{d}"
1118
-            );
1119
-            
1120
-           response.data.data.info[i].price = response.data.data.info[i].price.toString();
1121
-           response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
1194
+            // response.data.data.info[i].product_date = this.getTime(response.data.data.info[i].product_date,"{y}-{m}-{d}");
1195
+            // response.data.data.info[i].expiry_date = this.getTime(response.data.data.info[i].expiry_date,"{y}-{m}-{d}");
1196
+            response.data.data.info[i].price = response.data.data.info[i].price.toString();
1197
+            response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
1122
 
1198
 
1123
             this.recordInfo.recordData.push(response.data.data.info[i]);
1199
             this.recordInfo.recordData.push(response.data.data.info[i]);
1124
-
1125
-          
1200
+            this.tableList.push(response.data.data.info[i])
1201
+            console.log("详情",this.tableList)
1126
           }
1202
           }
1127
            this.warehouse = response.data.data.warehousing;
1203
            this.warehouse = response.data.data.warehousing;
1128
            this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");
1204
            this.warehousing_time = this.getTime(this.warehouse.warehousing_time,"{y}-{m}-{d}");

+ 6 - 3
src/xt_pages/stock/stockInOrderAdd.vue View File

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">
129
                             :rules='tableRules.warehousing_count' style="padding-top: 17px">
130
-                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count"></el-input>
130
+                <el-input placeholder="请输入入库数量" type="number" v-model="scope.row.warehousing_count" style="width:120px"></el-input>
131
+                  {{scope.row.min_unit}}
131
               </el-form-item>
132
               </el-form-item>
133
+            
132
             </template>
134
             </template>
133
           </el-table-column>
135
           </el-table-column>
134
 
136
 
475
         }
477
         }
476
         return name
478
         return name
477
       }, specificationName: function(good_info_id) {
479
       }, specificationName: function(good_info_id) {
478
-        // console.log("333333333",this.goodInfo)
480
+      
479
         let name = ''
481
         let name = ''
480
         for (let i = 0; i < this.goodInfo.length; i++) {
482
         for (let i = 0; i < this.goodInfo.length; i++) {
481
           if (this.goodInfo[i].id == good_info_id) {
483
           if (this.goodInfo[i].id == good_info_id) {
711
               this.recordInfo.recordData[i].good_type_id = val.id
713
               this.recordInfo.recordData[i].good_type_id = val.id
712
               this.recordInfo.recordData[i].good_name = val.good_name
714
               this.recordInfo.recordData[i].good_name = val.good_name
713
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
715
               this.recordInfo.recordData[i].good_type_id = val.good_type_id
714
-              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit +"/"+val.packing_unit
716
+              this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit
715
               this.recordInfo.recordData[i].number =  val.number
717
               this.recordInfo.recordData[i].number =  val.number
716
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
718
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
717
               this.recordInfo.recordData[i].remark = val.remark
719
               this.recordInfo.recordData[i].remark = val.remark
718
               this.recordInfo.recordData[i].price = val.buy_price
720
               this.recordInfo.recordData[i].price = val.buy_price
719
               this.recordInfo.recordData[i].specification_name = val.specification_name
721
               this.recordInfo.recordData[i].specification_name = val.specification_name
720
               this.recordInfo.recordData[i].good_id = val.id
722
               this.recordInfo.recordData[i].good_id = val.id
723
+              this.recordInfo.recordData[i].min_unit = val.min_unit
721
            }
724
            }
722
          }
725
          }
723
       }
726
       }

+ 100 - 18
src/xt_pages/stock/stockInOrderEdit.vue View File

96
           border
96
           border
97
           max-height="450"
97
           max-height="450"
98
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
98
           :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
99
-        >
99
+        > 
100
+         <el-table-column align="center" width="200">
101
+             <template slot="header" slot-scope="scope">
102
+              <span>耗材名称</span>
103
+            </template>
104
+            <template slot-scope="scope">
105
+                <el-autocomplete
106
+                    class="checkSearch"
107
+                    popper-class="my-autocomplete"
108
+                    v-model="scope.row.good_name"
109
+                    :fetch-suggestions="querySearchAsync"
110
+                    :trigger-on-focus="false"
111
+                    placeholder="请输入耗材名称"
112
+                    @select="handleSelect"
113
+                    @input="changeGoodName(scope.$index)"
114
+                    style="width:160px;"
115
+                  >
116
+                    <i class="el-icon-search el-input__icon" slot="suffix"></i>
117
+                  <template slot-scope="{ item }">
118
+                    <div class="name">{{ item.good_name }}</div>
119
+                  </template>
120
+                 </el-autocomplete>
121
+            </template>
122
+          </el-table-column>
100
           <el-table-column align="center" width="200">
123
           <el-table-column align="center" width="200">
101
             <template slot="header" slot-scope="scope">
124
             <template slot="header" slot-scope="scope">
102
-              <span>商品类型<span style="color: red">*</span></span>
125
+              <span>耗材类型<span style="color: red">*</span></span>
103
             </template>
126
             </template>
104
 
127
 
105
             <template slot-scope="scope">
128
             <template slot-scope="scope">
106
               <el-form-item style="padding-top: 15px">
129
               <el-form-item style="padding-top: 15px">
107
                 <el-input
130
                 <el-input
108
-                  placeholder="请输入商品类型"
131
+                  placeholder="请输入耗材类型"
109
                   v-model="scope.row.good_type_id"
132
                   v-model="scope.row.good_type_id"
110
                   :value="typeName(scope.row.good_type_id)"
133
                   :value="typeName(scope.row.good_type_id)"
111
-                  @focus="showDialog(scope.$index, scope.row)"
112
                 ></el-input>
134
                 ></el-input>
113
               </el-form-item>
135
               </el-form-item>
114
             </template>
136
             </template>
115
           </el-table-column>
137
           </el-table-column>
116
           <el-table-column align="center" width="200">
138
           <el-table-column align="center" width="200">
139
+            
140
+            <template slot="header" slot-scope="scope">
141
+              <span>规格&单位<span style="color: red">*</span></span>
142
+            </template>
143
+            <template slot-scope="scope">
144
+
145
+              <el-form-item style="padding-top: 15px">
146
+                <el-input placeholder="请输入规格名称" v-model="scope.row.name"></el-input>
147
+              </el-form-item>
148
+
149
+            </template>
150
+          </el-table-column>
151
+          <!-- <el-table-column align="center" width="200">
117
             <template slot="header" slot-scope="scope">
152
             <template slot="header" slot-scope="scope">
118
               <span>规格名称<span style="color: red">*</span></span>
153
               <span>规格名称<span style="color: red">*</span></span>
119
             </template>
154
             </template>
127
                 ></el-input>
162
                 ></el-input>
128
               </el-form-item>
163
               </el-form-item>
129
             </template>
164
             </template>
130
-          </el-table-column>
165
+          </el-table-column> -->
131
 
166
 
132
           <el-table-column align="center" width="150">
167
           <el-table-column align="center" width="150">
133
             <template slot="header" slot-scope="scope">
168
             <template slot="header" slot-scope="scope">
154
               <span>入库数量<span style="color: red">*</span></span>
189
               <span>入库数量<span style="color: red">*</span></span>
155
             </template>
190
             </template>
156
             <template slot-scope="scope">
191
             <template slot-scope="scope">
157
-              <!--{{scope.row.warehousing_count}}-->
158
-              <!--<el-input type="number" v-model="scope.row.warehousing_count"   @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
159
-
192
+             
160
               <el-form-item
193
               <el-form-item
161
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
194
                 :prop="'recordData.' + scope.$index + '.warehousing_count'"
162
                 :rules="tableRules.warehousing_count"
195
                 :rules="tableRules.warehousing_count"
166
                   placeholder="请输入入库数量"
199
                   placeholder="请输入入库数量"
167
                   type="number"
200
                   type="number"
168
                   v-model="scope.row.warehousing_count"
201
                   v-model="scope.row.warehousing_count"
202
+                  style="width:120px"
169
                 ></el-input>
203
                 ></el-input>
204
+                {{scope.row.min_unit}}
170
               </el-form-item>
205
               </el-form-item>
171
             </template>
206
             </template>
172
           </el-table-column>
207
           </el-table-column>
279
   modifyWarehouseInfo,
314
   modifyWarehouseInfo,
280
   deleteWarehouseInfo,
315
   deleteWarehouseInfo,
281
   DeleteWarehouseInfoItem,
316
   DeleteWarehouseInfoItem,
282
-  EditWarehouse
317
+  EditWarehouse,
318
+  postSearchGoodList
283
 } from "@/api/stock";
319
 } from "@/api/stock";
284
 import BreadCrumb from "../components/bread-crumb";
320
 import BreadCrumb from "../components/bread-crumb";
285
 
321
 
608
           this.$message.error(response.data.msg);
644
           this.$message.error(response.data.msg);
609
           return false;
645
           return false;
610
         } else {
646
         } else {
647
+          console.log("列表2222222",response.data.data.info)
611
           for (let i = 0; i < response.data.data.info.length; i++) {
648
           for (let i = 0; i < response.data.data.info.length; i++) {
612
             response.data.data.info[i].product_date = this.getTime(
649
             response.data.data.info[i].product_date = this.getTime(
613
               response.data.data.info[i].product_date,
650
               response.data.data.info[i].product_date,
617
               response.data.data.info[i].expiry_date,
654
               response.data.data.info[i].expiry_date,
618
               "{y}-{m}-{d}"
655
               "{y}-{m}-{d}"
619
             );
656
             );
620
-            response.data.data.info[i].price = response.data.data.info[
621
-              i
622
-            ].price.toString();
623
-            response.data.data.info[
624
-              i
625
-            ].warehousing_count = response.data.data.info[
626
-              i
627
-            ].warehousing_count.toString();
628
-
657
+            response.data.data.info[i].price = response.data.data.info[i].price.toString();
658
+            response.data.data.info[i].warehousing_count = response.data.data.info[i].warehousing_count.toString();
659
+            response.data.data.info[i].good_name = response.data.data.info[i].GoodInfo.good_name
660
+            response.data.data.info[i].name = response.data.data.info[i].GoodInfo.specification_name + "*" + response.data.data.info[i].GoodInfo.min_number+response.data.data.info[i].GoodInfo.min_unit
661
+            response.data.data.info[i].min_unit = response.data.data.info[i].GoodInfo.min_unit
629
             this.recordInfo.recordData.push(response.data.data.info[i]);
662
             this.recordInfo.recordData.push(response.data.data.info[i]);
663
+            console.log("列表",this.recordInfo.recordData)
630
           }
664
           }
631
 
665
 
632
           this.warehouse = response.data.data.warehousing;
666
           this.warehouse = response.data.data.warehousing;
655
           }
689
           }
656
         }
690
         }
657
       });
691
       });
692
+    },
693
+    querySearchAsync(keyword, cb) {
694
+        let key = '';
695
+        if (keyword != undefined) {
696
+          key = keyword
697
+        }
698
+        console.log("keyrowrd",key)
699
+        postSearchGoodList(key).then(response => {
700
+          if (response.data.state == 1) {
701
+          
702
+            var list = response.data.data.list
703
+            this.goodList = list
704
+            var manufacturerList = response.data.data.manufacturerList
705
+            this.manufacturerList = manufacturerList
706
+            for(let i=0;i<this.goodList.length;i++){
707
+                for(let j=0;j<this.manufacturerList.length;j++){
708
+                  if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
709
+                    this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
710
+                  }
711
+                }
712
+            }
713
+          
714
+            cb(this.goodList)
715
+          } else {
716
+            cb([])
717
+           }
718
+         })
719
+       },
720
+    changeGoodName(val){
721
+      this.currentIndex = val
722
+    },
723
+    handleSelect(val){
724
+      console.log("val",val)
725
+        for(let i=0;i<this.recordInfo.recordData.length;i++){
726
+          if(this.currentIndex == i){
727
+            this.recordInfo.recordData[i].good_type_id = val.id
728
+            this.recordInfo.recordData[i].good_name = val.good_name
729
+            this.recordInfo.recordData[i].good_type_id = val.good_type_id
730
+            this.recordInfo.recordData[i].name = val.specification_name + "*" + val.min_number+val.min_unit +"/"+val.packing_unit
731
+            this.recordInfo.recordData[i].number =  val.number
732
+            this.recordInfo.recordData[i].manufacturer = val.manufacturer
733
+            this.recordInfo.recordData[i].remark = val.remark
734
+            this.recordInfo.recordData[i].price = val.buy_price
735
+            this.recordInfo.recordData[i].specification_name = val.specification_name
736
+            this.recordInfo.recordData[i].good_id = val.id
737
+            this.recordInfo.recordData[i].min_unit = val.min_unit
738
+          }
739
+        }
658
     }
740
     }
659
   },
741
   },
660
   created() {
742
   created() {

+ 116 - 12
src/xt_pages/stock/stockOutOrder.vue View File

87
           backgroundColor: 'rgb(245, 247, 250)',
87
           backgroundColor: 'rgb(245, 247, 250)',
88
           color: '#606266'
88
           color: '#606266'
89
         }"
89
         }"
90
+       @current-change="handleSearch"
90
       >
91
       >
91
         <el-table-column type="selection" width="55" align="center"> </el-table-column>
92
         <el-table-column type="selection" width="55" align="center"> </el-table-column>
92
 
93
 
122
         <el-table-column label="操作" align="center" width="300px">
123
         <el-table-column label="操作" align="center" width="300px">
123
           <template slot-scope="scope">
124
           <template slot-scope="scope">
124
            
125
            
125
-            <el-tooltip
126
+            <!-- <el-tooltip
126
               class="item"
127
               class="item"
127
               effect="dark"
128
               effect="dark"
128
               content="详情"
129
               content="详情"
135
                 @click="handleSearch(scope.row.id,scope.row)"
136
                 @click="handleSearch(scope.row.id,scope.row)"
136
               >
137
               >
137
               </el-button>
138
               </el-button>
138
-            </el-tooltip>
139
+            </el-tooltip> -->
139
 
140
 
140
             <el-tooltip
141
             <el-tooltip
141
               class="item"
142
               class="item"
184
 
185
 
185
 
186
 
186
 
187
 
188
+   <!--  详情 -->
189
+  <div v-show="tableShow">
190
+     <el-table
191
+        :data="tableList"
192
+        :class="signAndWeighBoxPatients"
193
+        style="width: 100%"
194
+        border
195
+        highlight-current-row
196
+        ref="multipleTable"
197
+        @selection-change="select"
198
+        :row-style="{ color: '#303133' }"
199
+        :header-cell-style="{
200
+          backgroundColor: 'rgb(245, 247, 250)',
201
+          color: '#606266'
202
+        }"
203
+      >
204
+       <el-table-column align="center" type="selection" width="55">
205
+       </el-table-column>
206
+
207
+       <el-table-column label="耗材名称" align="center">
208
+          <template slot-scope="scope">
209
+            {{ scope.row.GoodInfo.good_name }}
210
+          </template>
211
+        </el-table-column>
212
+      
213
+        <el-table-column label="耗材类型" align="center">
214
+          <template slot-scope="scope">
215
+            {{  getTypeName(scope.row.GoodInfo.good_type_id)}}
216
+          </template>
217
+        </el-table-column>
218
+
219
+
220
+       <el-table-column label="规格&单位" align="center">
221
+          <template slot-scope="scope">
222
+            {{ scope.row.GoodInfo.specification_name}} * {{scope.row.GoodInfo.min_number}}{{scope.row.GoodInfo.min_unit}}
223
+          </template>
224
+        </el-table-column>
225
+
226
+
227
+       <el-table-column label="批号" align="center">
228
+          <template slot-scope="scope">
229
+            {{ scope.row.number}}
230
+          </template>
231
+        </el-table-column>
232
+        
233
+        <el-table-column label="出库数量" align="center">
234
+          <template slot-scope="scope">
235
+            {{ scope.row.count}}
236
+          </template>
237
+        </el-table-column>
238
+
239
+
240
+        <el-table-column label="出货价" align="center">
241
+          <template slot-scope="scope">
242
+            {{ scope.row.price}}
243
+          </template>
244
+        </el-table-column>
245
+
246
+
247
+       <el-table-column label="总价" align="center">
248
+          <template slot-scope="scope">
249
+            {{ (scope.row.count * scope.row.price).toFixed(2)}}
250
+          </template>
251
+        </el-table-column>
252
+
253
+
254
+         <el-table-column label="生产厂家" align="center">
255
+          <template slot-scope="scope">
256
+            {{ getManufactuerName(scope.row.GoodInfo.manufacturer)}}
257
+          </template>
258
+        </el-table-column>
259
+
260
+        <el-table-column label="生产日期" align="center">
261
+          <template slot-scope="scope">
262
+            {{ getTime(scope.row.product_date)}}
263
+          </template>
264
+        </el-table-column>
265
+
266
+
267
+       <el-table-column label="有效期" align="center">
268
+          <template slot-scope="scope">
269
+            {{ getTime(scope.row.expiry_date)}}
270
+          </template>
271
+        </el-table-column>
272
+
273
+        <el-table-column label="备注" align="center">
274
+          <template slot-scope="scope">
275
+            {{ scope.row.remark }}
276
+          </template>
277
+        </el-table-column>
278
+       
279
+      </el-table>  
280
+    
281
+  </div>
282
+
187
 
283
 
188
     <!-- 新增弹窗 -->
284
     <!-- 新增弹窗 -->
189
 
285
 
639
         dealer: 0
735
         dealer: 0
640
       },
736
       },
641
       isVisibility: false,
737
       isVisibility: false,
642
-      good_type_id:""
738
+      good_type_id:"",
739
+      tableShow:false,
740
+      tableList:[],
643
     };
741
     };
644
   },
742
   },
645
   methods: {
743
   methods: {
902
 
1000
 
903
     
1001
     
904
     //新增
1002
     //新增
905
-    handleSearch(id,row){ 
1003
+    // handleSearch(id,row){ 
906
       
1004
       
907
-      this.warehousingOutInfo.info = []
908
-      this.warehousingOutInfo.warehousingOutData = []
909
-      this.GetOrderDetailOne(id)
910
-      this.GetTotalCount(row.warehouse_out_time)
1005
+    //   this.warehousingOutInfo.info = []
1006
+    //   this.warehousingOutInfo.warehousingOutData = []
1007
+    //   this.GetOrderDetailOne(id)
1008
+    //   this.GetTotalCount(row.warehouse_out_time)
911
       
1009
       
1010
+    // },
1011
+
1012
+    handleSearch(val){
1013
+      this.tableList = []
1014
+      this.GetOrderDetailOne(val.id)
1015
+      this.GetTotalCount(val.warehouse_out_time)
912
     },
1016
     },
913
   
1017
   
914
     //获取出库单详情数据
1018
     //获取出库单详情数据
923
             this.$message.error(response.data.msg)
1027
             this.$message.error(response.data.msg)
924
             return false
1028
             return false
925
           } else {
1029
           } else {
1030
+            this.tableShow = true
926
             for (let i = 0; i < response.data.data.list.length; i++) {
1031
             for (let i = 0; i < response.data.data.list.length; i++) {
927
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
1032
               this.warehousingOutInfo.warehousingOutData.push(response.data.data.list[i])
928
-            }
929
 
1033
 
1034
+              this.tableList.push(response.data.data.list[i])
1035
+            }
930
             this.warehousingOutInfo.info = response.data.data.info
1036
             this.warehousingOutInfo.info = response.data.data.info
931
-
932
-            console.log("出库222222222",this.warehousingOutInfo)           
933
             // this.handleSpanTempArr()
1037
             // this.handleSpanTempArr()
934
           }
1038
           }
935
         })
1039
         })
1052
               var stockCount = response.data.data.stockCount
1156
               var stockCount = response.data.data.stockCount
1053
               console.log("出库数量2323",stockCount)
1157
               console.log("出库数量2323",stockCount)
1054
               this.stockCount = stockCount
1158
               this.stockCount = stockCount
1055
-              this.dialogVisible = true
1159
+              // this.dialogVisible = true
1056
            }
1160
            }
1057
         })
1161
         })
1058
       },
1162
       },