Commit 796aea5ffee54b1bb2afffb103a4980a0d5a1d9e

Authored by boyang
1 parent 95d5c63d

第三版测试修改

src/router/routes/modules/project/finance.ts
@@ -43,106 +43,106 @@ const finance: AppRouteModule = { @@ -43,106 +43,106 @@ const finance: AppRouteModule = {
43 }, 43 },
44 component: () => import('/@/views/project/finance/financeList/index.vue'), 44 component: () => import('/@/views/project/finance/financeList/index.vue'),
45 }, 45 },
46 - // {  
47 - // path: 'financeProfit',  
48 - // name: 'FinanceProfit',  
49 - // meta: {  
50 - // title: '净利润分析',  
51 - // ignoreKeepAlive: true,  
52 - // roles: [  
53 - // RoleEnum.ADMIN,  
54 - // RoleEnum.FINANCE,  
55 - // // RoleEnum.TRACKER,  
56 - // // RoleEnum.BUSINESS,  
57 - // // RoleEnum.PRODUCE,  
58 - // // RoleEnum.DATA_REPORT_USER,  
59 - // ],  
60 - // },  
61 - // children: [  
62 - // // {  
63 - // // path: '',  
64 - // // name: 'Receive',  
65 - // // meta: {  
66 - // // title: '财务管理',  
67 - // // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
68 - // // ignoreKeepAlive: false,  
69 - // // },  
70 - // // // component: () => import('/@/views/project/finance/index.vue'),  
71 - // // },  
72 - // {  
73 - // path: 'serviceProfit',  
74 - // name: 'ServiceProfit',  
75 - // meta: {  
76 - // title: '业务研发净利润分析',  
77 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
78 - // ignoreKeepAlive: false,  
79 - // },  
80 - // children: [  
81 - // {  
82 - // path: 'ServiceProfit',  
83 - // name: 'ServiceProfit',  
84 - // meta: {  
85 - // title: '业务研发净利润分析表',  
86 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
87 - // ignoreKeepAlive: false,  
88 - // },  
89 - // component: () =>  
90 - // import(  
91 - // '/@/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/index.vue'  
92 - // ),  
93 - // },  
94 - // {  
95 - // path: 'PackageProfit',  
96 - // name: 'PackageProfit',  
97 - // meta: {  
98 - // title: '包装费用明细表',  
99 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
100 - // ignoreKeepAlive: false,  
101 - // },  
102 - // component: () =>  
103 - // import(  
104 - // '/@/views/project/finance/financeProfit/ServiceProfit/PackageProfit/index.vue'  
105 - // ),  
106 - // },  
107 - // ],  
108 - // },  
109 - // {  
110 - // path: 'ProductProfit',  
111 - // name: 'ProductProfit',  
112 - // meta: {  
113 - // title: '内部生产净利润分析',  
114 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
115 - // ignoreKeepAlive: false,  
116 - // },  
117 - // children: [  
118 - // {  
119 - // path: 'InnerData',  
120 - // name: 'InnerData',  
121 - // meta: {  
122 - // title: '内部生产净利润分析表',  
123 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
124 - // ignoreKeepAlive: false,  
125 - // },  
126 - // component: () =>  
127 - // import(  
128 - // '/@/views/project/finance/financeProfit/ProductProfit/InnerProduce/index.vue'  
129 - // ),  
130 - // },  
131 - // {  
132 - // path: 'InnerProduce',  
133 - // name: 'InnerProduce',  
134 - // meta: {  
135 - // title: '内部生产明细表',  
136 - // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],  
137 - // ignoreKeepAlive: false,  
138 - // },  
139 - // component: () =>  
140 - // import('/@/views/project/finance/financeProfit/ProductProfit/InnerData/index.vue'),  
141 - // },  
142 - // ],  
143 - // },  
144 - // ],  
145 - // }, 46 + {
  47 + path: 'financeProfit',
  48 + name: 'FinanceProfit',
  49 + meta: {
  50 + title: '净利润分析',
  51 + ignoreKeepAlive: true,
  52 + roles: [
  53 + RoleEnum.ADMIN,
  54 + RoleEnum.FINANCE,
  55 + // RoleEnum.TRACKER,
  56 + // RoleEnum.BUSINESS,
  57 + // RoleEnum.PRODUCE,
  58 + // RoleEnum.DATA_REPORT_USER,
  59 + ],
  60 + },
  61 + children: [
  62 + // {
  63 + // path: '',
  64 + // name: 'Receive',
  65 + // meta: {
  66 + // title: '财务管理',
  67 + // roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  68 + // ignoreKeepAlive: false,
  69 + // },
  70 + // // component: () => import('/@/views/project/finance/index.vue'),
  71 + // },
  72 + {
  73 + path: 'serviceProfit',
  74 + name: 'ServiceProfit',
  75 + meta: {
  76 + title: '业务研发净利润分析',
  77 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  78 + ignoreKeepAlive: false,
  79 + },
  80 + children: [
  81 + {
  82 + path: 'ServiceProfit',
  83 + name: 'ServiceProfit',
  84 + meta: {
  85 + title: '业务研发净利润分析表',
  86 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  87 + ignoreKeepAlive: false,
  88 + },
  89 + component: () =>
  90 + import(
  91 + '/@/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/index.vue'
  92 + ),
  93 + },
  94 + {
  95 + path: 'PackageProfit',
  96 + name: 'PackageProfit',
  97 + meta: {
  98 + title: '包装费用明细表',
  99 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  100 + ignoreKeepAlive: false,
  101 + },
  102 + component: () =>
  103 + import(
  104 + '/@/views/project/finance/financeProfit/ServiceProfit/PackageProfit/index.vue'
  105 + ),
  106 + },
  107 + ],
  108 + },
  109 + {
  110 + path: 'ProductProfit',
  111 + name: 'ProductProfit',
  112 + meta: {
  113 + title: '内部生产净利润分析',
  114 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  115 + ignoreKeepAlive: false,
  116 + },
  117 + children: [
  118 + {
  119 + path: 'InnerData',
  120 + name: 'InnerData',
  121 + meta: {
  122 + title: '内部生产净利润分析表',
  123 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  124 + ignoreKeepAlive: false,
  125 + },
  126 + component: () =>
  127 + import(
  128 + '/@/views/project/finance/financeProfit/ProductProfit/InnerProduce/index.vue'
  129 + ),
  130 + },
  131 + {
  132 + path: 'InnerProduce',
  133 + name: 'InnerProduce',
  134 + meta: {
  135 + title: '内部生产明细表',
  136 + roles: [RoleEnum.ADMIN, RoleEnum.FINANCE, RoleEnum.TRACKER, RoleEnum.BUSINESS],
  137 + ignoreKeepAlive: false,
  138 + },
  139 + component: () =>
  140 + import('/@/views/project/finance/financeProfit/ProductProfit/InnerData/index.vue'),
  141 + },
  142 + ],
  143 + },
  144 + ],
  145 + },
146 ], 146 ],
147 }; 147 };
148 148
src/views/project/config/data.tsx
@@ -148,7 +148,7 @@ export const COLUMNS = { @@ -148,7 +148,7 @@ export const COLUMNS = {
148 }, 148 },
149 }, 149 },
150 { 150 {
151 - title: '提成比例', 151 + title: '提成单价',
152 dataIndex: 'relationValue', 152 dataIndex: 'relationValue',
153 width: 150, 153 width: 150,
154 customRender: (column) => { 154 customRender: (column) => {
src/views/project/finance/financeProfit/ProductProfit/InnerData/FinanceEdit.vue
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 @ok="handleSubmit" 9 @ok="handleSubmit"
10 :showDetailBack="false" 10 :showDetailBack="false"
11 okText="保存" 11 okText="保存"
  12 + @visible-change="handleShow"
12 showFooter 13 showFooter
13 :destroyOnClose="true" 14 :destroyOnClose="true"
14 > 15 >
@@ -19,7 +20,7 @@ @@ -19,7 +20,7 @@
19 <a-input 20 <a-input
20 v-model:value="input1" 21 v-model:value="input1"
21 placeholder="请输入" 22 placeholder="请输入"
22 - :disabled="status1 === 'LOCKED'" 23 + :disabled="status1 == 'LOCKED'"
23 auto-size 24 auto-size
24 /> 25 />
25 <div style="margin: 16px 0"></div> 26 <div style="margin: 16px 0"></div>
@@ -27,7 +28,7 @@ @@ -27,7 +28,7 @@
27 <a-input 28 <a-input
28 v-model:value="input2" 29 v-model:value="input2"
29 placeholder="请输入" 30 placeholder="请输入"
30 - :disabled="status2 === 'LOCKED'" 31 + :disabled="status2 == 'LOCKED'"
31 auto-size 32 auto-size
32 /> 33 />
33 <div style="margin: 16px 0"></div> 34 <div style="margin: 16px 0"></div>
@@ -131,9 +132,9 @@ @@ -131,9 +132,9 @@
131 const id = ref(); 132 const id = ref();
132 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { 133 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
133 // 方式1 134 // 方式1
134 - if (data.data.lockFields) {  
135 - status1.value = data.data?.productionDepartmentPredictPrice;  
136 - status2.value = data.data?.productionActualPrice; 135 + if (data.data?.lockFields) {
  136 + status1.value = data.data?.lockFields?.productionDepartmentPredictPrice;
  137 + status2.value = data.data?.lockFields?.productionActualPrice;
137 } 138 }
138 139
139 id.value = data.data.orderId; 140 id.value = data.data.orderId;
@@ -141,9 +142,9 @@ @@ -141,9 +142,9 @@
141 input2.value = data.data?.productionActualPrice.toFixed(2); 142 input2.value = data.data?.productionActualPrice.toFixed(2);
142 resetFields(); 143 resetFields();
143 setDrawerProps({ confirmLoading: false }); 144 setDrawerProps({ confirmLoading: false });
144 - setFieldsValue({  
145 - ...toRaw(data.data),  
146 - }); 145 + // setFieldsValue({
  146 + // ...toRaw(data.data),
  147 + // });
147 update.value = data; 148 update.value = data;
148 }); 149 });
149 //完成编辑 150 //完成编辑
@@ -166,4 +167,10 @@ @@ -166,4 +167,10 @@
166 closeDrawer(); 167 closeDrawer();
167 } 168 }
168 } 169 }
  170 + function handleShow(visible: boolean) {
  171 + if (!visible) {
  172 + input1.value = '';
  173 + input2.value = '';
  174 + }
  175 + }
169 </script> 176 </script>
src/views/project/finance/financeProfit/ProductProfit/InnerData/data.tsx
@@ -158,7 +158,7 @@ export const COLUMNS = [ @@ -158,7 +158,7 @@ export const COLUMNS = [
158 width: 120, 158 width: 120,
159 customRender: (column) => { 159 customRender: (column) => {
160 if (column.record?.predictRatio) { 160 if (column.record?.predictRatio) {
161 - return column.record?.predictRatio?.toFixed(2) + '%'; 161 + return (column.record?.predictRatio * 100).toFixed(2) + '%';
162 } 162 }
163 return column.record?.predictRatio?.toFixed(2); 163 return column.record?.predictRatio?.toFixed(2);
164 }, 164 },
@@ -169,7 +169,7 @@ export const COLUMNS = [ @@ -169,7 +169,7 @@ export const COLUMNS = [
169 width: 120, 169 width: 120,
170 customRender: (column) => { 170 customRender: (column) => {
171 if (column.record?.predictAndActualRatio) { 171 if (column.record?.predictAndActualRatio) {
172 - return column.record?.predictAndActualRatio?.toFixed(2) + '%'; 172 + return (column.record?.predictAndActualRatio * 100).toFixed(2) + '%';
173 } 173 }
174 return column.record?.predictAndActualRatio?.toFixed(2); 174 return column.record?.predictAndActualRatio?.toFixed(2);
175 }, 175 },
@@ -188,7 +188,7 @@ export const COLUMNS = [ @@ -188,7 +188,7 @@ export const COLUMNS = [
188 width: 120, 188 width: 120,
189 customRender: (column) => { 189 customRender: (column) => {
190 if (column.record?.beforeGrossProfitRate) { 190 if (column.record?.beforeGrossProfitRate) {
191 - return column.record?.beforeGrossProfitRate?.toFixed(2) + '%'; 191 + return (column.record?.beforeGrossProfitRate * 100).toFixed(2) + '%';
192 } 192 }
193 return column.record?.beforeGrossProfitRate?.toFixed(2); 193 return column.record?.beforeGrossProfitRate?.toFixed(2);
194 }, 194 },
@@ -207,7 +207,7 @@ export const COLUMNS = [ @@ -207,7 +207,7 @@ export const COLUMNS = [
207 width: 120, 207 width: 120,
208 customRender: (column) => { 208 customRender: (column) => {
209 if (column.record?.grossProfitRate) { 209 if (column.record?.grossProfitRate) {
210 - return column.record?.grossProfitRate?.toFixed(2) + '%'; 210 + return (column.record?.grossProfitRate * 100).toFixed(2) + '%';
211 } 211 }
212 return column.record?.grossProfitRate?.toFixed(2); 212 return column.record?.grossProfitRate?.toFixed(2);
213 }, 213 },
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/ApproveReason.vue 0 → 100644
  1 +<template>
  2 + <BasicModal
  3 + v-bind="$attrs"
  4 + destroyOnClose
  5 + @register="register"
  6 + title="申请原因"
  7 + :helpMessage="['提示1', '提示2']"
  8 + @open-change="handleShow"
  9 + :bodyStyle="{ height: '200px' }"
  10 + @ok="handleOk"
  11 + z-index="9999"
  12 + >
  13 + <a-textarea v-model:value="input" :rows="7" />
  14 + </BasicModal>
  15 +</template>
  16 +<script lang="ts" setup>
  17 + import { ref, watch } from 'vue';
  18 + import { BasicModal, useModalInner } from '@/components/Modal';
  19 + import { orderAuth } from '/@/api/project/order';
  20 + import { getServiceApplyEdit } from '/@/api/project/invoice';
  21 +
  22 + const emit = defineEmits(['success']);
  23 + const input = ref('');
  24 + const baseFieldValues = ref();
  25 + const [register, { setModalProps, redoModalHeight, closeModal }] = useModalInner(async (data) => {
  26 + baseFieldValues.value = data.data;
  27 + baseFieldValues.value.projectNoPrefix = data.id;
  28 + console.log(data, '5656appr');
  29 + });
  30 + async function handleOk() {
  31 + baseFieldValues.value.applyRemark = input.value;
  32 + await getServiceApplyEdit({
  33 + projectNoPrefix: baseFieldValues.value.projectNoPrefix,
  34 + projectInnerProfitInfoEndTime: baseFieldValues.value.projectInnerProfitInfoEndTime,
  35 + projectInnerProfitInfoStartTime: baseFieldValues.value.projectInnerProfitInfoStartTime,
  36 + type: 'INNER_PROFIT_FIELD_EDIT_APPLY',
  37 + });
  38 + emit('success');
  39 + setTimeout(() => {
  40 + closeModal();
  41 + }, 50);
  42 + }
  43 + function handleShow() {
  44 + input.value = '';
  45 + closeModal();
  46 + }
  47 +</script>
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/CheckDetail.vue 0 → 100644
  1 +<template>
  2 + <div class="container">
  3 + <BasicDrawer
  4 + @register="register"
  5 + v-bind="$attrs"
  6 + showFooter
  7 + title="字段编辑权限申请"
  8 + width="60%"
  9 + :destroyOnClose="true"
  10 + :isDetail="true"
  11 + @ok="handleSubmit"
  12 + :showDetailBack="false"
  13 + okText="申请"
  14 + ><input />
  15 + <div>
  16 + <template v-if="role === ROLE.ADMIN || role === ROLE.FINANCE">
  17 + <BasicForm @register="registerForm" />
  18 + </template>
  19 + </div>
  20 + <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> -->
  21 +
  22 + <!-- <template #appendFooter>
  23 + <a-button type="primary" @click="onGoFormDetail"> 返回编辑</a-button>
  24 + </template> -->
  25 + </BasicDrawer>
  26 + <ApproveReason @register="approveReasonRegister" @success="handleCloseModal" />
  27 + </div>
  28 +</template>
  29 +<script lang="ts">
  30 + import { computed, defineComponent, reactive, ref } from 'vue';
  31 + import { BasicForm, useForm } from '/@/components/Form/index';
  32 + import { getPackageApplyEdit } from '/@/api/project/invoice';
  33 + import { ROLE } from '../../../financeList/type.d';
  34 + import { useModal } from '/@/components/Modal';
  35 + import ApproveReason from './ApproveReason.vue';
  36 + import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
  37 + import { FIELDS_BASE_INFO } from './tableData';
  38 + import { useUserStoreWithOut } from '/@/store/modules/user';
  39 +
  40 + const userStore = useUserStoreWithOut();
  41 + const getSchema = (fields) =>
  42 + fields.map((item) => ({
  43 + field: `${item.field}`,
  44 + dataIndex: `${item.field}`,
  45 + label: item.label,
  46 + component: 'Switch',
  47 + componentProps: {
  48 + checkedValue: 'UN_LOCKED',
  49 + unCheckedValue: 'LOCKED',
  50 + },
  51 + colProps: {
  52 + span: 8,
  53 + },
  54 + }));
  55 +
  56 + export default defineComponent({
  57 + components: { BasicDrawer, BasicForm, ApproveReason },
  58 + props: {
  59 + onGoFormDetail: {
  60 + type: Function,
  61 + },
  62 + },
  63 + setup() {
  64 + const id = ref('');
  65 + const schemas = getSchema(FIELDS_BASE_INFO);
  66 + const [registerForm, { getFieldsValue }] = useForm({
  67 + labelWidth: 180,
  68 + schemas,
  69 + showActionButtonGroup: false,
  70 + actionColOptions: {
  71 + span: 24,
  72 + },
  73 + });
  74 + const [approveReasonRegister, { openModal: openApproveReasonDrawer }] = useModal();
  75 +
  76 + const lockFields = reactive({});
  77 + const [register, { closeDrawer }] = useDrawerInner((data) => {
  78 + Object.assign(lockFields, data.lockFields);
  79 + id.value = data.projectNoPrefix;
  80 + console.log(data, '5656checkdetail');
  81 + });
  82 + function handleCloseModal() {
  83 + closeDrawer();
  84 + }
  85 +
  86 + const role = computed(() => {
  87 + return userStore.getUserInfo?.roleSmallVO?.code;
  88 + });
  89 +
  90 + const handleSubmit = async () => {
  91 + const baseFieldValues = getFieldsValue();
  92 + openApproveReasonDrawer(true, {
  93 + data: baseFieldValues,
  94 + id: id.value,
  95 + });
  96 + };
  97 +
  98 + return {
  99 + register,
  100 + schemas,
  101 + registerForm,
  102 + handleSubmit,
  103 + handleCloseModal,
  104 + approveReasonRegister,
  105 + openApproveReasonDrawer,
  106 + ROLE,
  107 + role,
  108 + };
  109 + },
  110 + });
  111 +</script>
  112 +<style>
  113 + .container {
  114 + position: fixed; /* 或 absolute, fixed */
  115 + z-index: 10;
  116 + }
  117 +</style>
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/FinanceEdit.vue
@@ -3,31 +3,57 @@ @@ -3,31 +3,57 @@
3 <BasicDrawer 3 <BasicDrawer
4 @register="register" 4 @register="register"
5 v-bind="$attrs" 5 v-bind="$attrs"
6 - title="收入款单" 6 + title="编辑"
7 width="30%" 7 width="30%"
8 :isDetail="true" 8 :isDetail="true"
9 @ok="handleSubmit" 9 @ok="handleSubmit"
10 :showDetailBack="false" 10 :showDetailBack="false"
11 okText="保存" 11 okText="保存"
  12 + @visible-change="handleShow"
12 showFooter 13 showFooter
13 :destroyOnClose="true" 14 :destroyOnClose="true"
14 > 15 >
15 <!-- <div> 16 <!-- <div>
16 <BasicForm @register="registerForm" /> 17 <BasicForm @register="registerForm" />
17 </div> --> 18 </div> -->
18 - <div style="font-size: 15px">实际收款金额1$</div>  
19 - <a-input v-model:value="input1" placeholder="请输入" :disabled="status === 10" auto-size />  
20 - <div style="margin: 16px 0"></div>  
21 - <div style="font-size: 15px">实际收款金额2$</div>  
22 - <a-input v-model:value="input2" placeholder="请输入" :disabled="status === 10" auto-size /> 19 + <!-- <div style="font-size: 15px">研发复制费合计¥</div>
  20 + <a-input
  21 + v-model:value="input1"
  22 + placeholder="请输入"
  23 + :disabled="status1 === 'LOCKED'"
  24 + auto-size
  25 + /> -->
23 <div style="margin: 16px 0"></div> 26 <div style="margin: 16px 0"></div>
24 <div style="font-size: 15px">项目开始时间</div> 27 <div style="font-size: 15px">项目开始时间</div>
25 - <a-date-picker v-model:value="input3" :disabled="status === 10" auto-size /> 28 + <a-date-picker v-model:value="input3" :disabled="status3 === 'LOCKED'" auto-size />
26 <div style="margin: 16px 0"></div> 29 <div style="margin: 16px 0"></div>
27 <div style="font-size: 15px">项目结束时间</div> 30 <div style="font-size: 15px">项目结束时间</div>
28 - <a-date-picker v-model:value="input4" :disabled="status === 10" auto-size /> 31 + <a-date-picker v-model:value="input4" :disabled="status4 === 'LOCKED'" auto-size />
  32 + <!-- <div style="margin: 16px 0"></div>
  33 + <div style="font-size: 15px">西班牙已发提成¥</div>
  34 + <a-input
  35 + v-model:value="input2"
  36 + placeholder="请输入"
  37 + :disabled="status2 === 'LOCKED'"
  38 + auto-size
  39 + />
  40 + <div style="margin: 16px 0"></div>
  41 + <div style="font-size: 15px">中国团队已发提成¥</div>
  42 + <a-input
  43 + v-model:value="input5"
  44 + placeholder="请输入"
  45 + :disabled="status5 === 'LOCKED'"
  46 + auto-size
  47 + />
  48 + <div style="margin: 16px 0"></div>
  49 + <div style="font-size: 15px">实际汇率¥</div>
  50 + <a-input
  51 + v-model:value="input6"
  52 + placeholder="请输入"
  53 + :disabled="status6 === 'LOCKED'"
  54 + auto-size
  55 + /> -->
29 <div style="margin: 16px 0"></div> 56 <div style="margin: 16px 0"></div>
30 -  
31 <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> --> 57 <!-- <template #titleToolbar> <a-button type="primary"> 申请编辑权限 </a-button></template> -->
32 <template #appendFooter> 58 <template #appendFooter>
33 <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> --> 59 <!-- <a-button type="primary" @click="onGoCheckDetail"> 申请权限</a-button> -->
@@ -39,10 +65,11 @@ @@ -39,10 +65,11 @@
39 import { BasicDrawer, useDrawerInner } from '@/components/Drawer'; 65 import { BasicDrawer, useDrawerInner } from '@/components/Drawer';
40 import { BasicForm, FormSchema, useForm } from '@/components/Form'; 66 import { BasicForm, FormSchema, useForm } from '@/components/Form';
41 import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue'; 67 import { defineComponent, ref, computed, unref, toRaw, reactive } from 'vue';
42 - import { getEmailList } from '/@/api/sys/config';  
43 - import { updateAmount } from '@/api/project/invoice'; 68 + import { getServiceEdit } from '@/api/project/invoice';
44 import { useMessage } from '/@/hooks/web/useMessage'; 69 import { useMessage } from '/@/hooks/web/useMessage';
45 import { ROLE } from './type.d'; 70 import { ROLE } from './type.d';
  71 + import type { Dayjs } from 'dayjs';
  72 + import dayjs from 'dayjs';
46 73
47 const emit = defineEmits(['success']); 74 const emit = defineEmits(['success']);
48 const role = computed(() => { 75 const role = computed(() => {
@@ -59,16 +86,16 @@ @@ -59,16 +86,16 @@
59 // label: '实际应收金额', 86 // label: '实际应收金额',
60 // }, 87 // },
61 { 88 {
62 - field: 'actualPayedAmount1', 89 + field: 'developmentCopyRmbTotalPrice',
63 component: 'InputNumber', 90 component: 'InputNumber',
64 labelWidth: 250, 91 labelWidth: 250,
65 colProps: { 92 colProps: {
66 span: 23, 93 span: 23,
67 }, 94 },
68 - componentProps: () => ({  
69 - disabled: status.value === 10,  
70 - }),  
71 - label: '实际应收金额1$', 95 + // componentProps: () => ({
  96 + // disabled: status.value === 10,
  97 + // }),
  98 + label: '研发复制费合计¥',
72 }, 99 },
73 { 100 {
74 field: 'actualPayedAmount2', 101 field: 'actualPayedAmount2',
@@ -77,9 +104,7 @@ @@ -77,9 +104,7 @@
77 colProps: { 104 colProps: {
78 span: 23, 105 span: 23,
79 }, 106 },
80 - componentProps: () => ({  
81 - disabled: status.value === 10,  
82 - }), 107 +
83 label: '实际应收金额2$', 108 label: '实际应收金额2$',
84 }, 109 },
85 { 110 {
@@ -89,9 +114,7 @@ @@ -89,9 +114,7 @@
89 colProps: { 114 colProps: {
90 span: 23, 115 span: 23,
91 }, 116 },
92 - componentProps: () => ({  
93 - disabled: status.value === 10,  
94 - }), 117 +
95 label: '实际应收金额3$', 118 label: '实际应收金额3$',
96 }, 119 },
97 { 120 {
@@ -101,9 +124,7 @@ @@ -101,9 +124,7 @@
101 colProps: { 124 colProps: {
102 span: 23, 125 span: 23,
103 }, 126 },
104 - componentProps: () => ({  
105 - disabled: status.value === 10,  
106 - }), 127 +
107 label: '其他费用金额$', 128 label: '其他费用金额$',
108 }, 129 },
109 ]; 130 ];
@@ -120,21 +141,61 @@ @@ -120,21 +141,61 @@
120 const { error } = createMessage; 141 const { error } = createMessage;
121 142
122 const update = ref(); 143 const update = ref();
123 - const status = ref(); 144 + const status1 = ref();
  145 + const status2 = ref();
  146 + const status3 = ref();
  147 + const status4 = ref();
  148 + const status5 = ref();
  149 + const status6 = ref();
124 150
125 const input1 = ref(); 151 const input1 = ref();
126 const input2 = ref(); 152 const input2 = ref();
127 const input3 = ref(); 153 const input3 = ref();
128 const input4 = ref(); 154 const input4 = ref();
  155 +
  156 + const input5 = ref();
  157 + const input6 = ref();
129 const id = ref(); 158 const id = ref();
  159 + // function formatDate(dateStr: string): string {
  160 + // const date = new Date(dateStr);
  161 + // const year = date.getFullYear();
  162 + // const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,+1
  163 + // const day = String(date.getDate()).padStart(2, '0');
  164 + // const hours = String(date.getHours()).padStart(2, '0');
  165 + // const minutes = String(date.getMinutes()).padStart(2, '0');
  166 + // const seconds = String(date.getSeconds()).padStart(2, '0');
  167 +
  168 + // // 返回格式化后的字符串:'YYYY-MM-DD HH:mm:ss'
  169 + // return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  170 + // }
  171 + function formatDateToDateOnly(dateStr: string): string {
  172 + const date = new Date(dateStr);
  173 + const year = date.getFullYear();
  174 + const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,+1
  175 + const day = String(date.getDate()).padStart(2, '0');
  176 +
  177 + // 返回格式化后的日期字符串:'YYYY-MM-DD'
  178 + return `${year}-${month}-${day}`;
  179 + }
130 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => { 180 const [register, { setDrawerProps, closeDrawer }] = useDrawerInner((data) => {
131 // 方式1 181 // 方式1
132 - status.value = data.data.invoiceStatus;  
133 - id.value = data.data.invoiceId;  
134 - input1.value = data.data.invoiceActualPayedAmount1;  
135 - input2.value = data.data.invoiceActualPayedAmount2;  
136 - input3.value = data.data.invoiceActualPayedAmount3;  
137 - input4.value = data.data.invoiceOtherAmount; 182 + if (data.data.lockFields) {
  183 + status1.value = data?.data?.lockFields?.developmentCopyRmbTotalPrice;
  184 + status2.value = data?.data?.lockFields?.spainPaidRmbCommission;
  185 + status3.value = data?.data?.lockFields?.projectInnerProfitInfoStartTime;
  186 + status4.value = data?.data?.lockFields?.projectInnerProfitInfoEndTime;
  187 + status5.value = data?.data?.lockFields?.paidRmbCommission;
  188 + status6.value = data?.data?.lockFields?.actualExchangeRate;
  189 + }
  190 + id.value = data?.data?.projectNoPrefix;
  191 + console.log(data.data, '5656datafff');
  192 + input1.value = data?.data?.developmentCopyRmbTotalPrice?.toFixed(2);
  193 + input2.value = data?.data?.spainPaidRmbCommission?.toFixed(2);
  194 + input3.value = dayjs(formatDateToDateOnly(data?.data?.produceStartTime));
  195 + input4.value = dayjs(formatDateToDateOnly(data?.data?.produceEndTime));
  196 + input5.value = data?.data?.paidRmbCommission?.toFixed(2);
  197 + input6.value = data?.data?.actualExchangeRate?.toFixed(2);
  198 +
138 resetFields(); 199 resetFields();
139 setDrawerProps({ confirmLoading: false }); 200 setDrawerProps({ confirmLoading: false });
140 setFieldsValue({ 201 setFieldsValue({
@@ -153,15 +214,27 @@ @@ -153,15 +214,27 @@
153 if (!input1.value || !input2.value || !input3.value || !input4.value) { 214 if (!input1.value || !input2.value || !input3.value || !input4.value) {
154 error('选项不能为空'); 215 error('选项不能为空');
155 } else { 216 } else {
156 - await updateAmount({  
157 - id: id.value,  
158 - actualPayedAmount1: input1.value,  
159 - actualPayedAmount2: input2.value,  
160 - actualPayedAmount3: input3.value,  
161 - otherAmount: input4.value, 217 + await getServiceEdit({
  218 + projectNoPrefix: id.value,
  219 + developmentCopyRmbTotalPrice: input1.value,
  220 + spainPaidRmbCommission: input2.value,
  221 + projectStartTime: input3.value,
  222 + projectEndTime: input4.value,
  223 + paidRmbCommission: input5.value,
  224 + actualExchangeRate: input6.value,
162 }); 225 });
163 emit('success'); 226 emit('success');
164 closeDrawer(); 227 closeDrawer();
165 } 228 }
166 } 229 }
  230 + function handleShow(visible: boolean) {
  231 + if (!visible) {
  232 + input1.value = '';
  233 + input2.value = '';
  234 + input3.value = '';
  235 + input4.value = '';
  236 + input5.value = '';
  237 + input6.value = '';
  238 + }
  239 + }
167 </script> 240 </script>
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/data.tsx
@@ -113,14 +113,14 @@ export const COLUMNS = [ @@ -113,14 +113,14 @@ export const COLUMNS = [
113 dataIndex: 'orderCount', 113 dataIndex: 'orderCount',
114 width: 100, 114 width: 100,
115 }, 115 },
116 - {  
117 - title: '生产科单价¥',  
118 - dataIndex: 'productionDepartmentPrice',  
119 - width: 120,  
120 - customRender: (column) => {  
121 - return column.record?.productionDepartmentPrice?.toFixed(2);  
122 - },  
123 - }, 116 + // {
  117 + // title: '生产科单价¥',
  118 + // dataIndex: 'productionDepartmentPrice',
  119 + // width: 120,
  120 + // customRender: (column) => {
  121 + // return column.record?.productionDepartmentPrice?.toFixed(2);
  122 + // },
  123 + // },
124 { 124 {
125 title: '生产科总价¥', 125 title: '生产科总价¥',
126 dataIndex: 'productionDepartmentTotalPrice', 126 dataIndex: 'productionDepartmentTotalPrice',
@@ -151,7 +151,7 @@ export const COLUMNS = [ @@ -151,7 +151,7 @@ export const COLUMNS = [
151 width: 120, 151 width: 120,
152 customRender: (column) => { 152 customRender: (column) => {
153 if (column.record?.predictRatio) { 153 if (column.record?.predictRatio) {
154 - return column.record?.predictRatio?.toFixed(2) + '%'; 154 + return (column.record?.predictRatio * 100).toFixed(2) + '%';
155 } 155 }
156 return column.record?.predictRatio?.toFixed(2); 156 return column.record?.predictRatio?.toFixed(2);
157 }, 157 },
@@ -162,7 +162,7 @@ export const COLUMNS = [ @@ -162,7 +162,7 @@ export const COLUMNS = [
162 width: 190, 162 width: 190,
163 customRender: (column) => { 163 customRender: (column) => {
164 if (column.record?.predictAndActualRatio) { 164 if (column.record?.predictAndActualRatio) {
165 - return column.record?.predictAndActualRatio?.toFixed(2) + '%'; 165 + return (column.record?.predictAndActualRatio * 100).toFixed(2) + '%';
166 } 166 }
167 return column.record?.predictAndActualRatio?.toFixed(2); 167 return column.record?.predictAndActualRatio?.toFixed(2);
168 }, 168 },
@@ -181,7 +181,7 @@ export const COLUMNS = [ @@ -181,7 +181,7 @@ export const COLUMNS = [
181 width: 120, 181 width: 120,
182 customRender: (column) => { 182 customRender: (column) => {
183 if (column.record?.beforeGrossProfitRate) { 183 if (column.record?.beforeGrossProfitRate) {
184 - return column.record?.beforeGrossProfitRate?.toFixed(2) + '%'; 184 + return (column.record?.beforeGrossProfitRate * 100).toFixed(2) + '%';
185 } 185 }
186 return column.record?.beforeGrossProfitRate?.toFixed(2); 186 return column.record?.beforeGrossProfitRate?.toFixed(2);
187 }, 187 },
@@ -200,7 +200,7 @@ export const COLUMNS = [ @@ -200,7 +200,7 @@ export const COLUMNS = [
200 width: 120, 200 width: 120,
201 customRender: (column) => { 201 customRender: (column) => {
202 if (column.record?.grossProfitRate) { 202 if (column.record?.grossProfitRate) {
203 - return column.record?.grossProfitRate?.toFixed(2) + '%'; 203 + return (column.record?.grossProfitRate * 100).toFixed(2) + '%';
204 } 204 }
205 return column.record?.grossProfitRate?.toFixed(2); 205 return column.record?.grossProfitRate?.toFixed(2);
206 }, 206 },
@@ -235,7 +235,7 @@ export const COLUMNS = [ @@ -235,7 +235,7 @@ export const COLUMNS = [
235 width: 150, 235 width: 150,
236 customRender: (column) => { 236 customRender: (column) => {
237 if (column.record?.innerProductionProfitRate) { 237 if (column.record?.innerProductionProfitRate) {
238 - return column.record?.innerProductionProfitRate?.toFixed(2) + '%'; 238 + return (column.record?.innerProductionProfitRate * 100).toFixed(2) + '%';
239 } 239 }
240 return column.record?.innerProductionProfitRate?.toFixed(2); 240 return column.record?.innerProductionProfitRate?.toFixed(2);
241 }, 241 },
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/index.vue
@@ -5,9 +5,9 @@ @@ -5,9 +5,9 @@
5 <template v-if="column.key === 'picUrl'"> 5 <template v-if="column.key === 'picUrl'">
6 <img :z-index="100000" :width="50" :height="50" :src="record?.picUrl" /> 6 <img :z-index="100000" :width="50" :height="50" :src="record?.picUrl" />
7 </template> 7 </template>
8 - <!-- <template v-if="column.key === 'action'"> 8 + <template v-if="column.key === 'action'">
9 <TableAction :actions="createActions(record)" /> 9 <TableAction :actions="createActions(record)" />
10 - </template> --> 10 + </template>
11 <!-- <template v-if="column.key === 'relationValue'"> 11 <!-- <template v-if="column.key === 'relationValue'">
12 <a-input 12 <a-input
13 v-if="record.settingValue === 'A01'" 13 v-if="record.settingValue === 'A01'"
@@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
32 <a-textarea :rows="6" placeholder="请输入拒绝原因" v-model:value="message" /> 32 <a-textarea :rows="6" placeholder="请输入拒绝原因" v-model:value="message" />
33 </div> 33 </div>
34 </BasicModal> --> 34 </BasicModal> -->
  35 + <CheckDetail @register="checkModalRegister" />
35 <FinanceEdit @register="registerFinanceEdit" @success="handleSuccess" /> 36 <FinanceEdit @register="registerFinanceEdit" @success="handleSuccess" />
36 </div> 37 </div>
37 </template> 38 </template>
@@ -44,12 +45,14 @@ @@ -44,12 +45,14 @@
44 import { onMounted, ref } from 'vue'; 45 import { onMounted, ref } from 'vue';
45 import { useDrawer } from '/@/components/Drawer'; 46 import { useDrawer } from '/@/components/Drawer';
46 import FinanceEdit from './FinanceEdit.vue'; 47 import FinanceEdit from './FinanceEdit.vue';
  48 + import CheckDetail from './CheckDetail.vue';
47 import { useOrderStoreWithOut } from '/@/store/modules/order'; 49 import { useOrderStoreWithOut } from '/@/store/modules/order';
48 50
49 const { createMessage } = useMessage(); 51 const { createMessage } = useMessage();
50 const { error } = createMessage; 52 const { error } = createMessage;
51 const message = ref(); 53 const message = ref();
52 const orderStore = useOrderStoreWithOut(); 54 const orderStore = useOrderStoreWithOut();
  55 + const [checkModalRegister, { openDrawer: openCheckDetailDrawer }] = useDrawer();
53 const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer(); 56 const [registerFinanceEdit, { openDrawer: openFinanceEdit }] = useDrawer();
54 const handleOk = (record) => { 57 const handleOk = (record) => {
55 // 修改父组件的状态 58 // 修改父组件的状态
@@ -77,65 +80,72 @@ @@ -77,65 +80,72 @@
77 tableSetting: { 80 tableSetting: {
78 setting: false, 81 setting: false,
79 }, 82 },
  83 + actionColumn: {
  84 + width: 240,
  85 + title: 'Action',
  86 + dataIndex: 'action',
  87 + },
80 }); 88 });
81 89
82 - // function createActions(record: any): any[] {  
83 - // if (!record.editable) {  
84 - // return [  
85 - // // {  
86 - // // label: '财务编辑',  
87 - // // onClick: handleFinanceEdit.bind(null, record),  
88 - // // },  
89 - // // {  
90 - // // label: '编辑',  
91 - // // onClick: handleEdit.bind(null, record),  
92 - // // },  
93 - // // {  
94 - // // label: '删除',  
95 - // // popConfirm: {  
96 - // // title: '确认删除?',  
97 - // // confirm: handleDelete.bind(null, record),  
98 - // // },  
99 - // // },  
100 - // // {  
101 - // // label: '申请权限',  
102 - // // // popConfirm: {  
103 - // // // title: '确认申请?',  
104 - // // // confirm: handleFalse.bind(null, record),  
105 - // // // },  
106 - // // onClick: handleFalse.bind(null, record),  
107 - // // },  
108 - // ];  
109 - // }  
110 - // return [  
111 - // {  
112 - // label: '保存',  
113 - // onClick: handleSave.bind(null, record),  
114 - // },  
115 - // {  
116 - // label: '取消',  
117 - // popConfirm: {  
118 - // title: '是否取消编辑',  
119 - // confirm: handleCancel.bind(null, record),  
120 - // },  
121 - // },  
122 - // ];  
123 - // } 90 + function createActions(record: any): any[] {
  91 + if (!record.editable) {
  92 + return [
  93 + {
  94 + label: '财务编辑',
  95 + onClick: handleFinanceEdit.bind(null, record),
  96 + },
  97 + // {
  98 + // label: '编辑',
  99 + // onClick: handleEdit.bind(null, record),
  100 + // },
  101 + // {
  102 + // label: '删除',
  103 + // popConfirm: {
  104 + // title: '确认删除?',
  105 + // confirm: handleDelete.bind(null, record),
  106 + // },
  107 + // },
  108 + {
  109 + label: '申请权限',
  110 + // popConfirm: {
  111 + // title: '确认申请?',
  112 + // confirm: handleFalse.bind(null, record),
  113 + // },
  114 + onClick: handleFalse.bind(null, record),
  115 + },
  116 + ];
  117 + }
  118 + return [
  119 + {
  120 + label: '保存',
  121 + onClick: handleSave.bind(null, record),
  122 + },
  123 + {
  124 + label: '取消',
  125 + popConfirm: {
  126 + title: '是否取消编辑',
  127 + confirm: handleCancel.bind(null, record),
  128 + },
  129 + },
  130 + ];
  131 + }
124 132
125 onMounted(async () => { 133 onMounted(async () => {
126 await orderStore.getDict(); 134 await orderStore.getDict();
127 }); 135 });
128 136
129 function handleFinanceEdit(record) { 137 function handleFinanceEdit(record) {
  138 + console.log(record, '565656ddd');
130 openFinanceEdit(true, { 139 openFinanceEdit(true, {
131 data: record, 140 data: record,
132 }); 141 });
133 } 142 }
134 143
135 - // async function handleFalse(record: any) {  
136 - // console.log(record);  
137 - // // openModal(true, { record });  
138 - // } 144 + function handleFalse(record, e) {
  145 + openCheckDetailDrawer(true, record);
  146 + e?.stopPropagation();
  147 + return false;
  148 + }
139 149
140 async function handleSave(record) { 150 async function handleSave(record) {
141 await saveConfig({ id: record.id, relationValue: record.relationValue }); 151 await saveConfig({ id: record.id, relationValue: record.relationValue });
@@ -154,9 +164,14 @@ @@ -154,9 +164,14 @@
154 record.onEdit?.(false, false); 164 record.onEdit?.(false, false);
155 } 165 }
156 166
157 - async function handleDelete(record) {  
158 - await deleteConfig({ ids: [record.id] });  
159 - reload(); 167 + // async function handleDelete(record) {
  168 + // await deleteConfig({ ids: [record.id] });
  169 + // reload();
  170 + // }
  171 + function handleSuccess() {
  172 + setTimeout(() => {
  173 + reload();
  174 + }, 50);
160 } 175 }
161 </script> 176 </script>
162 <style></style> 177 <style></style>
src/views/project/finance/financeProfit/ProductProfit/InnerProduce/tableData.tsx
@@ -21,74 +21,18 @@ const orderStore = useOrderStoreWithOut(); @@ -21,74 +21,18 @@ const orderStore = useOrderStoreWithOut();
21 // 基本信息 21 // 基本信息
22 export const FIELDS_BASE_INFO = [ 22 export const FIELDS_BASE_INFO = [
23 { 23 {
24 - field: 'customerCode', 24 + field: 'projectInnerProfitInfoStartTime',
25 component: 'Select', 25 component: 'Select',
26 labelWidth: 150, 26 labelWidth: 150,
27 - label: '客户编码', 27 + label: '项目开始时间',
28 rules: [{ required: true }], 28 rules: [{ required: true }],
29 }, 29 },
30 { 30 {
31 - field: 'projectNo',  
32 - component: 'Input',  
33 - labelWidth: 150,  
34 - label: '项目号',  
35 - rules: [{ required: true }],  
36 - },  
37 - {  
38 - field: 'productionDepartment', 31 + field: 'projectInnerProfitInfoEndTime',
39 component: 'Select', 32 component: 'Select',
40 - // componentProps: {  
41 - // options: productionDepartmentOptions,  
42 - // },  
43 labelWidth: 150, 33 labelWidth: 150,
44 - label: '生产科', 34 + label: '项目结束时间',
45 rules: [{ required: true }], 35 rules: [{ required: true }],
46 }, 36 },
47 -  
48 - {  
49 - field: 'innerNo',  
50 - component: 'Input',  
51 - labelWidth: 150,  
52 - label: '内部编号',  
53 - rules: [  
54 - { required: true },  
55 - {  
56 - validator: async (rule, value) => {  
57 - if (value.includes(' ')) {  
58 - return Promise.reject();  
59 - }  
60 - return Promise.resolve();  
61 - },  
62 - message: '内容存在空格,请检查',  
63 - trigger: ['change', 'blur'],  
64 - },  
65 - ],  
66 - },  
67 - {  
68 - field: 'customerPo',  
69 - component: 'Input',  
70 - labelWidth: 150,  
71 - label: '客户po号',  
72 - rules: [{ required: true }],  
73 - },  
74 - {  
75 - field: 'customerStyle',  
76 - component: 'Input',  
77 - labelWidth: 150,  
78 - label: '客户STYLE',  
79 - rules: [  
80 - { required: true },  
81 - {  
82 - validator: async (rule, value) => {  
83 - if (value.includes(' ')) {  
84 - return Promise.reject();  
85 - }  
86 - return Promise.resolve();  
87 - },  
88 - message: '内容存在空格,请检查',  
89 - trigger: ['change', 'blur'],  
90 - },  
91 - ],  
92 - },  
93 ]; 37 ];
94 38
src/views/project/finance/financeProfit/ServiceProfit/PackageProfit/data.tsx
@@ -182,7 +182,7 @@ export const COLUMNS = [ @@ -182,7 +182,7 @@ export const COLUMNS = [
182 width: 140, 182 width: 140,
183 customRender: (column) => { 183 customRender: (column) => {
184 if (column.record?.packetProfitRate) { 184 if (column.record?.packetProfitRate) {
185 - return column.record?.packetProfitRate?.toFixed(2) + '%'; 185 + return (column.record?.packetProfitRate * 100).toFixed(2) + '%';
186 } 186 }
187 return column.record?.packetProfitRate?.toFixed(2); 187 return column.record?.packetProfitRate?.toFixed(2);
188 }, 188 },
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/ApproveReason.vue
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
37 projectEndTime: baseFieldValues.value.projectEndTime, 37 projectEndTime: baseFieldValues.value.projectEndTime,
38 spainPaidRmbCommission: baseFieldValues.value.spainPaidRmbCommission, 38 spainPaidRmbCommission: baseFieldValues.value.spainPaidRmbCommission,
39 applyRemark: baseFieldValues.value.applyRemark, 39 applyRemark: baseFieldValues.value.applyRemark,
  40 + type: 'FIELD_EDIT_APPLY',
40 }); 41 });
41 emit('success'); 42 emit('success');
42 setTimeout(() => { 43 setTimeout(() => {
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/FinanceEdit.vue
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 @ok="handleSubmit" 9 @ok="handleSubmit"
10 :showDetailBack="false" 10 :showDetailBack="false"
11 okText="保存" 11 okText="保存"
  12 + @visible-change="handleShow"
12 showFooter 13 showFooter
13 :destroyOnClose="true" 14 :destroyOnClose="true"
14 > 15 >
@@ -150,8 +151,7 @@ @@ -150,8 +151,7 @@
150 const input1 = ref(); 151 const input1 = ref();
151 const input2 = ref(); 152 const input2 = ref();
152 const input3 = ref(); 153 const input3 = ref();
153 - // const input4 = ref();  
154 - const input4 = ref(dayjs('2013-12-01')); 154 + const input4 = ref();
155 155
156 const input5 = ref(); 156 const input5 = ref();
157 const input6 = ref(); 157 const input6 = ref();
@@ -187,7 +187,6 @@ @@ -187,7 +187,6 @@
187 status5.value = data?.data?.lockFields?.paidRmbCommission; 187 status5.value = data?.data?.lockFields?.paidRmbCommission;
188 status6.value = data?.data?.lockFields?.actualExchangeRate; 188 status6.value = data?.data?.lockFields?.actualExchangeRate;
189 } 189 }
190 - console.log(data.data.lockFields, '5656vdata.data.lockFields');  
191 id.value = data?.data?.projectNoPrefix; 190 id.value = data?.data?.projectNoPrefix;
192 input1.value = data?.data?.developmentCopyRmbTotalPrice.toFixed(2); 191 input1.value = data?.data?.developmentCopyRmbTotalPrice.toFixed(2);
193 input2.value = data?.data?.spainPaidRmbCommission.toFixed(2); 192 input2.value = data?.data?.spainPaidRmbCommission.toFixed(2);
@@ -195,6 +194,7 @@ @@ -195,6 +194,7 @@
195 input4.value = dayjs(formatDateToDateOnly(data?.data?.projectEndTime)); 194 input4.value = dayjs(formatDateToDateOnly(data?.data?.projectEndTime));
196 input5.value = data?.data?.paidRmbCommission.toFixed(2); 195 input5.value = data?.data?.paidRmbCommission.toFixed(2);
197 input6.value = data?.data?.actualExchangeRate.toFixed(2); 196 input6.value = data?.data?.actualExchangeRate.toFixed(2);
  197 +
198 resetFields(); 198 resetFields();
199 setDrawerProps({ confirmLoading: false }); 199 setDrawerProps({ confirmLoading: false });
200 setFieldsValue({ 200 setFieldsValue({
@@ -226,4 +226,14 @@ @@ -226,4 +226,14 @@
226 closeDrawer(); 226 closeDrawer();
227 } 227 }
228 } 228 }
  229 + function handleShow(visible: boolean) {
  230 + if (!visible) {
  231 + input1.value = '';
  232 + input2.value = '';
  233 + input3.value = '';
  234 + input4.value = '';
  235 + input5.value = '';
  236 + input6.value = '';
  237 + }
  238 + }
229 </script> 239 </script>
src/views/project/finance/financeProfit/ServiceProfit/ServiceProfit/data.tsx
@@ -132,7 +132,8 @@ export const COLUMNS = [ @@ -132,7 +132,8 @@ export const COLUMNS = [
132 dataIndex: 'packetTotalPrice', 132 dataIndex: 'packetTotalPrice',
133 width: 150, 133 width: 150,
134 customRender: (column) => { 134 customRender: (column) => {
135 - return column.record?.packetTotalPrice?.toFixed(2); 135 + console.log(column, '5656666666');
  136 + return column.record?.packetRmbTotalPrice?.toFixed(2);
136 }, 137 },
137 }, 138 },
138 { 139 {
@@ -229,7 +230,7 @@ export const COLUMNS = [ @@ -229,7 +230,7 @@ export const COLUMNS = [
229 width: 120, 230 width: 120,
230 customRender: (column) => { 231 customRender: (column) => {
231 if (column.record?.profitRate) { 232 if (column.record?.profitRate) {
232 - return column.record?.profitRate?.toFixed(2) + '%'; 233 + return (column.record?.profitRate * 100).toFixed(2) + '%';
233 } 234 }
234 return column.record?.profitRate?.toFixed(2); 235 return column.record?.profitRate?.toFixed(2);
235 }, 236 },
@@ -248,7 +249,7 @@ export const COLUMNS = [ @@ -248,7 +249,7 @@ export const COLUMNS = [
248 width: 120, 249 width: 120,
249 customRender: (column) => { 250 customRender: (column) => {
250 if (column.record?.developmentProfitRate) { 251 if (column.record?.developmentProfitRate) {
251 - return column.record?.developmentProfitRate?.toFixed(2) + '%'; 252 + return (column.record?.developmentProfitRate * 100).toFixed(2) + '%';
252 } 253 }
253 return column.record?.developmentProfitRate?.toFixed(2); 254 return column.record?.developmentProfitRate?.toFixed(2);
254 }, 255 },
vite.config.ts
@@ -30,7 +30,18 @@ export default defineApplicationConfig({ @@ -30,7 +30,18 @@ export default defineApplicationConfig({
30 }, 30 },
31 }, 31 },
32 '/basic-api/order': { 32 '/basic-api/order': {
33 - target: 'http://47.104.8.35:8000', 33 + target: 'http://47.104.8.35:18000',
  34 + // target: 'http://localhost:18000',
  35 + // target: 'http://39.108.227.113:8000',
  36 + // target: 'http://localhost:8000',
  37 + // target: 'http://39.108.227.113:3000/mock/35',
  38 + // http://39.108.227.113:8000/order/erp/captcha/get_img_captcha_code
  39 + changeOrigin: true,
  40 + ws: true,
  41 + rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
  42 + },
  43 + '/basic-api/project': {
  44 + target: 'http://47.104.8.35:18000',
34 // target: 'http://localhost:18000', 45 // target: 'http://localhost:18000',
35 // target: 'http://39.108.227.113:8000', 46 // target: 'http://39.108.227.113:8000',
36 // target: 'http://localhost:8000', 47 // target: 'http://localhost:8000',
@@ -40,19 +51,8 @@ export default defineApplicationConfig({ @@ -40,19 +51,8 @@ export default defineApplicationConfig({
40 ws: true, 51 ws: true,
41 rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), 52 rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
42 }, 53 },
43 - // '/basic-api/project': {  
44 - // target: 'http://47.104.8.35:8000',  
45 - // // target: 'http://localhost:18000',  
46 - // // target: 'http://39.108.227.113:8000',  
47 - // // target: 'http://localhost:8000',  
48 - // // target: 'http://39.108.227.113:3000/mock/35',  
49 - // // http://39.108.227.113:8000/order/erp/captcha/get_img_captcha_code  
50 - // changeOrigin: true,  
51 - // ws: true,  
52 - // rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),  
53 - // },  
54 '/api/localStorage/upload': { 54 '/api/localStorage/upload': {
55 - target: 'http://47.104.8.35:8000', 55 + target: 'http://47.104.8.35:18000',
56 // target: 'http://localhost:18000', 56 // target: 'http://localhost:18000',
57 // target: 'http://39.108.227.113:8000', 57 // target: 'http://39.108.227.113:8000',
58 // target: '192.168.31.250:18000', 58 // target: '192.168.31.250:18000',