Ver código fonte

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

yq1 1 dia atrás
pai
commit
9f91179e64

+ 4 - 2
src/api/device/device.js Ver arquivo

@@ -58,10 +58,11 @@ export function getZones() {
58 58
     })
59 59
 }
60 60
 
61
-export function createZone(name, zone_type) {
61
+export function createZone(name, zone_type,sort) {
62 62
     const params = {
63 63
         name: name,
64 64
         type: zone_type,
65
+        sort:sort,
65 66
     }
66 67
     return request({
67 68
         url: '/api/device/zone/create',
@@ -70,11 +71,12 @@ export function createZone(name, zone_type) {
70 71
     })
71 72
 }
72 73
 
73
-export function modifyZone(id, name, zone_type) {
74
+export function modifyZone(id, name, zone_type,sort) {
74 75
     const params = {
75 76
         id: id,
76 77
         name: name,
77 78
         type: zone_type,
79
+        sort:sort,
78 80
     }
79 81
     return request({
80 82
         url: '/api/device/zone/modify',

+ 1 - 1
src/xt_pages/Pharmacy/DrugDispensing.vue Ver arquivo

@@ -261,7 +261,7 @@
261 261
             </el-table-column>
262 262
             <el-table-column label="药品追溯码" width="162" align="center">
263 263
               <template slot-scope="scope">
264
-                 <el-input style="width: 100;" v-model="scope.row.DrugCode" @input="changeDrugCode(scope.row.ID,scope.row.DataSources,scope.row.DrugCode)"></el-input>
264
+                 <el-input style="width: 100;" v-model="scope.row.DrugCode" @input="changeDrugCode(scope.row.ID,scope.row.data_sources,scope.row.DrugCode)"></el-input>
265 265
               </template>
266 266
             </el-table-column>
267 267
             <el-table-column

+ 20 - 3
src/xt_pages/device/zone_main.vue Ver arquivo

@@ -34,6 +34,12 @@
34 34
                 <span>{{ getZoneTypeLabel(scope.row.type) }}</span>
35 35
               </template>
36 36
             </el-table-column>
37
+
38
+            <el-table-column label="排序" align="center">
39
+              <template slot-scope="scope">
40
+                <span>{{scope.row.sort }}</span>
41
+              </template>
42
+            </el-table-column>
37 43
             <el-table-column label="操作" align="center">
38 44
               <template slot-scope="scope">
39 45
                 <el-tooltip
@@ -109,6 +115,12 @@
109 115
               ></el-option>
110 116
             </el-select>
111 117
           </el-form-item>
118
+
119
+          <el-form-item
120
+            label="排序 : "
121
+            prop="name">
122
+            <el-input v-model="zone_form.sort" style="width: 220px"></el-input>
123
+          </el-form-item>
112 124
           <!-- <el-form-item>
113 125
                     <el-button @click="cancelModifyZone">取 消</el-button>
114 126
                     <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" @click="editZoneSubmitAction">保 存</el-button>
@@ -152,7 +164,8 @@ export default {
152 164
       zone_form: {
153 165
         id: 0,
154 166
         name: "",
155
-        type: ""
167
+        type: "",
168
+        sort:""
156 169
       },
157 170
       showEditZone: false,
158 171
       formLabelWidth: "90px",
@@ -175,6 +188,7 @@ export default {
175 188
       this.loading = false;
176 189
       var resp = rs.data;
177 190
       if (resp.state === 1) {
191
+        console.log("zones+++++++++++++++",resp.data.zones)
178 192
         this.zones.push(...resp.data.zones);
179 193
       } else {
180 194
         this.$message.error(resp.msg);
@@ -199,12 +213,14 @@ export default {
199 213
       this.zone_form.id = row.id;
200 214
       this.zone_form.name = row.name;
201 215
       this.zone_form.type = row.type;
216
+      this.zone_form.sort = row.sort
202 217
       this.showEditZone = true;
203 218
     },
204 219
     cancelModifyZone() {
205 220
       this.zone_form.id = 0;
206 221
       this.zone_form.name = "";
207 222
       this.zone_form.type = "";
223
+      this.zone_form.sort = ""
208 224
       this.$refs.form_zone.clearValidate();
209 225
       this.showEditZone = false;
210 226
     },
@@ -212,7 +228,7 @@ export default {
212 228
       this.$refs.form_zone.validate(valid => {
213 229
         if (valid) {
214 230
           if (this.zone_form.id === 0) {
215
-            createZone(this.zone_form.name, this.zone_form.type).then(rs => {
231
+            createZone(this.zone_form.name, this.zone_form.type, parseInt(this.zone_form.sort)).then(rs => {
216 232
               var resp = rs.data;
217 233
               if (resp.state === 1) {
218 234
                 var newZone = resp.data.zone;
@@ -226,7 +242,8 @@ export default {
226 242
             modifyZone(
227 243
               this.zone_form.id,
228 244
               this.zone_form.name,
229
-              this.zone_form.type
245
+              this.zone_form.type,
246
+              parseInt(this.zone_form.sort)
230 247
             ).then(rs => {
231 248
               var resp = rs.data;
232 249
               if (resp.state === 1) {

+ 4 - 4
src/xt_pages/stock/drugs/components/purchaseNewDrugQuery.vue Ver arquivo

@@ -451,7 +451,7 @@ export default {
451 451
            
452 452
               list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
453 453
               list[i].drugInMoney = list[i].last_price
454
-              if(this.org_id == 0){
454
+              if(this.org_id == 0 || this.org_id == 10697){
455 455
                 list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
456 456
               }else{
457 457
                 list[i].drugSaleMoney = "/"
@@ -461,7 +461,7 @@ export default {
461 461
               list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
462 462
               list[i].drugAddOne = this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
463 463
               
464
-              if(this.org_id == 0){
464
+              if(this.org_id == 0 || this.org_id == 10697){
465 465
                  list[i].drugAddPrice = list[i].last_price
466 466
                  list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
467 467
               }else{
@@ -473,7 +473,7 @@ export default {
473 473
               list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
474 474
               list[i].drugOutOne =this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
475 475
            
476
-              if(this.org_id == 0){
476
+              if(this.org_id == 0 || this.org_id == 10697){
477 477
                 list[i].drugOutPrice = list[i].retail_price
478 478
                 list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
479 479
               }else{
@@ -490,7 +490,7 @@ export default {
490 490
             }
491 491
              
492 492
             list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
493
-            if(this.org_id == 0){
493
+            if(this.org_id == 0 || this.org_id == 10697){
494 494
                 list[i].overDrugPrice = list[i].retail_price
495 495
                 list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
496 496
             }else{

+ 45 - 7
src/xt_pages/stock/drugs/components/purchaseNewDrugQueryPrint.vue Ver arquivo

@@ -355,20 +355,43 @@ export default {
355 355
               
356 356
                list[i].over_count_one = this.GetInitStartFlowOne(list[i].new_drug_in_flow_info,list[i].new_drug_profit_flow_info,list[i].new_drug_out_flow_info,list[i].new_drug_no_profit_flow_info,list[i].new_drug_cancel_flow_info,list[i].min_number,list[i].min_unit,list[i].max_unit) 
357 357
                
358
-                list[i].drugInMoney = "/"
359
-                list[i].drugSaleMoney = "/"
358
+                // list[i].drugInMoney = "/"
359
+                // list[i].drugSaleMoney = "/"
360
+
361
+                list[i].drugInMoney = list[i].last_price
362
+                if(this.org_id == 0 || this.org_id == 10697){
363
+                  list[i].drugSaleMoney =  (list[i].over_count_one * list[i].last_price).toFixed(2)
364
+                }else{
365
+                  list[i].drugSaleMoney = "/"
366
+                }
360 367
 
361 368
                 list[i].drugAdd = this.drugAddInfo(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
362 369
                 list[i].drugAddOne= this.drugAddInfoOne(list[i].DrugWarehouseInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryProfit)
363 370
                
371
+                // list[i].drugAddPrice = "/"
372
+                // list[i].drugAddSalePrice = "/"
373
+
374
+                if(this.org_id == 0 || this.org_id == 10697){
375
+                 list[i].drugAddPrice = list[i].last_price
376
+                 list[i].drugAddSalePrice = (list[i].last_price *list[i].drugAddOne).toFixed(2)
377
+              }else{
364 378
                 list[i].drugAddPrice = "/"
365 379
                 list[i].drugAddSalePrice = "/"
380
+              }
366 381
 
367 382
                 list[i].drugOut=  this.getDrugOut(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
368 383
                 list[i].drugOutOne = this.getDrugOutOne(list[i].DrugWarehouseOutInfoStartEnd,list[i].min_number,list[i].min_unit,list[i].max_unit,list[i].WareStartEndStockInventoryLosses,list[i].WareStartEndStockCancelInfo)
369 384
                 
370
-                list[i].drugOutPrice = "/"
371
-                list[i].drugOutSalePrice = "/"
385
+                // list[i].drugOutPrice = "/"
386
+                // list[i].drugOutSalePrice = "/"
387
+
388
+                if(this.org_id == 0 || this.org_id == 10697){
389
+                  list[i].drugOutPrice = list[i].retail_price
390
+                  list[i].drugOutSalePrice = (list[i].drugOutOne * list[i].retail_price).toFixed(2)
391
+                }else{
392
+                  list[i].drugOutPrice = "/"
393
+                  list[i].drugOutSalePrice = "/"
394
+                }
372 395
 
373 396
                
374 397
                 if(this.org_id ==10265 || this.org_id ==10210 || this.org_id ==10402 || this.org_id ==10215){
@@ -376,8 +399,16 @@ export default {
376 399
                 }else{
377 400
                   list[i].overDrug = this.GetDrugOver(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
378 401
                 }
379
-                list[i].overDrugPrice = "/"
380
-                list[i].oveDrugSaleMoney = "/"
402
+                // list[i].overDrugPrice = "/"
403
+                // list[i].oveDrugSaleMoney = "/"
404
+                list[i].overDrugOne = this.GetDrugOverOne(list[i].over_count_one,list[i].drugAddOne,list[i].drugOutOne,list[i].min_number,list[i].min_unit,list[i].max_unit)
405
+                if(this.org_id == 0 || this.org_id == 10697){
406
+                  list[i].overDrugPrice = list[i].retail_price
407
+                  list[i].oveDrugSaleMoney = (list[i].overDrugOne * list[i].retail_price).toFixed(2)
408
+                }else{
409
+                  list[i].overDrugPrice = "/"
410
+                  list[i].oveDrugSaleMoney = "/"
411
+                }
381 412
             }
382 413
             this.tableList = list;
383 414
             this.total = response.data.data.total
@@ -1300,7 +1331,14 @@ export default {
1300 1331
         return max_str + min_str;
1301 1332
       }
1302 1333
     },
1303
-
1334
+    GetDrugOverOne(totalone,totaltwo,totalthree,min_number,min_unit,max_unit){
1335
+      var total = 0
1336
+      
1337
+      total = totalone + totaltwo - totalthree
1338
+       
1339
+      return total
1340
+       
1341
+    },
1304 1342
     GetInitStartFlow(val1,val2,val3,val4,val5,min_number,min_unit,max_unit){
1305 1343
       var total_one =0
1306 1344
       var total_two = 0

+ 3 - 3
src/xt_pages/stock/query/purchaseNewStockQuery.vue Ver arquivo

@@ -282,7 +282,7 @@ export default {
282 282
                
283 283
               }
284 284
               //  list[i].stockIn = list[i].GoodStartFlowInfo.over_count
285
-               if(this.org_id == 0){
285
+               if(this.org_id == 0 || this.org_id ==10697){
286 286
                   list[i].stock_in_price = list[i].buy_price
287 287
                   list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
288 288
                }else{
@@ -294,7 +294,7 @@ export default {
294 294
               
295 295
               list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
296 296
 
297
-              if(this.org_id == 0){
297
+              if(this.org_id == 0 || this.org_id ==10697){
298 298
                list[i].addStockMoney = list[i].buy_price 
299 299
                 list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
300 300
               }else{
@@ -326,7 +326,7 @@ export default {
326 326
                
327 327
               }
328 328
             
329
-              if(this.org_id == 0){
329
+              if(this.org_id == 0 || this.org_id ==10697){
330 330
                 list[i].overPrice = list[i].packing_price
331 331
                 list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
332 332
               }else{

+ 31 - 9
src/xt_pages/stock/query/purchaseNewStockQueryPrint.vue Ver arquivo

@@ -181,19 +181,37 @@ export default {
181 181
                         }
182 182
                       }
183 183
                     }
184
-                    list[i].stock_in_price = "/"
185
-                    list[i].stockMoney = "/"
184
+                    
185
+                    if(this.org_id == 0 || this.org_id ==10697){
186
+                      list[i].stock_in_price = list[i].buy_price
187
+                      list[i].stockMoney = (list[i].buy_price * list[i].stockIn).toFixed(2)
188
+                    }else{
189
+                      list[i].stock_in_price = "/"
190
+                      list[i].stockMoney = "/"
191
+                    }
186 192
                    
187 193
                     
188 194
                     list[i].stockAdd = this.getWarehouseInfoOne(list[i].StartFlowWarehouseInfo,list[i].WareStartEndStockInventoryProfit)//期间增加
189 195
                    
190
-                    list[i].addStockMoney = "/"
191
-                    list[i].saleStockMoney = "/"
196
+                    if(this.org_id == 0 || this.org_id ==10697){
197
+                        list[i].addStockMoney = list[i].buy_price 
198
+                        list[i].saleStockMoney = (list[i].buy_price *list[i].stockAdd).toFixed(2)
199
+                      }else{
200
+                        list[i].addStockMoney = "/"
201
+                        list[i].saleStockMoney = "/"
202
+                      }
203
+             
192 204
 
193 205
                     list[i].outStock = this.getWarehosueOutInfo(list[i].WarehouseOutInfoStart,list[i].WareStartEndStockInventoryLosses,list[i].StartEndCancelFLowInfo)//本期减少
194 206
                    
195
-                    list[i].stockOutprice = "/"
196
-                    list[i].saleOutprice = "/"
207
+                     
208
+                    if(this.org_id == 0){
209
+                      list[i].stockOutprice = list[i].packing_price
210
+                      list[i].saleOutMoney = (list[i].packing_price * list[i].outStock).toFixed(2)
211
+                    }else{
212
+                      list[i].stockOutprice = "/"
213
+                      list[i].saleOutMoney = "/"
214
+                    }
197 215
                   
198 216
                     if(this.org_id ==0 || this.org_id ==10265){
199 217
                       list[i].overStock = list[i].GoodEndFlowInfo.over_count
@@ -201,9 +219,13 @@ export default {
201 219
                         list[i].overStock = list[i].stockIn + list[i].stockAdd - list[i].outStock
202 220
                     } 
203 221
                   
204
-                  
205
-                    list[i].overPrice = "/"
206
-                    list[i].overMoney = "/"
222
+                    if(this.org_id == 0 || this.org_id ==10697){
223
+                      list[i].overPrice = list[i].packing_price
224
+                      list[i].overMoney = (list[i].packing_price*list[i].overStock).toFixed(2)
225
+                     }else{
226
+                        list[i].overPrice = "/"
227
+                        list[i].overMoney = "/"
228
+                     }
207 229
                 
208 230
                 }
209 231
                 this.tableList = list