Browse Source

feat(market): 优化线索来源选择逻辑

- 修改线索添加和编辑页面的来源选择逻辑
- 当选择非线上来源时,自动设置来源渠道为线下
-调整表单字段显示逻辑,根据来源类型动态显示来源渠道字段
master
liutong 10 months ago
parent
commit
bd8990299f
  1. 24
      api/apiRoute.js
  2. 9
      pages.json
  3. 9
      pages/market/clue/clue_info.vue
  4. 262
      pages/market/clue/order_list.vue

24
api/apiRoute.js

@ -413,6 +413,30 @@ export default {
}) })
}, },
//员工端(销售)-订单管理-列表
xs_orderTableList(data = {}) {
let url = '/orderTable'
return http.get(url, data).then(res => {
return res;
})
},
//员工端(销售)-订单管理-详情
xs_orderTableInfo(data = {}) {
let url = '/orderTable/info'
return http.get(url, data).then(res => {
return res;
})
},
//员工端(销售)-订单管理-添加
xs_orderTableAdd(data = {}) {
let url = '/orderTable/add'
return http.post(url, data).then(res => {
return res;
})
},

9
pages.json

@ -483,6 +483,15 @@
"navigationBarBackgroundColor": "#29d3b4", "navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},
{
"path": "pages/market/clue/order_list",
"style": {
"navigationBarTitleText": "订单列表",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black"
}
}, },
{ {
"path": "pages/market/clue/index", "path": "pages/market/clue/index",

9
pages/market/clue/clue_info.vue

@ -261,6 +261,7 @@
<view @click="openViewEditClues()">编辑详情</view> <view @click="openViewEditClues()">编辑详情</view>
<view @click="callTel(clientInfo.student_phone)">拨打电话</view> <view @click="callTel(clientInfo.student_phone)">拨打电话</view>
<view @click="openViewEditCluesLog()">修改记录</view> <view @click="openViewEditCluesLog()">修改记录</view>
<view @click="openViewOrder()">订单列表</view>
</view> </view>
</view> </view>
</view> </view>
@ -374,6 +375,14 @@
}) })
}, },
//-
openViewOrder() {
let resource_id = this.clientInfo.resource_id
this.$navigateTo({
url: `/pages/market/clue/order_list?resource_id=${resource_id}`
})
},
//- //-
openViewNewTask() { openViewNewTask() {
this.$navigateTo({ this.$navigateTo({

262
pages/market/clue/order_list.vue

@ -0,0 +1,262 @@
<!--订单列表-列表-->
<template>
<view class="main_box">
<view class="main_section">
<scroll-view
class="section_1"
scroll-y="true"
:lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData"
style="height: 90vh;"
>
<view
class="item"
v-for="(v,k) in tableList"
:key="k"
>
<view class="top">
<view class="">企业合同</view>
<view class="btn" @click="downloadFile($util.img(v.file_data))">下载合同 <fui-icon name="arrowright" color="#A4ADB3" size="35"></fui-icon></view>
</view>
<view class="bottom">
<view class="box">
<view class="title">合同名称</view>
<view class="content">{{v.title}}</view>
</view>
<view class="box">
<view class="title">签署方</view>
<view class="content">{{v.signatory_a}}</view>
</view>
<view class="box">
<view class="title">签署方</view>
<view class="content">{{v.signatory_b}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import marketApi from '@/api/market.js';
import commonApi from '@/api/common.js';
export default {
components: {
},
data() {
return {
loading:false,//
lowerThreshold: 100,//
isReachedBottom: false,//|true=|false=
//
filteredData:{
page:1,//
limit:10,//
total:10,//
},
tableList:[],//
}
},
onLoad(options) {},
onShow(){
this.init()
},
//
async onPullDownRefresh() {
//
await this.resetFilteredData()
await this.getList()
},
methods: {
//
async init(){
await this.getList();
},
//()
loadMoreData() {
//
if (!this.isReachedBottom) {
this.isReachedBottom = true;//
this.getList();
}
},
//
async resetFilteredData() {
this.isReachedBottom = false; // 便
this.filteredData.page = 1//
this.filteredData.limit = 10//
this.filteredData.total = 10//
},
//
async getList(){
this.loading = true
let data = {...this.filteredData}
//
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
this.loading = false
uni.showToast({
title: '暂无更多',
icon: 'none'
})
return
}
if(data.page == 1){
this.tableList = []
}
let res = await marketApi.contractsList(data)//
this.loading = false
this.isReachedBottom = false;
if (res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.data); // 使 concat
// this.tableList.unshift(...res.data.data); //
console.log('列表',this.tableList)
this.filteredData.total = res.data.total
this.filteredData.page++
},
//
openViewArticleInfo(item) {
let id = item.id
let redirect = item.redirect//
uni.navigateTo({
url: `/pages/common/article_info?id=${id}`
})
},
//
async downloadFile(fileUrl) {
if (!fileUrl) {
this.$util.showToast({
title: '暂无电子发票'
});
return false;
}
uni.downloadFile({
url: fileUrl,
success: function (res) {
console.log('下载成功');
// uni.openDocument({
// filePath: res.tempFilePath,
// fileType: 'pdf',
// success: function (res) {
// console.log('');
// }
// });
}
});
}
}
}
</script>
<style lang="less" scoped>
.main_box {
background: #292929;
}
//
.navbar_section {
display: flex;
justify-content: center;
align-items: center;
background: #29d3b4;
.title {
padding: 20rpx 0;
font-size: 30rpx;
color: #315d55;
}
}
.main_section {
min-height: 100vh;
background: #292929 100%;
padding: 0 0rpx;
padding-top: 32rpx;
padding-bottom: 150rpx;
font-size: 28rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
.section {
background-color: #434544;
padding: 40rpx 40rpx;
}
.section_1{
padding: 0 24rpx;
display: flex;
flex-direction: column;
.item{
margin-bottom: 38rpx;
display: flex;
flex-direction: column;
padding: 32rpx 24rpx;
border-radius: 14rpx;
background-color: #434544;
color: #fff;
.top{
font-size: 28rpx;
display: flex;
justify-content: space-between;
.btn{
display: flex;
align-items: center;
color: #29D3B4;
}
}
.bottom{
font-size: 26rpx;
margin-top: 25rpx;
display: flex;
flex-direction: column;
gap: 15rpx;
.box{
display: flex;
justify-content: space-between;
.title{
width: 180rpx;
}
.content{
width: 100%;
}
}
}
}
}
}
.describe {
color: #999999;
padding-left: 30rpx;
}
</style>
Loading…
Cancel
Save