123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522 |
- package pkg2024
- import (
- "zhiyuan/pkg/utils"
- )
- type ShowFunction func(context *ItemContext) bool
- type IntArrayFunction func(context *ItemContext) []int64
- type Brand struct {
- Name string `json:"name"`
- Supplier int64 `json:"supplier"`
- }
- type Region struct {
- Material int64
- MaterialName string
- Brand int
- Series int
- }
- type RegionFrom struct {
- SpaceType int `form:"space_type" json:"space_type"`
- SpaceIndex int `form:"space_index" json:"space_index"`
- Index int `form:"index" json:"index"`
- Material int64 `form:"material" json:"material"`
- Brand int `form:"brand" json:"brand"`
- Series int `form:"series" json:"series"`
- }
- type RegionObject struct {
- Name string
- Type []int64
- DefaultCalc ItemJudgmentFunction
- DefaultMaterialCalc ItemIntFunction
- DefaultMaterial map[int]int64
- Brand []Brand
- DefaultBrand map[int]int
- Series [][]string
- DefaultSeries map[int]int
- Note string
- Unit string
- ControlPrice map[int]float64
- Convert map[int64]float64
- Convert1 map[int64]float64
- ShowCalc ShowFunction
- SupplierCalc IntArrayFunction
- MaterialPriceCalc ItemNumberFunction
- }
- func (region RegionObject) Show(context *ItemContext) bool {
- if region.ShowCalc != nil {
- return region.ShowCalc(context)
- }
- return true
- }
- func (region RegionObject) Suppliers(context *ItemContext) []int64 {
- if region.SupplierCalc != nil {
- return region.SupplierCalc(context)
- }
- return nil
- }
- type RegionData map[int][]map[int]Region
- var Regions = map[int][]RegionObject{
- -1: {
- {
- Name: "开关面板",
- Brand: []Brand{{"伊诺", 21}, {"公牛", 120}},
- Series: [][]string{
- {"月光白", "月光灰", "千金系列宝石灰", "千金系列宝石蓝", "E10系列白色", "E6象牙白", "E6肤感灰"},
- {"G12系列白色", "G12系列金色", "G12系列灰色", "G37系列白色", "G37系列金色", "G37系列灰色", "G33系列白色", "G33系列金色", "G33系列灰色"},
- },
- MaterialPriceCalc: func(context *ItemContext) (float64, error) {
- prices := [][]float64{{9.8, 9.8, 8, 8, 5.5, 5.5, 5.5}, {9.8, 9.8, 9.8, 8, 8, 8, 5.5, 5.5, 5.5}}
- num := 65
- if context.Pkg.RoomData.Pkg.Layout[0] > 2 {
- num += (context.Pkg.RoomData.Pkg.Layout[0] - 2) * 13
- }
- if context.Pkg.RoomData.Pkg.Layout[1] > 2 {
- num += (context.Pkg.RoomData.Pkg.Layout[1] - 2) * 16
- }
- if context.Pkg.RoomData.Pkg.Layout[3] > 1 {
- num += (context.Pkg.RoomData.Pkg.Layout[3] - 1) * 4
- }
- if context.Pkg.RoomData.Pkg.Layout[4] > 1 {
- num += (context.Pkg.RoomData.Pkg.Layout[4] - 1) * 3
- }
- return utils.FloatMul(prices[context.Region.Brand][context.Region.Series], float64(num), -1), nil
- },
- Unit: "套",
- DefaultBrand: map[int]int{A10: 0, A8: 0, A5: 0, ZZ1_0: 0},
- DefaultSeries: map[int]int{A10: 0, A8: 2, A5: 4, ZZ1_0: 2},
- },
- {
- Name: "地漏", Type: []int64{129},
- DefaultMaterial: map[int]int64{A10: 4776, A8: 4776, A5: 4776, ZZ1_0: 4776},
- Note: "全房地漏数量不限",
- ControlPrice: map[int]float64{A10: 21, A8: 28, A5: 21, ZZ1_0: 28},
- Unit: "个",
- },
- {
- Name: "角阀", Type: []int64{29},
- DefaultMaterial: map[int]int64{A10: 4779, A8: 4779, A5: 4779, ZZ1_0: 4779},
- Note: "含热水器角阀",
- ControlPrice: map[int]float64{A10: 17, A8: 17, A5: 17, ZZ1_0: 17},
- Unit: "个",
- },
- {
- Name: "窗台石", Type: []int64{190},
- DefaultMaterial: map[int]int64{A10: 47, A8: 47, A5: 47, ZZ1_0: 47},
- Note: "全房窗台石(不含阳台区域)",
- Unit: "m",
- },
- {
- Name: "门槛石", Type: []int64{189},
- DefaultMaterial: map[int]int64{A10: 50, A8: 50, A5: 50, ZZ1_0: 50},
- Note: "全房门槛石(不含阳台区域)",
- Unit: "m",
- },
- },
- 0: {
- {
- Name: "木门", Type: []int64{90},
- DefaultMaterial: map[int]int64{A10: 5309, A8: 5368, A5: 1259, ZZ1_0: 5368},
- Note: "1、房门标准尺寸为房门标准尺寸为2100*900*300mm,门洞高度每超10mm,加收15元;宽度每超10mm,加收15元;墙厚每超10mm,加收25元。\n2、单户限选一个品牌",
- ControlPrice: map[int]float64{A10: 1300, A8: 850, A5: 700, ZZ1_0: 850},
- Unit: "个",
- },
- {
- Name: "地面", Type: []int64{110, 10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4690, A8: 4699, A5: 430, ZZ1_0: 4699},
- Note: "1、限选一个品牌,每增加一个品牌加200元。",
- Convert: map[int64]float64{110: 1, 10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 92, A8: 84, A5: 70, ZZ1_0: 84},
- Unit: "m²",
- },
- },
- 1: {
- {
- Name: "入户门套", Type: []int64{92},
- DefaultMaterial: map[int]int64{A10: 4883, A8: 4883, A5: 0, ZZ1_0: 4883},
- ControlPrice: map[int]float64{A10: 90, A8: 90, A5: 0, ZZ1_0: 90},
- Unit: "m",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type != A5
- },
- },
- {
- Name: "地面", Type: []int64{110, 10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4655, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套",
- Convert: map[int64]float64{110: 1, 10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56},
- Unit: "m²",
- },
- {
- Name: "筒灯或灯带", Type: []int64{230},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 6496},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 8},
- Unit: "套",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- },
- 2: {
- {
- Name: "铝合金门", Type: []int64{106, 105},
- DefaultMaterial: map[int]int64{A10: 1603, A8: 1603, A5: 1602, ZZ1_0: 1603},
- Note: "1、铝合金平开门标准尺寸:2000*750*280mm\n2、单户限选一个品牌",
- Convert: map[int64]float64{105: 1, 106: 3.52}, Convert1: map[int64]float64{105: 1, 106: 1 / 3.52},
- ControlPrice: map[int]float64{A10: 1513.6, A8: 1418.56, A5: 700, ZZ1_0: 403}},
- {
- Name: "门套", Type: []int64{109, 108},
- DefaultMaterial: map[int]int64{A10: 1606, A8: 1606, A5: 0, ZZ1_0: 1606},
- ControlPrice: map[int]float64{A10: 90, A8: 90, A5: 0, ZZ1_0: 90}, Unit: "m",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type != A5
- },
- },
- {
- Name: "墙砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 163, A8: 4618, A5: 4968, ZZ1_0: 4618},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 31, ZZ1_0: 56},
- Unit: "m²",
- },
- {
- Name: "地砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4990, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套\n2、地砖同墙砖品牌",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56},
- Unit: "m²",
- },
- {
- Name: "橱柜", Brand: []Brand{{"金牌", 118}, {"德莎", 14}, {"阳光木业", 24}},
- DefaultBrand: map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1},
- },
- {
- Name: "橱柜地柜", Type: []int64{118},
- /*DefaultCalc: func(context *ItemContext) (bool, error) {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- material := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][5].Material
- mat := context.GetMat(material)
- if mat == nil {
- return true, nil
- }
- return mat.SupplierId != brands[brand], nil
- },*/
- DefaultMaterialCalc: func(context *ItemContext) (int64, error) {
- materials := map[int][]int64{A10: {5475, 5451, 5533}, A8: {5475, 5157, 5533}, A5: {5475, 5157, 5533}, ZZ1_0: {5475, 5157, 5533}}
- brand := map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1}[context.Pkg.RoomData.Pkg.Type]
- if len(context.Pkg.RegionData[context.SpaceType]) > context.SpaceIndex {
- brand = context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- }
- return materials[context.Pkg.RoomData.Pkg.Type][brand], nil
- },
- Note: "橱柜柜体为实木颗粒防潮板",
- ControlPrice: map[int]float64{A10: 592, A8: 460, A5: 306, ZZ1_0: 350},
- Unit: "m",
- SupplierCalc: func(context *ItemContext) []int64 {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- return []int64{brands[brand]}
- },
- },
- {
- Name: "橱柜吊柜", Type: []int64{117},
- /*DefaultCalc: func(context *ItemContext) (bool, error) {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- material := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][6].Material
- mat := context.GetMat(material)
- if mat == nil {
- return true, nil
- }
- return mat.SupplierId != brands[brand], nil
- },*/
- DefaultMaterialCalc: func(context *ItemContext) (int64, error) {
- materials := map[int][]int64{A10: {5498, 5463, 5535}, A8: {5498, 5170, 5535}, A5: {5498, 5170, 5535}, ZZ1_0: {5498, 5170, 5535}}
- brand := map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1}[context.Pkg.RoomData.Pkg.Type]
- if len(context.Pkg.RegionData[context.SpaceType]) > context.SpaceIndex {
- brand = context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- }
- return materials[context.Pkg.RoomData.Pkg.Type][brand], nil
- },
- Note: "橱柜柜体为实木颗粒防潮板",
- ControlPrice: map[int]float64{A10: 434, A8: 170, A5: 294, ZZ1_0: 310},
- Unit: "m",
- SupplierCalc: func(context *ItemContext) []int64 {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- return []int64{brands[brand]}
- },
- },
- {
- Name: "橱柜台面", Type: []int64{119},
- /*DefaultCalc: func(context *ItemContext) (bool, error) {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- material := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][7].Material
- mat := context.GetMat(material)
- if mat == nil {
- return true, nil
- }
- return mat.SupplierId != brands[brand], nil
- },*/
- DefaultMaterialCalc: func(context *ItemContext) (int64, error) {
- materials := map[int][]int64{A10: {5231, 5206, 5534}, A8: {5231, 5182, 5534}, A5: {5231, 5182, 5534}, ZZ1_0: {5231, 5182, 5534}}
- brand := map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1}[context.Pkg.RoomData.Pkg.Type]
- if len(context.Pkg.RegionData[context.SpaceType]) > context.SpaceIndex {
- brand = context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- }
- return materials[context.Pkg.RoomData.Pkg.Type][brand], nil
- },
- Note: "1、台面须和橱柜同品牌",
- ControlPrice: map[int]float64{A10: 515, A8: 450, A5: 380, ZZ1_0: 420},
- Unit: "m",
- SupplierCalc: func(context *ItemContext) []int64 {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- return []int64{brands[brand]}
- },
- },
- {
- Name: "燃气包管", Type: []int64{114},
- /*DefaultCalc: func(context *ItemContext) (bool, error) {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- material := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][8].Material
- mat := context.GetMat(material)
- if mat == nil {
- return true, nil
- }
- return mat.SupplierId != brands[brand], nil
- },*/
- DefaultMaterialCalc: func(context *ItemContext) (int64, error) {
- materials := []int64{4775, 82, 5538, 82}
- brand := map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1}[context.Pkg.RoomData.Pkg.Type]
- if len(context.Pkg.RegionData[context.SpaceType]) > context.SpaceIndex {
- brand = context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- }
- return materials[brand], nil
- },
- ControlPrice: map[int]float64{A10: 120, A8: 120, A5: 120, ZZ1_0: 120},
- Unit: "根",
- SupplierCalc: func(context *ItemContext) []int64 {
- brands := []int64{118, 14, 24}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- return []int64{brands[brand]}
- },
- },
- {
- Name: "洗菜盆及龙头", Type: []int64{116, 28},
- /*DefaultCalc: func(context *ItemContext) (bool, error) {
- brands := []int64{43, 14, 43}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- material := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][9].Material
- mat := context.GetMat(material)
- if mat == nil {
- return true, nil
- }
- return mat.SupplierId != brands[brand], nil
- },*/
- DefaultMaterialCalc: func(context *ItemContext) (int64, error) {
- materials := []int64{634, 85, 637}
- brand := map[int]int{A10: 0, A8: 1, A5: 2, ZZ1_0: 1}[context.Pkg.RoomData.Pkg.Type]
- if len(context.Pkg.RegionData[context.SpaceType]) > context.SpaceIndex {
- brand = context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- }
- return materials[brand], nil
- },
- Note: "台中盆、台下盆:加价300元/套",
- ControlPrice: map[int]float64{A10: 468, A8: 468, A5: 468, ZZ1_0: 468},
- Unit: "套",
- SupplierCalc: func(context *ItemContext) []int64 {
- brands := [][]int64{{118, 43}, {14}, {24, 43}}
- brand := context.Pkg.RegionData[context.SpaceType][context.SpaceIndex][4].Brand
- return brands[brand]
- },
- },
- {
- Name: "集成吊顶", Type: []int64{128, 188, 187},
- DefaultMaterial: map[int]int64{A10: 4411, A8: 4411, A5: 4411, ZZ1_0: 4411},
- Convert: map[int64]float64{128: 1, 188: 1 / 0.18, 187: 1 / 0.09},
- ControlPrice: map[int]float64{A10: 90, A8: 90, A5: 75, ZZ1_0: 90},
- Unit: "m²",
- },
- {
- Name: "吊顶灯", Type: []int64{131},
- DefaultMaterial: map[int]int64{A10: 5018, A8: 5018, A5: 5018, ZZ1_0: 5018},
- ControlPrice: map[int]float64{A10: 38, A8: 38, A5: 38, ZZ1_0: 38},
- Unit: "个",
- },
- },
- 3: {
- {
- Name: "平开门", Type: []int64{105},
- DefaultMaterial: map[int]int64{A10: 4980, A8: 1601, A5: 1601, ZZ1_0: 4980},
- Note: "1、标配双包门套\n2、单户限选一个品牌",
- ControlPrice: map[int]float64{A10: 865, A8: 780, A5: 780, ZZ1_0: 900},
- Unit: "樘",
- },
- {
- Name: "墙砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 163, A8: 4618, A5: 4968, ZZ1_0: 4618},
- Note: "陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 31, ZZ1_0: 56},
- Unit: "m²",
- },
- {
- Name: "地砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4990, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套\n2、地砖同墙砖品牌",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56}, Unit: "m²",
- ShowCalc: func(context *ItemContext) bool {
- return !context.Space.DryWetSeparation
- },
- },
- {
- Name: "干区地砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4990, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套\n2、地砖同墙砖品牌",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56}, Unit: "m²",
- ShowCalc: func(context *ItemContext) bool {
- return context.Space.DryWetSeparation
- },
- },
- {
- Name: "湿区地砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4990, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套\n2、地砖同墙砖品牌",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56}, Unit: "m²",
- ShowCalc: func(context *ItemContext) bool {
- return context.Space.DryWetSeparation
- },
- },
- {
- Name: "浴室柜(含龙头)", Type: []int64{97},
- DefaultMaterial: map[int]int64{A10: 4884, A8: 1613, A5: 1618, ZZ1_0: 1613},
- Note: "1、一个卫生间选购限1个品牌,每增加一个品牌加价200元/套",
- ControlPrice: map[int]float64{A10: 1630, A8: 1000, A5: 960, ZZ1_0: 1000},
- Unit: "套",
- },
- {
- Name: "淋浴花洒", Type: []int64{98},
- DefaultMaterial: map[int]int64{A10: 4894, A8: 6518, A5: 5133, ZZ1_0: 6518},
- Note: "1、一个卫生间选购限1个品牌,每增加一个品牌加价200元/套",
- ControlPrice: map[int]float64{A10: 650, A8: 390, A5: 400, ZZ1_0: 400},
- Unit: "套",
- },
- {
- Name: "马桶蹲坑", Type: []int64{100, 103},
- DefaultMaterial: map[int]int64{A10: 4892, A8: 897, A5: 32, ZZ1_0: 897},
- Note: "马桶蹲坑二选一",
- ControlPrice: map[int]float64{A10: 720, A8: 450, A5: 500, ZZ1_0: 460},
- Unit: "套",
- },
- {
- Name: "集成吊顶", Type: []int64{128, 188, 187},
- DefaultMaterial: map[int]int64{A10: 4411, A8: 4411, A5: 4411, ZZ1_0: 4411},
- Convert: map[int64]float64{128: 1, 188: 1 / 0.18, 187: 1 / 0.09},
- ControlPrice: map[int]float64{A10: 90, A8: 90, A5: 75, ZZ1_0: 90},
- Unit: "m²",
- },
- //{Name: "吊顶灯", Type: []int64{131}, DefaultMaterial: map[int]int64{A10: 5018, A8: 5018, A5: 5018}, ControlPrice: map[int]float64{A10: 38, A8: 38, A5: 38}, Unit: "个"},
- {
- Name: "浴霸", Type: []int64{130},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 6404},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 242},
- Unit: "个",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- {
- Name: "淋浴隔断", Type: []int64{122},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 127},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 285},
- Unit: "m²",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- {
- Name: "石基", Type: []int64{126},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 137},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 35},
- Unit: "m",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- {
- Name: "五金挂件", Type: []int64{209},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 6504},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 238},
- Unit: "套",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- },
- 4: {
- {
- Name: "墙砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 0, A8: 0, A5: 0, ZZ1_0: 4618},
- Note: "陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 0, A8: 0, A5: 0, ZZ1_0: 56},
- Unit: "m²",
- ShowCalc: func(context *ItemContext) bool {
- return context.Pkg.RoomData.Pkg.Type == ZZ1_0
- },
- },
- {
- Name: "地砖", Type: []int64{10, 9, 7, 6, 5, 4, 3},
- DefaultMaterial: map[int]int64{A10: 4990, A8: 5409, A5: 4966, ZZ1_0: 5409},
- Note: "1、陶瓷类产品选购限2个品牌,每增加一个品牌加价200元/套\n2、地砖同墙砖品牌",
- Convert: map[int64]float64{10: 1 / 0.09, 9: 1 / 0.18, 7: 1 / 1.125, 6: 1 / 0.72, 5: 1 / 0.64, 4: 1 / 0.16, 3: 1 / 0.32},
- ControlPrice: map[int]float64{A10: 81, A8: 56, A5: 36, ZZ1_0: 56},
- Unit: "m²",
- },
- {
- Name: "洗衣机龙头", Type: []int64{27},
- DefaultMaterial: map[int]int64{A10: 4780, A8: 4780, A5: 4780, ZZ1_0: 4780},
- ControlPrice: map[int]float64{A10: 30, A8: 30, A5: 30, ZZ1_0: 30},
- Unit: "个",
- },
- },
- }
- type RegionReturn struct {
- Name string `json:"name"`
- MaterialName string `json:"material_name"`
- Type []int64 `json:"type"`
- BrandList []Brand `json:"brand_list"`
- SeriesList [][]string `json:"series_list"`
- Material int64 `json:"material"`
- Brand int `json:"brand"`
- Series int `json:"series"`
- Index int `json:"index"`
- Note string `json:"note"`
- ControlPrice float64 `json:"control_price"`
- Convert map[int64]float64 `json:"convert"`
- Convert1 map[int64]float64 `json:"convert1"`
- Unit string `json:"unit"`
- Suppliers []int64 `json:"suppliers"`
- }
- type RegionReturns map[int][][]RegionReturn
|