yujialong 2 years ago
parent 61d2383593
commit bb1ed11a1d
  1. 4
      config/request.js
  2. 6
      order/addCourse/addCourse.vue
  3. 19
      order/editCourse/editCourse.vue
  4. 27
      order/orderDetail/orderDetail.vue
  5. 8
      order/products/products.vue
  6. 6
      pages/login/login.vue

@ -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'
}, },

@ -18,7 +18,7 @@
<li v-for="(item, i) in list"> <li v-for="(item, i) in list">
<uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox> <uni-data-checkbox v-if="item.check" class="check" multiple :value="[1]" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox> <uni-data-checkbox v-else class="check" multiple v-model="item.check" :localdata="item.checkData" @change="e => checkChange(e, i)"></uni-data-checkbox>
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)"></image>
{{ item.productName }} {{ item.productName }}
</li> </li>
</ul> </ul>
@ -214,6 +214,7 @@
dataOrCourseId: e.associatedProduct, // id dataOrCourseId: e.associatedProduct, // id
mallId: e.mallId, mallId: e.mallId,
productName: e.productName, // productName: e.productName, //
typeName: e.typeName, //
periodOfUse: '', // 使 periodOfUse: '', // 使
startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), // startTime: this.$util.formatDate(new Date(), 'yyyy-MM-dd'), //
endTime: '', // endTime: '', //
@ -361,7 +362,10 @@
} }
.icon { .icon {
width: 80rpx; width: 80rpx;
min-width: 80rpx;
height: 80rpx;
margin: 0 20rpx; margin: 0 20rpx;
border-radius: 4px;
} }
} }
/deep/.check { /deep/.check {

@ -16,7 +16,7 @@
<view class="form-list"> <view class="form-list">
<view class="line"> <view class="line">
<view class="name">产品类型</view> <view class="name">产品类型</view>
<view class="val">{{ productTypes.find(e => e.id === item.productType).name }}</view> <view class="val">{{ item.typeName }}</view>
</view> </view>
<view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]"> <view :class="['line', {err: err === 'periodOfUse' + item.dataOrCourseId + item.authority}]">
<view class="name">使用期限</view> <view class="name">使用期限</view>
@ -86,7 +86,7 @@
<script> <script>
import { getOrderOtherTime } from '@/apis/modules/order.js' import { getOrderOtherTime } from '@/apis/modules/order.js'
import { getPartnerTeamRates } from '@/apis/modules/parner.js' import { getPartnerTeamRates } from '@/apis/modules/parner.js'
import { productCategoryList } from '@/apis/modules/product.js' import { productCategoryList, productTypeList } from '@/apis/modules/product.js'
export default { export default {
data() { data() {
return { return {
@ -133,23 +133,22 @@
methods: { methods: {
// //
handleProduct() { handleProduct() {
//
productTypeList().then(res => {
this.productTypes = res.typeList
}).catch(e => {})
const list = uni.getStorageSync('courses') const list = uni.getStorageSync('courses')
let courses = {} let courses = {}
// //
productCategoryList().then(res => { productCategoryList().then(res => {
const typeList = []
res.classificationList.forEach(e => { res.classificationList.forEach(e => {
typeList.push({
id: e.classificationId,
name: e.classificationName
})
courses['list' + this.$util.getOrderType(e.classificationId)] = { courses['list' + this.$util.getOrderType(e.classificationId)] = {
shrink: false, shrink: false,
name: e.classificationName, name: e.classificationName,
list: [] list: []
} }
}) })
this.productTypes = typeList
list.map(e => { list.map(e => {
courses['list' + e.authority].list.push(e) courses['list' + e.authority].list.push(e)
}) })
@ -249,9 +248,9 @@
}, },
// //
dealSettlePrice(row) { dealSettlePrice(row) {
// 0 // 0
console.log('dealSettlePrice=>', row, this.orderType) console.log('dealSettlePrice=>', row, this.orderType)
if (this.orderType == 2) { if (this.orderType != 1) {
row.settlementPrice = 0 row.settlementPrice = 0
row.serviceFee = 0 row.serviceFee = 0
} else { } else {

@ -8,7 +8,6 @@
<view v-if="orderId" class="val">{{ form.customerName }}</view> <view v-if="orderId" 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="toClient">找不到客户马上创建</view>
</view> </view>
</view> </view>
<view class="line" v-if="form.customerName"> <view class="line" v-if="form.customerName">
@ -207,6 +206,7 @@
<view class="top">请选择客户</view> <view class="top">请选择客户</view>
<uni-icons class="close" type="closeempty" size="20" @click="closeCustomer"></uni-icons> <uni-icons class="close" type="closeempty" size="20" @click="closeCustomer"></uni-icons>
<uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" /> <uni-search-bar class="search" radius="5" placeholder="请输入客户名称" v-model="keyword" clearButton="auto" cancelButton="none" />
<view class="create" @click="toClient">找不到客户马上创建</view>
<view class="list"> <view class="list">
<view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view> <view class="item" v-for="item in customerList" @click="customerChange(item)">{{ item.customerName }}</view>
</view> </view>
@ -338,11 +338,11 @@
} }
this.courseList = store this.courseList = store
this.courses = list this.courses = list
this.$nextTick(() => { // this.$nextTick(() => {
uni.pageScrollTo({ // uni.pageScrollTo({
selector: '#products', // selector: '#products',
}) // })
}) // })
try { try {
uni.removeStorageSync('courses') uni.removeStorageSync('courses')
} catch (e) {} } catch (e) {}
@ -837,8 +837,8 @@
}, 500) }, 500)
}, },
dealSettlePrice(row) { dealSettlePrice(row) {
// 0 // 0
if (this.form.orderType == 2) { if (this.form.orderType != 1) {
row.settlementPrice = 0 row.settlementPrice = 0
row.serviceFee = 0 row.serviceFee = 0
} else { } else {
@ -997,11 +997,12 @@
.customer-wrap { .customer-wrap {
text-align: right; text-align: right;
} }
.create { }
margin-top: 10rpx; .create {
font-size: 20rpx; padding: 0 20rpx;
color: #f00; font-size: 20rpx;
} text-align: right;
color: #f00;
} }
.pro-wrap { .pro-wrap {
position: relative; position: relative;

@ -18,7 +18,7 @@
<ul class="list"> <ul class="list">
<li v-for="item in list"> <li v-for="item in list">
<view class="pro-name"> <view class="pro-name">
<image class="icon" :src="$util.getIcon(item)" mode="widthFix"></image> <image class="icon" :src="$util.getIcon(item)"></image>
{{ item.productName }} {{ item.productName }}
</view> </view>
<view class="info"> <view class="info">
@ -188,11 +188,13 @@
align-items: center; align-items: center;
padding: 18rpx 0; padding: 18rpx 0;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600;
color: #333; color: #333;
border-bottom: 1px solid #E6E8ED; border-bottom: 1px solid #E6E8ED;
.icon { .icon {
width: 52rpx; width: 58rpx;
height: 52rpx; min-width: 58rpx;
height: 58rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
} }

@ -9,8 +9,8 @@
</button> </button>
<template v-else> <template v-else>
<view class="btn wechat" @click="login"> <view class="btn wechat" @click="login">
<image src="@/static/image/wechat.png" mode="widthFix"></image> <!-- <image src="@/static/image/wechat.png" mode="widthFix"></image> -->
微信授权登录 快捷登录
</view> </view>
</template> </template>
@ -75,7 +75,7 @@
this.submiting = true this.submiting = true
login({ login({
code, code,
avatarUrl: userInfo.avatarUrl // avatarUrl: userInfo.avatarUrl
}).then(({ data }) => { }).then(({ data }) => {
const e = data.sessionKey const e = data.sessionKey
this.sessionKey = e.session_key this.sessionKey = e.session_key

Loading…
Cancel
Save