|
|
@@ -40,38 +40,40 @@
|
|
|
<uni-list class="admin-list-box">
|
|
|
<uni-list-item v-for="item in data.list" class="jz-list-item-box">
|
|
|
<template v-slot:body>
|
|
|
- <view class="head-top">
|
|
|
- <button type="default">预览</button>
|
|
|
- <button type="default">推送</button>
|
|
|
- <button type="default">删除</button>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view>
|
|
|
- <view>家政人员名称</view>
|
|
|
- <view>{{item.jzRealName}}</view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view>客户名称</view>
|
|
|
- <view>{{item.khRealName}}</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view>
|
|
|
- <view>合同开始时间</view>
|
|
|
- <view>{{item.startDate}}</view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view>合同结束时间</view>
|
|
|
- <view>{{item.endDate}}</view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view>合同状态</view>
|
|
|
- <view v-if="item.status== 0">待签字</view>
|
|
|
- <view v-if="item.status== 1">待审核</view>
|
|
|
- <view v-if="item.status== 2">有效</view>
|
|
|
- <view v-if="item.status== 3">失效</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view @click="handleEditor(item)">
|
|
|
+ <view class="head-top">
|
|
|
+ <button type="default" @click.stop="handlePreview(item)">预览</button>
|
|
|
+ <button type="default">推送</button>
|
|
|
+ <button type="default" @click="handleDelete(item)">删除</button>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view>
|
|
|
+ <view>家政人员名称</view>
|
|
|
+ <view>{{item.jzRealName}}</view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view>客户名称</view>
|
|
|
+ <view>{{item.khRealName}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view>
|
|
|
+ <view>合同开始时间</view>
|
|
|
+ <view>{{item.startDate}}</view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view>合同结束时间</view>
|
|
|
+ <view>{{item.endDate}}</view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view>合同状态</view>
|
|
|
+ <view v-if="item.status== 0">待签字</view>
|
|
|
+ <view v-if="item.status== 1">待审核</view>
|
|
|
+ <view v-if="item.status== 2">有效</view>
|
|
|
+ <view v-if="item.status== 3">失效</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
</uni-list-item>
|
|
|
<uni-load-more :status="data.state" @click="getMore(0)"
|
|
|
@@ -80,7 +82,9 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
+ <!-- 删除子账号 -->
|
|
|
+ <common-dialog ref="commonDialogRef" title="删除确认" content="你确定要执行这个操作吗"
|
|
|
+ @confirm-btn="handleDeleteConfirm"></common-dialog>
|
|
|
|
|
|
<customTabbarAdminVue :current-tab="1"></customTabbarAdminVue>
|
|
|
|
|
|
@@ -100,8 +104,11 @@
|
|
|
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";
|
|
|
|
|
|
const searchDialogRef = ref(null);
|
|
|
+ const commonDialogRef = ref(null)
|
|
|
const data = reactive({
|
|
|
status: 0,
|
|
|
statusText: '待签字',
|
|
|
@@ -115,6 +122,8 @@
|
|
|
})
|
|
|
const isOpen = ref(false)
|
|
|
|
|
|
+ const active = ref(null);
|
|
|
+
|
|
|
const listStatus = ref([{
|
|
|
statusText: '有效',
|
|
|
status: 2,
|
|
|
@@ -160,6 +169,38 @@
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ 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) {
|
|
|
data.khRealName = searchInput
|