浏览代码

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

csx 3 年前
父节点
当前提交
8584c33dee

+ 6 - 6
src/xt_pages/stock/detail/print.vue 查看文件

52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
52
                 <span v-if="type == 1"> {{ item.warehousing_count }}</span>
53
                 <span v-if="type == 2"> 
53
                 <span v-if="type == 2"> 
54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
54
                   <span  v-if="org_id == 3907 || org_id == 9919 || org_id == 9583">{{getStockCount(item.good_id) }}</span> 
55
-                   <span  v-if="org_id == 10265">{{getMySelfCount(item.good_id) }}</span>   
56
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583">{{getStockCount(item.good_id) }}</span>
55
+                   <span  v-if="org_id == 10265 || org_id == 10215">{{getMySelfCount(item.good_id) }}</span>   
56
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=10285&&org_id!=9583&&org_id!=10215">{{getStockCount(item.good_id) }}</span>
57
                 </span>
57
                 </span>
58
                
58
                
59
                 <span v-if="type == 4"> {{ item.count }}</span>
59
                 <span v-if="type == 4"> {{ item.count }}</span>
77
                   <span v-if="org_id == 3907 || org_id ==9919">
77
                   <span v-if="org_id == 3907 || org_id ==9919">
78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
78
                      {{(getStockCount(item.good_id) * item.buy_price).toFixed(2)}}
79
                   </span>
79
                   </span>
80
-                  <span v-if="org_id == 10265">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
-                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
80
+                  <span v-if="org_id == 10265 || org_id == 10215">{{(getMySelfCount(item.good_id)*item.packing_price).toFixed(2)}}</span>
81
+                  <span v-if="org_id!=3907&&org_id!=10265&&org_id!=9919&&org_id!=10215">{{(getStockCount(item.good_id) * item.packing_price).toFixed(2)}}</span>
82
                 </span>
82
                 </span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
83
                 <span v-if="type == 4">{{(item.count * item.price).toFixed(2)}}</span>
84
               </td>
84
               </td>
100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
100
                 <span v-if="type == 1">{{getWareInfoTotal().toFixed(2)}}</span> 
101
                 <span v-if="type == 2">
101
                 <span v-if="type == 2">
102
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
102
                   <span v-if="org_id == 3907 || org_id == 9919">{{getWareOutTotalOne().toFixed(2)}}</span>
103
-                  <span v-if="org_id == 10265">{{getWareOutTotalSix().toFixed(2)}}</span>
104
-                  <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265"> {{getWareOutTotal().toFixed(2)}}</span>
103
+                  <span v-if="org_id == 10265 || org_id == 10215">{{getWareOutTotalSix().toFixed(2)}}</span>
104
+                  <span v-if="org_id!=3907 && org_id!=9919 && org_id!=10265 && org_id!=10215"> {{getWareOutTotal().toFixed(2)}}</span>
105
                  </span> 
105
                  </span> 
106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
106
                 <span v-if="type == 4">{{getWareOutTotal().toFixed(2)}}</span> 
107
               </td>
107
               </td>

+ 5 - 4
src/xt_pages/stock/detail/stockOutDetail.vue 查看文件

744
       },
744
       },
745
 
745
 
746
     exportList(){
746
     exportList(){
747
-       console.log("哈哈哈",this.tableOut)
748
-      
749
        for(let i=0;i<this.tableOut.length;i++){
747
        for(let i=0;i<this.tableOut.length;i++){
750
         this.tableOut[i].index = i+1
748
         this.tableOut[i].index = i+1
751
         this.tableOut[i].good_name = this.tableOut[i].good_name
749
         this.tableOut[i].good_name = this.tableOut[i].good_name
756
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
754
           this.tableOut[i].packing_price = this.tableOut[i].buy_price
757
         }else if(this.orgId == 10265){
755
         }else if(this.orgId == 10265){
758
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
756
           this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
757
+        }else if(this.orgId == 10215){
758
+          this.tableOut[i].total_price = (this.getMySelfCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
759
         }else{
759
         }else{
760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
760
           this.tableOut[i].total_price = (this.getStockCount(this.tableOut[i].good_id) * this.tableOut[i].retail_price).toFixed(2)
761
         }
761
         }
762
        
762
        
763
-        if(this.orgId  == 10265){
763
+        if(this.orgId  == 10265 || this.orgId ==10215 ){
764
         
764
         
765
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
765
          this.tableOut[i].out_count = this.getMySelfCount(this.tableOut[i].good_id)
766
-        }else{
766
+        }
767
+        if(this.orgId!=10265 && this.orgId !=10215){
767
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
768
           this.tableOut[i].out_count = this.getStockCount(this.tableOut[i].good_id)
768
         }
769
         }
769
        }
770
        }

+ 35 - 7
src/xt_pages/stock/drugs/components/drugOutDetail.vue 查看文件

136
         </el-table-column>
136
         </el-table-column>
137
         <el-table-column label="数量" align="center">
137
         <el-table-column label="数量" align="center">
138
           <template slot-scope="scope">
138
           <template slot-scope="scope">
139
-            {{scope.row.count}}
139
+            {{scope.row.count}} 
140
           </template>
140
           </template>
141
         </el-table-column>
141
         </el-table-column>
142
         <el-table-column label="总价" align="center">
142
         <el-table-column label="总价" align="center">
143
           <template slot-scope="scope">
143
           <template slot-scope="scope">
144
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
144
            <span v-if="org_id == 9919">{{(scope.row.last_price * scope.row.count).toFixed(2)}} </span> 
145
            <span v-else>
145
            <span v-else>
146
-             <span v-if="scope.row.price >0">{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
147
-             <span v-if="scope.row.price  == 0">{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
146
+             <span v-if="scope.row.price >0">
147
+                <span v-if="scope.row.count >= scope.row.min_number">
148
+                 {{((scope.row.last_price * scope.row.count)/scope.row.min_number).toFixed(2)}}
149
+                </span>  
150
+                <span v-else>{{(scope.row.last_price * scope.row.count).toFixed(2)}}</span>
151
+              </span>
152
+             <span v-if="scope.row.price  == 0">
153
+               <span v-if="scope.row.count >=scope.row.min_number">
154
+                 {{((getPrice(scope.row.drug_id)* scope.row.count)/scope.row.min_number).toFixed(2)}}
155
+               </span> 
156
+               <span v-else>{{(getPrice(scope.row.drug_id)* scope.row.count).toFixed(2)}}</span>
157
+             </span>
148
            </span>
158
            </span>
149
             <!-- {{scope.row.total_price}} -->
159
             <!-- {{scope.row.total_price}} -->
150
           </template>
160
           </template>
562
        for(let i=0;i<this.tableData.length;i++){
572
        for(let i=0;i<this.tableData.length;i++){
563
          if(this.tableData[i].is_total == 0){
573
          if(this.tableData[i].is_total == 0){
564
             this.tableData[i].index = i+1
574
             this.tableData[i].index = i+1
565
-      
566
-            this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
575
+            if(this.tableData[i].drug_type == 1){
576
+              this.tableData[i].drugtype = "西药"
577
+            }
578
+            if(this.tableData[i].drug_type == 2){
579
+              this.tableData[i].drugtype = "草药"
580
+            }
581
+            if(this.tableData[i].drug_type == 3){
582
+              this.tableData[i].drugtype = "成药"
583
+            }
584
+            // this.tableData[i].drugtype = this.getTypeList(this.tableData[i].drugtype)
567
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
585
             this.tableData[i].specification_name = this.tableData[i].dose + this.tableData[i].dose_unit +"*" + this.tableData[i].min_number + this.tableData[i].min_unit +  "/" + this.tableData[i].max_unit
568
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
586
             this.tableData[i].time = this.getTime(this.tableData[i].ctime)
569
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
587
             this.tableData[i].user_name = this.getAdminUser(this.tableData[i].creater)
570
             if(this.org_id == 9671 || this.org_id == 9919){
588
             if(this.org_id == 9671 || this.org_id == 9919){
571
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
589
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].last_price)
572
-              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
590
+              if(this.tableData[i].count >=this.tableData[i].min_number){
591
+               this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)/this.tableData[i].min_number
592
+              }else{
593
+                this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].last_price)
594
+              }
595
+              
573
             }else{
596
             }else{
574
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
597
               this.tableData[i].total = (this.tableData[i].count * this.tableData[i].price)
575
-              this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
598
+                if(this.tableData[i].count >=this.tableData[i].min_number){
599
+                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)/this.tableData[i].min_number
600
+              }else{
601
+                  this.tableData[i].total_price = (this.tableData[i].count * this.tableData[i].price)
602
+              }
603
+             
576
             }
604
             }
577
          }
605
          }
578
        }
606
        }

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

235
           </el-table-column> -->
235
           </el-table-column> -->
236
           <el-table-column label="总价" align="center">
236
           <el-table-column label="总价" align="center">
237
             <template slot-scope="scope">
237
             <template slot-scope="scope">
238
-              <span v-if="scope.row.price > 0">{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price).toFixed(2)}}</span>
239
-              <span v-if="scope.row.price == 0">{{getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price).toFixed(2)}}</span>
238
+              <span v-if="scope.row.price > 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.price/scope.row.min_number)/scope.row.min_number).toFixed(2)}}</span>
239
+              <span v-if="scope.row.price == 0">{{(getAllPriceOne(scope.row.drug_id,scope.row.retail_price,scope.row.min_price)/scope.row.min_number).toFixed(2)}}</span>
240
             </template>
240
             </template>
241
           </el-table-column>
241
           </el-table-column>
242
           <el-table-column label="生产厂家" align="center">
242
           <el-table-column label="生产厂家" align="center">