XMLWAN 3 yıl önce
ebeveyn
işleme
15ca171930

+ 29 - 2
src/api/config.js Dosyayı Görüntüle

@@ -138,14 +138,41 @@ export function postXtHisIsOpen(params) {
138 138
 
139 139
 
140 140
 export function postMonitorIsOpen(params){
141
-  
141
+  console.log("params",params)
142 142
   return request({
143
-    url:"./api/monitor/open",
143
+    url:"/api/monitor/open",
144 144
     method:"get",
145 145
     params:params
146 146
   })
147 147
 }
148 148
 
149 149
 
150
+export function getMonitorConfig(params){
151
+  
152
+  return request({
153
+    url:"/api/monitor/getmonitorconfig",
154
+    method:"Get",
155
+    params:params,
156
+  })
157
+}
158
+
159
+
160
+export function addOrderConfig(params){
161
+  
162
+  return request({
163
+    url:"/api/order/addorderconfig",
164
+    method:"Get",
165
+    params:params,
166
+
167
+  })
168
+}
150 169
 
170
+export function getOrderConfig(params){
171
+  
172
+  return request({
173
+    url:"/api/order/getorderconfig",
174
+    method:"get",
175
+    params:params,
176
+  })
177
+}
151 178
 

+ 9 - 0
src/api/stock.js Dosyayı Görüntüle

@@ -584,4 +584,13 @@ export function GetOutStockTotalCount(params){
584 584
     method:"get",
585 585
     params:params
586 586
   })
587
+}
588
+
589
+export function postGoodInformation(params){
590
+  console.log("PARMAS22",params)
591
+  return request({
592
+    url:"/api/good/postgoodinformation",
593
+    method:"Post",
594
+    data:params,
595
+  })
587 596
 }

+ 62 - 3
src/xt_pages/data/basicConfig.vue Dosyayı Görüntüle

@@ -78,7 +78,7 @@
78 78
 
79 79
 <script>
80 80
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
81
-import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen } from '@/api/config'
81
+import { getAllIsOpenInit,postXtHisIsOpen,postMonitorIsOpen,getMonitorConfig,addOrderConfig,getOrderConfig } from '@/api/config'
82 82
 
83 83
 export default {
84 84
   name: "printTemplate",
@@ -147,20 +147,79 @@ export default {
147 147
     },
148 148
 
149 149
     changeFuncTwo(){
150
-       
150
+      console.log("3333333",this.is_open_monitor)
151
+      var is_open = 0
152
+      if(this.is_open_monitor == true){
153
+          is_open = 1
154
+       }
155
+       if(this.is_open_monitor == false){
156
+         is_open = 2
157
+       }
151 158
       let params = {
152
-         is_open:this.is_open_monitor
159
+         is_open:is_open,
153 160
        }
161
+     console.log("params",params)
154 162
       postMonitorIsOpen(params).then(response=>{
155 163
          if(response.data.state == 1){
164
+            var config = response.data.data.config
165
+            this.$message.success("成功")
166
+            this.getMonitorConfig()
167
+         }
168
+      })
169
+    },
170
+    getMonitorConfig(){
171
+      getMonitorConfig().then(response=>{
172
+         if(response.data.state == 1){
173
+           var config =  response.data.data.config
174
+           console.log("config",config)
175
+           if (config.is_open == 1) {
176
+              this.is_open_monitor = true
177
+           }
178
+           if (config.is_open == 2) {
179
+              this.is_open_monitor = false
180
+           }
181
+         }
182
+      })
183
+    },
156 184
 
185
+    changeFuncThree(){
186
+      var is_open = 0
187
+      if(this.is_open_order == true){
188
+          is_open = 1
189
+       }
190
+       if(this.is_open_order == false){
191
+         is_open = 2
192
+       }
193
+      let params = {
194
+         is_open:is_open,
195
+       } 
196
+      addOrderConfig(params).then(response=>{
197
+         if(response.data.state == 1){
198
+           var config = response.data.data.config
199
+           this.$message.success("成功")
200
+           this.getOrderConfig()
157 201
          }
158 202
       })
203
+    },
204
+    getOrderConfig(){
205
+      getOrderConfig().then(response=>{
206
+        if(response.data.state == 1){
207
+           var config =  response.data.data.config
208
+          if (config.is_open == 1) {
209
+              this.is_open_order = true
210
+           }
211
+           if (config.is_open == 2) {
212
+              this.is_open_order = false
213
+           }
214
+        }
215
+      })
159 216
     }
160 217
 
161 218
   },
162 219
   created() {
163 220
     this.getInitIsOpenConfig()
221
+    this.getMonitorConfig()
222
+    this.getOrderConfig()
164 223
 
165 224
   }
166 225
 };

+ 304 - 14
src/xt_pages/data/components/consumables.vue Dosyayı Görüntüle

@@ -4,7 +4,7 @@
4 4
       <div class="cell clearfix" style="margin-bottom:0;">
5 5
         <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model="keywords"
6 6
                   class="filter-item"/>
7
-        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
7
+        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search" 
8 8
                    @click="searchAction">搜索
9 9
         </el-button>
10 10
         <label class="title"><span class="name">是否启用</span> : </label>
@@ -59,14 +59,16 @@
59 59
       </div>
60 60
       <div>
61 61
         <el-button type="primary" @click="openForm()">新增</el-button>
62
-        <!--<el-button type="primary" @click="BatchDelete()">批量备案</el-button>-->
63
-
64
-
65
-        <el-button type="primary" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
66
-        <el-button type="primary" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
67
-
68 62
       </div>
63
+     
69 64
     </div>
65
+    
66
+     <div style="display:flex; align-items:center;margin-bottom:10px;">
67
+        <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
68
+        <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
69
+        <!-- <el-button size="mini" type="primary">下载模版</el-button>
70
+        <upload-excel :on-success='handleSuccess' :before-upload="beforeUpload"></upload-excel> -->
71
+      </div>
70 72
 
71 73
     <el-table
72 74
       border style="width: 100%" :row-style="{ color: '#303133' }"
@@ -168,6 +170,19 @@
168 170
     ></good-info-dailog>
169 171
     <self-payment ref='selfPayment'></self-payment>
170 172
 
173
+
174
+    <el-dialog
175
+      title="提示"
176
+      :visible.sync="dialogVisible"
177
+      width="40%"
178
+    >
179
+      <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
180
+      <span slot="footer" class="dialog-footer">
181
+    <el-button @click="dialogVisible = false">取 消</el-button>
182
+    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
183
+      </span>
184
+    </el-dialog>
185
+
171 186
   </div>
172 187
 </template>
173 188
 
@@ -185,12 +200,15 @@
185 200
     GetGoodInfo,
186 201
     GetGoodInfoByGoodId,
187 202
     getGoodInfoList,
188
-    modifyGoodInfo
203
+    modifyGoodInfo,
204
+    postGoodInformation
189 205
   } from '@/api/stock'
206
+  import UploadExcel from '@/xt_pages/components/UploadExcel'
190 207
   export default {
191 208
     components: {
192 209
       GoodInfoDailog,
193
-      selfPayment
210
+      selfPayment,
211
+      UploadExcel,
194 212
     },
195 213
     data() {
196 214
       return {
@@ -285,7 +303,10 @@
285 303
             label: '未备案'
286 304
         }],
287 305
         is_record:"",
288
-        manufacturer:""
306
+        manufacturer:"",
307
+        dialogVisible:false,
308
+        goodType:[],
309
+        dealers:[]
289 310
       }
290 311
     },
291 312
     methods: {
@@ -797,6 +818,7 @@
797 818
               this.goodInfo.goodInfoDialog.formValue.dealers.push(
798 819
                 response.data.data.dealer[i]
799 820
               )
821
+              this.dealers.push(response.data.data.dealer[i])
800 822
             }
801 823
           }
802 824
         })
@@ -831,9 +853,8 @@
831 853
               if (response.data.data.goodType[i].type == 1) {
832 854
                 response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
833 855
               }
834
-              this.goodInfo.goodInfoDialog.formValue.goodType.push(
835
-                response.data.data.goodType[i]
836
-              )
856
+              this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i])
857
+              this.goodType.push(response.data.data.goodType[i]) 
837 858
             }
838 859
           }
839 860
         })
@@ -1012,7 +1033,276 @@
1012 1033
       changeRecord(){
1013 1034
          this.getList()
1014 1035
       },
1015
-    }, created() {
1036
+      handleSuccess({ results, header }) {
1037
+        console.log("header",header)
1038
+        var goods = []
1039
+        if (header != undefined && header.length > 0) {
1040
+            
1041
+          var isHasMedicalInsuranceLevel = header.includes('*医保等级')
1042
+          // console.log("医保等级",isHasMedicalInsuranceLevel)
1043
+          var isHasGoodUnit = header.includes('*单位')
1044
+          // console.log("单位",isHasGoodUnit)
1045
+          var isHasStockWarnCount = header.includes('*库存警戒')
1046
+          // console.log("库存警戒",isHasStockWarnCount)
1047
+          var isHasManuFacturer =  header.includes('*生产厂商')
1048
+          // console.log("生产厂商",isHasManuFacturer)
1049
+          var isHasDealer =  header.includes('*经销商')
1050
+          // console.log("经销商",isHasDealer)
1051
+          var isHasGoodName = header.includes('*耗材名称')
1052
+          // console.log("耗材名称",isHasGoodName)
1053
+          var isHasGoodKand = header.includes('*耗材种类')
1054
+          // console.log("耗材种类",isHasGoodKand)
1055
+          var isHasSpecificationName = header.includes('*规格型号')
1056
+          // console.log("规格型号",isHasSpecificationName)
1057
+          var isHasBuyPrice = header.includes('*零价')
1058
+          // console.log("零价",isHasBuyPrice)
1059
+         
1060
+          if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer && isHasDealer && isHasGoodName && isHasGoodKand && isHasSpecificationName &&  isHasBuyPrice)) {
1061
+            this.dialogVisible = true
1062
+            return
1063
+          }
1064
+        }else {
1065
+          this.dialogVisible = true
1066
+          return
1067
+        }
1068
+       
1069
+       var tableData = []
1070
+       for(let i=0;i<results.length;i++){
1071
+         let obj = {}
1072
+         for (var key in results[i]) {
1073
+
1074
+           if (results[i]['*耗材名称'] === undefined) {
1075
+                obj['good_name'] = ''
1076
+              } else {
1077
+           if (key == '*耗材名称') {
1078
+               obj['good_name'] = results[i][key].replace(/\s/g,"")
1079
+              }
1080
+           }
1081
+           
1082
+           if (results[i]['*耗材种类'] === undefined) {
1083
+                obj['good_kind'] = ''
1084
+              } else {
1085
+           if (key == '*耗材种类') {
1086
+               obj['good_kind'] = results[i][key].replace(/\s/g,"")
1087
+              }
1088
+           }
1089
+
1090
+          if (results[i]['*耗材类型'] === undefined) {
1091
+                obj['type_name'] = ''
1092
+              } else {
1093
+           if (key == '*耗材类型') {
1094
+               obj['type_name'] = results[i][key].replace(/\s/g,"")
1095
+              }
1096
+           }
1097
+
1098
+           if (results[i]['*医保等级'] === undefined) {
1099
+                obj['medical_insurance_level'] = ''
1100
+              } else {
1101
+           if (key == '*医保等级') {
1102
+               obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
1103
+              }
1104
+           }
1105
+
1106
+           if (results[i]['*规格型号'] === undefined) {
1107
+                obj['specification_name'] = ''
1108
+              } else {
1109
+           if (key == '*规格型号') {
1110
+               obj['specification_name'] = results[i][key].replace(/\s/g,"")
1111
+              }
1112
+           }
1113
+
1114
+           if (results[i]['*生产厂商'] === undefined) {
1115
+                obj['manufacturer'] = ''
1116
+              } else {
1117
+           if (key == '*生产厂商') {
1118
+               obj['manufacturer'] = results[i][key].replace(/\s/g,"")
1119
+              }
1120
+           }
1121
+
1122
+           if (results[i]['*单位'] === undefined) {
1123
+                obj['good_unit'] = ''
1124
+              } else {
1125
+             if (key == '*单位') {
1126
+               obj['good_unit'] = results[i][key].replace(/\s/g,"")
1127
+              }
1128
+           }
1129
+
1130
+          if (results[i]['*零价'] === undefined) {
1131
+                obj['retail_price'] = ''
1132
+              } else {
1133
+             if (key == '*零价') {
1134
+               obj['retail_price'] = results[i][key].replace(/\s/g,"")
1135
+              }
1136
+           }
1137
+
1138
+            if (results[i]['*库存警戒'] === undefined) {
1139
+                obj['stock_warn_count'] = ''
1140
+              } else {
1141
+             if (key == '*库存警戒') {
1142
+               obj['stock_warn_count'] = results[i][key].replace(/\s/g,"")
1143
+              }
1144
+           }
1145
+
1146
+           if (results[i]['*经销商'] === undefined) {
1147
+                obj['dealer'] = ''
1148
+              } else {
1149
+             if (key == '*经销商') {
1150
+               obj['dealer'] = results[i][key].replace(/\s/g,"")
1151
+              }
1152
+           }
1153
+
1154
+           if (results[i]['拼音'] === undefined) {
1155
+                obj['pinyin'] = ''
1156
+              } else {
1157
+             if (key == '拼音') {
1158
+               obj['pinyin'] = results[i][key].replace(/\s/g,"")
1159
+              }
1160
+           }
1161
+
1162
+           if (results[i]['五笔'] === undefined) {
1163
+                obj['wubi'] = ''
1164
+              } else {
1165
+             if (key == '五笔') {
1166
+               obj['wubi'] = results[i][key].replace(/\s/g,"")
1167
+              }
1168
+           }
1169
+
1170
+           if (results[i]['最新进价'] === undefined) {
1171
+                obj['buy_price'] = ''
1172
+              } else {
1173
+             if (key == '最新进价') {
1174
+               obj['buy_price'] = results[i][key].replace(/\s/g,"")
1175
+              }
1176
+           }
1177
+
1178
+           if (results[i]['医保编码'] === undefined) {
1179
+                obj['medical_insurance_number'] = ''
1180
+              } else {
1181
+             if (key == '医保编码') {
1182
+               obj['medical_insurance_number'] = results[i][key].replace(/\s/g,"")
1183
+              }
1184
+           }
1185
+
1186
+          if (results[i]['是否特病目录'] === undefined) {
1187
+                obj['is_special_diseases'] = ''
1188
+              } else {
1189
+             if (key == '是否特病目录') {
1190
+               obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
1191
+              }
1192
+           }
1193
+          
1194
+           if (results[i]['是否备案'] === undefined) {
1195
+                obj['is_record'] = ''
1196
+              } else {
1197
+             if (key == '是否备案') {
1198
+               obj['is_record'] = results[i][key].replace(/\s/g,"")
1199
+              }
1200
+           }
1201
+
1202
+          if (results[i]['统计分类'] === undefined) {
1203
+                obj['statistics_category'] = ''
1204
+              } else {
1205
+             if (key == '统计分类') {
1206
+               obj['statistics_category'] = results[i][key].replace(/\s/g,"")
1207
+              }
1208
+           }
1209
+          
1210
+          if (results[i]['状态'] === undefined) {
1211
+                obj['good_status'] = ''
1212
+              } else {
1213
+             if (key == '状态') {
1214
+               obj['good_status'] = results[i][key].replace(/\s/g,"")
1215
+              }
1216
+           }
1217
+           
1218
+
1219
+          if (results[i]['社保目录编码'] === undefined) {
1220
+                obj['social_security_directory_code'] = ''
1221
+              } else {
1222
+             if (key == '社保目录编码') {
1223
+               obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
1224
+              }
1225
+           }
1226
+
1227
+          if (results[i]['生产地类别'] === undefined) {
1228
+                obj['production_type'] = ''
1229
+              } else {
1230
+             if (key == '生产地类别') {
1231
+               obj['production_type'] = results[i][key].replace(/\s/g,"")
1232
+              }
1233
+           }
1234
+
1235
+           if (results[i]['特殊医用材料标志'] === undefined) {
1236
+                obj['special_medical'] = ''
1237
+              } else {
1238
+             if (key == '特殊医用材料标志') {
1239
+               obj['special_medical'] = results[i][key].replace(/\s/g,"")
1240
+              }
1241
+           }
1242
+
1243
+           if (results[i]['备注'] === undefined) {
1244
+                obj['is_mark'] = ''
1245
+              } else {
1246
+             if (key == '备注') {
1247
+               obj['is_mark'] = results[i][key].replace(/\s/g,"")
1248
+              }
1249
+           }
1250
+         }
1251
+         tableData.push(obj)
1252
+         console.log("表哥2222",tableData)
1253
+         var goodKind  =  this.getDictionaryDataConfig('system','good_kind')
1254
+         console.log("耗材种类",goodKind)
1255
+         console.log("耗材类型",this.goodType)
1256
+        var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
1257
+        console.log("医保等级",medicalInsuranceLevel)
1258
+        console.log("生产厂商",this.manufacturers)
1259
+        console.log("经销商",this.dealers)
1260
+        var statisticsCategory = getDictionaryDataConfig('system','statistics_category')
1261
+        console.log("统计分类",statisticsCategory)
1262
+        for(let i=0;i<tableData.length;i++){ 
1263
+          for(let j=0;j<goodKind.length;j++){
1264
+             if(tableData[i].good_kind == goodKind[j].name){
1265
+                tableData[i].good_kind_id = goodKind[j].id
1266
+             }    
1267
+          }
1268
+
1269
+       for(let z=0;z<this.goodType.length;z++){
1270
+          if(tableData[i].type_name == this.goodType[z].type_name){
1271
+             tableData[i].good_type_id = this.goodType[z].id
1272
+           }
1273
+        }
1274
+        
1275
+        for(let y=0;y<medicalInsuranceLevel.length;y++){
1276
+           if(tableData[i].medical_insurance_level == medicalInsuranceLevel[y].name){
1277
+               tableData[i].medical_insurance_id = medicalInsuranceLevel[y].id
1278
+           }
1279
+        }
1280
+
1281
+        
1282
+        // for(let a=0;a<this.manufacturers.length;a++){
1283
+
1284
+        // }
1285
+
1286
+
1287
+
1288
+        }
1289
+       }
1290
+       let params = {
1291
+          'goods':tableData 
1292
+        }
1293
+       console.log("params2222",params)
1294
+        return
1295
+       
1296
+        postGoodInformation(params).then(response=>{
1297
+           if(response.data.state == 1){
1298
+             var msg =  response.data.data.msg
1299
+             this.$message.success("导入成功!")
1300
+           }
1301
+        })
1302
+
1303
+      }
1304
+    }, 
1305
+    created() {
1016 1306
       this.getList()
1017 1307
       this.getAllDealer()
1018 1308
       this.getAllManufacturer()

+ 1 - 0
src/xt_pages/data/components/tableson.vue Dosyayı Görüntüle

@@ -405,6 +405,7 @@ export default {
405 405
       this.$refs["dataForm"].validate(valid => {
406 406
         if (valid) {
407 407
           this.temp.field_type = parseInt(this.temp.field_type)
408
+         
408 409
           console.log("2222",this.temp.field_name)
409 410
           createChildConfig(this.temp).then(response => {
410 411
             if (!response.data) {

+ 1 - 1
src/xt_pages/outpatientCharges/costComparison.vue Dosyayı Görüntüle

@@ -213,7 +213,7 @@
213 213
 
214 214
           var that = this
215 215
 
216
-          if (this.$store.getters.xt_user.org_id == 9919) {
216
+          if (this.$store.getters.xt_user.org_id == 9919 || this.$store.getters.xt_user.org_id == 9671) {
217 217
             axios.get('http://127.0.0.1:9532/api/checkaccount/get', {
218 218
               params: params
219 219
             })

+ 41 - 4
src/xt_pages/stock/detail/print.vue Dosyayı Görüntüle

@@ -53,13 +53,21 @@
53 53
                 <span v-if="stock.type && stock.type.type_name.length > 0">{{stock.type.type_name}}</span>
54 54
               </td> -->
55 55
               <td style="line-height: 50px">
56
-                <span v-if="type == 3">{{getStockCount(stock.id)}}</span>
57
-                 <span v-else>{{calCount(stock)}}</span> 
56
+                <span v-if="type == 3">
57
+                  <span v-if="org_id == 10090">{{getWareOut(stock.id)}}</span>
58
+                  <span else>{{getStockCount(stock.id)}}</span>
59
+                </span>
60
+                <span v-else>{{calCount(stock)}}</span> 
58 61
               </td>
59 62
               <td style="line-height:50px" v-if="type == 1 && stock.query_warehousing_info.length > 0">{{stock.query_warehousing_info[0].price}}</td>
60 63
               <td style="line-height:50px" v-if="type == 3 && stock.query_warehouseout_info.length > 0">{{stock.query_warehouseout_info[0].price}}</td>
61 64
               <td style="line-height: 50px" v-if="type == 1">{{calTotal(stock)}}</td>
62
-              <td style="line-height: 50px" v-if="type == 3">{{(getStockCount(stock.id) * stock.query_warehouseout_info[0].price).toFixed(2)}}</td>
65
+              <td style="line-height: 50px" v-if="type == 3">
66
+                
67
+                  <span v-if="org_id == 10090">{{getPrice(stock.id)}}</span>
68
+                  <span v-else>{{(getStockCount(stock.id) * stock.query_warehouseout_info[0].price).toFixed(2)}}</span> 
69
+               
70
+             </td>
63 71
               <td style="line-height: 50px"></td>
64 72
             </tr>
65 73
             </tbody>
@@ -124,7 +132,9 @@
124 132
         type: this.$route.query.type,
125 133
         start_time: this.$route.query.start_time,
126 134
         end_time: this.$route.query.end_time,
127
-        stockTotal:[]
135
+        stockTotal:[],
136
+        wareOutInfo:[],
137
+        org_id:0
128 138
       }
129 139
     },
130 140
     methods: {
@@ -172,6 +182,13 @@
172 182
             console.log("stocktOTl",stockTotal)
173 183
             this.stockTotal = stockTotal
174 184
             console.log("导出数据",response.data.data.list)
185
+            var info = response.data.data.info
186
+            console.log("infor2222222",info)
187
+            this.wareOutInfo = info
188
+            var org_id = response.data.data.orgid
189
+            console.log("org_id",org_id)
190
+            this.org_id = org_id
191
+           
175 192
             for (let i = 0; i < response.data.data.list.length; i++) {
176 193
               if (this.type == 1) {
177 194
                 if (response.data.data.list[i].query_warehousing_info.length > 0) {
@@ -323,6 +340,26 @@
323 340
           }
324 341
        }
325 342
        return count
343
+     },
344
+     getWareOut(id){
345
+      var count = ""
346
+      for(let i=0;i<this.wareOutInfo.length;i++){
347
+         if(id == this.wareOutInfo[i].good_id){
348
+            count = this.wareOutInfo[i].count
349
+         }
350
+      }
351
+      return count
352
+     },
353
+     getPrice(id){
354
+       var sum = ""
355
+       for(let j=0;j<this.wareOutInfo.length;j++){
356
+         if(id == this.wareOutInfo[j].good_id){
357
+            sum += this.wareOutInfo[j].price * this.wareOutInfo[j].count
358
+         }
359
+       }
360
+       
361
+       return sum
362
+       
326 363
      }
327 364
     },
328 365
     created() {

+ 1 - 4
src/xt_pages/user/patients.vue Dosyayı Görüntüle

@@ -861,8 +861,6 @@
861 861
 
862 862
       },
863 863
       handleSuccess({ results, header }) {
864
-        console.log("999999999")
865
-
866 864
         console.log(results)
867 865
         if (header != undefined && header.length > 0) {
868 866
           var isHasName = header.includes('*姓名')
@@ -888,8 +886,7 @@
888 886
           this.dialogVisible = true
889 887
           return
890 888
         }
891
-        getMaxDialysisNo().then(
892
-          response => {
889
+        getMaxDialysisNo().then(response => {
893 890
             if (response.data.state === 1) {
894 891
               this.max_dialysis_no = response.data.data.dialysis_no
895 892
               if (this.max_dialysis_no == 0) {

+ 93 - 102
src/xt_pages/workforce/appointment.vue Dosyayı Görüntüle

@@ -215,6 +215,7 @@
215 215
         clen:7,
216 216
         nowYear: new Date().getFullYear(),
217 217
         schedule_week:0,
218
+        newDay:[]
218 219
 
219 220
       }
220 221
     },
@@ -478,6 +479,8 @@
478 479
             '区号',
479 480
             '机号'
480 481
           ]
482
+        if(this.export_type == 0){
483
+             
481 484
           const multiHeader = [['区号', '机号', '周一'+"("+this.days[0]+")" , '', '', '周二'+"("+this.days[1]+")", '', '', '周三'+"("+this.days[2]+")" , '', '', '周四'+"("+this.days[3]+")" , '', '', '周五'+"("+this.days[4]+")" , '', '', '周六'+"("+this.days[5]+")" , '', '', '周日'+"("+this.days[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
482 485
           const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
483 486
           const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
@@ -502,13 +505,11 @@
502 505
               obj['机号'] = jihaos[b].number.toString()
503 506
               list.push(obj)
504 507
             }
505
-
506 508
             i++
507 509
           }
508 510
           console.log("listw22222222",list)
509 511
             var data = []
510
-          // const data = this.formatJson(filterVal, this.tableList)
511
-        
512
+
512 513
           this.tableList.map(item=>{
513 514
             data.push(Object.values(item))
514 515
 
@@ -516,6 +517,7 @@
516 517
           console.log("data",data)
517 518
           
518 519
           const filename = '排班模版'
520
+        
519 521
           excel.export_json_to_excel({
520 522
             multiHeader,
521 523
             header,
@@ -524,6 +526,55 @@
524 526
             filename
525 527
           })
526 528
           this.downloadLoading = false
529
+          }
530
+          
531
+          if(this.export_type == 1){
532
+            console.log("333333",this.newDay)
533
+             const multiHeader = [['区号', '机号', '周一'+"("+this.newDay[0]+")" , '', '', '周二'+"("+this.newDay[1]+")", '', '', '周三'+"("+this.newDay[2]+")" , '', '', '周四'+"("+this.newDay[3]+")" , '', '', '周五'+"("+this.newDay[4]+")" , '', '', '周六'+"("+this.newDay[5]+")" , '', '', '周日'+"("+this.newDay[6]+")" , '', '', '周一'+"("+this.days[7]+")" , '', '', '周二'+"("+this.days[8]+")" , '', '', '周三'+"("+this.days[9]+")" , '', '', '周四'+"("+this.days[10]+")" , '', '', '周五'+"("+this.days[11]+")" , '', '', '周六'+"("+this.days[12]+")" , '', '', '周日'+"("+this.days[13]+")", '', '', '周一'+"("+this.days[14]+")", '', '', '周二'+"("+this.days[15]+")", '', '', '周三'+"("+this.days[16]+")", '', '', '周四'+"("+this.days[17]+")", '', '', '周五'+"("+this.days[18]+")", '', '', '周六'+"("+this.days[19]+")", '', '', '周日'+"("+this.days[20]+")", '', '']]
534
+             const header = ['', '', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上', '上午', '下午', '晚上']
535
+             const merges = ['A1:A2', 'B1:B2', 'C1:E1', 'F1:H1', 'I1:K1', 'L1:N1', 'O1:Q1', 'R1:T1', 'U1:W1', 'X1:Z1', 'AA1:AC1', 'AD1:AF1', 'AG1:AI1', 'AJ1:AL1', 'AM1:AO1', 'AP1:AR1', 'AS1:AU1', 'AV1:AX1', 'AY1:BA1', 'BB1:BD1', 'BE1:BG1', 'BH1:BJ1', 'BK1:BM1']
536
+            var list = []
537
+            let i = 0
538
+            for (let key  in this.partitions) {
539
+              var tempValue
540
+              var jihaos = this.partitions[key].jihaos
541
+
542
+              if (i == 0) {
543
+                let m = 'A3' + ':' + 'A' + (2 + jihaos.length)
544
+                tempValue = (2 + jihaos.length)
545
+                merges.push(m)
546
+              } else {
547
+                let m = 'A' + (tempValue + 1) + ':' + 'A' + ((tempValue + 1) + jihaos.length - 1)
548
+                tempValue = ((tempValue + 1) + jihaos.length - 1)
549
+                merges.push(m)
550
+              }
551
+              for (let b = 0; b < jihaos.length; b++) {
552
+                let obj = {}
553
+                obj['区号'] = this.partitions[key].name
554
+                obj['机号'] = jihaos[b].number.toString()
555
+                list.push(obj)
556
+              }
557
+              i++
558
+            }
559
+          
560
+            var data = []
561
+            this.tableList.map(item=>{
562
+              data.push(Object.values(item))
563
+
564
+            })
565
+            console.log("data",data)
566
+            
567
+            const filename = '排班模版'
568
+           
569
+            excel.export_json_to_excel({
570
+              multiHeader,
571
+              header,
572
+              merges,
573
+              data,
574
+              filename
575
+            })
576
+            this.downloadLoading = false
577
+          }
527 578
         })
528 579
       },
529 580
       export_fileTwo:function(){
@@ -1115,6 +1166,7 @@
1115 1166
             return false
1116 1167
           }
1117 1168
           this.days = response.data.data.days
1169
+          console.log("日期22222222",this.days)
1118 1170
         })
1119 1171
       },
1120 1172
       getWeekByResultsStr(key) {
@@ -2016,100 +2068,7 @@
2016 2068
                 for (let b = 0; b < jihaos.length; b++) {
2017 2069
                  var obj = {}
2018 2070
 
2019
-                  // obj['区号'] = partitions[key].name
2020
-                  // obj['机号'] = jihaos[b].number.toString()
2021
-
2022
-
2023
-                  // obj['上午'] = ''
2024
-                  // obj['下午'] = ''
2025
-                  // obj['晚上'] = ''
2026
-
2027
-                  // obj['上午1'] = ''
2028
-                  // obj['下午1'] = ''
2029
-                  // obj['晚上1'] = ''
2030
-
2031
-                  // obj['上午2'] = ''
2032
-                  // obj['下午2'] = ''
2033
-                  // obj['晚上2'] = ''
2034
-
2035
-                  // obj['上午3'] = ''
2036
-                  // obj['下午3'] = ''
2037
-                  // obj['晚上3'] = ''
2038
-
2039
-                  // obj['上午4'] = ''
2040
-                  // obj['下午4'] = ''
2041
-                  // obj['晚上4'] = ''
2042
-
2043
-
2044
-                  // obj['上午5'] = ''
2045
-                  // obj['下午5'] = ''
2046
-                  // obj['晚上5'] = ''
2047
-
2048
-                  // obj['上午6'] = ''
2049
-                  // obj['下午6'] = ''
2050
-                  // obj['晚上6'] = ''
2051
-
2052
-                  // obj['上午7'] = ''
2053
-                  // obj['下午7'] = ''
2054
-                  // obj['晚上7'] = ''
2055
-
2056
-                  // obj['上午8'] = ''
2057
-                  // obj['下午8'] = ''
2058
-                  // obj['晚上8'] = ''
2059
-
2060
-                  // obj['上午9'] = ''
2061
-                  // obj['下午9'] = ''
2062
-                  // obj['晚上9'] = ''
2063
-
2064
-                  // obj['上午10'] = ''
2065
-                  // obj['下午10'] = ''
2066
-                  // obj['晚上10'] = ''
2067
-
2068
-                  // obj['上午11'] = ''
2069
-                  // obj['下午11'] = ''
2070
-                  // obj['晚上11'] = ''
2071
-
2072
-
2073
-                  // obj['上午12'] = ''
2074
-                  // obj['下午12'] = ''
2075
-                  // obj['晚上12'] = ''
2076
-
2077
-                  // obj['上午13'] = ''
2078
-                  // obj['下午13'] = ''
2079
-                  // obj['晚上13'] = ''
2080
-
2081
-
2082
-                  // obj['上午14'] = ''
2083
-                  // obj['下午14'] = ''
2084
-                  // obj['晚上14'] = ''
2085
-
2086
-
2087
-                  // obj['上午15'] = ''
2088
-                  // obj['下午15'] = ''
2089
-                  // obj['晚上15'] = ''
2090
-
2091
-                  // obj['上午16'] = ''
2092
-                  // obj['下午16'] = ''
2093
-                  // obj['晚上16'] = ''
2094
-
2095
-                  // obj['上午17'] = ''
2096
-                  // obj['下午17'] = ''
2097
-                  // obj['晚上17'] = ''
2098
-
2099
-                  // obj['上午18'] = ''
2100
-                  // obj['下午18'] = ''
2101
-                  // obj['晚上18'] = ''
2102
-
2103
-                  // obj['上午19'] = ''
2104
-                  // obj['下午19'] = ''
2105
-                  // obj['晚上19'] = ''
2106
-
2107
-
2108
-                  // obj['上午20'] = ''
2109
-                  // obj['下午20'] = ''
2110
-                  // obj['晚上20'] = ''
2111
-
2112
-
2071
+                
2113 2072
                   obj['区号'] = partitions[key].name
2114 2073
                   obj['机号'] = jihaos[b].number.toString()
2115 2074
 
@@ -2233,7 +2192,7 @@
2233 2192
               console.log("下下周数据时间",laststart)
2234 2193
               var lastend = this.getTimestamp(last_end) - 28800
2235 2194
               console.log("下下周数据时间",lastend)
2236
-
2195
+               
2237 2196
               if(this.export_type == 0){
2238 2197
                 for(let i = 0;i<scheduleList.length;i++){
2239 2198
                  if(scheduleList[i].schedule_date >= start && scheduleList[i].schedule_date<=end){
@@ -2246,7 +2205,7 @@
2246 2205
                  if(scheduleList[i].schedule_date>=laststart && scheduleList[i].schedule_date<=lastend){
2247 2206
                    lastWeek.push(scheduleList[i])
2248 2207
                  }
2249
-              }
2208
+               }
2250 2209
               }
2251 2210
 
2252 2211
             if(this.export_type == 1){
@@ -2346,7 +2305,7 @@
2346 2305
                   }
2347 2306
 
2348 2307
                }
2349
-             }
2308
+              }
2350 2309
              }
2351 2310
 
2352 2311
              console.log("list5555555555",list)
@@ -2576,12 +2535,44 @@
2576 2535
        },
2577 2536
 
2578 2537
        changeWeek(val){
2579
-         console.log("Val",val)
2538
+       
2580 2539
          var start = this.getTimestamp(val) - 57600
2581
-         console.log("start",start)
2540
+        //  console.log("第一天时间错",start)
2582 2541
          this.start_time = this.getTime(start)
2542
+        //  console.log("第一天",this.start_time)
2543
+         this.newDay.push(this.start_time)  
2544
+         var next = start + 86400
2545
+         var nest_day = this.getTime(next)
2546
+        //  console.log("第二天",nest_day)
2547
+         this.newDay.push(nest_day)
2548
+         var last_days = start + 172800
2549
+         
2550
+         var last_day = this.getTime(last_days)
2551
+        //  console.log("第三天",last_day)
2552
+         this.newDay.push(last_day)
2553
+         
2554
+         var tuesdays = start + 259200
2555
+        //  console.log("tuesdays",tuesdays)
2556
+         var tuesday =  this.getTime(tuesdays)
2557
+        //  console.log("第四天",tuesday)
2558
+         this.newDay.push(tuesday)
2559
+         var fivdays = start + 345600
2560
+         var fiveday = this.getTime(fivdays)
2561
+        //  console.log("第五天",fiveday)
2562
+         this.newDay.push(fiveday)
2563
+         var sixday =  start + 432000
2564
+         var sixdays = this.getTime(sixday)
2565
+        //  console.log("第六天",sixdays)
2566
+         this.newDay.push(sixdays)
2583 2567
          var end = this.getTimestamp(val) + 460800
2568
+       
2584 2569
          this.end_time = this.getTime(end)
2570
+        //  console.log("第七天",this.end_time)
2571
+         this.newDay.push(this.end_time)
2572
+      
2573
+     
2574
+
2575
+         console.log("33333333",this.newDay)
2585 2576
          this.export_type = 1
2586 2577
          this.getThreeWeekList()
2587 2578
        },