yujialong 1 year ago
parent 138c3221a1
commit 9d78448e9e
  1. 53
      components/filter-popup/filter-popup.vue
  2. 6
      libs/util.js
  3. 49
      order/addCourse/addCourse.vue
  4. 0
      order/clientDetail/clientDetail.vue
  5. 0
      order/clients/clients.vue
  6. 7
      order/editCourse/editCourse.vue
  7. 33
      order/orderDetail/orderDetail.vue
  8. 133
      order/productDetail/productDetail.vue
  9. 45
      order/products/products.vue
  10. 23
      order/shopCart/shopCart.vue
  11. 32
      pages.json
  12. 41
      pages/index/index.vue
  13. 1
      pages/login/login.vue
  14. 1
      pages/orders/orders.vue
  15. 7
      pages/person/person.vue
  16. 3
      pages/products/products.vue
  17. 6
      pages/workbench/workbench.vue
  18. BIN
      static/image/workbench/index11.png
  19. BIN
      static/image/workbench/index12.png
  20. 7
      team/teams/teams.vue

@ -19,9 +19,12 @@
<view class="select-main"> <view class="select-main">
<view v-if="showCategory" class="select-item"> <view v-if="showCategory" class="select-item">
<view class="title">学科专业</view> <view class="title">学科专业</view>
<picker mode="multiSelector" v-model="category" @change="change" @columnchange="columnchange" :range="categories" range-key="title"> <view class="category-wrap">
<view class="category">{{categoryName ? categoryName : '请选择'}}</view> <picker mode="multiSelector" v-model="category" @change="change" @columnchange="columnchange" :range="categories" range-key="title">
</picker> <view class="category">{{categoryName ? categoryName : '请选择'}}</view>
</picker>
<uni-icons v-if="categoryName" class="icon" type="closeempty" size="16" color="#333" @click.stop="delCatagory"></uni-icons>
</view>
</view> </view>
<view class="select-item" v-for="(item, index) in data" :key="index"> <view class="select-item" v-for="(item, index) in data" :key="index">
@ -213,18 +216,24 @@ export default {
const i1IsNumber = typeof i1 === 'number' const i1IsNumber = typeof i1 === 'number'
const i2IsNumber = typeof i2 === 'number' const i2IsNumber = typeof i2 === 'number'
const list = this.categories const list = this.categories
this.categoryId = list[0][i0].id 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 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 this.professionalCategoryId = ''
this.professionalId = ''
if (i1IsNumber && list[1].length > 0) {
this.professionalCategoryId = list[1][i1].id
this.categoryName += '/' + list[1][i1].title
}
if (i2IsNumber && list[2].length > 0) {
this.professionalId = list[2][i2].id
this.categoryName += '/' + list[2][i2].title
}
}, },
// //
async columnchange(e) { async columnchange(e) {
const { column } = e.detail const { column } = e.detail
console.log('change',column)
if (column == 0) { if (column == 0) {
const { list } = await courseProfessionalClass(this.categories[0][e.detail.value].id) const { list } = await courseProfessionalClass(this.categories[0][e.detail.value].id)
list.map(e => { list.map(e => {
@ -234,6 +243,7 @@ export default {
this.categories[1] = list this.categories[1] = list
this.categories[2] = [] this.categories[2] = []
this.$set(this.categories, 1, list) this.$set(this.categories, 1, list)
console.log('inner',this.categories)
} else } else
if (column == 1) { if (column == 1) {
const { list } = await courseProfessional(this.categories[1][e.detail.value].id) const { list } = await courseProfessional(this.categories[1][e.detail.value].id)
@ -245,6 +255,14 @@ export default {
this.$set(this.categories, 2, list) this.$set(this.categories, 2, list)
} }
}, },
//
delCatagory() {
this.category = []
this.categoryName = ''
this.categoryId = ''
this.professionalCategoryId = ''
this.professionalId = ''
},
// //
finsh() { finsh() {
@ -264,6 +282,14 @@ export default {
// //
reset() { reset() {
this.acceptForm = {} this.acceptForm = {}
this.categoryId = ''
this.professionalCategoryId = ''
this.professionalId = ''
this.categoryName = ''
this.$nextTick(() => {
this.$emit("finsh", this.acceptForm);
this.$emit("input", false);
})
}, },
}, },
}; };
@ -301,8 +327,15 @@ export default {
} }
.select-scroll { .select-scroll {
} }
.category { .category-wrap {
display: flex;
align-items: center;
margin-top: 10rpx; margin-top: 10rpx;
.icon {
margin-left: 10rpx;
}
}
.category {
font-size: 28rpx; font-size: 28rpx;
} }
.select-main { .select-main {

@ -32,7 +32,7 @@ export default {
}, },
// 如果非数字,则返回0 // 如果非数字,则返回0
handleNaN(val) { handleNaN(val) {
return isNaN(val) ? 0 : val return isNaN(val) || val == 0 ? '' : val
}, },
// 小于10,返回0+传入值 // 小于10,返回0+传入值
preZero(val) { preZero(val) {
@ -117,4 +117,8 @@ export default {
if (id == 5) return 0 if (id == 5) return 0
if (id == 6) return 4 if (id == 6) return 4
}, },
// 去掉html标签
removeTag(str) {
return str.replace(/(<[^>]+>)|((&nbsp;)+)/g , '')
},
} }

@ -5,8 +5,12 @@
</uni-card> </uni-card>
<ul class="tab-wrap"> <ul class="tab-wrap">
<scroll-view scroll-x :scroll-left="scrollLeft" class="tab"> <view class="tab">
<li v-for="(tab, i) in tabs" :class="{active: curTab === tab.id}" @click="tabChange(tab)">{{ tab.name }}</li> <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> </scroll-view>
</ul> </ul>
@ -28,7 +32,7 @@
</template> </template>
<script> <script>
import { productCategoryList, listOfGoods } from '@/apis/modules/product.js' import { productTypeList, listOfGoods } from '@/apis/modules/product.js'
import { renew, queryCitySettlementPrice } from '@/apis/modules/order.js' import { renew, queryCitySettlementPrice } from '@/apis/modules/order.js'
export default { export default {
data() { data() {
@ -39,12 +43,7 @@
provinceId: '', provinceId: '',
cityId: '', cityId: '',
curTab: '', curTab: '',
tabs: [ tabs: [],
{
name: '全部',
id: ''
},
],
scrollLeft: 0, scrollLeft: 0,
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
@ -105,14 +104,14 @@
this.getList() this.getList()
}, },
methods: { methods: {
// //
getTypes() { getTypes() {
productCategoryList().then(res => { productTypeList().then(res => {
res.classificationList.forEach(e => { res.typeList.forEach(e => {
e.id = e.classificationId e.id = e.typeId
e.name = e.classificationName e.name = e.typeName
}) })
this.tabs.push(...res.classificationList) this.tabs.push(...res.typeList)
}).catch(e => {}) }).catch(e => {})
}, },
// //
@ -127,7 +126,7 @@
isShelves: 0, isShelves: 0,
hotTag: 1, hotTag: 1,
productName: this.keyword, productName: this.keyword,
productClassification: this.curTab, productType: this.curTab,
}).then(({ page }) => { }).then(({ page }) => {
const { records } = page const { records } = page
const list = this.courses const list = this.courses
@ -142,7 +141,7 @@
} }
e.check = (all && pageChange) || checked.find(n => n.mallId === e.mallId) ? 1 : 0 e.check = (all && pageChange) || checked.find(n => n.mallId === e.mallId) ? 1 : 0
// //
if (list.find(n => n.dataOrCourseId == e.mallId)) { if (list.find(n => n.mallId == e.mallId)) {
// //
checkData.disable = true checkData.disable = true
e.check = 1 e.check = 1
@ -167,8 +166,8 @@
this.getList() this.getList()
}, },
// tab // tab
tabChange(tab) { tabChange(id) {
this.curTab = tab.id this.curTab = id
this.initList() this.initList()
}, },
// //
@ -259,6 +258,7 @@
const list = this.checked // const list = this.checked //
if (list.length) { if (list.length) {
const result = this.courses const result = this.courses
console.log(123, result)
const list1 = [] // const list1 = [] //
const list0 = [] // const list0 = [] //
const list2 = [] // const list2 = [] //
@ -272,8 +272,10 @@
// id // id
if (!result.find(n => (n.dataOrCourseId == e.associatedProduct || n.dataOrCourseId == e.dataOrCourseId) && n.authority == e.authority)) { if (!result.find(n => (n.dataOrCourseId == e.associatedProduct || n.dataOrCourseId == e.dataOrCourseId) && n.authority == e.authority)) {
// //
const res = await queryCitySettlementPrice(e.mallId, this.provinceId, this.cityId) if (this.provinceId) {
if (res.mallPrice) e.settlementPrice = res.mallPrice.discountRate const res = await queryCitySettlementPrice(e.mallId, this.provinceId, this.cityId)
if (res.mallPrice) e.settlementPrice = res.mallPrice.discountRate
}
console.log(44, e) console.log(44, e)
const classId = e.classificationId const classId = e.classificationId
const pid = +e.associatedProduct const pid = +e.associatedProduct
@ -333,8 +335,9 @@
padding-bottom: 130rpx; padding-bottom: 130rpx;
} }
.tab-wrap { .tab-wrap {
.tab { display: flex;
width: 100%; .tab-scroll {
width: calc(100% - 100rpx);
white-space: nowrap; white-space: nowrap;
li { li {
display: inline-block; display: inline-block;

@ -45,7 +45,7 @@
</view> </view>
<view class="line"> <view class="line">
<view class="name">结算价</view> <view class="name">结算价</view>
<view class="val">{{ item.settlementPrice }}</view> <view class="val">{{ item.settlementPrice && item.settlementPrice + '元' }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="name">折扣率</view> <view class="name">折扣率</view>
@ -143,6 +143,7 @@
courses['list' + e.authority].list.push(e) courses['list' + e.authority].list.push(e)
}) })
this.courses = courses this.courses = courses
console.log('editCourse', this.courses)
}).catch(e => {}) }).catch(e => {})
try { try {
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
@ -362,7 +363,9 @@
if (msg) return this.$util.errMsg(msg) if (msg) return this.$util.errMsg(msg)
if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) // if (this.orderRepeat.length) return this.$util.errMsg(this.repeatMsg) //
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)
uni.navigateBack() uni.redirectTo({
url: `../orderDetail/orderDetail`
})
}, },
} }
} }

@ -12,7 +12,7 @@
<view v-if="isDetail" class="val">{{ form.customerName }}</view> <view v-if="isDetail" class="val">{{ form.customerName }}</view>
<view v-else class="customer-wrap"> <view v-else class="customer-wrap">
<view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view> <view :class="['ph', {val: form.customerName}]" @click="customerVisible = true">{{ form.customerName || '请选择客户' }}</view>
<view class="create" @click="$util.to(`/pages/clientDetail/clientDetail`)">找不到客户马上创建</view> <view class="create" @click="toClient">找不到客户马上创建</view>
</view> </view>
</view> </view>
<view class="line" v-if="form.customerName"> <view class="line" v-if="form.customerName">
@ -68,7 +68,7 @@
</view> </view>
<view class="course-action"> <view class="course-action">
<image v-if="!isDetail" class="del" src="@/static/image/trash.png" mode="widthFix" @click.stop="delCourse(c, i)"></image> <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) && item.mallNonAssociatedLinks" class="info-btn" type="primary" @click.stop="showShip(item)">发货信息</button> <button v-if="(item.authority == 3 || item.authority == 4) && ((item.mallNonAssociatedLinks && item.mallNonAssociatedLinks.length) || item.shipContent)" class="info-btn" type="primary" @click.stop="showShip(item)">发货信息</button>
</view> </view>
</view> </view>
<view class="info"> <view class="info">
@ -82,7 +82,7 @@
</view> </view>
<view class="line"> <view class="line">
<view class="label">结算价</view> <view class="label">结算价</view>
<view class="val">{{ item.settlementPrice }}</view> <view class="val">{{ item.settlementPrice && item.settlementPrice + '元' }}</view>
</view> </view>
<view class="line"> <view class="line">
<view class="label">折扣率</view> <view class="label">折扣率</view>
@ -216,11 +216,15 @@
this.orderId = options.orderId this.orderId = options.orderId
this.isDetail = !!options.show this.isDetail = !!options.show
const store = uni.getStorageSync('courses') const store = uni.getStorageSync('courses')
const form = uni.getStorageSync('orderForm')
if (form) {
this.form = form
uni.removeStorageSync('orderForm')
}
this.getRate() this.getRate()
if (this.orderId) { if (this.orderId) {
this.getInfo() this.getInfo()
} else if (store) { } else if (store) {
console.log(33, store)
// //
const list = [] const list = []
for (const i in store) { for (const i in store) {
@ -238,13 +242,13 @@
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
this.calcTotal() this.calcTotal()
} else {
// id
const { customerId } = options
customerId && this.customerChange({
customerId
})
} }
// id
const { customerId } = options
customerId && this.customerChange({
customerId
})
// //
if (!this.isDetail) { if (!this.isDetail) {
this.getCustomer() this.getCustomer()
@ -378,6 +382,7 @@
// //
toAdd() { toAdd() {
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)
uni.setStorageSync('orderForm', this.form)
const { customerId, orderType } = this.form const { customerId, orderType } = this.form
customerId ? customerId ?
this.$util.to(`../addCourse/addCourse?orderType=${orderType}&customerId=${customerId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`) : this.$util.to(`../addCourse/addCourse?orderType=${orderType}&customerId=${customerId}&provinceId=${this.form.provinceId}&cityId=${this.form.cityId}`) :
@ -387,9 +392,15 @@
editCourse(c, i) { editCourse(c, i) {
if (this.isDetail) return false if (this.isDetail) return false
uni.setStorageSync('courses', this.courses) uni.setStorageSync('courses', this.courses)
uni.setStorageSync('orderForm', this.form)
const { customerId, orderType } = this.form const { customerId, orderType } = this.form
this.$util.to(`../editCourse/editCourse?orderType=${orderType}&customerId=${customerId}`) this.$util.to(`../editCourse/editCourse?orderType=${orderType}&customerId=${customerId}`)
}, },
//
toClient() {
uni.setStorageSync('courses', this.courseList)
this.$util.to(`/order/clientDetail/clientDetail`)
},
// //
delCourse(c, i) { delCourse(c, i) {
const that = this const that = this
@ -519,7 +530,7 @@
row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => { row.mallNonAssociatedLinks && row.mallNonAssociatedLinks.forEach(e => {
val += e.urlName + ':' + e.url + '\n' val += e.urlName + ':' + e.url + '\n'
}) })
this.shipInfo = val this.shipInfo = row.shipContent || val
this.$refs.info.open() this.$refs.info.open()
}, },
// //

@ -28,7 +28,7 @@
<view class="texts"> <view class="texts">
<view class="line"> <view class="line">
<text class="name">产品简介</text> <text class="name">产品简介</text>
<view class="val" v-html="form.mall.productIntroduction"></view> <text class="val">{{ form.mall.productIntroduction }}</text>
</view> </view>
<view class="line"> <view class="line">
<text class="name">适用专业</text> <text class="name">适用专业</text>
@ -48,30 +48,27 @@
</view> </view>
<view class="line"> <view class="line">
<text class="name">详情介绍</text> <text class="name">详情介绍</text>
<view class="val" v-html="form.mall.detailedIntroduction"></view> <!-- <view class="val" v-html="form.mall.detailedIntroduction"></view> -->
<mp-html class="val" :content="form.mall.detailedIntroduction"/>
</view> </view>
</view> </view>
</view> </view>
<view v-if="form.interfaceDiagram" class="detail"> <view v-if="form.interfaceDiagram" class="detail" id="pics">
<view class="title mb"> <view class="title mb">
<image class="icon" src="@/static/image/product/4.png"></image> <image class="icon" src="@/static/image/product/4.png"></image>
产品界面图 产品界面图
</view> </view>
<uni-swiper-dot :info="info" field="content" mode="round"> <uni-swiper-dot :info="form.interfaceDiagram.length > 1 ? form.interfaceDiagram : 0" field="content" mode="round" :dotsStyles="dotsStyles">
<swiper class="swiper-box" @change="change"> <swiper class="swiper-box" autoplay>
<swiper-item v-for="(pic, i) in form.interfaceDiagram" :key="i"> <swiper-item v-for="(pic, i) in form.interfaceDiagram" :key="i">
<image class="pic" mode="widthFix" :src="pic"></image> <image class="pic" mode="widthFix" :src="pic"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</uni-swiper-dot> </uni-swiper-dot>
<!-- <template>
<image v-for="(pic, i) in form.mall.interfaceDiagram" :key="i" class="pic" mode="widthFix" :src="pic"></image>
</template> -->
</view> </view>
<view v-if="form.mallAnnex && form.mallAnnex.length" class="detail"> <view v-if="form.mallAnnex && form.mallAnnex.length" class="detail" id="annex">
<view class="title-wrap"> <view class="title-wrap">
<view class="title"> <view class="title">
<image class="icon" src="@/static/image/product/5.png"></image> <image class="icon" src="@/static/image/product/5.png"></image>
@ -95,7 +92,7 @@
</view> </view>
<view class="footer"> <view class="footer">
<view class="shop" @click="$util.to('../shopCart/shopCart')"> <view v-if="auth('产品:购物车')" class="shop" @click="$util.to('../shopCart/shopCart')">
<uni-badge size="small" :text="shopCartTotal" absolute="topRight" type="error"> <uni-badge size="small" :text="shopCartTotal" absolute="topRight" type="error">
<image class="icon" src="@/static/image/product/shop.png" mode="widthFix"></image> <image class="icon" src="@/static/image/product/shop.png" mode="widthFix"></image>
</uni-badge> </uni-badge>
@ -103,8 +100,8 @@
</view> </view>
<view class="btns"> <view class="btns">
<view class="btn" @click="addShop">加入购物车</view> <view v-if="auth('产品:加入购物车')" class="btn" @click="addShop">加入购物车</view>
<view class="btn order" @click="order">下单</view> <view v-if="auth('产品:下单')" class="btn order" @click="order">下单</view>
</view> </view>
</view> </view>
</view> </view>
@ -121,15 +118,7 @@
{ {
name: '详情介绍', name: '详情介绍',
id: 0 id: 0
}, }
{
name: '界面图',
id: 1
},
{
name: '参数',
id: 2
},
], ],
form: { form: {
classificationIds: [], classificationIds: [],
@ -141,10 +130,23 @@
mallAnnex: [] mallAnnex: []
}, },
shopCartTotal: 0, shopCartTotal: 0,
types: [] types: [],
dotsStyles: {
backgroundColor: 'rgba(83, 200, 249,0.3)',
border: '1px rgba(83, 200, 249,0.3) solid',
color: '#fff',
selectedBackgroundColor: 'rgba(83, 200, 249,0.9)',
selectedBorder: '1px rgba(83, 200, 249,0.9) solid'
}
} }
}, },
onShow() { onShow() {
this.tabs = [
{
name: '详情介绍',
id: 0
}
]
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.id = options.id this.id = options.id
@ -159,9 +161,21 @@
title: '加载中' title: '加载中'
}) })
detailsOfGoods(this.id).then(res => { detailsOfGoods(this.id).then(res => {
this.form = res.orderDetails const e = res.orderDetails
e.mall.productIntroduction = this.$util.removeTag(e.mall.productIntroduction)
this.form = e
const pics = this.form.mall.interfaceDiagram const pics = this.form.mall.interfaceDiagram
if (pics) this.form.interfaceDiagram = pics.split(',') if (pics) {
this.form.interfaceDiagram = pics.split(',')
this.tabs.push({
name: '界面图',
id: 1
})
}
this.form.mallAnnex && this.form.mallAnnex.length && this.tabs.push({
name: '参数',
id: 2
})
uni.hideLoading() uni.hideLoading()
}).catch(e => { }).catch(e => {
uni.hideLoading() uni.hideLoading()
@ -183,8 +197,14 @@
}).catch(e => {}) }).catch(e => {})
}, },
// tab // tab
tabChange(tab) { tabChange({ id }) {
this.curTab = tab.id this.curTab = id
id == 1 && uni.pageScrollTo({
selector: '#pics',
})
id == 2 && uni.pageScrollTo({
selector: '#annex',
})
}, },
// //
downloadAll() { downloadAll() {
@ -231,37 +251,31 @@
const classificationId = this.form.classificationIds[0] const classificationId = this.form.classificationIds[0]
const authority = this.$util.getOrderType(classificationId) const authority = this.$util.getOrderType(classificationId)
// //
uni.setStorageSync('courses', { uni.setStorageSync('courses', [{
['list' + authority]: { dataOrCourseId: mall.associatedProduct, // id
shrink: false, mallId: mall.mallId,
name: this.form.goodsRes.classificationName, productName: mall.productName, //
list: [{ periodOfUse: '', // 使
dataOrCourseId: mall.associatedProduct, // id startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
mallId: mall.mallId, endTime: '', //
productName: mall.productName, // remainingPeriod: '', //
periodOfUse: '', // 使 marketValue: '', //
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), // marketPrice: mall.marketUnitPrice, //
endTime: '', // finalPrice: 0, //
remainingPeriod: '', // finalValue: 0, //
marketValue: '', // discountRate: '0%', //
marketPrice: mall.marketUnitPrice, // accountNum: 1, //
finalPrice: 0, // totalAmount: '', //
finalValue: 0, // isEnable: 0, // 10
discountRate: '0%', // ship: 0, // 01
accountNum: 1, // authority, //
totalAmount: '', // options: 2,
isEnable: 0, // 10 miniProgramPictureAddress: mall.appletIcon || '', //
ship: 0, // 01 settlementPrice: 0, //
authority, // settlementPriceUnit: 0, //
options: 2, serviceFee: 0 //
miniProgramPictureAddress: mall.appletIcon || '', // }])
settlementPrice: 0, // this.$util.to(`/order/editCourse/editCourse`)
settlementPriceUnit: 0, //
serviceFee: 0 //
}]
}
})
this.$util.to(`/order/orderDetail/orderDetail`)
} }
} }
} }
@ -284,6 +298,7 @@
.pro-title { .pro-title {
margin-top: 22rpx; margin-top: 22rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600;
color: #333; color: #333;
} }
.fields { .fields {
@ -306,7 +321,6 @@
} }
.tabs { .tabs {
display: flex; display: flex;
justify-content: space-around;
margin-bottom: 32rpx; margin-bottom: 32rpx;
li { li {
width: 33.33%; width: 33.33%;
@ -356,6 +370,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600;
color: #333 ; color: #333 ;
.icon { .icon {
width: 36rpx; width: 36rpx;

@ -10,7 +10,6 @@
<view v-if="i == 2" :class="['sort', {desc: sort == 2, asc: sort == 5}]"></view> <view v-if="i == 2" :class="['sort', {desc: sort == 2, asc: sort == 5}]"></view>
</li> </li>
</ul> </ul>
<view class="tags"> <view class="tags">
<view v-if="categoryName" class="tag" @click="delCategory"> <view v-if="categoryName" class="tag" @click="delCategory">
{{ categoryName }} {{ categoryName }}
@ -40,8 +39,7 @@
<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}" v-html="item.productIntroduction"></view> <view class="ell">{{ item.productIntroduction }}</view>
<view v-if="item.productIntroduction.length > 14" class="toggle" @click="toggle(item)">{{ item.toggle ? '收起' : '展开' }}</view>
</view> </view>
</view> </view>
<view class="line"> <view class="line">
@ -60,7 +58,7 @@
</li> </li>
</ul> </ul>
<view class="plus"> <view v-if="auth('产品:购物车')" class="plus">
<uni-badge size="small" :text="total" absolute="topRight" type="error"> <uni-badge size="small" :text="total" absolute="topRight" type="error">
<image class="icon" src="@/static/image/product/shop-blue.png" mode="widthFix" @click="$util.to('../shopCart/shopCart')"></image> <image class="icon" src="@/static/image/product/shop-blue.png" mode="widthFix" @click="$util.to('../shopCart/shopCart')"></image>
</uni-badge> </uni-badge>
@ -107,14 +105,18 @@
data: [], data: [],
}, },
], ],
filterForm: {}, filterForm: {
productType: [],
selection: [],
tagId: []
},
form: { form: {
categoryId: '', categoryId: '',
professionalCategoryId: '', professionalCategoryId: '',
professionalId: '', professionalId: '',
productType: '', productType: '',
selection: '', selection: '',
hotTag: 1, tagId: ''
}, },
tagId: '', tagId: '',
curTab: 0, curTab: 0,
@ -124,7 +126,7 @@
id: 0 id: 0
}, },
{ {
name: '热排行', name: '热排行',
id: 1 id: 1
}, },
{ {
@ -135,7 +137,7 @@
reachBottom: 0, // 0->,1->,-1-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
searchTimer: null, searchTimer: null,
sort: 2, sort: 0,
keyword: '', keyword: '',
list: [], list: [],
page: 1, page: 1,
@ -173,7 +175,14 @@
onShow() { onShow() {
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = pages[pages.length - 1] const { options } = pages[pages.length - 1]
this.tagId = +options.tagId || '' const { tagId, tagsName } = options
this.form.tagId = +tagId || ''
if (tagId) {
this.filterForm.tagId = [+tagId]
this.tagName = tagsName
}
this.keyword = options.keyword || ''
this.page = 1 this.page = 1
this.getList() this.getList()
this.getFilter() this.getFilter()
@ -193,7 +202,7 @@
// list // list
const list = page.records const list = page.records
list.map(e => { list.map(e => {
e.toggle = e.productIntroduction.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
@ -236,22 +245,18 @@
this.filters[2].data = res.tagsList this.filters[2].data = res.tagsList
}).catch(e => {}) }).catch(e => {})
}, },
//
toggle(item) {
item.toggle = !item.toggle
},
// //
subFinsh(val) { subFinsh(val) {
const { productType, selection, tagId, categoryId, professionalCategoryId, professionalId, categoryName } = val const { productType, selection, tagId, categoryId, professionalCategoryId, professionalId, categoryName } = val
this.form = { this.form = {
categoryId, categoryId: categoryId || '',
professionalCategoryId, professionalCategoryId: professionalCategoryId || '',
professionalId, professionalId: professionalId || '',
productType: productType.length ? productType[0] : '', productType: productType.length ? productType[0] : '',
selection: selection.length ? selection[0] : '', selection: selection.length ? selection[0] : '',
tagId: tagId.length ? tagId[0] : '' tagId: tagId.length ? tagId[0] : ''
} }
this.categoryName = categoryName this.categoryName = categoryName || ''
this.productTypeName = this.form.productType ? this.filters[0].data.find(e => e.value == this.form.productType).title : '' 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.tagName = this.form.tagId ? this.filters[2].data.find(e => e.value == this.form.tagId).title : ''
this.initList() this.initList()
@ -322,7 +327,7 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
padding: 10rpx 14rpx; padding: 10rpx 14rpx;
margin: 20rpx 20rpx 0 0; margin: 0 20rpx 16rpx 0;
font-size: 28rpx; font-size: 28rpx;
color: #007EFF; color: #007EFF;
background-color: #fff; background-color: #fff;
@ -386,6 +391,8 @@
} }
} }
.plus { .plus {
bottom: 140rpx;
right: 60rpx;
.icon { .icon {
width: 80rpx; width: 80rpx;
} }

@ -58,6 +58,10 @@
} }
}, },
onShow() { onShow() {
//
try {
uni.removeStorageSync('orderForm')
} catch (e) {}
this.page = 1 this.page = 1
this.getList() this.getList()
}, },
@ -160,31 +164,22 @@
submit() { submit() {
const list = this.checked // const list = this.checked //
if (list.length) { if (list.length) {
if (new Set(list.map(e => e.mallId)).size !== list.length) return this.$util.errMsg('所选产品存在重复,请重新选择')
const promises = [] const promises = []
let courses = {} let courses = []
list.forEach(e => { list.forEach(e => {
promises.push(new Promise(async (resolve, reject) => { promises.push(new Promise(async (resolve, reject) => {
// //
const res = await detailsOfGoods(e.mallId) const res = await detailsOfGoods(e.mallId)
const n = res.orderDetails const n = res.orderDetails
const authority = this.$util.getOrderType(n.classificationIds[0]) courses.push(this.createParam(n.mall, this.$util.getOrderType(n.classificationIds[0]), e.id))
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() resolve()
})) }))
}) })
Promise.all(promises).then(_ => { Promise.all(promises).then(_ => {
uni.setStorageSync('courses', courses) uni.setStorageSync('courses', courses)
this.$util.to(`/order/orderDetail/orderDetail`) this.$util.to(`/order/editCourse/editCourse`)
}) })
} else { } else {
this.$util.errMsg('请选择产品!') this.$util.errMsg('请选择产品!')

@ -32,14 +32,6 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path" : "pages/clients/clients",
"style" :
{
"navigationBarTitleText": "客户列表",
"enablePullDownRefresh": true
}
},
{ {
"path" : "pages/products/products", "path" : "pages/products/products",
"style" : "style" :
@ -48,14 +40,6 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path" : "pages/clientDetail/clientDetail",
"style" :
{
"navigationBarTitleText": "客户详情",
"enablePullDownRefresh": false
}
},
{ {
"path" : "pages/plans/plans", "path" : "pages/plans/plans",
"style" : "style" :
@ -86,6 +70,22 @@
{ {
"root": "order", "root": "order",
"pages": [ "pages": [
{
"path" : "clients/clients",
"style" :
{
"navigationBarTitleText": "客户列表",
"enablePullDownRefresh": true
}
},
{
"path" : "clientDetail/clientDetail",
"style" :
{
"navigationBarTitleText": "客户详情",
"enablePullDownRefresh": false
}
},
{ {
"path" : "addCourse/addCourse", "path" : "addCourse/addCourse",
"style" : "style" :

@ -1,12 +1,12 @@
<template> <template>
<view :class="['page', {oh: !per}]"> <view :class="['page', {oh: !per}]">
<uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" /> <uni-search-bar class="search" radius="30" placeholder="请输入" v-model="keyword" clearButton="auto" cancelButton="none" @confirm="searchConfirm" />
<view class="banner"> <view class="banner">
<image class="img" src="@/static/image/index/banner.png" mode="widthFix"></image> <image class="img" src="@/static/image/index/banner.png" mode="widthFix"></image>
</view> </view>
<view class="block"> <view class="block" style="margin-top: 0">
<view class="title-wrap"> <view class="title-wrap">
<view class="title">热门标签</view> <view class="title">热门标签</view>
</view> </view>
@ -30,7 +30,7 @@
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell" v-html="item.productIntroduction"></view> <view class="des ell">{{ item.productIntroduction }}</view>
<view class="meta"> <view class="meta">
<image class="icon" src="@/static/image/index/9.png"></image> <image class="icon" src="@/static/image/index/9.png"></image>
适用专业: 适用专业:
@ -42,7 +42,7 @@
</view> </view>
<view class="block"> <view class="block" style="margin-top: 40rpx">
<view class="title-wrap"> <view class="title-wrap">
<view class="title">官方推荐</view> <view class="title">官方推荐</view>
<view class="all" @click="toProduct">全部产品</view> <view class="all" @click="toProduct">全部产品</view>
@ -52,7 +52,7 @@
<image class="pic" :src="$util.getIcon(item)"></image> <image class="pic" :src="$util.getIcon(item)"></image>
<view class="texts"> <view class="texts">
<view class="name ell">{{ item.productName }}</view> <view class="name ell">{{ item.productName }}</view>
<view class="des ell" v-html="item.productIntroduction"></view> <view class="des ell">{{ item.productIntroduction }}</view>
<view class="meta"> <view class="meta">
<image class="icon" src="@/static/image/index/9.png"></image> <image class="icon" src="@/static/image/index/9.png"></image>
适用专业: 适用专业:
@ -83,15 +83,8 @@
offcialProducts: [], offcialProducts: [],
} }
}, },
watch: {
keyword () {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initList()
}, 500)
}
},
onShow() { onShow() {
this.keyword = ''
this.per = true this.per = true
this.getInfo() this.getInfo()
}, },
@ -184,6 +177,9 @@
isShelves: 0, isShelves: 0,
hotTag: 1 hotTag: 1
}).then(({ page }) => { }).then(({ page }) => {
page.records.forEach(e => {
e.productIntroduction = this.$util.removeTag(e.productIntroduction)
})
this.hotProducts = page.records this.hotProducts = page.records
}).catch(e => {}) }).catch(e => {})
@ -196,12 +192,19 @@
hotTag: 1, hotTag: 1,
selection: 1 selection: 1
}).then(({ page }) => { }).then(({ page }) => {
page.records.forEach(e => {
e.productIntroduction = this.$util.removeTag(e.productIntroduction)
})
this.offcialProducts = page.records this.offcialProducts = page.records
}).catch(e => {}) }).catch(e => {})
}, },
//
searchConfirm(e) {
e.value && this.$util.to(`/order/products/products?keyword=${e.value}`)
},
// //
toHot(item) { toHot(item) {
this.$util.to(`/order/products/products?tagId=${item.tagsId}`) this.$util.to(`/order/products/products?tagId=${item.tagsId}&tagsName=${item.tagsName}`)
}, },
// //
toProduct() { toProduct() {
@ -219,7 +222,7 @@
.page { .page {
position: relative; position: relative;
min-height: 100%; min-height: 100%;
padding: 30rpx 22rpx; padding: 10rpx 22rpx;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
} }
@ -246,7 +249,7 @@
} }
} }
.block { .block {
margin: 40rpx 0; margin: 20rpx 0;
.title-wrap { .title-wrap {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -260,6 +263,7 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
font-size: 28rpx; font-size: 28rpx;
font-weight: 600;
color: #333; color: #333;
&:before { &:before {
content: ''; content: '';
@ -280,8 +284,8 @@
text-align: center; text-align: center;
} }
.icon { .icon {
width: 64rpx; width: 70rpx;
height: 64rpx; height: 70rpx;
margin-bottom: 18rpx; margin-bottom: 18rpx;
} }
.text { .text {
@ -306,6 +310,7 @@
} }
.name { .name {
font-size: 28rpx; font-size: 28rpx;
font-weight: 600;
color: #333; color: #333;
} }
.des { .des {

@ -45,6 +45,7 @@
} }
}, },
onShow() { onShow() {
// uni.setStorageSync('token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIiwiaWF0IjoxNjg2NzExNTA5LCJleHAiOjE2ODY3NTQ3MDksImFjY291bnRJZCI6IjEyNTU4In0.SX1sNFtb2JiCufgTz3ZmQkcJ-FtVci7Hp0DFd_mVk8E')
// //
this.checkLogin() this.checkLogin()
}, },

@ -145,6 +145,7 @@
onShow() { onShow() {
// //
try { try {
uni.removeStorageSync('orderForm')
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
this.initRole() this.initRole()

@ -10,7 +10,7 @@
<view class="name">{{ my.info.userName }}</view> <view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view> <view class="phone">{{ my.info.phone }}</view>
</view> </view>
<uni-tag v-if="!disabled" class="tag" :circle="true" text="团队负责人" type="primary" size="small" /> <view v-if="!disabled" class="tag">团队负责人</view>
</view> </view>
<view class="list"> <view class="list">
<view v-if="auth('我的:我的团队')" class="item" @click="$util.to('/team/teams/teams')"> <view v-if="auth('我的:我的团队')" class="item" @click="$util.to('/team/teams/teams')">
@ -269,7 +269,12 @@
color: #333; color: #333;
} }
.tag { .tag {
padding: 8rpx 16rpx;
margin-top: -50rpx; margin-top: -50rpx;
font-size: 24rpx;
color: #fff;
background-color: #2979ff;
border-radius: 20px;
} }
} }
.list { .list {

@ -47,8 +47,7 @@
</template> </template>
<script> <script>
import { tagsList, listOfGoods } from '@/apis/modules/product.js' import { AppletsDataProductList, tagsList, listOfGoods } from '@/apis/modules/product.js'
import { AppletsDataProductList } from '@/apis/modules/product.js'
export default { export default {
data() { data() {
return { return {

@ -14,7 +14,7 @@
</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/workbench/index3.png" mode="widthFix"></image> <image class="icon" src="@/static/image/workbench/index3.png" mode="widthFix"></image>
<view class="text">客户</view> <view class="text">客户</view>
</li> </li>
@ -23,11 +23,11 @@
<view class="text">方案</view> <view class="text">方案</view>
</li> </li>
<li v-if="auth('工作台:学习')" @click="$util.to('/team/study/study')"> <li v-if="auth('工作台:学习')" @click="$util.to('/team/study/study')">
<image class="icon" src="@/static/image/workbench/index11.png" mode="widthFix"></image> <image class="icon" src="@/static/image/workbench/index11.png" mode="widthFix" style="width: 64rpx"></image>
<view class="text">学习</view> <view class="text">学习</view>
</li> </li>
<li v-if="auth('工作台:资讯')" @click="$util.to('/team/info/info')"> <li v-if="auth('工作台:资讯')" @click="$util.to('/team/info/info')">
<image class="icon" src="@/static/image/workbench/index12.png" mode="widthFix"></image> <image class="icon" src="@/static/image/workbench/index12.png" mode="widthFix" style="width: 64rpx"></image>
<view class="text">资讯</view> <view class="text">资讯</view>
</li> </li>
</ul> </ul>

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: 457 B

After

Width:  |  Height:  |  Size: 14 KiB

@ -19,7 +19,7 @@
<text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text> <text class="val">{{ item.lastLoginTime.split(' ')[0] }}</text>
</view> </view>
</view> </view>
<uni-tag v-if="item.isTeam == 1" class="tag" :circle="true" text="团队负责人" type="primary" size="small" /> <view v-if="item.isTeam == 1" class="tag">团队负责人</view>
</li> </li>
</ul> </ul>
<uni-load-more :status="status" /> <uni-load-more :status="status" />
@ -151,6 +151,11 @@
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
right: 40rpx; right: 40rpx;
padding: 8rpx 16rpx;
font-size: 24rpx;
color: #fff;
background-color: #2979ff;
border-radius: 20px;
} }
} }
.plus { .plus {

Loading…
Cancel
Save