更新商机管理界面 以及分页处理

This commit is contained in:
jia 2024-01-05 11:19:19 +08:00
parent cda5d21ab6
commit cf7dc23a47
6 changed files with 150 additions and 71 deletions

View File

@ -18,32 +18,12 @@
<el-table-column label="序号" type="index" />
<el-table-column label="项目名称" prop="name" show-overflow-tooltip />
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
<el-table-column label="项目类型" prop="project_type">
<template #default="{ row }">
<dict-value :options="dictData.project_type" :value="row.project_type" />
</template>
</el-table-column>
<el-table-column label="项目类型" prop="project_type" show-overflow-tooltip />
<el-table-column label="项目所在地" prop="project_address" show-overflow-tooltip />
<el-table-column label="战略意义" prop="strategic_significance">
<template #default="{ row }">
<dict-value :options="dictData.strategic_significance" :value="row.strategic_significance" />
</template>
</el-table-column>
<el-table-column label="所属行业" prop="industry">
<template #default="{ row }">
<dict-value :options="dictData.industry" :value="row.industry" />
</template>
</el-table-column>
<el-table-column label="单位性质" prop="unit_nature">
<template #default="{ row }">
<dict-value :options="dictData.unit_nature" :value="row.unit_nature" />
</template>
</el-table-column>
<el-table-column label="招标方式" prop="bidding_method">
<template #default="{ row }">
<dict-value :options="dictData.bidding_method" :value="row.bidding_method" />
</template>
</el-table-column>
<el-table-column label="战略意义" prop="strategic_significance" show-overflow-tooltip />
<el-table-column label="所属行业" prop="industry" show-overflow-tooltip />
<el-table-column label="单位性质" prop="unit_nature" show-overflow-tooltip />
<el-table-column label="招标方式" prop="bidding_method" show-overflow-tooltip />
<el-table-column label="投标时间" property="master_phone" />
<el-table-column label="预计工期" property="master_phone" />
@ -55,11 +35,7 @@
<el-table-column label="联系人职位" property="master_phone" />
<el-table-column label="关系度" property="master_phone" />
<el-table-column label="发现时间" property="master_phone" />
<el-table-column label="信息来源" prop="industry">
<template #default="{ row }">
<dict-value :options="dictData.information_sources" :value="row.information_sources" />
</template>
</el-table-column>
<el-table-column label="信息来源" prop="information_sources" show-overflow-tooltip />
<el-table-column label="负责人" property="person" />
<el-table-column label="项目内容" property="name" />
<el-table-column label="竞争对手" property="master_phone" />

View File

@ -19,10 +19,7 @@
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
</el-select>
</div>
<el-row>
<el-col :span="8">
<el-form-item label="标书编号" prop="buy_bidding_document_id" @click="showDialog = true">
<el-input v-model="bid_document_no" clearable readonly placeholder="请选择标书编号" />
@ -209,34 +206,38 @@
</el-row>
<div class="tit">审查明细</div>
<div style="margin-bottom: 30px;">
<el-table :data="formData.product">
<el-table :data="tableData">
<el-table-column label="序号">
<template #default="{ row }">
<el-button @click="handleAdd(row)">+</el-button>
<el-button @click="handleDelete(row)">-</el-button>
</template>
</el-table-column>
<el-table-column label="产品名称" prop="product_name">
<template #default="{ row }">
<el-input v-model="row.product_name" />
<el-table-column label="产品名称" prop="name">
<template #default="{ row, $index }">
<el-input v-model="row.name" readonly @click="productDiag(row, $index)" placeholder="请选择产品">
<template #suffix>
<icon name="el-icon-Search" />
</template>
</el-input>
</template>
</el-table-column>
<el-table-column label="型号规格" prop="pay_date">
<el-table-column label="型号规格" prop="specs">
<template #default="{ row }">
<el-input v-model="row.pay_amount" />
<el-input v-model="row.specs" />
</template></el-table-column>
<el-table-column label="单位" prop="pay_amount">
<el-table-column label="单位" prop="unit">
<template #default="{ row }">
<el-input v-model="row.pay_amount" /> </template>
<el-input v-model="row.unit" /> </template>
</el-table-column>
<el-table-column label="数量" prop="product_num">
<template #default="{ row }">
<el-input v-model="row.product_num" /> </template>
</el-table-column>
<el-table-column label="成本单价" prop="cost_unit_price">
<el-table-column label="成本单价" prop="price">
<template #default="{ row }">
<el-input v-model="row.cost_unit_price" /> </template>
<el-input v-model="row.cprice" /> </template>
</el-table-column>
<el-table-column label="金额" prop="amount">
@ -264,7 +265,9 @@
</popup>
<el-dialog v-model="showDialog" title="选择标书" width="70%">
<biddocumentTable @customEvent="customEvent"></biddocumentTable>
</el-dialog>
<el-dialog v-model="showDialog1" title="选择产品" width="70%">
<customDialog1 @customEvent="customEvent1"></customDialog1>
</el-dialog>
</div>
</template>
@ -272,6 +275,7 @@
<script lang="ts" setup name="bidDocumentExaminationEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import customDialog1 from '@/components/product/index.vue'
import biddocumentTable from "@/components/biddocument/index.vue"
import { apiBidDocumentExaminationAdd, apiBidDocumentExaminationEdit, apiBidDocumentExaminationDetail } from '@/api/bid_document_examination'
import { timeFormat } from '@/utils/util'
@ -288,6 +292,8 @@ const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
const showDialog1 = ref(false)
const num = ref(0)
const bid_document_no = ref('')
const invite_tenders_company_name = ref('')
const bid_company_name = ref('')
@ -298,6 +304,7 @@ const bid_date = ref('')
const buy_date = ref('')
const invite_tenders_type = ref('')
const bid_address = ref('')
const tableData = ref([{}])
const list1 = reactive([])
const list2 = reactive([])
import { deptAll } from '@/api/org/department'
@ -368,15 +375,21 @@ const delFileFn2 = (index: number) => {
const handleAdd = (row: any) => {
// row
const index = formData.product.indexOf(row);
formData.product.splice(index + 1, 0, {});
const index = tableData.value.indexOf(row);
tableData.value.splice(index + 1, 0, {});
};
const handleDelete = (row: any) => {
// row
const index = formData.product.indexOf(row);
formData.product.splice(index, 1);
const index = tableData.value.indexOf(row);
tableData.value.splice(index, 1);
};
//
const productDiag = (row: any, index: number) => {
num.value = index
showDialog1.value = true
}
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑标书审查' : '新增标书审查'
@ -428,6 +441,23 @@ const customEvent = (e: any) => {
showDialog.value = false
};
const customEvent1 = (e: any) => {
tableData.value[num.value].product_id = e.id
tableData.value[num.value].name = e.name
tableData.value[num.value].specs = e.specs
tableData.value[num.value].unit = e.unit
tableData.value[num.value].product_num = e.product_num
tableData.value[num.value].price = e.price
tableData.value[num.value].amount = e.amount
tableData.value[num.value].product_id = e.id
tableData.value[num.value].product_id = e.id
// formData.customer_id = e.id;
// customer_name.value = e.name;
showDialog1.value = false;
console.log(tableData.value)
};
//
const formRules = reactive<any>({

View File

@ -19,39 +19,51 @@
<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-input v-model="product_name" 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-input v-model="product_specs" 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-input v-model="product_unit" 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">
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="成本单价" prop="cost_unit_price">
<el-input v-model="formData.cost_unit_price" clearable placeholder="请输入成本单价" />
</el-form-item></el-col><el-col :span="8">
</el-form-item></el-col>
<el-col :span="8">
<el-form-item label="金额" prop="amount">
<el-input v-model="formData.amount" clearable placeholder="请输入金额" />
</el-form-item></el-col><el-col :span="8">
<el-input v-model="formData.amount" clearable disabled placeholder="系统自动计算" />
</el-form-item></el-col>
<el-col :span="8">
<el-form-item label="点数" prop="rate">
<el-input v-model="formData.rate" clearable placeholder="请输入点数" />
</el-form-item></el-col><el-col :span="8">
</el-form-item></el-col>
<el-col :span="8">
<el-form-item label="报价单价" prop="unit_price">
<el-input v-model="formData.unit_price" clearable placeholder="请输入报价单价" />
</el-form-item></el-col><el-col :span="8">
<el-form-item label="报价金额" prop="total_amount">
<el-input v-model="formData.total_amount" clearable placeholder="请输入报价金额" />
</el-form-item></el-col><el-col :span="8">
<el-form-item label="" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入" />
</el-form-item></el-col>
<el-col :span="8">
<el-form-item label="报价金额" prop="total_amount">
<el-input v-model="formData.total_amount" clearable disabled placeholder="系统自动计算" />
</el-form-item></el-col>
</el-row>
</el-form>
</popup>
@ -79,6 +91,9 @@ defineProps({
default: () => ({})
}
})
const product_specs = ref('')
const product_unit = ref('')
const product_name = ref('')
const matsname = ref('')
const project_name = ref('')
const project_code = ref('')
@ -126,7 +141,9 @@ const customEvent = (e: any) => {
//
const customEvent1 = (e: any) => {
// formData.buy_bidding_document_id = e.id;
product_name.value = e.name
product_specs.value = e.specs
product_unit.value = e.unit
showDialog1.value = false;

View File

@ -211,18 +211,22 @@ const buildpersons = async (id: any) => {
const handleSizeChange = (val: number) => {
// console.log(`${val} items per page`)
pager.size = val
buildreports(formData.id)
}
const handleCurrentChange = (val: number) => {
// console.log(`current page: ${val}`)
pager.page = val
buildreports(formData.id)
}
const handleSizeChange1 = (val: number) => {
// console.log(`${val} items per page`)
pager1.size = val
buildpersons(formData.id)
}
const handleCurrentChange1 = (val: number) => {
// console.log(`current page: ${val}`)
pager1.page = val
buildpersons(formData.id)
}
//
const buildreports = async (id: any) => {

View File

@ -235,14 +235,17 @@ const formData = reactive({
const handleSizeChange1 = (val: number) => {
pager1.page_size = val
solutionLists()
}
const handleSizeChange2 = (val: number) => {
pager2.page_size = val
estimateLists()
}
const handleSizeChange3 = (val: number) => {
pager3.page_size = val
competitorLists()
}
//
const handleCurrentChange1 = (val: number) => {

View File

@ -83,6 +83,28 @@
</el-col>
</el-row>
<div class="tit">报价明细</div>
<el-row>
<el-table :data="quotationList">
<el-table-column label="产品类别" prop="product_first_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>
<div style="margin: 10px 0;">
<el-pagination v-model:current-page="pager.page_no" v-model:page-size="pager.page_size" :page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
</div>
</el-row>
</el-card>
</el-form>
</popup>
@ -95,7 +117,9 @@ import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiCustomDetail } from '@/api/custom'
import { timeFormat } from '@/utils/util'
import { apiQuotationDetailLists } from '@/api/quotation_detail'
import type { PropType } from 'vue'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -105,25 +129,50 @@ defineProps({
const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const quotationList = ref([])
const datas = reactive({
provinceOptions: [],
cityOptions: [],
areaOptions: [],
});
const pager = reactive({
page_size: 10,
page_no: 1,
quotation_id: ""
})
//
const handleSizeChange = (val: number) => {
pager.page_size = val
quotationlist()
}
//
const handleCurrentChange = (val: number) => {
console.log(`current page: ${val}`)
pager.page_no = val
quotationlist()
}
const total = ref(0)
//
const formData = reactive({
})
//
const quotationlist = () => {
apiQuotationDetailLists(pager).then((res) => {
quotationList.value = res.lists
total.value = res.count
})
}
//
const setFormData = async (data: Record<any, any>) => {
pager.quotation_id = data.id
Object.assign(formData, data)
quotationlist()
}