|
@@ -1,32 +1,12 @@
|
|
|
<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="'采购合同'" left-text="" left-arrow @click-left="onClickLeft" @click-right="onClickRight">
|
|
|
+ <!-- <template #right> {{$t('purchased.addProcurement')}} </template> -->
|
|
|
</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">
|
|
|
<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>
|
|
|
</div>
|
|
|
</van-pull-refresh>
|
|
@@ -39,8 +19,9 @@ const loading = ref(false);
|
|
|
const router = useRoute();
|
|
|
const req = ref({
|
|
|
pageNum: 1,
|
|
|
- type: "1",
|
|
|
- keyword: null,
|
|
|
+ keyword: "",
|
|
|
+ status: "",
|
|
|
+ payStatus: "",
|
|
|
});
|
|
|
const finished = ref(false);
|
|
|
const proxy = getCurrentInstance().proxy;
|
|
@@ -48,20 +29,24 @@ const listData = ref([]);
|
|
|
|
|
|
const listConfig = ref([
|
|
|
{
|
|
|
- label: proxy.t('purchased.procurementNumber'),
|
|
|
+ label: "采购单号",
|
|
|
prop: "code",
|
|
|
},
|
|
|
{
|
|
|
- label: proxy.t('purchased.supplier'),
|
|
|
+ label: proxy.t("purchased.supplier"),
|
|
|
prop: "supplyName",
|
|
|
},
|
|
|
{
|
|
|
- label: proxy.t('purchased.purchaseAmount'),
|
|
|
- prop: "count",
|
|
|
+ label: proxy.t("purchased.purchaseAmount"),
|
|
|
+ prop: "amount",
|
|
|
},
|
|
|
{
|
|
|
- label: proxy.t('purchased.purchaseStatus'),
|
|
|
- prop: "purchaseStatus",
|
|
|
+ label: "采购人",
|
|
|
+ prop: "userName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "采购状态",
|
|
|
+ prop: "statusName",
|
|
|
},
|
|
|
]);
|
|
|
const onRefresh = () => {
|
|
@@ -78,31 +63,62 @@ const onClickLeft = () => proxy.$router.push("/main/working");
|
|
|
const onClickRight = () => {
|
|
|
proxy.$router.push("/main/purchasedAdd");
|
|
|
};
|
|
|
-proxy.uploadDdRightBtn(onClickRight,'新增采购')
|
|
|
+proxy.uploadDdRightBtn(onClickRight, "新增采购");
|
|
|
const toDtl = (row) => {
|
|
|
proxy.$router.push({
|
|
|
- path: "purchasedAdd",
|
|
|
+ path: "/main/processDtl",
|
|
|
query: {
|
|
|
- id: row.id,
|
|
|
+ flowKey: "ehsd_purchase_flow",
|
|
|
+ id: row.flowId,
|
|
|
+ processType: 20,
|
|
|
+ businessId: row.id,
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+const status = ref([
|
|
|
+ {
|
|
|
+ label: "草稿",
|
|
|
+ value: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审批中",
|
|
|
+ value: 10,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "驳回",
|
|
|
+ value: 20,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已采购",
|
|
|
+ value: 30,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "变更中",
|
|
|
+ value: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "已变更",
|
|
|
+ value: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "作废",
|
|
|
+ value: 88,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "终止",
|
|
|
+ value: 99,
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
const getList = (type) => {
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
- .post("/purchase/page", req.value)
|
|
|
+ .post("/ehsdPurchase/page", req.value)
|
|
|
.then((res) => {
|
|
|
console.log(req.value);
|
|
|
res.data.rows.map((item) => {
|
|
|
- item.purchaseStatus =
|
|
|
- item.purchaseStatus === 0
|
|
|
- ? proxy.t('purchased.draft')
|
|
|
- : item.purchaseStatus === 10
|
|
|
- ? proxy.t('purchased.approval')
|
|
|
- : item.purchaseStatus === 20
|
|
|
- ? proxy.t('purchased.reject')
|
|
|
- : proxy.t('purchased.pass');
|
|
|
+ item.statusName = proxy.dictValueLabel(item.status, status.value);
|
|
|
});
|
|
|
listData.value =
|
|
|
type === "refresh"
|