This commit is contained in:
parent
17e66d6a10
commit
d8f5d91dc6
|
@ -34,3 +34,8 @@ export function apiOpurchaseclassSubOrders(params: any) {
|
|||
export function apiOpurchaseclassGoodsOfferList(params: any) {
|
||||
return request.get({ url: '/operation/opurchaseclass/goods_offer_list', params })
|
||||
}
|
||||
|
||||
// 采购详情报价列表
|
||||
export function apiOpurchaseclassGoodsOfferUpdate(params: any) {
|
||||
return request.post({ url: '/operation/Opurchaseclass/goods_offer_update', params })
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
v-model="drawer"
|
||||
title="I am the title"
|
||||
>
|
||||
<span>Hi, there!</span>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="goodList">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import {
|
||||
apiOpurchaseclassGoodsOfferList,
|
||||
apiOpurchaseclassGoodsOfferUpdate,
|
||||
} from "@/api/opurchaseclass";
|
||||
|
||||
const drawer = ref(false);
|
||||
const form = ref({});
|
||||
|
||||
const setForm = (data: any) => {
|
||||
console.log(data);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<el-radio-group v-model="queryParams.is_adopt" size="small" @change="changeType">
|
||||
<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" />
|
||||
|
@ -16,7 +20,12 @@
|
|||
show-overflow-tooltip
|
||||
width="220"
|
||||
/>
|
||||
<el-table-column label="需求数量" prop="need_num" show-overflow-tooltip width="100" />
|
||||
<el-table-column
|
||||
label="需求数量"
|
||||
prop="need_num"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
prop="unit_name"
|
||||
|
@ -29,13 +38,14 @@
|
|||
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"
|
||||
>
|
||||
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>
|
||||
|
@ -47,13 +57,16 @@
|
|||
show-overflow-tooltip
|
||||
width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
prop="is_adopt"
|
||||
fixed="right"
|
||||
>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small">采纳</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="row.is_adopt === 0"
|
||||
size="small"
|
||||
@click="offerGood(row)"
|
||||
>采纳</el-button
|
||||
>
|
||||
<span v-else>商品已采纳</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -65,7 +78,10 @@
|
|||
|
||||
<script lang="ts" setup name="subOrder">
|
||||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { apiOpurchaseclassGoodsOfferList } from "@/api/opurchaseclass";
|
||||
import {
|
||||
apiOpurchaseclassGoodsOfferList,
|
||||
apiOpurchaseclassGoodsOfferUpdate,
|
||||
} from "@/api/opurchaseclass";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
|
@ -83,8 +99,17 @@ defineExpose({
|
|||
getLists,
|
||||
});
|
||||
|
||||
const changeType = (e: any)=>{
|
||||
const changeType = (e: any) => {
|
||||
queryParams.is_adopt = e;
|
||||
getLists();
|
||||
}
|
||||
};
|
||||
|
||||
const offerGood = (row: any) => {
|
||||
apiOpurchaseclassGoodsOfferUpdate({
|
||||
id: row.id,
|
||||
}).then((res) => {
|
||||
getLists();
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-table :data="pager.lists" border style="width: 100%">
|
||||
<el-table :data="pager.lists" border style="width: 100%;">
|
||||
<el-table-column prop="id" label="ID" width="120" />
|
||||
<el-table-column label="单据编号" prop="number" show-overflow-tooltip />
|
||||
<el-table-column label="单据金额" prop="total" show-overflow-tooltip />
|
||||
|
@ -16,10 +16,16 @@
|
|||
prop="create_time"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" @click="openDetail(row)" link>详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="flex mt-4 justify-end">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
<goodList ref="goodListRef" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -27,6 +33,7 @@
|
|||
import { usePaging } from "@/hooks/usePaging";
|
||||
import { apiOpurchaseclassSubOrders } from "@/api/opurchaseclass";
|
||||
import { useRoute } from "vue-router";
|
||||
import goodList from "./goodList.vue";
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
|
@ -42,4 +49,11 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||
defineExpose({
|
||||
getLists
|
||||
})
|
||||
|
||||
const goodListRef = ref(null);
|
||||
|
||||
const openDetail = (row: any) => {
|
||||
goodListRef.value?.open(row);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
<el-descriptions-item label="所属商户">
|
||||
{{ form.merchant_name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="ID">
|
||||
{{ form.id }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
:data="form.goods_info"
|
||||
|
|
Loading…
Reference in New Issue