【招生小程序】 新增# 修改备注

master
kaeery 2025-02-26 14:40:15 +08:00
parent c395c9f641
commit 2de7edf2d4
5 changed files with 48 additions and 11 deletions

View File

@ -7,14 +7,19 @@
--> -->
<template> <template>
<view class="design-field"> <view class="design-field">
<text class="field" :class="{ 'field-required': required }" :style="labelStyle"> <text
class="field"
v-if="label !== ''"
:class="{ 'field-required': required }"
:style="labelStyle"
>
{{ label }} {{ label }}
</text> </text>
<u-textarea <u-textarea
class="textarea" class="textarea"
v-model="innerValue" v-model="innerValue"
:placeholder="placeholder" :placeholder="placeholder"
border="none" :border="border"
:autoHeight="autoHeight" :autoHeight="autoHeight"
placeholderStyle="color: '#7c7e82'" placeholderStyle="color: '#7c7e82'"
></u-textarea> ></u-textarea>
@ -74,6 +79,10 @@ const props = defineProps({
labelWidth: { labelWidth: {
type: Number, type: Number,
default: 120 default: 120
},
border: {
type: String,
default: 'none'
} }
}) })
const emit = defineEmits(['update:modelValue']) const emit = defineEmits(['update:modelValue'])

View File

@ -16,7 +16,8 @@
mode="center" mode="center"
> >
<view class="confirm-popup"> <view class="confirm-popup">
<view class="text">{{ contentText }}</view> <slot name="content" v-if="slotContent" />
<view class="text" v-else>{{ contentText }}</view>
<view class="btn"> <view class="btn">
<view @click="cancel"></view> <view @click="cancel"></view>
<view @click="confirm"></view> <view @click="confirm"></view>
@ -27,7 +28,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from 'vue' import { computed } from 'vue'
import { ref, watch, useSlots } from 'vue'
const props = defineProps({ const props = defineProps({
contentText: String, contentText: String,
modelValue: { modelValue: {
@ -36,6 +38,9 @@ const props = defineProps({
} }
}) })
const emits = defineEmits(['update:modelValue', 'confirm']) const emits = defineEmits(['update:modelValue', 'confirm'])
const slots = useSlots()
const slotContent = computed(() => slots.content)
const popupShow = ref(false) const popupShow = ref(false)
const cancel = () => { const cancel = () => {
popupShow.value = false popupShow.value = false

View File

@ -42,7 +42,10 @@
<text class="text-muted w-[128rpx]">备注</text> <text class="text-muted w-[128rpx]">备注</text>
<view class="flex gap-[12rpx]"> <view class="flex gap-[12rpx]">
<text class="flex-1 text-error">已交一部分定位金</text> <text class="flex-1 text-error">已交一部分定位金</text>
<view class="flex gap-[4rpx] items-center text-primary text-[28rpx]"> <view
class="flex gap-[4rpx] items-center text-primary text-[28rpx]"
@click="handleUpdateRemark"
>
<TIcon name="icon-edit" color="#0E66FB" /> <TIcon name="icon-edit" color="#0E66FB" />
<text>修改</text> <text>修改</text>
</view> </view>
@ -75,6 +78,7 @@ const props = defineProps({
default: () => ({}) default: () => ({})
} }
}) })
const emit = defineEmits(['handleUpdateRemark'])
// //
const handleGet = () => { const handleGet = () => {
const { item } = props const { item } = props
@ -94,5 +98,10 @@ const handleComplete = () => {
url: '/bundle/pages/complete_add/index?id=' + item.id url: '/bundle/pages/complete_add/index?id=' + item.id
}) })
} }
//
const handleUpdateRemark = () => {
const { item } = props
emit('handleUpdateRemark', item)
}
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -1,5 +1,11 @@
{ {
"pages": [ "pages": [
{
"path": "pages/recruitsale/home/index",
"style": {
"navigationBarTitleText": ""
}
},
{ {
"path": "pages/recruitsale/summary/index", "path": "pages/recruitsale/summary/index",
"style": { "style": {
@ -12,12 +18,6 @@
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
}, },
{
"path": "pages/recruitsale/home/index",
"style": {
"navigationBarTitleText": ""
}
},
{ {
"path": "pages/telesale/home/index", "path": "pages/telesale/home/index",
"style": { "style": {

View File

@ -29,10 +29,16 @@
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
:key="`${index} + 'unique'`" :key="`${index} + 'unique'`"
:item="item" :item="item"
@handle-update-remark="handleUpdateRemark"
/> />
<!-- </z-paging> --> <!-- </z-paging> -->
</view> </view>
</view> </view>
<w-confirm-popup v-model="popupShow" @confirm="handleConfirm">
<template #content>
<TTextareaField v-model="contentText" border="surround" :required="false" />
</template>
</w-confirm-popup>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -77,5 +83,13 @@ const handleChangeTab = item => {
activeTab.value = item.value activeTab.value = item.value
// refresh(queryParams.value) // refresh(queryParams.value)
} }
const popupShow = ref(false)
const contentText = ref('')
const handleUpdateRemark = item => {
const { id, remark } = item
popupShow.value = true
contentText.value = remark
}
const handleConfirm = () => {}
</script> </script>
<style scoped></style> <style scoped></style>