Merge branch 'main' of http://124.243.245.42:3000/sdz/ks-app-employment-service
This commit is contained in:
@@ -28,31 +28,31 @@
|
|||||||
<!-- 帮扶类型(下拉选择) -->
|
<!-- 帮扶类型(下拉选择) -->
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">帮扶类型:</text>
|
<text class="label">帮扶类型:</text>
|
||||||
<uni-data-select v-model="formData.helpType" :localdata="helpTypes" placeholder="请选择帮扶类型" @change="onHelpTypeChange"></uni-data-select>
|
<uni-data-select v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择帮扶类型" @change="onTaskTypeChange"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 帮扶人员 -->
|
<!-- 帮扶人员 -->
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">帮扶人员:</text>
|
<text class="label">帮扶人员:</text>
|
||||||
<uni-easyinput v-model="formData.helperName" placeholder="请输入帮扶人员姓名"></uni-easyinput>
|
<uni-easyinput v-model="formData.createByName" placeholder="请输入帮扶人员姓名"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 所属区域(下拉选择) -->
|
<!-- 所属区域(下拉选择) -->
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
<text class="label">所属区域:</text>
|
<text class="label">所属区域:</text>
|
||||||
<uni-data-picker class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.helpArea"
|
<uni-data-picker ref="picker" class="picker" placeholder="请选择所属区域" popup-title="请选择所属区域" :localdata="regions" v-model="formData.helpArea"
|
||||||
@change="onchange" >
|
@change="onchange" >
|
||||||
</uni-data-picker>
|
</uni-data-picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 开始时间 -->
|
<!-- 开始时间 -->
|
||||||
<view class="search-item">
|
<view class="search-item" v-if="false">
|
||||||
<text class="label">开始时间:</text>
|
<text class="label">开始时间:</text>
|
||||||
<uni-datetime-picker type="date" placeholder="请选择开始时间" v-model="formData.startTime" @maskClick="onStartTimeChange" />
|
<uni-datetime-picker type="date" placeholder="请选择开始时间" v-model="formData.startTime" @maskClick="onStartTimeChange" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 结束时间 -->
|
<!-- 结束时间 -->
|
||||||
<view class="search-item">
|
<view class="search-item" v-if="false">
|
||||||
<text class="label">结束时间:</text>
|
<text class="label">结束时间:</text>
|
||||||
<uni-datetime-picker type="date" placeholder="请选择结束时间" v-model="formData.endTime" @maskClick="onEndTimeChange" />
|
<uni-datetime-picker type="date" placeholder="请选择结束时间" v-model="formData.endTime" @maskClick="onEndTimeChange" />
|
||||||
</view>
|
</view>
|
||||||
@@ -65,21 +65,20 @@
|
|||||||
<view class="title-line" style="left: 70rpx;"></view>
|
<view class="title-line" style="left: 70rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title-total">
|
<view class="title-total">
|
||||||
共<text class="total-num">7</text>条记录
|
共<text class="total-num">{{totalNum}}</text>条记录
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- v-if="dataList.length>0" -->
|
<view class="list-box" v-if="dataList.length>0">
|
||||||
<view class="list-box" >
|
|
||||||
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class="form-title">
|
<view class="form-title">
|
||||||
<view class="form-name">
|
<view class="form-name">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</view>
|
</view>
|
||||||
<view class="form-type">
|
<view class="form-type">
|
||||||
{{item.type}}
|
{{getTaskTypeLabelByValue(item.task_type)}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.phone">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/tele.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/tele.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -90,7 +89,7 @@
|
|||||||
{{item.phone}}
|
{{item.phone}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.id_card">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -98,10 +97,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.idCard}}
|
{{item.id_card}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.dept_name">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -109,10 +108,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.helpArea}}
|
{{item.dept_name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.create_by_name">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -120,10 +119,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.helperName}}
|
{{item.create_by_name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.create_by_dept_name">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/help.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -131,10 +130,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.helpUnit}}
|
{{item.create_by_dept_name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.follow_date">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -142,10 +141,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.assistanceDate}}
|
{{item.follow_date}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item" v-if="item.next_contact_date">
|
||||||
<view class="item-left">
|
<view class="item-left">
|
||||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||||
<view class="item-label">
|
<view class="item-label">
|
||||||
@@ -153,7 +152,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-right">
|
<view class="item-right">
|
||||||
{{item.nextContact}}
|
{{item.next_contact_date}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-btns">
|
<view class="form-btns">
|
||||||
@@ -163,13 +162,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <empty v-else pdTop="200"></empty> -->
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { inject, ref, reactive } from 'vue';
|
import { inject, ref, reactive,onMounted } from 'vue';
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
const { $api, navTo, navBack } = inject('globalFunction');
|
const { $api, navTo, navBack } = inject('globalFunction');
|
||||||
import config from "@/config.js"
|
import config from "@/config.js"
|
||||||
@@ -179,23 +178,15 @@ const title = ref('');
|
|||||||
const initialForm = {
|
const initialForm = {
|
||||||
name: '',
|
name: '',
|
||||||
idCard: '',
|
idCard: '',
|
||||||
helpType: '',
|
taskType: '',
|
||||||
helperName: '',
|
createByName: '',
|
||||||
helpArea: '',
|
helpArea: [],
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: '',
|
||||||
|
deptId:''
|
||||||
}
|
}
|
||||||
|
|
||||||
const formData = reactive({ ...initialForm });
|
const formData = reactive({ ...initialForm });
|
||||||
// const formData = reactive({
|
const taskTypeOptions=ref([])
|
||||||
// name: '',
|
|
||||||
// idCard: '',
|
|
||||||
// helpType:'',
|
|
||||||
// helperName: '',
|
|
||||||
// helpArea:'',
|
|
||||||
// startTime: '',
|
|
||||||
// endTime: ''
|
|
||||||
// })
|
|
||||||
const dataList=ref([])
|
const dataList=ref([])
|
||||||
const pageSize=ref(10)
|
const pageSize=ref(10)
|
||||||
const pageNum=ref(1)
|
const pageNum=ref(1)
|
||||||
@@ -208,58 +199,15 @@ const getBackgroundStyle = (imageName) => ({
|
|||||||
backgroundRepeat: 'no-repeat'
|
backgroundRepeat: 'no-repeat'
|
||||||
});
|
});
|
||||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
const trainVideoImgUrl=config.trainVideoImgUrl
|
||||||
// 帮扶类型选项
|
const picker = ref(null)
|
||||||
const helpTypes = [{
|
|
||||||
"value": 0,
|
|
||||||
"text": "经济帮扶"
|
|
||||||
}, {
|
|
||||||
"value": 1,
|
|
||||||
"text": "教育帮扶"
|
|
||||||
}, {
|
|
||||||
"value": 2,
|
|
||||||
"text": "医疗帮扶"
|
|
||||||
}, {
|
|
||||||
"value": 3,
|
|
||||||
"text": "就业帮扶"
|
|
||||||
}]
|
|
||||||
|
|
||||||
// 所属区域选项(可根据实际替换为动态数据)
|
// 所属区域选项(可根据实际替换为动态数据)
|
||||||
const regions = [{
|
const regions = ref([])
|
||||||
text: "一年级",
|
|
||||||
value: "1-0",
|
|
||||||
children: [{
|
|
||||||
text: "1.1班",
|
|
||||||
value: "1-1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "1.2班",
|
|
||||||
value: "1-2"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "二年级",
|
|
||||||
value: "2-0",
|
|
||||||
children: [{
|
|
||||||
text: "2.1班",
|
|
||||||
value: "2-1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "2.2班",
|
|
||||||
value: "2-2"
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "三年级",
|
|
||||||
value: "3-0",
|
|
||||||
disable: true
|
|
||||||
}]
|
|
||||||
|
|
||||||
// 事件处理
|
// 事件处理
|
||||||
const onHelpTypeChange = (e) => {
|
const onTaskTypeChange = (e) => {
|
||||||
formData.helpType=e
|
formData.taskType=e
|
||||||
}
|
|
||||||
const onchange=(e)=>{
|
|
||||||
console.log("e",e)
|
|
||||||
}
|
}
|
||||||
const onStartTimeChange = (e) => {
|
const onStartTimeChange = (e) => {
|
||||||
formData.startTime = e.detail.value
|
formData.startTime = e.detail.value
|
||||||
@@ -271,86 +219,162 @@ const onEndTimeChange = (e) => {
|
|||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
// 在这里调用接口进行搜索
|
// 在这里调用接口进行搜索
|
||||||
|
getDataList('refresh')
|
||||||
}
|
}
|
||||||
const handleReset = () =>{
|
const handleReset = () =>{
|
||||||
Object.assign(formData, initialForm);
|
Object.assign(formData, initialForm);
|
||||||
|
getDataList('refresh')
|
||||||
}
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
await loadLevelData('201');
|
||||||
|
});
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
getDictionary()
|
||||||
|
// getDeptOptions()
|
||||||
getDataList('refresh');
|
getDataList('refresh');
|
||||||
});
|
});
|
||||||
|
function getDictionary(){
|
||||||
|
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
|
||||||
|
if(resData && resData.code == 200){
|
||||||
|
resData.data.forEach(item=>{
|
||||||
|
const obj = {
|
||||||
|
value: item.dictValue,
|
||||||
|
text: item.dictLabel
|
||||||
|
}
|
||||||
|
taskTypeOptions.value.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function getTaskTypeLabelByValue(value) {
|
||||||
|
if (!Array.isArray(taskTypeOptions.value)) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
const item = taskTypeOptions.value.find(item => item.value === String(value))
|
||||||
|
return item ? item.text : '暂无帮扶类型'
|
||||||
|
}
|
||||||
|
// 加载某一级的数据(parentId 为空表示根)
|
||||||
|
async function loadLevelData(parentId) {
|
||||||
|
let header = {
|
||||||
|
'Authorization': uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
};
|
||||||
|
let params = { parentId };
|
||||||
|
|
||||||
|
try {
|
||||||
|
const resData = await $api.myRequest('/dispatch/dept/list', params, 'get', 9100, header);
|
||||||
|
if(resData.data.length==0){
|
||||||
|
picker.value.hide()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const formatted = (resData.data || []).map(item => ({
|
||||||
|
text: item.deptName,
|
||||||
|
value: item.deptId,
|
||||||
|
children: []
|
||||||
|
}));
|
||||||
|
if (parentId === '201') {
|
||||||
|
// 第一层
|
||||||
|
regions.value = formatted;
|
||||||
|
} else {
|
||||||
|
// 找到父节点并注入 children
|
||||||
|
injectChildren(parentId, formatted);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("加载部门数据失败:", error);
|
||||||
|
uni.showToast({ title: '加载失败', icon: 'none' });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 将子级数据注入到对应的父节点
|
||||||
|
function injectChildren(parentValue, childrenData) {
|
||||||
|
const findAndInject = (nodes) => {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.value === parentValue) {
|
||||||
|
// 如果 children 已存在且非空,避免重复加载
|
||||||
|
if (!node.children || node.children.length === 0) {
|
||||||
|
node.children = childrenData;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
if (findAndInject(node.children)) return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
findAndInject(regions.value);
|
||||||
// 获取视频列表
|
// 强制更新
|
||||||
|
}
|
||||||
|
// 当用户选择时触发(注意:change 在每级选择后都会触发)
|
||||||
|
function onchange(e) {
|
||||||
|
const selectedValues = e.detail.value;
|
||||||
|
formData.deptId=selectedValues.map(item => item.value).join(',');
|
||||||
|
if (selectedValues.length === 0) return;
|
||||||
|
// 获取最后一级选中的 value
|
||||||
|
const lastSelectedValue = selectedValues[selectedValues.length - 1];
|
||||||
|
// 查找该节点是否有 children,如果没有则尝试加载
|
||||||
|
const node = findNodeByValue(regions.value, lastSelectedValue);
|
||||||
|
if (node && (!node.children || node.children.length === 0)) {
|
||||||
|
// 检查接口是否还有下一级(可通过接口返回判断,或先尝试加载)
|
||||||
|
// 这里我们直接尝试加载下一级
|
||||||
|
loadLevelData(lastSelectedValue.value);
|
||||||
|
picker.value.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 工具函数:根据 value 查找节点
|
||||||
|
function findNodeByValue(nodes, value) {
|
||||||
|
for (let node of nodes) {
|
||||||
|
if (node.value === value.value) {
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
const found = findNodeByValue(node.children, value);
|
||||||
|
if (found) return found;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
function getDeptOptions(){
|
||||||
|
let header={
|
||||||
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
let params={
|
||||||
|
parentId:''
|
||||||
|
}
|
||||||
|
$api.myRequest('/dispatch/dept/list', params,'get',9100,header).then((resData) => {
|
||||||
|
});
|
||||||
|
}
|
||||||
function getDataList(type = 'add') {
|
function getDataList(type = 'add') {
|
||||||
// let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
let maxPage=Math.ceil(totalNum.value/pageSize.value)
|
||||||
// let params={}
|
let params=({...formData})
|
||||||
// if (type === 'refresh') {
|
let header={
|
||||||
// pageNum.value = 1;
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
// params={
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
// category:'',
|
}
|
||||||
// hour:'',
|
if (type === 'refresh') {
|
||||||
// level:'',
|
pageNum.value = 1;
|
||||||
// searchValue:searchKeyword.value,
|
params.pageSize=pageSize.value
|
||||||
// orderStr:'',
|
params.pageNum=pageNum.value
|
||||||
// pageSize:pageSize.value,
|
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||||
// pageNum:pageNum.value
|
if(resData&&resData.code == 200){
|
||||||
// }
|
dataList.value=resData.rows
|
||||||
// $api.myRequest('/train/public/trainVideo/trainVideoList', params).then((resData) => {
|
totalNum.value=resData.total
|
||||||
// dataList.value=resData.rows
|
}
|
||||||
// totalNum.value=resData.total
|
});
|
||||||
// });
|
}
|
||||||
// }
|
if (type === 'add' && pageNum.value < maxPage) {
|
||||||
// if (type === 'add' && pageNum.value < maxPage) {
|
pageNum.value += 1;
|
||||||
// pageNum.value += 1;
|
params.pageSize=pageSize.value
|
||||||
// params={
|
params.pageNum=pageNum.value
|
||||||
// category:'',
|
$api.myRequest('/dispatch/assist/records/pageRecords', params,'get',9100,header).then((resData) => {
|
||||||
// hour:'',
|
dataList.value=dataList.value.concat(resData.rows)
|
||||||
// level:'',
|
});
|
||||||
// searchValue:searchKeyword.value,
|
|
||||||
// orderStr:'',
|
|
||||||
// pageSize:pageSize.value,
|
|
||||||
// pageNum:pageNum.value
|
|
||||||
// }
|
|
||||||
// $api.myRequest('/train/public/trainVideo/trainVideoList', params).then((resData) => {
|
|
||||||
// dataList.value=dataList.value.concat(resData.rows)
|
|
||||||
// totalNum.value=resData.total
|
|
||||||
// });
|
|
||||||
|
|
||||||
// }
|
}
|
||||||
dataList.value=[
|
|
||||||
{
|
|
||||||
name: '王小明',
|
|
||||||
idCard: '370781199107166029',
|
|
||||||
helperName: '喀什',
|
|
||||||
startTime: '2025/11/24',
|
|
||||||
endTime: '2025/11/25',
|
|
||||||
phone:'18340050862',
|
|
||||||
helpArea:'喀什地区',
|
|
||||||
helpUnit:'新生社区',
|
|
||||||
type:'招聘单位推荐',
|
|
||||||
assistanceDate:'2025/11/25',
|
|
||||||
nextContact:'2025/11/30',
|
|
||||||
id:'1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '王大明',
|
|
||||||
idCard: '370781199107166029',
|
|
||||||
helperName: '喀什',
|
|
||||||
startTime: '2025/11/24',
|
|
||||||
endTime: '2025/11/25',
|
|
||||||
phone:'18340050862',
|
|
||||||
helpArea:'喀什地区',
|
|
||||||
helpUnit:'新生社区',
|
|
||||||
type:'招聘单位推荐',
|
|
||||||
assistanceDate:'2025/11/25',
|
|
||||||
nextContact:'2025/11/30',
|
|
||||||
id:'2'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
function goFollow(item) {
|
function goFollow(item) {
|
||||||
navTo(`/packageB/priority/helpFollow?id=${item.id}`);
|
navTo(`/packageB/priority/helpFollow?id=${item.goal_person_id}&&name=${item.name}&&taskType=${getTaskTypeLabelByValue(item.task_type)}`);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -412,11 +436,13 @@ image
|
|||||||
width: 160rpx
|
width: 160rpx
|
||||||
font-size: 28rpx
|
font-size: 28rpx
|
||||||
color: #404040
|
color: #404040
|
||||||
|
flex-shrink: 0
|
||||||
|
|
||||||
.input,
|
.input,
|
||||||
.picker
|
.picker
|
||||||
background: #FFFFFF
|
background: #FFFFFF
|
||||||
flex: 1
|
flex: 1
|
||||||
|
min-width: 0
|
||||||
.list-box
|
.list-box
|
||||||
margin-top: 40rpx
|
margin-top: 40rpx
|
||||||
.con-box
|
.con-box
|
||||||
@@ -456,9 +482,13 @@ image
|
|||||||
.item-label
|
.item-label
|
||||||
font-size: 26rpx
|
font-size: 26rpx
|
||||||
color: #B3B3B3
|
color: #B3B3B3
|
||||||
|
width: 130rpx
|
||||||
.item-right
|
.item-right
|
||||||
font-size: 26rpx
|
font-size: 26rpx
|
||||||
color: #737373
|
color: #737373
|
||||||
|
overflow: hidden
|
||||||
|
text-overflow: ellipsis
|
||||||
|
white-space: nowrap
|
||||||
.form-btns
|
.form-btns
|
||||||
margin-top:30rpx
|
margin-top:30rpx
|
||||||
.form-box-btn
|
.form-box-btn
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
人员姓名
|
人员姓名
|
||||||
</view>
|
</view>
|
||||||
<view class="info-value">
|
<view class="info-value">
|
||||||
王小美
|
{{personInfo.name}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
帮扶类型
|
帮扶类型
|
||||||
</view>
|
</view>
|
||||||
<view class="info-value">
|
<view class="info-value">
|
||||||
招聘岗位推荐
|
{{personInfo.taskType}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -32,22 +32,22 @@
|
|||||||
<uni-forms ref="formRef" v-model="formData" :rules="rules" validate-trigger="submit" >
|
<uni-forms ref="formRef" v-model="formData" :rules="rules" validate-trigger="submit" >
|
||||||
<!-- 跟进日期 -->
|
<!-- 跟进日期 -->
|
||||||
<uni-forms-item label="跟进日期:" name="followDate" required >
|
<uni-forms-item label="跟进日期:" name="followDate" required >
|
||||||
<uni-datetime-picker class="picker-value" type="date" placeholder="请选择跟进日期" v-model="formData.followDate" @change="onDateChange" />
|
<uni-datetime-picker class="picker-value" type="date" placeholder="请选择跟进日期" v-model="formData.followDate" @change="onFollowDateChange" />
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<!-- 跟进方式 -->
|
<!-- 跟进方式 -->
|
||||||
<uni-forms-item label="跟进方式:" name="followMethod" required >
|
<uni-forms-item label="跟进方式:" name="followWay" required >
|
||||||
<uni-data-select v-model="formData.followMethod" placeholder="请选择跟进方式" :localdata="followMethods" @change="onMethodChange"></uni-data-select>
|
<uni-data-select v-model="formData.followWay" placeholder="请选择跟进方式" :localdata="followWays" @change="onMethodChange"></uni-data-select>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<!-- 跟进内容 -->
|
<!-- 跟进内容 -->
|
||||||
<uni-forms-item label="跟进内容:" name="followContent" required>
|
<uni-forms-item label="跟进内容:" name="content" required>
|
||||||
<uni-easyinput type="textarea" v-model="formData.followContent" placeholder="请输入跟进内容"></uni-easyinput>
|
<uni-easyinput type="textarea" v-model="formData.content" placeholder="请输入跟进内容"></uni-easyinput>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<!-- 跟进结果 -->
|
<!-- 跟进结果 -->
|
||||||
<uni-forms-item label="跟进结果:" name="followResult" required>
|
<uni-forms-item label="跟进结果:" name="result" required>
|
||||||
<uni-easyinput type="textarea" v-model="formData.followResult" placeholder="请输入跟进结果"></uni-easyinput>
|
<uni-easyinput type="textarea" v-model="formData.result" placeholder="请输入跟进结果"></uni-easyinput>
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
|
|
||||||
<!-- 下一步计划 -->
|
<!-- 下一步计划 -->
|
||||||
@@ -75,12 +75,13 @@
|
|||||||
<view class="title-line"></view>
|
<view class="title-line"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title-total">
|
<view class="title-total">
|
||||||
共<text class="total-num">7</text>条记录
|
共<text class="total-num">{{followListNum}}</text>条记录
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-box" >
|
<view class="list-box" v-if="followListNum>0">
|
||||||
<uni-steps :options="list2" active-color="#007AFF" :active="active" direction="column" />
|
<uni-steps :options="followList" active-color="#007AFF" :active="active" direction="column" />
|
||||||
</view>
|
</view>
|
||||||
|
<empty v-else pdTop="200"></empty>
|
||||||
</view>
|
</view>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
</template>
|
</template>
|
||||||
@@ -93,39 +94,22 @@ import config from "@/config.js"
|
|||||||
|
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
|
goalPersonId:'',
|
||||||
followDate: '',
|
followDate: '',
|
||||||
followMethod: '',
|
followWay: '',
|
||||||
followContent: '',
|
content: '',
|
||||||
followResult: '',
|
result: '',
|
||||||
nextPlan: '',
|
nextPlan: '',
|
||||||
nextContactDate: ''
|
nextContactDate: ''
|
||||||
})
|
})
|
||||||
const followMethods = [{
|
const personInfo=ref({
|
||||||
"value": 0,
|
goalPersonId:'',
|
||||||
"text": "电话"
|
name:'',
|
||||||
}, {
|
taskType:''
|
||||||
"value": 1,
|
})
|
||||||
"text": "面谈"
|
const followWays = ref([])
|
||||||
}, {
|
const followList = ref([])
|
||||||
"value": 2,
|
const followListNum=ref(0)
|
||||||
"text": "微信"
|
|
||||||
}, {
|
|
||||||
"value": 3,
|
|
||||||
"text": "邮件"
|
|
||||||
}]
|
|
||||||
const list2=[{
|
|
||||||
title: '买家下单',
|
|
||||||
desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容'
|
|
||||||
}, {
|
|
||||||
title: '卖家发货',
|
|
||||||
desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容'
|
|
||||||
}, {
|
|
||||||
title: '买家签收',
|
|
||||||
desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容'
|
|
||||||
}, {
|
|
||||||
title: '交易完成',
|
|
||||||
desc: '跟进方式:电话\n跟进人:新生社区管理员\n跟进内容:内容内容内容'
|
|
||||||
}]
|
|
||||||
const active=ref(null)
|
const active=ref(null)
|
||||||
// 表单引用
|
// 表单引用
|
||||||
const formRef = ref(null)
|
const formRef = ref(null)
|
||||||
@@ -138,19 +122,19 @@ const rules = {
|
|||||||
errorMessage: '请选择跟进日期'
|
errorMessage: '请选择跟进日期'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
followMethod: {
|
followWay: {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '请选择跟进方式'
|
errorMessage: '请选择跟进方式'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
followContent: {
|
content: {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '请填写跟进内容'
|
errorMessage: '请填写跟进内容'
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
followResult: {
|
result: {
|
||||||
rules: [{
|
rules: [{
|
||||||
required: true,
|
required: true,
|
||||||
errorMessage: '请填写跟进结果'
|
errorMessage: '请填写跟进结果'
|
||||||
@@ -164,31 +148,108 @@ const getBackgroundStyle = (imageName) => ({
|
|||||||
backgroundPosition: 'center', // 居中
|
backgroundPosition: 'center', // 居中
|
||||||
backgroundRepeat: 'no-repeat'
|
backgroundRepeat: 'no-repeat'
|
||||||
});
|
});
|
||||||
const trainVideoImgUrl=config.trainVideoImgUrl
|
|
||||||
|
|
||||||
|
const onFollowDateChange = (e)=>{
|
||||||
// 事件处理
|
formData.followDate=e
|
||||||
const onDateChange = (field, e) => {
|
|
||||||
formData[field] = e.detail.value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onMethodChange = (e) => {
|
const onMethodChange = (e) => {
|
||||||
|
formData.followWay=e
|
||||||
|
}
|
||||||
|
// 事件处理
|
||||||
|
const onDateChange = ( e) => {
|
||||||
|
formData.nextContactDate=e
|
||||||
|
}
|
||||||
|
function getFollowList(){
|
||||||
|
let header={
|
||||||
|
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||||
|
'Content-Type': "application/x-www-form-urlencoded"
|
||||||
|
}
|
||||||
|
let params={
|
||||||
|
goalPersonId:personInfo.value.goalPersonId
|
||||||
|
}
|
||||||
|
$api.myRequest('/dispatch/assist/records/getFollowList', params,'get',9100,header).then((resData) => {
|
||||||
|
console.log("resData",resData)
|
||||||
|
if(resData && resData.code == 200){
|
||||||
|
if(resData.data && resData.data.length>0){
|
||||||
|
followListNum.value=resData.data.length
|
||||||
|
resData.data.forEach(item=>{
|
||||||
|
const obj={
|
||||||
|
title:item.followDate,
|
||||||
|
desc:`跟进方式:${getFollowWaysLabelByValue(item.followWay)}\n跟进人:${item.createByName}\n跟进内容:${item.content}`
|
||||||
|
}
|
||||||
|
followList.value.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDictionary(){
|
||||||
|
$api.myRequest('/system/public/dict/data/type/assist_follow_way').then((resData) => {
|
||||||
|
if(resData && resData.code == 200){
|
||||||
|
resData.data.forEach(item=>{
|
||||||
|
const obj = {
|
||||||
|
value: item.dictValue,
|
||||||
|
text: item.dictLabel
|
||||||
|
}
|
||||||
|
followWays.value.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function getFollowWaysLabelByValue(value) {
|
||||||
|
if (!Array.isArray(followWays.value)) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
const item = followWays.value.find(item => item.value === String(value))
|
||||||
|
return item ? item.text : '暂无跟进方式'
|
||||||
|
}
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
formRef.value?.validate()
|
formRef.value?.validate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
uni.showToast({ title: '校验通过', icon: 'success' });
|
let header={
|
||||||
|
'Authorization':uni.getStorageSync('Padmin-Token')
|
||||||
|
}
|
||||||
|
formData.goalPersonId=personInfo.value.goalPersonId
|
||||||
|
$api.myRequest('/dispatch/assist/records/addRecords', formData,'post',9100,header).then((resData) => {
|
||||||
|
console.log("resData",resData)
|
||||||
|
if(resData && resData.code == 200){
|
||||||
|
handleReset()
|
||||||
|
uni.showToast({
|
||||||
|
title: '保存成功',
|
||||||
|
icon: 'success',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: resData.msg,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
console.log('校验失败:', errors);
|
console.log('校验失败:', errors);
|
||||||
uni.showToast({ title: '请填写必填项', icon: 'none' });
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleReset = () => {
|
const handleReset = () => {
|
||||||
|
formData.followDate = '';
|
||||||
|
formData.followWay = '';
|
||||||
|
formData.content = '';
|
||||||
|
formData.result = '';
|
||||||
|
formData.nextPlan = '';
|
||||||
|
formData.nextContactDate = '';
|
||||||
}
|
}
|
||||||
onLoad(() => {
|
onLoad((options) => {
|
||||||
|
personInfo.value.goalPersonId=options.id
|
||||||
|
personInfo.value.name=options.name
|
||||||
|
personInfo.value.taskType=options.taskType
|
||||||
|
getDictionary()
|
||||||
|
getFollowList()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
packageB/train/wrongAnswer/mistakeNotebook.vue
Normal file
9
packageB/train/wrongAnswer/mistakeNotebook.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<template>
|
||||||
|
<div>错题本</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -335,6 +335,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "跟进"
|
"navigationBarTitleText": "跟进"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "train/wrongAnswer/mistakeNotebook",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "错题本"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -217,7 +217,12 @@ export function myRequest(url, data = {}, method = 'GET', port = 9100, headers =
|
|||||||
}
|
}
|
||||||
// 处理业务错误
|
// 处理业务错误
|
||||||
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
if (resData.data?.code === 401 || resData.data?.code === 402) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/packageB/login?flag=nw'
|
||||||
|
})
|
||||||
|
// navTo('/packageB/login?flag=nw');
|
||||||
useUserStore().logOut()
|
useUserStore().logOut()
|
||||||
|
|
||||||
}
|
}
|
||||||
// 显示具体的错误信息
|
// 显示具体的错误信息
|
||||||
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
const errorMsg = msg || '请求出现异常,请联系工作人员'
|
||||||
|
|||||||
Reference in New Issue
Block a user