|
@@ -1,32 +1,13 @@
|
|
<template>
|
|
<template>
|
|
- <van-nav-bar
|
|
|
|
- :title="$t('purchased.name')"
|
|
|
|
- left-text=""
|
|
|
|
- left-arrow
|
|
|
|
- @click-left="onClickLeft"
|
|
|
|
- @click-right="onClickRight"
|
|
|
|
- >
|
|
|
|
- <template #right> {{$t('purchased.addProcurement')}} </template>
|
|
|
|
|
|
+ <van-nav-bar :title="$t('purchased.name')" left-text="" left-arrow @click-left="onClickLeft">
|
|
|
|
+ <!-- @click-right="onClickRight" -->
|
|
|
|
+ <!-- <template #right> {{$t('purchased.addProcurement')}} </template> -->
|
|
</van-nav-bar>
|
|
</van-nav-bar>
|
|
- <van-search
|
|
|
|
- v-model="req.keyword"
|
|
|
|
- :placeholder="$t('common.pleaseEnterKeywords')"
|
|
|
|
- @search="onRefresh"
|
|
|
|
- />
|
|
|
|
|
|
+ <van-search v-model="req.keyword" :placeholder="$t('common.pleaseEnterKeywords')" @search="onRefresh" />
|
|
<van-pull-refresh v-model="loading" @refresh="onRefresh">
|
|
<van-pull-refresh v-model="loading" @refresh="onRefresh">
|
|
<div class="list">
|
|
<div class="list">
|
|
- <van-list
|
|
|
|
- v-model:loading="loading"
|
|
|
|
- :finished="finished"
|
|
|
|
- :finished-text="$t('common.noMore')"
|
|
|
|
- @load="onLoad"
|
|
|
|
- style="margin-bottom: 60px"
|
|
|
|
- >
|
|
|
|
- <commonList
|
|
|
|
- :data="listData"
|
|
|
|
- @onClick="toDtl"
|
|
|
|
- :config="listConfig"
|
|
|
|
- ></commonList>
|
|
|
|
|
|
+ <van-list v-model:loading="loading" :finished="finished" :finished-text="$t('common.noMore')" @load="onLoad" style="margin-bottom: 60px">
|
|
|
|
+ <commonList :data="listData" @onClick="toDtl" :config="listConfig"></commonList>
|
|
</van-list>
|
|
</van-list>
|
|
</div>
|
|
</div>
|
|
</van-pull-refresh>
|
|
</van-pull-refresh>
|
|
@@ -48,19 +29,19 @@ const listData = ref([]);
|
|
|
|
|
|
const listConfig = ref([
|
|
const listConfig = ref([
|
|
{
|
|
{
|
|
- label: proxy.t('purchased.procurementNumber'),
|
|
|
|
|
|
+ label: proxy.t("purchased.procurementNumber"),
|
|
prop: "code",
|
|
prop: "code",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: proxy.t('purchased.supplier'),
|
|
|
|
|
|
+ label: proxy.t("purchased.supplier"),
|
|
prop: "supplyName",
|
|
prop: "supplyName",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: proxy.t('purchased.purchaseAmount'),
|
|
|
|
- prop: "count",
|
|
|
|
|
|
+ label: proxy.t("purchased.purchaseAmount"),
|
|
|
|
+ prop: "amount",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: proxy.t('purchased.purchaseStatus'),
|
|
|
|
|
|
+ label: proxy.t("purchased.purchaseStatus"),
|
|
prop: "purchaseStatus",
|
|
prop: "purchaseStatus",
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
@@ -78,7 +59,7 @@ const onClickLeft = () => proxy.$router.push("/main/working");
|
|
const onClickRight = () => {
|
|
const onClickRight = () => {
|
|
proxy.$router.push("/main/purchasedAdd");
|
|
proxy.$router.push("/main/purchasedAdd");
|
|
};
|
|
};
|
|
-proxy.uploadDdRightBtn(onClickRight,'新增采购')
|
|
|
|
|
|
+proxy.uploadDdRightBtn(onClickRight, "新增采购");
|
|
const toDtl = (row) => {
|
|
const toDtl = (row) => {
|
|
proxy.$router.push({
|
|
proxy.$router.push({
|
|
path: "purchasedAdd",
|
|
path: "purchasedAdd",
|
|
@@ -97,12 +78,12 @@ const getList = (type) => {
|
|
res.data.rows.map((item) => {
|
|
res.data.rows.map((item) => {
|
|
item.purchaseStatus =
|
|
item.purchaseStatus =
|
|
item.purchaseStatus === 0
|
|
item.purchaseStatus === 0
|
|
- ? proxy.t('purchased.draft')
|
|
|
|
|
|
+ ? proxy.t("purchased.draft")
|
|
: item.purchaseStatus === 10
|
|
: item.purchaseStatus === 10
|
|
- ? proxy.t('purchased.approval')
|
|
|
|
|
|
+ ? proxy.t("purchased.approval")
|
|
: item.purchaseStatus === 20
|
|
: item.purchaseStatus === 20
|
|
- ? proxy.t('purchased.reject')
|
|
|
|
- : proxy.t('purchased.pass');
|
|
|
|
|
|
+ ? proxy.t("purchased.reject")
|
|
|
|
+ : proxy.t("purchased.pass");
|
|
});
|
|
});
|
|
listData.value =
|
|
listData.value =
|
|
type === "refresh"
|
|
type === "refresh"
|