diff --git a/src/components/biddingDecision/index.vue b/src/components/biddingDecision/index.vue index 224040c..062b76f 100644 --- a/src/components/biddingDecision/index.vue +++ b/src/components/biddingDecision/index.vue @@ -30,7 +30,7 @@ -
+
@@ -41,11 +41,18 @@ import { usePaging } from "@/hooks/usePaging" import { useDictData } from "@/hooks/useDictOptions" import { apiBidBiddingDecisionLists } from '@/api/bid_bidding_decision' -import { defineEmits } from "vue" +import { defineEmits, defineProps } from "vue" + +const props = defineProps({ + project_id: Number +}) + // 查询条件 const queryParams = reactive({ - custom_name: '' + custom_name: '', + project_id: props.project_id + }); // 获取字典数据 diff --git a/src/components/reviewprocess/index.vue b/src/components/reviewprocess/index.vue index 089a00d..fce28c9 100644 --- a/src/components/reviewprocess/index.vue +++ b/src/components/reviewprocess/index.vue @@ -65,7 +65,8 @@
{{ i }}
-
+
{{ items.name }}
{{ items.admin_num }}
@@ -102,7 +103,8 @@
-
+
{{ item.name }}
{{ item.admin_num }}
@@ -216,7 +218,6 @@ const getlist = () => { //获取所有部门 const deparmet = () => { getAllDept().then((res) => { - console.log(res) Object.assign(deparmetlist, res) }) } @@ -236,7 +237,6 @@ const deparmetclck = (item: { id: any }) => { const Jobs = () => { getAllJobs().then((res) => { - console.log(res) Object.assign(jobslist, res) }) } diff --git a/src/utils/util.ts b/src/utils/util.ts index d2e1959..fd9cdcc 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -253,3 +253,97 @@ export const toChinesNum = (money: any) => { } return chineseStr } + + +// 转换每个小节的函数 +function convertSection(section) { + const cnNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"]; + const cnIntUnits = ["", "拾", "佰", "仟"]; + + + let sectionStr = ""; + let unitPos = 0; // 记录当前位置的单位 + let zero = true; // 连续的零 + + while (section > 0) { + let num = section % 10; + if (num === 0) { + if (!zero) { + zero = true; + sectionStr = cnNums[num] + sectionStr; + } + } else { + zero = false; + sectionStr = cnNums[num] + cnIntUnits[unitPos] + sectionStr; + } + + section = Math.floor(section / 10); + unitPos++; + } + + return sectionStr; + } + +/** + * 将数字人民币转成中文大写 + * @params num + */ + +export const convertToChinese = (num: any) => { + const cnNums = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"]; + const cnIntUnits = ["", "拾", "佰", "仟"]; + const cnDecUnits = ["角", "分"]; + const cnInteger = "整"; + const cnIntLast = "元"; + const cnIntWan = "万"; + const cnIntYi = "亿"; + + let integerNum = Math.floor(num); // 整数部分 + let decimalNum = Math.round((num - integerNum) * 100); // 小数部分 + let cnIntStr = ""; // 中文整数字符串 + let cnDecStr = ""; // 中文小数字符串 + + // 处理亿位 + let yuan = Math.floor(integerNum / 100000000); + if (yuan > 0) { + cnIntStr += convertSection(yuan) + cnIntYi; + integerNum %= 100000000; + } + + // 处理万位 + let wan = Math.floor(integerNum / 10000); + if (wan > 0) { + cnIntStr += convertSection(wan) + cnIntWan; + integerNum %= 10000; + } + + // 处理其他部分 + if (integerNum === 0) { + cnIntStr += cnNums[0]; + } else { + cnIntStr += convertSection(integerNum); + } + + // 处理小数部分 + if (decimalNum === 0) { + cnDecStr = cnInteger; + } else { + let decIndex = 0; + while (decimalNum > 0 && decIndex < cnDecUnits.length) { + let num = decimalNum % 10; + if (num !== 0) { + cnDecStr += cnNums[num] + cnDecUnits[decIndex]; + } + decimalNum = Math.floor(decimalNum / 10); + decIndex++; + } + } + + return cnIntStr + cnIntLast + cnDecStr; +} + + + + + + \ No newline at end of file diff --git a/src/views/bid_buy_bidding_document/edit.vue b/src/views/bid_buy_bidding_document/edit.vue index 69a9a35..3f0d624 100644 --- a/src/views/bid_buy_bidding_document/edit.vue +++ b/src/views/bid_buy_bidding_document/edit.vue @@ -38,6 +38,12 @@ :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]"> + + + + + @@ -62,7 +68,7 @@ + value-format="YYYY-MM-DD" placeholder="选择购买标书时间"> @@ -122,6 +128,11 @@ + + + + +
@@ -130,6 +141,7 @@ import type { FormInstance } from 'element-plus' import reviewprocess from '@/components/reviewprocess/index.vue' import Popup from '@/components/popup/index.vue' import personnelselector from '@/components/personnelselector/index.vue' +import biddingDecisionSelector from '@/components/biddingDecision/index.vue' import projectTable from "@/components/biddingDecision/index.vue" import { apiBidBuyBiddingDocumentAdd, apiBidBuyBiddingDocumentDetail } from '@/api/bid_buy_bidding_document' @@ -156,29 +168,9 @@ import { getAll } from '@/api/org/organization' import configs from "@/config" const base_url = configs.baseUrl + configs.urlPrefix import useUserStore from "@/stores/modules/user"; -const userStore = useUserStore(); -const formDataannex = reactive([]) const showDialog = ref(false) +const showDialog2 = ref(false) const buyer_name = ref('') -// // 上传文件 -// const handleAvatarSuccess_four = ( -// response, -// uploadFile -// ) => { -// if (response.code == 0) { -// ElMessage.error(response.msg); -// return; -// } -// formDataannex.push( -// { uri: response.data.uri, name: response.data.name } - -// ); -// }; -// // 删除上传的文件 -// const delFileFn = (index: number) => { -// formDataannex.splice(index, 1) -// } - // 弹窗标题 const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑购买标书' : '新增购买标书' @@ -186,18 +178,18 @@ const popupTitle = computed(() => { // 表单数据 const formData = reactive({ - id: '', - dept_id: '', - org_id: '', - project_id: '', - bid_decision_id: '', - bid_document_no: '', - invite_tenders_company_name: '', - bid_company_name: '', - buyer: '', - amount: '', - buy_date: '', - bid_address: '', + "org_id": 0, + "dept_id": 0, + "project_id": 0, + "bid_decision_id": 0, + bid_decision_code: "", + "bid_document_no": "", + "invite_tenders_company_name": "", + "bid_company_name": "", + "buyer": "", + "amount": 0, + "buy_date": 0, + "bid_address": "" }) //打开弹窗 @@ -246,9 +238,6 @@ const getlist1 = (id: any) => { } //获取值 const customEvent = (e: any) => { - - console.log(e, 'e') - formData.project_id = e.project_id; matsname.value = e.custom_name project_name.value = e.project_name @@ -256,6 +245,13 @@ const customEvent = (e: any) => { showDialog.value = false; }; +const customEvent2 = (e: any) => { + console.log(e, 'e') + formData.bid_document_no = e.code; + formData.bid_decision_id = e.id; + showDialog2.value = false; +}; + // 获取详情 const setFormData = async (data: Record) => { matsname.value = data.project.person diff --git a/src/views/custom_service/edit.vue b/src/views/custom_service/edit.vue index 8f2fb10..3e34485 100644 --- a/src/views/custom_service/edit.vue +++ b/src/views/custom_service/edit.vue @@ -26,13 +26,13 @@ - + - - + + - + 详情 diff --git a/src/views/project/components/Collection.vue b/src/views/project/components/Collection.vue index 5e08c7c..9cc5a9c 100644 --- a/src/views/project/components/Collection.vue +++ b/src/views/project/components/Collection.vue @@ -1,5 +1,8 @@ @@ -8,29 +11,80 @@ import { ref, reactive, defineProps } from "vue" import myTable from "./myTable.vue" -import { subpackagdetailLists } from '@/api/project_subpackage_budget_detail' +import { apiinvoiceapplyLists } from '@/api/InvoicingRequests' +import { apireturnedLists } from '@/api/remittance' +import { apireturnedrecordLists } from '@/api/recordsPayment' +import { apirefundapplyLists } from '@/api/refund' const props = defineProps({ project_id: Number }) const baseData = reactive({ - fetchFun: subpackagdetailLists, - tit: "竞争对手", + fetchFun: apiinvoiceapplyLists, + tit: "开票记录", queryParams: { project_id: props.project_id }, - columnList: [ - { label: '工作类型', prop: 'work_type' }, - { label: '工作内容', prop: 'work_content' }, - { label: '项目特征', prop: 'project_features' }, - { label: '单位', prop: 'unit' }, - { label: '预算工作量', prop: 'num' }, - { label: '单价', prop: 'price' }, + { label: '开票单号', prop: 'invoicing_code' }, + { label: '合同编号', prop: 'contract_code' }, + { label: '合同名称', prop: 'contract_name' }, + { label: '开票日期', prop: 'invoicing_date' }, + { label: '期次', prop: 'period' }, + { label: '发票类型', prop: 'invoice_type' }, + { label: '发票编号', prop: 'tax' }, + { label: '开票金额(含税)', prop: 'amount_including_tax' }, + { label: '税率', prop: 'tax_rate' }, + { label: '税额', prop: 'tax_amount' }, + + ] +}) +const baseData1 = reactive({ + fetchFun: apireturnedLists, + tit: "回款计划", + queryParams: { project_id: props.project_id }, + columnList: [ + { label: '合同编号', prop: 'contract_code' }, + { label: '合同名称', prop: 'contract_name' }, + { label: '期次', prop: 'period' }, + { label: '计划日期', prop: 'return_date' }, + { label: '状态', prop: 'return_status' }, { label: '金额', prop: 'amount' }, - { label: '已分包量', prop: 'has_subcontract_num' }, - { label: '剩余工作量', prop: 'residue_num' }, + { label: '已回款', prop: 'has_return_amount' }, + { label: '未回款', prop: 'not_return_amount' }, + + ] }) +const baseData2 = reactive({ + fetchFun: apireturnedrecordLists, + tit: "回款记录", + queryParams: { project_id: props.project_id }, + columnList: [ + { label: '合同名称', prop: 'contract_name' }, + { label: '合同编号', prop: 'contract_code' }, + { label: '期次', prop: 'period' }, + { label: '日期', prop: 'return_date' }, + { label: '金额', prop: 'amount' }, + { label: '收款人', prop: 'receiver' }, + + + ] +}) +const baseData3 = reactive({ + fetchFun: apirefundapplyLists, + tit: "退款记录", + queryParams: { project_id: props.project_id }, + columnList: [ + { label: '退款单号', prop: 'refund_code' }, + { label: '合同编号', prop: 'contract_code' }, + { label: '合同名称', prop: 'contract_name' }, + { label: '退款日期', prop: 'refund_date' }, + { label: '退款原因', prop: 'reason' }, + { label: '退款方式', prop: 'refund_type' }, + { label: '退款金额', prop: 'amount' }, + { label: '备注', prop: 'remark' }, + ] +}) \ No newline at end of file diff --git a/src/views/project/components/documentation.vue b/src/views/project/components/documentation.vue new file mode 100644 index 0000000..c73c9ce --- /dev/null +++ b/src/views/project/components/documentation.vue @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/src/views/project/components/payment.vue b/src/views/project/components/payment.vue new file mode 100644 index 0000000..1032011 --- /dev/null +++ b/src/views/project/components/payment.vue @@ -0,0 +1,89 @@ + + + + + \ No newline at end of file diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue index c11f13c..88b744e 100644 --- a/src/views/project/detail.vue +++ b/src/views/project/detail.vue @@ -36,187 +36,18 @@ - - + + + + -