XMLWAN 3 anos atrás
pai
commit
558a248c53

+ 8 - 0
src/api/stock.js Ver arquivo

@@ -721,3 +721,11 @@ export function getGoodDetailPrintList(params) {
721 721
     params: params
722 722
   })
723 723
 }
724
+
725
+export function postSearchGoodWarehouseList(params) {
726
+  return request({
727
+    url: '/api/stock/postsearchgoodwarehouselist',
728
+    method: 'get',
729
+    params: params
730
+  })
731
+}

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

@@ -59,7 +59,7 @@
59 59
             </tr>
60 60
             </tbody>
61 61
           </table>
62
-          <table class="print-table" border="1" >
62
+          <!-- <table class="print-table" border="1" >
63 63
             <tbody>
64 64
             <tr>
65 65
               <td width="633" style="line-height: 50px">合计</td>
@@ -68,7 +68,7 @@
68 68
             </tr>
69 69
 
70 70
             </tbody>
71
-          </table>
71
+          </table> -->
72 72
 
73 73
           <div style="display:flex;margin-top:20px;float:right;">
74 74
             <div style="width:50px;">审批:</div><div style="width:100px;"></div>
@@ -225,7 +225,7 @@
225 225
       getTotal(){
226 226
          var total = 0
227 227
          for(let i=0;i<this.cancelStockDate.length;i++){
228
-            total += this.cancelStockDate[i].price * this.cancelStockDate[i].count
228
+            total += this.cancelStockDate[i].price * this.getCount(this.cancelStockDate[i].child,this.cancelStockDate[i].max_unit,this.cancelStockDate[i].min_unit,this.cancelStockDate[i].min_number)
229 229
          }
230 230
          return total
231 231
       },

+ 139 - 116
src/xt_pages/stock/stockModifyPrice.vue Ver arquivo

@@ -46,15 +46,15 @@
46 46
       <div style="display: flex;justify-content: space-between;margin-top:10px">
47 47
             <div style="width:541px;margin-right:10px;">
48 48
                 <el-table :data="tableData" border :height="tableHeight" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
49
-                    <el-table-column
50
-                    prop="date"
51
-                    label="单据编码"
52
-                    width="100">
49
+                    <el-table-column prop="date" label="单据编码" width="100">
50
+                        <template slot-scope="scope">
51
+                          {{scope.row.warehousing_order}}
52
+                        </template>
53 53
                     </el-table-column>
54
-                    <el-table-column
55
-                    prop="date"
56
-                    label="调价日期"
57
-                    width="100">
54
+                    <el-table-column prop="date" label="调价日期"width="100">
55
+                     <template slot-scope="scope">
56
+                          {{scope.row.start_time}}
57
+                     </template> 
58 58
                     </el-table-column>
59 59
                     <el-table-column
60 60
                     prop="name"
@@ -111,7 +111,7 @@
111 111
                     </el-table-column>
112 112
                     <el-table-column
113 113
                     prop="name"
114
-                    label="供应商"
114
+                    label="经销商"
115 115
                     width="100">
116 116
                     </el-table-column>
117 117
                     <el-table-column
@@ -195,77 +195,77 @@
195 195
             <el-form-item label="备注" style="width:66%;">
196 196
                 <div style="display:flex;">
197 197
                     <el-input v-model="form.remark"></el-input>
198
-                    <el-button style="margin-left:5px;" type="primary">添加</el-button>
198
+                    <el-button style="margin-left:5px;" type="primary" @click="addPrice">添加</el-button>
199 199
                 </div>
200 200
             </el-form-item>
201 201
         </el-form>
202 202
         <el-table :data="tableData" border :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }">
203
-            <el-table-column
204
-            prop="date"
205
-            label="单据编号"
206
-            width="100">
203
+            <el-table-column prop="date" label="单据编号" width="100">
204
+                <template slot-scope="scope">
205
+                {{scope.row.warehousing_order}}
206
+                </template>
207 207
             </el-table-column>
208
-            <el-table-column
209
-            prop="date"
210
-            label="药品名称"
211
-            width="100">
208
+            <el-table-column prop="date" label="耗材名称" width="100">
209
+               <template slot-scope="scope">
210
+                {{scope.row.good_name}}
211
+              </template>
212 212
             </el-table-column>
213
-            <el-table-column
214
-            prop="name"
215
-            label="规格"
216
-            width="100">
213
+            <el-table-column prop="name" label="规格" width="100">
214
+              <template slot-scope="scope">
215
+               {{scope.row.specification_name}}
216
+               </template>
217 217
             </el-table-column>
218
-            <el-table-column
219
-            prop="name"
220
-            label="单位"
221
-            width="100">
218
+            <el-table-column prop="name" label="单位" width="100">
219
+              <template slot-scope="scope">
220
+               {{scope.row.warehousing_unit}}
221
+               </template>
222 222
             </el-table-column>
223
-            <el-table-column
224
-            prop="name"
225
-            label="调价数量"
226
-            width="100">
223
+            <el-table-column prop="name" label="调价数量" width="100">
224
+              <template slot-scope="scope">
225
+                {{scope.row.count}}
226
+              </template> 
227 227
             </el-table-column>
228
-            <el-table-column
229
-            prop="name"
230
-            label="原进货价"
231
-            width="100">
228
+            <el-table-column prop="name" label="原进货价" width="100">
229
+               <template slot-scope="scope">
230
+                {{scope.row.buy_price}}
231
+               </template> 
232 232
             </el-table-column>
233
-            <el-table-column
234
-            prop="name"
235
-            label="原零售价"
236
-            width="100">
233
+            <el-table-column prop="name" label="原零售价" width="100">
234
+               <template slot-scope="scope">
235
+               {{scope.row.packing_price}}
236
+              </template> 
237 237
             </el-table-column>
238
-            <el-table-column
239
-            prop="name"
240
-            label="新零售价"
241
-            width="100">
238
+            <el-table-column prop="name" label="新零售价" width="100">
239
+               <template slot-scope="scope">
240
+                {{scope.row.new_price}}
241
+               </template>   
242 242
             </el-table-column>
243
-            <el-table-column
244
-            prop="name"
245
-            label="生产厂商"
246
-            width="100">
243
+            <el-table-column prop="manufacturer" label="生产厂商" width="100">
244
+                <template slot-scope="scope">
245
+                 {{scope.row.manufacturer}}
246
+               </template>     
247 247
             </el-table-column>
248
-            <el-table-column
249
-            prop="name"
250
-            label="批准文号"
251
-            width="100">
248
+            <el-table-column prop="name" label="批准文号" width="100">
249
+              <template slot-scope="scope">
250
+                 {{scope.row.license_number}}
251
+               </template>    
252 252
             </el-table-column>
253
-            <el-table-column
254
-            prop="name"
255
-            label="供应商"
256
-            width="100">
253
+            <el-table-column prop="name" label="经销商" width="100">
254
+               <template slot-scope="scope">
255
+                 {{scope.row.dealer}}
256
+               </template>    
257 257
             </el-table-column>
258
-            <el-table-column
259
-            prop="name"
260
-            label="备注"
261
-            width="100">
258
+            <el-table-column prop="name" label="备注"width="100">
259
+              <template slot-scope="scope">
260
+                 {{scope.row.remark}}
261
+               </template>   
262 262
             </el-table-column>
263 263
             <el-table-column
264 264
             fixed="right"
265 265
             width="100"
266 266
             label="操作">
267 267
                 <template slot-scope="scope">
268
-                    <el-button type="text" size="small">删除</el-button>
268
+                    <el-button type="text" size="small" @click="deletePrice(scope.$index)">删除</el-button>
269 269
                     <el-button type="text" size="small">编辑</el-button>
270 270
                 </template>
271 271
             </el-table-column>
@@ -281,7 +281,8 @@
281 281
 
282 282
 <script>
283 283
 import BreadCrumb from "../components/bread-crumb";
284
-import { postSearchGoodList} from "@/api/stock"
284
+import { postSearchGoodWarehouseList} from "@/api/stock"
285
+import { uParseTime } from '@/utils/tools'
285 286
 export default {
286 287
     name: "stockModifyPrice",
287 288
     components:{
@@ -299,23 +300,7 @@ export default {
299 300
             searchKey:'',
300 301
             value1:'',
301 302
             value2:'',
302
-            tableData: [{
303
-                date: '2016-05-02',
304
-                name: '王小虎',
305
-                address: '上海市普陀区金沙江路 1518 弄'
306
-                }, {
307
-                date: '2016-05-04',
308
-                name: '王小虎',
309
-                address: '上海市普陀区金沙江路 1517 弄'
310
-                }, {
311
-                date: '2016-05-01',
312
-                name: '王小虎',
313
-                address: '上海市普陀区金沙江路 1519 弄'
314
-                }, {
315
-                date: '2016-05-03',
316
-                name: '王小虎',
317
-                address: '上海市普陀区金沙江路 1516 弄'
318
-            }],
303
+            tableData: [],
319 304
             dialogVisible:false,
320 305
             form: {
321 306
                 good_name: '',
@@ -323,6 +308,14 @@ export default {
323 308
                 new_price:"",
324 309
                 count:"",
325 310
                 remark:"",
311
+                warehousing_order:"",
312
+                manufacturer:"",
313
+                dealer:"",
314
+                license_number:"",
315
+                warehousing_unit:"",
316
+                specification_name:"",
317
+                buy_price:"",
318
+                good_id:"",
326 319
             },
327 320
             goodList:[],
328 321
             manufacturerList:[],
@@ -342,25 +335,25 @@ export default {
342 335
         querySearchAsync(keyword, cb) {
343 336
             let key = '';
344 337
             if (keyword != undefined) {
345
-            key = keyword
338
+             key = keyword
346 339
             }
347
-            postSearchGoodList(key).then(response => {
340
+            postSearchGoodWarehouseList(key).then(response => {
348 341
             if (response.data.state == 1) {
349 342
             
350 343
                 var list = response.data.data.list
351
-                
344
+                console.log("列表数据",list)
352 345
                 this.goodList = list
353 346
                 var manufacturerList = response.data.data.manufacturerList
354 347
                 this.manufacturerList = manufacturerList
355 348
                 var dealer =  response.data.data.dealerList
356 349
                 this.dealerList = dealer
357
-                // for(let i=0;i<this.goodList.length;i++){
358
-                //     for(let j=0;j<this.manufacturerList.length;j++){
359
-                //     if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
360
-                //         this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
361
-                //     }
362
-                //     }
363
-                // }
350
+                for(let i=0;i<this.goodList.length;i++){
351
+                  for(let j=0;j<this.manufacturerList.length;j++){
352
+                    if(this.goodList[i].manufacturer == this.manufacturerList[j].id){
353
+                        this.goodList[i].manufacturer = this.manufacturerList[j].manufacturer_name
354
+                    }
355
+                  }
356
+                }
364 357
 
365 358
                 // for(let i=0;i<this.goodList.length;i++){
366 359
                 // for(let j=0;j<this.dealerList.length;j++){
@@ -377,38 +370,68 @@ export default {
377 370
             })
378 371
         },
379 372
         changeGoodName(val){
380
-            console.log("val",val)
381
-            this.currentIndex = val
373
+         this.currentIndex = val
382 374
         },
383 375
         handleSelect(val){
376
+          console.log("val23232323",val)
377
+          this.form.good_id = val.id,
384 378
           this.form.good_name = val.good_name
385
-        //  for(let i=0;i<this.recordInfo.recordData.length;i++){
386
-        //    if(this.currentIndex == i){
387
-        //       this.recordInfo.recordData[i].good_type_id = val.id
388
-        //       this.recordInfo.recordData[i].good_name = val.good_name
389
-        //       this.recordInfo.recordData[i].good_type_id = val.good_type_id
390
-        //       this.recordInfo.recordData[i].name = val.specification_name +"/"+val.packing_unit
391
-        //       this.recordInfo.recordData[i].number =  val.number
392
-        //       this.recordInfo.recordData[i].manufacturer = val.manufacturer
393
-        //       this.recordInfo.recordData[i].remark = val.remark
394
-        //       if(val.buy_price == 0){
395
-        //        this.recordInfo.recordData[i].price = ""
396
-        //       }else{
397
-        //         this.recordInfo.recordData[i].price = val.buy_price
398
-        //       }
399
-              
400
-        //       this.recordInfo.recordData[i].specification_name = val.specification_name
401
-        //       this.recordInfo.recordData[i].good_id = val.id
402
-        //       this.recordInfo.recordData[i].packing_unit = val.packing_unit
403
-        //       if(val.dealer == 0){
404
-        //         this.recordInfo.recordData[i].dealer = ""
405
-        //       }else{
406
-        //         this.recordInfo.recordData[i].dealer = val.dealer
407
-        //       }
408
-             
409
-        //    }
410
-        //  }
411
-      }
379
+          this.form.packing_price = val.packing_price
380
+          this.form.warehousing_order = val.warehousing_order
381
+          this.form.license_number = val.license_number
382
+          this.form.dealer = val.dealer
383
+          this.form.manufacturer = val.manufacturer
384
+          this.form.specification_name = val.specification_name
385
+          this.form.warehousing_unit = val.warehousing_unit
386
+          this.form.remark = val.remark
387
+          this.form.buy_price = val.buy_price
388
+      },
389
+      handleClose(){
390
+
391
+      },
392
+      addPrice(){
393
+        var obj = {
394
+         good_name:this.form.good_name,
395
+         specification_name:this.form.specification_name,
396
+         warehousing_order:this.form.warehousing_order,
397
+         good_name:this.form.good_name,
398
+         packing_price:this.form.packing_price,
399
+         license_number:this.form.license_number,
400
+         dealer:this.form.dealer,
401
+         manufacturer:this.form.manufacturer,  
402
+         warehousing_unit:this.form.warehousing_unit, 
403
+         start_time:this.getTime(new Date()),
404
+         count:this.form.count,
405
+         new_price:this.form.new_price,
406
+         remark:this.form.remark,
407
+        }
408
+       this.tableData.push(obj)
409
+       this.form.good_name = ""
410
+       this.form.specification_name  = ""
411
+       this.form.warehousing_order = ""
412
+       this.form.good_name = ""
413
+       this.form.packing_price = ""
414
+       this.form.license_number= ""
415
+       this.form.dealer = ""
416
+       this.form.manufacturer = ""
417
+       this.form.warehousing_unit = ""
418
+       this.form.count = ""
419
+       this.form.new_price = ""
420
+       this.form.remark = ""
421
+      },
422
+      getTime(val) {
423
+         if(val < 0){
424
+           return ""
425
+         }
426
+         if(val == ""){
427
+          return ""
428
+         }else {
429
+          return uParseTime(val, '{y}-{m}-{d}')
430
+         }
431
+      },
432
+     deletePrice(index){
433
+      this.tableData.splice(index,1)
434
+     }
412 435
     },
413 436
     created(){
414 437
         let tableHeight = document.body.clientHeight - 200;

+ 2 - 1
src/xt_pages/user/templateSummary.vue Ver arquivo

@@ -564,7 +564,7 @@
564 564
 
565 565
        <el-dialog
566 566
         title="提示"
567
-        :visible.sync="editDialogVisible"
567
+        :visible.sync="dialogVisibleInspection"
568 568
         width="80%"
569 569
         >
570 570
         <span>
@@ -1030,6 +1030,7 @@
1030 1030
        })
1031 1031
       },
1032 1032
       toInspection(){
1033
+        
1033 1034
         this.dialogVisibleInspection = true
1034 1035
       },
1035 1036