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. 111
      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) => {
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) => {
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 {
baseURL: 'https://huorantech.cn/',
// baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.151:9000/',
// baseURL: 'http://121.37.12.51/',
baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

@ -103,5 +103,17 @@ export default {
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="name">客户名称</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 class="line" v-if="form.customerName">
<view class="name">省份</view>
@ -552,6 +555,11 @@
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' : ''}`)
},
//
toClient() {
uni.setStorageSync('courses', this.courseList)
this.$util.to(`/order/clientDetail/clientDetail`)
},
//
delCourse(c, i) {
const that = this
@ -887,6 +895,16 @@
bottom: 100rpx;
}
}
.form-list {
.customer-wrap {
text-align: right;
}
.create {
margin-top: 10rpx;
font-size: 20rpx;
color: #f00;
}
}
.pro-wrap {
position: relative;
padding: 0;

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

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

@ -11,11 +11,11 @@
</view>
<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>
<view class="text">客户</view>
</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>
<view class="text">方案</view>
</li>
@ -23,7 +23,7 @@
<image class="icon" src="@/static/image/index/index5.png" mode="widthFix"></image>
<view class="text">订单</view>
</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>
<view class="text">产品</view>
</li>

Loading…
Cancel
Save