store-management-app/src/pages/index/index.vue

173 lines
4.6 KiB
Vue
Raw Normal View History

2024-08-26 03:15:07 +00:00
<template>
2024-09-11 06:57:03 +00:00
<view class="content">
<navBar> 添加画作 </navBar>
<view class="container-box">
<span style="font-weight: bold">
2024-09-19 01:38:53 +00:00
已扫画筒号{{state.pid }}
2024-09-11 06:57:03 +00:00
</span>
<view style="display: flex; align-items: center;">
<up-input class="login-input" placeholder="画家姓名/编号/画作编号/画作名称" style="flex: 1; margin-right: 10rpx;" clearable>
</up-input>
<up-button style="width: 120rpx;
height: 80rpx;
margin-top: 15rpx;
margin-left: 15rpx;" color="#EFC54E" throttleTime="5" :loading="loading" @click="login">搜索</up-button>
</view>
2024-09-19 07:40:39 +00:00
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y"
@scrolltolower="lower" @scroll="scroll">
2024-09-19 01:38:53 +00:00
<view class="painting-box" v-for="(painting,index) in state.tableData" :key="index">
<span style="display: flex; align-items: center;position: relative;" >
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click="click"></up-image>
2024-09-11 06:57:03 +00:00
<span style="display: flex; flex-direction: column; margin-left: 10px;">
2024-09-19 01:38:53 +00:00
<span style="font-weight: bold;" >{{painting.ArtworkName}}</span>
<span style="color:#BCBCBC;font-size: 16px;">画作编号{{ painting.Tfnum }}</span>
<span style="color:#BCBCBC;font-size: 16px;">画家编号{{ painting.Tnum }}</span>
<span style="color:#BCBCBC;font-size: 16px;">画家姓名{{ painting.ArtistName }}</span>
<span style="color:#BCBCBC;font-size: 16px;">平尺{{ painting.Ruler }}</span>
2024-09-11 06:57:03 +00:00
</span>
2024-09-12 06:53:48 +00:00
<up-radio-group
2024-09-19 01:38:53 +00:00
v-model="painting.ArtistUuid"
style="position: absolute;
left: 550rpx;
bottom: 150rpx;
"
placement="right"
@change="groupChange"
>
<up-radio :name="painting.ArtistUuid"></up-radio>
2024-09-12 06:53:48 +00:00
</up-radio-group>
</span>
2024-09-11 06:57:03 +00:00
</view>
2024-09-19 07:40:39 +00:00
</scroll-view>
2024-09-11 06:57:03 +00:00
</view>
</view>
<view class="button-container">
<up-button
2024-09-19 07:40:39 +00:00
style="width: 456rpx; margin: auto; height: 86rpx;"
color="#EFC54E"
throttleTime="5"
2024-09-11 06:57:03 +00:00
:loading="loading"
2024-09-19 07:40:39 +00:00
:disabled="isButtonDisabled"
> {{ buttonText }}</up-button
2024-09-11 06:57:03 +00:00
>
</view>
2024-08-26 03:15:07 +00:00
</template>
2024-09-11 06:57:03 +00:00
<script setup>
2024-09-19 01:38:53 +00:00
import { ref, reactive, onBeforeMount } from "vue";
import useToast from "@/hooks/toast/useToast.js";
2024-09-19 07:40:39 +00:00
import { onLoad,onReachBottom } from "@dcloudio/uni-app";
2024-09-19 01:38:53 +00:00
import { creChangepainting } from "@/api/login.js";
const { showMessage } = useToast();
const value = ref(null)
const loading = ref(false);
2024-09-19 07:40:39 +00:00
const isButtonDisabled = ref(false);
const buttonText = ref("确认");
2024-09-19 01:38:53 +00:00
const state = reactive({
id: "",
pid: "",
tableData:[],
2024-09-19 07:40:39 +00:00
page:1,
pageSize:10,
2024-09-19 01:38:53 +00:00
});
onLoad((options) => {
state.id = options.id;
state.pid = options.pid;
paintingList()
});
const groupChange =(e) =>{
console.log(e)
}
// 获取可添加的画作列表
const paintingList = async (param) => {
loading.value = true;
const res = await creChangepainting({
Tfnum: "",
ArtworkName: "",
Tnum: "",
ArtistName: "",
2024-09-19 07:40:39 +00:00
page:state.page,
pageSize:state.pageSize,
2024-09-19 01:38:53 +00:00
...param,
});
if (res.status === 0) {
loading.value = false
state.tableData = res.data.Data
} else {
showMessage({ type: "error", message: res.msg });
}
loading.value = false
}
2024-09-19 07:40:39 +00:00
const lower=() =>{
console.log(888888)
}
const scroll =(e) =>{
console.log(e)
}
2024-08-26 03:15:07 +00:00
</script>
2024-09-11 06:57:03 +00:00
<style lang="scss" scoped>
page {
background: url("@/static/bgp.png") no-repeat;
background-size: 100% 100%;
background-attachment: fixed;
height: 100vh;
box-sizing: border-box;
}
2024-08-26 03:15:07 +00:00
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
2024-09-11 06:57:03 +00:00
.container-box {
height: 100%;
width: 95%;
display: flex;
flex-direction: column;
margin-top: 40rpx;
padding: 40rpx;
box-sizing: border-box;
background-color: #fff;
}
.login-input {
width: 80%;
display: flex;
background-color: #f9f9f9;
margin-top: 20rpx;
padding: 32rpx 24rpx;
box-sizing: border-box;
height: 96rpx;
}
.painting-box {
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
margin-top: 20rpx;
padding: 20rpx;
box-sizing: border-box;
background-color: #fff;
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
}
2024-09-12 06:53:48 +00:00
2024-08-26 03:15:07 +00:00
}
2024-09-11 06:57:03 +00:00
.button-container {
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
bottom: 20rpx;
left: 0;
padding: 0 20rpx;
box-sizing: border-box;
background-color: #fff;
height: 8%;
}
2024-08-26 03:15:07 +00:00
</style>