添加页面
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
alt=""
|
||||
/>
|
||||
<view class="serviceFrequency" @tap="
|
||||
$tab.navigateTo(
|
||||
`/pages/community/serviceRecord?userId=${form.userId}`
|
||||
uni.navigateTo(
|
||||
{url:`/packageRc/pages/daiban/bangfuList?userId=${form.userId}`}
|
||||
)
|
||||
">
|
||||
<view>服务次数 {{ serviceTotal }}</view>
|
||||
@@ -20,14 +20,7 @@
|
||||
>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view
|
||||
class="personnelInformation"
|
||||
@tap="
|
||||
$tab.navigateTo(
|
||||
`/pages/community/personEdit?id=${form.id}&type=edit`
|
||||
)
|
||||
"
|
||||
>
|
||||
<view class="personnelInformation">
|
||||
<view class="left">
|
||||
<view class="left_name">{{ form?.name || '' }}</view>
|
||||
<view style="margin-top: 10rpx">
|
||||
@@ -420,6 +413,93 @@
|
||||
></u-datetime-picker> -->
|
||||
<!-- 社区端 - 显示隐藏退出组件 -->
|
||||
<exitPopup />
|
||||
|
||||
<uni-popup background-color="#fff" type="bottom"
|
||||
ref="openDeal"
|
||||
style="position: relative; z-index: 100"
|
||||
closeOnClickOverlay
|
||||
@close="openDeal = false"
|
||||
>
|
||||
<view style="padding: 32rpx;">
|
||||
<uni-forms style="width: 100%;"
|
||||
class="self-form"
|
||||
labelPosition="top"
|
||||
:model="formData"
|
||||
:rules="rules"
|
||||
ref="uForm"
|
||||
labelWidth="300"
|
||||
>
|
||||
<uni-forms-item label="实际解决时间" prop="actualSolveDate" required>
|
||||
<view
|
||||
class="picker-view"
|
||||
:class="{ selected: formData.actualSolveDate }"
|
||||
@click="showTime = true"
|
||||
>
|
||||
<uni-datetime-picker
|
||||
type="date"
|
||||
:value="formData.actualSolveDate"
|
||||
start="2021-3-20"
|
||||
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'
|
||||
}"
|
||||
/>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="附件" prop="fileUrl">
|
||||
<ImageUpload
|
||||
:fileList="fileList"
|
||||
@update="changeFile"
|
||||
:maxCount="6"
|
||||
/>
|
||||
</uni-forms-item>
|
||||
|
||||
<uni-forms-item label="解决说明" prop="solveDesc" required>
|
||||
<view class="textarea-view">
|
||||
<textarea
|
||||
v-model="formData.solveDesc"
|
||||
placeholder="请输入解决说明"
|
||||
:customStyle="{
|
||||
padding: '28rpx 36rpx',
|
||||
fontSize: '28rpx',
|
||||
color: '#333333',
|
||||
minHeight: '120rpx'
|
||||
}"
|
||||
></textarea>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<view class="button-area">
|
||||
<view class="btn" @click="closeopenDeal">取消</view>
|
||||
<view
|
||||
class="btn reset"
|
||||
@click="
|
||||
formData.actualSolveDate = '';
|
||||
formData.solveDesc = '';
|
||||
"
|
||||
>重置</view
|
||||
>
|
||||
<view class="btn save" @click="finishJobRecommend(needsType)"
|
||||
>办结</view
|
||||
>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -428,15 +508,15 @@
|
||||
import { getPersonInfo } from "../../api/company/index.js";
|
||||
// import { listJobService, serviceTraceability } from "@/api/needs/jobService";
|
||||
import { listPersonDemand, delPersonDemand } from "../../api/needs/personDemand";
|
||||
// import { requirementCompletion } from "@/api/company";
|
||||
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 ImageUpload from "@/packageRc/components/ImageUpload";
|
||||
export default {
|
||||
name: "serviceDetails",
|
||||
components: {
|
||||
//ImageUpload,
|
||||
ImageUpload,
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -554,6 +634,9 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
closeopenDeal() {
|
||||
this.$refs.openDeal.close();
|
||||
},
|
||||
// 返回上一页
|
||||
goBack() {
|
||||
uni.navigateBack();
|
||||
@@ -613,20 +696,11 @@ export default {
|
||||
try {
|
||||
|
||||
const url = `/packageRc/pages/daiban/addbangfu?id=${this.form?.userId || ''}&name=${this.form.name}`;
|
||||
// const url = `/packageRc/pages/service/serviceDetail?id=${this.form?.userId || ''}&name=${this.form.name}`;
|
||||
console.log("导航URL:", url);
|
||||
|
||||
uni.navigateTo({
|
||||
url: url,
|
||||
success: () => {
|
||||
console.log("导航成功");
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error("导航失败:", err);
|
||||
uni.showToast({
|
||||
title: '导航失败: ' + JSON.stringify(err),
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("执行出错:", error);
|
||||
@@ -637,6 +711,9 @@ export default {
|
||||
}
|
||||
},
|
||||
goNeedsDetail(item, needsType) {
|
||||
// uni.navigateTo({
|
||||
// url: `/packageRc/pages/demand/demandail?id=${item.id}&type=${needsType}&showTab=1`,
|
||||
// });
|
||||
uni.navigateTo({
|
||||
url: `/packageRc/pages/needs/needDetail?id=${item.id}&type=${needsType}&showTab=1`,
|
||||
});
|
||||
@@ -665,14 +742,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
confirmDate(e) {
|
||||
this.showTime = false;
|
||||
// 获取选中的日期
|
||||
const date = e.value;
|
||||
// 使用 uView 的 uTime 方法格式化日期,包含时分秒
|
||||
const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd hh:MM:ss");
|
||||
// 设置表单数据
|
||||
this.formData.actualSolveDate = formattedDateTime;
|
||||
// confirmDate(e) {
|
||||
// this.showTime = false;
|
||||
// // 获取选中的日期
|
||||
// const date = e.value;
|
||||
// // 使用 uView 的 uTime 方法格式化日期,包含时分秒
|
||||
// const formattedDateTime = uni.$u.timeFormat(date, "yyyy-mm-dd hh:MM:ss");
|
||||
// // 设置表单数据
|
||||
// this.formData.actualSolveDate = formattedDateTime;
|
||||
// },
|
||||
change(e) {
|
||||
this.formData.actualSolveDate = e
|
||||
},
|
||||
removeRowData(data) {
|
||||
//确实要删除的提示
|
||||
@@ -702,7 +782,8 @@ export default {
|
||||
},
|
||||
goAddNeeds() {
|
||||
uni.navigateTo({
|
||||
url: `/packageRc/pages/demand/demandail?activeType=${1}&id=${this.form.userId}&name=${this.form.name}`,
|
||||
url: `/packageRc/pages/needs/needDetail?userId=${this.form.userId}&type=1&name=${this.form.name}`,
|
||||
// url: `/packageRc/pages/demand/demandail?activeType=${1}&id=${this.form.userId}&name=${this.form.name}`,
|
||||
success: function() {
|
||||
console.log('导航成功')
|
||||
|
||||
@@ -741,12 +822,12 @@ export default {
|
||||
},
|
||||
// 办结按钮
|
||||
async finishJobRecommend(needsType) {
|
||||
uni.showLoading();
|
||||
try {
|
||||
// 先进行表单校验
|
||||
await this.$refs.uForm.validate();
|
||||
|
||||
// 校验通过后再走后续逻辑
|
||||
this.$showLoading();
|
||||
const url = "/manage/personDemand/demandDone";
|
||||
if (!url) {
|
||||
throw new Error("无效的需求类型");
|
||||
@@ -754,8 +835,8 @@ export default {
|
||||
const { code, msg } = await requirementCompletion(url, this.formData);
|
||||
|
||||
if (code === 200) {
|
||||
this.$u.toast('办结成功');
|
||||
this.openDeal = false;
|
||||
uni.showToast({title: '办结成功', icon: 'none'});
|
||||
this.$refs.openDeal.close();
|
||||
this.getListPersonDemand();
|
||||
this.serviceTraceability();
|
||||
}
|
||||
@@ -770,9 +851,9 @@ export default {
|
||||
} else {
|
||||
msg = '请检查必填项填写';
|
||||
}
|
||||
this.$u.toast(msg);
|
||||
uni.showToast({title: msg, icon: 'none'});
|
||||
} finally {
|
||||
this.$hideLoading();
|
||||
uni.hideLoading();
|
||||
}
|
||||
},
|
||||
// 需求推荐/培训
|
||||
@@ -802,19 +883,20 @@ export default {
|
||||
},
|
||||
// 需求办结
|
||||
requirementHandling(item, needsType) {
|
||||
this.openDeal = true;
|
||||
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();
|
||||
});
|
||||
},
|
||||
// this.openDeal = true;
|
||||
this.$refs.openDeal.open();
|
||||
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();
|
||||
});
|
||||
},
|
||||
onPersonStatusConfirm(e) {
|
||||
const item = e.value[0];
|
||||
this.formData.personStatus = item.dictValue;
|
||||
|
||||
Reference in New Issue
Block a user