Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
temple_material_request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-07-26 16:29:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c5676fd9afbf62a4522c74376772a4d4b4e0011e
c5676fd9
1 parent
cce1bee8
fix 查看物资详情页关闭操作优化
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
src/components/materialDetail/index.vue
src/views/material_list.vue
src/components/materialDetail/index.vue
View file @
c5676fd
<!--
* @Date: 2024-07-23 18:31:35
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 1
0:11:43
* @LastEditTime: 2024-07-26 1
6:28:22
* @FilePath: /temple_material_request/src/components/materialDetail/index.vue
* @Description: 物资详情页面
-->
<template>
<div
v-if="showRight"
class="material-detail-page">
<div class="material-detail-page">
<van-popup
v-model:show="showRight"
position="right"
closeable
@close="onClose"
:style="{ height: '100%', width: '100%' }"
>
<div style="margin-top: 3rem; background-color: white;">
...
...
@@ -92,6 +90,10 @@
</van-col>
</van-row>
</div>
<div style="height: 4rem;"></div>
<div style="padding: 1rem; position: fixed; bottom: 10px; left:0; right: 0;">
<van-button block :color="styleColor.baseColor" @click="onClose">关闭</van-button>
</div>
</div>
</van-popup>
</div>
...
...
@@ -106,6 +108,7 @@ import { Cookies, $, _, axios, storeToRefs, mainStore, Toast, useTitle } from '@
//import { } from '@/utils/generateIcons.js'
//import { } from '@/composables'
import { getSkuInfoAPI } from "@/api/material";
import { styleColor } from "@/constant.js";
const $route = useRoute();
const $router = useRouter();
...
...
src/views/material_list.vue
View file @
c5676fd
<!--
* @Date: 2024-07-23 10:50:38
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-07-26 1
4:39:00
* @LastEditTime: 2024-07-26 1
6:25:16
* @FilePath: /temple_material_request/src/views/material_list.vue
* @Description: 物资情况页面
-->
...
...
@@ -21,7 +21,7 @@
<div class="item-title van-ellipsis" :style="{ color: styleColor.baseColor }" @click="onClickTitle(item)">{{ item.product_name }} / {{ item.spec }}</div>
<div class="item-attr">
<div v-for="(x, index) in item.order_list" :key="index">
申领人:
{{ x.contact_name }} {{ x.use_time }} 使用
申领人:{{ x.contact_name }} {{ x.use_time }} 使用
</div>
</div>
</van-col>
...
...
@@ -39,7 +39,7 @@
</van-tab>
</van-tabs>
<div style="height: 4rem;"></div>
<div style="position: fixed; left: 0; right: 0; bottom: 0; padding: 1rem; background-color: white;">
<div style="position: fixed; left: 0; right: 0; bottom: 0; padding: 1rem; background-color: white;
box-shadow: 0rem -0.33rem 0.33rem 0.08rem rgba(0,0,0,0.06);
">
<van-button @click="onClickRequest" type="primary" block :color="styleColor.baseColor">我要申领</van-button>
</div>
</div>
...
...
@@ -68,6 +68,8 @@ const activity_id = $route.query.activity_id ? $route.query.activity_id : '';
const form_id = $route.query.form_id ? $route.query.form_id : '';
const client_id = $route.query.client_id ? $route.query.client_id : '';
const dept_id = ref('');
onMounted(async () => {
const { data, code } = await getActivityDeptsAPI({ activity_id, is_previous: 0, only_my_dept: 0 });
if (code) {
...
...
@@ -80,6 +82,7 @@ onMounted(async () => {
message: '物资列表为空,将前往添加!',
confirmButtonColor: styleColor.baseColor
}).then(() => {
// 跳转购物车页面
$router.push({
path: '/material_pre_request',
query: {
...
...
@@ -93,9 +96,12 @@ onMounted(async () => {
}
});
// 切换组别模块
const active = ref(0);
const onChange = async (index) => {
const tabList = ref([]); // 组别列表
const onChange = async (index) => { // 切换组别回调
dept_id.value = tabList.value[index]['dept_id'];
// 重置物资列表
limit.value = 20;
offset.value = 0;
loading.value = false;
...
...
@@ -103,12 +109,9 @@ const onChange = async (index) => {
list.value = [];
}
const tabList = ref([]); // 组别列表
const dept_id = ref('');
// 物资列表模块
const limit = ref(20);
const offset = ref(0);
const list = ref([]);
const loading = ref(false);
const finished = ref(false);
...
...
@@ -135,7 +138,13 @@ const onClickTitle = (item) => { // 点击物资标题回调
material_id.value = item.good_id;
}
const show_material_detail = ref(false);
const onCloseDetail = () => { // 关闭物资详情回调
show_material_detail.value = false;
}
const onClickRequest = () => { // 我要申领物资
// 上一次申领物资列表
$router.push({
path: '/material_request',
query: {
...
...
@@ -143,12 +152,7 @@ const onClickRequest = () => { // 我要申领物资
form_id,
client_id
}
})
}
const show_material_detail = ref(false);
const onCloseDetail = () => {
show_material_detail.value = false;
});
}
</script>
...
...
Please
register
or
login
to post a comment