This commit is contained in:
weiz 2024-03-19 17:22:11 +08:00
parent acad0b892f
commit a085fd8c17
3 changed files with 15 additions and 62 deletions

View File

@ -1,26 +1,31 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 报价单列表
export function apiQuotationLists(params: any) {
return request.get({ url: '/quotation.quotation/lists', params })
return request.get({ url: "/quotation.quotation/lists", params });
}
// 添加报价单
export function apiQuotationAdd(params: any) {
return request.post({ url: '/quotation.quotation/add', params })
return request.post({ url: "/quotation.quotation/add", params });
}
// 编辑报价单
export function apiQuotationEdit(params: any) {
return request.post({ url: '/quotation.quotation/edit', params })
return request.post({ url: "/quotation.quotation/edit", params });
}
// 删除报价单
export function apiQuotationDelete(params: any) {
return request.post({ url: '/quotation.quotation/delete', params })
return request.post({ url: "/quotation.quotation/delete", params });
}
// 报价单详情
export function apiQuotationDetail(params: any) {
return request.get({ url: '/quotation.quotation/detail', params })
}
return request.get({ url: "/quotation.quotation/detail", params });
}
//apiQuotationSearch
export function apiQuotationSearch(params: any) {
return request.get({ url: "/quotation.quotation/datas", params });
}

View File

@ -87,7 +87,6 @@ const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const showDtail = ref(false)
const customerList = ref([])
//
const queryParams = reactive({
@ -140,19 +139,11 @@ const handleDelete = async (id: number | any[]) => {
//
const handleDetail = async (data: any) => {
let res = await apiQuotationDetail({ id: data.id })
showDtail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
//
const customerlist = async () => {
let res = await apiCustomLists({ page_size: 9999, page_no: 1 })
customerList.value = res.lists
}
customerlist()
getLists()
</script>

View File

@ -2,14 +2,9 @@
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="报价单" prop="quotation_id">
<el-select class="w-[280px]" v-model="queryParams.quotation_id" clearable placeholder="请选择税率">
<el-option label="全部" value=""></el-option>
<el-option v-for="(item, index) in quotationList" :key="index" :label="item.code"
:value="item.id" />
</el-select>
<el-form-item label="报价单号" prop="quotation_id">
<selectRemote :formData="queryParams" model="quotation_id" :api="apiQuotationSearch" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
@ -40,9 +35,7 @@
<el-table-column label="不含税金额" prop="tax_exclusive_amount" show-overflow-tooltip />
<el-table-column label="含税金额" prop="tax_inclusive_amount" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<!-- <el-table-column label="添加人" prop="product_num" show-overflow-tooltip /> -->
<el-table-column label="创建日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
</el-table>
</div>
<div class="flex mt-4 justify-end">
@ -56,31 +49,17 @@
<script lang="ts" setup name="quotationDetailLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiQuotationLists } from '@/api/quotation'
import { apiQuotationSearch } from '@/api/quotation'
import { apiQuotationDetailLists } from '@/api/quotation_detail'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
// import EditPopup from './edit.vue'
// const editRef = shallowRef<InstanceType<typeof EditPopup>>()
//
const showEdit = ref(false)
const quotationList = ref([])
//
const queryParams = reactive({
quotation_id: '',
})
//
const quotationlist = () => {
apiQuotationLists({ page_no: 1, page_size: 9995 }).then((res) => {
quotationList.value = res.lists
})
}
//
const selectData = ref<any[]>([])
@ -98,27 +77,5 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
params: queryParams
})
// //
// const handleAdd = async () => {
// showEdit.value = true
// await nextTick()
// editRef.value?.open('add')
// }
// //
// const handleEdit = async (data: any) => {
// showEdit.value = true
// await nextTick()
// editRef.value?.open('edit')
// editRef.value?.setFormData(data)
// }
// //
// const handleDelete = async (id: number | any[]) => {
// await feedback.confirm('')
// await apiQuotationDetailDelete({ id })
// getLists()
// }
quotationlist()
getLists()
</script>