XMLWAN vor 4 Jahren
Ursprung
Commit
a50bb49227

+ 2 - 2
config/dev.env.js Datei anzeigen

@@ -7,8 +7,8 @@ module.exports = {
7 7
   NODE_ENV: '"development"',
8 8
   ENV_CONFIG: '"dev"',
9 9
   //BASE_API: '"http://new_mobile.xt.api.sgjyun.com"', // //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  // BASE_API: '"http://api.xt.test.sgjyun.com"',
11
-  BASE_API: '"http://localhost:9531"',
10
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11
+  // BASE_API: '"http://localhost:9531"',
12 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
13 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
14 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 8 - 0
src/api/schedule.js Datei anzeigen

@@ -142,4 +142,12 @@ export function getAllZones(params){
142 142
     method:"get",
143 143
     params:params
144 144
   })
145
+}
146
+
147
+export function copyPatientSchedule(params){
148
+  return request({
149
+    url:"/api/schedule/copypatientschedules",
150
+    method:"Get",
151
+    params:params
152
+  })
145 153
 }

+ 3 - 3
src/xt_pages/data/components/consumables.vue Datei anzeigen

@@ -286,12 +286,12 @@
286 286
               this.goodInfo.goodInfoDialog.formValue.good_unit =
287 287
                 response.data.data.goodInfo.good_unit
288 288
             }
289
-
289
+           
290 290
             if (response.data.data.goodInfo.manufacturer <= 0) {
291 291
               this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
292 292
             } else {
293
-              this.goodInfo.goodInfoDialog.formValue.manufacturer =
294
-                response.data.data.goodInfo.manufacturer
293
+              this.goodInfo.goodInfoDialog.formValue.manufacturer = response.data.data.goodInfo.manufacturer
294
+             
295 295
             }
296 296
 
297 297
             if (response.data.data.goodInfo.dealer <= 0) {

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderTwentyFour.vue Datei anzeigen

@@ -874,7 +874,7 @@
874 874
             <td style="line-height:20px;" width="40">钠<br />浓<br />度<br /><span style="font-size:10px; !important">mmol/L</span></td>
875 875
             <td style="line-height:20px;" width="40">电<br />导<br />度<br /><span style="font-size:10px; !important">ms/cm</span></td>
876 876
             
877
-            <td style="line-height:20px;" width="60">透析液<br />温度<br /><span style="font-size:10px; !important">ml</span></td>
877
+            <td style="line-height:20px;" width="60">透析液<br />温度<br /><span style="font-size:10px; !important"></span></td>
878 878
             <td style="line-height:20px;" width="">病情变化及处理</td>
879 879
             <td style="line-height:20px;" width="60">签名</td>
880 880
           </tr>

+ 1 - 0
src/xt_pages/medicalScheduling/index.vue Datei anzeigen

@@ -1794,6 +1794,7 @@ export default {
1794 1794
                 start_time:this.getTimestamp(this.weekDayArr[0]),
1795 1795
                 end_time:this.getTimestamp(this.weekDayArr[6])
1796 1796
             }
1797
+           
1797 1798
             copyStaffSchedule(params).then(response=>{
1798 1799
                 if(response.data.state == 1){
1799 1800
                 var msg =  response.data.data.msg

+ 6 - 5
src/xt_pages/stock/Dialog/goodInfoDailog.vue Datei anzeigen

@@ -54,19 +54,19 @@
54 54
               <el-input v-model="form.specification_name" placeholder="" maxlength="30"></el-input>
55 55
             </el-form-item>
56 56
             <el-form-item label="生产厂商 : " prop="manufacturer" style="width:100%">
57
-              <!-- <el-select v-model="form.manufacturer" style="width:100%" placeholder="请选择">
57
+              <!-- <el-select v-model="form.manufacturer" style="width:100%" placeholder="请选择" filterable>
58 58
                 <el-option
59
-                  v-for="item,index in form.manufacturers"
59
+                  v-for="(item,index) in form.manufacturers"
60 60
                   :key="index"
61 61
                   :label="item.manufacturer_name"
62 62
                   :value="item.id">
63 63
                 </el-option>
64 64
               </el-select> -->
65 65
 
66
-               <el-select v-model="form.manufacturer" style="width:160px;" filterable placeholder="请选择">
66
+               <el-select v-model="form.manufacturer" style="width:100%;" filterable placeholder="请选择">
67 67
                   <el-option
68
-                    v-for="item in manufacturerList"
69
-                    :key="item.id"
68
+                    v-for="(item,index) in form.manufacturers"
69
+                    :key="index"
70 70
                     :label="item.manufacturer_name"
71 71
                     :value="item.id">
72 72
                   </el-option>
@@ -427,6 +427,7 @@
427 427
         })
428 428
       },
429 429
       getValue: function() {
430
+        console.log("生产吃",this.form.manufacturer)
430 431
         const form = {}
431 432
         form['specification_name'] = this.form.specification_name
432 433
         form['good_unit'] = this.form.good_unit

+ 11 - 3
src/xt_pages/stock/Dialog/stockInDialog.vue Datei anzeigen

@@ -49,6 +49,12 @@
49 49
             type="selection"
50 50
             width="55">
51 51
           </el-table-column>
52
+           <el-table-column
53
+            align="center"
54
+            label="耗材名称"
55
+            property="good_name"
56
+            style="word-break: keep-all;white-space:nowrap;"
57
+          ></el-table-column>
52 58
           <el-table-column
53 59
             align="center"
54 60
             label="规格名称"
@@ -136,7 +142,7 @@
136 142
         }
137 143
       },
138 144
        goodTypeTableChange: function(currentRow, oldCurrentRow) {
139
-        
145
+        console.log("currentRow2233333",currentRow)
140 146
         let keyName = ""
141 147
         var arr = []
142 148
         for(let i= 0;i<this.propForm.goods.length;i++){
@@ -149,12 +155,14 @@
149 155
         }
150 156
         this.currentGoodTypeId = parseInt(keyName)
151 157
         this.goodInfoTableData = arr[keyName]
158
+        
152 159
         for(let i=0;i<arr.length;i++){
153 160
           for(var key in arr[i]){
154 161
               this.goodInfo = arr[i][keyName]
155 162
               this.goodInfoTableData = arr[i][keyName]
156 163
           }
157
-         }
164
+        }
165
+        console.log("22222222哈哈哈哈哈哈哈哈哈",this.goodInfoTableData)
158 166
        },
159 167
       cancle: function(formName) {
160 168
         this.goodInfo = []
@@ -236,7 +244,7 @@
236 244
       changeGoodInfoTableData: function(val) {
237 245
       },
238 246
       changeAllGoodInfoTableData: function(selection) {
239
-        console.log("888878888888",this.propForm.goods)
247
+        console.log("888878888888",selection)
240 248
         var arr = []
241 249
         var id = 0
242 250
          for(let i=0;i<this.propForm.goods.length;i++){

+ 15 - 3
src/xt_pages/stock/stockInOrderAdd.vue Datei anzeigen

@@ -58,13 +58,13 @@
58 58
                   style="width: 100%"
59 59
                   max-height="450" :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
60 60
         >
61
-
61
+      
62 62
           <el-table-column align="center" width="200">
63
-
63
+            
64 64
             <template slot="header" slot-scope="scope">
65 65
               <span>耗材类型<span style="color: red">*</span></span>
66 66
             </template>
67
-
67
+     
68 68
             <template slot-scope="scope">
69 69
               <el-form-item style="padding-top: 15px;margin-left: 10px;margin-right: 10px">
70 70
                 <el-input placeholder="请输入耗材类型" v-model="scope.row.good_type_id"
@@ -74,6 +74,15 @@
74 74
             </template>
75 75
           </el-table-column>
76 76
           <el-table-column align="center" width="200">
77
+             <template slot="header" slot-scope="scope">
78
+              <span>耗材名称</span>
79
+            </template>
80
+            <template slot-scope="scope">
81
+               <el-input v-model="scope.row.good_name" :disabled="true"></el-input>
82
+            </template>
83
+          </el-table-column>
84
+          <el-table-column align="center" width="200">
85
+            
77 86
             <template slot="header" slot-scope="scope">
78 87
               <span>规格名称<span style="color: red">*</span></span>
79 88
             </template>
@@ -373,6 +382,7 @@
373 382
               this.recordInfo.recordData[this.currentIndex].good_id = val.selectedGoodInfo[i].id
374 383
               this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].buy_price.toString()
375 384
               this.recordInfo.recordData[this.currentIndex].good_unit = val.selectedGoodInfo[i].good_unit
385
+              this.recordInfo.recordData[this.currentIndex].good_name = val.selectedGoodInfo[i].good_name
376 386
             } else {
377 387
               const tempForm = {}
378 388
               tempForm['good_type_id'] =val.selectedGoodInfo[i].good_type_id
@@ -386,6 +396,7 @@
386 396
               tempForm['dealer'] = ''
387 397
               tempForm['manufacturer'] = ''
388 398
               tempForm['good_unit'] = val.selectedGoodInfo[i].good_unit
399
+              tempForm['good_name'] = val.selectedGoodInfo[i].good_name
389 400
               this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
390 401
             }
391 402
           }
@@ -501,6 +512,7 @@
501 512
             for (let i = 0; i < response.data.data.info.length; i++) {
502 513
               this.recordInfo.recordData.push(response.data.data.info[i])
503 514
             }
515
+            console.log("333333333",this.recordInfo.recordData)
504 516
           }
505 517
         })
506 518
       }, getTime(val, temp) {

+ 170 - 8
src/xt_pages/workforce/appointment.vue Datei anzeigen

@@ -84,8 +84,8 @@
84 84
           </el-button>
85 85
 
86 86
           <el-button type="primary" size="small" icon="el-icon-printer" @click="printScheduleAction">打印</el-button>
87
-          <el-button type="primary" size="small" icon="el-icon-setting" @click="setScheduleTemplateAction">排班模板
88
-          </el-button>
87
+          <el-button type="primary" size="small" icon="el-icon-setting" @click="setScheduleTemplateAction">排班模板</el-button>
88
+          <el-button type="primary" size="small" @click="copySchedule">复制排班</el-button>
89 89
         </div>
90 90
     </div>
91 91
     <div class="app-container">
@@ -122,6 +122,27 @@
122 122
 
123 123
       <table-data :week-time="activeName" :partitions-prop="partitions" :schedule-zone-row-prop="scheduleZoneRow"
124 124
                   :schedule-zone-prop="scheduleZone" title="" @event1="changePartition" @event2="changeSchedule"></table-data>
125
+
126
+
127
+       <el-dialog title="复制排班" width="600px" :visible.sync="newVisible">
128
+            <el-form :model="form"  ref="form" label-width="90px" :rules="rules">
129
+                <el-form-item label="复制到 : " required  prop="copyWeek">
130
+                    <el-select v-model="form.copyWeek" placeholder="请选择">
131
+                        <el-option
132
+                        v-for="item in typeOptions"
133
+                        :key="item.value"
134
+                        :label="item.label"
135
+                        :value="item.value">
136
+                        </el-option>
137
+                    </el-select>
138
+                </el-form-item>
139
+
140
+            </el-form>
141
+            <div slot="footer" class="dialog-footer">
142
+                <el-button @click="newVisible=false">取 消</el-button>
143
+                <el-button type="primary" @click="submitAction('form')">保 存</el-button>
144
+            </div>
145
+      </el-dialog>            
125 146
     </div>
126 147
   </div>
127 148
 </template>
@@ -130,7 +151,7 @@
130 151
   import moment from 'moment'
131 152
   import { parseTime } from '@/utils'
132 153
   import tableData from './components/tableData'
133
-  import { exportSchedule, getWeekPanels, initDate,getThreeWeekList } from '@/api/schedule'
154
+  import { exportSchedule, getWeekPanels, initDate,getThreeWeekList,copyPatientSchedule } from '@/api/schedule'
134 155
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
135 156
   import UploadExcel from '@/xt_pages/components/UploadExcel'
136 157
   import ScheduleUploadExcel from './components/scheduleUploadExcel/index'
@@ -169,7 +190,25 @@
169 190
         partition_id:0,
170 191
         start_time:"",
171 192
         end_time:"",
172
-        export_type:0
193
+        export_type:0,
194
+        form:{
195
+          copyWeek:"",
196
+        },
197
+        newVisible:false,
198
+        typeOptions:[],
199
+        timeOptions:[],
200
+        copyWeek:'',
201
+        weekList: [],
202
+        currentFirstDate1: '',
203
+        rules: {
204
+           copyWeek: [{ required: true, message: "请选择复制时间段", trigger: "blur" }],
205
+         },
206
+        weekNum:'',
207
+        weekDayArr:[],
208
+        todayDate:'',
209
+        clen:7,
210
+        nowYear: new Date().getFullYear(),
211
+        schedule_week:0,
173 212
       }
174 213
     },
175 214
     components: {
@@ -998,8 +1037,7 @@
998 1037
               return cur
999 1038
             }, []) // 设置cur默认类型为数组,并且初始值为空的数组
1000 1039
 
1001
-            console.log("长度11111111111",tempObjArr[i][key].length)
1002
-            console.log("长度22222222222",arr.length)
1040
+           
1003 1041
             if (tempObjArr[i][key].length > arr.length) {    //比对原数组和去重后的原数组总数,不同的话则存在重复元素
1004 1042
               is_exist_repeat = true
1005 1043
             }
@@ -1012,7 +1050,7 @@
1012 1050
 
1013 1051
 
1014 1052
         if (headers.length > 65 || !is_system_zone || !is_device_number) {
1015
-          console.log("ssssssszzzzzzzqqqqqqqq")
1053
+         
1016 1054
 
1017 1055
           this.dialogVisible = true
1018 1056
           return
@@ -2075,7 +2113,7 @@
2075 2113
 
2076 2114
               console.log("end",end)
2077 2115
               var scheduleList = response.data.data.list
2078
-              console.log("排班列表22222",scheduleList)
2116
+             
2079 2117
               var week= []
2080 2118
               var nextWeek = []
2081 2119
               var lastWeek = []
@@ -2447,8 +2485,101 @@
2447 2485
       getTime(val) {
2448 2486
         return uParseTime(val, '{y}-{m}-{d}')
2449 2487
       },
2488
+      
2489
+      copySchedule(){
2490
+        this.newVisible = true
2491
+      },
2450 2492
 
2493
+       getYearWeek(year,month,date){
2494
+        /*
2495
+            dateNow是当前日期
2496
+            dateFirst是当年第一天
2497
+            dataNumber是当前日期是今年第多少天
2498
+            用dataNumber + 当前年的第一天的周差距的和在除以7就是本年第几周
2499
+        */
2500
+        let dateNow = new Date(year, parseInt(month) - 1, date);
2501
+        let dateFirst = new Date(year, 0, 1);
2502
+        let dataNumber = Math.round((dateNow.valueOf() - dateFirst.valueOf()) / 86400000);
2503
+        return Math.ceil((dataNumber + ((dateFirst.getDay() + 1) - 1)) / 7);
2504
+        },
2505
+        getTimestamp(time) { //把时间日期转成时间戳
2506
+        return (new Date(time)).getTime() / 1000
2507
+      },
2451 2508
 
2509
+        formatDate(date){
2510
+            var year = date.getFullYear()+'.'
2511
+            var month = (date.getMonth()+1)+'.';
2512
+            var day = date.getDate();
2513
+            return year+month+day
2514
+        },
2515
+        formatDateTwo(date){
2516
+            var year = date.getFullYear()+'.'
2517
+            var month = (date.getMonth()+1)+'.';
2518
+            var day = date.getDate();
2519
+            return year+month+day
2520
+        },
2521
+        addDate(date,n){
2522
+            date.setDate(date.getDate()+n);
2523
+            return date;
2524
+        },
2525
+            //
2526
+        setDate(date){
2527
+            var week = date.getDay()-1;
2528
+            date = this.addDate(date,week*-1);
2529
+            this.currentFirstDate = new Date(date);
2530
+            this.currentDate = new Date(date)
2531
+            for(var i = 0;i<this.clen; i++){
2532
+                this.weekDayArr.push(this.formatDate(i==0 ? date : this.addDate(date,1)))
2533
+            }
2534
+        },
2535
+       setDate1 (date) {
2536
+            var week = date.getDay() - 1
2537
+            date = this.addDate(date, week * -1)
2538
+            this.currentDate = new Date(date)
2539
+            let arr1 = []
2540
+            for (var i = 0; i < this.clen; i++) {
2541
+                arr1.push(this.formatDate(i == 0 ? date : this.addDate(date, 1)))
2542
+            }
2543
+            this.weekList.push(arr1)
2544
+            let num = this.weekNum
2545
+            this.currentFirstDate1 = num + 1
2546
+        },
2547
+        getTimestamp(time) { //把时间日期转成时间戳
2548
+          return (new Date(time)).getTime() / 1000
2549
+        },
2550
+        submitAction(formName){
2551
+            var label = ""
2552
+            for(let i=0;i<this.timeOptions.length;i++){
2553
+               if(this.form.copyWeek == this.timeOptions[i].value){
2554
+                 label = this.timeOptions[i].label
2555
+               }
2556
+            }
2557
+           var start = label.split('~')
2558
+           var copy_startime = this.getTimestamp(start[0])
2559
+           var copy_endtime = this.getTimestamp(start[1])
2560
+
2561
+            const params = {
2562
+              start_time:this.getTimestamp(this.weekDayArr[0]),
2563
+              end_time:this.getTimestamp(this.weekDayArr[6]),
2564
+              copy_startime:copy_startime,
2565
+              copy_endtime:copy_endtime,
2566
+            }
2567
+           console.log("parasm",params)
2568
+        
2569
+           this.$refs[formName].validate(valid=>{
2570
+              if(valid){
2571
+                copyPatientSchedule(params).then(response=>{
2572
+                   if(response.data.state == 1){
2573
+                     var msg = response.data.data.msg
2574
+                     this.$message.success("复制成功")
2575
+                     this.newVisible = false
2576
+                   }else{
2577
+                    this.$message.error("复制失败")
2578
+                  }
2579
+                })
2580
+              }
2581
+           })
2582
+        },
2452 2583
     },
2453 2584
     created() {
2454 2585
      var start_time = moment().weekday(1).format('YYYY-MM-DD');
@@ -2460,6 +2591,37 @@
2460 2591
 
2461 2592
       //获取三周排班数据
2462 2593
       this.getThreeWeekList()
2594
+
2595
+
2596
+     let year = new Date().getFullYear()
2597
+     let month = new Date().getMonth() + 1
2598
+     let date = new Date().getDate()
2599
+     this.weekNum = this.getYearWeek(year,month,date)
2600
+     this.todayDate=this.formatDate(new Date())
2601
+     this.setDate(new Date())
2602
+
2603
+     for (var i = 0; i <= 9; i++) {
2604
+       this.setDate1(this.addDate(this.currentDate, 7))
2605
+     }
2606
+     let newNum = 0
2607
+     for(let i = 0; i < this.weekList.length; i++){
2608
+         if(this.weekNum + i + 1 <= 53){
2609
+             let num = this.weekNum + i + 1
2610
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + num + ')'
2611
+             this.typeOptions.push({value:i,label:str})
2612
+            let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
2613
+            this.timeOptions.push({value:i,label:stt})
2614
+        }else{
2615
+
2616
+            newNum++
2617
+            let str = this.weekList[i][0] + '~' + this.weekList[i][6] + '(' + newNum + ')'
2618
+            this.typeOptions.push({value:i,label:str})
2619
+            let stt = this.weekList[i][0] +"~"+this.weekList[i][6]
2620
+            this.timeOptions.push({value:i,label:stt})
2621
+          }
2622
+
2623
+        }
2624
+       
2463 2625
     }
2464 2626
   }
2465 2627
 </script>

+ 1 - 1
src/xt_pages/workforce/components/tableData.vue Datei anzeigen

@@ -917,7 +917,7 @@ export default {
917 917
           this.toDay = response.data.data.today;
918 918
           var theSchedules = response.data.data.schdules;
919 919
           
920
-          console.log("中国4444444444444",this.scheduleZone)
920
+        
921 921
         
922 922
           var that = this;
923 923
           this.scheduleZone.forEach(function(zone, index) {