|
@@ -467,34 +467,37 @@
|
467
|
467
|
this.$message.error('请先选择厂商')
|
468
|
468
|
return
|
469
|
469
|
} else {
|
|
470
|
+ this.$refs.dialog.show()
|
470
|
471
|
|
471
|
472
|
// this.isVisibility = true
|
472
|
|
- const params = {
|
473
|
|
- id: this.form.manufacturer
|
474
|
|
- }
|
475
|
|
- this.propForm.goodType = []
|
476
|
|
- GetAllGoodInfoByID(params).then(response => {
|
477
|
|
- if (response.data.state == 0) {
|
478
|
|
- this.$message.error(response.data.msg)
|
479
|
|
- return false
|
480
|
|
- } else {
|
481
|
|
- if (response.data.data.goodInfo.length == 0) {
|
482
|
|
- this.$message.error('该厂商没商品,请添加商品')
|
483
|
|
- } else {
|
484
|
|
- for (let i = 0; i < response.data.data.goodInfo.length; i++) {
|
485
|
|
- this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
|
486
|
|
- }
|
487
|
|
-
|
488
|
|
- const obj = {}
|
489
|
|
- this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
|
490
|
|
- obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
|
491
|
|
- return cur
|
492
|
|
- }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
493
|
|
- this.$refs.dialog.show()
|
494
|
|
-
|
495
|
|
- }
|
496
|
|
- }
|
497
|
|
- })
|
|
473
|
+ // const params = {
|
|
474
|
+ // id: this.form.manufacturer
|
|
475
|
+ // }
|
|
476
|
+ this.propForm.goodType = this.goodType
|
|
477
|
+ //
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+ // GetAllGoodInfoByID(params).then(response => {
|
|
481
|
+ // if (response.data.state == 0) {
|
|
482
|
+ // this.$message.error(response.data.msg)
|
|
483
|
+ // return false
|
|
484
|
+ // } else {
|
|
485
|
+ // if (response.data.data.goodInfo.length == 0) {
|
|
486
|
+ // this.$message.error('该厂商没商品,请添加商品')
|
|
487
|
+ // } else {
|
|
488
|
+ // for (let i = 0; i < response.data.data.goodInfo.length; i++) {
|
|
489
|
+ // this.propForm.goodType.push(response.data.data.goodInfo[i].GoodsType)
|
|
490
|
+ // }
|
|
491
|
+ //
|
|
492
|
+ // const obj = {}
|
|
493
|
+ // this.propForm.goodType = this.propForm.goodType.reduce((cur, next) => {
|
|
494
|
+ // obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
|
|
495
|
+ // return cur
|
|
496
|
+ // }, []) // 设置cur默认类型为数组,并且初始值为空的数组
|
|
497
|
+ //
|
|
498
|
+ // }
|
|
499
|
+ // }
|
|
500
|
+ // })
|
498
|
501
|
}
|
499
|
502
|
}, getSummaries(param) {
|
500
|
503
|
const { columns, data } = param
|