|
@@ -75,15 +75,15 @@
|
75
|
75
|
>下载模版
|
76
|
76
|
</el-button>
|
77
|
77
|
</el-link>
|
78
|
|
- <upload-excel :on-success='handleSuccess'></upload-excel>
|
|
78
|
+ <good-excel :on-success='handleSuccess'></good-excel>
|
79
|
79
|
<el-button
|
80
|
80
|
style="margin-left:10px;"
|
81
|
81
|
@click="generateLog()"
|
82
|
82
|
class="filter-item"
|
83
|
83
|
type="primary"
|
84
|
84
|
size="small"
|
85
|
|
- >下载日志 -->
|
86
|
|
- </el-button>
|
|
85
|
+ >下载日志
|
|
86
|
+ </el-button> -->
|
87
|
87
|
</div>
|
88
|
88
|
|
89
|
89
|
<el-table
|
|
@@ -244,12 +244,14 @@
|
244
|
244
|
postGoodInformation
|
245
|
245
|
} from '@/api/stock'
|
246
|
246
|
import UploadExcel from '@/xt_pages/components/UploadExcel'
|
|
247
|
+ import GoodExcel from '@/xt_pages/components/GoodExcel'
|
247
|
248
|
import { generateLog } from '@/api/config'
|
248
|
249
|
export default {
|
249
|
250
|
components: {
|
250
|
251
|
GoodInfoDailog,
|
251
|
252
|
selfPayment,
|
252
|
253
|
UploadExcel,
|
|
254
|
+ GoodExcel
|
253
|
255
|
},
|
254
|
256
|
data() {
|
255
|
257
|
return {
|
|
@@ -531,8 +533,6 @@
|
531
|
533
|
response.data.data.goodInfo.good_type_id
|
532
|
534
|
|
533
|
535
|
|
534
|
|
-
|
535
|
|
-
|
536
|
536
|
this.goodInfo.goodInfoDialog.formValue.good_name =
|
537
|
537
|
response.data.data.goodInfo.good_name
|
538
|
538
|
|
|
@@ -552,8 +552,6 @@
|
552
|
552
|
response.data.data.goodInfo.good_kind
|
553
|
553
|
}
|
554
|
554
|
|
555
|
|
-
|
556
|
|
-
|
557
|
555
|
if (response.data.data.goodInfo.medical_insurance_level <= 0) {
|
558
|
556
|
this.goodInfo.goodInfoDialog.formValue.medical_insurance_level = ''
|
559
|
557
|
} else {
|
|
@@ -1117,30 +1115,26 @@
|
1117
|
1115
|
this.getList()
|
1118
|
1116
|
},
|
1119
|
1117
|
handleSuccess({ results, header }) {
|
1120
|
|
- console.log("header",header)
|
1121
|
|
- var goods = []
|
|
1118
|
+
|
1122
|
1119
|
if (header != undefined && header.length > 0) {
|
1123
|
1120
|
|
1124
|
1121
|
var isHasMedicalInsuranceLevel = header.includes('*医保等级')
|
1125
|
|
- // console.log("医保等级",isHasMedicalInsuranceLevel)
|
|
1122
|
+
|
1126
|
1123
|
var isHasGoodUnit = header.includes('*单位')
|
1127
|
|
- // console.log("单位",isHasGoodUnit)
|
|
1124
|
+
|
1128
|
1125
|
var isHasStockWarnCount = header.includes('*库存警戒')
|
1129
|
|
- // console.log("库存警戒",isHasStockWarnCount)
|
|
1126
|
+
|
1130
|
1127
|
var isHasManuFacturer = header.includes('*生产厂商')
|
1131
|
|
- // console.log("生产厂商",isHasManuFacturer)
|
1132
|
|
- var isHasDealer = header.includes('*经销商')
|
1133
|
|
- // console.log("经销商",isHasDealer)
|
|
1128
|
+
|
1134
|
1129
|
var isHasGoodName = header.includes('*耗材名称')
|
1135
|
|
- // console.log("耗材名称",isHasGoodName)
|
|
1130
|
+
|
1136
|
1131
|
var isHasGoodKand = header.includes('*耗材种类')
|
1137
|
|
- // console.log("耗材种类",isHasGoodKand)
|
|
1132
|
+
|
1138
|
1133
|
var isHasSpecificationName = header.includes('*规格型号')
|
1139
|
|
- // console.log("规格型号",isHasSpecificationName)
|
|
1134
|
+
|
1140
|
1135
|
var isHasBuyPrice = header.includes('*零价')
|
1141
|
|
- // console.log("零价",isHasBuyPrice)
|
1142
|
|
-
|
1143
|
|
- if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer && isHasDealer && isHasGoodName && isHasGoodKand && isHasSpecificationName && isHasBuyPrice)) {
|
|
1136
|
+
|
|
1137
|
+ if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer && isHasGoodName && isHasGoodKand && isHasSpecificationName && isHasBuyPrice)) {
|
1144
|
1138
|
this.dialogVisible = true
|
1145
|
1139
|
return
|
1146
|
1140
|
}
|
|
@@ -1334,60 +1328,11 @@
|
1334
|
1328
|
|
1335
|
1329
|
}
|
1336
|
1330
|
tableData.push(obj)
|
1337
|
|
- console.log("表哥2222",tableData)
|
1338
|
|
- var goodKind = this.getDictionaryDataConfig('system','good_kind')
|
1339
|
|
-
|
1340
|
|
- // console.log("耗材种类",goodKind)
|
1341
|
|
- // console.log("耗材类型",this.goodType)
|
1342
|
|
- var medicalInsuranceLevel = this.getDictionaryDataConfig('system','medical_insurance_level')
|
1343
|
|
- // console.log("医保等级",medicalInsuranceLevel)
|
1344
|
|
- // console.log("生产厂商",this.manufacturers)
|
1345
|
|
- // console.log("经销商",this.dealers)
|
1346
|
|
- var statisticsCategory = getDictionaryDataConfig('system','statistics_category')
|
1347
|
|
- // console.log("统计分类",statisticsCategory)
|
1348
|
|
-
|
1349
|
1331
|
var goodUnit = this.$store.getters.good_unit
|
1350
|
1332
|
|
1351
|
1333
|
|
1352
|
1334
|
for(let i=0;i<tableData.length;i++){
|
1353
|
|
- for(let j=0;j<goodKind.length;j++){
|
1354
|
|
-
|
1355
|
|
- if(tableData[i].good_kind == goodKind[j].name){
|
1356
|
|
- tableData[i].good_kind_id = goodKind[j].id
|
1357
|
|
- }
|
1358
|
|
- }
|
1359
|
|
-
|
1360
|
|
- for(let z=0;z<this.goodType.length;z++){
|
1361
|
|
- if(tableData[i].type_name == this.goodType[z].type_name){
|
1362
|
|
- tableData[i].good_type_id = this.goodType[z].id
|
1363
|
|
- }
|
1364
|
|
- }
|
1365
|
|
-
|
1366
|
|
- for(let y=0;y<medicalInsuranceLevel.length;y++){
|
1367
|
|
- if(tableData[i].medical_insurance_level == medicalInsuranceLevel[y].name){
|
1368
|
|
- tableData[i].medical_insurance_id = medicalInsuranceLevel[y].id
|
1369
|
|
- }
|
1370
|
|
- }
|
1371
|
|
-
|
1372
|
|
-
|
1373
|
|
- for(let a=0;a<this.manufacturers.length;a++){
|
1374
|
|
- if(tableData[i].manufacturer == this.manufacturers[a].manufacturer_name){
|
1375
|
|
- tableData[i].manufacturer_id = this.manufacturers[a].id
|
1376
|
|
- }
|
1377
|
|
- }
|
1378
|
|
-
|
1379
|
|
- for(let s=0;s<this.dealers.length;s++){
|
1380
|
|
- if(tableData[i].dealer == this.dealers[s].dealer_name){
|
1381
|
|
- tableData[i].dealer_id = this.dealers[s].id
|
1382
|
|
- }
|
1383
|
|
- }
|
1384
|
|
-
|
1385
|
|
- for(let h=0;h<statisticsCategory.length;h++){
|
1386
|
|
- if(tableData[i].statistics_category == statisticsCategory[h].name){
|
1387
|
|
- tableData[i].statistic_id = statisticsCategory[h].id
|
1388
|
|
- }
|
1389
|
|
- }
|
1390
|
|
-
|
|
1335
|
+
|
1391
|
1336
|
for(let c=0;c<goodUnit.length;c++){
|
1392
|
1337
|
if(tableData[i].good_unit == goodUnit[c].name){
|
1393
|
1338
|
tableData[i].unit_id = goodUnit[c].id
|
|
@@ -1458,8 +1403,9 @@
|
1458
|
1403
|
if(response.data.state == 1){
|
1459
|
1404
|
var msg = response.data.data.msg
|
1460
|
1405
|
this.$message.success("导入成功!")
|
|
1406
|
+ this.getList()
|
1461
|
1407
|
}else{
|
1462
|
|
- this.$message.error("导入失败")
|
|
1408
|
+ this.$message.error("导入失败,请下载日志查看")
|
1463
|
1409
|
}
|
1464
|
1410
|
})
|
1465
|
1411
|
},
|