From 6ee9616fe1a3c2038d14dc3d7d2f1b27f9440ac6 Mon Sep 17 00:00:00 2001
From: gongzeliang <447196008@qq.com>
Date: Sun, 17 Mar 2024 01:14:37 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=88=E5=90=8C=EF=BC=8C?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E5=8F=91=E7=A5=A8=E5=9B=9E=E9=80=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/bs/contractType.js | 10 +++
src/api/bs/project.js | 53 +++++++++++++++
src/views/company/claim/index.vue | 15 ++++-
src/views/contract/custom/index.vue | 83 ++++++++++++++++-------
src/views/contract/supplier/index.vue | 95 ++++++++++++++++++++-------
5 files changed, 205 insertions(+), 51 deletions(-)
create mode 100644 src/api/bs/contractType.js
create mode 100644 src/api/bs/project.js
diff --git a/src/api/bs/contractType.js b/src/api/bs/contractType.js
new file mode 100644
index 0000000..c79d254
--- /dev/null
+++ b/src/api/bs/contractType.js
@@ -0,0 +1,10 @@
+import request from '@/plugin/axios'
+
+// 创建预算管理
+export function getCustomerContractTypeListAll(query) {
+ return request({
+ url: '/bs/contract-type/listAll',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/src/api/bs/project.js b/src/api/bs/project.js
new file mode 100644
index 0000000..41eb353
--- /dev/null
+++ b/src/api/bs/project.js
@@ -0,0 +1,53 @@
+import request from '@/plugin/axios'
+// 创建项目管理
+export function createProject(data) {
+ return request({
+ url: '/bs/project/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新项目管理
+export function updateProject(data) {
+ return request({
+ url: '/bs/project/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除项目管理
+export function deleteProject(id) {
+ return request({
+ url: '/bs/project/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得项目管理
+export function getProject(id) {
+ return request({
+ url: '/bs/project/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得项目管理分页
+export function getProjectPage(query) {
+ return request({
+ url: '/bs/project/page',
+ method: 'get',
+ params: query
+ })
+}
+
+// 导出项目管理 Excel
+export function exportProjectExcel(query) {
+ return request({
+ url: '/bs/project/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/src/views/company/claim/index.vue b/src/views/company/claim/index.vue
index 4b034b1..dd5dd31 100644
--- a/src/views/company/claim/index.vue
+++ b/src/views/company/claim/index.vue
@@ -569,15 +569,15 @@ export default {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', false)
- this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看')
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr))
+ this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', this.totalName(arr))
},
handleConfirmIe1(arr, nIndex) {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimDetails[nIndex], 'show', false)
- this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr))
+ this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', this.totalName(arr))
},
totalCount(obj) {
@@ -590,6 +590,17 @@ export default {
}
return count;
},
+ totalName(obj) {
+ let count = '';
+ for (let key in obj) {
+ if (Array.isArray(obj[key])) {
+ obj[key].forEach(function (item){
+ count = !count?item:count+ `、${item}`
+ })
+ }
+ }
+ return count;
+ },
handleAddAccount(pIndex, index) {
this.form.expenseClaimTrips[pIndex].expenseClaimDetails.push({
diff --git a/src/views/contract/custom/index.vue b/src/views/contract/custom/index.vue
index d23abae..524ee88 100644
--- a/src/views/contract/custom/index.vue
+++ b/src/views/contract/custom/index.vue
@@ -7,15 +7,13 @@
-
-
-
+
+
-
+
+
@@ -27,6 +25,15 @@
+
+
+
+
+
+
+
+
+
@@ -50,11 +57,15 @@
-
+
+
+
+
+
审批流程
@@ -65,7 +76,7 @@
-
+
@@ -82,6 +93,8 @@ import {
listUser,
} from "@/api/system/user";
import { Dialog } from 'vant'
+import {getCustomerContractTypeListAll} from "@/api/bs/contractType";
+import {getProjectPage} from "@/api/bs/project";
export default {
//import引入组件才能使用
name: 'contract-custom',
@@ -129,6 +142,8 @@ export default {
isRereset: false,
VerifyFunc,
typeList: [],
+ projectList:[],
+ capitalSource:[],
signatoryList: [],
departmentList: [],
dayjs,
@@ -508,34 +523,52 @@ export default {
this.supplierList = res.data.list || []
console.log('supplierList...', this.supplierList);
})
+ getCustomerContractTypeListAll({
+ type: 1
+ }).then((res) => {
+ this.typeList = res.data || []
+ })
+ getProjectPage({type:1,pageNo: 1,
+ pageSize: 500}).then(res=>{
+ this.projectList = res.data.list || []
+ })
listData({
pageNo: 1,
- pageSize: this.$store.getters.requestPageSize,
- dictType: 'supplier_ct_type',
+ pageSize: 50,
+ dictType: "capital_source",
}).then((res) => {
- // 出差类型
- this.typeList = res.data.list || []
- })
+ this.capitalSource = res.data.list || [];
+ });
},
- handleDateShow() {
+ handleDateShow(dateType) {
if (this.disabled) return
+ this.dateType = dateType
this.$nextTick(() => {
+ let date = dateType == 'dateSigning'?this.form.dateSigning:dateType=='proposerTime'?this.form.proposerTime:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:''
this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
this.dateShow = true
- if (this.form.startTime && this.form.endTime) {
- this.defaultDate = [dayjs(this.form.startTime).toDate(), dayjs(this.form.endTime).toDate()]
+ if (date) {
+ let time = dayjs(Number(date)).format('YYYY/MM/DD');
+ this.defaultDate = new Date(time)
}
})
},
- handleDateSelect(list) {
- if (list && list.length) {
- this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`)
- this.$set(this.form, 'startTime', dayjs(list[0]).valueOf())
- this.$set(this.form, 'endTime', dayjs(list[1]).valueOf())
- } else {
- this.$set(this.form, 'time', null)
- this.$set(this.form, 'startTime', null)
- this.$set(this.form, 'endTime', null)
+ handleDateSelect(val) {
+ if(this.dateType == 'dateSigning'){
+ this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
+ }
+ if(this.dateType == 'proposerTime'){
+ this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`)
+ }
+ if(this.dateType == 'startTime'){
+ this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
+ }
+ if(this.dateType == 'endTime'){
+ this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
}
this.dateShow = false
},
diff --git a/src/views/contract/supplier/index.vue b/src/views/contract/supplier/index.vue
index a027d06..d766d90 100644
--- a/src/views/contract/supplier/index.vue
+++ b/src/views/contract/supplier/index.vue
@@ -7,12 +7,15 @@
-
-
+
+
+
+
-
+
+
@@ -24,7 +27,14 @@
-
+
+
+
+
+
+
+
+
附件
@@ -47,11 +57,15 @@
-
+
+
+
+
+
审批流程
@@ -61,7 +75,7 @@
-
+
@@ -79,6 +93,8 @@ import { Dialog } from 'vant'
import {
listUser,
} from "@/api/system/user";
+import { getCustomerContractTypeListAll } from '@/api/bs/contractType'
+import {getProjectPage} from "@/api/bs/project";
export default {
//import引入组件才能使用
name: 'contract-supplier',
@@ -129,6 +145,8 @@ export default {
isRereset: false,
VerifyFunc,
typeList: [],
+ capitalSource:[],
+ projectList:[],
signatoryList: [],
departmentList: [],
dayjs,
@@ -156,7 +174,8 @@ export default {
dealContent: null,
other: null,
},
- oaReimburseFeeitemList: []
+ oaReimburseFeeitemList: [],
+ dateType:''
};
},
@@ -501,23 +520,34 @@ export default {
this.supplierList = res.data.list || []
resolve()
})
+ getCustomerContractTypeListAll({
+ type: 2
+ }).then((res) => {
+ this.typeList = res.data || []
+ })
+ getProjectPage({type:2,pageNo: 1,
+ pageSize: 500}).then(res=>{
+ this.projectList = res.data.list || []
+ })
listData({
pageNo: 1,
- pageSize: this.$store.getters.requestPageSize,
- dictType: 'supplier_ct_type',
+ pageSize: 50,
+ dictType: "capital_source",
}).then((res) => {
- // 出差类型
- this.typeList = res.data.list || []
- })
+ this.capitalSource = res.data.list || [];
+ });
})
},
- handleDateShow() {
+ handleDateShow(dateType) {
if (this.disabled) return
+ this.dateType = dateType
this.$nextTick(() => {
+ let date = dateType == 'dateSigning'?this.form.dateSigning:dateType=='proposerTime'?this.form.proposerTime:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:''
this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
this.dateShow = true
- if (this.form.startTime && this.form.endTime) {
- this.defaultDate = [dayjs(this.form.startTime).toDate(), dayjs(this.form.endTime).toDate()]
+ if (date) {
+ let time = dayjs(Number(date)).format('YYYY/MM/DD');
+ this.defaultDate = new Date(time)
}
})
},
@@ -532,16 +562,33 @@ export default {
}
})
},
- handleDateSelect(list) {
- if (list && list.length) {
- this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`)
- this.$set(this.form, 'startTime', dayjs(list[0]).valueOf())
- this.$set(this.form, 'endTime', dayjs(list[1]).valueOf())
- } else {
- this.$set(this.form, 'time', null)
- this.$set(this.form, 'startTime', null)
- this.$set(this.form, 'endTime', null)
+ handleDateSelect(val) {
+ if(this.dateType == 'dateSigning'){
+ this.$set(this.form, 'dateSigning1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'dateSigning', `${dayjs(val).valueOf()}`)
+ }
+ if(this.dateType == 'proposerTime'){
+ this.$set(this.form, 'proposerTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'proposerTime', `${dayjs(val).valueOf()}`)
+ }
+ if(this.dateType == 'startTime'){
+ this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
}
+ if(this.dateType == 'endTime'){
+ this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
+ this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
+ }
+
+ // if (list && list.length) {
+ // this.$set(this.form, 'time', `${dayjs(list[0]).format('YY/MM/DD')}~${dayjs(list[1]).format('YY/MM/DD')}`)
+ // this.$set(this.form, 'startTime', dayjs(list[0]).valueOf())
+ // this.$set(this.form, 'endTime', dayjs(list[1]).valueOf())
+ // } else {
+ // this.$set(this.form, 'time', null)
+ // this.$set(this.form, 'startTime', null)
+ // this.$set(this.form, 'endTime', null)
+ // }
this.dateShow = false
},
handlePlanDateSelect(date) {