|
|
@@ -40,42 +40,55 @@
|
|
|
<uni-list class="sfht-scroll-view">
|
|
|
<uni-list-item v-for="item in data.list" class="sfht-list-item-box">
|
|
|
<template v-slot:body>
|
|
|
- <view class="sfht-card-box" >
|
|
|
- <view class="card-head-row" >
|
|
|
- <view @click="handleDelete(item)" class="del-btn-box"><icon class="del-btn"></icon></view>
|
|
|
- <button type="default" class="phone-green-btn ht-head-btn">推送</button>
|
|
|
- <button type="default" class="phone-green-btn ht-head-btn" @click.stop="handlePreview(item)">预览</button>
|
|
|
- <button type="default" class="phone-white-btn ht-head-btn"
|
|
|
- @click.stop="handleEditor(item)">编辑</button>
|
|
|
- </view>
|
|
|
- <view class="card-body-row">
|
|
|
- <view class="body-row">
|
|
|
- <view class="title-text"><icon class="user-icon"></icon>家政人员名称</view>
|
|
|
- <view class="value-text">{{item.realName}}</view>
|
|
|
- </view>
|
|
|
- <view class="body-row">
|
|
|
- <view class="title-text"><icon class="idcard-icon"></icon>客户名称</view>
|
|
|
- <view class="value-text">{{item.khName}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="card-body-row">
|
|
|
- <view class="body-row">
|
|
|
- <view class="title-text"><icon class="date-icon"></icon>合同开始时间</view>
|
|
|
- <view class="value-text">{{item.startDate}}</view>
|
|
|
- </view>
|
|
|
- <view class="body-row">
|
|
|
- <view class="title-text"><icon class="date-icon"></icon>合同结束时间</view>
|
|
|
- <view class="value-text">{{item.endDate}}</view>
|
|
|
- </view>
|
|
|
- <view class="body-row">
|
|
|
- <view class="title-text"><icon class="htzt-icon"></icon>合同状态</view>
|
|
|
- <view class="status-0" v-if="item.status== 0">待签字</view>
|
|
|
- <view class="status-1" v-if="item.status== 1">待审核</view>
|
|
|
- <view class="status-2" v-if="item.status== 2">有效</view>
|
|
|
- <view class="status-3" v-if="item.status== 3">失效</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="sfht-card-box">
|
|
|
+ <view class="card-head-row">
|
|
|
+ <view @click="handleDelete(item)" class="del-btn-box">
|
|
|
+ <icon class="del-btn"></icon>
|
|
|
+ </view>
|
|
|
+ <button type="default" class="phone-green-btn ht-head-btn">推送</button>
|
|
|
+ <button type="default" class="phone-green-btn ht-head-btn"
|
|
|
+ @click.stop="handlePreview(item)">预览</button>
|
|
|
+ <button type="default" class="phone-white-btn ht-head-btn"
|
|
|
+ @click.stop="handleEditor(item)">编辑</button>
|
|
|
+ </view>
|
|
|
+ <view class="card-body-row">
|
|
|
+ <view class="body-row">
|
|
|
+ <view class="title-text">
|
|
|
+ <icon class="user-icon"></icon>家政人员名称
|
|
|
+ </view>
|
|
|
+ <view class="value-text">{{item.realName}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="body-row">
|
|
|
+ <view class="title-text">
|
|
|
+ <icon class="idcard-icon"></icon>客户名称
|
|
|
+ </view>
|
|
|
+ <view class="value-text">{{item.khName}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="card-body-row">
|
|
|
+ <view class="body-row">
|
|
|
+ <view class="title-text">
|
|
|
+ <icon class="date-icon"></icon>合同开始时间
|
|
|
+ </view>
|
|
|
+ <view class="value-text">{{item.startDate}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="body-row">
|
|
|
+ <view class="title-text">
|
|
|
+ <icon class="date-icon"></icon>合同结束时间
|
|
|
+ </view>
|
|
|
+ <view class="value-text">{{item.endDate}}</view>
|
|
|
+ </view>
|
|
|
+ <view class="body-row">
|
|
|
+ <view class="title-text">
|
|
|
+ <icon class="htzt-icon"></icon>合同状态
|
|
|
+ </view>
|
|
|
+ <view class="status-0" v-if="item.status== 0">待签字</view>
|
|
|
+ <view class="status-1" v-if="item.status== 1">待审核</view>
|
|
|
+ <view class="status-2" v-if="item.status== 2">有效</view>
|
|
|
+ <view class="status-3" v-if="item.status== 3">失效</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
</uni-list-item>
|
|
|
<uni-load-more :status="data.state" @click="getMore(0)"
|
|
|
@@ -84,9 +97,9 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 删除子账号 -->
|
|
|
- <common-dialog ref="commonDialogRef" title="删除确认" content="你确定要执行这个操作吗"
|
|
|
- @confirm-btn="handleDeleteConfirm"></common-dialog>
|
|
|
+ <!-- 删除子账号 -->
|
|
|
+ <common-dialog ref="commonDialogRef" title="删除确认" content="你确定要执行这个操作吗"
|
|
|
+ @confirm-btn="handleDeleteConfirm"></common-dialog>
|
|
|
|
|
|
<customTabbarAdminVue :current-tab="1"></customTabbarAdminVue>
|
|
|
|
|
|
@@ -106,11 +119,13 @@
|
|
|
import * as httpApi from "@/api/sanfang.js"
|
|
|
import searchDialog from "./components/search.vue";
|
|
|
import customTabbarAdminVue from "@/components/custom-tabbar/custom-tabbar-admin.vue";
|
|
|
- import commonDialog from '@/components/dialog/commonDialog.vue';
|
|
|
- import {getSanfangDelete} from "../../../api/sanfang";
|
|
|
+ import commonDialog from '@/components/dialog/commonDialog.vue';
|
|
|
+ import {
|
|
|
+ getSanfangDelete
|
|
|
+ } from "../../../api/sanfang";
|
|
|
|
|
|
const searchDialogRef = ref(null);
|
|
|
- const commonDialogRef = ref(null)
|
|
|
+ const commonDialogRef = ref(null)
|
|
|
const data = reactive({
|
|
|
status: 0,
|
|
|
statusText: '待签字',
|
|
|
@@ -124,7 +139,7 @@
|
|
|
})
|
|
|
const isOpen = ref(false)
|
|
|
|
|
|
- const active = ref(null);
|
|
|
+ const active = ref(null);
|
|
|
|
|
|
const listStatus = ref([{
|
|
|
statusText: '有效',
|
|
|
@@ -171,37 +186,39 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- function handleDelete(item) {
|
|
|
- active.value = item;
|
|
|
- commonDialogRef.value.handleShow();
|
|
|
- }
|
|
|
-
|
|
|
- function handleDeleteConfirm() {
|
|
|
- httpApi.getSanfangDelete({id: active.value.id}).then(res => {
|
|
|
- if (res.code == 0) {
|
|
|
- uni.showToast({
|
|
|
- title: '成功'
|
|
|
- })
|
|
|
- onRefresh();
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: '失败'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- function handleEditor(item) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/admin/Hetong/addSanfangHetong?flag=editor&id=${item.id}`
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- function handlePreview(item) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/admin/Hetong/previewHetong?id=${item.id}`
|
|
|
- })
|
|
|
- }
|
|
|
+ function handleDelete(item) {
|
|
|
+ active.value = item;
|
|
|
+ commonDialogRef.value.handleShow();
|
|
|
+ }
|
|
|
+
|
|
|
+ function handleDeleteConfirm() {
|
|
|
+ httpApi.getSanfangDelete({
|
|
|
+ id: active.value.id
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '成功'
|
|
|
+ })
|
|
|
+ onRefresh();
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '失败'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function handleEditor(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/admin/Hetong/addSanfangHetong?flag=editor&id=${item.id}`
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function handlePreview(item) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/admin/Hetong/previewHetong?id=${item.id}`
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
function dialogSearchBtn(opt, searchInput) {
|
|
|
if (opt == 2) {
|