Commit 7a8f528e339de462f1db5ac14f97cc15dd104d2c
1 parent
5a520b62
修改财务页面搜索框
Showing
4 changed files
with
31 additions
and
24 deletions
src/views/project/config/data.tsx
1 | -import { Tag } from 'ant-design-vue'; | 1 | +import { InputNumber, Tag } from 'ant-design-vue'; |
2 | import { BasicColumn } from '@/components/Table'; | 2 | import { BasicColumn } from '@/components/Table'; |
3 | import { func } from 'vue-types'; | 3 | import { func } from 'vue-types'; |
4 | -import { h } from 'vue'; | 4 | +import { h, ref } from 'vue'; |
5 | + | ||
5 | 6 | ||
6 | export const COLUMNS = { | 7 | export const COLUMNS = { |
7 | 1: [ | 8 | 1: [ |
@@ -16,6 +17,15 @@ export const COLUMNS = { | @@ -16,6 +17,15 @@ export const COLUMNS = { | ||
16 | width: 150, | 17 | width: 150, |
17 | editComponent: 'InputNumber', | 18 | editComponent: 'InputNumber', |
18 | editRow: true, | 19 | editRow: true, |
20 | + // Function to determine if the row is editable based on the value of 'relationValue' | ||
21 | + // editRow: (text) => { | ||
22 | + // console.log(text, '56565665editrecord'); // Log the text value for debugging | ||
23 | + // return false; // Only make the row editable if the value is 0.34 | ||
24 | + // }, | ||
25 | + // onEditRow: (text, record) => { | ||
26 | + // console.log(text, '56565665editrecord', record); // Log the text value for debugging | ||
27 | + // return false; // Only make the row editable if the value is 0.34 | ||
28 | + // }, | ||
19 | }, | 29 | }, |
20 | ], | 30 | ], |
21 | 2: [ | 31 | 2: [ |
@@ -243,3 +253,8 @@ export const columnsProduct: BasicColumn[] = [ | @@ -243,3 +253,8 @@ export const columnsProduct: BasicColumn[] = [ | ||
243 | editRow: true, | 253 | editRow: true, |
244 | }, | 254 | }, |
245 | ]; | 255 | ]; |
256 | +const handleEdit = (key, value) => { | ||
257 | + // Logic to update the data based on key and value | ||
258 | + // You can update the state or call your API depending on how your data is structured | ||
259 | + console.log(`Editing row ${key}, new value: ${value}`); | ||
260 | +}; |
src/views/project/finance/financeList/finance.data.tsx
@@ -14,18 +14,7 @@ const projectNoOptions = ref([]); | @@ -14,18 +14,7 @@ const projectNoOptions = ref([]); | ||
14 | const orderStore = useOrderStoreWithOut(); | 14 | const orderStore = useOrderStoreWithOut(); |
15 | const { | 15 | const { |
16 | customerCode, | 16 | customerCode, |
17 | - projectNo, | ||
18 | productionDepartment, | 17 | productionDepartment, |
19 | - innerNo, | ||
20 | - poColor, | ||
21 | - cnColor, | ||
22 | - productStyle, | ||
23 | - outboundType, | ||
24 | - packetType, | ||
25 | - ideaSource, | ||
26 | - manualPreform, | ||
27 | - midCheckResult, | ||
28 | - endCheckResult, | ||
29 | } = useOrderInfo(orderStore); | 18 | } = useOrderInfo(orderStore); |
30 | 19 | ||
31 | export const searchFormSchema: FormSchema[] = [ | 20 | export const searchFormSchema: FormSchema[] = [ |
@@ -86,9 +75,12 @@ export const searchFormSchema: FormSchema[] = [ | @@ -86,9 +75,12 @@ export const searchFormSchema: FormSchema[] = [ | ||
86 | colProps: { span: 8 }, | 75 | colProps: { span: 8 }, |
87 | 76 | ||
88 | componentProps: { | 77 | componentProps: { |
89 | - options: projectNo, | 78 | + options: projectNoOptions, |
90 | showSearch: true, | 79 | showSearch: true, |
91 | mode: 'multiple', | 80 | mode: 'multiple', |
81 | + onSearch: async (value: any) => { | ||
82 | + projectNoOptions.value = await queryNoOptions('projectNo', value); | ||
83 | + }, | ||
92 | // onSearch: async (value: any) => { | 84 | // onSearch: async (value: any) => { |
93 | // projectNoOptions.value = await queryNoOptions('projectNo', value); | 85 | // projectNoOptions.value = await queryNoOptions('projectNo', value); |
94 | // }, | 86 | // }, |
@@ -114,12 +106,12 @@ export const searchFormSchema: FormSchema[] = [ | @@ -114,12 +106,12 @@ export const searchFormSchema: FormSchema[] = [ | ||
114 | colProps: { span: 8 }, | 106 | colProps: { span: 8 }, |
115 | 107 | ||
116 | componentProps: { | 108 | componentProps: { |
117 | - options: innerNo, | 109 | + options: innerNoOptions, |
118 | showSearch: true, | 110 | showSearch: true, |
119 | mode: 'multiple', | 111 | mode: 'multiple', |
120 | - // onSearch: async (value: any) => { | ||
121 | - // innerNoOptions.value = await queryNoOptions('innerNo', value); | ||
122 | - // }, | 112 | + onSearch: async (value: any) => { |
113 | + innerNoOptions.value = await queryNoOptions('innerNo', value); | ||
114 | + }, | ||
123 | }, | 115 | }, |
124 | }, | 116 | }, |
125 | { | 117 | { |
src/views/project/order/index.vue
@@ -161,20 +161,20 @@ | @@ -161,20 +161,20 @@ | ||
161 | >测试样品</a-select-option | 161 | >测试样品</a-select-option |
162 | > | 162 | > |
163 | </a-select> | 163 | </a-select> |
164 | - <a-button | 164 | + <!-- <a-button |
165 | :style="{ borderRadius: '5px 5px 5px 5px' }" | 165 | :style="{ borderRadius: '5px 5px 5px 5px' }" |
166 | type="primary" | 166 | type="primary" |
167 | @click="handleProductProfitModal" | 167 | @click="handleProductProfitModal" |
168 | v-if="role === ROLE.ADMIN || role === ROLE.FINANCE" | 168 | v-if="role === ROLE.ADMIN || role === ROLE.FINANCE" |
169 | >内部生产净利润分析</a-button | 169 | >内部生产净利润分析</a-button |
170 | - > | ||
171 | - <a-button | 170 | + > --> |
171 | + <!-- <a-button | ||
172 | :style="{ borderRadius: '5px 5px 5px 5px' }" | 172 | :style="{ borderRadius: '5px 5px 5px 5px' }" |
173 | type="primary" | 173 | type="primary" |
174 | @click="handleServiceProfitModal" | 174 | @click="handleServiceProfitModal" |
175 | v-if="role === ROLE.ADMIN || role === ROLE.FINANCE" | 175 | v-if="role === ROLE.ADMIN || role === ROLE.FINANCE" |
176 | >业务/研发净利润分析</a-button | 176 | >业务/研发净利润分析</a-button |
177 | - > | 177 | + > --> |
178 | <a-button | 178 | <a-button |
179 | :style="{ borderRadius: '5px 5px 5px 5px' }" | 179 | :style="{ borderRadius: '5px 5px 5px 5px' }" |
180 | type="primary" | 180 | type="primary" |
vite.config.ts
@@ -30,7 +30,7 @@ export default defineApplicationConfig({ | @@ -30,7 +30,7 @@ export default defineApplicationConfig({ | ||
30 | }, | 30 | }, |
31 | }, | 31 | }, |
32 | '/basic-api/order': { | 32 | '/basic-api/order': { |
33 | - target: 'http://47.104.8.35:18000', | 33 | + target: 'http://47.104.8.35:8000', |
34 | // target: 'http://localhost:18000', | 34 | // target: 'http://localhost:18000', |
35 | // target: 'http://39.108.227.113:8000', | 35 | // target: 'http://39.108.227.113:8000', |
36 | // target: 'http://localhost:8000', | 36 | // target: 'http://localhost:8000', |
@@ -41,7 +41,7 @@ export default defineApplicationConfig({ | @@ -41,7 +41,7 @@ export default defineApplicationConfig({ | ||
41 | rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), | 41 | rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''), |
42 | }, | 42 | }, |
43 | '/api/localStorage/upload': { | 43 | '/api/localStorage/upload': { |
44 | - target: 'http://47.104.8.35:18000', | 44 | + target: 'http://47.104.8.35:8000', |
45 | // target: 'http://localhost:18000', | 45 | // target: 'http://localhost:18000', |
46 | // target: 'http://39.108.227.113:8000', | 46 | // target: 'http://39.108.227.113:8000', |
47 | // target: '192.168.31.250:18000', | 47 | // target: '192.168.31.250:18000', |