|
@@ -1,56 +1,162 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="his-main">
|
|
|
|
|
- <el-form :model="form" label-width="auto" label-position="right">
|
|
|
|
|
- <el-form-item label="活动日期">
|
|
|
|
|
- <el-input v-model="form.hdrq" disabled />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="球耗数量">
|
|
|
|
|
- <el-input v-model="form.qhsl" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="总费用">
|
|
|
|
|
- <el-input v-model="form.totalCost" />
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item class="btn">
|
|
|
|
|
- <el-button type="primary" @click="submitForm()">
|
|
|
|
|
- 提交
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <div class="his" style="display: flex;flex-direction: column;width: 100%;align-items: center;">
|
|
|
|
|
+ <div class="common-item" style="justify-content: center;width: 80%;">
|
|
|
|
|
+ <el-text type="info" size="large">活动信息</el-text>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="his-main">
|
|
|
|
|
+ <el-form :model="form" label-width="auto" label-position="right">
|
|
|
|
|
+ <el-form-item label="活动日期">
|
|
|
|
|
+ <el-input v-model="form.hdrq" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="球耗数量">
|
|
|
|
|
+ <el-input v-model="form.qhsl" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="总费用">
|
|
|
|
|
+ <el-input v-model="form.totalCost" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <div v-if="showBtn" style="display: flex;justify-content: right;">
|
|
|
|
|
+ <el-form-item class="btn" style="margin: 0;">
|
|
|
|
|
+ <el-button type="primary" @click="submitForm()">
|
|
|
|
|
+ 提交
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="user-main" style="width: 80%;">
|
|
|
|
|
+ <div class="common-item" style="justify-content: center;">
|
|
|
|
|
+ <el-text type="info" size="large">活动签到</el-text>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-for="user in userList" class="common-item">
|
|
|
|
|
+ <div style="display: flex; justify-content: space-between;width: 100%;align-items: center;">
|
|
|
|
|
+ <span>{{ user.nickName }}</span>
|
|
|
|
|
+ <el-popconfirm class="box-item" title="确认是否删除签到记录" width="180px" :hide-icon="true"
|
|
|
|
|
+ @confirm="handlerDelete(user.userId)">
|
|
|
|
|
+ <template #reference>
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="width: 20px;height: 20px;border-radius: 20px;display: flex;justify-content: center;align-items: center;background-color: red;">
|
|
|
|
|
+ <SvgIcon iconClass="guanbi" color="#FFF" className="close" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div @click="handlerAdd" class="common-item" style="justify-content: center;">
|
|
|
|
|
+ <span style="user-select: none;">+</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <el-dialog v-model="showDialog" title="可帮签到人员" width="300">
|
|
|
|
|
+ <el-form>
|
|
|
|
|
+ <el-form-item label="姓名">
|
|
|
|
|
+ <el-select v-model="bqUserId" placeholder="">
|
|
|
|
|
+ <el-option v-for="user in kbqUserList" :label="user.nickName" :value="user.userId" />
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <template #footer>
|
|
|
|
|
+ <div class="dialog-footer">
|
|
|
|
|
+ <el-button @click="showDialog = false">取消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="handlerConfirm">
|
|
|
|
|
+ 确认
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
|
|
+import SvgIcon from '@/components/SvgIcon'
|
|
|
|
|
+
|
|
|
import { onMounted } from 'vue';
|
|
import { onMounted } from 'vue';
|
|
|
-import { getInfo, updateInfo } from "@/api/svc/hd"
|
|
|
|
|
|
|
+import { getInfo, updateInfo, hdUser, hdWqd, bq, bqq } from "@/api/svc/hd"
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
|
|
+const { proxy } = getCurrentInstance()
|
|
|
|
|
+
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
const form = ref({})
|
|
const form = ref({})
|
|
|
|
|
+const showBtn = ref(false)
|
|
|
|
|
+const showDialog = ref(false)
|
|
|
|
|
+const userList = ref([])
|
|
|
|
|
+const kbqUserList = ref([])
|
|
|
|
|
+const bqUserId = ref(null)
|
|
|
|
|
|
|
|
function submitForm() {
|
|
function submitForm() {
|
|
|
updateInfo(form.value).then(res => {
|
|
updateInfo(form.value).then(res => {
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+ proxy.$modal.msgSuccess('提交成功')
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handlerDelete(userId) {
|
|
|
|
|
+ bqq({ userId, fid: route.query.id }).then(res => {
|
|
|
|
|
+ setUserList()
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handlerAdd() {
|
|
|
|
|
+ setKbqUserList()
|
|
|
|
|
+ showDialog.value = true
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function handlerConfirm() {
|
|
|
|
|
+ bq({ userId: bqUserId.value, fid: route.query.id }).then(res => {
|
|
|
|
|
+ showDialog.value = false
|
|
|
|
|
+ setUserList()
|
|
|
|
|
+ bqUserId.value = null
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
+function setKbqUserList() {
|
|
|
|
|
+ hdWqd(route.query.id).then(res => {
|
|
|
|
|
+ kbqUserList.value = res.data
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+function setUserList() {
|
|
|
|
|
+ hdUser(route.query.id).then(res => {
|
|
|
|
|
+ userList.value = res.data
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getInfo(route.query.id).then(res => {
|
|
getInfo(route.query.id).then(res => {
|
|
|
form.value = res.data
|
|
form.value = res.data
|
|
|
|
|
+ showBtn.value = !form.value.jszt
|
|
|
})
|
|
})
|
|
|
|
|
+ setUserList()
|
|
|
|
|
+ setKbqUserList()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
|
|
|
+.close {
|
|
|
|
|
+ font-size: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.his-main {
|
|
.his-main {
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ width: 80%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ padding: 15px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.el-form-item:last-child {
|
|
|
|
|
+ margin: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.el-form-item {
|
|
|
|
|
|
|
+.common-item {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background-color: #FFF;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+ display: flex;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|