添加和修改功能
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<view class="content">
|
||||
<view class="personnelInformation">
|
||||
<view class="left">
|
||||
<view class="left_name">{{ form?.name || '' }}</view>
|
||||
<view class="left_name">{{ form.name || '' }}</view>
|
||||
<view style="margin-top: 10rpx">
|
||||
<text v-if="form.gender == 0">男</text>
|
||||
<text v-if="form.gender == 1">女</text>
|
||||
@@ -413,8 +413,8 @@
|
||||
></u-datetime-picker> -->
|
||||
<!-- 社区端 - 显示隐藏退出组件 -->
|
||||
<exitPopup />
|
||||
|
||||
<uni-popup background-color="#fff" type="bottom"
|
||||
<DealDone ref="dealDone" @finished="getListPersonDemand();"/>
|
||||
<!-- <uni-popup background-color="#fff" type="bottom"
|
||||
ref="openDeal"
|
||||
style="position: relative; z-index: 100"
|
||||
closeOnClickOverlay
|
||||
@@ -442,25 +442,31 @@
|
||||
end="2030-6-20"
|
||||
@change="change"
|
||||
/>
|
||||
<!-- <text :class="formData.actualSolveDate ? 'picker-text' : 'picker-placeholder'">
|
||||
{{ formData.actualSolveDate || "请选择实际解决时间" }}
|
||||
</text> -->
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="经办人" prop="agentUserName" required>
|
||||
<view class="input-view">
|
||||
<input
|
||||
v-model="formData.agentUserName"
|
||||
border="none"
|
||||
placeholder="请输入经办人姓名"
|
||||
:customStyle="{
|
||||
padding: '28rpx 36rpx',
|
||||
fontSize: '28rpx',
|
||||
color: '#333333'
|
||||
}"
|
||||
/>
|
||||
<uni-data-select
|
||||
style="width: 100%"
|
||||
v-model="formData.agentUserId"
|
||||
placeholder="请选择经办人"
|
||||
:localdata="jingbrList1"
|
||||
@change="handleAgentChange"
|
||||
>
|
||||
</uni-data-select>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="人员状态" prop="fileUrl">
|
||||
<picker
|
||||
@change="onpersonStatusChange"
|
||||
:range="personStatusOptions.map(item => item.label)"
|
||||
:value="getpersonStatusIndex(formData.personStatus)"
|
||||
mode="selector"
|
||||
>
|
||||
<view style="border: 1px solid #e4e4e4;width: 100%;padding: 0 20rpx;line-height: 64rpx;white-space: nowrap;text-overflow: ellipsis;flex-grow: 1;">{{ getpersonStatusLabel(formData.personStatus) || "请选择" }}</view>
|
||||
</picker>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件" prop="fileUrl">
|
||||
<ImageUpload
|
||||
:fileList="fileList"
|
||||
@@ -474,12 +480,7 @@
|
||||
<textarea
|
||||
v-model="formData.solveDesc"
|
||||
placeholder="请输入解决说明"
|
||||
:customStyle="{
|
||||
padding: '28rpx 36rpx',
|
||||
fontSize: '28rpx',
|
||||
color: '#333333',
|
||||
minHeight: '120rpx'
|
||||
}"
|
||||
style="padding: 28rpx 36rpx;border: 1px solid #e4e4e4;padding: 10rpx;border-radius: 8rpx;font-size: 28rpx;color:#333333;height: 120rpx;"
|
||||
></textarea>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
@@ -495,28 +496,31 @@
|
||||
"
|
||||
>重置</view
|
||||
>
|
||||
<view class="btn save" @click="finishJobRecommend(needsType)"
|
||||
<view class="btn save" @click="finishJobRecommend()"
|
||||
>办结</view
|
||||
>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</uni-popup> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { getPersonInfo } from "../../api/company/index.js";
|
||||
// import { listJobService, serviceTraceability } from "@/api/needs/jobService";
|
||||
import { listPersonDemand, delPersonDemand } from "../../api/needs/personDemand";
|
||||
import { requirementCompletion } from "@/apiRc/company/index";
|
||||
// import { listEntrepreneurshipService } from "@/api/needs/entrepreneurshipService";
|
||||
// import { listTrainService, delTrainService } from "@/api/needs/trainService";
|
||||
import { listJobType } from "../../api/jobType/index";
|
||||
import ImageUpload from "@/packageRc/components/ImageUpload";
|
||||
// import { listJobService, serviceTraceability } from "@/api/needs/jobService";
|
||||
import { listPersonDemand, delPersonDemand } from "../../api/needs/personDemand";
|
||||
import { requirementCompletion } from "@/apiRc/company/index";
|
||||
// import { listEntrepreneurshipService } from "@/api/needs/entrepreneurshipService";
|
||||
// import { listTrainService, delTrainService } from "@/api/needs/trainService";
|
||||
import { listJobType } from "../../api/jobType/index";
|
||||
// import ImageUpload from "@/packageRc/components/ImageUpload";
|
||||
import {getJbrInfo} from "@/apiRc/personinfo/index"
|
||||
import DealDone from "../needs/dealDone.vue";
|
||||
export default {
|
||||
name: "serviceDetails",
|
||||
components: {
|
||||
ImageUpload,
|
||||
// ImageUpload,
|
||||
DealDone,
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -580,6 +584,8 @@ export default {
|
||||
disabled: false,
|
||||
showPersonStatusPicker: false,
|
||||
personStatusLabel: '',
|
||||
jingbrList1: [],
|
||||
personStatusOptions: [],
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@@ -588,6 +594,22 @@ export default {
|
||||
this.form.userId = options.userId; // 确保userId被正确赋值
|
||||
console.log("options", options);
|
||||
this.getPersonInfo11();
|
||||
this.$getDict('qcjy_ryzt').then(res => {
|
||||
if (res.data && Array.isArray(res.data)) {
|
||||
this.personStatusOptions = res.data.map(item => ({
|
||||
value: item.dictValue,
|
||||
label: item.dictLabel
|
||||
}));
|
||||
}
|
||||
});
|
||||
getJbrInfo().then(res => {
|
||||
this.jingbrList1=res.map(ele => {
|
||||
return {
|
||||
value: ele.userId,
|
||||
text: ele.nickName
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
onShow() {
|
||||
@@ -598,42 +620,43 @@ export default {
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// 注释掉getDicts调用,避免运行时错误
|
||||
/*
|
||||
let arr = [
|
||||
{
|
||||
key: "qcjy_zgzpgz",
|
||||
prop: "highRecruitmentSalary",
|
||||
},
|
||||
{
|
||||
key: "qcjy_zgzpgz",
|
||||
prop: "minRecruitmentSalary",
|
||||
},
|
||||
{
|
||||
key: "qcjy_ryzt",
|
||||
prop: "personStatusList",
|
||||
},
|
||||
];
|
||||
arr.forEach((ele, index) => {
|
||||
this.$getDict(ele.key).then((res) => {
|
||||
this.dict[ele.prop] = res.data;
|
||||
this.$forceUpdate();
|
||||
});
|
||||
});
|
||||
*/
|
||||
// 暂时注释掉workTypeRemoteMethod调用,避免listJobType未定义错误
|
||||
// if (typeof this.workTypeRemoteMethod === 'function') {
|
||||
// this.workTypeRemoteMethod();
|
||||
// }
|
||||
// this.getListPersonDemand();
|
||||
// this.getJobSearchList();
|
||||
// this.getListOfEntrepreneurialNeeds();
|
||||
// this.getTrainingList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 获取帮扶内容标签
|
||||
getpersonStatusLabel(value) {
|
||||
let arr = this.personStatusOptions.filter(item => item.value == value)
|
||||
return arr.length ? arr[0].label : ''
|
||||
},
|
||||
getpersonStatusIndex(value) {
|
||||
if (!value) return 0;
|
||||
const index = this.personStatusOptions.findIndex(item => item.value === value);
|
||||
return index !== -1 ? index : 0;
|
||||
},
|
||||
// 处理人员状态选择变化
|
||||
onpersonStatusChange(e) {
|
||||
const index = e.detail.value;
|
||||
if (this.personStatusOptions && this.personStatusOptions[index]) {
|
||||
this.formData.personStatus = this.personStatusOptions[index].value;
|
||||
}
|
||||
},
|
||||
// 获取经办人名称
|
||||
getAgentUserName(userId) {
|
||||
const agent = this.jingbrList1.find(item => item.value === userId);
|
||||
return agent ? agent.nickName : '';
|
||||
},
|
||||
// 处理经办人选择变化
|
||||
handleAgentChange(value) {
|
||||
if (!value || !this.jingbrList1 || !this.jingbrList1.length) {
|
||||
this.formData.agentUserName = '';
|
||||
return;
|
||||
}
|
||||
const user = this.jingbrList1.find(item => item.value === value);
|
||||
if (user) {
|
||||
this.formData.agentUserName = user.nickName;
|
||||
} else {
|
||||
this.formData.agentUserName = '';
|
||||
}
|
||||
},
|
||||
closeopenDeal() {
|
||||
this.$refs.openDeal.close();
|
||||
},
|
||||
@@ -821,7 +844,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 办结按钮
|
||||
async finishJobRecommend(needsType) {
|
||||
async finishJobRecommend() {
|
||||
uni.showLoading();
|
||||
try {
|
||||
// 先进行表单校验
|
||||
@@ -879,19 +902,25 @@ export default {
|
||||
this.formData.fileUrl.push(url);
|
||||
}
|
||||
}
|
||||
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl);
|
||||
this.formData.fileUrl = this.formData.fileUrl.join(',')
|
||||
},
|
||||
// 需求办结
|
||||
requirementHandling(item, needsType) {
|
||||
// this.openDeal = true;
|
||||
this.$refs.openDeal.open();
|
||||
this.needsType = needsType;
|
||||
this.formData = {
|
||||
// this.$refs.openDeal.open();
|
||||
this.$refs.dealDone.init({
|
||||
id: item.id,
|
||||
currentStatus: "3",
|
||||
userId: item.userId,
|
||||
personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
|
||||
};
|
||||
});
|
||||
// this.needsType = needsType;
|
||||
// this.formData = {
|
||||
// id: item.id,
|
||||
// currentStatus: "3",
|
||||
// userId: item.userId,
|
||||
// personStatus: item.personStatus || (this.dict.personStatusList[0] && this.dict.personStatusList[0].dictValue),
|
||||
// };
|
||||
console.log("item",item)
|
||||
this.$nextTick(() => {
|
||||
this.$forceUpdate();
|
||||
|
||||
Reference in New Issue
Block a user