|
@@ -13,6 +13,14 @@ const freightDefault = () =>{
|
|
allAmount:'' // 包邮商品金额
|
|
allAmount:'' // 包邮商品金额
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const freightTempDefault = () =>{
|
|
|
|
+ return {
|
|
|
|
+ id:'', //模板Id
|
|
|
|
+ name:'', // 模板名称
|
|
|
|
+ shopId:'', // 供应商ID
|
|
|
|
+ freightRuleList:[] // 运费规则
|
|
|
|
+ }
|
|
|
|
+}
|
|
const freightMixins = function () {
|
|
const freightMixins = function () {
|
|
return {
|
|
return {
|
|
data() {
|
|
data() {
|
|
@@ -48,8 +56,7 @@ const freightMixins = function () {
|
|
|
|
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
- this.freightTemp.shopId = globalUserData.shopId
|
|
|
|
- this.freightRuleList.push(freightDefault())
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
disabled(value){
|
|
disabled(value){
|
|
@@ -70,9 +77,12 @@ const freightMixins = function () {
|
|
// 新增运费模板
|
|
// 新增运费模板
|
|
handleAddFreight(){
|
|
handleAddFreight(){
|
|
this.templateType = 'add'
|
|
this.templateType = 'add'
|
|
- this.freightTemp.name = ''
|
|
|
|
this.freightRuleList = []
|
|
this.freightRuleList = []
|
|
this.freightRuleList.push(freightDefault())
|
|
this.freightRuleList.push(freightDefault())
|
|
|
|
+ this.freightTemp = freightTempDefault()
|
|
|
|
+ this.freightTemp.shopId = globalUserData.shopId
|
|
|
|
+ console.log('freightRuleList',this.freightRuleList)
|
|
|
|
+ console.log('freightTemp',this.freightTemp)
|
|
this.getFreightArea()
|
|
this.getFreightArea()
|
|
this.handleInitAreas()
|
|
this.handleInitAreas()
|
|
this.dialogFormVisible = true
|
|
this.dialogFormVisible = true
|
|
@@ -94,7 +104,6 @@ const freightMixins = function () {
|
|
},
|
|
},
|
|
// 修改运费规则
|
|
// 修改运费规则
|
|
changeFreightRole(freight,index){
|
|
changeFreightRole(freight,index){
|
|
- console.log('freight',freight)
|
|
|
|
this.freightRulesForm = freight
|
|
this.freightRulesForm = freight
|
|
this.rulesChecked = freight.freeType === 1
|
|
this.rulesChecked = freight.freeType === 1
|
|
this.rulesFormVisible = true
|
|
this.rulesFormVisible = true
|