Commit c8106210 by cen

fix:默认第一个推荐人

1 parent 355416e1
......@@ -49,11 +49,13 @@ export default {
this.updateParams(params, data || [])
},
initData (list) {
const { idKey, data } = this
const { idKey, data,params } = this
console.log(idKey,data)
if (data[idKey]) {
this.currentId = data[idKey]
let item = list.find(i => i.uuid == this.currentId)
console.log(item)
this.$emit('choose', item)
}
this.list = list
......
......@@ -206,7 +206,7 @@ export default {
merchantName: userInfo.shopMerchantName
})
}
// await this.getEmployeeList()
await this.getEmployeeList()
this.getLastUserOrderInfo()
this.getGoodsProduct()
},
......@@ -265,10 +265,18 @@ export default {
const res = await uni.$api.boutiqueApi.getLastUserOrderInfo({
sellerUserId: this.userInfo.subLoginUser.uuid
})
this.$set(this.orderObj, 'employeeName', res.employeeName)
this.$set(this.orderObj, 'defeatEmployeeName', res.employeeName)
this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId
let item = this.employeeList.find(i => i.uuid == res.userId)
if (!item) {
this.$set(this.orderObj, 'employeeName', this.employeeList[0].staffName)
this.$set(this.orderObj, 'defeatEmployeeName', this.employeeList[0].staffName)
this.orderObj.userId = this.employeeList[0].uuid
this.orderObj.referrerId = this.employeeList[0].uuid
} else {
this.$set(this.orderObj, 'employeeName', res.employeeName)
this.$set(this.orderObj, 'defeatEmployeeName', res.employeeName)
this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId
}
},
// 单选框change事件
radioChange(e, val) {
......
......@@ -163,7 +163,8 @@ export default {
this.tabIndex = 0
} else {
const index = this.tabList.findIndex(item => item.value == this.searchObj.orderStatus)
if (index !== -1) this.tabIndex = index !== -1 ? index : 0
console.log(index)
this.tabIndex = index !== -1 ? index : 0
}
this.search()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!