Commit b225cd4b098d44823a19408bbff649f9c478402a
1 parent
e0cc55ba
feat: 新增审核列内部编码和图片
Showing
5 changed files
with
94 additions
and
3 deletions
src/views/project/approve/FieldPanel.vue
... | ... | @@ -2,7 +2,16 @@ |
2 | 2 | <PageWrapper contentBackground> |
3 | 3 | <BasicTable @register="registerTable"> |
4 | 4 | <template #form-custom> custom-slot </template> |
5 | + | |
5 | 6 | <template #bodyCell="{ column, record }"> |
7 | + <template v-if="column.key === 'picUrl'"> | |
8 | + <img | |
9 | + :width="100" | |
10 | + :height="100" | |
11 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
12 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
13 | + /> | |
14 | + </template> | |
6 | 15 | <template v-if="column.key === 'action'"> |
7 | 16 | <TableAction |
8 | 17 | :actions="[ |
... | ... | @@ -72,6 +81,7 @@ |
72 | 81 | import { ROLE } from '../order//type.d'; |
73 | 82 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
74 | 83 | import BaseInfo from './BaseInfo.vue'; |
84 | + import { createImgPreview } from '/@/components/Preview'; | |
75 | 85 | |
76 | 86 | const userStore = useUserStoreWithOut(); |
77 | 87 | |
... | ... | @@ -110,6 +120,20 @@ |
110 | 120 | dataIndex: 'createBy', |
111 | 121 | width: 150, |
112 | 122 | }, |
123 | + { | |
124 | + title: '内部编号', | |
125 | + dataIndex: 'innerNo', | |
126 | + width: 150, | |
127 | + customRender: (column) => { | |
128 | + const { record } = column || {}; | |
129 | + return record?.orderBaseInfo?.innerNo; | |
130 | + }, | |
131 | + }, | |
132 | + { | |
133 | + title: '图片', | |
134 | + dataIndex: 'picUrl', | |
135 | + width: 150, | |
136 | + }, | |
113 | 137 | ]; |
114 | 138 | |
115 | 139 | if (props.isApproved) { |
... | ... | @@ -249,6 +273,11 @@ |
249 | 273 | msgVisible.value = false; |
250 | 274 | }; |
251 | 275 | |
276 | + const handlePreview = (url) => { | |
277 | + createImgPreview({ imageList: [url], defaultWidth: 500 }); | |
278 | + return false; | |
279 | + }; | |
280 | + | |
252 | 281 | return { |
253 | 282 | handleProfitModal, |
254 | 283 | registerTable, |
... | ... | @@ -267,6 +296,7 @@ |
267 | 296 | role, |
268 | 297 | msgVisible, |
269 | 298 | handleMsgModalClose, |
299 | + handlePreview, | |
270 | 300 | }; |
271 | 301 | }, |
272 | 302 | }); |
... | ... |
src/views/project/approve/ProfitPanel.vue
... | ... | @@ -3,6 +3,14 @@ |
3 | 3 | <BasicTable @register="registerTable"> |
4 | 4 | <template #form-custom> custom-slot </template> |
5 | 5 | <template #bodyCell="{ column, record }"> |
6 | + <template v-if="column.key === 'picUrl'"> | |
7 | + <img | |
8 | + :width="100" | |
9 | + :height="100" | |
10 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
11 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
12 | + /> | |
13 | + </template> | |
6 | 14 | <template v-if="column.key === 'action'"> |
7 | 15 | <TableAction |
8 | 16 | :actions="[ |
... | ... | @@ -48,6 +56,7 @@ |
48 | 56 | import { ROLE } from '../order//type.d'; |
49 | 57 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
50 | 58 | import BaseInfo from './BaseInfo.vue'; |
59 | + import { createImgPreview } from '/@/components/Preview'; | |
51 | 60 | |
52 | 61 | const userStore = useUserStoreWithOut(); |
53 | 62 | |
... | ... | @@ -79,6 +88,20 @@ |
79 | 88 | dataIndex: 'createBy', |
80 | 89 | width: 150, |
81 | 90 | }, |
91 | + { | |
92 | + title: '内部编号', | |
93 | + dataIndex: 'innerNo', | |
94 | + width: 150, | |
95 | + customRender: (column) => { | |
96 | + const { record } = column || {}; | |
97 | + return record?.orderBaseInfo?.innerNo; | |
98 | + }, | |
99 | + }, | |
100 | + { | |
101 | + title: '图片', | |
102 | + dataIndex: 'picUrl', | |
103 | + width: 150, | |
104 | + }, | |
82 | 105 | ]; |
83 | 106 | |
84 | 107 | if (props.isApproved) { |
... | ... | @@ -193,6 +216,12 @@ |
193 | 216 | } |
194 | 217 | msgVisible.value = false; |
195 | 218 | }; |
219 | + | |
220 | + const handlePreview = (url) => { | |
221 | + createImgPreview({ imageList: [url], defaultWidth: 500 }); | |
222 | + return false; | |
223 | + }; | |
224 | + | |
196 | 225 | return { |
197 | 226 | handleProfitModal, |
198 | 227 | registerTable, |
... | ... | @@ -211,6 +240,7 @@ |
211 | 240 | ROLE, |
212 | 241 | msgVisible, |
213 | 242 | handleMsgModalClose, |
243 | + handlePreview, | |
214 | 244 | }; |
215 | 245 | }, |
216 | 246 | }); |
... | ... |
src/views/project/approve/ReportPanel.vue
... | ... | @@ -3,6 +3,14 @@ |
3 | 3 | <BasicTable @register="registerTable"> |
4 | 4 | <template #form-custom> custom-slot </template> |
5 | 5 | <template #bodyCell="{ column, record }"> |
6 | + <template v-if="column.key === 'picUrl'"> | |
7 | + <img | |
8 | + :width="100" | |
9 | + :height="100" | |
10 | + :src="record?.orderBaseInfo?.smallPicUrl" | |
11 | + @click="handlePreview(record?.orderBaseInfo?.picUrl)" | |
12 | + /> | |
13 | + </template> | |
6 | 14 | <template v-if="column.key === 'action'"> |
7 | 15 | <TableAction |
8 | 16 | :actions="[ |
... | ... | @@ -48,6 +56,7 @@ |
48 | 56 | import { ROLE } from '../order//type.d'; |
49 | 57 | import { useUserStoreWithOut } from '/@/store/modules/user'; |
50 | 58 | import BaseInfo from './BaseInfo.vue'; |
59 | + import { createImgPreview } from '/@/components/Preview'; | |
51 | 60 | |
52 | 61 | const userStore = useUserStoreWithOut(); |
53 | 62 | |
... | ... | @@ -78,6 +87,20 @@ |
78 | 87 | dataIndex: 'createBy', |
79 | 88 | width: 150, |
80 | 89 | }, |
90 | + { | |
91 | + title: '内部编号', | |
92 | + dataIndex: 'innerNo', | |
93 | + width: 150, | |
94 | + customRender: (column) => { | |
95 | + const { record } = column || {}; | |
96 | + return record?.orderBaseInfo?.innerNo; | |
97 | + }, | |
98 | + }, | |
99 | + { | |
100 | + title: '图片', | |
101 | + dataIndex: 'picUrl', | |
102 | + width: 150, | |
103 | + }, | |
81 | 104 | ]; |
82 | 105 | |
83 | 106 | if (props.isApproved) { |
... | ... | @@ -176,6 +199,12 @@ |
176 | 199 | const role = computed(() => { |
177 | 200 | return userStore.getUserInfo?.roleSmallVO?.code; |
178 | 201 | }); |
202 | + | |
203 | + const handlePreview = (url) => { | |
204 | + createImgPreview({ imageList: [url], defaultWidth: 500 }); | |
205 | + return false; | |
206 | + }; | |
207 | + | |
179 | 208 | return { |
180 | 209 | handleProfitModal, |
181 | 210 | registerTable, |
... | ... | @@ -194,6 +223,7 @@ |
194 | 223 | ROLE, |
195 | 224 | msgVisible, |
196 | 225 | handleMsgModalClose, |
226 | + handlePreview, | |
197 | 227 | }; |
198 | 228 | }, |
199 | 229 | }); |
... | ... |
src/views/project/order/FormDetail/index.vue
... | ... | @@ -238,7 +238,8 @@ |
238 | 238 | }); |
239 | 239 | |
240 | 240 | //原始的包装费用 |
241 | - originPackagePrice.value = data.profitAnalysisInfo?.packetPrice; | |
241 | + originPackagePrice.value = | |
242 | + data.profitAnalysisInfo?.packetPrice || packetPrice?.relationValue; | |
242 | 243 | |
243 | 244 | const exchangeRate = find(configList.value, (item) => { |
244 | 245 | return item.settingCode === 'exchangeRate'; |
... | ... |
src/views/project/order/ProfitAnalysis.vue
... | ... | @@ -103,12 +103,12 @@ |
103 | 103 | }, |
104 | 104 | { |
105 | 105 | field: 'orderTotalNum', |
106 | - label: '订单总数', | |
106 | + label: '订单商品数量', | |
107 | 107 | render: (val) => val || 0, |
108 | 108 | }, |
109 | 109 | { |
110 | 110 | field: 'recordNum', |
111 | - label: '记录数', | |
111 | + label: '含有利润分析的订单数', | |
112 | 112 | render: (val) => val || 0, |
113 | 113 | }, |
114 | 114 | ]; |
... | ... |