App端 物资管理详情
This commit is contained in:
parent
090979fb07
commit
ca3cd2bdde
@ -13,75 +13,104 @@
|
|||||||
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
||||||
>
|
>
|
||||||
</van-cell>
|
</van-cell>
|
||||||
|
<van-cell :title="'物资名称: ' + wzDetailData.wzmc"> </van-cell>
|
||||||
|
<van-cell :title="'数量: ' + wzDetailData.sl"> </van-cell>
|
||||||
|
<van-cell :title="'余量: ' + wzDetailData.ye"> </van-cell>
|
||||||
|
<van-cell :title="'单位: ' + wzDetailData.dw"> </van-cell>
|
||||||
|
<van-cell :title="'存放地点: ' + wzDetailData.cfdd"> </van-cell>
|
||||||
|
<van-cell :title="'区县名称: ' + wzDetailData.qxmc"> </van-cell>
|
||||||
|
<van-cell :title="'负责人: ' + wzDetailData.fzr"> </van-cell>
|
||||||
|
<van-cell :title="'联系电话: ' + wzDetailData.lxdh"> </van-cell>
|
||||||
|
<van-cell :title="'入库日期: ' + wzDetailData.rkrq"> </van-cell>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import "vant/es/toast/style";
|
import "vant/es/toast/style";
|
||||||
import "vant/es/popup/style";
|
import "vant/es/popup/style";
|
||||||
import { ref, onMounted, toRaw, reactive } from "vue";
|
import { ref, onMounted, toRaw, reactive } from "vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { showToast, showLoadingToast } from "vant";
|
import { showToast, showLoadingToast } from "vant";
|
||||||
import { request } from "../../../../shared/utils/request";
|
import { request } from "../../../../shared/utils/request";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const yhzDetail = ref({});
|
const yhzDetail = ref({});
|
||||||
const wzData = ref([]);
|
const wzData = ref([]);
|
||||||
const wzDetailData = ref({}); // 物资详情数据
|
const wzDetailData = ref({}); // 物资详情数据
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
onMounted(() => {
|
|
||||||
const data = JSON.parse(decodeURIComponent(route.params.data));
|
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||||
yhzDetail.value = data.yhzDetail;
|
yhzDetail.value = data.yhzDetail;
|
||||||
wzData.value = data.material;
|
wzData.value = data.material;
|
||||||
console.log('传递过来的参数:',data);
|
console.log("传递过来的参数:", data);
|
||||||
|
getwzDetail();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 获取物资详情
|
||||||
|
const getwzDetail = async () => {
|
||||||
|
try {
|
||||||
|
const res = await request({
|
||||||
|
url: `/snow-ops-platform/yjwz/getById?rid=${wzData.value.rid}`,
|
||||||
|
method: "GET",
|
||||||
});
|
});
|
||||||
|
if (res.code && res.code === "00000") {
|
||||||
|
wzDetailData.value = res.data;
|
||||||
|
} else {
|
||||||
|
throw new Error(res.message);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
showToast({
|
||||||
|
message: error.message,
|
||||||
|
type: "error",
|
||||||
|
});
|
||||||
|
console.log("error", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const onClickLeft = () => {
|
const onClickLeft = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name: "MaterialManage",
|
name: "MaterialManage",
|
||||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.home {
|
.home {
|
||||||
padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
|
padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
margin-top: 16px;
|
margin-top: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-tag {
|
.status-tag {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 3px 8px;
|
padding: 3px 8px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
.status-good {
|
.status-good {
|
||||||
background-color: #07c160;
|
background-color: #07c160;
|
||||||
}
|
}
|
||||||
.status-warning {
|
.status-warning {
|
||||||
background-color: #ff976a;
|
background-color: #ff976a;
|
||||||
}
|
}
|
||||||
.status-danger {
|
.status-danger {
|
||||||
background-color: #ee0a24;
|
background-color: #ee0a24;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user