Commit 00776e383d1662208e6a4066362aa7f98650edca
1 parent
0e1702ec
修改权限
Showing
28 changed files
with
193 additions
and
134 deletions
src/api/project/approve.ts
@@ -30,7 +30,6 @@ export const getWaitListApi = async (params: DemoParams) => { | @@ -30,7 +30,6 @@ export const getWaitListApi = async (params: DemoParams) => { | ||
30 | res.records = res.records.map((item) => { | 30 | res.records = res.records.map((item) => { |
31 | return item; | 31 | return item; |
32 | }); | 32 | }); |
33 | - console.log(res.records, 5656565656); | ||
34 | return new Promise((resolve) => { | 33 | return new Promise((resolve) => { |
35 | resolve({ items: res.records, total: res.total }); | 34 | resolve({ items: res.records, total: res.total }); |
36 | }); | 35 | }); |
src/api/project/order.ts
@@ -195,7 +195,6 @@ export const orderExport = async (data: any = {}) => { | @@ -195,7 +195,6 @@ export const orderExport = async (data: any = {}) => { | ||
195 | a.download = `${strArr.join('_')} ${date}.xlsx`; // 你可以为文件命名 | 195 | a.download = `${strArr.join('_')} ${date}.xlsx`; // 你可以为文件命名 |
196 | document.body.appendChild(a); | 196 | document.body.appendChild(a); |
197 | a.click(); // 模拟点击操作来下载文件 | 197 | a.click(); // 模拟点击操作来下载文件 |
198 | - console.log(a, '5656a'); | ||
199 | URL.revokeObjectURL(downloadUrl); // 释放掉 blob 对象所占用的内存 | 198 | URL.revokeObjectURL(downloadUrl); // 释放掉 blob 对象所占用的内存 |
200 | document.body.removeChild(a); | 199 | document.body.removeChild(a); |
201 | 200 |
src/router/routes/modules/project/finance.ts
@@ -13,7 +13,13 @@ const finance: AppRouteModule = { | @@ -13,7 +13,13 @@ const finance: AppRouteModule = { | ||
13 | orderNo: 3, | 13 | orderNo: 3, |
14 | icon: 'ant-design:pay-circle-outlined', | 14 | icon: 'ant-design:pay-circle-outlined', |
15 | title: '财务管理', | 15 | title: '财务管理', |
16 | - roles: [RoleEnum.ADMIN, RoleEnum.FINANCE], | 16 | + roles: [ |
17 | + RoleEnum.ADMIN, | ||
18 | + RoleEnum.FINANCE, | ||
19 | + RoleEnum.TRACKER, | ||
20 | + RoleEnum.BUSINESS, | ||
21 | + RoleEnum.PRODUCE, | ||
22 | + ], | ||
17 | }, | 23 | }, |
18 | children: [ | 24 | children: [ |
19 | { | 25 | { |
@@ -21,7 +27,7 @@ const finance: AppRouteModule = { | @@ -21,7 +27,7 @@ const finance: AppRouteModule = { | ||
21 | name: 'Receive', | 27 | name: 'Receive', |
22 | meta: { | 28 | meta: { |
23 | title: '应收款', | 29 | title: '应收款', |
24 | - // roles: [RoleEnum.ADMIN], | 30 | + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS], |
25 | ignoreKeepAlive: false, | 31 | ignoreKeepAlive: false, |
26 | }, | 32 | }, |
27 | component: () => import('/@/views/project/finance/receive/index.vue'), | 33 | component: () => import('/@/views/project/finance/receive/index.vue'), |
@@ -32,6 +38,14 @@ const finance: AppRouteModule = { | @@ -32,6 +38,14 @@ const finance: AppRouteModule = { | ||
32 | meta: { | 38 | meta: { |
33 | title: '应付款', | 39 | title: '应付款', |
34 | ignoreKeepAlive: true, | 40 | ignoreKeepAlive: true, |
41 | + roles: [ | ||
42 | + RoleEnum.ADMIN, | ||
43 | + RoleEnum.FINANCE, | ||
44 | + RoleEnum.TRACKER, | ||
45 | + RoleEnum.BUSINESS, | ||
46 | + RoleEnum.PRODUCE, | ||
47 | + RoleEnum.DATA_REPORT_USER, | ||
48 | + ], | ||
35 | }, | 49 | }, |
36 | component: () => import('/@/views/project/finance/pay/index.vue'), | 50 | component: () => import('/@/views/project/finance/pay/index.vue'), |
37 | }, | 51 | }, |
src/views/dashboard/analysis/components/GrowCard.vue
@@ -75,7 +75,6 @@ | @@ -75,7 +75,6 @@ | ||
75 | ); | 75 | ); |
76 | const growCardList = computed(() => { | 76 | const growCardList = computed(() => { |
77 | const data = dataStore.getData; | 77 | const data = dataStore.getData; |
78 | - console.log(data1.value, '5656data1.value'); | ||
79 | return [ | 78 | return [ |
80 | { | 79 | { |
81 | title: '订单完成', | 80 | title: '订单完成', |
@@ -131,7 +130,6 @@ | @@ -131,7 +130,6 @@ | ||
131 | dateTime: dateTime.value, | 130 | dateTime: dateTime.value, |
132 | period: period.value, | 131 | period: period.value, |
133 | }); | 132 | }); |
134 | - console.log(data1.value, '56565656'); | ||
135 | data2.value = await getSalesData({ | 133 | data2.value = await getSalesData({ |
136 | businessPersonIn: businessPersonIn.value, | 134 | businessPersonIn: businessPersonIn.value, |
137 | customerCodeIn: customerCodeIn.value, | 135 | customerCodeIn: customerCodeIn.value, |
src/views/dashboard/analysis/components/VisitAnalysisBar.vue
@@ -79,7 +79,6 @@ | @@ -79,7 +79,6 @@ | ||
79 | return user?.roleSmallVO?.code; | 79 | return user?.roleSmallVO?.code; |
80 | }); | 80 | }); |
81 | const orderStore = useOrderStoreWithOut(); | 81 | const orderStore = useOrderStoreWithOut(); |
82 | - console.log(orderStore, '5656order'); | ||
83 | onMounted(async () => { | 82 | onMounted(async () => { |
84 | await orderStore.getDict(); | 83 | await orderStore.getDict(); |
85 | }); | 84 | }); |
@@ -99,7 +98,7 @@ | @@ -99,7 +98,7 @@ | ||
99 | businessPersonInChange.length = 0; // 也可以使用 array.splice(0, array.length); | 98 | businessPersonInChange.length = 0; // 也可以使用 array.splice(0, array.length); |
100 | businessPersonInChange.push(value); | 99 | businessPersonInChange.push(value); |
101 | } | 100 | } |
102 | - console.log(`5656selected ${businessPersonInChange}`); | 101 | + // console.log(`5656selected ${businessPersonInChange}`); |
103 | }; | 102 | }; |
104 | const handleChangeCustomer = (value: string) => { | 103 | const handleChangeCustomer = (value: string) => { |
105 | if (customerCodeInChange.length === 0) { | 104 | if (customerCodeInChange.length === 0) { |
@@ -110,14 +109,10 @@ | @@ -110,14 +109,10 @@ | ||
110 | customerCodeInChange.length = 0; // 也可以使用 array.splice(0, array.length); | 109 | customerCodeInChange.length = 0; // 也可以使用 array.splice(0, array.length); |
111 | customerCodeInChange.push(value); | 110 | customerCodeInChange.push(value); |
112 | } | 111 | } |
113 | - console.log(`5656selected ${customerCodeInChange}`); | ||
114 | - }; | ||
115 | - const handleBlur = () => { | ||
116 | - console.log('5656blur'); | ||
117 | - }; | ||
118 | - const handleFocus = () => { | ||
119 | - console.log('5656focus'); | 112 | + // console.log(`5656selected ${customerCodeInChange}`); |
120 | }; | 113 | }; |
114 | + const handleBlur = () => {}; | ||
115 | + const handleFocus = () => {}; | ||
121 | const filterOption = (input: string, option: any) => { | 116 | const filterOption = (input: string, option: any) => { |
122 | return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0; | 117 | return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0; |
123 | }; | 118 | }; |
@@ -151,13 +146,11 @@ | @@ -151,13 +146,11 @@ | ||
151 | 146 | ||
152 | watchEffect(async () => { | 147 | watchEffect(async () => { |
153 | // const data1 = dataStore?.getCustomerChartData1 || {}; | 148 | // const data1 = dataStore?.getCustomerChartData1 || {}; |
154 | - console.log(periodChange.value, '56565656periodChange'); | ||
155 | const data2 = await getCustomerSalesData({ | 149 | const data2 = await getCustomerSalesData({ |
156 | businessPersonIn: businessPersonIn.value, | 150 | businessPersonIn: businessPersonIn.value, |
157 | customerCodeIn: customerCodeIn.value, | 151 | customerCodeIn: customerCodeIn.value, |
158 | period: periodChange.value, | 152 | period: periodChange.value, |
159 | }); | 153 | }); |
160 | - console.log(data2, '5656data2'); | ||
161 | const x = [], | 154 | const x = [], |
162 | y = [], | 155 | y = [], |
163 | z = []; | 156 | z = []; |
src/views/project/approve/PayPanel.vue
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | <!-- :showFooter="!isApproved && role === ROLE.ADMIN" --> | 37 | <!-- :showFooter="!isApproved && role === ROLE.ADMIN" --> |
38 | 38 | ||
39 | <BasicModal | 39 | <BasicModal |
40 | - :formFooter="!isApproved && role === ROLE.ADMIN" | 40 | + :formFooter="(!isApproved && role === ROLE.ADMIN) || showInvoice" |
41 | @register="registerModal" | 41 | @register="registerModal" |
42 | title="申请信息" | 42 | title="申请信息" |
43 | okText="通过" | 43 | okText="通过" |
@@ -112,8 +112,18 @@ | @@ -112,8 +112,18 @@ | ||
112 | </template> | 112 | </template> |
113 | </a-list> --> | 113 | </a-list> --> |
114 | <template #appendFooter> | 114 | <template #appendFooter> |
115 | - <a-button v-if="!isApproved && role === ROLE.ADMIN" @click="handleFalse"> 不通过</a-button> | ||
116 | - <a-button v-if="isApproved && role === ROLE.ADMIN" @click="handleFalse"> 驳回重填</a-button> | 115 | + <a-button |
116 | + v-if="(!isApproved && role === ROLE.ADMIN) || (!isApproved && showInvoice)" | ||
117 | + @click="handleFalse" | ||
118 | + > | ||
119 | + 不通过</a-button | ||
120 | + > | ||
121 | + <a-button | ||
122 | + v-if="(isApproved && role === ROLE.ADMIN) || (isApproved && showInvoice)" | ||
123 | + @click="handleFalse" | ||
124 | + > | ||
125 | + 驳回重填</a-button | ||
126 | + > | ||
117 | <a-button @click="handleExport"> 导出</a-button> | 127 | <a-button @click="handleExport"> 导出</a-button> |
118 | </template> | 128 | </template> |
119 | </BasicModal> | 129 | </BasicModal> |
@@ -307,7 +317,6 @@ | @@ -307,7 +317,6 @@ | ||
307 | } | 317 | } |
308 | } | 318 | } |
309 | function handleEdit(record, e) { | 319 | function handleEdit(record, e) { |
310 | - // console.log(record, '56565re'); | ||
311 | e?.stopPropagation(); | 320 | e?.stopPropagation(); |
312 | return false; | 321 | return false; |
313 | } | 322 | } |
@@ -323,7 +332,6 @@ | @@ -323,7 +332,6 @@ | ||
323 | id.value = data.id; | 332 | id.value = data.id; |
324 | itemArray.value = []; | 333 | itemArray.value = []; |
325 | mockData.value = data.fieldInfos.checkBillOrderDO; | 334 | mockData.value = data.fieldInfos.checkBillOrderDO; |
326 | - console.log(mockData, '5656mockdata'); | ||
327 | actualPayCalculate.value = mockData.value.actualPayCalculate?.toFixed(2); // 实际付款金额计算 | 335 | actualPayCalculate.value = mockData.value.actualPayCalculate?.toFixed(2); // 实际付款金额计算 |
328 | checkNo.value = mockData.value.checkNo; // 对账单号 | 336 | checkNo.value = mockData.value.checkNo; // 对账单号 |
329 | actualPayedAmount.value = mockData.value.actualPayedAmount?.toFixed(2); // 实际应付金额 | 337 | actualPayedAmount.value = mockData.value.actualPayedAmount?.toFixed(2); // 实际应付金额 |
@@ -396,7 +404,6 @@ | @@ -396,7 +404,6 @@ | ||
396 | link.download = `付款单${date}.xlsx`; // 你可以为文件命名 | 404 | link.download = `付款单${date}.xlsx`; // 你可以为文件命名 |
397 | document.body.appendChild(link); | 405 | document.body.appendChild(link); |
398 | link.click(); // 自动点击链接,触发下载 | 406 | link.click(); // 自动点击链接,触发下载 |
399 | - console.log(link, 5656); | ||
400 | document.body.removeChild(link); // 下载完成后移除链接 | 407 | document.body.removeChild(link); // 下载完成后移除链接 |
401 | }) | 408 | }) |
402 | .catch((error) => { | 409 | .catch((error) => { |
@@ -404,20 +411,6 @@ | @@ -404,20 +411,6 @@ | ||
404 | }); | 411 | }); |
405 | closeModal(); | 412 | closeModal(); |
406 | } | 413 | } |
407 | - // async function handleExport() { | ||
408 | - // const res = await getExportReceipt({ | ||
409 | - // checkNo: checkNo.value, | ||
410 | - // actualPayedAmount: actualPayedAmount.value, | ||
411 | - // deductAmount: deductAmount.value, | ||
412 | - // totalActualPayedAmount: totalActualPayedAmount.value, | ||
413 | - // unPayedAmount: unPayedAmount.value, | ||
414 | - // payedDate: payedDate.value, | ||
415 | - // actualPayedDate: actualPayedDate.value, | ||
416 | - // }); | ||
417 | - // console.log(res, '5656res'); | ||
418 | - // closeModal(); | ||
419 | - // } | ||
420 | - | ||
421 | const role = computed(() => { | 414 | const role = computed(() => { |
422 | return userStore.getUserInfo?.roleSmallVO?.code; | 415 | return userStore.getUserInfo?.roleSmallVO?.code; |
423 | }); | 416 | }); |
src/views/project/approve/ReceivePanel.vue
@@ -344,7 +344,6 @@ | @@ -344,7 +344,6 @@ | ||
344 | // 定义处理导出的函数 | 344 | // 定义处理导出的函数 |
345 | const handleExport = async () => { | 345 | const handleExport = async () => { |
346 | try { | 346 | try { |
347 | - console.log(payee.value, '5656payee.value'); | ||
348 | const response = await axios.post( | 347 | const response = await axios.post( |
349 | '/basic-api/order/erp/invoice_bill/exportReceipt', | 348 | '/basic-api/order/erp/invoice_bill/exportReceipt', |
350 | { | 349 | { |
src/views/project/approve/index.vue
1 | <template> | 1 | <template> |
2 | <div className="approve-page px-4 bg-white"> | 2 | <div className="approve-page px-4 bg-white"> |
3 | - <a-tabs default-active-key="1" v-model:activeKey="currentKey"> | ||
4 | - <a-tab-pane key="1" tab="字段待审核"> | 3 | + <a-tabs :default-active-key="role === ROLE.FINANCE ? '7' : '1'" v-model:activeKey="currentKey"> |
4 | + <a-tab-pane key="1" tab="字段待审核" v-if="role !== ROLE.FINANCE"> | ||
5 | <FieldPanel /> | 5 | <FieldPanel /> |
6 | </a-tab-pane> | 6 | </a-tab-pane> |
7 | - <a-tab-pane key="3" tab="利润分析待审核"> | 7 | + <a-tab-pane key="3" tab="利润分析待审核" v-if="role !== ROLE.FINANCE"> |
8 | <ProfitPanel /> | 8 | <ProfitPanel /> |
9 | </a-tab-pane> | 9 | </a-tab-pane> |
10 | - <a-tab-pane key="5" tab="项目报告书待审核"> | 10 | + <a-tab-pane key="5" tab="项目报告书待审核" v-if="role !== ROLE.FINANCE"> |
11 | <ReportPanel /> | 11 | <ReportPanel /> |
12 | </a-tab-pane> | 12 | </a-tab-pane> |
13 | - <a-tab-pane key="7" tab="应收款待审核"> | 13 | + <a-tab-pane key="7" tab="应收款待审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"> |
14 | <ReceivePanel /> | 14 | <ReceivePanel /> |
15 | </a-tab-pane> | 15 | </a-tab-pane> |
16 | - <a-tab-pane key="9" tab="应付款待审核"> | 16 | + <a-tab-pane key="9" tab="应付款待审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"> |
17 | <PayPanel /> | 17 | <PayPanel /> |
18 | </a-tab-pane> | 18 | </a-tab-pane> |
19 | - <a-tab-pane key="2" tab="字段已审核"> | 19 | + <a-tab-pane key="2" tab="字段已审核" v-if="role !== ROLE.FINANCE"> |
20 | <FieldPanel isApproved /> | 20 | <FieldPanel isApproved /> |
21 | </a-tab-pane> | 21 | </a-tab-pane> |
22 | - <a-tab-pane key="4" tab="利润分析已审核"> | 22 | + <a-tab-pane key="4" tab="利润分析已审核" v-if="role !== ROLE.FINANCE"> |
23 | <ProfitPanel isApproved /> | 23 | <ProfitPanel isApproved /> |
24 | </a-tab-pane> | 24 | </a-tab-pane> |
25 | - <a-tab-pane key="6" tab="项目报告书已审核"> | 25 | + <a-tab-pane key="6" tab="项目报告书已审核" v-if="role !== ROLE.FINANCE"> |
26 | <ReportPanel isApproved /> | 26 | <ReportPanel isApproved /> |
27 | </a-tab-pane> | 27 | </a-tab-pane> |
28 | - <a-tab-pane key="8" tab="应收款已审核"> | 28 | + <a-tab-pane key="8" tab="应收款已审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"> |
29 | <ReceivePanel isApproved /> | 29 | <ReceivePanel isApproved /> |
30 | </a-tab-pane> | 30 | </a-tab-pane> |
31 | - <a-tab-pane key="10" tab="应付款已审核"> | 31 | + <a-tab-pane key="10" tab="应付款已审核" v-if="role == ROLE.FINANCE || role == ROLE.ADMIN"> |
32 | <PayPanel isApproved /> | 32 | <PayPanel isApproved /> |
33 | </a-tab-pane> | 33 | </a-tab-pane> |
34 | </a-tabs> | 34 | </a-tabs> |
35 | </div> | 35 | </div> |
36 | </template> | 36 | </template> |
37 | <script lang="ts"> | 37 | <script lang="ts"> |
38 | - import { defineComponent, onMounted, ref } from 'vue'; | 38 | + import { computed, defineComponent, onMounted, ref, watchEffect } from 'vue'; |
39 | import { Tabs } from 'ant-design-vue'; | 39 | import { Tabs } from 'ant-design-vue'; |
40 | + import { ROLE } from '../order/type.d'; | ||
40 | import ReportPanel from './ReportPanel.vue'; | 41 | import ReportPanel from './ReportPanel.vue'; |
41 | import ProfitPanel from './ProfitPanel.vue'; | 42 | import ProfitPanel from './ProfitPanel.vue'; |
42 | import FieldPanel from './FieldPanel.vue'; | 43 | import FieldPanel from './FieldPanel.vue'; |
43 | import ReceivePanel from './ReceivePanel.vue'; | 44 | import ReceivePanel from './ReceivePanel.vue'; |
44 | import PayPanel from './PayPanel.vue'; | 45 | import PayPanel from './PayPanel.vue'; |
45 | import { useOrderStoreWithOut } from '/@/store/modules/order'; | 46 | import { useOrderStoreWithOut } from '/@/store/modules/order'; |
47 | + import { useUserStoreWithOut } from '/@/store/modules/user'; | ||
46 | 48 | ||
47 | const orderStore = useOrderStoreWithOut(); | 49 | const orderStore = useOrderStoreWithOut(); |
50 | + const userStore = useUserStoreWithOut(); | ||
51 | + const user = userStore.getUserInfo; | ||
52 | + const role = computed(() => { | ||
53 | + return user?.roleSmallVO?.code; | ||
54 | + }); | ||
48 | 55 | ||
49 | export default defineComponent({ | 56 | export default defineComponent({ |
50 | components: { | 57 | components: { |
@@ -63,10 +70,17 @@ | @@ -63,10 +70,17 @@ | ||
63 | onMounted(async () => { | 70 | onMounted(async () => { |
64 | await orderStore.getDict(); | 71 | await orderStore.getDict(); |
65 | }); | 72 | }); |
73 | + watchEffect(() => { | ||
74 | + if (role.value == ROLE.FINANCE) { | ||
75 | + currentKey.value = '7'; | ||
76 | + } | ||
77 | + }); | ||
66 | 78 | ||
67 | return { | 79 | return { |
68 | checkedKeys, | 80 | checkedKeys, |
69 | currentKey, | 81 | currentKey, |
82 | + role, | ||
83 | + ROLE, | ||
70 | }; | 84 | }; |
71 | }, | 85 | }, |
72 | }); | 86 | }); |
src/views/project/config/ProduCostCreate.vue
@@ -50,7 +50,6 @@ | @@ -50,7 +50,6 @@ | ||
50 | const info = ref(); | 50 | const info = ref(); |
51 | const [register, { setModalProps, closeModal }] = useModalInner(async (data) => { | 51 | const [register, { setModalProps, closeModal }] = useModalInner(async (data) => { |
52 | listAll.value = data; | 52 | listAll.value = data; |
53 | - console.log(listAll.value, '5656modaldata.value'); | ||
54 | }); | 53 | }); |
55 | //获取现有的列表 | 54 | //获取现有的列表 |
56 | const listAll = ref(); | 55 | const listAll = ref(); |
src/views/project/config/ProduCostEdit.vue
@@ -32,7 +32,6 @@ | @@ -32,7 +32,6 @@ | ||
32 | 32 | ||
33 | const [register, { closeDrawer }] = useDrawerInner((data) => { | 33 | const [register, { closeDrawer }] = useDrawerInner((data) => { |
34 | listAll.value = data.data; | 34 | listAll.value = data.data; |
35 | - console.log(listAll.value, '5656listAll.value'); | ||
36 | relationValue.value = JSON.parse(listAll.value.relationValue); | 35 | relationValue.value = JSON.parse(listAll.value.relationValue); |
37 | fixCost.value = relationValue.value[0].relationValue; | 36 | fixCost.value = relationValue.value[0].relationValue; |
38 | ratio.value = relationValue.value[1].relationValue; | 37 | ratio.value = relationValue.value[1].relationValue; |
@@ -47,7 +46,6 @@ | @@ -47,7 +46,6 @@ | ||
47 | async function handleSubmit() { | 46 | async function handleSubmit() { |
48 | relationValue.value[0].relationValue = fixCost.value; | 47 | relationValue.value[0].relationValue = fixCost.value; |
49 | relationValue.value[1].relationValue = ratio.value; | 48 | relationValue.value[1].relationValue = ratio.value; |
50 | - console.log(relationValue.value, '5656relationValue.value'); | ||
51 | await saveConfig({ | 49 | await saveConfig({ |
52 | id: listAll.value.id, | 50 | id: listAll.value.id, |
53 | settingCode: 'customerCode', | 51 | settingCode: 'customerCode', |
src/views/project/config/costCreate.vue
@@ -58,7 +58,6 @@ | @@ -58,7 +58,6 @@ | ||
58 | const info = ref(); | 58 | const info = ref(); |
59 | const [register, { setModalProps, closeModal }] = useModalInner(async (data) => { | 59 | const [register, { setModalProps, closeModal }] = useModalInner(async (data) => { |
60 | listAll.value = data; | 60 | listAll.value = data; |
61 | - console.log(listAll.value, '5656modaldata.value'); | ||
62 | }); | 61 | }); |
63 | //获取现有的列表 | 62 | //获取现有的列表 |
64 | const listAll = ref(); | 63 | const listAll = ref(); |
src/views/project/config/costEdit.vue
@@ -34,7 +34,6 @@ | @@ -34,7 +34,6 @@ | ||
34 | 34 | ||
35 | const [register, { closeDrawer }] = useDrawerInner((data) => { | 35 | const [register, { closeDrawer }] = useDrawerInner((data) => { |
36 | listAll.value = data.data; | 36 | listAll.value = data.data; |
37 | - console.log(listAll.value, '5656listAll.value'); | ||
38 | relationValue.value = JSON.parse(listAll.value.relationValue); | 37 | relationValue.value = JSON.parse(listAll.value.relationValue); |
39 | fixCost.value = relationValue.value[0].relationValue; | 38 | fixCost.value = relationValue.value[0].relationValue; |
40 | ratio.value = relationValue.value[1].relationValue; | 39 | ratio.value = relationValue.value[1].relationValue; |
@@ -52,7 +51,6 @@ | @@ -52,7 +51,6 @@ | ||
52 | relationValue.value[0].relationValue = fixCost.value; | 51 | relationValue.value[0].relationValue = fixCost.value; |
53 | relationValue.value[1].relationValue = ratio.value; | 52 | relationValue.value[1].relationValue = ratio.value; |
54 | relationValue.value[2].relationValue = spainRatio.value; | 53 | relationValue.value[2].relationValue = spainRatio.value; |
55 | - console.log(relationValue.value, '5656relationValue.value'); | ||
56 | await saveConfig({ | 54 | await saveConfig({ |
57 | id: listAll.value.id, | 55 | id: listAll.value.id, |
58 | settingCode: 'customerCode', | 56 | settingCode: 'customerCode', |
src/views/project/finance/pay/CheckSum.vue
@@ -98,7 +98,6 @@ | @@ -98,7 +98,6 @@ | ||
98 | const res = await checkAnalysis({ ids: ids.value }); | 98 | const res = await checkAnalysis({ ids: ids.value }); |
99 | const arrayRes = ref([]); | 99 | const arrayRes = ref([]); |
100 | arrayRes.value.push(res); | 100 | arrayRes.value.push(res); |
101 | - console.log(res, 56561); | ||
102 | return res; | 101 | return res; |
103 | }, | 102 | }, |
104 | columns: columnsAnalysis, | 103 | columns: columnsAnalysis, |
@@ -147,7 +146,6 @@ | @@ -147,7 +146,6 @@ | ||
147 | link.download = `应付款分析${date}.xlsx`; // 你可以为文件命名 | 146 | link.download = `应付款分析${date}.xlsx`; // 你可以为文件命名 |
148 | document.body.appendChild(link); | 147 | document.body.appendChild(link); |
149 | link.click(); // 自动点击链接,触发下载 | 148 | link.click(); // 自动点击链接,触发下载 |
150 | - console.log(link, 5656); | ||
151 | document.body.removeChild(link); // 下载完成后移除链接 | 149 | document.body.removeChild(link); // 下载完成后移除链接 |
152 | }) | 150 | }) |
153 | .catch((error) => { | 151 | .catch((error) => { |
src/views/project/finance/pay/Commit.vue
@@ -15,11 +15,13 @@ | @@ -15,11 +15,13 @@ | ||
15 | import { BasicModal, useModalInner } from '@/components/Modal'; | 15 | import { BasicModal, useModalInner } from '@/components/Modal'; |
16 | import { ref } from 'vue'; | 16 | import { ref } from 'vue'; |
17 | import { checkCommit } from '@/api/project/invoice'; | 17 | import { checkCommit } from '@/api/project/invoice'; |
18 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
18 | 19 | ||
19 | const id = ref(); | 20 | const id = ref(); |
20 | const date = ref(); | 21 | const date = ref(); |
21 | const emit = defineEmits(['success']); | 22 | const emit = defineEmits(['success']); |
22 | - | 23 | + const { createMessage } = useMessage(); |
24 | + const { error } = createMessage; | ||
23 | const [register, { closeModal }] = useModalInner(async (data) => { | 25 | const [register, { closeModal }] = useModalInner(async (data) => { |
24 | id.value = data.data.id; | 26 | id.value = data.data.id; |
25 | }); | 27 | }); |
@@ -35,10 +37,17 @@ | @@ -35,10 +37,17 @@ | ||
35 | // 返回格式化后的日期字符串 | 37 | // 返回格式化后的日期字符串 |
36 | return `${year}-${month}-${day}`; | 38 | return `${year}-${month}-${day}`; |
37 | } | 39 | } |
38 | - | 40 | + const isDisabled = ref(false); |
39 | async function handleOk() { | 41 | async function handleOk() { |
42 | + if (isDisabled.value) { | ||
43 | + error('请勿连续点击生成按钮,需要等待三秒再点击生成'); | ||
44 | + return; | ||
45 | + } | ||
40 | const formattedDate = formatDate(date.value); | 46 | const formattedDate = formatDate(date.value); |
41 | - | 47 | + isDisabled.value = true; |
48 | + setTimeout(() => { | ||
49 | + isDisabled.value = false; | ||
50 | + }, 3000); | ||
42 | checkCommit({ id: id.value, actualPayedDate: formattedDate }); | 51 | checkCommit({ id: id.value, actualPayedDate: formattedDate }); |
43 | emit('success'); | 52 | emit('success'); |
44 | closeModal(); | 53 | closeModal(); |
src/views/project/finance/pay/FinanceEdit.vue
@@ -15,13 +15,13 @@ | @@ -15,13 +15,13 @@ | ||
15 | <!-- <div> | 15 | <!-- <div> |
16 | <BasicForm @register="registerForm" /> | 16 | <BasicForm @register="registerForm" /> |
17 | </div> --> | 17 | </div> --> |
18 | - <div style="font-size: 15px">实际应收金额1$</div> | 18 | + <div style="font-size: 15px">实际应付金额1$</div> |
19 | <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size /> | 19 | <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size /> |
20 | <div style="margin: 16px 0"></div> | 20 | <div style="margin: 16px 0"></div> |
21 | - <div style="font-size: 15px">实际应收金额2$</div> | 21 | + <div style="font-size: 15px">实际应付金额2$</div> |
22 | <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size /> | 22 | <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size /> |
23 | <div style="margin: 16px 0"></div> | 23 | <div style="margin: 16px 0"></div> |
24 | - <div style="font-size: 15px">实际应收金额3$</div> | 24 | + <div style="font-size: 15px">实际应付金额3$</div> |
25 | <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size /> | 25 | <a-input v-model:value="input3" placeholder="请输入" :disabled="status === 10" auto-size /> |
26 | <div style="margin: 16px 0"></div> | 26 | <div style="margin: 16px 0"></div> |
27 | 27 |
src/views/project/finance/pay/TrackEdit.vue
@@ -126,7 +126,6 @@ | @@ -126,7 +126,6 @@ | ||
126 | } | 126 | } |
127 | //完成编辑 | 127 | //完成编辑 |
128 | async function handleSubmit() { | 128 | async function handleSubmit() { |
129 | - console.log(input1.value, deductUrl.value, deductDept.value, '5656ddd'); | ||
130 | if (!input1.value || !deductDept.value) { | 129 | if (!input1.value || !deductDept.value) { |
131 | error('选项不能为空'); | 130 | error('选项不能为空'); |
132 | } else { | 131 | } else { |
src/views/project/finance/pay/index.vue
@@ -20,11 +20,21 @@ | @@ -20,11 +20,21 @@ | ||
20 | <template #bodyCell="{ column, record }"> | 20 | <template #bodyCell="{ column, record }"> |
21 | <template v-if="column.key === 'action'"> | 21 | <template v-if="column.key === 'action'"> |
22 | <TableAction | 22 | <TableAction |
23 | + v-if=" | ||
24 | + role == ROLE.ADMIN || | ||
25 | + role == ROLE.FINANCE || | ||
26 | + role == ROLE.TRACKER || | ||
27 | + role == ROLE.BUSINESS | ||
28 | + " | ||
23 | :actions="[ | 29 | :actions="[ |
24 | - { | ||
25 | - label: '财务编辑', | ||
26 | - onClick: handleFinanceEdit.bind(null, record), | ||
27 | - }, | 30 | + ...(role == ROLE.ADMIN || role == ROLE.FINANCE |
31 | + ? [ | ||
32 | + { | ||
33 | + label: '财务编辑', | ||
34 | + onClick: handleFinanceEdit.bind(null, record), | ||
35 | + }, | ||
36 | + ] | ||
37 | + : []), | ||
28 | { | 38 | { |
29 | label: '跟单编辑', | 39 | label: '跟单编辑', |
30 | onClick: handleTrackEdit.bind(null, record), | 40 | onClick: handleTrackEdit.bind(null, record), |
@@ -35,15 +45,14 @@ | @@ -35,15 +45,14 @@ | ||
35 | }, | 45 | }, |
36 | ]" | 46 | ]" |
37 | :dropDownActions="[ | 47 | :dropDownActions="[ |
38 | - { | ||
39 | - label: '提交审核', | ||
40 | - // popConfirm: { | ||
41 | - // title: '是否确认提交审核', | ||
42 | - // placement: 'left', | ||
43 | - // confirm: handleCommit.bind(null, record), | ||
44 | - // }, | ||
45 | - onClick: handleCommit.bind(null, record), | ||
46 | - }, | 48 | + ...(role == ROLE.ADMIN || role == ROLE.FINANCE |
49 | + ? [ | ||
50 | + { | ||
51 | + label: '提交审核', | ||
52 | + onClick: handleCommit.bind(null, record), | ||
53 | + }, | ||
54 | + ] | ||
55 | + : []), | ||
47 | { | 56 | { |
48 | label: '订单信息', | 57 | label: '订单信息', |
49 | onClick: handleDetail.bind(null, record), | 58 | onClick: handleDetail.bind(null, record), |
@@ -67,13 +76,26 @@ | @@ -67,13 +76,26 @@ | ||
67 | }, | 76 | }, |
68 | ]" | 77 | ]" |
69 | /> | 78 | /> |
79 | + <TableAction | ||
80 | + v-if="role == ROLE.PRODUCE" | ||
81 | + :actions="[ | ||
82 | + { | ||
83 | + label: '发票上传', | ||
84 | + onClick: handleInvoiceUpload.bind(null, record), | ||
85 | + }, | ||
86 | + { | ||
87 | + label: '生产科发票', | ||
88 | + onClick: handleInvoiceShow.bind(null, record), | ||
89 | + }, | ||
90 | + ]" | ||
91 | + /> | ||
70 | </template> | 92 | </template> |
71 | </template> | 93 | </template> |
72 | </BasicTable> | 94 | </BasicTable> |
73 | </div> | 95 | </div> |
74 | </template> | 96 | </template> |
75 | <script lang="ts" setup> | 97 | <script lang="ts" setup> |
76 | - import { defineComponent, ref } from 'vue'; | 98 | + import { computed, defineComponent, ref } from 'vue'; |
77 | import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; | 99 | import { BasicTable, useTable, BasicColumn, TableAction } from '/@/components/Table'; |
78 | import { searchFormSchema, columns } from './pay.data'; | 100 | import { searchFormSchema, columns } from './pay.data'; |
79 | import TrackEdit from './TrackEdit.vue'; | 101 | import TrackEdit from './TrackEdit.vue'; |
@@ -88,7 +110,9 @@ | @@ -88,7 +110,9 @@ | ||
88 | import { useModal } from '/@/components/Modal'; | 110 | import { useModal } from '/@/components/Modal'; |
89 | import { getCheck, checkDelete, checkCommit, checkDetail } from '@/api/project/invoice'; | 111 | import { getCheck, checkDelete, checkCommit, checkDetail } from '@/api/project/invoice'; |
90 | import { useMessage } from '/@/hooks/web/useMessage'; | 112 | import { useMessage } from '/@/hooks/web/useMessage'; |
113 | + import { ROLE } from './type.d'; | ||
91 | import { getOrderList } from '/@/api/project/order'; | 114 | import { getOrderList } from '/@/api/project/order'; |
115 | + import { useUserStoreWithOut } from '/@/store/modules/user'; | ||
92 | 116 | ||
93 | const [registerCheckSum, { openModal: openCheckSum }] = useModal(); | 117 | const [registerCheckSum, { openModal: openCheckSum }] = useModal(); |
94 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); | 118 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); |
@@ -98,6 +122,11 @@ | @@ -98,6 +122,11 @@ | ||
98 | const [registerCommit, { openModal: openCommit }] = useModal(); | 122 | const [registerCommit, { openModal: openCommit }] = useModal(); |
99 | const [registerInvoiceShow, { openModal: openInvoiceShow }] = useModal(); | 123 | const [registerInvoiceShow, { openModal: openInvoiceShow }] = useModal(); |
100 | const [registerInvoiceDetail, { openDrawer: openCheckDetail }] = useDrawer(); | 124 | const [registerInvoiceDetail, { openDrawer: openCheckDetail }] = useDrawer(); |
125 | + const userStore = useUserStoreWithOut(); | ||
126 | + const user = userStore.getUserInfo; | ||
127 | + const role = computed(() => { | ||
128 | + return user?.roleSmallVO?.code; | ||
129 | + }); | ||
101 | const checkedKeys = ref<Array<string | number>>([]); | 130 | const checkedKeys = ref<Array<string | number>>([]); |
102 | // 添加分页状态 | 131 | // 添加分页状态 |
103 | const pagination = ref({ | 132 | const pagination = ref({ |
src/views/project/finance/pay/type.d.ts
0 → 100644
1 | +export enum ROLE { | ||
2 | + ADMIN = 'admin', // 超管 | ||
3 | + CUSTOM_ADMIN = 'custom_admin', // 客户管理员 | ||
4 | + DATA_REPORT_USER = 'data_report_user', //数据分析员 | ||
5 | + BUSINESS = 'business_user', // 业务员 | ||
6 | + TRACKER = 'tracker_user', // 跟单员 | ||
7 | + INSPECT = 'inspect_user', // 质检员 | ||
8 | + PRODUCE = 'produce_user', //生产科 | ||
9 | + FINANCE = 'finance_user', //生产科 | ||
10 | +} |
src/views/project/finance/receive/Commit.vue
@@ -21,12 +21,14 @@ | @@ -21,12 +21,14 @@ | ||
21 | import { BasicModal, useModalInner } from '@/components/Modal'; | 21 | import { BasicModal, useModalInner } from '@/components/Modal'; |
22 | import { ref } from 'vue'; | 22 | import { ref } from 'vue'; |
23 | import { commit } from '@/api/project/invoice'; | 23 | import { commit } from '@/api/project/invoice'; |
24 | + import { useMessage } from '/@/hooks/web/useMessage'; | ||
24 | 25 | ||
25 | const id = ref(); | 26 | const id = ref(); |
26 | const payee = ref(); | 27 | const payee = ref(); |
27 | const date = ref(); | 28 | const date = ref(); |
28 | const emit = defineEmits(['success']); | 29 | const emit = defineEmits(['success']); |
29 | - | 30 | + const { createMessage } = useMessage(); |
31 | + const { error } = createMessage; | ||
30 | const [register, { closeModal }] = useModalInner(async (data) => { | 32 | const [register, { closeModal }] = useModalInner(async (data) => { |
31 | id.value = data.data.id; | 33 | id.value = data.data.id; |
32 | }); | 34 | }); |
@@ -42,9 +44,17 @@ | @@ -42,9 +44,17 @@ | ||
42 | // 返回格式化后的日期字符串 | 44 | // 返回格式化后的日期字符串 |
43 | return `${year}-${month}-${day}`; | 45 | return `${year}-${month}-${day}`; |
44 | } | 46 | } |
45 | - | 47 | + const isDisabled = ref(false); |
46 | async function handleOk() { | 48 | async function handleOk() { |
49 | + if (isDisabled.value) { | ||
50 | + error('请勿连续点击生成按钮,需要等待三秒再点击生成'); | ||
51 | + return; | ||
52 | + } | ||
47 | const formattedDate = formatDate(date.value); | 53 | const formattedDate = formatDate(date.value); |
54 | + isDisabled.value = true; | ||
55 | + setTimeout(() => { | ||
56 | + isDisabled.value = false; | ||
57 | + }, 3000); | ||
48 | commit({ id: id.value, actualRefundDate: formattedDate, payee: payee.value }); | 58 | commit({ id: id.value, actualRefundDate: formattedDate, payee: payee.value }); |
49 | emit('success'); | 59 | emit('success'); |
50 | closeModal(); | 60 | closeModal(); |
src/views/project/finance/receive/DeductShow.vue
@@ -55,7 +55,6 @@ | @@ -55,7 +55,6 @@ | ||
55 | const [register, { closeModal }] = useModalInner(async (data) => { | 55 | const [register, { closeModal }] = useModalInner(async (data) => { |
56 | itemArray.value = []; | 56 | itemArray.value = []; |
57 | const res = await getInvoiceDeductUrlById({ id: data.data.id }); | 57 | const res = await getInvoiceDeductUrlById({ id: data.data.id }); |
58 | - console.log(res, '5656resssdata'); | ||
59 | for (let item in res) { | 58 | for (let item in res) { |
60 | const url = res[item]; | 59 | const url = res[item]; |
61 | const name = item; | 60 | const name = item; |
src/views/project/finance/receive/FinanceEdit.vue
@@ -42,8 +42,12 @@ | @@ -42,8 +42,12 @@ | ||
42 | import { getEmailList } from '/@/api/sys/config'; | 42 | import { getEmailList } from '/@/api/sys/config'; |
43 | import { updateAmount } from '@/api/project/invoice'; | 43 | import { updateAmount } from '@/api/project/invoice'; |
44 | import { useMessage } from '/@/hooks/web/useMessage'; | 44 | import { useMessage } from '/@/hooks/web/useMessage'; |
45 | + import { ROLE } from './type.d'; | ||
45 | 46 | ||
46 | const emit = defineEmits(['success']); | 47 | const emit = defineEmits(['success']); |
48 | + const role = computed(() => { | ||
49 | + return user?.roleSmallVO?.code; | ||
50 | + }); | ||
47 | const schemas: FormSchema[] = [ | 51 | const schemas: FormSchema[] = [ |
48 | // { | 52 | // { |
49 | // field: 'totalPayAmount', | 53 | // field: 'totalPayAmount', |
@@ -133,7 +137,6 @@ | @@ -133,7 +137,6 @@ | ||
133 | input4.value = data.data.otherAmount; | 137 | input4.value = data.data.otherAmount; |
134 | resetFields(); | 138 | resetFields(); |
135 | setDrawerProps({ confirmLoading: false }); | 139 | setDrawerProps({ confirmLoading: false }); |
136 | - console.log(data, '5656666dd'); | ||
137 | setFieldsValue({ | 140 | setFieldsValue({ |
138 | ...toRaw(data.data), | 141 | ...toRaw(data.data), |
139 | }); | 142 | }); |
src/views/project/finance/receive/index.vue
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | type="primary" | 6 | type="primary" |
7 | @click="handleInvoiceAnalysis" | 7 | @click="handleInvoiceAnalysis" |
8 | :style="{ borderRadius: '5px 5px 5px 5px' }" | 8 | :style="{ borderRadius: '5px 5px 5px 5px' }" |
9 | + v-if="role == ROLE.ADMIN || role == ROLE.FINANCE" | ||
9 | >收款单分析</a-button | 10 | >收款单分析</a-button |
10 | > | 11 | > |
11 | <FinanceEdit @register="registerFinanceEdit" @success="handleSuccess" /> | 12 | <FinanceEdit @register="registerFinanceEdit" @success="handleSuccess" /> |
@@ -20,23 +21,30 @@ | @@ -20,23 +21,30 @@ | ||
20 | <template v-if="column.key === 'action'"> | 21 | <template v-if="column.key === 'action'"> |
21 | <TableAction | 22 | <TableAction |
22 | :actions="[ | 23 | :actions="[ |
23 | - { | ||
24 | - label: '财务编辑', | ||
25 | - onClick: handleFinanceEdit.bind(null, record), | ||
26 | - }, | 24 | + // { |
25 | + // label: '财务编辑', | ||
26 | + // onClick: handleFinanceEdit.bind(null, record), | ||
27 | + // }, | ||
28 | + ...(role == ROLE.ADMIN || role == ROLE.FINANCE | ||
29 | + ? [ | ||
30 | + { | ||
31 | + label: '财务编辑', | ||
32 | + onClick: handleFinanceEdit.bind(null, record), | ||
33 | + }, | ||
34 | + ] | ||
35 | + : []), | ||
27 | { | 36 | { |
28 | label: '跟单编辑', | 37 | label: '跟单编辑', |
29 | onClick: handleTrackEdit.bind(null, record), | 38 | onClick: handleTrackEdit.bind(null, record), |
30 | }, | 39 | }, |
31 | - { | ||
32 | - label: '提交审核', | ||
33 | - // popConfirm: { | ||
34 | - // title: '是否确认提交审核', | ||
35 | - // placement: 'left', | ||
36 | - // confirm: handleCommit.bind(null, record), | ||
37 | - // }, | ||
38 | - onClick: handleCommit.bind(null, record), | ||
39 | - }, | 40 | + ...(role == ROLE.ADMIN || role == ROLE.FINANCE |
41 | + ? [ | ||
42 | + { | ||
43 | + label: '提交审核', | ||
44 | + onClick: handleCommit.bind(null, record), | ||
45 | + }, | ||
46 | + ] | ||
47 | + : []), | ||
40 | ]" | 48 | ]" |
41 | :dropDownActions="[ | 49 | :dropDownActions="[ |
42 | { | 50 | { |
@@ -88,7 +96,6 @@ | @@ -88,7 +96,6 @@ | ||
88 | import { useMessage } from '/@/hooks/web/useMessage'; | 96 | import { useMessage } from '/@/hooks/web/useMessage'; |
89 | 97 | ||
90 | const [registerInvoiceAnalysis, { openModal: openInvoiceAnalysis }] = useModal(); | 98 | const [registerInvoiceAnalysis, { openModal: openInvoiceAnalysis }] = useModal(); |
91 | - | ||
92 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); | 99 | const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); |
93 | const [registerTrackEdit, { openDrawer: openTrackEdit }] = useDrawer(); | 100 | const [registerTrackEdit, { openDrawer: openTrackEdit }] = useDrawer(); |
94 | const [registerInvoiceDetail, { openDrawer: openInvoiceDetail }] = useDrawer(); | 101 | const [registerInvoiceDetail, { openDrawer: openInvoiceDetail }] = useDrawer(); |
@@ -172,8 +179,6 @@ | @@ -172,8 +179,6 @@ | ||
172 | 179 | ||
173 | checkedKeys.value = checkedKeys.value.filter((id) => id !== record.id); | 180 | checkedKeys.value = checkedKeys.value.filter((id) => id !== record.id); |
174 | } | 181 | } |
175 | - // console.log(selectedCustomCodes.value, 56561); | ||
176 | - // console.log(checkedKeys.value, 56562); | ||
177 | } | 182 | } |
178 | 183 | ||
179 | async function onSelectAll(selected: boolean, selectedRows: any[], changeRows: any[]) { | 184 | async function onSelectAll(selected: boolean, selectedRows: any[], changeRows: any[]) { |
src/views/project/order/FormDetail/ApproveReason.vue
@@ -22,7 +22,6 @@ | @@ -22,7 +22,6 @@ | ||
22 | const input = ref(''); | 22 | const input = ref(''); |
23 | const res = ref(); | 23 | const res = ref(); |
24 | const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => { | 24 | const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => { |
25 | - console.log(data, '5656approvedata'); | ||
26 | res.value = data; | 25 | res.value = data; |
27 | }); | 26 | }); |
28 | async function handleOk() { | 27 | async function handleOk() { |
src/views/project/order/ProductInvoice.vue
@@ -47,7 +47,6 @@ | @@ -47,7 +47,6 @@ | ||
47 | const [register, { closeModal }] = useModalInner(async (data) => { | 47 | const [register, { closeModal }] = useModalInner(async (data) => { |
48 | res.value = data.data; | 48 | res.value = data.data; |
49 | Input2.value = await payDate({ orderIds: res.value }); | 49 | Input2.value = await payDate({ orderIds: res.value }); |
50 | - console.log(Input2.value, 565656); | ||
51 | }); | 50 | }); |
52 | async function handleOk() { | 51 | async function handleOk() { |
53 | await checkCreate({ | 52 | await checkCreate({ |
src/views/project/order/ProductProfit.vue
@@ -148,7 +148,6 @@ | @@ -148,7 +148,6 @@ | ||
148 | const ids = ref(); | 148 | const ids = ref(); |
149 | 149 | ||
150 | const [register, { closeModal }] = useModalInner(async (data) => { | 150 | const [register, { closeModal }] = useModalInner(async (data) => { |
151 | - console.log(data, '5656datapro'); | ||
152 | res.value = data.data; | 151 | res.value = data.data; |
153 | filteredItems.value = data.filteredItems; | 152 | filteredItems.value = data.filteredItems; |
154 | filteredItems.value.forEach((item) => { | 153 | filteredItems.value.forEach((item) => { |
@@ -164,8 +163,6 @@ | @@ -164,8 +163,6 @@ | ||
164 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); | 163 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); |
165 | projectNo.value = extractedValues.value.join(','); | 164 | projectNo.value = extractedValues.value.join(','); |
166 | ids.value = data.data; | 165 | ids.value = data.data; |
167 | - console.log(customerCode.value, '5656customerCode.value'); | ||
168 | - console.log(Input2.value, 565656); | ||
169 | filteredItems.value = data.filteredItems; | 166 | filteredItems.value = data.filteredItems; |
170 | }); | 167 | }); |
171 | async function handleOk() { | 168 | async function handleOk() { |
@@ -208,7 +205,6 @@ | @@ -208,7 +205,6 @@ | ||
208 | link.download = `内部生产净利润分析${date}.xlsx`; // 你可以为文件命名 | 205 | link.download = `内部生产净利润分析${date}.xlsx`; // 你可以为文件命名 |
209 | document.body.appendChild(link); | 206 | document.body.appendChild(link); |
210 | link.click(); // 自动点击链接,触发下载 | 207 | link.click(); // 自动点击链接,触发下载 |
211 | - console.log(link, 5656); | ||
212 | document.body.removeChild(link); // 下载完成后移除链接 | 208 | document.body.removeChild(link); // 下载完成后移除链接 |
213 | }) | 209 | }) |
214 | .catch((error) => { | 210 | .catch((error) => { |
@@ -269,7 +265,6 @@ | @@ -269,7 +265,6 @@ | ||
269 | productionDepartmentPredictPrice: productionDepartmentPredictPrice.value, | 265 | productionDepartmentPredictPrice: productionDepartmentPredictPrice.value, |
270 | productionActualPrice: productionActualPrice.value, | 266 | productionActualPrice: productionActualPrice.value, |
271 | }); | 267 | }); |
272 | - console.log(res, '5656resproductprofit'); | ||
273 | grossProfit.value = res.grossProfit.toFixed(2); | 268 | grossProfit.value = res.grossProfit.toFixed(2); |
274 | innerProduceFixProfit.value = res.innerProduceFixProfit.toFixed(2); | 269 | innerProduceFixProfit.value = res.innerProduceFixProfit.toFixed(2); |
275 | innerProduceTotalPrice.value = res.innerProduceTotalPrice.toFixed(2); | 270 | innerProduceTotalPrice.value = res.innerProduceTotalPrice.toFixed(2); |
@@ -282,7 +277,6 @@ | @@ -282,7 +277,6 @@ | ||
282 | projectDays.value = res.projectDays; | 277 | projectDays.value = res.projectDays; |
283 | // predictRatioDeduct.value = res.predictAndActualRatio; | 278 | // predictRatioDeduct.value = res.predictAndActualRatio; |
284 | predictRatioDeduct.value = `${res.predictAndActualRatio}%`; | 279 | predictRatioDeduct.value = `${res.predictAndActualRatio}%`; |
285 | - console.log(filteredItems.value, '5656filteredItems'); | ||
286 | // filteredItems.value.forEach((item) => { | 280 | // filteredItems.value.forEach((item) => { |
287 | // sumMoney.value += item.profitAnalysisInfo.productionDepartmentTotalPrice; | 281 | // sumMoney.value += item.profitAnalysisInfo.productionDepartmentTotalPrice; |
288 | // sumCount.value += item.orderCount; | 282 | // sumCount.value += item.orderCount; |
src/views/project/order/ProductText.vue
@@ -177,7 +177,6 @@ | @@ -177,7 +177,6 @@ | ||
177 | } | 177 | } |
178 | //发送按钮 | 178 | //发送按钮 |
179 | async function handleExport() { | 179 | async function handleExport() { |
180 | - console.log(resText.value.produceFile, resText.value.productionDepartment, 5656); | ||
181 | const res = await exportProductText({ | 180 | const res = await exportProductText({ |
182 | productionUrl: resText.value.productionUrl, | 181 | productionUrl: resText.value.productionUrl, |
183 | productionDepartment: resText.value.productionDepartment, | 182 | productionDepartment: resText.value.productionDepartment, |
src/views/project/order/ServiceProfit.vue
@@ -73,22 +73,22 @@ | @@ -73,22 +73,22 @@ | ||
73 | <tr> | 73 | <tr> |
74 | <td style="border: 1px solid black" colspan="2">客户总金额合计</td> | 74 | <td style="border: 1px solid black" colspan="2">客户总金额合计</td> |
75 | <td style="border: 1px solid black">¥{{ customerTotalPrice }}</td> | 75 | <td style="border: 1px solid black">¥{{ customerTotalPrice }}</td> |
76 | - <td style="border: 1px solid black"></td> | 76 | + <td style="border: 1px solid black">${{ customerTotalPriceUsd }}</td> |
77 | </tr> | 77 | </tr> |
78 | <tr> | 78 | <tr> |
79 | <td style="border: 1px solid black" colspan="2">生产科总价合计</td> | 79 | <td style="border: 1px solid black" colspan="2">生产科总价合计</td> |
80 | <td style="border: 1px solid black">¥{{ productionDepartmentTotalPrice }}</td> | 80 | <td style="border: 1px solid black">¥{{ productionDepartmentTotalPrice }}</td> |
81 | - <td style="border: 1px solid black"></td> | 81 | + <td style="border: 1px solid black">${{ productionDepartmentTotalPriceUsd }}</td> |
82 | </tr> | 82 | </tr> |
83 | <tr> | 83 | <tr> |
84 | <td style="border: 1px solid black" colspan="2">包装费用合计</td> | 84 | <td style="border: 1px solid black" colspan="2">包装费用合计</td> |
85 | <td style="border: 1px solid black">¥{{ packetTotalPrice }}</td> | 85 | <td style="border: 1px solid black">¥{{ packetTotalPrice }}</td> |
86 | - <td style="border: 1px solid black"></td> | 86 | + <td style="border: 1px solid black">${{ packetTotalPriceUsd }}</td> |
87 | </tr> | 87 | </tr> |
88 | <tr> | 88 | <tr> |
89 | <td style="border: 1px solid black" colspan="2">研发开发费合计</td> | 89 | <td style="border: 1px solid black" colspan="2">研发开发费合计</td> |
90 | <td style="border: 1px solid black" | 90 | <td style="border: 1px solid black" |
91 | - >¥<a-input v-model:value="developTotalPrice" placeholder="请输入" | 91 | + ><a-input v-model:value="developTotalPrice" placeholder="请输入" |
92 | /></td> | 92 | /></td> |
93 | <td style="border: 1px solid black"></td> | 93 | <td style="border: 1px solid black"></td> |
94 | </tr> | 94 | </tr> |
@@ -210,19 +210,22 @@ | @@ -210,19 +210,22 @@ | ||
210 | const orderList = ref(); | 210 | const orderList = ref(); |
211 | const customerCode = ref(); | 211 | const customerCode = ref(); |
212 | const projectNo = ref(); | 212 | const projectNo = ref(); |
213 | - const developTotalPrice = ref(0); | ||
214 | - const copyTotalPrice = ref(0); | ||
215 | - const packetActualTotalPrice = ref(0); | 213 | + const developTotalPrice = ref(); |
214 | + const copyTotalPrice = ref(); | ||
215 | + const packetActualTotalPrice = ref(); | ||
216 | const spainRatio = ref(0); | 216 | const spainRatio = ref(0); |
217 | const chinaRatio = ref(0); | 217 | const chinaRatio = ref(0); |
218 | const actualRmbPrice = ref(0); //实际跟单单价 | 218 | const actualRmbPrice = ref(0); //实际跟单单价 |
219 | const actualPrice = ref(0); //实际跟单单价折算美金 | 219 | const actualPrice = ref(0); //实际跟单单价折算美金 |
220 | - const actualRatio = ref(0); //实际汇率 | 220 | + const actualRatio = ref(); //实际汇率 |
221 | const customerTotalPrice = ref(0); //客户总价合计 | 221 | const customerTotalPrice = ref(0); //客户总价合计 |
222 | const actualdocumentaryPrice = ref(0); //实际跟单费用 | 222 | const actualdocumentaryPrice = ref(0); //实际跟单费用 |
223 | const actualRatioProfitPrice = ref(0); //汇率收益 | 223 | const actualRatioProfitPrice = ref(0); //汇率收益 |
224 | const grossProfit = ref(0); //毛利润合计 | 224 | const grossProfit = ref(0); //毛利润合计 |
225 | + const customerTotalPriceUsd = ref(0); //客户总价$ | ||
226 | + const productionDepartmentTotalPriceUsd = ref(0); //生产科总价$ | ||
225 | const actualRatiactualRatioProfitPriceo = ref(0); //汇率收益计算 | 227 | const actualRatiactualRatioProfitPriceo = ref(0); //汇率收益计算 |
228 | + const packetTotalPriceUsd = ref(0); //汇率收益计算 | ||
226 | const chinaRatioProfitPrice = ref(0); //中国团队提成比例 | 229 | const chinaRatioProfitPrice = ref(0); //中国团队提成比例 |
227 | const developProfit = ref(0); //研发贸易利润 | 230 | const developProfit = ref(0); //研发贸易利润 |
228 | const fixCost = ref(0); // 固定成本 | 231 | const fixCost = ref(0); // 固定成本 |
@@ -236,9 +239,7 @@ | @@ -236,9 +239,7 @@ | ||
236 | const ids = ref(); | 239 | const ids = ref(); |
237 | 240 | ||
238 | // const orderRes = await getOrderList({}); | 241 | // const orderRes = await getOrderList({}); |
239 | - // console.log(orderRes, '5656orderRes'); | ||
240 | const [register, { closeModal }] = useModalInner(async (data) => { | 242 | const [register, { closeModal }] = useModalInner(async (data) => { |
241 | - console.log(data, '5656yewudata'); | ||
242 | res.value = data.data; | 243 | res.value = data.data; |
243 | orderList.value = data.res; | 244 | orderList.value = data.res; |
244 | orderList.value.forEach((item) => { | 245 | orderList.value.forEach((item) => { |
@@ -248,7 +249,6 @@ | @@ -248,7 +249,6 @@ | ||
248 | ids.value = data.data; | 249 | ids.value = data.data; |
249 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); | 250 | const extractedValues = ref<string[]>(data.projectNo.map((item) => item[0])); |
250 | projectNo.value = extractedValues.value.join(','); | 251 | projectNo.value = extractedValues.value.join(','); |
251 | - console.log(orderList.value, 565656); | ||
252 | }); | 252 | }); |
253 | async function handleOk() { | 253 | async function handleOk() { |
254 | axios | 254 | axios |
@@ -299,7 +299,6 @@ | @@ -299,7 +299,6 @@ | ||
299 | link.download = `业务/研发净利润分析${date}.xlsx`; // 你可以为文件命名 | 299 | link.download = `业务/研发净利润分析${date}.xlsx`; // 你可以为文件命名 |
300 | document.body.appendChild(link); | 300 | document.body.appendChild(link); |
301 | link.click(); // 自动点击链接,触发下载 | 301 | link.click(); // 自动点击链接,触发下载 |
302 | - console.log(link, 5656); | ||
303 | document.body.removeChild(link); // 下载完成后移除链接 | 302 | document.body.removeChild(link); // 下载完成后移除链接 |
304 | }) | 303 | }) |
305 | .catch((error) => { | 304 | .catch((error) => { |
@@ -361,6 +360,9 @@ | @@ -361,6 +360,9 @@ | ||
361 | productionDepartmentTotalPrice.value = 0; // 生成科总价 | 360 | productionDepartmentTotalPrice.value = 0; // 生成科总价 |
362 | totalProfitPrice.value = 0; // 综合收益计算 | 361 | totalProfitPrice.value = 0; // 综合收益计算 |
363 | spainRatioProfitPrice.value = 0; // 西班牙提成金额 | 362 | spainRatioProfitPrice.value = 0; // 西班牙提成金额 |
363 | + customerTotalPriceUsd.value = 0; | ||
364 | + productionDepartmentTotalPriceUsd.value = 0; | ||
365 | + packetTotalPriceUsd.value = 0; | ||
364 | } | 366 | } |
365 | } | 367 | } |
366 | //提成接口 | 368 | //提成接口 |
@@ -386,10 +388,7 @@ | @@ -386,10 +388,7 @@ | ||
386 | const packetCalculatePrice = ref(0); | 388 | const packetCalculatePrice = ref(0); |
387 | const orderCalculateCount = ref(0); | 389 | const orderCalculateCount = ref(0); |
388 | const allList = toRaw(orderList.value); | 390 | const allList = toRaw(orderList.value); |
389 | - console.log(allList, '5656allList'); | ||
390 | allList.forEach((item) => { | 391 | allList.forEach((item) => { |
391 | - console.log(item, '5656orderList'); | ||
392 | - console.log(item.profitAnalysisInfo.packetPrice, '5656orderList'); | ||
393 | packetCalculatePrice.value += item?.profitAnalysisInfo?.packetPrice; | 392 | packetCalculatePrice.value += item?.profitAnalysisInfo?.packetPrice; |
394 | orderCalculateCount.value += item.orderCount; | 393 | orderCalculateCount.value += item.orderCount; |
395 | actualRmbPrice.value += packetCalculatePrice.value / orderCalculateCount.value; | 394 | actualRmbPrice.value += packetCalculatePrice.value / orderCalculateCount.value; |
@@ -397,11 +396,8 @@ | @@ -397,11 +396,8 @@ | ||
397 | actualPrice.value = actualRmbPrice.value / actualRatio.value; | 396 | actualPrice.value = actualRmbPrice.value / actualRatio.value; |
398 | // const ratioList = (await getList({ settingType: 3 })) as Array<RatioListItem>; | 397 | // const ratioList = (await getList({ settingType: 3 })) as Array<RatioListItem>; |
399 | const ratioList = (await getList({ settingType: 3 })) as RatioList; | 398 | const ratioList = (await getList({ settingType: 3 })) as RatioList; |
400 | - console.log(ratioList, '5656ratioList'); | ||
401 | const ratios = ratioList.items.filter((item) => item.settingValue === customerCode.value); | 399 | const ratios = ratioList.items.filter((item) => item.settingValue === customerCode.value); |
402 | - console.log(ratios, '5656ratios'); | ||
403 | const ratioAll = JSON.parse(ratios[0].relationValue); | 400 | const ratioAll = JSON.parse(ratios[0].relationValue); |
404 | - console.log(ratioAll, '5656ratios', ratioAll[1].relationValue, ratioAll[2].relationValue); | ||
405 | chinaRatio.value = ratioAll[1].relationValue; | 401 | chinaRatio.value = ratioAll[1].relationValue; |
406 | spainRatio.value = ratioAll[2].relationValue; | 402 | spainRatio.value = ratioAll[2].relationValue; |
407 | //提成比例为0,提成设为0 | 403 | //提成比例为0,提成设为0 |
@@ -423,7 +419,6 @@ | @@ -423,7 +419,6 @@ | ||
423 | actualPrice: actualPrice.value, | 419 | actualPrice: actualPrice.value, |
424 | actualRatio: actualRatio.value, | 420 | actualRatio: actualRatio.value, |
425 | }; | 421 | }; |
426 | - console.log(params, '5656params'); | ||
427 | const res = await calculateBusinessProfit({ | 422 | const res = await calculateBusinessProfit({ |
428 | customerCode: customerCode.value, | 423 | customerCode: customerCode.value, |
429 | projectNo: projectNo.value, | 424 | projectNo: projectNo.value, |
@@ -442,8 +437,6 @@ | @@ -442,8 +437,6 @@ | ||
442 | actualPrice: actualPrice.value, | 437 | actualPrice: actualPrice.value, |
443 | actualRatio: actualRatio.value, | 438 | actualRatio: actualRatio.value, |
444 | }); | 439 | }); |
445 | - console.log(res, '5656resservice'); | ||
446 | - | ||
447 | customerTotalPrice.value = res.customerTotalPrice.toFixed(2); | 440 | customerTotalPrice.value = res.customerTotalPrice.toFixed(2); |
448 | grossProfit.value = res.grossProfit.toFixed(2); | 441 | grossProfit.value = res.grossProfit.toFixed(2); |
449 | actualRatioProfitPrice.value = res.actualRatioProfitPrice.toFixed(2); | 442 | actualRatioProfitPrice.value = res.actualRatioProfitPrice.toFixed(2); |
@@ -465,6 +458,9 @@ | @@ -465,6 +458,9 @@ | ||
465 | productionDepartmentTotalPrice.value = res.productionDepartmentTotalPrice.toFixed(2); //生成科总价 | 458 | productionDepartmentTotalPrice.value = res.productionDepartmentTotalPrice.toFixed(2); //生成科总价 |
466 | totalProfitPrice.value = res.totalProfitPrice.toFixed(2); //综合收益计算 | 459 | totalProfitPrice.value = res.totalProfitPrice.toFixed(2); //综合收益计算 |
467 | spainRatioProfitPrice.value = res.spainRatioProfitPrice.toFixed(2); //西班牙提成金额 | 460 | spainRatioProfitPrice.value = res.spainRatioProfitPrice.toFixed(2); //西班牙提成金额 |
461 | + customerTotalPriceUsd.value = res.customerTotalPriceUsd.toFixed(2); | ||
462 | + productionDepartmentTotalPriceUsd.value = res.productionDepartmentTotalPriceUsd.toFixed(2); | ||
463 | + packetTotalPriceUsd.value = res.packetTotalPriceUsd.toFixed(2); | ||
468 | } | 464 | } |
469 | </script> | 465 | </script> |
470 | <style scoped> | 466 | <style scoped> |
src/views/project/order/index.vue
@@ -121,7 +121,12 @@ | @@ -121,7 +121,12 @@ | ||
121 | :style="{ borderRadius: '5px 5px 5px 5px' }" | 121 | :style="{ borderRadius: '5px 5px 5px 5px' }" |
122 | type="primary" | 122 | type="primary" |
123 | @click="handleProductInvoiceModal" | 123 | @click="handleProductInvoiceModal" |
124 | - v-if="role === ROLE.ADMIN || role === ROLE.BUSINESS || role === ROLE.TRACKER" | 124 | + v-if=" |
125 | + role === ROLE.ADMIN || | ||
126 | + role === ROLE.BUSINESS || | ||
127 | + role === ROLE.TRACKER || | ||
128 | + role === ROLE.FINANCE | ||
129 | + " | ||
125 | >生产对账单创建</a-button | 130 | >生产对账单创建</a-button |
126 | > | 131 | > |
127 | <a-button | 132 | <a-button |
@@ -129,7 +134,12 @@ | @@ -129,7 +134,12 @@ | ||
129 | shape="default" | 134 | shape="default" |
130 | type="primary" | 135 | type="primary" |
131 | @click="handleInvoiceCreateModal" | 136 | @click="handleInvoiceCreateModal" |
132 | - v-if="role === ROLE.ADMIN || role === ROLE.BUSINESS || role === ROLE.TRACKER" | 137 | + v-if=" |
138 | + role === ROLE.ADMIN || | ||
139 | + role === ROLE.BUSINESS || | ||
140 | + role === ROLE.TRACKER || | ||
141 | + role === ROLE.FINANCE | ||
142 | + " | ||
133 | >Invoice创建</a-button | 143 | >Invoice创建</a-button |
134 | > | 144 | > |
135 | <a-select | 145 | <a-select |
@@ -929,7 +939,6 @@ | @@ -929,7 +939,6 @@ | ||
929 | function handleProductModal(record) { | 939 | function handleProductModal(record) { |
930 | const form = getForm(); | 940 | const form = getForm(); |
931 | const values = form.getFieldsValue(); | 941 | const values = form.getFieldsValue(); |
932 | - console.log(selectedCustomCodes.value, 5656); | ||
933 | if (checkedKeys.value.length == 0) { | 942 | if (checkedKeys.value.length == 0) { |
934 | error('请选择订单'); | 943 | error('请选择订单'); |
935 | return; | 944 | return; |
@@ -999,11 +1008,9 @@ | @@ -999,11 +1008,9 @@ | ||
999 | const form = getForm(); | 1008 | const form = getForm(); |
1000 | const values = form.getFieldsValue(); | 1009 | const values = form.getFieldsValue(); |
1001 | const resAll = await getOrderList({}); | 1010 | const resAll = await getOrderList({}); |
1002 | - console.log(resAll, '5656resall'); | ||
1003 | const filteredItems = resAll.items.filter((item: { id: string }) => | 1011 | const filteredItems = resAll.items.filter((item: { id: string }) => |
1004 | checkedKeys.value.includes(item.id), | 1012 | checkedKeys.value.includes(item.id), |
1005 | ); | 1013 | ); |
1006 | - console.log(filteredItems, '5656filteredItems'); | ||
1007 | openServiceProfitModal(true, { | 1014 | openServiceProfitModal(true, { |
1008 | res: filteredItems, | 1015 | res: filteredItems, |
1009 | data: checkedKeys.value, | 1016 | data: checkedKeys.value, |