This commit is contained in:
parent
7ab75f7562
commit
17e66d6a10
|
@ -1,5 +1,5 @@
|
|||
NODE_ENV = 'development'
|
||||
VITE_NOW_TYPE = 'dist'
|
||||
# Base API
|
||||
VITE_APP_BASE_URL='http://192.168.1.14:8546'
|
||||
VITE_APP_BASE_URL='http://192.168.1.22:8546'
|
||||
# VITE_APP_BASE_URL='https://erp.lihaink.cn'
|
|
@ -1,22 +1,61 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists" border style="width: 100%">
|
||||
<div>
|
||||
<el-radio-group v-model="queryParams.is_adopt" size="small" @change="changeType">
|
||||
<el-radio-button label="全部" value="" />
|
||||
<el-radio-button label="未采纳" value="0" />
|
||||
<el-radio-button label="已采纳" value="1" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-table :data="pager.lists" border style="width: 100%; margin-top: 10px">
|
||||
<el-table-column prop="id" label="ID" width="120" />
|
||||
<el-table-column prop="order_id" label="采购订单id" width="120" />
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
prop="goods_name"
|
||||
show-overflow-tooltip
|
||||
width="220"
|
||||
/>
|
||||
<el-table-column label="需求数量" prop="need_num" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="unit_name" show-overflow-tooltip />
|
||||
<el-table-column label="实际金额" prop="actual" show-overflow-tooltip />
|
||||
<el-table-column label="实收金额" prop="money" show-overflow-tooltip />
|
||||
<el-table-column label="需求数量" prop="need_num" show-overflow-tooltip width="100" />
|
||||
<el-table-column
|
||||
label="单据时间"
|
||||
prop="create_time"
|
||||
label="单位"
|
||||
prop="unit_name"
|
||||
width="80"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="供应商"
|
||||
prop="supplier_name"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column label="提供数量" prop="nums" show-overflow-tooltip width="100"/>
|
||||
<el-table-column label="报价" prop="price" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
label="是否采纳报价"
|
||||
prop="is_adopt"
|
||||
width="120"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.is_adopt === 1" type="success">已采纳</el-tag>
|
||||
<el-tag v-else type="info">未采纳</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
prop="update_time"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
prop="is_adopt"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small">采纳</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
|
@ -33,11 +72,19 @@ const route = useRoute();
|
|||
|
||||
const queryParams = reactive({
|
||||
id: route.query.id,
|
||||
is_adopt: "",
|
||||
});
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiOpurchaseclassGoodsOfferList,
|
||||
params: queryParams,
|
||||
});
|
||||
getLists();
|
||||
defineExpose({
|
||||
getLists,
|
||||
});
|
||||
|
||||
const changeType = (e: any)=>{
|
||||
queryParams.is_adopt = e;
|
||||
getLists();
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -38,5 +38,8 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||
fetchFun: apiOpurchaseclassSubOrders,
|
||||
params: queryParams,
|
||||
});
|
||||
getLists();
|
||||
|
||||
defineExpose({
|
||||
getLists
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-tabs v-model="activeName" class="demo-tabs">
|
||||
<el-tab-pane label="概况" name="first">
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-change="tabChange">
|
||||
<el-tab-pane label="概况" name="detail">
|
||||
<el-descriptions class="margin-top" :column="4" border>
|
||||
<!-- <template #extra>
|
||||
<el-button type="primary">Operation</el-button>
|
||||
|
@ -23,7 +23,7 @@
|
|||
{{ form.money }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="所属商户">
|
||||
{{ form.merchant }}
|
||||
{{ form.merchant_name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="ID">
|
||||
{{ form.id }}
|
||||
|
@ -42,11 +42,11 @@
|
|||
<el-table-column prop="total" label="合计(元)" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="子订单" name="second">
|
||||
<subOrder />
|
||||
<el-tab-pane label="子订单" name="order">
|
||||
<subOrder ref="subOrderRef" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报价列表" name="third">
|
||||
<goodsOffer />
|
||||
<el-tab-pane label="报价列表" name="offer">
|
||||
<goodsOffer ref="goodsOfferRef" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="详情3" name="fourth">Task</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
|
@ -61,7 +61,6 @@ import {
|
|||
apiOpurchaseclassLists,
|
||||
apiOpurchaseclassDelete,
|
||||
apiOpurchaseclassDetail,
|
||||
|
||||
} from "@/api/opurchaseclass";
|
||||
import { useRoute } from "vue-router";
|
||||
import subOrder from "./component/subOrder.vue";
|
||||
|
@ -70,8 +69,15 @@ import goodsOffer from "./component/goodsOffer.vue";
|
|||
const route = useRoute();
|
||||
const form = ref({});
|
||||
|
||||
const activeName = ref("first");
|
||||
|
||||
const activeName = ref("detail");
|
||||
const activeMap = ref(
|
||||
new Map([
|
||||
["detail", true],
|
||||
["order", false],
|
||||
["offer", false],
|
||||
])
|
||||
);
|
||||
console.log(activeMap.value);
|
||||
|
||||
const getDetail = async () => {
|
||||
const data = await apiOpurchaseclassDetail({
|
||||
|
@ -81,4 +87,13 @@ const getDetail = async () => {
|
|||
};
|
||||
getDetail();
|
||||
|
||||
const subOrderRef = ref(null);
|
||||
const goodsOfferRef = ref(null);
|
||||
const tabChange = (type: any) => {
|
||||
if (!activeMap.value.get(type)) {
|
||||
if (type == "order") subOrderRef.value?.getLists();
|
||||
if (type == "offer") goodsOfferRef.value?.getLists();
|
||||
activeMap.value.set(type, true);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue