Commit b225cd4b098d44823a19408bbff649f9c478402a

Authored by sanmu
1 parent e0cc55ba

feat: 新增审核列内部编码和图片

src/views/project/approve/FieldPanel.vue
@@ -2,7 +2,16 @@ @@ -2,7 +2,16 @@
2 <PageWrapper contentBackground> 2 <PageWrapper contentBackground>
3 <BasicTable @register="registerTable"> 3 <BasicTable @register="registerTable">
4 <template #form-custom> custom-slot </template> 4 <template #form-custom> custom-slot </template>
  5 +
5 <template #bodyCell="{ column, record }"> 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 <template v-if="column.key === 'action'"> 15 <template v-if="column.key === 'action'">
7 <TableAction 16 <TableAction
8 :actions="[ 17 :actions="[
@@ -72,6 +81,7 @@ @@ -72,6 +81,7 @@
72 import { ROLE } from '../order//type.d'; 81 import { ROLE } from '../order//type.d';
73 import { useUserStoreWithOut } from '/@/store/modules/user'; 82 import { useUserStoreWithOut } from '/@/store/modules/user';
74 import BaseInfo from './BaseInfo.vue'; 83 import BaseInfo from './BaseInfo.vue';
  84 + import { createImgPreview } from '/@/components/Preview';
75 85
76 const userStore = useUserStoreWithOut(); 86 const userStore = useUserStoreWithOut();
77 87
@@ -110,6 +120,20 @@ @@ -110,6 +120,20 @@
110 dataIndex: 'createBy', 120 dataIndex: 'createBy',
111 width: 150, 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 if (props.isApproved) { 139 if (props.isApproved) {
@@ -249,6 +273,11 @@ @@ -249,6 +273,11 @@
249 msgVisible.value = false; 273 msgVisible.value = false;
250 }; 274 };
251 275
  276 + const handlePreview = (url) => {
  277 + createImgPreview({ imageList: [url], defaultWidth: 500 });
  278 + return false;
  279 + };
  280 +
252 return { 281 return {
253 handleProfitModal, 282 handleProfitModal,
254 registerTable, 283 registerTable,
@@ -267,6 +296,7 @@ @@ -267,6 +296,7 @@
267 role, 296 role,
268 msgVisible, 297 msgVisible,
269 handleMsgModalClose, 298 handleMsgModalClose,
  299 + handlePreview,
270 }; 300 };
271 }, 301 },
272 }); 302 });
src/views/project/approve/ProfitPanel.vue
@@ -3,6 +3,14 @@ @@ -3,6 +3,14 @@
3 <BasicTable @register="registerTable"> 3 <BasicTable @register="registerTable">
4 <template #form-custom> custom-slot </template> 4 <template #form-custom> custom-slot </template>
5 <template #bodyCell="{ column, record }"> 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 <template v-if="column.key === 'action'"> 14 <template v-if="column.key === 'action'">
7 <TableAction 15 <TableAction
8 :actions="[ 16 :actions="[
@@ -48,6 +56,7 @@ @@ -48,6 +56,7 @@
48 import { ROLE } from '../order//type.d'; 56 import { ROLE } from '../order//type.d';
49 import { useUserStoreWithOut } from '/@/store/modules/user'; 57 import { useUserStoreWithOut } from '/@/store/modules/user';
50 import BaseInfo from './BaseInfo.vue'; 58 import BaseInfo from './BaseInfo.vue';
  59 + import { createImgPreview } from '/@/components/Preview';
51 60
52 const userStore = useUserStoreWithOut(); 61 const userStore = useUserStoreWithOut();
53 62
@@ -79,6 +88,20 @@ @@ -79,6 +88,20 @@
79 dataIndex: 'createBy', 88 dataIndex: 'createBy',
80 width: 150, 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 if (props.isApproved) { 107 if (props.isApproved) {
@@ -193,6 +216,12 @@ @@ -193,6 +216,12 @@
193 } 216 }
194 msgVisible.value = false; 217 msgVisible.value = false;
195 }; 218 };
  219 +
  220 + const handlePreview = (url) => {
  221 + createImgPreview({ imageList: [url], defaultWidth: 500 });
  222 + return false;
  223 + };
  224 +
196 return { 225 return {
197 handleProfitModal, 226 handleProfitModal,
198 registerTable, 227 registerTable,
@@ -211,6 +240,7 @@ @@ -211,6 +240,7 @@
211 ROLE, 240 ROLE,
212 msgVisible, 241 msgVisible,
213 handleMsgModalClose, 242 handleMsgModalClose,
  243 + handlePreview,
214 }; 244 };
215 }, 245 },
216 }); 246 });
src/views/project/approve/ReportPanel.vue
@@ -3,6 +3,14 @@ @@ -3,6 +3,14 @@
3 <BasicTable @register="registerTable"> 3 <BasicTable @register="registerTable">
4 <template #form-custom> custom-slot </template> 4 <template #form-custom> custom-slot </template>
5 <template #bodyCell="{ column, record }"> 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 <template v-if="column.key === 'action'"> 14 <template v-if="column.key === 'action'">
7 <TableAction 15 <TableAction
8 :actions="[ 16 :actions="[
@@ -48,6 +56,7 @@ @@ -48,6 +56,7 @@
48 import { ROLE } from '../order//type.d'; 56 import { ROLE } from '../order//type.d';
49 import { useUserStoreWithOut } from '/@/store/modules/user'; 57 import { useUserStoreWithOut } from '/@/store/modules/user';
50 import BaseInfo from './BaseInfo.vue'; 58 import BaseInfo from './BaseInfo.vue';
  59 + import { createImgPreview } from '/@/components/Preview';
51 60
52 const userStore = useUserStoreWithOut(); 61 const userStore = useUserStoreWithOut();
53 62
@@ -78,6 +87,20 @@ @@ -78,6 +87,20 @@
78 dataIndex: 'createBy', 87 dataIndex: 'createBy',
79 width: 150, 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 if (props.isApproved) { 106 if (props.isApproved) {
@@ -176,6 +199,12 @@ @@ -176,6 +199,12 @@
176 const role = computed(() => { 199 const role = computed(() => {
177 return userStore.getUserInfo?.roleSmallVO?.code; 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 return { 208 return {
180 handleProfitModal, 209 handleProfitModal,
181 registerTable, 210 registerTable,
@@ -194,6 +223,7 @@ @@ -194,6 +223,7 @@
194 ROLE, 223 ROLE,
195 msgVisible, 224 msgVisible,
196 handleMsgModalClose, 225 handleMsgModalClose,
  226 + handlePreview,
197 }; 227 };
198 }, 228 },
199 }); 229 });
src/views/project/order/FormDetail/index.vue
@@ -238,7 +238,8 @@ @@ -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 const exchangeRate = find(configList.value, (item) => { 244 const exchangeRate = find(configList.value, (item) => {
244 return item.settingCode === 'exchangeRate'; 245 return item.settingCode === 'exchangeRate';
src/views/project/order/ProfitAnalysis.vue
@@ -103,12 +103,12 @@ @@ -103,12 +103,12 @@
103 }, 103 },
104 { 104 {
105 field: 'orderTotalNum', 105 field: 'orderTotalNum',
106 - label: '订单总数', 106 + label: '订单商品数量',
107 render: (val) => val || 0, 107 render: (val) => val || 0,
108 }, 108 },
109 { 109 {
110 field: 'recordNum', 110 field: 'recordNum',
111 - label: '记录数', 111 + label: '含有利润分析的订单数',
112 render: (val) => val || 0, 112 render: (val) => val || 0,
113 }, 113 },
114 ]; 114 ];