代码更新
This commit is contained in:
parent
01b8a2ba6e
commit
cda5d21ab6
@ -5,22 +5,3 @@ export function apiQuotationDetailLists(params: any) {
|
||||
return request.get({ url: '/quotation.quotation_detail/lists', params })
|
||||
}
|
||||
|
||||
// 添加报价明细
|
||||
export function apiQuotationDetailAdd(params: any) {
|
||||
return request.post({ url: '/quotation.quotation_detail/add', params })
|
||||
}
|
||||
|
||||
// 编辑报价明细
|
||||
export function apiQuotationDetailEdit(params: any) {
|
||||
return request.post({ url: '/quotation.quotation_detail/edit', params })
|
||||
}
|
||||
|
||||
// 删除报价明细
|
||||
export function apiQuotationDetailDelete(params: any) {
|
||||
return request.post({ url: '/quotation.quotation_detail/delete', params })
|
||||
}
|
||||
|
||||
// 报价明细详情
|
||||
export function apiQuotationDetailDetail(params: any) {
|
||||
return request.get({ url: '/quotation.quotation_detail/detail', params })
|
||||
}
|
@ -15,11 +15,22 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="bid_document_examination_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="matsname" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item></el-col><el-col :span="8">
|
||||
</el-form-item></el-col>
|
||||
<el-col :span="8">
|
||||
<!-- @click="showDialog1 = true" -->
|
||||
<el-form-item label="产品" prop="product_id" @click="showDialog1 = true">
|
||||
<el-input v-model="formData.product_id" readonly clearable placeholder="请输入产品" />
|
||||
</el-form-item></el-col><el-col :span="8">
|
||||
<el-form-item label="型号规格" prop="product_id">
|
||||
<el-input v-model="formData.product_id" readonly clearable placeholder="请输入产品" />
|
||||
</el-form-item></el-col><el-col :span="8">
|
||||
<el-form-item label="单位" prop="product_id">
|
||||
<el-input v-model="formData.product_id" clearable placeholder="请输入产品" />
|
||||
</el-form-item></el-col><el-col :span="8">
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="产品数量" prop="product_num">
|
||||
<el-input v-model="formData.product_num" clearable placeholder="请输入产品数量" />
|
||||
</el-form-item></el-col><el-col :span="8">
|
||||
|
@ -8,14 +8,20 @@
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="contacts">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contacts" clearable placeholder="请输入联系人" />
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="制单人" prop="create_user">
|
||||
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入制单人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票类型" prop="create_user">
|
||||
<el-select class="w-[280px]" v-model="queryParams.invoice_type" clearable placeholder="请选择发票类型">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.invoice_type" :key="index" :label="item.name" :value="item.value" />
|
||||
</el-select> </el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button type="primary" @click="resetPage">
|
||||
查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -34,16 +40,13 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="客户id" prop="customer_id" show-overflow-tooltip />
|
||||
<el-table-column label="报价单号" prop="code" show-overflow-tooltip />
|
||||
<el-table-column label="客户" prop="custom_name" show-overflow-tooltip />
|
||||
<el-table-column label="报价日期" prop="quotation_date" show-overflow-tooltip />
|
||||
<el-table-column label="联系人" prop="contacts" show-overflow-tooltip />
|
||||
<el-table-column label="联系电话" prop="contacts_phone" show-overflow-tooltip />
|
||||
<el-table-column label="联系人" prop="custom_master_name" show-overflow-tooltip />
|
||||
<el-table-column label="联系电话" prop="custom_master_phone" show-overflow-tooltip />
|
||||
<el-table-column label="制单人" prop="create_user" show-overflow-tooltip />
|
||||
<el-table-column label="发票类型" prop="invoice_type">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.invoice_type" :value="row.invoice_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票类型" prop="invoice_type_text" show-overflow-tooltip />
|
||||
<el-table-column label="含税金额" prop="amount_including_tax" show-overflow-tooltip />
|
||||
<el-table-column label="运费" prop="freight" show-overflow-tooltip />
|
||||
<el-table-column label="其他费用" prop="other_fee" show-overflow-tooltip />
|
||||
@ -93,8 +96,9 @@ const customerList = ref([])
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
customer_id: '',
|
||||
contacts: '',
|
||||
create_user: ''
|
||||
code: '',
|
||||
create_user: '',
|
||||
invoice_type: ''
|
||||
})
|
||||
|
||||
// 选中数据
|
||||
|
@ -3,20 +3,12 @@
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="报价单id" prop="quotation_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.quotation_id" clearable placeholder="请输入报价单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品id" prop="product_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.product_id" clearable placeholder="请输入产品id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品数量" prop="product_num">
|
||||
<el-input class="w-[280px]" v-model="queryParams.product_num" clearable placeholder="请输入产品数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="税率" prop="tax_rate">
|
||||
<el-select class="w-[280px]" v-model="queryParams.tax_rate" clearable placeholder="请选择税率">
|
||||
<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 dictData.tax_rate" :key="index" :label="item.name" :value="item.value" />
|
||||
<el-option v-for="(item, index) in quotationList" :key="index" :label="item.code" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
@ -24,38 +16,32 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="报价单号" prop="quotation_id" show-overflow-tooltip />
|
||||
<el-table-column label="客户名称" prop="quotation_id" show-overflow-tooltip />
|
||||
<el-table-column label="制单人" prop="product_id" show-overflow-tooltip />
|
||||
<el-table-column label="报价日期" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="产品类别" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="产品中类" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="产品小类" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="产品名称" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="产品编码" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="品牌" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="参数说明" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="tax_rate">
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.tax_rate" :value="row.tax_rate" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="含税单价" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="不含税金额" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="含税金额" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="添加人" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="创建日期" prop="product_num" show-overflow-tooltip />
|
||||
<el-table-column label="报价单号" prop="quotation_code" show-overflow-tooltip />
|
||||
<el-table-column label="客户名称" prop="custom_name" show-overflow-tooltip />
|
||||
<el-table-column label="制单人" prop="quotation_create_user" show-overflow-tooltip />
|
||||
<el-table-column label="报价日期" prop="quotation_date" show-overflow-tooltip />
|
||||
<el-table-column label="产品类别" prop="product_first_level_name" show-overflow-tooltip />
|
||||
<el-table-column label="产品中类" prop="product_second_level_name" show-overflow-tooltip />
|
||||
<el-table-column label="产品小类" prop="product_three_level_name" show-overflow-tooltip />
|
||||
<el-table-column label="产品名称" prop="product_name" show-overflow-tooltip />
|
||||
<el-table-column label="产品编码" prop="product_code" show-overflow-tooltip />
|
||||
<el-table-column label="规格型号" prop="product_specs" show-overflow-tooltip />
|
||||
<el-table-column label="品牌" prop="product_brand" show-overflow-tooltip />
|
||||
<el-table-column label="参数说明" prop="product_parameter_description" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="product_unit" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="num" show-overflow-tooltip />
|
||||
<el-table-column label="税率" prop="tax_rate" show-overflow-tooltip />
|
||||
<el-table-column label="含税单价" prop="tax_inclusive_price" show-overflow-tooltip />
|
||||
<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">
|
||||
@ -69,24 +55,31 @@
|
||||
<script lang="ts" setup name="quotationDetailLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiQuotationDetailLists, apiQuotationDetailDelete } from '@/api/quotation_detail'
|
||||
import { apiQuotationLists } from '@/api/quotation'
|
||||
import { apiQuotationDetailLists } from '@/api/quotation_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
// import EditPopup from './edit.vue'
|
||||
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
const showEdit = ref(false)
|
||||
|
||||
const quotationList = ref([])
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
quotation_id: '',
|
||||
product_id: '',
|
||||
product_num: '',
|
||||
tax_rate: ''
|
||||
|
||||
})
|
||||
|
||||
//获取报价单数据
|
||||
const quotationlist = () => {
|
||||
apiQuotationLists({ page_no: 1, page_size: 9995 }).then((res) => {
|
||||
quotationList.value = res.lists
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
@ -104,28 +97,28 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
// 添加
|
||||
const handleAdd = async () => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('add')
|
||||
}
|
||||
// // 添加
|
||||
// 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()
|
||||
}
|
||||
// // 编辑
|
||||
// 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>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user