master
yujialong 2 years ago
parent 04d60abd06
commit 2be807f0ee
  1. 8
      apis/modules/client.js
  2. 2
      apis/modules/order.js
  3. 12
      apis/modules/parner.js
  4. 14
      apis/modules/user.js
  5. 2
      apis/request.js
  6. 2
      config/request.js
  7. 16
      order/addCourse/addCourse.vue
  8. 9
      order/editCourse/editCourse.vue
  9. 14
      order/orderDetail/orderDetail.vue
  10. 2
      order/orders/orders.vue
  11. 16
      pages/clientDetail/clientDetail.vue
  12. 2
      pages/clients/clients.vue
  13. 1
      pages/index/index.vue
  14. 2
      pages/products/products.vue
  15. 1
      styles/common.scss

@ -6,11 +6,11 @@ export const queryCustomer = (data) => {
}
export const list = (data) => {
return post('nakadai/applets/customer/getCustomerListBasedOnBusinessManagerId', data)
return post('nakadai/nakadai/applets/customer/getCustomerListBasedOnBusinessManagerId', data)
}
export const all = (data) => {
return post('nakadai/applets/customer/customerList', data)
return post('nakadai/nakadai/applets/customer/customerList', data)
}
export const queryCustomerDetails = (data) => {
@ -46,9 +46,9 @@ export const getProductsSubscribedByCustomers = (data) => {
}
export const getTeamsByAccountId = (data) => {
return post('nakadai/applets/customer/getTeamsByAccountId', data)
return post('nakadai/nakadai/applets/customer/getTeamsByAccountId', data)
}
export const getTheBusinessManagerIdsUnderTheTeam = id => {
return post(`nakadai/applets/customer/getTheBusinessManagerIdsUnderTheTeam?id=${id}`)
return post(`nakadai/nakadai/applets/customer/getTheBusinessManagerIdsUnderTheTeam?id=${id}`)
}

@ -22,7 +22,7 @@ export const renew = (data) => {
}
export const list = (data) => {
return post('nakadai/applets/order/orderList', data)
return post('nakadai/nakadai/applets/order/orderList', data)
}
export const orderList = (data) => {

@ -2,25 +2,25 @@ import request from '@/apis/request.js'
const { get, post } = request
export const savePartnerAccount = (data) => {
return post('nakadai/partnerAccount/savePartnerAccount', data)
return post('nakadai/nakadai/partnerAccount/savePartnerAccount', data)
}
export const teamList = (data) => {
return post('nakadai/partnerAccount/partnerAccountList', data)
return post('nakadai/nakadai/partnerAccount/partnerAccountList', data)
}
export const generateInvitationCode = accountId => {
return post(`nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
return post(`nakadai/nakadai/partnerAccount/generateInvitationCode?accountId=${accountId}`)
}
export const treeList = (data) => {
return post('nakadai/partnerClassification/treeList', data)
return post('nakadai/nakadai/partnerClassification/treeList', data)
}
export const my = (data) => {
return get('nakadai/partner-team/my', data)
return get('nakadai/nakadai/partner-team/my', data)
}
export const mailFileSend = (data) => {
return post('nakadai/partnerAccount/mailFileSend', data)
return post('nakadai/nakadai/partnerAccount/mailFileSend', data)
}

@ -14,7 +14,7 @@ export const examinePassword = (data) => {
}
export const getUserRolesPermissionMenu = (data) => {
return get('users/user-role/getUserRolesPermissionMenu', data)
return get('users/users/user-role/getUserRolesPermissionMenu', data)
}
export const updatePersonCenter = (data) => {
@ -26,27 +26,27 @@ export const queryUserInfoDetails = () => {
}
export const updateMyEmail = (data) => {
return post('nakadai/partner-team/updateMyEmail', data)
return post('nakadai/nakadai/partner-team/updateMyEmail', data)
}
export const mailCodeSend = (data) => {
return post('nakadai/partner-team/mailCodeSend', data)
return post('nakadai/nakadai/partner-team/mailCodeSend', data)
}
export const changeAccount = account => {
return post(`users/applets/mine/changeAccount?account=${account}`)
return post(`users/users/applets/mine/changeAccount?account=${account}`)
}
export const changePhoneNumber = (phone, code) => {
return post(`users/applets/mine/changePhoneNumber?phone=${phone}&code=${code}`)
return post(`users/users/applets/mine/changePhoneNumber?phone=${phone}&code=${code}`)
}
export const checkIfAnAccountExists = account => {
return post(`users/applets/mine/checkIfAnAccountExists?account=${account}`)
return post(`users/users/applets/mine/checkIfAnAccountExists?account=${account}`)
}
export const checkIfThePhoneNumberExists = phone => {
return post(`users/applets/mine/checkIfThePhoneNumberExists?phone=${phone}`)
return post(`users/users/applets/mine/checkIfThePhoneNumberExists?phone=${phone}`)
}
export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars`

@ -19,7 +19,7 @@ const request = options => {
const { url } = options
uni.request({
header,
url: (otherUrl.find(e => url.includes(e)) ? 'http://192.168.31.151:9000/' : config.baseURL) + url,
url: config.baseURL + url,
method: options.method || 'GET', // 请求类型,默认为GET
data: options.data || {}, // 请求参数,默认空对象
success: ({ data }) => {

@ -5,7 +5,7 @@
*/
export default {
baseURL: 'http://192.168.31.151:9000/',
baseURL: 'https://huorantech.cn/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

@ -10,7 +10,8 @@
<ul class="list">
<li v-for="(item, i) in list">
<uni-data-checkbox class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</li>
@ -30,7 +31,7 @@
export default {
data() {
return {
orderType: 0,
orderType: 1,
customerId: '',
curTab: '',
tabs: [
@ -61,6 +62,8 @@
listAll: [],
page: 1,
pageSize: 10,
check: [1],
noCheck: [],
checkData: [{
text: '',
value: 1
@ -108,7 +111,7 @@
//
getList() {
AppletsDataProductList({
sort: '',
sort: 'desc',
keywords: this.keyword,
productType: this.curTab,
pageNum: this.page,
@ -125,12 +128,12 @@
text: '',
value: 1
}
e.check = (all && pageChange) || checked.find(n => n.id === e.id && n.productType === e.productType) ? [1] : []
e.check = (all && pageChange) || checked.find(n => n.id === e.id && n.productType === e.productType) ? 1 : 0
//
if (list.find(n => n.dataOrCourseId == e.id && n.productType == e.productType)) {
//
checkData.disable = true
e.check = [1]
e.check = 1
}
e.checkData = [checkData]
})
@ -159,6 +162,7 @@
const item = this.list[i]
const { id, productType } = item
const include = checked.findIndex(e => e.id === id && e.productType === productType)
console.log(11, this.list, e, i)
// pushpush
if (e.detail.value.length) {
include === -1 && checked.push(item)
@ -249,7 +253,7 @@
Promise.all(promises).then(_ => {
uni.setStorageSync('courses', result) //
uni.redirectTo({
url: `../editCourse/editCourse?customerId=${customerId}`
url: `../editCourse/editCourse?customerId=${customerId}&orderType=${this.orderType}`
})
})
} else {

@ -78,6 +78,7 @@
export default {
data() {
return {
orderType: 1,
customerId: '',
timer: null,
units: [{
@ -114,6 +115,7 @@
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.orderType = options.orderType
this.customerId = options.customerId
this.handleProduct()
},
@ -160,6 +162,7 @@
itemList: that.unitText,
success: ({ tapIndex }) => {
item.options = tapIndex
that.calcDate(item)
}
})
},
@ -242,6 +245,11 @@
},
//
dealSettlePrice(row) {
// 0
if (this.orderType == 2) {
row.settlementPrice = 0
row.serviceFee = 0
} else {
const unit = row.options // 使
const useUnit = row.periodOfUse // 使
let sPrice = ''
@ -264,6 +272,7 @@
if (row.settlementPrice) {
row.serviceFee = (row.settlementPrice * 0.1).toFixed(2)
}
}
},
//
calcDiscount(row) {

@ -76,7 +76,7 @@
</view>
<view class="line">
<view class="label">结算价</view>
<view class="val">{{ item.settlementPrice }}</view>
<view class="val">{{ form.orderType === 2 ? 0 : item.settlementPrice }}</view>
</view>
<view class="line">
<view class="label">折扣率</view>
@ -84,7 +84,7 @@
</view>
<view class="line">
<view class="label">平台服务费</view>
<view class="val">{{ item.serviceFee }}</view>
<view class="val">{{ form.orderType === 2 ? 0 :item.serviceFee }}</view>
</view>
<view class="line done">
<view class="val">成交价格</view>
@ -167,7 +167,7 @@
customerName: '',
profit: 0, //
purchaseCost: 0, //
teamId: uni.getStorageSync('team').teamId,
teamId: uni.getStorageSync('team').id,
businessManagerId: this.$util.getBmId()
},
courseList: {},
@ -389,9 +389,17 @@
总成本和总利润为单个产品的采购成本价和利润的和
*/
list.map(e => {
if (isTrial) {
e.settlementPrice = 0
e.serviceFee = 0
e.finalPrice = 0
e.finalValue = 0
e.discountRate = '0%'
} else {
const curPurchase = +e.settlementPrice + +e.serviceFee
purchase += curPurchase
profit += +e.finalPrice - curPurchase
}
})
form.purchaseCost = isTrial ? 0 : Math.round(purchase)
form.profit = isTrial ? 0 : Math.round(profit)

@ -174,7 +174,7 @@
getList() {
const data = {
businessManagerId: this.$util.getBmId(),
teamId: uni.getStorageSync('team').partnerClassificationId,
teamId: uni.getStorageSync('team').id,
keywords: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,

@ -159,11 +159,13 @@
}, 500)
}
},
onLoad(option) {
this.customerId = option.customerId
this.isDetail = !!option.show
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.customerId = options.customerId
this.isDetail = !!options.show
option.customerId && this.getInfo()
options.customerId && this.getInfo()
//
if (!this.isDetail) {
this.getSchool()
@ -171,8 +173,8 @@
}
//
uni.setNavigationBarTitle({
title: option.customerId ?
(option.show ?
title: options.customerId ?
(options.show ?
'客户详情' :
'编辑客户') :
'新增客户'
@ -294,7 +296,7 @@
uni.hideLoading()
this.$util.sucMsg('编辑成功')
setTimeout(() => {
this.$util.to('../clients/clients')
uni.navigateBack()
}, 1500)
}).catch(res => {})
} else {

@ -142,7 +142,7 @@
getList() {
const data = {
businessManagerId: this.$util.getBmId(),
teamId: uni.getStorageSync('team').teamId,
teamId: uni.getStorageSync('team').id,
customerType: this.customerType,
keywords: this.keyword,
pageNum: this.page,

@ -155,6 +155,7 @@
getTeamsByAccountId().then(({ data }) => {
data.map(e => {
const n = e.partnerClassificationList
e.id = n.id
e.teamId = e.partnerClassificationId
e.partnerClassificationName = n.partnerClassificationName
delete e.partnerClassificationList

@ -73,7 +73,7 @@
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
searchTimer: null,
sort: '',
sort: 'desc',
keyword: '',
list: [],
page: 1,

@ -100,7 +100,6 @@ ul {
}
}
.err {
border-bottom-color: #f00;
.name {
color: #f00;
}

Loading…
Cancel
Save