Browse Source

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

csx 3 years ago
parent
commit
ee6237fc53
32 changed files with 655 additions and 191 deletions
  1. 31 0
      src/api/supply.js
  2. 4 1
      src/router/modules/supply.js
  3. 1 1
      src/xt_pages/dialysis/components/consumablesDialog.vue
  4. 1 1
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  5. 1 1
      src/xt_pages/hospitalStation/summary.vue
  6. 1 1
      src/xt_pages/medicalScheduling/index.vue
  7. 18 9
      src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue
  8. 1 1
      src/xt_pages/outpatientCharges/statementPrint.vue
  9. 6 1
      src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue
  10. 1 1
      src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue
  11. 6 0
      src/xt_pages/role/admin.vue
  12. 8 9
      src/xt_pages/role/components/AdminInfoForm.vue
  13. 6 0
      src/xt_pages/stock/cancelStockOrder.vue
  14. 5 1
      src/xt_pages/stock/drugs/cancelDrugStockOrder.vue
  15. 5 0
      src/xt_pages/stock/drugs/drugBatchNumber.vue
  16. 4 1
      src/xt_pages/stock/drugs/drugQueryPrint.vue
  17. 5 0
      src/xt_pages/stock/drugs/drugStockInOrder.vue
  18. 10 6
      src/xt_pages/stock/drugs/drugStockOutOrder.vue
  19. 1 1
      src/xt_pages/stock/drugs/inventory.vue
  20. 7 2
      src/xt_pages/stock/drugs/query.vue
  21. 1 1
      src/xt_pages/stock/inventory.vue
  22. 6 12
      src/xt_pages/stock/stockBatchNumber.vue
  23. 10 0
      src/xt_pages/stock/stockInOrder.vue
  24. 29 0
      src/xt_pages/stock/stockInOrderAdd.vue
  25. 19 1
      src/xt_pages/stock/stockInOrderEdit.vue
  26. 6 0
      src/xt_pages/stock/stockOutOrder.vue
  27. 2 0
      src/xt_pages/stock/stockPrint.vue
  28. 7 2
      src/xt_pages/stock/stockQuery.vue
  29. 238 88
      src/xt_pages/supply/components/addPurchaseOrder.vue
  30. 144 43
      src/xt_pages/supply/purchaseOrderQuery.vue
  31. 22 4
      src/xt_pages/supply/supplyQuery.vue
  32. 49 3
      src/xt_pages/workforce/components/tableData.vue

+ 31 - 0
src/api/supply.js View File

@@ -8,3 +8,34 @@ export function getInitOrder(params) {
8 8
   })
9 9
 }
10 10
 
11
+export function savePurchaseOrder(data, supplier_name, start_time, end_time, rate_of_concession, discount_amount) {
12
+  return request({
13
+    url: '/api/supply/savepurchaseorder?supplier_name=' + supplier_name + '&start_time=' + start_time + '&end_time=' + end_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount,
14
+    method: 'post',
15
+    data: data
16
+  })
17
+}
18
+
19
+export function getAllSupply(params) {
20
+  return request({
21
+    url: '/api/supply/getallsupply',
22
+    method: 'get',
23
+    params: params
24
+  })
25
+}
26
+
27
+export function getAllPurchaseOrderList(params) {
28
+  return request({
29
+    url: '/api/supply/getallpurchaseorderlist',
30
+    method: 'get',
31
+    params: params
32
+  })
33
+}
34
+
35
+export function updatePurchaseOrder(data, supplier_name, start_time, end_time, rate_of_concession, discount_amount, id, number) {
36
+  return request({
37
+    url: '/api/supply/updatepurchaseorder?supplier_name=' + supplier_name + '&start_time=' + start_time + '&end_time=' + end_time + '&rate_of_concession=' + rate_of_concession + '&discount_amount=' + discount_amount + '&id=' + id + '&number=' + number,
38
+    method: 'post',
39
+    data: data
40
+  })
41
+}

+ 4 - 1
src/router/modules/supply.js View File

@@ -37,7 +37,10 @@ export default {
37 37
       path: '/purchase/order/add',
38 38
       component: () => import('@/xt_pages/supply/components/addPurchaseOrder'),
39 39
       name: 'addPurchaseOrder',
40
-      meta: { title: 'addPurchaseOrder', noCache: true }
40
+      meta: { title: 'addPurchaseOrder', noCache: true },
41
+      hidden: true,
42
+      is_menu: false,
43
+      isChild: true
41 44
     }
42 45
   ]
43 46
 }

+ 1 - 1
src/xt_pages/dialysis/components/consumablesDialog.vue View File

@@ -155,7 +155,7 @@
155 155
                   this.tableData.push(response.data.data.list[i])
156 156
                }
157 157
              }
158
-             console.log("表哥22222222222",this.tableData) 
158
+            
159 159
           })
160 160
        },
161 161
 

+ 1 - 1
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue View File

@@ -432,7 +432,7 @@
432 432
         <el-row :gutter="20"> -->
433 433
 
434 434
         <el-col :span="8" v-if="isShow('实际置换量')">
435
-          <el-form-item v-if="this.template_id == 20 || this.template_id == 21" label="实际置换量(ml): ">
435
+          <el-form-item v-if="this.template_id == 20 || this.template_id == 21 || this.template_id == 13" label="实际置换量(ml): ">
436 436
             <el-input v-model="form.actual_displacement"></el-input>
437 437
           </el-form-item>
438 438
           <el-form-item v-else label="实际置换量(L): ">

+ 1 - 1
src/xt_pages/hospitalStation/summary.vue View File

@@ -566,7 +566,7 @@
566 566
         }
567 567
       },
568 568
       toPrint(row) {
569
-        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138)) {
569
+        if (this.$store.getters.xt_user.org_id == 9504 || this.$store.getters.xt_user.org_id == 10028 || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10138) || (scope.row.order_status == 2 && $store.getters.xt_user.org_id == 10278)) {
570 570
           this.statementVisible9504 = true
571 571
           let obj = {
572 572
             order_id: row.id,

+ 1 - 1
src/xt_pages/medicalScheduling/index.vue View File

@@ -956,7 +956,7 @@ export default {
956 956
                     
957 957
                     this.tableData = data
958 958
 
959
-                   console.log("表哥3333333333",this.tableData)
959
+              
960 960
                 }
961 961
             })
962 962
         },

+ 18 - 9
src/xt_pages/outpatientCharges/invoiceTemplate/printFour.vue View File

@@ -15,28 +15,28 @@
15 15
             <div></div>
16 16
             <div  style="position: absolute;top:70px;left:240px">{{ list.number }}</div>
17 17
             <div  style="position: absolute;left:470px;top:70px;">
18
-                <span>{{ printDate.slice(0,4) }}</span>
18
+                <span>{{  paramsObj.setl_time ? paramsObj.setl_time.split(' ')[0].slice(0,4) : getTime(list.date, '{y}-{m}-{d}').slice(0,4) }}</span>
19 19
             </div>
20 20
             <div  style="position: absolute;left:530px;top:70px;">
21
-                <span>{{ parseInt(printDate.slice(5,7)) }}</span>
21
+                <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(5,7)) : getTime(list.date, '{y}-{m}-{d}').slice(5,7) }}</span>
22 22
             </div>
23 23
             <div  style="position: absolute;left:560px;top:70px;">
24
-                <span>{{ parseInt(printDate.slice(8,11)) }}</span>
24
+                <span>{{ paramsObj.setl_time ? parseInt(paramsObj.setl_time.split(' ')[0].slice(8,11)) : getTime(list.date, '{y}-{m}-{d}').slice(8,11) }}</span>
25 25
             </div>
26 26
         </div>
27 27
         <div style="display:flex;justify-content: space-between;">
28 28
             <div style="position: absolute;top:85px;left:100px;"> {{ paramsObj.name }}</div>
29 29
             <div style="position: absolute;top:85px;left:180px;">√</div>
30 30
             <!-- <div>{{ list.pay_way }}</div> -->
31
-            <div style="position: absolute;top:85px;left:380px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
32
-            <div style="position: absolute;top:85px;left:530px;">{{ paramsObj.setl_time.split(' ')[0] }}</div>
31
+            <div style="position: absolute;top:85px;left:380px;">{{ printDate }}</div>
32
+            <div style="position: absolute;top:85px;left:530px;">{{ printDate }}</div>
33 33
         </div>
34 34
         <div style="display:flex;justify-content: space-between;">
35 35
             <!-- <div>{{ paramsObj.gend == 1 ? '男' : '女' }}</div> -->
36 36
             <div v-if="paramsObj.gend == 1" style="position: absolute;top:110px;left:100px;">√</div>
37 37
             <div v-else style="position: absolute;top:110px;left:140px;">√</div>
38
-            <div style="position: absolute;top:110px;left:260px;">{{ (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
39
-            <div style="position: absolute;top:110px;left:420px;">{{ list.psn_cash_money.toFixed(2) }}</div>
38
+            <div style="position: absolute;top:110px;left:260px;">{{ list.number.length <= 13 ? (totalPrice - list.psn_cash_money).toFixed(2) : '0.00' }}</div>
39
+            <div style="position: absolute;top:110px;left:420px;">{{ list.number.length <= 13 ? list.psn_cash_money.toFixed(2) : (totalPrice - list.psn_cash_money).toFixed(2) }}</div>
40 40
             <div style="position: absolute;top:110px;left:540px;">现金</div>
41 41
         </div>
42 42
         <div style="display:flex;justify-content: space-between;">
@@ -99,7 +99,7 @@
99 99
                 </span>
100 100
                 <span v-else>零</span>
101 101
             </span>
102
-            <span  style="position: absolute;top:235px;left:280px">
102
+            <span  style="position: absolute;top:235px;left:290px">
103 103
                 <span v-if="zhongwen.indexOf('佰') > -1">
104 104
                     {{ zhongwen.substring(zhongwen.indexOf('佰') - 1,zhongwen.indexOf('佰')) }}
105 105
                 </span>
@@ -143,6 +143,7 @@
143 143
 
144 144
 <script>
145 145
 import { getInvoice } from '@/api/project/project'
146
+import { uParseTime } from '@/utils/tools'
146 147
 export default {
147 148
     props:{
148 149
         paramsObj:Object
@@ -231,7 +232,15 @@ export default {
231 232
             this.zhongwen =  str.replace(/零(仟|佰|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
232 233
             console.log(this.zhongwen)
233 234
         },
234
-
235
+        getTime(value, temp) {
236
+            if (value == 0) {
237
+                return ''
238
+            }
239
+            if (value != undefined) {
240
+                return uParseTime(value, temp)
241
+            }
242
+            return ''
243
+        },
235 244
     },
236 245
     watch:{
237 246
         paramsObj:{//深度监听,可监听到对象、数组的变化

+ 1 - 1
src/xt_pages/outpatientCharges/statementPrint.vue View File

@@ -79,7 +79,7 @@ export default {
79 79
       this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
80 80
 
81 81
 
82
-      if(this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 4){
82
+      if(this.$store.getters.xt_user.org_id == 10138 || this.$store.getters.xt_user.org_id == 0 || this.$store.getters.xt_user.org_id == 4 || this.$store.getters.xt_user.org_id == 10278){
83 83
         setTimeout(() => {
84 84
           const style =
85 85
           '@media print {#prescription-print{font-size:14px;border:1px solid white}.printTitle{font-size: 22px;text-align: center;font-weight: bold;}table td {padding: 10px 5px;font-size:16px;}@media print {html {zoom: 47%;}}}';

+ 6 - 1
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue View File

@@ -129,7 +129,12 @@
129 129
                                                 <template slot-scope="scope">{{ scope.row.drug_name }}</template>
130 130
                                             </el-table-column>
131 131
                                             <el-table-column label="规格" width="60">
132
-                                                <template slot-scope="scope">{{ scope.row.drug_spec }}</template>
132
+                                                <template slot-scope="scope">
133
+                                                  <!-- {{ scope.row.drug_spec }} -->
134
+                                                   <span
135
+                                                       v-if="scope.row.min_unit != scope.row.dose_unit">{{ scope.row.dose }}{{ scope.row.dose_unit }}&nbsp;* &nbsp;</span>
136
+                                                       {{ scope.row.min_number }}{{ scope.row.min_unit }}/{{ scope.row.max_unit }}
137
+                                                  </template>
133 138
                                             </el-table-column>
134 139
                                             <el-table-column label="单价" width="40">
135 140
                                                 <template slot-scope="scope">{{ scope.row.retail_price }}</template>

+ 1 - 1
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue View File

@@ -264,7 +264,7 @@ export default {
264 264
               }
265 265
               this.tableData.push({ name: key, data: dd[key]});
266 266
             }
267
-            console.log("表哥",this.tableData)
267
+       
268 268
             let projectArr = []
269 269
           
270 270
             this.newArr.map(item => {

+ 6 - 0
src/xt_pages/role/admin.vue View File

@@ -44,6 +44,12 @@
44 44
           min-width="160"
45 45
           align="center"
46 46
         ></el-table-column>
47
+        <el-table-column label="医保医师编码" prop="doctor_number" min-width="160" align="center">
48
+          <template slot-scope="scope">
49
+            <span v-if="scope.row.doctor_number== 0"></span>
50
+            <span v-if="scope.row.doctor_number!= 0">{{scope.row.doctor_number}}</span>
51
+          </template>
52
+        </el-table-column>
47 53
         <el-table-column
48 54
           label="最后登录IP"
49 55
           prop="ip"

+ 8 - 9
src/xt_pages/role/components/AdminInfoForm.vue View File

@@ -68,6 +68,13 @@
68 68
       </el-form-item>
69 69
     </el-col>
70 70
    </el-row>
71
+   <el-row :span="24">
72
+      <el-col :span="8">
73
+       <el-form-item label="医保医师编码:">
74
+        <el-input v-model="form.doctor_number"></el-input>
75
+       </el-form-item>
76
+    </el-col>
77
+   </el-row>
71 78
   
72 79
   <div v-show="show">
73 80
    <el-row :span="24">
@@ -343,12 +350,7 @@
343 350
 
344 351
 
345 352
   <el-row :gutter="24">
346
-    <el-col :span="8">
347
-       <el-form-item label="医保医师编码:">
348
-         
349
-        <el-input v-model="form.doctor_number"></el-input>
350
-       </el-form-item>
351
-    </el-col>
353
+   
352 354
      <el-col :span="8">
353 355
        <el-form-item label="门诊大病类别:" label-width="130px">
354 356
             <el-select v-model="form.outpatient_illnessCategory" placeholder="门诊大病类别">
@@ -1063,8 +1065,6 @@
1063 1065
         })
1064 1066
       },
1065 1067
       changeRole(arr){
1066
-        console.log("arr",arr)
1067
-        console.log("roles",this.roles)
1068 1068
         var varName = []
1069 1069
         for(let i=0;i<this.roles.length;i++){
1070 1070
           for(let j=0;j<arr.length;j++){
@@ -1073,7 +1073,6 @@
1073 1073
              }
1074 1074
           }
1075 1075
         }
1076
-        console.log("33333",varName)
1077 1076
         this.form.role_type = 1
1078 1077
         var ids = varName.join(";")
1079 1078
         console.log("valee22222",ids)

+ 6 - 0
src/xt_pages/stock/cancelStockOrder.vue View File

@@ -186,6 +186,12 @@
186 186
             </template>
187 187
           </el-table-column>
188 188
 
189
+           <el-table-column label="国家编码" align="center">
190
+            <template slot-scope="scope">
191
+              {{scope.row.GoodInfo.social_security_directory_code}}
192
+            </template>
193
+          </el-table-column>
194
+
189 195
           <el-table-column label="退库数量" align="center">
190 196
             <template slot-scope="scope">
191 197
               {{ scope.row.count}}{{scope.row.GoodInfo.packing_unit}}

+ 5 - 1
src/xt_pages/stock/drugs/cancelDrugStockOrder.vue View File

@@ -182,7 +182,11 @@
182 182
                 {{ scope.row.BaseDrugLib.dose}}{{scope.row.BaseDrugLib.dose_unit}} * {{scope.row.BaseDrugLib.min_number}}{{scope.row.BaseDrugLib.min_unit}} /{{scope.row.BaseDrugLib.max_unit}}
183 183
               </template>
184 184
             </el-table-column>
185
-          
185
+            <el-table-column label="国家编码" align="center">
186
+              <template slot-scope="scope">
187
+                {{ scope.row.BaseDrugLib.medical_insurance_number}}
188
+              </template>
189
+            </el-table-column>
186 190
             <el-table-column label="退库数量" align="center">
187 191
               <template slot-scope="scope">
188 192
                 {{ scope.row.count}}

+ 5 - 0
src/xt_pages/stock/drugs/drugBatchNumber.vue View File

@@ -79,6 +79,11 @@
79 79
              {{scope.row.warehousing_count}}{{scope.row.max_unit}}
80 80
            </template>
81 81
         </el-table-column>
82
+        <el-table-column prop="drug_name" label="零售价" align="center">
83
+           <template slot-scope="scope">
84
+              {{scope.row.retail_price}}
85
+           </template>
86
+        </el-table-column>
82 87
         <el-table-column prop="drug_name" label="进货单价" align="center">
83 88
            <template slot-scope="scope">
84 89
               {{scope.row.price}}

+ 4 - 1
src/xt_pages/stock/drugs/drugQueryPrint.vue View File

@@ -18,6 +18,7 @@
18 18
               <td style="line-height: 50px" width="100">药品类型</td>
19 19
               <td style="line-height: 50px" width="150">药品名称</td>
20 20
               <td style="line-height: 50px" width="150">规格型号&单位</td>
21
+              <td style="line-height: 50px" width="150">国家编码</td>
21 22
               <td style="line-height: 50px" width="100">进货单价</td>
22 23
               <td  style="line-height: 50px" width="200">厂家</td>
23 24
               <td style="line-height: 50px" width="80">入库数量</td>
@@ -38,7 +39,9 @@
38 39
               <td style="line-height: 50px">
39 40
                    <span> {{item.dose + item.dose_unit +"*"+item.min_number+item.min_unit+"/"+item.max_unit}}</span>
40 41
               </td>
41
-             
42
+             <td style="line-height: 50px">
43
+                  <span>{{item.medical_insurance_number }}</span>
44
+              </td>
42 45
               <td style="line-height: 50px">
43 46
                   <span>{{item.last_price }}</span>
44 47
               </td>

+ 5 - 0
src/xt_pages/stock/drugs/drugStockInOrder.vue View File

@@ -189,6 +189,11 @@
189 189
           <template slot-scope="scope">
190 190
             {{scope.row.drug.dose}}&nbsp;{{scope.row.drug.dose_unit}}*{{scope.row.drug.min_number}}{{scope.row.drug.min_unit}}/{{scope.row.drug.max_unit}}
191 191
           </template>
192
+        </el-table-column>
193
+          <el-table-column label="国家编码" align="center">
194
+          <template slot-scope="scope">
195
+            {{scope.row.drug.medical_insurance_number}}
196
+          </template>
192 197
         </el-table-column>
193 198
         <el-table-column label="批号" align="center">
194 199
           <template slot-scope="scope">

+ 10 - 6
src/xt_pages/stock/drugs/drugStockOutOrder.vue View File

@@ -211,7 +211,11 @@
211 211
               {{scope.row.dose}}&nbsp;{{scope.row.dose_unit}}*{{scope.row.min_number}}{{scope.row.min_unit}}/{{scope.row.max_unit}}
212 212
             </template>
213 213
           </el-table-column>
214
-         
214
+          <el-table-column label="国家编码" align="center">
215
+            <template slot-scope="scope">
216
+              {{scope.row.medical_insurance_number}}
217
+            </template>
218
+          </el-table-column>
215 219
           <el-table-column label="出库数量" align="center">
216 220
             <template slot-scope="scope">
217 221
               <!-- <span v-if="scope.row.is_sys ==  0">{{getTotalCount(scope.row.drug_id,scope.row.min_number,scope.row.max_unit,scope.row.min_unit)}}</span> -->
@@ -223,11 +227,11 @@
223 227
               {{scope.row.price}}
224 228
             </template>
225 229
           </el-table-column>
226
-          <el-table-column label="拆零零售价" align="center">
230
+          <!-- <el-table-column label="拆零零售价" align="center">
227 231
             <template slot-scope="scope">
228
-              {{scope.row.min_price}}
232
+              {{scope.row.retail_price}}
229 233
             </template>
230
-          </el-table-column>
234
+          </el-table-column> -->
231 235
           <el-table-column label="总价" align="center">
232 236
             <template slot-scope="scope">
233 237
               <span>{{getAllPriceOne(scope.row.drug_id,scope.row.price,scope.row.min_price).toFixed(2)}}</span>
@@ -1188,7 +1192,7 @@ export default {
1188 1192
           }
1189 1193
         }
1190 1194
         const tHeader = ['药品名称','药品类型','规格&单位', '批号','出库数量','出货单价','拆零零售价','总价','生产厂家','生产日期','有效日期','经销商','批准文号','备注']
1191
-        const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','min_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1195
+        const filterVal = ['drug_name','drug_type','unit','batch_number', 'count','price','retail_price','total_price','manufacturer','product_date','expiry_date','dealer','number','remark']
1192 1196
 
1193 1197
         // console.log("table",this.exportList)
1194 1198
          
@@ -1212,7 +1216,7 @@ export default {
1212 1216
               total += this.drugFlowList[i].count
1213 1217
           }
1214 1218
         }
1215
-        all_price = total * min_price
1219
+        all_price = total * price
1216 1220
       
1217 1221
         return  all_price
1218 1222
       },

+ 1 - 1
src/xt_pages/stock/drugs/inventory.vue View File

@@ -72,7 +72,7 @@
72 72
              <el-table-column prop="name" label="盘点后数量" width="180"  align="center">
73 73
                 <template slot-scope="scope">
74 74
                   <el-input style="width:50px" v-model="scope.row.last_stock_max_number"></el-input>{{scope.row.max_unit}}
75
-                 <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:50px" v-model="scope.row.last_stock_min_number" :disabled="true"></el-input>{{scope.row.min_unit}}</span> 
75
+                 <span v-if="scope.row.XtBaseDrug.max_unit!=scope.row.XtBaseDrug.min_unit"><el-input style="width:50px" v-model="scope.row.last_stock_min_number"></el-input>{{scope.row.min_unit}}</span> 
76 76
                  </template> 
77 77
               </el-table-column>
78 78
 

+ 7 - 2
src/xt_pages/stock/drugs/query.vue View File

@@ -94,6 +94,11 @@
94 94
            <template slot-scope="scope">
95 95
              {{scope.row.dose + scope.row.dose_unit +"*"+scope.row.min_number+scope.row.min_unit+"/"+scope.row.max_unit}}
96 96
            </template>
97
+        </el-table-column>
98
+        <el-table-column prop="drug_name" label="国家编码" align="center">
99
+           <template slot-scope="scope">
100
+             {{scope.row.medical_insurance_number}}
101
+           </template>
97 102
         </el-table-column>
98 103
          <el-table-column prop="drug_name" label="进货单价" align="center">
99 104
            <template slot-scope="scope">
@@ -482,8 +487,8 @@ import { min } from 'moment'
482 487
           }   
483 488
          }
484 489
          import('@/vendor/Export2Excel').then(excel => {
485
-         const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','进货单价','厂家','入库数量','出库数量','剩余库存量']
486
-         const filterVal = ['index', 'drug_type_name', 'drug_name','unit','last_price','manufacturer_name','inCount','outCount','overplusCount']
490
+         const tHeader = ['序号', '药品类型', '药品名称','规格型号&单位','国家编码','进货单价','厂家','入库数量','出库数量','剩余库存量']
491
+         const filterVal = ['index', 'drug_type_name', 'drug_name','unit','medical_insurance_number','last_price','manufacturer_name','inCount','outCount','overplusCount']
487 492
 
488 493
 
489 494
          const data = this.formatJson(filterVal, this.tableList)

+ 1 - 1
src/xt_pages/stock/inventory.vue View File

@@ -100,7 +100,7 @@
100 100
           v-model="form.drug_name"
101 101
           :fetch-suggestions="querySearchAsync"
102 102
           :trigger-on-focus="true"
103
-          placeholder="请输入药品名称"
103
+          placeholder="请输入耗材名称"
104 104
           @select="handleSelect"
105 105
           style="width:300px;"
106 106
           v-show="showTableOne"

+ 6 - 12
src/xt_pages/stock/stockBatchNumber.vue View File

@@ -38,18 +38,7 @@
38 38
               value-format="yyyy-MM-dd"
39 39
               @change="endTimeChange"
40 40
           ></el-date-picker>
41
-
42
-        <!-- <span>出入库方式:</span>
43
-        <el-select v-model="stock_type" style="width:160px;margin-right:10px;" placeholder="请选择" @change="changeDrug">
44
-            <el-option
45
-              v-for="(item,index) in stockType"
46
-              :key="index"
47
-              :label="item.name"
48
-              :value="item.id">
49
-            </el-option>
50
-        </el-select> -->
51
-        
52
-        
41
+  
53 42
       </div>
54 43
       
55 44
        <el-table
@@ -93,6 +82,11 @@
93 82
              <span> {{scope.row.price}}</span>
94 83
            </template>
95 84
         </el-table-column>
85
+         <el-table-column prop="drug_name" label="零售价" align="center">
86
+           <template slot-scope="scope">
87
+             <span v-if="scope.row.packing_price > 0"> {{scope.row.packing_price}}</span>
88
+           </template>
89
+        </el-table-column>
96 90
        </el-table>
97 91
        
98 92
       <el-pagination

+ 10 - 0
src/xt_pages/stock/stockInOrder.vue View File

@@ -193,6 +193,11 @@
193 193
             {{ scope.row.GoodInfo.specification_name}} / {{scope.row.GoodInfo.packing_unit}}
194 194
           </template>
195 195
         </el-table-column>
196
+        <el-table-column label="国家编码" align="center">
197
+          <template slot-scope="scope">
198
+            {{ scope.row.GoodInfo.social_security_directory_code}}
199
+          </template>
200
+        </el-table-column>
196 201
         <el-table-column label="批号" align="center">
197 202
           <template slot-scope="scope">
198 203
             {{ scope.row.number}}
@@ -203,6 +208,11 @@
203 208
             {{ scope.row.warehousing_count}}{{scope.row.GoodInfo.packing_unit}}
204 209
           </template>
205 210
         </el-table-column>
211
+         <!-- <el-table-column label="零售价" align="center">
212
+          <template slot-scope="scope">
213
+            {{ scope.row.packing_price}}
214
+          </template>
215
+        </el-table-column> -->
206 216
         <el-table-column label="进货价" align="center">
207 217
           <template slot-scope="scope">
208 218
             {{ scope.row.price}}

+ 29 - 0
src/xt_pages/stock/stockInOrderAdd.vue View File

@@ -107,7 +107,21 @@
107 107
             
108 108
             </template>
109 109
           </el-table-column>
110
+        
111
+          <el-table-column align="center" width="120">
112
+            <template slot="header" slot-scope="scope">
113
+              <span>零售价<span style="color: red">*</span></span>
114
+            </template>
115
+            <template slot-scope="scope">
116
+            
117
+              <el-form-item :prop="'recordData.' + scope.$index + '.packing_price'" :rules='tableRules.packing_price'
118
+                            style="padding-top: 20px">
119
+                <el-input placeholder="请输入单价" type="number" v-model="scope.row.packing_price"></el-input>
120
+              </el-form-item>
110 121
 
122
+
123
+            </template>
124
+          </el-table-column>
111 125
           <el-table-column align="center" width="120">
112 126
             <template slot="header" slot-scope="scope">
113 127
               <span>进货单价<span style="color: red">*</span></span>
@@ -285,6 +299,9 @@
285 299
           price: [
286 300
             { required: true, message: '单价不能为空', trigger: 'blur' }
287 301
           ],
302
+          packing_price: [
303
+            { required: true, message: '零售价不能为空', trigger: 'blur' }
304
+          ],
288 305
           warehousing_count: [
289 306
             { required: true, message: '数量不能为空', trigge: 'blur' }
290 307
           ],
@@ -511,6 +528,7 @@
511 528
         tempObj['specification_name'] = ''
512 529
         tempObj['name'] = ''
513 530
         tempObj['license_number'] = ""
531
+        tempObj["packing_price"] = ""
514 532
         this.recordInfo.recordData.push(tempObj)
515 533
       }, handleDelete: function(index, row) {
516 534
         if (this.recordInfo.recordData.length <= 1) {
@@ -642,6 +660,7 @@
642 660
       }
643 661
       ,
644 662
       submit() {
663
+        console.log("res23322332",this.$refs)
645 664
         this.$refs['tableForm'].validate((valid) => {
646 665
           if (valid) {
647 666
             const array = this.recordInfo.recordData
@@ -652,6 +671,7 @@
652 671
                 return
653 672
               }
654 673
               array[i].price = array[i].price.toString()
674
+              array[i].packing_price = array[i].packing_price.toString()
655 675
             }
656 676
 
657 677
             if(this.recordInfo.recordData.length <= 0){
@@ -755,6 +775,7 @@
755 775
         this.currentIndex = val
756 776
       },
757 777
       handleSelect(val){
778
+         console.log("val3232232323",val)
758 779
          for(let i=0;i<this.recordInfo.recordData.length;i++){
759 780
            if(this.currentIndex == i){
760 781
               this.recordInfo.recordData[i].good_type_id = val.id
@@ -764,11 +785,18 @@
764 785
               this.recordInfo.recordData[i].number =  val.number
765 786
               this.recordInfo.recordData[i].manufacturer = val.manufacturer
766 787
               this.recordInfo.recordData[i].remark = val.remark
788
+           
767 789
               if(val.buy_price == 0){
768 790
                this.recordInfo.recordData[i].price = ""
769 791
               }else{
770 792
                 this.recordInfo.recordData[i].price = val.buy_price
771 793
               }
794
+
795
+              if(val.packing_price == 0){
796
+               this.recordInfo.recordData[i].packing_price = ""
797
+              }else{
798
+                this.recordInfo.recordData[i].packing_price = val.packing_price
799
+              }
772 800
               
773 801
               this.recordInfo.recordData[i].specification_name = val.specification_name
774 802
               this.recordInfo.recordData[i].good_id = val.id
@@ -811,6 +839,7 @@
811 839
       tempObj['specification_name'] = ''
812 840
       tempObj['name'] = ''
813 841
       tempObj['license_number'] = ''
842
+      tempObj['packing_price']= ''
814 843
       this.recordInfo.recordData.push(tempObj)
815 844
       this.GetConfigInfo()
816 845
       this.propForm.goodUnit = this.$store.getters.good_unit

+ 19 - 1
src/xt_pages/stock/stockInOrderEdit.vue View File

@@ -122,10 +122,23 @@
122 122
               </el-form-item>
123 123
             </template>
124 124
           </el-table-column>
125
+          <el-table-column align="center" width="120">
126
+            <template slot="header" slot-scope="scope">
127
+              <span>零售价<span style="color: red">*</span></span>
128
+            </template>
129
+            <template slot-scope="scope">
130
+            
131
+              <el-form-item :prop="'recordData.' + scope.$index + '.packing_price'" :rules='tableRules.packing_price'
132
+                            style="padding-top: 20px">
133
+                <el-input placeholder="请输入单价" type="number" v-model="scope.row.packing_price"></el-input>
134
+              </el-form-item>
135
+
125 136
 
137
+            </template>
138
+          </el-table-column>
126 139
           <el-table-column align="center" width="120">
127 140
             <template slot="header" slot-scope="scope">
128
-              <span>单价<span style="color: red">*</span></span>
141
+              <span>进货价<span style="color: red">*</span></span>
129 142
             </template>
130 143
             <template slot-scope="scope">
131 144
               <!--<el-input type="number" v-model="scope.row.price"  @blur="handleBlur(scope.$index, scope.row)"></el-input>-->
@@ -340,6 +353,9 @@ export default {
340 353
       },
341 354
       tableRules: {
342 355
         price: [{ required: true, message: "单价不能为空", trigger: "blur" }],
356
+        packing_price: [
357
+          { required: true, message: '零售价不能为空', trigger: 'blur' }
358
+        ],
343 359
         warehousing_count: [
344 360
           { required: true, message: "数量不能为空", trigge: "blur" }
345 361
         ],
@@ -482,6 +498,7 @@ export default {
482 498
       tempObj["dealer"] = "";
483 499
       tempObj["manufacturer"] = "";
484 500
       tempObj["license_number"] = ""
501
+      tempObj["packing_price"] = ""
485 502
       this.recordInfo.recordData.push(tempObj);
486 503
     },
487 504
     handleDelete: function(index, row) {
@@ -608,6 +625,7 @@ export default {
608 625
          
609 626
           for(let i=0;i<this.recordInfo.recordData.length;i++){
610 627
             this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
628
+             this.recordInfo.recordData[i].packing_price = this.recordInfo.recordData[i].packing_price.toString()
611 629
              if(this.recordInfo.recordData[i].dealer == ""){
612 630
                 this.recordInfo.recordData[i].dealer = 0
613 631
              }

+ 6 - 0
src/xt_pages/stock/stockOutOrder.vue View File

@@ -191,6 +191,12 @@
191 191
               {{ scope.row.specification_name}} / {{scope.row.packing_unit}}
192 192
             </template>
193 193
           </el-table-column>
194
+
195
+          <el-table-column label="国家编码" align="center">
196
+            <template slot-scope="scope">
197
+              {{ scope.row.social_security_directory_code}}
198
+            </template>
199
+          </el-table-column>
194 200
          
195 201
           <el-table-column label="出库数量" align="center">
196 202
             <template slot-scope="scope">

+ 2 - 0
src/xt_pages/stock/stockPrint.vue View File

@@ -27,6 +27,7 @@
27 27
                                     <td width="80">耗材类型</td>
28 28
                                     <td width="80">耗材名称</td>
29 29
                                     <td width="80">规格&单位</td>
30
+                                    <td width="80">国家编码</td>
30 31
                                     <td width="80">进货单价</td>
31 32
                                     <td width="80">生产商</td>
32 33
                                     <td width="80">入库数量</td>
@@ -39,6 +40,7 @@
39 40
                                    <td>{{getGoodType(item.good_type_id)}}</td>
40 41
                                    <td>{{item.good_name }}</td>
41 42
                                    <td><span>{{item.specification_name }} / {{item.packing_unit}}</span></td>
43
+                                   <td>{{item.social_security_directory_code}}</td>
42 44
                                    <td>{{item.buy_price}}</td>
43 45
                                    <td>{{getManufacture(item.manufacturer)}}</td>
44 46
                                    <td>

+ 7 - 2
src/xt_pages/stock/stockQuery.vue View File

@@ -91,6 +91,11 @@
91 91
               <span>{{ scope.row.specification_name }} / {{scope.row.packing_unit}}</span>
92 92
             </template>
93 93
          </el-table-column>
94
+         <el-table-column label="国家编码" align="center">
95
+            <template slot-scope="scope">
96
+              <span>{{ scope.row.social_security_directory_code}}</span>
97
+            </template>
98
+         </el-table-column>
94 99
         <el-table-column label="进货单价" align="center">
95 100
           <template slot-scope="scope">
96 101
              {{scope.row.buy_price}}
@@ -353,8 +358,8 @@ export default {
353 358
     exportList(){
354 359
          import('@/vendor/Export2Excel').then(excel => {
355 360
 
356
-         const tHeader = ['耗材类型', '耗材名称', '规格&单位','进货单价','生产商','入库数量','出库数量','库存剩余量']
357
-         const filterVal = ['type_name', 'good_name', 'unit','buy_price','prodect_name','inCount','outCount','overplus']
361
+         const tHeader = ['耗材类型', '耗材名称', '规格&单位','国家编码','进货单价','生产商','入库数量','出库数量','库存剩余量']
362
+         const filterVal = ['type_name', 'good_name', 'unit','social_security_directory_code','buy_price','prodect_name','inCount','outCount','overplus']
358 363
 
359 364
 
360 365
          for(let i=0;i<this.tableList.length;i++){

+ 238 - 88
src/xt_pages/supply/components/addPurchaseOrder.vue View File

@@ -3,9 +3,10 @@
3 3
 <div class="position">
4 4
     <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
 </div>
6
-<div class="app-container ">
6
+<div class="app-container"  v-loading="loading">
7 7
     <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 8
     <div>
9
+        <span style="color:red">*</span><span>供应商:</span>
9 10
         <el-select v-model="supplier_name" style="width:140px;margin-right:10px;" placeholder="请选择"
10 11
         @change="changeTypeName">
11 12
         <el-option
@@ -15,6 +16,7 @@
15 16
             :value="item.id">
16 17
         </el-option>
17 18
         </el-select>
19
+        <span>单据日期:</span>
18 20
         <el-date-picker
19 21
         size="small"
20 22
         v-model="start_time"
@@ -27,7 +29,8 @@
27 29
         format="yyyy-MM-dd"
28 30
         value-format="yyyy-MM-dd"
29 31
         @change="startTimeChange"
30
-        ></el-date-picker>-
32
+        ></el-date-picker>
33
+        <span>交货日期:</span>
31 34
         <el-date-picker
32 35
             size="small"
33 36
             v-model="end_time"
@@ -41,53 +44,51 @@
41 44
             value-format="yyyy-MM-dd"
42 45
             @change="endTimeChange"
43 46
         ></el-date-picker>
44
-        <el-input
45
-        size="small"
46
-        style="width: 200px;margin-left:10px;"
47
-        class="filter-item"
48
-        v-model.trim="keywords"
49
-        placeholder="耗材名称"
50
-        />
51
-        <el-button
52
-        size="small"
53
-        class="filter-item"
54
-        type="primary"
55
-        icon="el-icon-search"
56
-        @click="search"
57
-        >搜索</el-button
58
-        >
47
+        <span>单据编码:{{number}}</span>
48
+
59 49
     </div>
60 50
     <div>
61
-        <el-button size="small" type="primary" @click="savePurchaseOrder">保存</el-button>
51
+        <el-button size="small" type="primary" @click="savePurchaseOrder" v-show="showTwo">保存</el-button>
52
+        <el-button size="small" type="primary" @click="updatePurchaseOrder" v-show="showOne">打印</el-button>
53
+        <el-button size="small" type="primary" @click="updatePurchaseOrder" v-show="showOne">审核</el-button>
54
+        <el-button size="small" type="primary" @click="updatePurchaseOrder" v-show="showOne">修改</el-button>
62 55
     </div>
63 56
     </div>
64 57
 
65
-
58
+   <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
66 59
     <el-table
67 60
     :row-style="{ color: '#303133' }"
68 61
     :header-cell-style="{
69 62
         backgroundColor: 'rgb(245, 247, 250)',
70 63
         color: '#606266'
71 64
     }"
72
-    :data="tableList"
65
+    :data="recordInfo.tableList"
73 66
     :class="signAndWeighBoxPatients"
74 67
     border
75 68
     style="width: 100%"
76 69
     max-height="450"
77 70
     >
78
-    <el-table-column label="商品" align="center" width="200px">
71
+    <el-table-column align="center" width="200px">
72
+        <template slot="header" slot-scope="scope">
73
+            <span>商品<span style="color: red">*</span></span>
74
+        </template>
79 75
         <template slot-scope="scope">
76
+           <el-form-item :prop="'tableList.' + scope.$index + '.name'" :rules='tableRules.name'>
80 77
             <el-select v-model="scope.row.name" style="width:160px;" filterable placeholder="请选择" @change="changeName"   @input="changeGoodName(scope.$index)">
81
-            <el-option
82
-                v-for="(item,index) in tabList"
83
-                :key="index"
84
-                :label="item.supply_name"
85
-                :value="item">
86
-            </el-option>
87
-            </el-select>
78
+                <el-option
79
+                    v-for="(item,index) in tabList"
80
+                    :key="index"
81
+                    :label="item.supply_name"
82
+                    :value="item">
83
+                </el-option>
84
+             </el-select>
85
+           </el-form-item>
88 86
         </template>
89 87
     </el-table-column>
90
-    <el-table-column label="商品类别" align="center" width="150px">
88
+    <el-table-column  align="center" width="150px">
89
+        <template slot="header" slot-scope="scope">
90
+            <span>商品类别</span>
91
+        </template>
91 92
         <template slot-scope="scope">
92 93
             <el-input v-model="scope.row.supply_type" style="width:120px" :disabled="true"></el-input>
93 94
         </template>
@@ -103,8 +104,13 @@
103 104
         </template>
104 105
     </el-table-column>
105 106
     <el-table-column label="数量" align="center" width="120px">
107
+        <template slot="header" slot-scope="scope">
108
+            <span>数量<span style="color: red">*</span></span>
109
+        </template>
106 110
         <template slot-scope="scope">
107
-        <el-input v-model="scope.row.supply_count" style="width:80px"></el-input>
111
+          <el-form-item  :prop="'tableList.' + scope.$index + '.supply_count'" :rules='tableRules.supply_count'>
112
+             <el-input v-model="scope.row.supply_count" style="width:80px"></el-input>
113
+          </el-form-item>
108 114
         </template>
109 115
     </el-table-column>
110 116
 
@@ -119,13 +125,13 @@
119 125
           {{calculate(scope.row.supply_count * scope.row.supply_price)}}
120 126
         </template>
121 127
     </el-table-column>
122
-    
128
+
123 129
     <el-table-column label="生产厂商" align="center" width="200px">
124 130
         <template slot-scope="scope">
125 131
         <el-input v-model="scope.row.supply_manufacturer" style="width:160px" :disabled="true"></el-input>
126 132
         </template>
127 133
     </el-table-column>
128
-    
134
+
129 135
 
130 136
     <el-table-column label="批准文号" align="center" width="200px">
131 137
         <template slot-scope="scope">
@@ -161,15 +167,24 @@
161 167
         </template>
162 168
     </el-table-column>
163 169
   </el-table>
164
-    
170
+</el-form>
171
+   <div style="margin-top:10px">
172
+      合计:{{getAllPrice()}} 元
173
+   </div>
174
+   <div style="margin-top:10px">
175
+        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession"></el-input>%</span>
176
+
177
+        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount"></el-input></span>
178
+
179
+    </div>
165 180
 </div>
166 181
 </div>
167 182
 </template>
168 183
 
169 184
 <script>
170 185
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
171
-
172
-import {getInitOrder} from "@/api/supply"
186
+import {uParseTime } from '@/utils/tools'
187
+import {getInitOrder,savePurchaseOrder,updatePurchaseOrder} from "@/api/supply"
173 188
 export default {
174 189
 name: "addPurchaseOrder",
175 190
 created() {
@@ -193,9 +208,14 @@ BreadCrumb
193 208
 data() {
194 209
 return {
195 210
     crumbs: [
196
-    { path: false, name: "购货订单" },
197
-    { path: "/spply/query", name: "新增购货订单" }
211
+       { path: false, name: "购货订单" },
212
+       { path: "/spply/query", name: "新增购货订单" }
198 213
     ],
214
+    showTwo:true,
215
+    showOne:false,
216
+    recordInfo: {
217
+      tableList:[],
218
+    },
199 219
     keywords: "",
200 220
     total: 0,
201 221
     multipleSelection: [],
@@ -208,7 +228,6 @@ return {
208 228
     goodInfo: [],
209 229
     org_id:0,
210 230
     types:[],
211
-    tableList:[],
212 231
     tyep_name:"",
213 232
     form:{
214 233
     manufacturer_id:"",
@@ -220,9 +239,24 @@ return {
220 239
     drugTypeList:[],
221 240
     supplier_name:"",
222 241
     supplyList:[],
223
-};
242
+    rate_of_concession:"",
243
+    discount_amount:"",
244
+    start_time:new Date(),
245
+    end_time:new Date(),
246
+    tableRules: {
247
+     name: [{ required: true, message: '商品不能为空', trigger: 'blur' }],
248
+     supply_count: [{ required: true, message: '数量不能为空', trigger: 'blur' }],
249
+   },
250
+   warehousing_id:0,
251
+   number:"",
252
+   loading:false,
253
+   drugList:[],
254
+   goodList:[],
255
+   id:0,
256
+  };
224 257
 },
225 258
 methods:{
259
+
226 260
 getInitOrder(){
227 261
     getInitOrder().then(response=>{
228 262
     if(response.data.state == 1){
@@ -234,12 +268,12 @@ getInitOrder(){
234 268
        for(let i=0;i<drugList.length;i++){
235 269
           for(let z=0;z<drugList[i].drug_warehouse_info.length;z++){
236 270
             drugList[i].drug_warehouse_info[z].stock_max_number = drugList[i].drug_warehouse_info[z].stock_max_number * drugList[i].min_number
237
-          }   
271
+          }
238 272
         for(let j=0;j<this.manufactuerList.length;j++){
239 273
             if(drugList[i].manufacturer == this.manufactuerList[j].id){
240 274
                 drugList[i].manufacturer = this.manufactuerList[j].manufacturer_name
241 275
             }
242
-        }  
276
+        }
243 277
         for(let y=0;y<this.drugTypeList.length;y++){
244 278
             if(drugList[i].drug_type == this.drugTypeList[y].value){
245 279
             drugList[i].drug_type = this.drugTypeList[y].name
@@ -260,19 +294,19 @@ getInitOrder(){
260 294
 
261 295
         this.tabList.push(drugList[i])
262 296
         }
263
-        
297
+        this.drugList = drugList
264 298
         var goodList =  response.data.data.goodList
265 299
         for(let i=0;i<goodList.length;i++){
266 300
         for(let j=0;j<this.manufactuerList.length;j++){
267 301
             if(goodList[i].manufacturer == this.manufactuerList[j].id){
268 302
                 goodList[i].manufacturer = this.manufactuerList[j].manufacturer_name
269 303
             }
270
-        }   
304
+        }
271 305
         for(let y=0;y<this.goodTypeList.length;y++){
272 306
             if(goodList[i].good_type_id == this.goodTypeList[y].id){
273 307
                 goodList[i].good_type_id = this.goodTypeList[y].type_name
274 308
             }
275
-        } 
309
+        }
276 310
         goodList[i].supply_name = goodList[i].good_name + " " + goodList[i].specification_name + " " +goodList[i].manufacturer
277 311
         goodList[i].supply_type = goodList[i].good_type_id
278 312
         goodList[i].supply_specification_name =goodList[i].specification_name
@@ -283,39 +317,45 @@ getInitOrder(){
283 317
         goodList[i].supply_manufacturer = goodList[i].manufacturer
284 318
         goodList[i].supply_license_number = ""
285 319
         goodList[i].supply_remake = ""
286
-        goodList[i].type = 2   
320
+        goodList[i].type = 2
287 321
         goodList[i].name = goodList[i].good_name
288 322
 
289
-        this.tabList.push(goodList[i]) 
323
+        this.tabList.push(goodList[i])
290 324
         }
291
-    }
292
-    })  
325
+        this.goodList = goodList
326
+    } 
327
+    })
293 328
 },
294 329
 changeGoodName(val){
295
-    console.log("9媚23323232",val)  
296
-    this.currentIndex = val
330
+  this.currentIndex = val
297 331
 },
298 332
 changeName(val){
299
-    console.log("val23322323",val)
300
-    
301
-    for(let i=0;i<this.tableList.length;i++){
333
+    //var obj = {"id":0,"name":"合计","supply_name":"","supply_type":"","supply_specification_name":"","supply_total":"","supply_count":"","supply_price":"","supply_total_price":"","supply_manufacturer":"","supply_license_number":"","supply_remake":"","is_total":2}
334
+   for(let i=0;i<this.recordInfo.tableList.length;i++){
302 335
     if(this.currentIndex == i){
303
-        this.tableList[i].id = val.id
304
-        this.tableList[i].type = val.type
305
-        this.tableList[i].name = val.name
306
-        this.tableList[i].supply_name = val.supply_name
307
-        this.tableList[i].supply_type = val.supply_type
308
-        this.tableList[i].supply_specification_name = val.supply_specification_name
309
-        this.tableList[i].supply_total = val.supply_total
310
-        this.tableList[i].supply_count = val.supply_count
311
-        this.tableList[i].supply_price = val.supply_price
312
-        this.tableList[i].supply_total_price = val.supply_total_price
313
-        this.tableList[i].supply_manufacturer = val.supply_manufacturer
314
-        this.tableList[i].supply_license_number = val.supply_license_number
315
-        this.tableList[i].supply_remake = val.supply_remake
316
-    }
336
+        this.recordInfo.tableList[i].id = val.id
337
+        this.recordInfo.tableList[i].type = val.type
338
+        this.recordInfo.tableList[i].name = val.name
339
+        this.recordInfo.tableList[i].supply_name = val.supply_name
340
+        this.recordInfo.tableList[i].supply_type = val.supply_type
341
+        this.recordInfo.tableList[i].supply_specification_name = val.supply_specification_name
342
+        this.recordInfo.tableList[i].supply_total = val.supply_total
343
+        if(val.supply_count == NaN){
344
+           this.recordInfo.tableList[i].supply_count = ""
345
+        }else{
346
+          this.recordInfo.tableList[i].supply_count = val.supply_count?val.supply_count:""
347
+        }
348
+
349
+        this.recordInfo.tableList[i].supply_price = val.supply_price?val.supply_price:""
350
+        this.recordInfo.tableList[i].supply_total_price = val.supply_total_price?val.supply_total_price:""
351
+        this.recordInfo.tableList[i].supply_manufacturer = val.supply_manufacturer
352
+        this.recordInfo.tableList[i].supply_license_number = val.supply_license_number
353
+        this.recordInfo.tableList[i].supply_remake = val.supply_remake
354
+        this.recordInfo.tableList[i].is_total = val.is_total
355
+     }
317 356
     }
318
-    console.log("表哥332322332232323",this.tableList)
357
+   
358
+
319 359
 },
320 360
 handleEdit(){
321 361
     const tempObj = {}
@@ -324,31 +364,99 @@ handleEdit(){
324 364
     tempObj['supply_name'] = ""
325 365
     tempObj['supply_type'] = ""
326 366
     tempObj['supply_specification_name'] = ''
327
-    tempObj['supply_total'] = ''
328
-    tempObj['supply_count'] = ''
329
-    tempObj['supply_price'] = ''
330
-    tempObj['supply_total_price'] = ''
367
+    tempObj['supply_total'] = ""
368
+    tempObj['supply_count'] = ""
369
+    tempObj['supply_price'] = ""
370
+    tempObj['supply_total_price'] = ""
331 371
     tempObj['supply_manufacturer'] = ''
332 372
     tempObj['supply_license_number'] = ''
333 373
     tempObj['supply_remake'] = ''
334 374
     tempObj['type'] = 0
335
-    this.tableList.push(tempObj)  
375
+    tempObj['is_total'] = 1
376
+    this.recordInfo.tableList.push(tempObj)
336 377
 },
337 378
 handleDelete: function(index, row) {
338
-  if (this.tableList.length <= 1) {
379
+  if (this.recordInfo.tableList.length <= 1) {
339 380
         this.$message.error('只有一条记录的时候无法删除')
340 381
         return
341 382
    } else {
342
-        this.tableList.splice(index, 1)
383
+        this.recordInfo.tableList.splice(index, 1)
343 384
    }
344 385
 },
386
+
387
+
345 388
 savePurchaseOrder(){
346
-    console.log("param323322332",this.tableList)
347
-    savePurchaseOrder().then(response=>{
389
+    this.loading = true
390
+    if(this.supplier_name == 0 || this.supplier_name == ""){
391
+       this.$message.error("供应商不能为空!")
392
+       return false
393
+    }
394
+    this.$refs["tableForm"].validate((valid)=>{
395
+      if(valid){
396
+        for(let i=0;i<this.recordInfo.tableList.length;i++){
397
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
398
+            this.recordInfo.tableList[i].supply_license_number = this.recordInfo.tableList[i].supply_license_number.toString()
399
+            this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count * this.recordInfo.tableList[i].supply_price).toString()
400
+            for(let j=0;j<this.manufactuerList.length;j++){
401
+                if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
402
+                this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
403
+                }
404
+
405
+            }
406
+        }
407
+        var start = this.getTimes(this.start_time)
408
+        var end = this.getTimes(this.end_time)
409
+         const params = {
410
+            'stockIn': this.recordInfo.tableList
411
+         }
412
+       
413
+        savePurchaseOrder(params,this.supplier_name,start,end,this.rate_of_concession,this.discount_amount).then(response=>{
414
+            if(response.data.state == 1){
415
+                var order =  response.data.data.order
416
+                this.loading = false
417
+                this.$message.success("保存成功!")
418
+                var warehouseInfo = response.data.data.warehouseInfo
419
+                this.number  = warehouseInfo.number
420
+                this.id = warehouseInfo.id
421
+                this.recordInfo.tableList = []
422
+                var orderInfo = response.data.data.orderInfo
423
+                for(let i=0;i<orderInfo.length;i++){
424
+                  orderInfo[i].supply_count = orderInfo[i].count
425
+                  orderInfo[i].supply_price = orderInfo[i].price
426
+                  orderInfo[i].supply_remake = orderInfo[i].remark
427
+                }
428
+                console.log("orderINFO23323232",orderInfo)
429
+                this.recordInfo.tableList = orderInfo
430
+                // for(let i=0;i<orderInfo.length;i++){
431
+                //    orderInfo[i].name = "" 
432
+                //    orderInfo[i].supply_name = ""
433
+                //    orderInfo[i].supply_specification_name = ""
434
+                //   if(orderInfo[i].is_source == 1){
435
+                //     for(let j=0;j<this.drugList.length;j++){
436
+                //        if(orderInfo[i].project_id == this.drugList[j].id){
437
+                //           orderInfo[i].name = this.drugList[j].drug_name
438
+                //        }
439
+                //     }
440
+                //   }
441
+                //   if(orderInfo[i].is_source == 2){
442
+                //     for(let y=0;y<this.goodList.length;y++){
443
+                //        if(orderInfo[i].project_id = this.goodList[y].id){
444
+                //           orderInfo[i].name = this.goodList[y].good_name
445
+                //        }
446
+                //     }
447
+                //   }
448
+                // }
449
+                this.showTwo = false
450
+                this.showOne = true
451
+            }
452
+        })
453
+      }
454
+
455
+   })
348 456
 
349
-    })  
350 457
 },
351 458
 
459
+
352 460
 changeTypeName(){
353 461
 
354 462
 },
@@ -359,7 +467,7 @@ endTimeChange(){
359 467
 
360 468
 },
361 469
 search(){
362
-    
470
+
363 471
 },
364 472
 
365 473
 getWarehoseInfo(arr,max_unit,min_unit,min_number){
@@ -387,7 +495,7 @@ getWarehoseInfo(arr,max_unit,min_unit,min_number){
387 495
     }
388 496
   }
389 497
  return max_str + min_str
390
- }, 
498
+ },
391 499
 getTotalStockCount(arr){
392 500
   var total_count = 0
393 501
   for(let i=0;i<arr.length;i++){
@@ -404,6 +512,47 @@ calculate: function(val) {
404 512
     }
405 513
     return Math.round(parseFloat(val) * 100) / 100;
406 514
   },
515
+getTimes(time) {
516
+    if (time === '') {
517
+    return ''
518
+    }
519
+    return uParseTime(time, '{y}-{m}-{d}')
520
+},
521
+ updatePurchaseOrder(){
522
+   this.$refs.validate((valid)=>{
523
+      if(valid){
524
+        for(let i=0;i<this.recordInfo.tableList.length;i++){
525
+           this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
526
+           this.recordInfo.tableList[i].supply_license_number = this.recordInfo.tableList[i].supply_license_number.toString()
527
+           this.recordInfo.tableList[i].supply_total_price = (this.recordInfo.tableList[i].supply_count * this.recordInfo.tableList[i].supply_price).toString()
528
+           for(let j=0;j<this.manufactuerList.length;j++){
529
+              if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
530
+                this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
531
+              }
532
+           }
533
+        }
534
+        var start = this.getTimes(this.start_time)
535
+        var end = this.getTimes(this.end_time)
536
+         const params = {
537
+            'stockIn': this.recordInfo.tableList
538
+         }
539
+        updatePurchaseOrder(params,this.supplier_name,start,end,this.rate_of_concession,this.discount_amount,this.id,this.number).then(response=>{
540
+           if(response.data.state == 1){
541
+             var warehousingInfo =  response.data.data.warehousingInfo
542
+             this.$message.success("修改成功!")
543
+           }
544
+        })
545
+      } 
546
+   })
547
+ },
548
+ getAllPrice(){
549
+   console.log("表哥2332323223323223",this.recordInfo.tableList)  
550
+   var total_price = 0
551
+   for(let i=0;i<this.recordInfo.tableList.length;i++){
552
+      total_price += (this.recordInfo.tableList[i].supply_price * this.recordInfo.tableList[i].supply_count)
553
+   }  
554
+   return total_price.toFixed(2)
555
+ }
407 556
 },
408 557
 created(){
409 558
     const tempObj = {}
@@ -412,16 +561,17 @@ created(){
412 561
     tempObj['supply_name'] = ""
413 562
     tempObj['supply_type'] = ""
414 563
     tempObj['supply_specification_name'] = ''
415
-    tempObj['supply_total'] = ''
416
-    tempObj['supply_count'] = ''
417
-    tempObj['supply_price'] = ''
418
-    tempObj['supply_total_price'] = ''
564
+    tempObj['supply_total'] = ""
565
+    tempObj['supply_count'] = ""
566
+    tempObj['supply_price'] = ""
567
+    tempObj['supply_total_price'] = ""
419 568
     tempObj['supply_manufacturer'] = ''
420 569
     tempObj['supply_license_number'] = ''
421 570
     tempObj['supply_remake'] = ''
422 571
     tempObj['type'] = 0
423
-    this.tableList.push(tempObj)  
424
-    this.getInitOrder()  
572
+    tempObj['is_total'] = 1
573
+    this.recordInfo.tableList.push(tempObj)
574
+    this.getInitOrder()
425 575
 }
426 576
 };
427 577
 </script>
@@ -478,7 +628,7 @@ background-color: #d0d3da;
478 628
 }
479 629
 .el-table__fixed-right{
480 630
   width:150px;
481
-  bottom: 20px; 
482
-  height: 200px; 
631
+  bottom: 20px;
632
+  height: 200px;
483 633
 }
484 634
 </style>

+ 144 - 43
src/xt_pages/supply/purchaseOrderQuery.vue View File

@@ -6,15 +6,7 @@
6 6
     <div class="app-container ">
7 7
       <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
8 8
         <div>
9
-          <el-select v-model="type_name" style="width:140px;margin-right:10px;" placeholder="请选择"
10
-          @change="changeTypeName">
11
-            <el-option
12
-              v-for="item in types"
13
-              :key="item.id"
14
-              :label="item.type_name"
15
-              :value="item.id">
16
-            </el-option>
17
-          </el-select>
9
+        
18 10
           <el-date-picker
19 11
             size="small"
20 12
             v-model="start_time"
@@ -41,12 +33,22 @@
41 33
               value-format="yyyy-MM-dd"
42 34
               @change="endTimeChange"
43 35
           ></el-date-picker>
36
+          <span>审核状态:</span>
37
+           <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
38
+            @change="changeTypeName">
39
+            <el-option
40
+                v-for="item in checkList"
41
+                :key="item.id"
42
+                :label="item.name"
43
+                :value="item.id">
44
+            </el-option>
45
+          </el-select>
44 46
           <el-input
45 47
             size="small"
46 48
             style="width: 200px;margin-left:10px;"
47 49
             class="filter-item"
48 50
             v-model.trim="keywords"
49
-            placeholder="耗材名称"
51
+            placeholder="订单编号或供应商名称"
50 52
           />
51 53
           <el-button
52 54
             size="small"
@@ -75,17 +77,17 @@
75 77
       >
76 78
         <el-table-column label="订单日期" align="center">
77 79
           <template slot-scope="scope">
78
-            <span></span>
80
+            <span>{{getTimes(scope.row.document_date)}}</span>
79 81
          </template>
80 82
         </el-table-column>
81 83
         <el-table-column label="订单编号" align="center">
82 84
           <template slot-scope="scope">
83
-          
85
+            <span>{{scope.row.number}}</span>
84 86
           </template>
85 87
         </el-table-column>
86 88
         <el-table-column label="供应商" align="center">
87 89
             <template slot-scope="scope">
88
-              <span></span>
90
+              <span>{{getName(scope.row.supplier_id)}}</span>
89 91
             </template>
90 92
          </el-table-column>
91 93
         <el-table-column label="关联购货订单" align="center">
@@ -95,39 +97,39 @@
95 97
         </el-table-column>
96 98
         <el-table-column label="购物金额" align="center">
97 99
           <template slot-scope="scope">
98
-           
100
+             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
99 101
           </template>
100 102
         </el-table-column>
101 103
 
102 104
        <el-table-column label="数量" align="center">
103 105
          <template slot-scope="scope">
104
-           
106
+           {{getAllCount(scope.row.orderInfo)}}
105 107
          </template>
106 108
        </el-table-column>
107 109
 
108 110
        <el-table-column label="订单状态" align="center">
109 111
          <template slot-scope="scope">
110
-         
111
-        
112
+           <span v-if="scope.row.is_check == 2">未审核</span>
113
+           <span v-if="scope.row.is_check == 1">已审核</span>
112 114
          </template>
113 115
        </el-table-column>
114 116
       
115 117
         <el-table-column label="交货日期" align="center">
116 118
          <template slot-scope="scope">
117
-         
119
+           {{getTimes(scope.row.delivery_date)}}
118 120
          </template>
119 121
        </el-table-column>
120 122
         
121 123
     
122 124
       <el-table-column label="制单人" align="center">
123 125
          <template slot-scope="scope">
124
-       
126
+          {{getDocName(scope.row.creater)}}
125 127
          </template>
126 128
        </el-table-column>
127 129
 
128 130
       <el-table-column label="审核人" align="center">
129 131
          <template slot-scope="scope">
130
-       
132
+          {{getDocName(scope.row.checker)}}
131 133
          </template>
132 134
        </el-table-column>
133 135
 
@@ -161,35 +163,20 @@
161 163
       >
162 164
       </el-pagination>
163 165
 
164
-       <add-supply ref="addSupply"></add-supply>
165 166
     </div>
166 167
   </div>
167 168
 </template>
168 169
 
169 170
 <script>
170 171
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
171
-import addSupply from "./components/addSupply.vue"
172 172
 
173
+import {getAllSupply,getAllPurchaseOrderList} from "@/api/supply"
174
+import {uParseTime } from '@/utils/tools'
173 175
 export default {
174 176
   name: "stockIn",
175 177
    components: {
176
-     addSupply
178
+     
177 179
    },
178
-  created() {
179
-    this.org_id =  this.$store.getters.xt_user.org_id
180
-
181
-    var start_time =  window.sessionStorage.getItem('start_time')
182
-    var end_time =  window.sessionStorage.getItem('end_time')
183
-
184
-    if(start_time !=null){
185
-      this.start_time = start_time
186
-    }
187
-    if(end_time!=null){
188
-      this.end_time = end_time
189
-    }
190
-    window.sessionStorage.removeItem('start_time')
191
-    window.sessionStorage.removeItem('end_time')
192
-  },
193 180
   components: {
194 181
     BreadCrumb
195 182
   },
@@ -204,7 +191,7 @@ export default {
204 191
       multipleSelection: [],
205 192
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
206 193
       start_time: "",
207
-      end_time: "",
194
+      end_time:new Date(),
208 195
       page: 1,
209 196
       limit: 10,
210 197
       goodType: [],
@@ -212,15 +199,129 @@ export default {
212 199
       org_id:0,
213 200
       types:[],
214 201
       tableList:[],
215
-      tyep_name:"",
202
+      type_name:"",
203
+      checkList:[
204
+        {id:0,name:"请选择"},
205
+        {id:1,name:"已审核"},
206
+        {id:2,name:"未审核"},
207
+      ],
208
+      supplyList:[],
209
+      check_id:0,
210
+      doctorList:[],
216 211
     };
217 212
   },
218 213
   methods:{
219 214
      toAdd(){
220
-       console.log("res32323232323223",this.$refs)  
221
-       this.$refs.addSupply.show()  
215
+       this.$router.push({path:"/purchase/order/add"})
216
+     },
217
+     changeTypeName(){
218
+
219
+     },
220
+     startTimeChange(){
221
+
222
+     },
223
+     endTimeChange(){
224
+
225
+     },
226
+     search(){
227
+
228
+     },
229
+     handleSizeChange(val){
230
+       this.limit = val
231
+       this.getlist()
232
+     },
233
+     handleCurrentChange(val){
234
+       this.page = val
235
+       this.getlist()
236
+     },
237
+     getAllSupply(){
238
+       getAllSupply().then(response=>{
239
+         if(response.data.state == 1){
240
+            var supplyList = response.data.data.supplyList
241
+            this.doctorList = response.data.data.doctorList
242
+            for(let i=0;i<supplyList.length;i++){
243
+              this.supplyList.push(supplyList[i])
244
+            }
245
+         }
246
+       })
247
+     },
248
+     changeTypeName(){
249
+
250
+     },
251
+     getTimes(time) {
252
+      if (time === '') {
253
+      return ''
254
+      }
255
+      return uParseTime(time, '{y}-{m}-{d}')
256
+     },
257
+     getlist(){
258
+        var params = {
259
+          check_id:this.check_id,
260
+          start_time:this.getTimes(this.start_time),
261
+          end_time:this.getTimes(this.end_time),
262
+          keyword:this.keywords,
263
+          page:this.page,
264
+          limit:this.limit,
265
+        }
266
+       getAllPurchaseOrderList(params).then(response=>{
267
+          if(response.data.state == 1){
268
+            var list = response.data.data.list 
269
+            console.log("list2332232323232",list)
270
+            this.tableList = list
271
+            var total = response.data.data.total
272
+            this.total = total
273
+          }
274
+       })
275
+     },
276
+     getName(id){
277
+       var name = ""
278
+       for(let i=0;i<this.supplyList.length;i++){
279
+         if(id == this.supplyList[i].id){
280
+           name = this.supplyList[i].supplier_name
281
+         }
282
+       }
283
+       return name
284
+     },
285
+     getDocName(id){
286
+      var user_name = ""
287
+      for(let i=0;i<this.doctorList.length;i++){
288
+        if(id == this.doctorList[i].admin_user_id){
289
+          user_name = this.doctorList[i].user_name
290
+        }
291
+      }
292
+      return user_name
293
+     },
294
+     getAllBuyPrice(arr){
295
+       var buy_price = 0
296
+       if(arr!=undefined && arr.length > 0){
297
+          for(let i=0;i<arr.length;i++){
298
+            buy_price += (arr[i].count * arr[i].price)
299
+          }
300
+       }
301
+       return buy_price.toFixed(2)
302
+     },
303
+     getAllCount(arr){
304
+       var count = ""
305
+        if(arr!=undefined && arr.length > 0){
306
+          for(let i=0;i<arr.length;i++){
307
+            count += arr[i].count
308
+          }
309
+       }
310
+       return count
222 311
      } 
223
-  }
312
+  },
313
+  created() {
314
+    var now = new Date(); //当前日期 
315
+    var nowMonth = now.getMonth(); //当前月 
316
+    var nowYear = now.getFullYear(); //当前年 
317
+    //本月的开始时间
318
+    var monthStartDate = new Date(nowYear, nowMonth, 1); 
319
+    this.start_time = monthStartDate
320
+    this.org_id =  this.$store.getters.xt_user.org_id
321
+    this.getAllSupply()
322
+    this.getlist()
323
+  },
324
+ 
224 325
 };
225 326
 </script>
226 327
 

+ 22 - 4
src/xt_pages/supply/supplyQuery.vue View File

@@ -103,7 +103,7 @@
103 103
            
104 104
          </template>
105 105
        </el-table-column>
106
-       <el-table-column label="开户银行" align="center" v-if="showOne">
106
+       <el-table-column label="开户银行" align="center">
107 107
          <template slot-scope="scope">
108 108
          
109 109
           </span>
@@ -111,14 +111,14 @@
111 111
          </template>
112 112
        </el-table-column>
113 113
       
114
-        <el-table-column label="纳税人识别号" align="center" v-if="showThree">
114
+        <el-table-column label="纳税人识别号" align="center" >
115 115
          <template slot-scope="scope">
116 116
          
117 117
          </template>
118 118
        </el-table-column>
119 119
         
120 120
     
121
-      <el-table-column label="手机" align="center" v-if="showFour">
121
+      <el-table-column label="手机" align="center">
122 122
          <template slot-scope="scope">
123 123
        
124 124
          </template>
@@ -214,7 +214,25 @@ export default {
214 214
      toAdd(){
215 215
        console.log("res32323232323223",this.$refs)  
216 216
        this.$refs.addSupply.show()  
217
-     } 
217
+     },
218
+      changeTypeName(){
219
+
220
+     }, 
221
+     startTimeChange(){
222
+
223
+     },
224
+     endTimeChange(){
225
+
226
+     },
227
+     search(){
228
+
229
+     },
230
+     handleSizeChange(){
231
+
232
+     },
233
+     handleCurrentChange(){
234
+       
235
+     }
218 236
   }
219 237
 };
220 238
 </script>

+ 49 - 3
src/xt_pages/workforce/components/tableData.vue View File

@@ -86,8 +86,37 @@
86 86
           </template>
87 87
         </el-table-column>
88 88
         <el-table-column label="操作" align="center" width="300">
89
+          
90
+           <template slot-scope="scope">
91
+            <span v-if="now_time>scope.row.schedule_date">
92
+              <el-button
93
+                size="mini"
94
+                type="primary"
95
+                :disable="true"
96
+              >
97
+                取消排班
98
+              </el-button>
99
+              <el-button
100
+                size="mini"
101
+                type="primary"
102
+                :disable="true"
103
+              >
104
+                调整机号
105
+              </el-button>
106
+              <el-button
107
+                size="mini"
108
+                type="primary"
109
+              :disable="true"
110
+              >
111
+                调整模式
112
+              </el-button>
113
+           </span>
114
+          </template>
115
+         
116
+         
89 117
           <template slot-scope="scope">
90
-            <el-button
118
+            <span v-if="now_time <=scope.row.schedule_date">
119
+              <el-button
91 120
               size="mini"
92 121
               type="primary"
93 122
               @click="CancelSchedule(scope.row.id)"
@@ -108,6 +137,8 @@
108 137
             >
109 138
               调整模式
110 139
             </el-button>
140
+            </span>
141
+           
111 142
           </template>
112 143
         </el-table-column>
113 144
       </el-table>
@@ -774,7 +805,8 @@ export default {
774 805
       },
775 806
       zoneIdList:[],
776 807
       strArr:"",
777
-      patient_id_hover:0
808
+      patient_id_hover:0,
809
+      now_time:"",
778 810
     };
779 811
   },
780 812
 
@@ -2307,7 +2339,21 @@ export default {
2307 2339
   //    this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
2308 2340
   // },
2309 2341
   created() {
2310
-    
2342
+    var date = new Date()
2343
+    this.time = date
2344
+    var year = date.getFullYear()
2345
+    var month = date.getMonth() + 1
2346
+    if (month < 10) {
2347
+      month = "0" + month
2348
+    }
2349
+    var day = date.getDate()
2350
+    if (day < 10) {
2351
+      day = "0" + day
2352
+    }
2353
+    var nowDate = year + "-" + month + "-" + day
2354
+    var date = new Date(nowDate + " 00:00:00")
2355
+    console.log("date23232323232323",date.getTime()/1000) 
2356
+    this.now_time = date.getTime()/1000
2311 2357
     this.getAllZones()
2312 2358
  
2313 2359
     this.changeScheduleType(1)