fix
This commit is contained in:
parent
772b6c6bc4
commit
71807e8b76
@ -45,6 +45,7 @@
|
|||||||
color="#BABABA"
|
color="#BABABA"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
v-if="state.boxRelBucketStatus == 1"
|
v-if="state.boxRelBucketStatus == 1"
|
||||||
|
@click="backScan"
|
||||||
>取消</up-button
|
>取消</up-button
|
||||||
>
|
>
|
||||||
<up-button
|
<up-button
|
||||||
|
@ -2,39 +2,65 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<navBar> 添加画作 </navBar>
|
<navBar> 添加画作 </navBar>
|
||||||
<view class="container-box">
|
<view class="container-box">
|
||||||
<span style="font-weight: bold">
|
<span style="font-weight: bold"> 已扫画筒号:{{ state.pid }} </span>
|
||||||
已扫画筒号:{{state.pid }}
|
<view style="display: flex; align-items: center">
|
||||||
</span>
|
<up-input
|
||||||
<view style="display: flex; align-items: center;">
|
class="login-input"
|
||||||
<up-input class="login-input" placeholder="画家姓名/画作名称" v-model="state.searchValue" style="flex: 1; margin-right: 10rpx;" clearable>
|
placeholder="画家姓名/画作名称"
|
||||||
|
v-model="state.searchValue"
|
||||||
|
style="flex: 1; margin-right: 10rpx"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
</up-input>
|
</up-input>
|
||||||
|
|
||||||
<up-button style="width: 120rpx;
|
<up-button
|
||||||
|
style="
|
||||||
|
width: 120rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
margin-top: 15rpx;
|
margin-top: 15rpx;
|
||||||
margin-left: 15rpx;"
|
margin-left: 15rpx;
|
||||||
|
"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="paintingList(state.page=1)">搜索</up-button>
|
@click="paintingList((state.page = 1))"
|
||||||
|
>搜索</up-button
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
<up-list @scrolltolower="scrolltolower" style="height: 1120rpx">
|
<up-list @scrolltolower="scrolltolower" style="height: 1120rpx">
|
||||||
<up-list-item class="painting-box" v-for="(painting,index) in state.tableData" :key="index">
|
<up-list-item
|
||||||
<span style="display: flex; align-items: center;position: relative;" >
|
class="painting-box"
|
||||||
<up-image :show-loading="true" :src="painting.HdPic" width="100px" height="100px" @click = "enlarge(painting.HdPic)"></up-image>
|
v-for="(painting, index) in state.tableData"
|
||||||
<span style="display: flex; flex-direction: column; margin-left: 10px;">
|
:key="index"
|
||||||
<span style="font-weight: bold;" >{{painting.ArtworkName}}</span>
|
>
|
||||||
<span style="color:#BCBCBC;font-size: 16px;">画作编号:{{ painting.Tfnum }}</span>
|
<span style="display: flex; align-items: center; position: relative">
|
||||||
<span style="color:#BCBCBC;font-size: 16px;">画家编号:{{ painting.Tnum }}</span>
|
<up-image
|
||||||
<span style="color:#BCBCBC;font-size: 16px;">画家姓名:{{ painting.ArtistName }}</span>
|
:show-loading="true"
|
||||||
<span style="color:#BCBCBC;font-size: 16px;">平尺(寸):{{ painting.Ruler }}</span>
|
:src="painting.HdPic"
|
||||||
|
width="100px"
|
||||||
|
height="100px"
|
||||||
|
@click="enlarge(painting.HdPic)"
|
||||||
|
></up-image>
|
||||||
|
<span
|
||||||
|
style="display: flex; flex-direction: column; margin-left: 10px"
|
||||||
|
>
|
||||||
|
<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
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
<up-radio-group
|
<up-radio-group
|
||||||
v-model="painting.checked"
|
v-model="painting.checked"
|
||||||
style="position: absolute;
|
style="position: absolute; left: 550rpx; bottom: 150rpx"
|
||||||
left: 550rpx;
|
|
||||||
bottom: 150rpx;
|
|
||||||
"
|
|
||||||
placement="right"
|
placement="right"
|
||||||
@change="groupChange"
|
@change="groupChange"
|
||||||
>
|
>
|
||||||
@ -50,21 +76,22 @@
|
|||||||
style="width: 336rpx; margin: auto; height: 80rpx"
|
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||||
color="#BABABA"
|
color="#BABABA"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
|
@click="backScan"
|
||||||
>取消</up-button
|
>取消</up-button
|
||||||
>
|
>
|
||||||
<up-button
|
<up-button
|
||||||
style="width: 336rpx; margin: auto; height: 80rpx;"
|
style="width: 336rpx; margin: auto; height: 80rpx"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disabled="isButtonDisabled"
|
:disabled="isButtonDisabled"
|
||||||
@click="doneSet"
|
@click="doneSet"
|
||||||
> {{ buttonText }}</up-button
|
>
|
||||||
|
{{ buttonText }}</up-button
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onBeforeMount } from "vue";
|
import { ref, reactive, onBeforeMount } from "vue";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
@ -86,15 +113,15 @@ const state = reactive({
|
|||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
state.id = options.id;
|
state.id = options.id;
|
||||||
state.pid = options.pid;
|
state.pid = options.pid;
|
||||||
paintingList()
|
paintingList();
|
||||||
});
|
});
|
||||||
const groupChange = (e) => {
|
const groupChange = (e) => {
|
||||||
state.tableData.forEach((item) => {
|
state.tableData.forEach((item) => {
|
||||||
if (item.ArtworkUuid !== e) {
|
if (item.ArtworkUuid !== e) {
|
||||||
item.checked =''
|
item.checked = "";
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
// 获取可添加的画作列表
|
// 获取可添加的画作列表
|
||||||
const paintingList = async (param) => {
|
const paintingList = async (param) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
@ -114,8 +141,8 @@ const paintingList = async (param) => {
|
|||||||
state.tableData = res.data.Data.map((item) => {
|
state.tableData = res.data.Data.map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
checked: ''
|
checked: "",
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
console.log(1111, state.tableData);
|
console.log(1111, state.tableData);
|
||||||
} else {
|
} else {
|
||||||
@ -125,7 +152,7 @@ const paintingList = async (param) => {
|
|||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
//添加画作
|
//添加画作
|
||||||
const doneSet = async () => {
|
const doneSet = async () => {
|
||||||
@ -154,7 +181,7 @@ const doneSet = async () => {
|
|||||||
paintingList({
|
paintingList({
|
||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keywords: ""
|
keywords: "",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
@ -174,21 +201,24 @@ const scrolltolower = async () => {
|
|||||||
ArtistName: "",
|
ArtistName: "",
|
||||||
page: state.page,
|
page: state.page,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
keywords: state.searchValue
|
keywords: state.searchValue,
|
||||||
});
|
});
|
||||||
if (res.status === 0) {
|
if (res.status === 0) {
|
||||||
if(res.data.Data!==null){ const newData = res.data.Data.map((item) => {
|
if (res.data.Data !== null) {
|
||||||
|
const newData = res.data.Data.map((item) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
checked: ''
|
checked: "",
|
||||||
}
|
};
|
||||||
});
|
});
|
||||||
const uniqueData = newData.filter((newItem) => {
|
const uniqueData = newData.filter((newItem) => {
|
||||||
return!state.tableData.some((existingItem) => existingItem.ArtworkUuid === newItem.ArtworkUuid);
|
return !state.tableData.some(
|
||||||
|
(existingItem) => existingItem.ArtworkUuid === newItem.ArtworkUuid
|
||||||
|
);
|
||||||
});
|
});
|
||||||
state.tableData = state.tableData.concat(uniqueData);
|
state.tableData = state.tableData.concat(uniqueData);
|
||||||
} }
|
}
|
||||||
else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -196,11 +226,12 @@ const scrolltolower = async () => {
|
|||||||
const enlarge = (src) => {
|
const enlarge = (src) => {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [src],
|
urls: [src],
|
||||||
current: src
|
current: src,
|
||||||
});
|
});
|
||||||
|
};
|
||||||
}
|
const backScan = () => {
|
||||||
|
closeWebview();
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -250,7 +281,6 @@ page {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.button-container {
|
.button-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -120,6 +120,7 @@ const closeFn = async () => {
|
|||||||
showMessage({ type: "error", message: "取消入库" });
|
showMessage({ type: "error", message: "取消入库" });
|
||||||
closeButton.value = true;
|
closeButton.value = true;
|
||||||
isButtonDisabled.value = true;
|
isButtonDisabled.value = true;
|
||||||
|
closeWebview();
|
||||||
} else {
|
} else {
|
||||||
showMessage({ type: "error", message: res.msg });
|
showMessage({ type: "error", message: res.msg });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user