master
yujialong 1 year ago
parent 7aa59bf42d
commit 60e10283cd
  1. 8
      apis/modules/parner.js
  2. 44
      apis/modules/product.js
  3. 4
      config/request.js
  4. 14
      libs/util.js
  5. 0
      order/clientDetail/clientDetail.vue
  6. 0
      order/clients/clients.vue
  7. 20
      order/orderDetail/orderDetail.vue
  8. 98
      order/products/products.vue
  9. 325
      pages.json
  10. 6
      pages/index/index.vue
  11. 0
      team/account/account.vue
  12. 0
      team/addStaff/addStaff.vue
  13. 0
      team/editTeam/editTeam.vue
  14. 0
      team/email/email.vue
  15. 0
      team/password/password.vue
  16. 0
      team/phone/phone.vue
  17. 0
      team/plans/plans.vue
  18. 0
      team/qrcode/qrcode.vue
  19. 0
      team/send/send.vue
  20. 0
      team/setting/setting.vue
  21. 0
      team/teamDetail/teamDetail.vue

@ -40,3 +40,11 @@ export const queryTeamMembers = (data) => {
export const updatePartner = (data) => { export const updatePartner = (data) => {
return post('nakadai/nakadai/partnerClassification/update', data) return post('nakadai/nakadai/partnerClassification/update', data)
} }
export const editProvinceCity = data => {
return post(`nakadai/nakadai/partner-team/editProvinceCity`, data)
}
export const getPartnerTeamRates = data => {
return post(`nakadai/nakadai/partner-team/getPartnerTeamRates`, data)
}

@ -4,3 +4,47 @@ const { get, post } = request
export const AppletsDataProductList = (data) => { export const AppletsDataProductList = (data) => {
return post('nakadai/nakadai/dataProduct/AppletsDataProductList', data) return post('nakadai/nakadai/dataProduct/AppletsDataProductList', data)
} }
export const tagsList = () => {
return get('nakadai/tags/tagsList')
}
export const listOfGoods = (data) => {
return post('nakadai/mall/listOfGoods', data)
}
export const detailsOfGoods = (id) => {
return get('nakadai/mall/detailsOfGoods?mallId=' + id)
}
export const productCategoryList = () => {
return get('nakadai/productClassification/productCategoryList')
}
export const productTypeList = () => {
return get('nakadai/productType/productTypeList')
}
export const addToShoppingCart = (data) => {
return post('nakadai/mini/program/shopping/cart/addToShoppingCart', data)
}
export const delCart = (data) => {
return post('nakadai/mini/program/shopping/cart/batchDeletion', data)
}
export const shoppingCartList = (data) => {
return post('nakadai/mini/program/shopping/cart/shoppingCartList', data)
}
export const courseDiscipline = () => {
return get('nakadai/nakadai/subject/courseDiscipline')
}
export const courseProfessionalClass = id => {
return get('nakadai/nakadai/subject/courseProfessionalClass?disciplineId=' + id)
}
export const courseProfessional = id => {
return get('nakadai/nakadai/subject/courseProfessional?professionalClassId=' + id)
}

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

@ -103,5 +103,17 @@ export default {
uni.hideLoading() uni.hideLoading()
} }
}) })
} },
// 产品管理的产品分类(classificationId)有6个,订单管理的产品分类(authority)有5个,后者是由前者决定的,但是id不一样。把产品管理的分类id传入这个函数,即可返回订单的分类id
getOrderType(id) {
if (id == 1 || id == 2) return 1
if (id == 3) return 2
if (id == 4) return 3
if (id == 5) return 0
if (id == 6) return 4
},
// 去掉html标签
removeTag(str) {
return str.replace(/(<[^>]+>)|((&nbsp;)+)/g , '')
},
} }

@ -6,7 +6,10 @@
<view :class="['line req', {err: err === 'customerName'}]"> <view :class="['line req', {err: err === 'customerName'}]">
<view class="name">客户名称</view> <view class="name">客户名称</view>
<view v-if="orderId" class="val">{{ form.customerName }}</view> <view v-if="orderId" class="val">{{ form.customerName }}</view>
<view v-else :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view> <view v-else class="customer-wrap">
<view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view>
<view class="create" @click="toClient">找不到客户马上创建</view>
</view>
</view> </view>
<view class="line" v-if="form.customerName"> <view class="line" v-if="form.customerName">
<view class="name">省份</view> <view class="name">省份</view>
@ -552,6 +555,11 @@
const { customerId, orderType } = this.form const { customerId, orderType } = this.form
this.$util.to(`../editCourse/editCourse?orderType=${orderType}&customerId=${customerId}&action=${this.isEdit ? 'edit' : this.isRenew ? 'renew' : this.isHandle ? 'handle' : !this.orderId ? 'add' : ''}`) this.$util.to(`../editCourse/editCourse?orderType=${orderType}&customerId=${customerId}&action=${this.isEdit ? 'edit' : this.isRenew ? 'renew' : this.isHandle ? 'handle' : !this.orderId ? 'add' : ''}`)
}, },
//
toClient() {
uni.setStorageSync('courses', this.courseList)
this.$util.to(`/order/clientDetail/clientDetail`)
},
// //
delCourse(c, i) { delCourse(c, i) {
const that = this const that = this
@ -887,6 +895,16 @@
bottom: 100rpx; bottom: 100rpx;
} }
} }
.form-list {
.customer-wrap {
text-align: right;
}
.create {
margin-top: 10rpx;
font-size: 20rpx;
color: #f00;
}
}
.pro-wrap { .pro-wrap {
position: relative; position: relative;
padding: 0; padding: 0;

@ -5,8 +5,14 @@
<view :class="['sort', sort]" @click="switchSort"></view> <view :class="['sort', sort]" @click="switchSort"></view>
</view> </view>
<ul class="tab"> <ul class="tab-wrap">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li> <view class="tab">
<li :class="{active: curTab === ''}" @click="tabChange('')">全部</li>
</view>
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab tab-scroll">
<li v-for="(tab, i) in tabs" :key="i" :class="{active: curTab === tab.id}" @click="tabChange(tab.id)">{{ tab.name }}</li>
</scroll-view>
</ul> </ul>
<ul class="list"> <ul class="list">
@ -19,25 +25,20 @@
<view class="line"> <view class="line">
<text class="name">产品简介</text> <text class="name">产品简介</text>
<view class="val ell-wrap"> <view class="val ell-wrap">
<view :class="{ell: !item.toggle}">{{ item.briefIntroduction }}</view> <view class="ell">{{ item.productIntroduction }}</view>
<view class="toggle" @click="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
</view> </view>
</view> </view>
<view class="line"> <view class="line">
<text class="name">产品类型</text> <text class="name">产品类型</text>
<text class="val">{{ tabs.find(e => e.id === item.productType).name }}</text> <text class="val">{{ item.typeName }}</text>
</view>
<view class="line">
<text class="name">市场单价</text>
<text class="val">{{ item.marketPrice }}/</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">结算方式</text> <text class="name">适用专业</text>
<text class="val">{{ item.settlementMethod ? '比例分成' : '结算单价' }}</text> <text class="val">{{ item.professionalName }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">供应厂商</text> <text class="name">市场建议单价</text>
<text class="val">{{ item.supplierName }}</text> <text class="val">{{ item.marketUnitPrice }}/</text>
</view> </view>
</view> </view>
</li> </li>
@ -47,29 +48,12 @@
</template> </template>
<script> <script>
import { AppletsDataProductList } from '@/apis/modules/product.js' import { productCategoryList, listOfGoods } from '@/apis/modules/product.js'
export default { export default {
data() { data() {
return { return {
curTab: '', curTab: '',
tabs: [ tabs: [],
{
name: '全部',
id: ''
},
{
name: '实训课程',
id: 1
},
{
name: '理论课程',
id: 0
},
{
name: '数据产品',
id: 2
}
],
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
@ -104,25 +88,28 @@
} }
}, },
onShow() { onShow() {
this.getFilter()
this.initList() this.initList()
}, },
methods: { methods: {
getList() { getList() {
AppletsDataProductList({ listOfGoods({
sort: this.sort,
keywords: this.keyword,
productType: this.curTab,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize pageSize: this.pageSize,
}).then(({ data }) => { sort: this.sort == 'desc' ? 2 : 5,
isShelves: 0,
productClassification: this.curTab,
hotTag: 1,
productName: this.keyword,
}).then(({ page }) => {
// list // list
const list = data.records const list = page.records
list.map(e => { list.map(e => {
e.toggle = e.briefIntroduction.length < 14 // 14 e.productIntroduction = this.$util.removeTag(e.productIntroduction)
}) })
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1 this.page++ // page+1
const noMore = this.list.length === data.total // const noMore = this.list.length === page.total //
this.status = noMore ? 'noMore' : 'more' // noMore this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1 this.reachBottom = noMore ? -1 : 0 // -1
}).catch(e => {}) }).catch(e => {})
@ -132,9 +119,18 @@
this.reachBottom = 0 this.reachBottom = 0
this.getList() this.getList()
}, },
// //
toggle(item) { getFilter() {
item.toggle = !item.toggle console.log(11)
//
productCategoryList().then(res => {
const list = res.classificationList
list.forEach(e => {
e.id = e.classificationId
e.name = e.classificationName
})
this.tabs = list
}).catch(e => {})
}, },
// //
switchSort() { switchSort() {
@ -142,8 +138,8 @@
this.initList() this.initList()
}, },
// tab // tab
tabChange(tab) { tabChange(id) {
this.curTab = tab.id this.curTab = id
this.initList() this.initList()
} }
} }
@ -162,6 +158,16 @@
margin-left: 10%; margin-left: 10%;
} }
} }
.tab-wrap {
display: flex;
.tab-scroll {
width: calc(100% - 100rpx);
white-space: nowrap;
li {
display: inline-block;
}
}
}
.list { .list {
li { li {
padding: 0 24rpx; padding: 0 24rpx;

@ -16,54 +16,6 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path" : "pages/qrcode/qrcode",
"style" :
{
"navigationBarTitleText": "邀请加入",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/clients/clients",
"style" :
{
"navigationBarTitleText": "客户列表",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/products/products",
"style" :
{
"navigationBarTitleText": "产品",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/clientDetail/clientDetail",
"style" :
{
"navigationBarTitleText": "客户详情",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/addStaff/addStaff",
"style" :
{
"navigationBarTitleText": "邀请成员",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/plans/plans",
"style" :
{
"navigationBarTitleText": "产品方案",
"enablePullDownRefresh": false
}
},
{ {
"path" : "pages/person/person", "path" : "pages/person/person",
"style" : "style" :
@ -71,30 +23,6 @@
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path" : "pages/send/send",
"style" :
{
"navigationBarTitleText": "下载发送",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/password/password",
"style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/setting/setting",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
}, },
{ {
"path" : "pages/teams/teams", "path" : "pages/teams/teams",
@ -103,102 +31,181 @@
"navigationBarTitleText": "合伙人", "navigationBarTitleText": "合伙人",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},
{
"path" : "pages/account/account",
"style" :
{
"navigationBarTitleText": "修改账号",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/phone/phone",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/email/email",
"style" :
{
"navigationBarTitleText": "修改邮箱",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/teamDetail/teamDetail",
"style" :
{
"navigationBarTitleText": "团队成员",
"enablePullDownRefresh": false
}
}
,{
"path" : "pages/editTeam/editTeam",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
} }
], ],
"subPackages": [{ "subPackages": [
"root": "order", {
"pages": [ "root": "order",
{ "pages": [
"path": "orders/orders",
"style" :
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
}
},
{
"path" : "addCourse/addCourse",
"style" :
{ {
"navigationBarTitleText": "选择产品", "path" : "clients/clients",
"enablePullDownRefresh": true "style" :
} {
}, "navigationBarTitleText": "客户列表",
{ "enablePullDownRefresh": true
"path" : "orderDetail/orderDetail", }
"style" : },
{
"path" : "clientDetail/clientDetail",
"style" :
{
"navigationBarTitleText": "客户详情",
"enablePullDownRefresh": false
}
},
{
"path" : "products/products",
"style" :
{
"navigationBarTitleText": "产品",
"enablePullDownRefresh": true
}
},
{ {
"navigationBarTitleText": "订单详情", "path": "orders/orders",
"enablePullDownRefresh": false "style" :
{
"navigationBarTitleText": "订单列表",
"enablePullDownRefresh": true
}
},
{
"path" : "addCourse/addCourse",
"style" :
{
"navigationBarTitleText": "选择产品",
"enablePullDownRefresh": true
}
},
{
"path" : "orderDetail/orderDetail",
"style" :
{
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false
}
},
{
"path" : "ordered/ordered",
"style" :
{
"navigationBarTitleText": "已订阅产品",
"enablePullDownRefresh": false
}
},
{
"path" : "editCourse/editCourse",
"style" :
{
"navigationBarTitleText": "编辑产品",
"enablePullDownRefresh": false
}
},
{
"path" : "curClient/curClient",
"style" :
{
"navigationBarTitleText": "订单记录",
"enablePullDownRefresh": false
}
} }
}, ]
{ },
"path" : "ordered/ordered", {
"style" : "root": "team",
"pages": [
{ {
"navigationBarTitleText": "已订阅产品", "path" : "account/account",
"enablePullDownRefresh": false "style" :
{
"navigationBarTitleText": "修改账号",
"enablePullDownRefresh": false
}
}
,{
"path" : "phone/phone",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
} }
}, ,{
{ "path" : "email/email",
"path" : "editCourse/editCourse", "style" :
"style" : {
"navigationBarTitleText": "修改邮箱",
"enablePullDownRefresh": false
}
}
,{
"path" : "teamDetail/teamDetail",
"style" :
{
"navigationBarTitleText": "团队成员",
"enablePullDownRefresh": false
}
}
,{
"path" : "editTeam/editTeam",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "send/send",
"style" :
{
"navigationBarTitleText": "下载发送",
"enablePullDownRefresh": false
}
},
{ {
"navigationBarTitleText": "编辑产品", "path" : "password/password",
"enablePullDownRefresh": false "style" :
{
"navigationBarTitleText": "修改密码",
"enablePullDownRefresh": false
}
},
{
"path" : "setting/setting",
"style" :
{
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
},
{
"path" : "qrcode/qrcode",
"style" :
{
"navigationBarTitleText": "邀请加入",
"enablePullDownRefresh": false
}
},
{
"path" : "addStaff/addStaff",
"style" :
{
"navigationBarTitleText": "邀请成员",
"enablePullDownRefresh": false
}
},
{
"path" : "plans/plans",
"style" :
{
"navigationBarTitleText": "产品方案",
"enablePullDownRefresh": false
}
} }
}, ]
{ }
"path" : "curClient/curClient", ],
"style" :
{
"navigationBarTitleText": "订单记录",
"enablePullDownRefresh": false
}
}
]
}],
"preloadRule": { "preloadRule": {
"pages/index/index": { "pages/index/index": {
"network": "all", "network": "all",

@ -11,11 +11,11 @@
</view> </view>
<ul class="entry"> <ul class="entry">
<li v-if="auth('客户管理')" @click="$util.to('../clients/clients')"> <li v-if="auth('客户管理')" @click="$util.to('/order/clients/clients')">
<image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index3.png" mode="widthFix"></image>
<view class="text">客户</view> <view class="text">客户</view>
</li> </li>
<li @click="$util.to('../plans/plans')"> <li @click="$util.to('/team/plans/plans')">
<image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index4.png" mode="widthFix"></image>
<view class="text">方案</view> <view class="text">方案</view>
</li> </li>
@ -23,7 +23,7 @@
<image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view> <view class="text">订单</view>
</li> </li>
<li @click="$util.to('../products/products')"> <li @click="$util.to('/order/products/products')">
<image class="icon" src="@/static/image/index/index6.png" mode="widthFix"></image> <image class="icon" src="@/static/image/index/index6.png" mode="widthFix"></image>
<view class="text">产品</view> <view class="text">产品</view>
</li> </li>

Loading…
Cancel
Save