全部开发完成

master
yujialong 1 year ago
parent 8d2d820c40
commit 693d4852c0
  1. 12
      apis/modules/product.js
  2. 90
      components/filter-popup/filter-popup.vue
  3. 4
      config/request.js
  4. 10
      libs/util.js
  5. 11
      order/addCourse/addCourse.vue
  6. 46
      order/editCourse/editCourse.vue
  7. 172
      order/orderDetail/orderDetail.vue
  8. 43
      order/ordered/ordered.vue
  9. 95
      order/productDetail/productDetail.vue
  10. 124
      order/products/products.vue
  11. 63
      order/shopCart/shopCart.vue
  12. 4
      pages/clients/clients.vue
  13. 10
      pages/index/index.vue
  14. 4
      pages/orders/orders.vue
  15. 7
      pages/person/person.vue
  16. 14
      pages/workbench/workbench.vue
  17. BIN
      static/image/tab1-1.png
  18. BIN
      static/image/tab1.png
  19. BIN
      static/image/tab2-1.png
  20. BIN
      static/image/tab2.png
  21. BIN
      static/image/tab3-1.png
  22. BIN
      static/image/tab3.png
  23. BIN
      static/image/tab4-1.png
  24. BIN
      static/image/tab4.png
  25. BIN
      static/image/workbench/index1.png
  26. 7
      team/article/article.vue
  27. 7
      team/scheme/scheme.vue
  28. 14
      team/send/send.vue
  29. 7
      team/teams/teams.vue

@ -35,4 +35,16 @@ export const delCart = (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)
}

@ -11,12 +11,19 @@
:mask-custom-style="{ background: 'rgba(0, 0, 0, 0.7)' }"
>
<view class="top-title flex-row-sb" v-if="showTop">
<view></view> <view class="popup-title flex-row-c-c">{{ title }}</view
><text class="saasIcon flex-row-c-c" @click="close">&#xe60c;</text>
<view class="popup-title flex-row-c-c">{{ title }}</view>
<text class="saasIcon flex-row-c-c" @click="close">&#xe60c;</text>
</view>
<scroll-view class="select-scroll" scroll-y :style="{ height: `calc( ${height} - 120rpx - 152rpx )` }">
<view class="select-main">
<view v-if="showCategory" class="select-item">
<view class="title">学科专业</view>
<picker mode="multiSelector" v-model="category" @change="change" @columnchange="columnchange" :range="categories" range-key="title">
<view class="category">{{categoryName ? categoryName : '请选择'}}</view>
</picker>
</view>
<view class="select-item" v-for="(item, index) in data" :key="index">
<view class="title"> {{ item.title }} </view>
<view class="tag-list" v-if="!item.children">
@ -59,6 +66,7 @@
</template>
<script>
import { courseDiscipline, courseProfessionalClass, courseProfessional } from '@/apis/modules/product.js'
import Popup from './components/popup.vue';
export default {
components:{
@ -103,6 +111,11 @@ export default {
type: Boolean,
default: true,
},
//
showCategory: {
type: Boolean,
default: false,
},
},
computed: {
//
@ -135,9 +148,19 @@ export default {
},
data() {
return {
originForm: {}
originForm: {},
categoryName:'',
categoryId: '',
professionalCategoryId: '',
professionalId: '',
categories:[],
category: []
}
},
mounted() {
this.getDis()
},
methods: {
//value id
selectTagBuyValueOrId(item, key, keyValue, isRadio) {
@ -172,8 +195,65 @@ export default {
this.acceptForm = this.acceptForm;
},
//
async getDis() {
const { list } = await courseDiscipline()
list.map(e => {
e.id = e.disciplineId
e.title = e.disciplineName
})
this.categories.push(list)
},
//
change(e) {
const i0 = e.detail.value[0]
const i1 = e.detail.value[1]
const i2 = e.detail.value[2]
const i1IsNumber = typeof i1 === 'number'
const i2IsNumber = typeof i2 === 'number'
const list = this.categories
this.categoryId = list[0][i0].id
this.professionalCategoryId = !i1IsNumber ? '' : list[1][i1].id
this.professionalId = !i2IsNumber ? '' : list[2][i2].id
this.categoryName = list[0][i0].title
if (i1IsNumber && list[1].length) this.categoryName += '/' + list[1][i1].title
if (i2IsNumber && list[2].length) this.categoryName += '/' + list[2][i2].title
},
//
async columnchange(e) {
const { column } = e.detail
if (column == 0) {
const { list } = await courseProfessionalClass(this.categories[0][e.detail.value].id)
list.map(e => {
e.id = e.professionalClassId
e.title = e.professionalClassName
})
this.categories[1] = list
this.categories[2] = []
this.$set(this.categories, 1, list)
} else
if (column == 1) {
const { list } = await courseProfessional(this.categories[1][e.detail.value].id)
list.map(e => {
e.id = e.professionalId
e.title = e.professionalName
})
this.categories[2] = list
this.$set(this.categories, 2, list)
}
},
//
finsh() {
if (this.showCategory) {
this.acceptForm.categoryId = this.categoryId
this.acceptForm.professionalCategoryId = this.professionalCategoryId
this.acceptForm.professionalId = this.professionalId
this.acceptForm.categoryName = this.categoryName
}
this.$emit("finsh", this.acceptForm);
this.$emit("input", false);
},
@ -221,6 +301,10 @@ export default {
}
.select-scroll {
}
.category {
margin-top: 10rpx;
font-size: 28rpx;
}
.select-main {
padding: 0 32rpx;
.select-item {

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

@ -108,5 +108,13 @@ 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
},
}

@ -228,9 +228,8 @@
ship: 0, // 01
authority, // 01
options: 2,
miniProgramPictureAddress: e.appletIcon, //
miniProgramPictureAddress: e.appletIcon || '', //
settlementPrice: trial ? 0 : '', //
settlementMethod: e.settlementMethod, // 01
settlementPriceUnit: e.settlementPrice || 0, //
serviceFee: 0 //
}
@ -272,7 +271,6 @@
listPromise.push(new Promise(async (resolve, reject) => {
// id
if (!result.find(n => (n.dataOrCourseId == e.associatedProduct || n.dataOrCourseId == e.dataOrCourseId) && n.authority == e.authority)) {
let authority
//
const res = await queryCitySettlementPrice(e.mallId, this.provinceId, this.cityId)
if (res.mallPrice) e.settlementPrice = res.mallPrice.discountRate
@ -280,22 +278,17 @@
const classId = e.classificationId
const pid = +e.associatedProduct
if (classId == 1 || classId == 2) {
authority = 1
list1.push(pid)
} else if (classId == 3) {
authority = 2
list2.push(pid)
} else if (classId == 4) {
authority = 3
list3.push(pid)
} else if (classId == 5) {
authority = 0
list0.push(pid)
} else if (classId == 6) {
authority = 4
list4.push(pid)
}
result.push(this.createParam(e, authority))
result.push(this.createParam(e, this.$util.getOrderType(classId)))
resolve()
} else {
resolve()

@ -76,6 +76,7 @@
<script>
import { getOrderOtherTime } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js'
import { productCategoryList } from '@/apis/modules/product.js'
export default {
data() {
return {
@ -128,34 +129,21 @@
//
handleProduct() {
const list = uni.getStorageSync('courses')
const courses = {
practice: {
shrink: false,
name: '实训课程产品',
list: []
},
theory: {
shrink: false,
name: '理论课程产品',
list: []
},
data: {
shrink: false,
name: '数据产品',
list: []
}
}
// 3push(0-> 1- 2 )
list.map(e => {
const type = e.productType
!type ?
courses.theory.list.push(e) :
type === 1 ?
courses.practice.list.push(e) :
courses.data.list.push(e)
})
this.courses = courses
let courses = {}
//
productCategoryList().then(res => {
res.classificationList.forEach(e => {
courses['list' + this.$util.getOrderType(e.classificationId)] = {
shrink: false,
name: e.classificationName,
list: []
}
})
list.map(e => {
courses['list' + e.authority].list.push(e)
})
this.courses = courses
}).catch(e => {})
try {
uni.removeStorageSync('courses')
} catch (e) {}
@ -337,7 +325,7 @@
},
//
submit() {
const courses = this.courses
const { courses } = this
const list = []
let msg = ''
// push便

@ -66,16 +66,19 @@
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image>
{{ item.productName }}
</view>
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
<view class="course-action">
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image>
<button v-if="item.authority == 3 || item.authority == 4" class="info-btn" type="primary" @click.stop="showShip(item)">发货信息</button>
</view>
</view>
<view class="info">
<view class="line">
<view class="label">使用期限</view>
<view class="val">{{ item.startTime + ' - ' + item.endTime }}</view>
<view class="val">{{ item.startTime + (item.endTime ? ' - ' + item.endTime : '') }}</view>
</view>
<view class="line">
<view class="label">市场价</view>
<view class="val">{{ item.marketValue }}</view>
<view class="val">{{ item.marketValue && item.marketValue + '元' }}</view>
</view>
<view class="line">
<view class="label">结算价</view>
@ -135,12 +138,16 @@
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view>
</view>
</view>
<uni-popup ref="info" type="bottom" background-color="#fff">
<view class="ship-info" v-html="shipInfo" @click="copy"></view>
</uni-popup>
</view>
</template>
<script>
import { productCategoryList, delCart } from '@/apis/modules/product.js'
import { queryCustomer, queryCustomerDetails } from '@/apis/modules/client.js'
import { add, update, getDetail } from '@/apis/modules/order.js'
import { add, update, getDetail, queryCitySettlementPrice } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js'
export default {
data() {
@ -191,7 +198,8 @@
customerList: [],
customerListAll: [],
err: '',
rate: ''
rate: '',
shipInfo: ''
}
},
watch: {
@ -212,6 +220,7 @@
if (this.orderId) {
this.getInfo()
} else if (store) {
console.log(33, store)
//
const list = []
for (const i in store) {
@ -273,38 +282,24 @@
},
//
handleProduct(list) {
const courses = {
practice: {
shrink: false,
name: '实训课程产品',
list: []
},
theory: {
shrink: false,
name: '理论课程产品',
list: []
},
data: {
shrink: false,
name: '数据产品',
list: []
}
}
// 3push(0-> 1- 2 )
list.map(e => {
console.log('e.=>',e)
console.log('this.rate=>',this.rate)
e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // != 0 &&
console.log('e.serviceFee=>',e.serviceFee)
const type = e.productType
!type ?
courses.theory.list.push(e) :
type === 1 ?
courses.practice.list.push(e) :
courses.data.list.push(e)
})
this.courseList = courses
let courses = {}
//
productCategoryList().then(res => {
res.classificationList.forEach(e => {
courses['list' + this.$util.getOrderType(e.classificationId)] = {
shrink: false,
name: e.classificationName,
list: []
}
})
// 3push(0-> 1- 2 )
list.map(e => {
e.serviceFee = (e.finalPrice * (this.rate / 100)).toFixed(2) // != 0 &&
courses['list' + e.authority].list.push(e)
})
console.log(123,courses)
this.courseList = courses
}).catch(e => {})
},
//
getCustomer() {
@ -333,25 +328,44 @@
this.keyword = ''
},
//
customerChange(item) {
async customerChange(item) {
const { form } = this
//
queryCustomerDetails({
const { result } = await queryCustomerDetails({
customerId: item.customerId
}).then(({ result }) => {
this.handleErr('customerName')
const e = result.customer
form.customerId = e.customerId
form.customerName = e.customerName
form.provinceId = e.provinceId
form.cityId = e.cityId
form.provinceName = e.provinceName
form.cityName = e.cityName
form.phone = e.phone
form.email = e.email
form.orderContact = e.name
}).catch(e => {})
this.closeCustomer()
})
this.handleErr('customerName')
const e = result.customer
const { provinceId, cityId } = e
form.customerId = e.customerId
form.customerName = e.customerName
form.provinceId = provinceId
form.cityId = cityId
form.provinceName = e.provinceName
form.cityName = e.cityName
form.phone = e.phone
form.email = e.email
form.orderContact = e.name
//
const list = this.courseList
const courses = []
const promises = []
for (const i in list) {
list[i].list.forEach(n => {
promises.push(new Promise(async (resolve, reject) => {
const res = await queryCitySettlementPrice(n.mallId, provinceId, cityId)
if (res.mallPrice) n.settlementPriceUnit = res.mallPrice.discountRate || 0
courses.push(n)
resolve()
}))
})
}
Promise.all(promises).then(_ => {
this.courses = courses
this.calcTotal()
this.closeCustomer()
})
},
//
getRate() {
@ -469,7 +483,7 @@
1 :
row.accountNum)).toFixed((2))
row.settlementPrice = this.$util.handleNaN(sPrice)
// *10%
//
if (row.settlementPrice) {
row.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2)
}
@ -498,6 +512,26 @@
this.dealSettlePrice(row)
}, 500)
},
//
showShip(row) {
console.log(33)
let val = ''
row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => {
val += e.urlName + ':' + e.url + '\n'
})
this.shipInfo = val
this.$refs.info.open()
},
//
copy() {
const that = this
uni.setClipboardData({
data: this.shipInfo,
success() {
that.$util.sucMsg('编辑成功')
}
})
},
//
handleErr(val) {
if (val === this.err) this.err = ''
@ -507,7 +541,9 @@
uni.requestSubscribeMessage({
tmplIds: ['8pDVfWYqh9c-nn3CeA1NXJtBxdd1FYiCtrl5BeLvbgU'],
success: (res) => {
uni.navigateBack()
uni.switchTab({
url: '/pages/orders/orders'
})
},
fail: function(err) {
uni.showToast({
@ -519,6 +555,11 @@
})
},
//
async delShopCart(courses) {
const list = courses.filter(e => e.shopCartId)
list.length && await delCart(list.map(e => e.shopCartId))
},
//
submit() {
const { form, courses } = this
@ -530,7 +571,7 @@
this.err = 'orderType'
return this.$util.errMsg('请选择订单类型!')
}
if (!courses.length) return this.$util.errMsg('请选择课程权限或数据权限后再确认订单!')
if (!courses.length) return this.$util.errMsg('请选择课程后再确认订单!')
courses.map(e => {
e.startTime = this.$util.formatDate(new Date(e.startTime), 'yyyy-MM-dd')
})
@ -547,13 +588,16 @@
uni.hideLoading()
this.$util.sucMsg('编辑成功')
setTimeout(() => {
uni.navigateBack()
uni.switchTab({
url: '/pages/orders/orders'
})
}, 1500)
}).catch(res => {
uni.hideLoading()
})
} else {
add(data).then(res => {
this.delShopCart(courses)
uni.hideLoading()
this.$util.sucMsg('添加成功')
this.publicNotice()
@ -605,6 +649,15 @@
color: #333;
background: linear-gradient(90deg, #FFF5E5 0%, #FFFFFF 100%);
}
.course-action {
display: inline-flex;
align-items: center;
}
.info-btn {
padding: 0 16rpx;
margin-left: 10rpx;
font-size: 28rpx;
}
.left {
display: inline-flex;
align-items: center;
@ -744,4 +797,9 @@
background-color: #007EFF;
}
}
.ship-info {
padding: 20rpx;
white-space: pre-wrap;
font-size: 28rpx;
}
</style>

@ -5,8 +5,10 @@
<uni-icons class="icon" custom-prefix="iconfont" type="icon-filter" size="22" color="#007eff" @click="popup = true"></uni-icons>
</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">
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li>
</scroll-view>
</ul>
<ul v-if="list.length" class="list">
@ -37,6 +39,7 @@
</template>
<script>
import { productCategoryList } from '@/apis/modules/product.js'
import { getProductsSubscribedByCustomers } from '@/apis/modules/client.js'
import product from '@/config/product.js'
export default {
@ -89,22 +92,6 @@
name: '全部',
id: ''
},
{
name: '实训课程',
id: 1
},
{
name: '理论课程',
id: 0
},
{
name: '数据产品',
id: 3
},
{
name: '职站增值模块',
id: 4
}
],
searchTimer: null,
orderStatus: '',
@ -134,6 +121,7 @@
onShow() {
const pages = getCurrentPages()
this.customerId = pages[pages.length - 1].options.customerId
this.getTypes()
this.getList()
},
methods: {
@ -209,6 +197,16 @@
uni.hideLoading()
})
},
//
getTypes() {
productCategoryList().then(res => {
res.classificationList.forEach(e => {
e.id = e.classificationId
e.name = e.classificationName
})
this.tabs.push(...res.classificationList)
}).catch(e => {})
},
//
subFinsh(val) {
const { orderStatus, productStatus } = val
@ -239,6 +237,15 @@
.filter {
margin-bottom: 10px;
}
.tab-wrap {
.tab {
width: 100%;
white-space: nowrap;
li {
display: inline-block;
}
}
}
.list {
li {
padding: 0 24rpx;

@ -53,14 +53,22 @@
</view>
</view>
<view v-if="form.mall.interfaceDiagram" class="detail">
<view v-if="form.interfaceDiagram" class="detail">
<view class="title mb">
<image class="icon" src="@/static/image/product/4.png"></image>
产品界面图
</view>
<template>
<uni-swiper-dot :info="info" field="content" mode="round">
<swiper class="swiper-box" @change="change">
<swiper-item v-for="(pic, i) in form.interfaceDiagram" :key="i">
<image class="pic" mode="widthFix" :src="pic"></image>
</swiper-item>
</swiper>
</uni-swiper-dot>
<!-- <template>
<image v-for="(pic, i) in form.mall.interfaceDiagram" :key="i" class="pic" mode="widthFix" :src="pic"></image>
</template>
</template> -->
</view>
<view v-if="form.mallAnnex && form.mallAnnex.length" class="detail">
@ -69,7 +77,7 @@
<image class="icon" src="@/static/image/product/5.png"></image>
产品参数
</view>
<view class="download">
<view class="download" @click="download(file, 1)">
下载全部
<image class="icon" src="@/static/image/product/6.png"></image>
</view>
@ -96,14 +104,14 @@
<view class="btns">
<view class="btn" @click="addShop">加入购物车</view>
<view class="btn order">下单</view>
<view class="btn order" @click="order">下单</view>
</view>
</view>
</view>
</template>
<script>
import { detailsOfGoods, addToShoppingCart, shoppingCartList } from '@/apis/modules/product.js'
import { detailsOfGoods, addToShoppingCart, shoppingCartList, productCategoryList } from '@/apis/modules/product.js'
export default {
data() {
return {
@ -125,13 +133,15 @@
],
form: {
classificationIds: [],
interfaceDiagram: [],
mall: {
coverDrawing: ''
},
goodsRes: {},
mallAnnex: []
},
shopCartTotal: 0
shopCartTotal: 0,
types: []
}
},
onShow() {
@ -140,6 +150,7 @@
this.id = options.id
this.getInfo()
this.getShopCart()
this.getTypes()
},
methods: {
//
@ -149,12 +160,14 @@
})
detailsOfGoods(this.id).then(res => {
this.form = res.orderDetails
const pics = this.form.mall.interfaceDiagram
if (pics) this.form.interfaceDiagram = pics.split(',')
uni.hideLoading()
}).catch(e => {
uni.hideLoading()
})
},
//
//
getShopCart() {
shoppingCartList({
pageNum: 1,
@ -163,13 +176,39 @@
this.shopCartTotal = data.total
}).catch(e => {})
},
//
getTypes() {
productCategoryList().then(res => {
this.types = res.classificationList
}).catch(e => {})
},
// tab
tabChange(tab) {
this.curTab = tab.id
},
//
downloadAll() {
const fileName = []
const urls = []
this.form.mallAnnex.forEach(e => {
fileName.push(e.fileName)
urls.push(e.filePath)
})
uni.setStorageSync('files', {
copyWriting: item.fileName,
fileName,
urls
})
this.$util.to(`/team/send/send`)
},
//
download(item) {
this.$util.to(`/team/send/send?url=${item.filePath}&copyWriting=${item.fileName}`)
uni.setStorageSync('files', {
copyWriting: this.form.mall.productName,
fileName: [item.fileName],
urls: [item.filePath]
})
this.$util.to(`/team/send/send`)
},
//
addShop() {
@ -185,6 +224,44 @@
}).catch(e => {
uni.hideLoading()
})
},
//
order() {
const { mall } = this.form
const classificationId = this.form.classificationIds[0]
const authority = this.$util.getOrderType(classificationId)
//
uni.setStorageSync('courses', {
['list' + authority]: {
shrink: false,
name: this.form.goodsRes.classificationName,
list: [{
dataOrCourseId: mall.associatedProduct, // id
mallId: mall.mallId,
productName: mall.productName, //
periodOfUse: '', // 使
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
endTime: '', //
remainingPeriod: '', //
marketValue: '', //
marketPrice: mall.marketUnitPrice, //
finalPrice: 0, //
finalValue: 0, //
discountRate: '0%', //
accountNum: 1, //
totalAmount: '', //
isEnable: 0, // 10
ship: 0, // 01
authority, //
options: 2,
miniProgramPictureAddress: mall.appletIcon || '', //
settlementPrice: 0, //
settlementPriceUnit: 0, //
serviceFee: 0 //
}]
}
})
this.$util.to(`/order/orderDetail/orderDetail`)
}
}
}

@ -11,6 +11,25 @@
</li>
</ul>
<view class="tags">
<view v-if="categoryName" class="tag" @click="delCategory">
{{ categoryName }}
<uni-icons class="icon" type="closeempty" size="15" color="#007EFF"></uni-icons>
</view>
<view v-if="productTypeName" class="tag" @click="delProductType">
{{ productTypeName }}
<uni-icons class="icon" type="closeempty" size="15" color="#007EFF"></uni-icons>
</view>
<view v-if="form.selection" class="tag" @click="delSelection">
官方精选
<uni-icons class="icon" type="closeempty" size="15" color="#007EFF"></uni-icons>
</view>
<view v-if="tagName" class="tag" @click="delTag">
{{ tagName }}
<uni-icons class="icon" type="closeempty" size="15" color="#007EFF"></uni-icons>
</view>
</view>
<ul class="list">
<li v-for="(item, i) in list" :key="i" @click="toDetail(item)">
<view class="pro-name">
@ -47,12 +66,12 @@
</uni-badge>
</view>
<filter-popup :data="filters" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
<filter-popup ref="filter" showCategory :data="filters" :form.sync="filterForm" v-model="popup" title="全部筛选" height="1104rpx" @finsh="subFinsh"></filter-popup>
</view>
</template>
<script>
import { tagsList, listOfGoods, productTypeList } from '@/apis/modules/product.js'
import { tagsList, listOfGoods, productTypeList, shoppingCartList } from '@/apis/modules/product.js'
export default {
data() {
return {
@ -89,9 +108,14 @@
},
],
filterForm: {},
productType: '',
selection: '',
hotTag: 1,
form: {
categoryId: '',
professionalCategoryId: '',
professionalId: '',
productType: '',
selection: '',
hotTag: 1,
},
tagId: '',
curTab: 0,
tabs: [
@ -117,7 +141,10 @@
page: 1,
pageSize: 10,
total: 0,
cartNum: ''
cartNum: '',
productTypeName: '',
tagName: '',
categoryName: '',
}
},
watch: {
@ -150,6 +177,7 @@
this.page = 1
this.getList()
this.getFilter()
this.getShopCart()
},
methods: {
getList() {
@ -158,11 +186,9 @@
pageSize: this.pageSize,
sort: this.curTab == 2 ? this.sort : this.curTab,
isShelves: 0,
hotTag: this.tagId ? 2 : 1,
tagId: this.tagId,
hotTag: this.form.tagId ? 2 : 1,
...this.form,
productName: this.keyword,
productType: this.productType,
selection: this.selection
}).then(({ page }) => {
// list
const list = page.records
@ -171,7 +197,6 @@
})
this.list = this.reachBottom > 0 ? [...this.list, ...list] : list
this.page++ // page+1
this.total = page.total
const noMore = this.list.length === page.total //
this.status = noMore ? 'noMore' : 'more' // noMore
this.reachBottom = noMore ? -1 : 0 // -1
@ -182,6 +207,15 @@
this.reachBottom = 0
this.getList()
},
//
getShopCart() {
shoppingCartList({
pageNum: 1,
pageSize: 1000,
}).then(({ data }) => {
this.total = data.total
}).catch(e => {})
},
//
getFilter() {
//
@ -208,10 +242,51 @@
},
//
subFinsh(val) {
const { productType, selection, tagId } = val
this.productType = productType.length ? productType[0] : ''
this.selection = selection.length ? selection[0] : ''
this.tagId = tagId.length ? tagId[0] : ''
const { productType, selection, tagId, categoryId, professionalCategoryId, professionalId, categoryName } = val
this.form = {
categoryId,
professionalCategoryId,
professionalId,
productType: productType.length ? productType[0] : '',
selection: selection.length ? selection[0] : '',
tagId: tagId.length ? tagId[0] : ''
}
this.categoryName = categoryName
this.productTypeName = this.form.productType ? this.filters[0].data.find(e => e.value == this.form.productType).title : ''
this.tagName = this.form.tagId ? this.filters[2].data.find(e => e.value == this.form.tagId).title : ''
this.initList()
},
//
delCategory() {
this.$refs.filter.category = []
this.$refs.filter.categoryName = ''
this.$refs.filter.categoryId = ''
this.$refs.filter.professionalCategoryId = ''
this.$refs.filter.professionalId = ''
this.form.categoryId = ''
this.form.professionalCategoryId = ''
this.form.professionalId = ''
this.categoryName = ''
this.initList()
},
//
delProductType() {
this.filterForm.productType = []
this.form.productType = ''
this.productTypeName = ''
this.initList()
},
//
delSelection() {
this.filterForm.selection = []
this.form.selection = ''
this.initList()
},
//
delTag() {
this.filterForm.tagId = []
this.form.tagId = ''
this.tagName = ''
this.initList()
},
// tab
@ -238,6 +313,25 @@
align-items: center;
}
}
.tags {
display: flex;
align-items: center;
flex-wrap: wrap;
padding: 0 24rpx;
.tag {
display: inline-flex;
align-items: center;
padding: 10rpx 14rpx;
margin: 20rpx 20rpx 0 0;
font-size: 28rpx;
color: #007EFF;
background-color: #fff;
border-radius: 4px;
}
.icon {
margin-left: 6rpx;
}
}
.list {
li {
padding: 0 24rpx;

@ -18,7 +18,7 @@
</template>
<script>
import { shoppingCartList, delCart } from '@/apis/modules/product.js'
import { shoppingCartList, delCart, detailsOfGoods } from '@/apis/modules/product.js'
export default {
data() {
return {
@ -58,6 +58,7 @@
}
},
onShow() {
this.page = 1
this.getList()
},
methods: {
@ -73,7 +74,6 @@
const { records } = data
const all = this.checkAll.length //
const pageChange = this.reachBottom > 0 //
const { checked } = this //
//
records.forEach(e => {
e.check = 0
@ -120,16 +120,71 @@
allChange(e) {
const isCheck = !!e.detail.value.length //
const { list } = this
this.checked = isCheck ? list.map(e => e.id) : []
this.checked = isCheck ? list : []
list.forEach(e => {
e.check = isCheck ? 1 : 0
})
},
//
createParam(e, authority, shopCartId) {
const { orderType } = this
const trial = orderType == 2 //
return {
dataOrCourseId: e.associatedProduct, // id
mallId: e.mallId,
productName: e.productName, //
periodOfUse: '', // 使
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
endTime: '', //
remainingPeriod: '', //
marketValue: '', //
marketPrice: e.marketUnitPrice, //
finalPrice: 0, //
finalValue: 0, //
discountRate: '0%', //
accountNum: 1, //
totalAmount: '', //
isEnable: 0, // 10
ship: 0, // 01
authority, // 01
options: 2,
miniProgramPictureAddress: e.appletIcon || '', //
settlementPrice: trial ? 0 : '', //
settlementPriceUnit: 0, //
serviceFee: 0, //
shopCartId// id
}
},
//
submit() {
const list = this.checked //
if (list.length) {
const promises = []
let courses = {}
list.forEach(e => {
promises.push(new Promise(async (resolve, reject) => {
//
const res = await detailsOfGoods(e.mallId)
const n = res.orderDetails
const authority = this.$util.getOrderType(n.classificationIds[0])
const curCourse = this.createParam(n.mall, authority, e.id)
// push
if (courses['list' + authority]) {
courses['list' + authority].list.push(curCourse)
} else {
courses['list' + authority] = {
shrink: false,
name: n.goodsRes.classificationName,
list: [curCourse]
}
}
resolve()
}))
})
Promise.all(promises).then(_ => {
uni.setStorageSync('courses', courses)
this.$util.to(`/order/orderDetail/orderDetail`)
})
} else {
this.$util.errMsg('请选择产品!')
}

@ -122,11 +122,11 @@
initRole() {
this.tabs = []
const auth = uni.getStorageSync('auth')
auth.includes('首页:客户:我的客户') && this.tabs.push({
auth.includes('工作台:客户:我的客户') && this.tabs.push({
name: '我的客户',
id: 0
})
auth.includes('首页:客户:团队全部客户') && this.tabs.push({
auth.includes('工作台:客户:团队全部客户') && this.tabs.push({
name: '团队全部客户',
id: 1
})

@ -4,10 +4,6 @@
<view class="banner">
<image class="img" src="@/static/image/workbench/index1.png" mode="widthFix"></image>
<view class="info">
<view class="title">城市合伙人招募中</view>
<view class="text">携手共创教育信息化新未来合伙共享产业互联领域新红利</view>
</view>
</view>
<view class="block">
@ -31,7 +27,7 @@
</view>
<view class="list">
<view v-for="(item, i) in hotProducts" :key="i" class="item" @click="toDetail(item)">
<image class="pic" :src="item.appletIcon"></image>
<image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts">
<view class="name ell">{{ item.productName }}</view>
<view class="des ell" v-html="item.productIntroduction"></view>
@ -53,7 +49,7 @@
</view>
<view class="list">
<view v-for="(item, i) in offcialProducts" :key="i" class="item" @click="toDetail(item)">
<image class="pic" :src="item.appletIcon || require('@/static/image/product.png')"></image>
<image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts">
<view class="name ell">{{ item.productName }}</view>
<view class="des ell" v-html="item.productIntroduction"></view>
@ -84,7 +80,7 @@
keyword: '',
tags: [],
hotProducts: [],
offcialProducts: []
offcialProducts: [],
}
},
watch: {

@ -154,11 +154,11 @@
initRole() {
this.tabs = []
const auth = uni.getStorageSync('auth')
auth.includes('首页:订单:我的订单') && this.tabs.push({
auth.includes('订单:我的订单') && this.tabs.push({
name: '我的订单',
id: 0
})
auth.includes('首页:订单:团队全部订单') && this.tabs.push({
auth.includes('订单:团队全部订单') && this.tabs.push({
name: '团队全部订单',
id: 1
})

@ -10,6 +10,7 @@
<view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view>
</view>
<uni-tag v-if="!disabled" class="tag" :circle="true" text="团队负责人" type="primary" size="small" />
</view>
<view class="list">
<view v-if="auth('我的:我的团队')" class="item" @click="$util.to('/team/teams/teams')">
@ -255,6 +256,9 @@
height: 120rpx;
border: 0;
}
.text {
margin-right: 20rpx;
}
.name {
margin-bottom: 10rpx;
font-size: 40rpx;
@ -264,6 +268,9 @@
font-size: 28rpx;
color: #333;
}
.tag {
margin-top: -50rpx;
}
}
.list {
margin-top: 16rpx;

@ -14,19 +14,19 @@
</view>
<ul class="entry">
<li v-if="auth('首页:客户')" @click="$util.to('../clients/clients')">
<li v-if="auth('工作台:客户')" @click="$util.to('../clients/clients')">
<image class="icon" src="@/static/image/workbench/index3.png" mode="widthFix"></image>
<view class="text">客户</view>
</li>
<li v-if="auth('首页:方案')" @click="$util.to('../plans/plans')">
<li v-if="auth('工作台:方案')" @click="$util.to('../plans/plans')">
<image class="icon" src="@/static/image/workbench/index4.png" mode="widthFix"></image>
<view class="text">方案</view>
</li>
<li @click="$util.to('/team/study/study')">
<li v-if="auth('工作台:学习')" @click="$util.to('/team/study/study')">
<image class="icon" src="@/static/image/tab2-1.png" mode="widthFix"></image>
<view class="text">学习</view>
</li>
<li @click="$util.to('/team/info/info')">
<li v-if="auth('工作台:资讯')" @click="$util.to('/team/info/info')">
<image class="icon" src="@/static/image/tab3-1.png" mode="widthFix"></image>
<view class="text">资讯</view>
</li>
@ -153,7 +153,7 @@
methods: {
//
initRole() {
if (!uni.getStorageSync('auth').includes('首页')) {
if (!uni.getStorageSync('auth').includes('工作台')) {
this.per = false
}
this.getStudy()
@ -239,9 +239,7 @@
},
//
toStudy() {
uni.switchTab({
url: '/team/study/study'
})
this.$util.to('/team/study/study')
},
//
toDetail(item) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 680 B

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 136 KiB

@ -118,7 +118,12 @@
    },
//
download(item) {
this.$util.to(`../send/send?url=${item.filePath}&copyWriting=${item.fileName}`)
uni.setStorageSync('files', {
copyWriting: this.form.title,
fileName: [item.fileName],
urls: [item.filePath]
})
this.$util.to(`/team/send/send`)
},
//
collect() {

@ -44,7 +44,12 @@
},
//
download() {
this.$util.to(`../send/send?url=${this.form.schemeFile}&copyWriting=${this.form.fileName}`)
uni.setStorageSync('files', {
copyWriting: this.form.title,
fileName: [this.form.fileName],
urls: [this.form.schemeFile]
})
this.$util.to(`/team/send/send`)
// uni.showLoading({
// title: '',
// mask: true

@ -25,8 +25,6 @@
export default {
data() {
return {
copyWriting: '',
url: '',
email: '',
otherEmail: '',
myVal: 1,
@ -38,10 +36,6 @@
}
},
onShow() {
const pages = getCurrentPages()
const { options } = pages[pages.length - 1]
this.url = options.url
this.copyWriting = options.copyWriting
this.getInfo()
},
methods: {
@ -66,11 +60,9 @@
const { otherEmail } = this
if (this.myVal && !this.email) return this.$util.errMsg('请选择其他邮箱!')
if (this.otherVal && !otherEmail) return this.$util.errMsg('请输入邮箱!')
mailFileSend({
url: this.url,
copyWriting: this.copyWriting,
mail: this.myVal ? this.email : otherEmail
}).then(res => {
const data = uni.getStorageSync('files')
data.mail = this.myVal ? this.email : otherEmail
mailFileSend(data).then(res => {
this.$util.sucMsg('发送成功!')
setTimeout(() => {
uni.navigateBack()

@ -19,6 +19,7 @@
<text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text>
</view>
</view>
<uni-tag v-if="item.isTeam == 1" class="tag" :circle="true" text="团队负责人" type="primary" size="small" />
</li>
</ul>
<uni-load-more :status="status" />
@ -112,6 +113,7 @@
margin-top: 20rpx;
background-color: #fff;
li {
position: relative;
display: flex;
align-items: center;
padding: 20rpx 40rpx;
@ -145,6 +147,11 @@
font-size: 28rpx;
color: #333;
}
.tag {
position: absolute;
top: 20rpx;
right: 40rpx;
}
}
.plus {
position: fixed;

Loading…
Cancel
Save