Browse Source

Merge branch 'master' of http://gitlab.frkj.cc/php/ZhiHuiJiaoWu_UniApp

# Conflicts:
#	pages/market/data/statistics.vue
master
于宏哲PHP 9 months ago
parent
commit
f18fe1dc0e
  1. 8
      components/uni-popup/uni-popup-dialog.vue
  2. 15
      config.js
  3. 13
      pages/market/clue/add_clues.vue
  4. 340
      pages/market/clue/clue_info.vue
  5. 28
      pages/market/clue/edit_clues.vue
  6. 10
      pages/market/clue/index.vue
  7. 164
      pages/market/clue/order_list.vue
  8. 9
      pages/market/data/index.vue
  9. 2
      pages/student/login/login.vue

8
components/uni-popup/uni-popup-dialog.vue

@ -217,7 +217,7 @@
}
.uni-button-color {
color: $uni-color-primary;
color: $color-primary;
}
.uni-dialog-input {
@ -226,15 +226,15 @@
}
.uni-popup__success {
color: $uni-color-success;
color: $color-success;
}
.uni-popup__warn {
color: $uni-color-warning;
color: $color-warning;
}
.uni-popup__error {
color: $uni-color-error;
color: $color-error;
}
.uni-popup__info {

15
config.js

@ -1,15 +0,0 @@
export default {
server: "http://medication.zeyan.wang",
appName: "要药提醒",
// #ifdef APP-PLUS
version: plus.runtime.version,
varsionCode: plus.runtime.versionCode,
// #endif
// #ifndef APP-PLUS
version: '1.0.0',
// #endif
}

13
pages/market/clue/add_clues.vue

@ -74,7 +74,8 @@
<fui-form-item
label="校区"
labelSize='26'
prop=""
prop="campus"
asterisk asteriskPosition="right"
background='#434544'
labelColor='#fff'
:bottomBorder='false'
@ -1215,6 +1216,16 @@ export default {
this.nextStep('0')
return false
}
//
if(!data.campus){
uni.showToast({
title: '校区必填',
icon: 'none'
})
this.nextStep('0')
return false
}
return true
},
//

340
pages/market/clue/clue_info.vue

@ -120,145 +120,29 @@
<!-- 通话记录-->
<view class="call-log" v-if="switch_tags_type == 3">
<!-- 添加备注按钮 -->
<view style="width: 92%; margin: 20rpx auto; display: flex; justify-content: center;">
<button type="primary" style="background-color: #29D3B4; color: white;" @click="openAddRemark">添加备注</button>
<view class="call-record-wrapper" v-for="(v,k) in listCallUp" :key="k">
<view class="call-record-item">
<view class="call-record-header">
<view class="call-name">{{v.name}}</view>
<view class="call-time">{{v.create_time}}</view>
</view>
<view style="margin-top: 20rpx" v-for="(v,k) in listCallUp" :key="k">
<!-- <view class="basic-message">08-23</view>-->
<view class="follow-records-list">
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>{{v.name}}</view>
<view>{{v.create_time}}</view>
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>呼叫时间{{v.created_at}}</view>
<view>呼叫备注{{v.remarks}}</view>
</view>
</view>
</view>
<view style="height: 200rpx;"></view>
</view>
<!-- 在籍客户-->
<view class="registered-clients" v-if="switch_tags_type == 4">
<view class="search">
<view :class="{'selected': select_type === 1, 'not-selected': select_type !== 1}" @click="getSelect(1)">
全部(320)
</view>
<view :class="{'selected': select_type === 2, 'not-selected': select_type !== 2}" @click="getSelect(2)">
同校(8)
</view>
<view :class="{'selected': select_type === 3, 'not-selected': select_type !== 3}" @click="getSelect(3)">
同班(15)
</view>
<view :class="{'selected': select_type === 4, 'not-selected': select_type !== 4}" @click="getSelect(4)">
同小区(12)
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="false">
同小区
</view>
<view class="coeducation" v-if="true">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="false">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="true">
同班
<view class="call-record-content">
<view class="call-detail">
<text class="call-label">呼叫时间</text>
<text>{{v.created_at}}</text>
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="margin: 16rpx;">
<view class="follow-records-list">
<view class="same-community" v-if="true">
同小区
</view>
<view class="coeducation" v-if="false">
同校
</view>
<view class="coeducation" v-if="false">
同班
</view>
<view style="display: flex;justify-content: space-between;padding: 16rpx 16rpx 16rpx 60rpx;">
<view>包子皮</view>
<button
type="primary"
size="mini"
class="remark-btn"
@click="openAddRemark(v)">
添加备注
</button>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;display: flex;justify-content: space-between;">
<view>合同联系人包念念<span style="font-size: 20rpx;color: #a47332;padding-left: 12rpx;">妈妈</span></view>
<view>课程课程名称1</view>
<view class="call-remark">
<text class="call-label">呼叫备注</text>
<text class="call-remark-content">{{v.remarks || '无'}}</text>
</view>
<view style="padding: 16rpx 16rpx 16rpx 60rpx;">2020-08-30 签单</view>
</view>
</view>
<view style="height: 200rpx;"></view>
@ -275,15 +159,19 @@
<!-- 添加备注弹窗 -->
<uni-popup ref="remarkPopup" type="dialog">
<uni-popup-dialog
title="添加备注"
:title="currentRecord ? `添加备注 (${currentRecord.name || '未知'})` : '添加备注'"
:before-close="true"
@confirm="confirmRemark"
@close="closeRemark">
<uni-easyinput
type="textarea"
<view class="remark-textarea-container">
<textarea
class="remark-textarea"
v-model="remark_content"
placeholder="请输入备注内容">
</uni-easyinput>
placeholder="请输入备注内容"
maxlength="200"
></textarea>
<text class="remark-count">{{remark_content.length}}/200</text>
</view>
</uni-popup-dialog>
</uni-popup>
</view>
@ -294,8 +182,12 @@
import apiRoute from '@/api/apiRoute.js';
import marketApi from '@/api/market.js';
export default {
components: {
//
uniPopup: () => import('@/components/uni-popup/uni-popup.vue'),
uniPopupDialog: () => import('@/components/uni-popup/uni-popup-dialog.vue'),
},
data() {
return {
switch_tags_type: 1,
@ -319,6 +211,8 @@
//
remark_content: '',
//
currentRecord: null,
}
},
onLoad(options) {
@ -607,8 +501,9 @@
},
//
openAddRemark() {
openAddRemark(record) {
this.remark_content = '';
this.currentRecord = record;
this.$refs.remarkPopup.open();
},
@ -638,6 +533,12 @@
tag: null //
};
// ID
if (this.currentRecord && this.currentRecord.id) {
params.related_record_id = this.currentRecord.id; // ID
console.log('添加备注到通话记录:', this.currentRecord);
}
const res = await apiRoute.xs_communicationRecordsAdd(params);
if (res.code !== 1) {
@ -890,11 +791,50 @@
background: #fff;
position: fixed;
bottom: 0;
left: 0;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 30rpx;
}
//
.remark-textarea-container {
width: 100%;
position: relative;
padding: 10rpx 0;
}
.remark-textarea {
width: 100%;
height: 200rpx;
border: 1px solid #ddd;
border-radius: 8rpx;
padding: 20rpx;
font-size: 28rpx;
background-color: #f8f8f8;
box-sizing: border-box;
}
.remark-count {
position: absolute;
bottom: 20rpx;
right: 20rpx;
font-size: 24rpx;
color: #999;
}
//
.remark-btn {
background-color: #29D3B4 !important;
color: white !important;
margin: 0 !important;
padding: 0 20rpx !important;
height: 60rpx !important;
line-height: 60rpx !important;
font-size: 24rpx !important;
border-radius: 30rpx !important;
}
.follow-records-list{
width: 92%;
background: #434544;
@ -959,4 +899,120 @@
padding: 12rpx 8rpx;
text-align: center;
}
.call-record-item {
width: 100%;
background: #434544;
border-radius: 16rpx;
margin: auto;
padding: 16rpx;
color: #fff;
position: relative;
}
.call-record-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.call-name {
font-size: 28rpx;
font-weight: bold;
}
.call-time {
font-size: 24rpx;
color: #999;
}
.call-record-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.call-detail {
display: flex;
align-items: center;
}
.call-label {
font-size: 24rpx;
color: #999;
margin-right: 10rpx;
}
.call-remark {
margin-top: 10rpx;
}
.call-remark-content {
font-size: 24rpx;
color: #fff;
}
//
.call-log {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
}
.call-record-wrapper {
margin-bottom: 20rpx;
}
.call-record-item {
width: 100%;
background: #3D3D3D;
border-radius: 16rpx;
padding: 20rpx;
color: #fff;
box-sizing: border-box;
}
.call-record-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
border-bottom: 1px solid #4A4A4A;
padding-bottom: 10rpx;
}
.call-name {
font-size: 28rpx;
font-weight: bold;
color: #fff;
}
.call-time {
font-size: 24rpx;
color: #999;
}
.call-record-content {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10rpx;
}
.call-detail {
display: flex;
align-items: center;
}
.call-label {
font-size: 24rpx;
color: #999;
margin-right: 10rpx;
}
.call-remark {
margin-top: 10rpx;
padding-top: 10rpx;
border-top: 1px solid #4A4A4A;
}
.call-remark-content {
font-size: 24rpx;
color: #fff;
word-break: break-all;
display: inline-block;
width: 90%;
vertical-align: top;
}
</style>

28
pages/market/clue/edit_clues.vue

@ -1237,7 +1237,33 @@
},
//
async validatorForm(data) {
//
if(!data.name){
uni.showToast({
title: '学生姓名必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if(!data.phone_number){
uni.showToast({
title: '电话必填',
icon: 'none'
})
this.nextStep('0')
return false
}
//
if(!data.campus){
uni.showToast({
title: '校区必填',
icon: 'none'
})
this.nextStep('0')
return false
}
return true
},
//

10
pages/market/clue/index.vue

@ -63,7 +63,7 @@
是否有效{{ v.sixSpeed && v.sixSpeed.efficacious === 1 ? '有效' : '无效' }}
</view>
<view style="padding: 12rpx;">
<image v-if="v.sixSpeed.efficacious === 1"
<image v-if=" v.sixSpeed && v.sixSpeed.efficacious === 1"
:src="$util.img('/uniapp_src/static/images/index/intention2.png')"
class="drop-image-x"></image>
<image v-else :src="$util.img('/uniapp_src/static/images/index/intention3.png')"
@ -667,18 +667,18 @@
//
async searchData() {
if (this.segmented_type == 1) {
this.filteredData_1.shared_at_str = this.showDrawerForm
.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_1.shared_at_str = this.showDrawerForm.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_1.phone_number = this.showDrawerForm.phone_number //-
this.filteredData_1.name = this.showDrawerForm.name //-
this.filteredData_1.campus_name = this.showDrawerForm.campus_name //-
//
await this.resetFilteredData_1()
await this.getList_1()
} else {
this.filteredData_2.shared_at_str = this.showDrawerForm
.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_2.shared_at_str = this.showDrawerForm.shared_at_str //|[(Y-m-d),(Y-m-d)]
this.filteredData_2.phone_number = this.showDrawerForm.phone_number //-
this.filteredData_2.name = this.showDrawerForm.name //-
this.filteredData_2.campus_name = this.showDrawerForm.campus_name //-
//
await this.resetFilteredData_2()
await this.getList_2()

164
pages/market/clue/order_list.vue

@ -291,14 +291,23 @@ export default {
}
},
onLoad(options) {
console.log('页面加载参数:', options)
// options
if (!options || !options.resource_id) {
uni.showToast({
title: '缺少必要参数',
icon: 'none'
})
return
}
this.filteredData.resource_id = options.resource_id // id
this.formData.resource_id = options.resource_id // id
this.formData.resource_id_name = options.resource_name//id
this.formData.resource_id_name = options.resource_name || '' // id
this.formData.staff_id = options.staff_id//id
this.formData.staff_id_name = options.staff_id_name//id
this.formData.staff_id = options.staff_id || '' // id
this.formData.staff_id_name = options.staff_id_name || '' // id
},
onShow(){
this.init()
@ -312,6 +321,7 @@ export default {
methods: {
//
async init(){
try {
//
await this.getPaymentTypeList()
//
@ -321,6 +331,13 @@ export default {
//
await this.getList();
} catch (error) {
console.error('初始化失败:', error)
uni.showToast({
title: '初始化数据失败',
icon: 'none'
})
}
},
//()
@ -381,16 +398,17 @@ export default {
//
async getPaymentTypeList(){
try {
let res = await apiRoute.common_Dictionary({key:'payment_type'})
if(res.code != 1){
uni.showToast({
title: res.msg,
title: res.msg || '获取付款类型失败',
icon: 'none'
})
return
}
let dictionary = res.data.dictionary
let dictionary = res.data
let arr = []
dictionary.forEach((v,k) => {
arr.push({
@ -400,20 +418,28 @@ export default {
})
this.payment_type_options = arr
console.log('付款类型', this.payment_type_options)
} catch (error) {
console.error('获取付款类型失败:', error)
}
},
//
async getCourseList(){
try {
let params = {}
let res = await apiRoute.common_getCourseAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
title: res.msg || '获取课程列表失败',
icon: 'none'
})
return
}
if (!res.data || !Array.isArray(res.data)) {
console.error('课程列表数据格式错误:', res.data)
return
}
let arr = []
res.data.forEach((v,k) => {
@ -425,23 +451,31 @@ export default {
})
this.course_id_options = arr
console.log('课程列表', this.course_id_options)
} catch (error) {
console.error('获取课程列表失败:', error)
}
},
//
async getClassList(){
try {
let params = {
status: 1, //(1 2)
}
let res = await apiRoute.common_getClassAll(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
title: res.msg || '获取班级列表失败',
icon: 'none'
})
return
}
console.log('班级列表',res.data)
if (!res.data || !Array.isArray(res.data)) {
console.error('班级列表数据格式错误:', res.data)
return
}
let arr = []
res.data.forEach((v,k) => {
arr.push({
@ -450,6 +484,10 @@ export default {
})
})
this.class_id_options = arr
console.log('班级列表', this.class_id_options)
} catch (error) {
console.error('获取班级列表失败:', error)
}
},
@ -488,9 +526,16 @@ export default {
},
//
async submitFormData() {
try {
let param = {...this.formData}
//
//...
if(!param.resource_id){
uni.showToast({
title: '客户信息缺失',
icon: 'none'
})
return
}
if(!param.class_id){
uni.showToast({
title: '请选择班级',
@ -512,23 +557,41 @@ export default {
})
return
}
if(!param.staff_id){
uni.showToast({
title: '员工信息缺失',
icon: 'none'
})
return
}
if(!param.money){
uni.showToast({
title: '订单金额为空',
icon: 'none'
})
return
}
console.log('提交xxx',param)
console.log('提交订单数据:', param)
this.closeOrderShow()
uni.showLoading({
title: '提交中...'
})
let res = await apiRoute.xs_orderTableAdd(param)
uni.hideLoading()
if (res.code != 1) {
uni.showToast({
title: res.msg,
title: res.msg || '创建订单失败',
icon: 'none'
})
return
}
uni.showToast({
title: '操作成功',
title: '创建订单成功',
icon: 'success'
})
@ -537,18 +600,42 @@ export default {
this.resetFilteredData()//
this.getList();//
}, 1500)
} catch (error) {
uni.hideLoading()
console.error('提交订单失败:', error)
uni.showToast({
title: '创建订单失败,请重试',
icon: 'none'
})
}
},
//-
//-
changePaymentType(e){
console.log('选择的付款类型:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的付款类型',
icon: 'none'
})
return
}
this.formData.payment_type = e.value
this.formData.payment_type_name = e.text
this.cancelPaymentType()
},
//-
openPaymentType(){
if (!this.payment_type_options || this.payment_type_options.length === 0) {
uni.showToast({
title: '付款类型数据加载中,请稍后再试',
icon: 'none'
})
this.getPaymentTypeList() //
return
}
this.payment_type_show = true
},
//-
@ -559,17 +646,38 @@ export default {
//-
//-
changeCourseId(e){
console.log('课程',e)
console.log('选择的课程:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的课程',
icon: 'none'
})
return
}
this.formData.course_id = e.value
this.formData.course_id_name = e.text
this.formData.money = this.course_id_options.find(v=>v.value == e.value).price
//
const selectedCourse = this.course_id_options.find(v => v.value == e.value)
if (selectedCourse && selectedCourse.price) {
this.formData.money = selectedCourse.price
} else {
this.formData.money = ''
console.warn('未找到所选课程的价格信息')
}
// console.log('formData',this.formData)
this.cancelCourseId()
},
//-
openCourseId(){
if (!this.course_id_options || this.course_id_options.length === 0) {
uni.showToast({
title: '课程数据加载中,请稍后再试',
icon: 'none'
})
this.getCourseList() //
return
}
this.course_id_show = true
},
//-
@ -580,12 +688,28 @@ export default {
//-
//-
changeClassId(e){
console.log('选择的班级:', e)
if (!e || !e.value) {
uni.showToast({
title: '请选择有效的班级',
icon: 'none'
})
return
}
this.formData.class_id = e.value
this.formData.class_id_name = e.text
this.cancelClassId()
},
//-
openClassId(){
if (!this.class_id_options || this.class_id_options.length === 0) {
uni.showToast({
title: '班级数据加载中,请稍后再试',
icon: 'none'
})
this.getClassList() //
return
}
this.class_id_show = true
},
//-

9
pages/market/data/index.vue

@ -4,9 +4,6 @@
<!--自定义导航栏-->
<view class="navbar_section">
<view class="title">数据</view>
<view class="statistics-btn" @click="goToStatistics">
<text>统计表格</text>
</view>
</view>
<!-- 市场人员展示-->
@ -337,12 +334,6 @@ export default {
this.init()
},
methods: {
//
goToStatistics() {
uni.navigateTo({
url: '/pages/market/data/statistics'
});
},
async init(){
await this.getUserInfo()

2
pages/student/login/login.vue

@ -179,7 +179,7 @@
this.openViewHome();
} else {
uni.showToast({
title: res || '登录失败',
title: res.msg || '登录失败',
icon: 'none'
});
}

Loading…
Cancel
Save