Browse Source

修改页面

master
王泽彦 9 months ago
parent
commit
5a844a333c
  1. 27
      common/util.js
  2. 31
      pages.json
  3. 69
      pages/market/clue/add_clues.vue
  4. 57
      pages/market/clue/clue_info.vue
  5. 397
      pages/market/clue/edit_clues.vue
  6. 26
      pages/market/clue/index.vue
  7. 54
      pages/market/index/index.vue
  8. 48
      pages/market/my/index.vue
  9. 222
      pages/market/reimbursement/add.vue
  10. 136
      pages/market/reimbursement/detail.vue
  11. 152
      pages/market/reimbursement/list.vue
  12. 35
      pages/student/login/login.vue

27
common/util.js

@ -218,6 +218,30 @@ function loginOut() {
}) })
} }
/**
* 获取字典值带1小时缓存
* @param {String} dictKey 字典key
* @returns {Promise<Array|Object>}
*/
async function getDict(dictKey) {
const cacheKey = `dict_${dictKey}`;
const cache = uni.getStorageSync(cacheKey);
const now = Date.now();
if (cache && cache.data && cache.expire > now) {
return cache.data;
}
// 缓存无效,请求接口
const res = await marketApi.common_Dictionary({ dictKey });
if (res && res.code === 1) {
uni.setStorageSync(cacheKey, {
data: res.data,
expire: now + 3600 * 1000
});
return res.data;
} else {
return [];
}
}
module.exports = { module.exports = {
loginOut, loginOut,
@ -228,5 +252,6 @@ module.exports = {
dateUtils, dateUtils,
hexToRgba, hexToRgba,
img, img,
formatToDateTime formatToDateTime,
getDict
} }

31
pages.json

@ -511,10 +511,7 @@
{ {
"path": "pages/market/index/index", "path": "pages/market/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页"
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
} }
}, },
{ {
@ -597,6 +594,30 @@
"navigationBarBackgroundColor": "#232323", "navigationBarBackgroundColor": "#232323",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},
{
"path": "pages/market/reimbursement/list",
"style": {
"navigationBarTitleText": "报销列表",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/market/reimbursement/add",
"style": {
"navigationBarTitleText": "新增报销",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/market/reimbursement/detail",
"style": {
"navigationBarTitleText": "报销详情",
"navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "white"
}
} }
@ -604,7 +625,7 @@
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#f7f7f7", "navigationBarBackgroundColor": "#181A20",
"backgroundColor": "#FDFDFD", "backgroundColor": "#FDFDFD",
"enablePullDownRefresh": true "enablePullDownRefresh": true
}, },

69
pages/market/clue/add_clues.vue

@ -526,6 +526,7 @@ import apiRoute from '@/api/apiRoute.js';
import commonApi from '@/api/common.js'; import commonApi from '@/api/common.js';
import marketApi from '@/api/market.js'; import marketApi from '@/api/market.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import util from '@/common/util.js';
const rules = [ const rules = [
@ -886,63 +887,27 @@ export default {
async getDict(inputName){ async getDict(inputName){
let key = '' let key = ''
switch (inputName){ switch (inputName){
// case 'source_channel': key = 'SourceChannel'; break;
case 'source_channel': case 'source': key = 'source'; break;
key = 'SourceChannel' case 'purchasing_power': key = 'customer_purchasing_power'; break;
break; case 'cognitive_idea': key = 'cognitive_concept'; break;
// case 'decision_maker': key = 'decision_maker'; break;
case 'source': case 'initial_intent': key = 'preliminarycustomerintention'; break;
key = 'source' case 'status': key = 'kh_status'; break;
break; case 'distance': key = 'distance'; break;
//
case 'purchasing_power':
key = 'customer_purchasing_power'
break;
//
case 'cognitive_idea':
key = 'cognitive_concept'
break;
//
case 'decision_maker':
key = 'decision_maker'
break;
//
case 'initial_intent':
key = 'preliminarycustomerintention'
break;
//
case 'status':
key = 'kh_status'
break;
//
case 'distance':
key = 'distance'
break;
} }
if(!key){ if(!key){ return }
return // 使 util.getDict
} let dictionary = await util.getDict(key)
if(!dictionary || !Array.isArray(dictionary) || dictionary.length === 0){
uni.showToast({ title: '暂无选项', icon: 'none' })
let res = await apiRoute.common_Dictionary({key:key})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return return
} }
let dictionary = res.data.dictionary
let arr = [] let arr = []
dictionary.forEach((v,k)=>{ //
arr.push({ (dictionary.dictionary || dictionary).forEach((v)=>{
text: v.name, arr.push({ text: v.name, value: v.value })
value: v.value,
})
}) })
this.picker_config[inputName].options = arr this.picker_config[inputName].options = arr
}, },

57
pages/market/clue/clue_info.vue

@ -37,7 +37,7 @@
<view class="btn-item" @click="handleMakeCall"> <view class="btn-item" @click="handleMakeCall">
<image class="btn-icon" :src="$util.img('/uniapp_src/static/images/index/phone.png')"></image> <image class="btn-icon" :src="$util.img('/uniapp_src/static/images/index/phone.png')"></image>
</view> </view>
<view class="btn-item" @click="handleSendMessage"> <view class="btn-item" @click="handleSendMessage" v-if="this.clientInfo.customerResource.member_id">
<image class="btn-icon" :src="$util.img('/uniapp_src/static/images/index/message.png')"></image> <image class="btn-icon" :src="$util.img('/uniapp_src/static/images/index/message.png')"></image>
</view> </view>
</view> </view>
@ -433,41 +433,28 @@
// //
async callTel(tel) { async callTel(tel) {
if (!tel) {
uni.showToast({
title: '电话号码为空',
icon: 'none'
});
return;
}
let param = { let param = {
sales_id:this.resource_sharing_id//线id staff_id: this.userInfo.id, //id
} resource_id: this.clientInfo.resource_id, //ID
let res = await marketApi.setCallUp(param)// resource_type: '', //
if(res.code != 1){ communication_type: 'phone', //: phone-, email-, meeting-, other-
uni.showToast({ communication_result: 'success', //: success-, failure-, pending-
title: res.msg, remarks: null, //
icon: 'none' tag: null, //
}) }
return
} let res = await apiRoute.xs_communicationRecordsAdd(param) //
if (res.code != 1) {
uni.makePhoneCall({ uni.showToast({
phoneNumber: tel, title: res.msg,
success: function () { icon: 'none'
// console.log(''); })
}, return
fail: function (err) { }
console.log('拨打电话失败', err);
uni.showToast({ uni.makePhoneCall({
title: '拨打电话失败', phoneNumber: tel
icon: 'none' })
});
return;
}
});
}, },
// //

397
pages/market/clue/edit_clues.vue

@ -5,81 +5,36 @@
type="text" activeColor="#29d3b4" color="#fff" @click="segmented"> type="text" activeColor="#29d3b4" color="#fff" @click="segmented">
</fui-segmented-control> </fui-segmented-control>
<!-- 基础信息 -->
<!-- 添加客户--> <view v-if="optionTableId == 0" style="margin-top: 20rpx;">
<view style="margin-top: 20rpx;" v-if="optionTableId == 0">
<!-- <view class="search_box">-->
<!-- <view class="input_box">-->
<!-- <input type="text" v-model="student_name" placeholder="请输入客户名称">-->
<!-- </view>-->
<!-- <view class="btn" @click="clientList()">查重</view>-->
<!-- </view>-->
<view class="form-style"> <view class="form-style">
<fui-form ref="form" top="0" :model="formData" :show="false"> <fui-form ref="form" top="0" :model="formData" :show="false">
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<!--姓名--> <!-- 校区 -->
<fui-form-item label="姓名" asterisk asteriskPosition="right" labelSize='26' prop="title" <fui-form-item label="校区" labelSize='26' prop="campus" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写"
v-model="formData.name" backgroundColor="#434544" size="26"
color="#fff"></fui-input>
</view>
</fui-form-item>
<!--联系电话-->
<fui-form-item label="联系电话" asterisk asteriskPosition="right" labelSize='26' prop="title"
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('campus')">
v-model="formData.phone_number" backgroundColor="#434544" size="26" color="#fff" {{ formData.campus ? picker_config.campus.text : '点击选择' }}
@blur="handlePhoneBlur"></fui-input>
</view>
</fui-form-item>
<!--来源-->
<fui-form-item label="来源" labelSize='26' prop=""
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="openCicker(`source`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!-- 来源 -->
<!--来源渠道--> <fui-form-item label="来源" labelSize='26' prop="source" background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-form-item v-if="formData.source == 1" label="来源渠道"
labelSize='26' prop="" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('source')">
@click="openCicker(`source_channel`)"> {{ formData.source ? picker_config.source.text : '点击选择' }}
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!-- 姓名 -->
<!--顾问--> <fui-form-item label="姓名" labelSize='26' prop="name" background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-form-item v-show="false" label="顾问" labelSize='26'
prop="title" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" :disabled="true" placeholder="点击填写"
v-model="picker_config.consultant.text" backgroundColor="#434544" size="26"
color="#808080"></fui-input>
</view>
</fui-form-item>
<!--年龄-->
<fui-form-item label="年龄" labelSize='26' prop="age"
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input-number signColor="#FFF" :min="3" :max="18" <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.name" backgroundColor="#434544" size="26" color="#fff"></fui-input>
v-model="formData.age"></fui-input-number>
</view> </view>
</fui-form-item> </fui-form-item>
<!--性别--> <!-- 性别 -->
<fui-form-item label="性别" labelSize='26' prop="age" <fui-form-item label="性别" labelSize='26' prop="gender" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-radio-group name="radio" v-model="formData.gender" @change="changeSex"> <fui-radio-group name="radio" v-model="formData.gender" @change="changeSex">
<view class="fui-list__item" style="display: flex;justify-content: flex-end;"> <view class="fui-list__item" style="display: flex;justify-content: flex-end;">
@ -99,256 +54,188 @@
</fui-radio-group> </fui-radio-group>
</view> </view>
</fui-form-item> </fui-form-item>
<!-- 年龄 -->
<!--需求--> <fui-form-item label="年龄" labelSize='26' prop="age" background='#434544' labelColor='#fff' :bottomBorder='false'>
<fui-form-item label="需求" labelSize='26' prop="title"
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" <fui-input-number signColor="#FFF" :min="3" :max="100" v-model="formData.age"></fui-input-number>
v-model="formData.demand" backgroundColor="#434544" size="26"
color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--决策人--> <!-- 电话 -->
<fui-form-item label="决策人" labelSize='26' prop="title" <fui-form-item label="电话" labelSize='26' prop="phone_number" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.phone_number" backgroundColor="#434544" size="26" color="#fff" @blur="handlePhoneBlur"></fui-input>
@click="openCicker(`decision_maker`)">
{{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
</view>
</view> </view>
</fui-form-item> </fui-form-item>
</view> </view>
</fui-form> </fui-form>
</view> </view>
<view class="fui-btn__box">
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F"
@click="nextStep('1')">下一步</fui-button>
</view>
</view> </view>
<!-- 添加六要素--> <!-- 电话六要素 -->
<view style="margin-top: 20rpx;" v-if="optionTableId == 1"> <view v-if="optionTableId == 1" style="margin-top: 20rpx;">
<view class="form-style"> <view class="form-style">
<fui-form ref="form" top="0" :model="formData" :show="false"> <fui-form ref="form" top="0" :model="formData" :show="false">
<view class="title" style="margin-top: 20rpx;">六要素信息</view> <view class="title" style="margin-top: 20rpx;">六要素信息</view>
<view class="input-style"> <view class="input-style">
<!--客户初步意向度--> <!-- 需求 -->
<fui-form-item label="客户初步意向度" labelSize='26' prop="" <fui-form-item label="需求" labelSize='26' prop="demand" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('demand')">
@click="openCicker(`initial_intent`)"> {{ formData.demand ? picker_config.demand.text : '点击选择' }}
{{ (formData.initial_intent) ? picker_config.initial_intent.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--客户状态--> <!-- 理念 -->
<fui-form-item label="客户状态" labelSize='26' prop="" <fui-form-item label="理念" labelSize='26' prop="cognitive_idea" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="openCicker(`status`)"> <view class="input-title" style="margin-right:14rpx;" @click="openCicker('cognitive_idea')">
{{ (formData.status) ? picker_config.status.text : '点击选择' }} {{ formData.cognitive_idea ? picker_config.cognitive_idea.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--购买力--> <!-- 上课时间 -->
<fui-form-item label="购买力" labelSize='26' prop="" <fui-form-item label="上课时间" labelSize='26' prop="optional_class_time" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openDate('optional_class_time')">
@click="openCicker(`purchasing_power`)"> {{ formData.optional_class_time ? formData.optional_class_time : '点击选择' }}
{{ (formData.purchasing_power) ? picker_config.purchasing_power.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--认知理念--> <!-- 距离 -->
<fui-form-item label="认知理念" labelSize='26' prop="" <fui-form-item label="距离" labelSize='26' prop="distance" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('distance')">
@click="openCicker(`cognitive_idea`)"> {{ formData.distance ? picker_config.distance.text : '点击选择' }}
{{ (formData.cognitive_idea) ? picker_config.cognitive_idea.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--可选上课时间--> <!-- 决策人 -->
<fui-form-item label="可选上课时间" labelSize='26' prop="" <fui-form-item label="决策人" labelSize='26' prop="decision_maker" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('decision_maker')">
@click="openDate(`optional_class_time`)"> {{ formData.decision_maker ? picker_config.decision_maker.text : '点击选择' }}
{{ (formData.optional_class_time) ? formData.optional_class_time : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--承诺到访时间--> <!-- 客户分类 -->
<fui-form-item label="承诺到访时间" labelSize='26' prop="" <fui-form-item label="客户分类" labelSize='26' prop="customer_type" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" <view class="input-title" style="margin-right:14rpx;" @click="openCicker('customer_type')">
@click="openDate(`promised_visit_time`)"> {{ formData.customer_type ? picker_config.customer_type.text : '点击选择' }}
{{ (formData.promised_visit_time) ? formData.promised_visit_time : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--距离--> <!-- 预约体验课 -->
<fui-form-item label="距离" labelSize='26' prop="title" <fui-form-item label="预约体验课" labelSize='26' prop="trial_lesson" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="openCicker(`distance`)"> <fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="goTrialLesson">预约体验课</fui-button>
{{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
</view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--沟通备注--> <!-- 电话 -->
<fui-form-item label="沟通备注" labelSize='26' prop="title" <fui-form-item label="电话" labelSize='26' prop="phone_number" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.phone_number" backgroundColor="#434544" size="26" color="#fff"></fui-input>
v-model="formData.communication" backgroundColor="#434544" size="26"
color="#fff"></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--一访情况--> <!-- 备注 -->
<fui-form-item label="一访情况" asteriskPosition="right" labelSize='26' prop="title" <fui-form-item label="备注" labelSize='26' prop="remark" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-textarea placeholder="点击填写" style="text-align: left;" <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.remark" backgroundColor="#434544" size="26" color="#fff"></fui-input>
v-model="formData.first_visit_status"></fui-textarea>
</view> </view>
</fui-form-item> </fui-form-item>
<!--二访情况--> <!-- 面咨记录 -->
<fui-form-item label="二访情况" asteriskPosition="right" labelSize='26' prop="title" <fui-form-item label="面咨记录" labelSize='26' prop="consultation_record" background='#434544' labelColor='#fff' :bottomBorder='false'>
background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-textarea placeholder="点击填写" borderColor="#292929" style="text-align: left;" <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.consultation_record" backgroundColor="#434544" size="26" color="#fff"></fui-input>
v-model="formData.second_visit_status"></fui-textarea>
</view> </view>
</fui-form-item> </fui-form-item>
<!--状态-->
<fui-form-item
label="资源有效状态"
labelSize='26'
prop="age"
background='#434544'
labelColor='#fff'
:bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-radio-group name="radio" v-model="formData.efficacious" @change="changeEfficacious">
<view class="fui-list__item" style="display: flex;justify-content: flex-end;">
<fui-label>
<view class="fui-align__center">
<fui-radio :value="1" checked></fui-radio>
<text class="fui-text">有效</text>
</view>
</fui-label>
<fui-label :margin="['0','0','0','40rpx']">
<view class="fui-align__center">
<fui-radio :value="2"></fui-radio>
<text class="fui-text">无效</text>
</view>
</fui-label>
</view>
</fui-radio-group>
</view>
</fui-form-item>
</view> </view>
</fui-form> </fui-form>
</view> </view>
<view class="fui-btn__box">
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</view>
</view> </view>
<!-- 面咨记录 -->
<view v-if="optionTableId == 2" style="margin-top: 20rpx;">
<!-- 年月日-选择时间 --> <view class="form-style">
<fui-date-picker :show="date_picker_show" type="3" @change="change_date" <fui-form ref="form" top="0" :model="formData" :show="false">
@cancel="cancel_date" :value="default_date_value"></fui-date-picker> <view class="title" style="margin-top: 20rpx;">跟进与面咨</view>
<view class="input-style">
<!-- 选择器 --> <!-- 状态 -->
<fui-picker :linkage='picker_linkage' :options="picker_options" :layer="1" :show="picker_show" <fui-form-item label="状态" labelSize='26' prop="status" background='#434544' labelColor='#fff' :bottomBorder='false'>
@change="changeCicker" @cancel="cancelCicker"> <view class="input-title" style="margin-right:14rpx;">
</fui-picker> <view class="input-title" style="margin-right:14rpx;" @click="openCicker('status')">
{{ formData.status ? picker_config.status.text : '点击选择' }}
<!-- 查重弹出层-->
<fui-bottom-popup :show="showDuplicateCheck" @close="closeDuplicateCheck">
<view class="fui-scroll__wrap">
<view class="title_box">
<view></view>
<view class="title">查重结果</view>
<view class="close" @tap="closeDuplicateCheck">
<fui-icon name="close" :size="48"></fui-icon>
</view>
</view>
<scroll-view scroll-y class="section_ul">
<!--暂无数据时展示-->
<view class="not_list" v-if="clientUserList.length == 0">
<image :src="$util.img('/uniapp_src/static/images/index/zan_wu.png')" class="img"></image>
<view class="title">暂无重复客户</view>
</view>
<!--数据列表-->
<view class="ul" v-else>
<view class="li" v-for="(v,k) in clientUserList" :key="k">
<view class="left_box" @click="openViewClueInfo(v)">
<view class="box_1">
<image class="img" :src="$util.img('/uniapp_src/static/images/index/myk.png')">
</image>
<view class="name">{{v.student_name}}</view>
<view class="tag">{{ v.is_status == 1 ? '试听' : '成交' }}</view>
</view> </view>
<view class="box_2"> </view>
<view class="left"> </fui-form-item>
<view class="name">首选联系人{{v.contact_name}}</view> <!-- 一访时间 -->
<!-- <view class="call">妈妈</view>--> <fui-form-item label="一访时间" labelSize='26' prop="first_visit_time" background='#434544' labelColor='#fff' :bottomBorder='false'>
</view> <view class="input-title" style="margin-right:14rpx;">
<view class="input-title" style="margin-right:14rpx;" @click="openDate('first_visit_time')">
{{ formData.first_visit_time ? formData.first_visit_time : '点击选择' }}
</view> </view>
<view class="box_3"> </view>
<view class="left"> </fui-form-item>
{{ $util.formatToDateTime((v.follow && v.follow.follow_up_time || ''), 'm-d H:i') }} <!-- 一访情况 -->
跟进 <fui-form-item label="一访情况" labelSize='26' prop="first_visit_status" background='#434544' labelColor='#fff' :bottomBorder='false'>
</view> <view class="input-title" style="margin-right:14rpx;">
<view class="right"> <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.first_visit_status" backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view>
<image </fui-form-item>
v-if="['A+','A','A-'].includes(v.follow && v.follow.initial_customer_intent || '')" <!-- 二访时间 -->
:src="$util.img('/uniapp_src/static/images/index/intention3.png')" <fui-form-item label="二访时间" labelSize='26' prop="second_visit_time" background='#434544' labelColor='#fff' :bottomBorder='false'>
class="img"></image> <view class="input-title" style="margin-right:14rpx;">
<image <view class="input-title" style="margin-right:14rpx;" @click="openDate('second_visit_time')">
v-else-if="['B+','B','B-'].includes(v.follow && v.follow.initial_customer_intent || '')" {{ formData.second_visit_time ? formData.second_visit_time : '点击选择' }}
:src="$util.img('/uniapp_src/static/images/index/intention2.png')"
class="img"></image>
<image v-else :src="$util.img('/uniapp_src/static/images/index/intention1.png')"
class="img"></image>
<view>意向{{ v.follow && v.follow.initial_customer_intent || '' }}</view>
</view>
</view> </view>
</view> </view>
<view class="right_box"> </fui-form-item>
<image class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" <!-- 二访情况 -->
@click="openViewMyMessage(v)"></image> <fui-form-item label="二访情况" labelSize='26' prop="second_visit_status" background='#434544' labelColor='#fff' :bottomBorder='false'>
<image class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" <view class="input-title" style="margin-right:14rpx;">
@click="dialTel(v)"></image> <fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.second_visit_status" backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view>
</fui-form-item>
<!-- 面咨备注 -->
<fui-form-item label="面咨备注" labelSize='26' prop="consultation_remark" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-input :borderBottom="false" :padding="[0]" placeholder="点击填写" v-model="formData.consultation_remark" backgroundColor="#434544" size="26" color="#fff"></fui-input>
</view>
</fui-form-item>
<!-- 标识 -->
<fui-form-item label="标识" labelSize='26' prop="efficacious" background='#434544' labelColor='#fff' :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;">
<fui-radio-group name="radio" v-model="formData.efficacious" @change="changeEfficacious">
<view class="fui-list__item" style="display: flex;justify-content: flex-end;">
<fui-label>
<view class="fui-align__center">
<fui-radio :value="1" checked></fui-radio>
<text class="fui-text">有效</text>
</view>
</fui-label>
<fui-label :margin="['0','0','0','40rpx']">
<view class="fui-align__center">
<fui-radio :value="2"></fui-radio>
<text class="fui-text">无效</text>
</view>
</fui-label>
</view>
</fui-radio-group>
</view> </view>
</view> </fui-form-item>
</view> </view>
</fui-form>
</scroll-view>
</view> </view>
</fui-bottom-popup> </view>
<!-- 选择器日期选择等控件保留原有 -->
<fui-date-picker :show="date_picker_show" type="3" @change="change_date" @cancel="cancel_date" :value="default_date_value"></fui-date-picker>
<fui-picker :linkage='picker_linkage' :options="picker_options" :layer="1" :show="picker_show" @change="changeCicker" @cancel="cancelCicker"></fui-picker>
<!-- 底部保存按钮 -->
<view class="save-btn-box">
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">保存</fui-button>
</view>
</view> </view>
</template> </template>
@ -553,11 +440,14 @@
optionTableId: 0, optionTableId: 0,
optionTable: [{ optionTable: [{
id: 0, id: 0,
name: '编辑客户' name: '基础信息'
}, },
{ {
id: 1, id: 1,
name: '编辑六要素' name: '电话六要素'
},{
id: 2,
name: '面咨记录'
} }
], ],
} }
@ -1379,4 +1269,15 @@
} }
} }
.save-btn-box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
background: #292929;
padding: 20rpx 40rpx 40rpx 40rpx;
box-shadow: 0 -2rpx 8rpx rgba(0,0,0,0.12);
}
</style> </style>

26
pages/market/clue/index.vue

@ -25,8 +25,7 @@
<view class="card-con-span">{{ v.customerResource.phone_number }}</view> <view class="card-con-span">{{ v.customerResource.phone_number }}</view>
</view> </view>
<view class="card-con"> <view class="card-con">
首联系人{{ v.customerResource.name }} <span 所属校区{{ v.customerResource.name }}
class="card-con-span">{{ v.customerResource.decision_maker }}</span>
</view> </view>
<view class="card-con"> <view class="card-con">
@ -51,7 +50,7 @@
class="drop-image-x"></image> class="drop-image-x"></image>
</view> </view>
<view class="title-x"> <view class="title-x">
意向{{ v.customerResource && v.customerResource.initial_intent_name || '' }}</view> 是否有效{{ v.customerResource && v.customerResource.initial_intent_name || '' }}</view>
</view> </view>
</view> </view>
</view> </view>
@ -82,7 +81,7 @@
</view> </view>
</view> </view>
<view class="card" v-for="(v,k) in tableList_2" :key="k"> <view class="card" v-for="(v,k) in tableList_2" :key="k">
<view style="width: 70%;"> <view style="width: 80%;">
<view style="display: flex;align-items: center;padding: 20rpx;"> <view style="display: flex;align-items: center;padding: 20rpx;">
<view> <view>
<image :src="$util.img('/uniapp_src/static/images/index/myk.png')" class="card-image"> <image :src="$util.img('/uniapp_src/static/images/index/myk.png')" class="card-image">
@ -112,16 +111,13 @@
class="drop-image-x"></image> class="drop-image-x"></image>
</view> </view>
<view class="title-x"> <view class="title-x">
意向{{ v.customerResource && v.customerResource.initial_intent_name || '' }}</view> 是否有效{{ v.customerResource && v.customerResource.initial_intent_name || '' }}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view style="width: 15%;"> <view style="width: 20%;" @click="openAssign(v)">
<!-- <image :src="$util.img('/uniapp_src/static/images/index/message.png')" class="image"></image>--> <view class="ling">分配</view>
</view>
<view style="width: 15%;" @click="openAssign(v)">
<view class="ling"></view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
@ -579,13 +575,9 @@
return return
} }
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: tel phoneNumber: tel
}) })
}, },
// //
@ -834,10 +826,10 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 50%; border-radius: 10rpx;
color: #fff; color: #fff;
width: 50rpx; width: 100rpx;
height: 50rpx; padding: 10rpx 0;
background-color: #F59A23; background-color: #F59A23;
} }

54
pages/market/index/index.vue

@ -19,7 +19,7 @@
<!-- 续费体测记录 --> <!-- 续费体测记录 -->
<view class="record-card"> <view class="record-card">
<view class="card-title">续费体测记录</view> <view class="card-title">续费提成</view>
<view class="table"> <view class="table">
<view class="table-header"> <view class="table-header">
<view class="th">时间</view> <view class="th">时间</view>
@ -187,29 +187,29 @@
<style lang="less" scoped> <style lang="less" scoped>
// //
.navbar_section { .navbar_section {
border: 1px solid #fff; border: 1px solid #23262F;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #fff; background: #23262F;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.18);
.title { .title {
padding: 40rpx 0rpx; padding: 40rpx 0rpx;
/* 小程序端样式 */
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
padding: 80rpx 0rpx; padding: 80rpx 0rpx;
// #endif // #endif
font-size: 30rpx; font-size: 30rpx;
color: #858585; color: #F5F6FA;
font-weight: bold;
letter-spacing: 2rpx;
} }
} }
.assemble { .assemble {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: #f5f5f5; background: #181A20;
padding-bottom: 100rpx; padding-bottom: 100rpx;
} }
@ -232,11 +232,12 @@
.drop-image { .drop-image {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;
filter: brightness(0.8);
} }
.title { .title {
font-size: 30rpx; font-size: 30rpx;
color: #7F7F7F; color: #F5F6FA;
padding-left: 20rpx; padding-left: 20rpx;
} }
@ -325,20 +326,23 @@
.filter-section { .filter-section {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background: #fff; background: #23262F;
margin-bottom: 20rpx; margin-bottom: 20rpx;
border-radius: 12rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.2);
.date-picker { .date-picker {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #F5F6FA;
.drop-image { .drop-image {
width: 30rpx; width: 30rpx;
height: 30rpx; height: 30rpx;
margin-left: 10rpx; margin-left: 10rpx;
filter: brightness(0.8);
} }
} }
} }
@ -349,27 +353,31 @@
padding: 30rpx; padding: 30rpx;
border-radius: 16rpx; border-radius: 16rpx;
color: #fff; color: #fff;
box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.25);
.card-title { .card-title {
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
color: #fff;
} }
.commission-amount { .commission-amount {
font-size: 48rpx; font-size: 48rpx;
font-weight: bold; font-weight: bold;
color: #fff;
} }
} }
.record-card { .record-card {
background: #fff; background: #23262F;
margin: 20rpx; margin: 20rpx;
padding: 20rpx; padding: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.18);
.card-title { .card-title {
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #F5F6FA;
margin-bottom: 20rpx; margin-bottom: 20rpx;
font-weight: bold; font-weight: bold;
} }
@ -379,14 +387,16 @@
.table-header { .table-header {
display: flex; display: flex;
background: #f8f8f8; background: #181A20;
padding: 20rpx 0; padding: 20rpx 0;
border-radius: 8rpx 8rpx 0 0;
.th { .th {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
color: #666; color: #A0A3B1;
font-weight: 500;
} }
} }
@ -394,7 +404,8 @@
.tr { .tr {
display: flex; display: flex;
padding: 20rpx 0; padding: 20rpx 0;
border-bottom: 1px solid #eee; border-bottom: 1px solid #33343A;
transition: background 0.2s;
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
@ -404,10 +415,19 @@
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 26rpx; font-size: 26rpx;
color: #333; color: #F5F6FA;
font-weight: 400;
}
&:hover {
background: #23262F;
} }
} }
} }
} }
} }
//
::-webkit-scrollbar {
display: none;
}
</style> </style>

48
pages/market/my/index.vue

@ -32,47 +32,14 @@
</view> </view>
</view> </view>
</view> </view>
<!--统计信息-->
<!-- <view class="count_section">-->
<!-- <view class="main">-->
<!-- <view class="course_box">-->
<!-- <view class="top">-->
<!-- <view class="item">-->
<!-- <view class="num">{{userInfo.yjds}}</view>-->
<!-- <view class="intro">业绩单数/</view>-->
<!-- </view>-->
<!-- <view class="item">-->
<!-- <view class="num">{{userInfo.yqds}}</view>-->
<!-- <view class="intro">已签单数/</view>-->
<!-- </view>-->
<!-- <view class="item">-->
<!-- <view class="num">1234</view>-->
<!-- <view class="intro">新课签到数/</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="bottom">-->
<!-- 较上月-->
<!-- <text class="reduce">-5</text>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="bg_box bg_top"></view>-->
<!-- <view class="bg_box bg_bottom"></view>-->
<!-- </view>-->
</view> </view>
<view class="main_section"> <view class="main_section">
<view class="section_box"> <view class="section_box">
<view class="item"> <view class="item" @click="openViewReimbursementList()">
<view @click="openViewSignedClientList()">已签客户</view> <view>报销记录</view>
<view>{{signedClientListCount}}</view>
</view>
<view class="item" @click="openViewFirmInfo()">
<view>企业信息</view>
<view></view> <view></view>
</view> </view>
@ -88,10 +55,6 @@
</view> </view>
<view class="section_box"> <view class="section_box">
<!-- <view class="item" @click="openViewFeedback()">-->
<!-- <view>意见反馈</view>-->
<!-- <view></view>-->
<!-- </view>-->
<view class="item" @click="openViewSetUp()"> <view class="item" @click="openViewSetUp()">
<view>设置</view> <view>设置</view>
@ -255,6 +218,13 @@ export default {
url: '/pages/common/my_message' url: '/pages/common/my_message'
}) })
}, },
//-
openViewReimbursementList(){
this.$navigateTo({
url: '/pages/market/reimbursement/list'
})
},
} }
} }
</script> </script>

222
pages/market/reimbursement/add.vue

@ -0,0 +1,222 @@
<template>
<view class="reim-add-page">
<view class="header-bar">
<view class="title">{{ pageTitle }}</view>
</view>
<view class="form-box">
<!-- 金额 -->
<view class="form-row">
<view class="label">报销金额</view>
<input class="input-amount" type="number" v-model="form.amount" placeholder="0.00" :disabled="disabled" />
</view>
<!-- 描述 -->
<view class="form-row-top">
<view class="label">报销描述</view>
<textarea class="textarea" v-model="form.description" placeholder="请输入报销事由" :disabled="disabled" />
</view>
<!-- 附件 -->
<view class="form-row">
<view class="label">发票/收据</view>
<view class="file-upload-wrapper">
<view v-if="form.receipt_url" class="preview-box" @click="previewImage">
<image v-if="isImage(form.receipt_url)" :src="form.receipt_url" class="preview-img" mode="aspectFit" />
<view v-else class="file-link">{{ getFileName(form.receipt_url) }}</view>
</view>
<button class="upload-btn" @click="chooseFile" :disabled="disabled">
{{ form.receipt_url ? '重新选择' : '选择附件' }}
</button>
</view>
</view>
</view>
<view class="save-btn-box" v-if="!disabled">
<fui-button background="#434544" color="#24BA9F" borderColor="#24BA9F" @click="submit">提交</fui-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: '新增报销',
disabled: false,
form: {
id: null,
amount: '',
description: '',
receipt_url: '',
}
}
},
onLoad(options) {
if (options.id) {
this.form.id = options.id;
this.fetchDetail(options.id);
}
},
methods: {
fetchDetail(id) {
uni.showLoading({ title: '加载中...' });
setTimeout(() => {
const mockData = {
id: id,
amount: 120.50,
description: '差旅交通费',
receipt_url: '',
status: 'pending',
};
if (mockData.status !== 'pending') {
this.disabled = true;
this.pageTitle = '查看报销';
} else {
this.pageTitle = '编辑报销';
}
this.form.amount = mockData.amount;
this.form.description = `${mockData.description} (${this.disabled ? '不可编辑' : '待审批'})`;
this.form.receipt_url = mockData.receipt_url;
uni.hideLoading();
}, 500);
},
chooseFile() {
uni.chooseImage({
count: 1,
success: (res) => {
this.form.receipt_url = res.tempFilePaths[0];
}
});
},
isImage(url) {
if (!url) return false;
return /\.(jpg|jpeg|png|gif|bmp)$/i.test(url);
},
getFileName(path) {
if (!path) return '';
return path.split('/').pop();
},
previewImage() {
if (this.form.receipt_url && this.isImage(this.form.receipt_url)) {
uni.previewImage({
urls: [this.form.receipt_url]
});
}
},
submit() {
if (!this.form.amount || !this.form.description) {
uni.showToast({ title: '请填写完整', icon: 'none' });
return;
}
if (this.form.id) {
uni.showToast({ title: '修改成功(待对接接口)', icon: 'success' });
} else {
uni.showToast({ title: '提交成功(待对接接口)', icon: 'success' });
}
setTimeout(() => {
uni.navigateBack();
}, 1000);
}
}
}
</script>
<style lang="less" scoped>
.reim-add-page {
min-height: 100vh;
background: #292929;
padding-bottom: 120rpx;
}
.header-bar {
padding: 32rpx;
.title {
font-size: 44rpx;
color: #fff;
font-weight: bold;
}
}
.form-box {
margin: 0 32rpx;
background: #434544;
border-radius: 18rpx;
padding: 0 24rpx;
}
.form-row, .form-row-top {
display: flex;
padding: 32rpx 0;
border-bottom: 1rpx solid #3a3a3a;
&:last-of-type {
border-bottom: none;
}
}
.form-row {
align-items: center;
}
.form-row-top {
align-items: flex-start;
}
.label {
color: #aaa;
font-size: 28rpx;
width: 180rpx;
flex-shrink: 0;
}
.input-amount {
flex: 1;
color: #fff;
font-size: 28rpx;
text-align: right;
}
.textarea {
flex: 1;
height: 180rpx;
color: #fff;
font-size: 28rpx;
background-color: transparent;
padding: 0;
width: 100%;
}
.file-upload-wrapper {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
gap: 20rpx;
}
.upload-btn {
background: #24BA9F;
color: #fff;
border: none;
border-radius: 8rpx;
padding: 0 32rpx;
line-height: 64rpx;
height: 64rpx;
font-size: 26rpx;
margin: 0;
}
.preview-box {
.preview-img {
width: 120rpx;
height: 120rpx;
border-radius: 8rpx;
background: #222;
border: 1rpx solid #333;
}
.file-link {
color: #24BA9F;
font-size: 26rpx;
word-break: break-all;
}
}
.save-btn-box {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
background: #292929;
padding: 20rpx 40rpx 40rpx 40rpx;
box-shadow: 0 -2rpx 8rpx rgba(0,0,0,0.12);
}
</style>

136
pages/market/reimbursement/detail.vue

@ -0,0 +1,136 @@
<template>
<view class="reim-detail-page">
<view class="header-bar">
<view class="title">报销详情</view>
</view>
<view class="detail-box">
<view class="row">
<view class="label">报销金额</view>
<view class="value">{{ detail.amount }}</view>
</view>
<view class="row">
<view class="label">报销描述</view>
<view class="value">{{ detail.description }}</view>
</view>
<view class="row">
<view class="label">发票/收据</view>
<view class="value">
<image v-if="detail.receipt_url && isImage(detail.receipt_url)" :src="detail.receipt_url" class="receipt-img" mode="aspectFit" />
<view v-else-if="detail.receipt_url" class="file-link">{{ detail.receipt_url }}</view>
<text v-else>无附件</text>
</view>
</view>
<view class="row">
<view class="label">状态</view>
<view class="value status-{{detail.status}}">{{ statusMap[detail.status] || detail.status }}</view>
</view>
<view class="row">
<view class="label">创建时间</view>
<view class="value">{{ detail.created_at }}</view>
</view>
<view class="row">
<view class="label">修改时间</view>
<view class="value">{{ detail.updated_at }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {},
statusMap: {
pending: '待审批',
approved: '已批准',
rejected: '已拒绝',
},
}
},
onLoad(options) {
if (options.id) {
this.fetchDetail(options.id);
} else {
uni.showToast({ title: '缺少报销ID', icon: 'none' });
uni.navigateBack();
}
},
methods: {
fetchDetail(id) {
//
uni.showLoading({ title: '加载中...' });
setTimeout(() => {
const mockData = {
id: id,
amount: 300.00,
description: '办公用品采购(已批准)',
receipt_url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
status: 'approved',
created_at: '2024-06-02 09:30',
updated_at: '2024-06-03 12:00',
};
this.detail = mockData;
uni.hideLoading();
}, 500);
},
isImage(url) {
if (!url) return false;
return /\.(jpg|jpeg|png|gif|bmp)$/i.test(url)
}
}
}
</script>
<style lang="less" scoped>
.reim-detail-page {
min-height: 100vh;
background: #292929;
}
.header-bar {
padding: 32rpx 32rpx 0 32rpx;
.title {
font-size: 36rpx;
color: #24BA9F;
font-weight: bold;
}
}
.detail-box {
margin: 32rpx;
background: #434544;
border-radius: 18rpx;
padding: 32rpx 24rpx 24rpx 24rpx;
}
.row {
display: flex;
align-items: flex-start;
margin-bottom: 32rpx;
.label {
color: #aaa;
font-size: 28rpx;
width: 180rpx;
flex-shrink: 0;
margin-top: 10rpx;
}
.value {
color: #fff;
font-size: 28rpx;
word-break: break-all;
}
.status-pending { color: #f0ad4e; }
.status-approved { color: #24BA9F; }
.status-rejected { color: #e74c3c; }
.receipt-img {
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
background: #222;
border: 1rpx solid #333;
}
.file-link {
color: #24BA9F;
font-size: 26rpx;
word-break: break-all;
}
}
</style>

152
pages/market/reimbursement/list.vue

@ -0,0 +1,152 @@
<template>
<view class="reim-list-page">
<view class="header-bar">
<view class="title">报销列表</view>
<fui-button
background="transparent"
color="#24BA9F"
borderColor="#24BA9F"
width="180rpx"
height="64rpx"
radius="32rpx"
@click="goAdd">
新增报销
</fui-button>
</view>
<view v-if="list.length === 0" class="empty-tip">暂无报销记录</view>
<view v-for="item in list" :key="item.id" class="reim-card" @click="goDetail(item)">
<view class="row">
<view class="label">金额</view>
<view class="value">{{ item.amount }}</view>
</view>
<view class="row">
<view class="label">描述</view>
<view class="value">{{ item.description }}</view>
</view>
<view class="row">
<view class="label">发票/收据</view>
<view class="value">
<image v-if="item.receipt_url" :src="item.receipt_url" class="receipt-img" mode="aspectFit" />
<text v-else>无附件</text>
</view>
</view>
<view class="row">
<view class="label">状态</view>
<view class="value status-{{item.status}}">{{ statusMap[item.status] || item.status }}</view>
</view>
<view class="row">
<view class="label">创建时间</view>
<view class="value">{{ item.created_at }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [
{
id: 1,
amount: 120.50,
description: '差旅交通费',
receipt_url: '',
status: 'pending',
created_at: '2024-06-01 10:00',
},
{
id: 2,
amount: 300.00,
description: '办公用品采购',
receipt_url: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
status: 'approved',
created_at: '2024-06-02 09:30',
},
],
statusMap: {
pending: '待审批',
approved: '已批准',
rejected: '已拒绝',
},
}
},
methods: {
goAdd() {
uni.navigateTo({
url: '/pages/market/reimbursement/add'
});
},
goDetail(item) {
//
if (item.status === 'pending') {
uni.navigateTo({
url: `/pages/market/reimbursement/add?id=${item.id}`
});
} else {
uni.navigateTo({
url: `/pages/market/reimbursement/detail?id=${item.id}`
});
}
}
}
}
</script>
<style lang="less" scoped>
.reim-list-page {
min-height: 100vh;
background: #292929;
padding-bottom: 120rpx;
}
.header-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 32rpx 0 32rpx;
.title {
font-size: 36rpx;
color: #fff;
font-weight: bold;
}
}
.empty-tip {
color: #888;
text-align: center;
margin: 80rpx 0;
}
.reim-card {
background: #434544;
border-radius: 18rpx;
margin: 32rpx;
margin-bottom: 0;
padding: 32rpx 24rpx 24rpx 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.08);
.row {
display: flex;
align-items: center;
margin-bottom: 18rpx;
.label {
color: #aaa;
font-size: 26rpx;
width: 140rpx;
flex-shrink: 0;
}
.value {
color: #fff;
font-size: 28rpx;
word-break: break-all;
}
.status-pending { color: #f0ad4e; }
.status-approved { color: #24BA9F; }
.status-rejected { color: #e74c3c; }
.receipt-img {
width: 120rpx;
height: 120rpx;
border-radius: 8rpx;
background: #222;
border: 1rpx solid #333;
}
}
}
</style>

35
pages/student/login/login.vue

@ -13,8 +13,7 @@
<view :style="{'background-color':'#fff','width':'100%','height':'100vh' }"> <view :style="{'background-color':'#fff','width':'100%','height':'100vh' }">
<view style="width: 95%;height: 30rpx;"></view> <view style="width: 95%;height: 30rpx;"></view>
<view style="width: 95%;margin:30rpx auto;"> <view style="width: 95%;margin:30rpx auto;">
<fui-input borderTop placeholder="登录账号" v-model="user" <fui-input borderTop placeholder="登录账号" v-model="user" backgroundColor="#f2f2f2"></fui-input>
backgroundColor="#f2f2f2"></fui-input>
</view> </view>
<view style="width: 95%;margin: auto;"> <view style="width: 95%;margin: auto;">
@ -177,7 +176,7 @@
title:'登录成功', title:'登录成功',
icon: 'success' icon: 'success'
}); });
this.openViewHome();
} else { } else {
uni.showToast({ uni.showToast({
title: res || '登录失败', title: res || '登录失败',
@ -232,22 +231,6 @@
this.loginType = e.value this.loginType = e.value
this.loginType_str = e.text this.loginType_str = e.text
this.picker_show_loginType = false this.picker_show_loginType = false
//@todo 线
if (this.loginType == 1) {
//
this.user = '15374889135' //
this.password1 = '15374889135' //
} else if (this.loginType == 2) {
//
this.user = '15148228108' //
this.password1 = '123123' //
} else {
//
this.user = '13042409890' //
this.password1 = '13042409890' //
}
}, },
//- //-
@ -255,10 +238,20 @@
const userType = String(uni.getStorageSync('userType') || ''); const userType = String(uni.getStorageSync('userType') || '');
const token = uni.getStorageSync('token') || '' const token = uni.getStorageSync('token') || ''
if (!userType || !token) { if (!userType) {
uni.showToast({
title: '您的角色不能访问本功能,请联系管理员',
icon: 'none'
})
return
}
if (!token) {
uni.showToast({
title: '请先登录',
icon: 'none'
})
return return
} }
const pages = getCurrentPages(); const pages = getCurrentPages();
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
const thisPath = '/' + currentPage.route; const thisPath = '/' + currentPage.route;

Loading…
Cancel
Save