Commit c04647c32c5f022974f5ac135fd4eeb14b97e7e6

Authored by sanmu
1 parent 923b2ed6

feat: 增加跟单和质检

src/api/project/order.ts
@@ -2,6 +2,7 @@ import axios from 'axios'; @@ -2,6 +2,7 @@ import axios from 'axios';
2 import { defHttp } from '/@/utils/http/axios'; 2 import { defHttp } from '/@/utils/http/axios';
3 import { useUserStoreWithOut } from '/@/store/modules/user'; 3 import { useUserStoreWithOut } from '/@/store/modules/user';
4 import { useOrderStoreWithOut } from '/@/store/modules/order'; 4 import { useOrderStoreWithOut } from '/@/store/modules/order';
  5 +import { formatToDate } from '/@/utils/dateUtil';
5 6
6 enum Api { 7 enum Api {
7 ORDER_CREATE = '/order/erp/order/add', 8 ORDER_CREATE = '/order/erp/order/add',
@@ -92,6 +93,28 @@ export async function uploadImg(params, onUploadProgress: (progressEvent: Progre @@ -92,6 +93,28 @@ export async function uploadImg(params, onUploadProgress: (progressEvent: Progre
92 } 93 }
93 94
94 export const getOrderList = async (params: DemoParams) => { 95 export const getOrderList = async (params: DemoParams) => {
  96 + params.createStartTime = params.createStartTime
  97 + ? formatToDate(params.createStartTime)
  98 + : undefined;
  99 + params.productionDepartmentConsignStartTime = params.productionDepartmentConsignStartTime
  100 + ? formatToDate(params.productionDepartmentConsignStartTime)
  101 + : undefined;
  102 + params.productionDepartmentConsignEndTime = params.productionDepartmentConsignEndTime
  103 + ? formatToDate(params.productionDepartmentConsignEndTime)
  104 + : undefined;
  105 + params.orderHodStartTime = params.orderHodStartTime
  106 + ? formatToDate(params.orderHodStartTime)
  107 + : undefined;
  108 + params.orderHodEndTime = params.orderHodEndTime
  109 + ? formatToDate(params.orderHodEndTime)
  110 + : undefined;
  111 + params.selfTestPassStartTime = params.selfTestPassStartTime
  112 + ? formatToDate(params.selfTestPassStartTime)
  113 + : undefined;
  114 + params.selfTestPassEndTime = params.selfTestPassEndTime
  115 + ? formatToDate(params.selfTestPassEndTime)
  116 + : undefined;
  117 +
95 const res = await defHttp.post<DemoListGetResultModel>({ 118 const res = await defHttp.post<DemoListGetResultModel>({
96 url: Api.ORDER, 119 url: Api.ORDER,
97 params, 120 params,
src/views/project/approve/FieldPanel.vue
@@ -26,7 +26,8 @@ @@ -26,7 +26,8 @@
26 <h2>基本信息</h2> 26 <h2>基本信息</h2>
27 <div v-for="field in baseInfos" :key="field"> 27 <div v-for="field in baseInfos" :key="field">
28 <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span 28 <span className="w-[140px] inline-block text-right mr-3">{{ field.label }}:</span
29 - ><span>{{ field.value }}</span> 29 + ><span v-if="field.label !== '图片'">{{ field.value }}</span
  30 + ><span v-else><img :src="field.value" height="100" /></span>
30 </div> 31 </div>
31 <h2 className="mt-8">基本信息申请字段</h2> 32 <h2 className="mt-8">基本信息申请字段</h2>
32 <div>{{ fieldInfos.baseFields.join(' , ') }}</div> 33 <div>{{ fieldInfos.baseFields.join(' , ') }}</div>
src/views/project/approve/Text.vue deleted 100644 → 0
src/views/project/order/FormDetail.vue
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <TrackFormPanel ref="trackFormPanelRef" :id="id" /> 28 <TrackFormPanel ref="trackFormPanelRef" :id="id" />
29 </TabPanel> 29 </TabPanel>
30 <TabPanel key="5" tab="质检信息" :forceRender="true" v-if="!!id"> 30 <TabPanel key="5" tab="质检信息" :forceRender="true" v-if="!!id">
31 - <InspectionFormPanel ref="inspectionFormRef" :id="id" /> 31 + <InspectionFormPanel ref="inspectionFormPanelRef" :id="id" />
32 </TabPanel> 32 </TabPanel>
33 </Tabs> 33 </Tabs>
34 </div> 34 </div>
@@ -398,24 +398,39 @@ @@ -398,24 +398,39 @@
398 }; 398 };
399 399
400 if (id.value) { 400 if (id.value) {
401 - setFieldsValue({  
402 - baseInfo: { ...toRaw(data) },  
403 - });  
404 setTimeout(() => { 401 setTimeout(() => {
  402 + // 基本信息
405 baseFormPanelRef.value.fields = { ...data.lockFields?.baseFields } || {}; 403 baseFormPanelRef.value.fields = { ...data.lockFields?.baseFields } || {};
406 baseFormPanelRef.value.setFieldsValue({ 404 baseFormPanelRef.value.setFieldsValue({
407 ...toRaw(data), 405 ...toRaw(data),
408 }); 406 });
  407 + baseFormPanelRef.value.picUrl = data.picUrl;
  408 + baseFormPanelRef.value.smallPicUrl = data.smallPicUrl;
409 409
  410 + // 利润分析
410 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {}; 411 profitFormPanelRef.value.fields = { ...data.lockFields?.profitAnalysisFields } || {};
411 profitFormPanelRef?.value?.setFieldsValue({ 412 profitFormPanelRef?.value?.setFieldsValue({
412 ...toRaw(data.profitAnalysisInfo), 413 ...toRaw(data.profitAnalysisInfo),
413 }); 414 });
414 415
  416 + // 项目报告书
415 reportFormPanelRef.value.fields = { ...data.lockFields?.reportFields } || {}; 417 reportFormPanelRef.value.fields = { ...data.lockFields?.reportFields } || {};
416 reportFormPanelRef?.value?.setFieldsValue({ 418 reportFormPanelRef?.value?.setFieldsValue({
417 ...toRaw(data.reportInfo), 419 ...toRaw(data.reportInfo),
418 }); 420 });
  421 +
  422 + // 跟单信息
  423 + trackFormPanelRef.value.fields = { ...data.lockFields?.trackStageFields } || {};
  424 + trackFormPanelRef?.value?.setFieldsValue({
  425 + ...toRaw(data.trackStageInfo),
  426 + });
  427 +
  428 + // 质检信息
  429 + inspectionFormPanelRef.value.fields =
  430 + { ...data.lockFields?.inspectionStageFields } || {};
  431 + inspectionFormPanelRef?.value?.setFieldsValue({
  432 + ...toRaw(data.inspectionStageInfo),
  433 + });
419 }, 100); 434 }, 100);
420 } else { 435 } else {
421 setFieldsValue({}); 436 setFieldsValue({});
@@ -427,10 +442,19 @@ @@ -427,10 +442,19 @@
427 const forms = { orderId: id.value } as any; 442 const forms = { orderId: id.value } as any;
428 if (activeKey.value === '1') { 443 if (activeKey.value === '1') {
429 forms.baseInfo = baseFormPanelRef?.value?.getFieldsValue() || {}; 444 forms.baseInfo = baseFormPanelRef?.value?.getFieldsValue() || {};
  445 + forms.baseInfo = {
  446 + ...forms.baseInfo,
  447 + picUrl: baseFormPanelRef?.value?.picUrl || '',
  448 + smallPicUrl: baseFormPanelRef?.value?.smallPicUrl || '',
  449 + };
430 } else if (activeKey.value === '2') { 450 } else if (activeKey.value === '2') {
431 forms.profitAnalysisInfo = profitFormPanelRef?.value?.getFieldsValue() || {}; 451 forms.profitAnalysisInfo = profitFormPanelRef?.value?.getFieldsValue() || {};
432 } else if (activeKey.value === '3') { 452 } else if (activeKey.value === '3') {
433 forms.reportInfo = reportFormPanelRef?.value?.getFieldsValue() || {}; 453 forms.reportInfo = reportFormPanelRef?.value?.getFieldsValue() || {};
  454 + } else if (activeKey.value === '4') {
  455 + forms.trackStageInfo = trackFormPanelRef?.value?.getFieldsValue() || {};
  456 + } else if (activeKey.value === '5') {
  457 + forms.inspectionStageInfo = inspectionFormPanelRef?.value?.getFieldsValue() || {};
434 } 458 }
435 459
436 await orderUpdate(forms); 460 await orderUpdate(forms);
src/views/project/order/component/BaseFormPanel.vue
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 import { useOrderStoreWithOut } from '/@/store/modules/order'; 9 import { useOrderStoreWithOut } from '/@/store/modules/order';
10 10
11 import { useOrderInfo } from '/@/hooks/component/order'; 11 import { useOrderInfo } from '/@/hooks/component/order';
  12 + import { get } from 'lodash-es';
12 13
13 export default defineComponent({ 14 export default defineComponent({
14 components: { BasicForm }, 15 components: { BasicForm },
@@ -83,7 +84,7 @@ @@ -83,7 +84,7 @@
83 field: `${item.field}`, 84 field: `${item.field}`,
84 componentProps: { 85 componentProps: {
85 ...(item.component === 'Select' && { options: options[item.field] }), 86 ...(item.component === 'Select' && { options: options[item.field] }),
86 - disabled: getDisable(fields.value[item.field], props.id), 87 + disabled: getDisable(get(fields.value, `${item.field}`), props.id),
87 }, 88 },
88 colProps: { 89 colProps: {
89 span: 24, 90 span: 24,
src/views/project/order/component/InspectionFormPanel.vue
@@ -2,30 +2,27 @@ @@ -2,30 +2,27 @@
2 <BasicForm @register="registerForm" /> 2 <BasicForm @register="registerForm" />
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 - import { computed, defineComponent, reactive, ref, toRaw } from 'vue';  
6 - import { BasicForm, FormActionType, useForm } from '/@/components/Form/index'; 5 + import { computed, defineComponent, ref, toRaw } from 'vue';
  6 + import { BasicForm, useForm } from '/@/components/Form/index';
7 import { useDrawerInner } from '/@/components/Drawer'; 7 import { useDrawerInner } from '/@/components/Drawer';
8 import { dateUtil } from '/@/utils/dateUtil'; 8 import { dateUtil } from '/@/utils/dateUtil';
9 import { FIELDS_INSPECTION_INFO } from '../tableData'; 9 import { FIELDS_INSPECTION_INFO } from '../tableData';
10 import { getDisable } from '/@/utils/project'; 10 import { getDisable } from '/@/utils/project';
11 import { useOrderStoreWithOut } from '/@/store/modules/order'; 11 import { useOrderStoreWithOut } from '/@/store/modules/order';
12 - 12 + import { get } from 'lodash-es';
13 import { useOrderInfo } from '/@/hooks/component/order'; 13 import { useOrderInfo } from '/@/hooks/component/order';
14 14
15 export default defineComponent({ 15 export default defineComponent({
16 components: { BasicForm }, 16 components: { BasicForm },
17 17
18 props: { 18 props: {
19 - detailData: {  
20 - type: Object,  
21 - },  
22 - onGoCheckDetail: {  
23 - type: Function, 19 + id: {
  20 + type: String,
24 }, 21 },
25 }, 22 },
26 emits: ['success'], 23 emits: ['success'],
27 - setup(_, { emit }) {  
28 - let fields = reactive({ baseFields: {}, profitAnalysisInfo: {} }); 24 + setup(props, { emit }) {
  25 + let fields = ref({});
29 const orderStore = useOrderStoreWithOut(); 26 const orderStore = useOrderStoreWithOut();
30 27
31 const { midCheckResult, endCheckResult } = useOrderInfo(orderStore); 28 const { midCheckResult, endCheckResult } = useOrderInfo(orderStore);
@@ -35,19 +32,21 @@ @@ -35,19 +32,21 @@
35 midCheckResult, 32 midCheckResult,
36 endCheckResult, 33 endCheckResult,
37 }; 34 };
38 - return FIELDS_INSPECTION_INFO.map((item) => ({  
39 - ...item,  
40 - componentProps: {  
41 - ...(item.component === 'Select' && { options: options[item.optionField] }),  
42 - disabled: getDisable(`fields.${item.field}`),  
43 - },  
44 - colProps: {  
45 - span: 24,  
46 - },  
47 - })); 35 + return FIELDS_INSPECTION_INFO.map((item) => {
  36 + return {
  37 + ...item,
  38 + componentProps: {
  39 + ...(item.component === 'Select' && { options: options[item.field] }),
  40 + disabled: getDisable(get(fields.value, item.field), props.id),
  41 + },
  42 + colProps: {
  43 + span: 24,
  44 + },
  45 + };
  46 + });
48 }); 47 });
49 48
50 - const [registerForm, { setFieldsValue, getFieldsValue, reload }] = useForm({ 49 + const [registerForm, { setFieldsValue, getFieldsValue, resetFields }] = useForm({
51 labelWidth: 120, 50 labelWidth: 120,
52 schemas, 51 schemas,
53 showActionButtonGroup: false, 52 showActionButtonGroup: false,
@@ -56,29 +55,14 @@ @@ -56,29 +55,14 @@
56 }, 55 },
57 }); 56 });
58 57
59 - const [register, { closeDrawer }] = useDrawerInner((data) => {  
60 - // 方式1  
61 - data.orderHodTime = data.orderHodTime ? dateUtil(data.orderHodTime) : null;  
62 - data.productionDepartmentConsignTime = data.productionDepartmentConsignTime  
63 - ? dateUtil(data.productionDepartmentConsignTime)  
64 - : null;  
65 -  
66 - fields.baseFields = {  
67 - ...fields.baseFields,  
68 - ...data.lockFields.baseFields,  
69 - };  
70 -  
71 - if (id.value) {  
72 - setFieldsValue({  
73 - ...toRaw(data),  
74 - baseInfo: { ...toRaw(data) },  
75 - });  
76 - } else {  
77 - setFieldsValue({});  
78 - }  
79 - });  
80 -  
81 - return { register, schemas, registerForm, getFieldsValue }; 58 + return {
  59 + fields,
  60 + schemas,
  61 + registerForm,
  62 + setFieldsValue,
  63 + resetFields,
  64 + getFieldsValue,
  65 + };
82 }, 66 },
83 }); 67 });
84 </script> 68 </script>
src/views/project/order/component/ReportFormPanel.vue
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 import { useOrderStoreWithOut } from '/@/store/modules/order'; 9 import { useOrderStoreWithOut } from '/@/store/modules/order';
10 10
11 import { useOrderInfo } from '/@/hooks/component/order'; 11 import { useOrderInfo } from '/@/hooks/component/order';
  12 + import { get } from 'lodash-es';
12 13
13 export default defineComponent({ 14 export default defineComponent({
14 components: { BasicForm }, 15 components: { BasicForm },
@@ -43,7 +44,7 @@ @@ -43,7 +44,7 @@
43 field: `${item.field}`, 44 field: `${item.field}`,
44 componentProps: { 45 componentProps: {
45 ...(item.component === 'Select' && { options: options[item.optionField] }), 46 ...(item.component === 'Select' && { options: options[item.optionField] }),
46 - disabled: getDisable(fields.value[item.field], props.id), 47 + disabled: getDisable(get(fields.value, `${item.field}`), props.id),
47 }, 48 },
48 colProps: { 49 colProps: {
49 span: 24, 50 span: 24,
src/views/project/order/component/TrackFormPanel.vue
@@ -9,28 +9,25 @@ @@ -9,28 +9,25 @@
9 import { dateUtil } from '/@/utils/dateUtil'; 9 import { dateUtil } from '/@/utils/dateUtil';
10 import { FIELDS_TRACK_STAGE_INFO } from '../tableData'; 10 import { FIELDS_TRACK_STAGE_INFO } from '../tableData';
11 import { getDisable } from '/@/utils/project'; 11 import { getDisable } from '/@/utils/project';
  12 + import { get } from 'lodash-es';
12 13
13 export default defineComponent({ 14 export default defineComponent({
14 components: { BasicForm }, 15 components: { BasicForm },
15 -  
16 props: { 16 props: {
17 - detailData: {  
18 - type: Object,  
19 - },  
20 - onGoCheckDetail: {  
21 - type: Function, 17 + id: {
  18 + type: String,
22 }, 19 },
23 }, 20 },
24 emits: ['success'], 21 emits: ['success'],
25 - setup(_, { emit }) {  
26 - let fields = reactive({ baseFields: {}, profitAnalysisInfo: {} }); 22 + setup(props, { emit }) {
  23 + let fields = ref({});
27 24
28 const schemas = computed(() => { 25 const schemas = computed(() => {
29 return FIELDS_TRACK_STAGE_INFO.map((item) => ({ 26 return FIELDS_TRACK_STAGE_INFO.map((item) => ({
30 ...item, 27 ...item,
31 componentProps: { 28 componentProps: {
32 ...item.componentProps, 29 ...item.componentProps,
33 - disabled: getDisable(`fields.${item.field}`), 30 + disabled: getDisable(get(fields.value, `${item.field}`), props.id),
34 }, 31 },
35 colProps: { 32 colProps: {
36 span: 24, 33 span: 24,
@@ -38,7 +35,7 @@ @@ -38,7 +35,7 @@
38 })); 35 }));
39 }); 36 });
40 37
41 - const [registerForm, { setFieldsValue, getFieldsValue, reload }] = useForm({ 38 + const [registerForm, { setFieldsValue, getFieldsValue, resetFields }] = useForm({
42 labelWidth: 120, 39 labelWidth: 120,
43 schemas, 40 schemas,
44 showActionButtonGroup: false, 41 showActionButtonGroup: false,
@@ -47,29 +44,7 @@ @@ -47,29 +44,7 @@
47 }, 44 },
48 }); 45 });
49 46
50 - const [register, { closeDrawer }] = useDrawerInner((data) => {  
51 - // 方式1  
52 - data.orderHodTime = data.orderHodTime ? dateUtil(data.orderHodTime) : null;  
53 - data.productionDepartmentConsignTime = data.productionDepartmentConsignTime  
54 - ? dateUtil(data.productionDepartmentConsignTime)  
55 - : null;  
56 -  
57 - fields.baseFields = {  
58 - ...fields.baseFields,  
59 - ...data.lockFields.baseFields,  
60 - };  
61 -  
62 - if (id.value) {  
63 - setFieldsValue({  
64 - ...toRaw(data),  
65 - baseInfo: { ...toRaw(data) },  
66 - });  
67 - } else {  
68 - setFieldsValue({});  
69 - }  
70 - });  
71 -  
72 - return { register, schemas, registerForm, getFieldsValue }; 47 + return { fields, schemas, registerForm, getFieldsValue, setFieldsValue, resetFields };
73 }, 48 },
74 }); 49 });
75 </script> 50 </script>
src/views/project/order/tableData.tsx
@@ -151,7 +151,7 @@ export function getOrderColumns() { @@ -151,7 +151,7 @@ export function getOrderColumns() {
151 { 151 {
152 title: '客户单价', 152 title: '客户单价',
153 width: 150, 153 width: 150,
154 - dataIndex: 'profitAnalysisInfo.customerPrice', 154 + dataIndex: 'customerPrice',
155 customRender: (column) => { 155 customRender: (column) => {
156 const { record } = column || {}; 156 const { record } = column || {};
157 return record?.profitAnalysisInfo?.customerPrice; 157 return record?.profitAnalysisInfo?.customerPrice;
@@ -160,7 +160,7 @@ export function getOrderColumns() { @@ -160,7 +160,7 @@ export function getOrderColumns() {
160 { 160 {
161 title: '客户总价', 161 title: '客户总价',
162 width: 150, 162 width: 150,
163 - dataIndex: 'profitAnalysisInfo.customerTotalPrice', 163 + dataIndex: 'customerTotalPrice',
164 customRender: (column) => { 164 customRender: (column) => {
165 const { record } = column || {}; 165 const { record } = column || {};
166 return record?.profitAnalysisInfo?.customerTotalPrice; 166 return record?.profitAnalysisInfo?.customerTotalPrice;
@@ -169,7 +169,7 @@ export function getOrderColumns() { @@ -169,7 +169,7 @@ export function getOrderColumns() {
169 { 169 {
170 title: '生成科单价', 170 title: '生成科单价',
171 width: 150, 171 width: 150,
172 - dataIndex: 'profitAnalysisInfo.productionDepartmentPrice', 172 + dataIndex: 'productionDepartmentPrice',
173 customRender: (column) => { 173 customRender: (column) => {
174 const { record } = column || {}; 174 const { record } = column || {};
175 return record?.profitAnalysisInfo?.productionDepartmentPrice; 175 return record?.profitAnalysisInfo?.productionDepartmentPrice;
@@ -178,7 +178,7 @@ export function getOrderColumns() { @@ -178,7 +178,7 @@ export function getOrderColumns() {
178 { 178 {
179 title: '包装费用', 179 title: '包装费用',
180 width: 150, 180 width: 150,
181 - dataIndex: 'profitAnalysisInfo.packetPrice', 181 + dataIndex: 'packetPrice',
182 customRender: (column) => { 182 customRender: (column) => {
183 const { record } = column || {}; 183 const { record } = column || {};
184 return record?.profitAnalysisInfo?.packetPrice; 184 return record?.profitAnalysisInfo?.packetPrice;
@@ -187,7 +187,7 @@ export function getOrderColumns() { @@ -187,7 +187,7 @@ export function getOrderColumns() {
187 { 187 {
188 title: '包装费用合计', 188 title: '包装费用合计',
189 width: 150, 189 width: 150,
190 - dataIndex: 'profitAnalysisInfo.packetTotalPrice', 190 + dataIndex: 'packetTotalPrice',
191 customRender: (column) => { 191 customRender: (column) => {
192 const { record } = column || {}; 192 const { record } = column || {};
193 return record?.profitAnalysisInfo?.packetTotalPrice; 193 return record?.profitAnalysisInfo?.packetTotalPrice;
@@ -196,7 +196,7 @@ export function getOrderColumns() { @@ -196,7 +196,7 @@ export function getOrderColumns() {
196 { 196 {
197 title: '汇率', 197 title: '汇率',
198 width: 150, 198 width: 150,
199 - dataIndex: 'profitAnalysisInfo.exchangeRate', 199 + dataIndex: 'exchangeRate',
200 customRender: (column) => { 200 customRender: (column) => {
201 const { record } = column || {}; 201 const { record } = column || {};
202 return record?.profitAnalysisInfo?.exchangeRate; 202 return record?.profitAnalysisInfo?.exchangeRate;
@@ -205,7 +205,7 @@ export function getOrderColumns() { @@ -205,7 +205,7 @@ export function getOrderColumns() {
205 { 205 {
206 title: '利润率', 206 title: '利润率',
207 width: 150, 207 width: 150,
208 - dataIndex: 'profitAnalysisInfo.profitRate', 208 + dataIndex: 'profitRate',
209 customRender: (column) => { 209 customRender: (column) => {
210 const { record } = column || {}; 210 const { record } = column || {};
211 return record?.profitAnalysisInfo?.profitRate; 211 return record?.profitAnalysisInfo?.profitRate;
@@ -222,67 +222,118 @@ export function getOrderColumns() { @@ -222,67 +222,118 @@ export function getOrderColumns() {
222 title: 'pp date', 222 title: 'pp date',
223 width: 150, 223 width: 150,
224 dataIndex: 'ppTime', 224 dataIndex: 'ppTime',
  225 + customRender: (column) => {
  226 + const { record } = column || {};
  227 + return record?.trackStageInfo?.ppTime;
  228 + },
225 }, 229 },
226 { 230 {
227 title: 'pp样品确认意见', 231 title: 'pp样品确认意见',
228 width: 150, 232 width: 150,
229 dataIndex: 'ppConfirmResult', 233 dataIndex: 'ppConfirmResult',
  234 + customRender: (column) => {
  235 + const { record } = column || {};
  236 + return record?.trackStageInfo?.ppConfirmResult;
  237 + },
230 }, 238 },
231 { 239 {
232 title: 'EXTRA,SHOWROOM,ONLINE sample发送时间', 240 title: 'EXTRA,SHOWROOM,ONLINE sample发送时间',
233 width: 250, 241 width: 250,
234 dataIndex: 'esoSampleSendTime', 242 dataIndex: 'esoSampleSendTime',
  243 + customRender: (column) => {
  244 + const { record } = column || {};
  245 + return record?.trackStageInfo?.esoSampleSendTime;
  246 + },
235 }, 247 },
236 { 248 {
237 title: 'shippment sample 发送时间', 249 title: 'shippment sample 发送时间',
238 width: 150, 250 width: 150,
239 dataIndex: 'shippmentSampleSendTime', 251 dataIndex: 'shippmentSampleSendTime',
  252 + customRender: (column) => {
  253 + const { record } = column || {};
  254 + return record?.trackStageInfo?.shippmentSampleSendTime;
  255 + },
240 }, 256 },
241 { 257 {
242 title: 'shipment sample确认意见', 258 title: 'shipment sample确认意见',
243 width: 150, 259 width: 150,
244 dataIndex: 'shippmentSampleConfirmResult', 260 dataIndex: 'shippmentSampleConfirmResult',
  261 + customRender: (column) => {
  262 + const { record } = column || {};
  263 + return record?.trackStageInfo?.shippmentSampleConfirmResult;
  264 + },
245 }, 265 },
246 { 266 {
247 title: '自测通过时间', 267 title: '自测通过时间',
248 width: 150, 268 width: 150,
249 dataIndex: 'selfTestPassTime', 269 dataIndex: 'selfTestPassTime',
  270 + customRender: (column) => {
  271 + const { record } = column || {};
  272 + return record?.trackStageInfo?.selfTestPassTime;
  273 + },
250 }, 274 },
251 { 275 {
252 title: 'Aitex测试发送时间', 276 title: 'Aitex测试发送时间',
253 width: 150, 277 width: 150,
254 dataIndex: 'aitexTestSendTime', 278 dataIndex: 'aitexTestSendTime',
  279 + customRender: (column) => {
  280 + const { record } = column || {};
  281 + return record?.trackStageInfo?.aitexTestSendTime;
  282 + },
255 }, 283 },
256 { 284 {
257 title: 'Aitex测试结果', 285 title: 'Aitex测试结果',
258 width: 150, 286 width: 150,
259 dataIndex: 'aitexTestFinishResult', 287 dataIndex: 'aitexTestFinishResult',
  288 + customRender: (column) => {
  289 + const { record } = column || {};
  290 + return record?.trackStageInfo?.aitexTestFinishResult;
  291 + },
260 }, 292 },
261 { 293 {
262 title: 'SGS测试发送时间', 294 title: 'SGS测试发送时间',
263 width: 150, 295 width: 150,
264 dataIndex: 'sgsTestSendTime', 296 dataIndex: 'sgsTestSendTime',
  297 + customRender: (column) => {
  298 + const { record } = column || {};
  299 + return record?.trackStageInfo?.sgsTestSendTime;
  300 + },
265 }, 301 },
266 { 302 {
267 title: 'SGS测试结果', 303 title: 'SGS测试结果',
268 width: 150, 304 width: 150,
269 dataIndex: 'sgsTestFinishResult', 305 dataIndex: 'sgsTestFinishResult',
  306 + customRender: (column) => {
  307 + const { record } = column || {};
  308 + return record?.trackStageInfo?.sgsTestFinishResult;
  309 + },
270 }, 310 },
271 -  
272 { 311 {
273 title: 'Barcode sticker arrival time', 312 title: 'Barcode sticker arrival time',
274 width: 150, 313 width: 150,
275 dataIndex: 'barcodeStickerArrivalTime', 314 dataIndex: 'barcodeStickerArrivalTime',
  315 + customRender: (column) => {
  316 + const { record } = column || {};
  317 + return record?.trackStageInfo?.barcodeStickerArrivalTime;
  318 + },
276 }, 319 },
277 { 320 {
278 title: '最晚包材到货时间', 321 title: '最晚包材到货时间',
279 width: 150, 322 width: 150,
280 dataIndex: 'latestArrivalTime', 323 dataIndex: 'latestArrivalTime',
  324 + customRender: (column) => {
  325 + const { record } = column || {};
  326 + return record?.trackStageInfo?.latestArrivalTime;
  327 + },
281 }, 328 },
282 { 329 {
283 title: '最晚订舱+报关资料时间', 330 title: '最晚订舱+报关资料时间',
284 width: 150, 331 width: 150,
285 dataIndex: 'latestBkTime', 332 dataIndex: 'latestBkTime',
  333 + customRender: (column) => {
  334 + const { record } = column || {};
  335 + return record?.trackStageInfo?.latestBkTime;
  336 + },
286 }, 337 },
287 ], 338 ],
288 }, 339 },
@@ -292,71 +343,114 @@ export function getOrderColumns() { @@ -292,71 +343,114 @@ export function getOrderColumns() {
292 dataIndex: 'inspectionStageInfo', 343 dataIndex: 'inspectionStageInfo',
293 children: [ 344 children: [
294 { 345 {
295 - title: '中期验货申请时间', 346 + title: 'midCheckApplyTime',
296 width: 150, 347 width: 150,
297 - dataIndex: 'endCheckApplyTime', 348 + label: '中期验货申请时间',
  349 + dataIndex: 'midCheckApplyTime',
  350 + customRender: (column) => {
  351 + const { record } = column || {};
  352 + return record?.inspectionStageInfo?.midCheckApplyTime;
  353 + },
298 }, 354 },
299 { 355 {
300 title: '中期验货(功能性-拉力/跌落等、外观性-颜色/规格等、耐久性-烤厅等)', 356 title: '中期验货(功能性-拉力/跌落等、外观性-颜色/规格等、耐久性-烤厅等)',
301 width: 300, 357 width: 300,
302 dataIndex: 'midCheckComment', 358 dataIndex: 'midCheckComment',
  359 + customRender: (column) => {
  360 + const { record } = column || {};
  361 + return record?.inspectionStageInfo?.midCheckComment;
  362 + },
303 }, 363 },
304 { 364 {
305 title: '中期验货结果PASS / FAIL', 365 title: '中期验货结果PASS / FAIL',
306 width: 150, 366 width: 150,
307 dataIndex: 'midCheckResult', 367 dataIndex: 'midCheckResult',
  368 + customRender: (column) => {
  369 + const { record } = column || {};
  370 + return record?.inspectionStageInfo?.midCheckResult;
  371 + },
308 }, 372 },
309 { 373 {
310 title: '尾期验货申请时间', 374 title: '尾期验货申请时间',
311 width: 150, 375 width: 150,
312 dataIndex: 'endCheckApplyTime', 376 dataIndex: 'endCheckApplyTime',
313 - },  
314 -  
315 - {  
316 - title: 'midCheckApplyTime',  
317 - width: 150,  
318 - dataIndex: 'midCheckApplyTime', 377 + customRender: (column) => {
  378 + const { record } = column || {};
  379 + return record?.inspectionStageInfo?.endCheckApplyTime;
  380 + },
319 }, 381 },
320 { 382 {
321 title: '长度/规格', 383 title: '长度/规格',
322 width: 150, 384 width: 150,
323 dataIndex: 'specification', 385 dataIndex: 'specification',
  386 + customRender: (column) => {
  387 + const { record } = column || {};
  388 + return record?.inspectionStageInfo?.specification;
  389 + },
324 }, 390 },
325 { 391 {
326 title: '功能性不良', 392 title: '功能性不良',
327 width: 150, 393 width: 150,
328 dataIndex: 'functionality', 394 dataIndex: 'functionality',
  395 + customRender: (column) => {
  396 + const { record } = column || {};
  397 + return record?.inspectionStageInfo?.functionality;
  398 + },
329 }, 399 },
330 { 400 {
331 title: '电镀不良', 401 title: '电镀不良',
332 width: 150, 402 width: 150,
333 dataIndex: 'electroplate', 403 dataIndex: 'electroplate',
  404 + customRender: (column) => {
  405 + const { record } = column || {};
  406 + return record?.inspectionStageInfo?.electroplate;
  407 + },
334 }, 408 },
335 { 409 {
336 title: '不良1', 410 title: '不良1',
337 width: 150, 411 width: 150,
338 dataIndex: 'value1', 412 dataIndex: 'value1',
  413 + customRender: (column) => {
  414 + const { record } = column || {};
  415 + return record?.inspectionStageInfo?.value1;
  416 + },
339 }, 417 },
340 418
341 { 419 {
342 title: '不良2', 420 title: '不良2',
343 width: 150, 421 width: 150,
344 dataIndex: 'value2', 422 dataIndex: 'value2',
  423 + customRender: (column) => {
  424 + const { record } = column || {};
  425 + return record?.inspectionStageInfo?.value2;
  426 + },
345 }, 427 },
346 { 428 {
347 title: '其他不良3', 429 title: '其他不良3',
348 width: 150, 430 width: 150,
349 dataIndex: 'value3', 431 dataIndex: 'value3',
  432 + customRender: (column) => {
  433 + const { record } = column || {};
  434 + return record?.inspectionStageInfo?.value3;
  435 + },
350 }, 436 },
351 { 437 {
352 title: '包装:卡片、条码、箱贴,箱单 ', 438 title: '包装:卡片、条码、箱贴,箱单 ',
353 width: 150, 439 width: 150,
354 dataIndex: 'boxPacket', 440 dataIndex: 'boxPacket',
  441 + customRender: (column) => {
  442 + const { record } = column || {};
  443 + return record?.inspectionStageInfo?.boxPacket;
  444 + },
355 }, 445 },
356 { 446 {
357 title: '尾期验货结果PASS / FAIL', 447 title: '尾期验货结果PASS / FAIL',
358 width: 150, 448 width: 150,
359 dataIndex: 'endCheckResult', 449 dataIndex: 'endCheckResult',
  450 + customRender: (column) => {
  451 + const { record } = column || {};
  452 + return record?.inspectionStageInfo?.endCheckResult;
  453 + },
360 }, 454 },
361 ], 455 ],
362 }, 456 },
@@ -722,69 +816,74 @@ export const FIELDS_PROFIT_INFO = [ @@ -722,69 +816,74 @@ export const FIELDS_PROFIT_INFO = [
722 //质量检测信息 816 //质量检测信息
723 export const FIELDS_INSPECTION_INFO = [ 817 export const FIELDS_INSPECTION_INFO = [
724 { 818 {
725 - field: 'inspectionStageInfo.midCheckApplyTime', 819 + field: 'midCheckApplyTime',
726 component: 'DatePicker', 820 component: 'DatePicker',
727 label: '中期验货申请时间', 821 label: '中期验货申请时间',
728 rules: [{ required: true }], 822 rules: [{ required: true }],
729 }, 823 },
730 { 824 {
731 - field: 'inspectionStageInfo.midCheckComment', 825 + field: 'midCheckComment',
732 component: 'Input', 826 component: 'Input',
733 label: '中期验货(功能性-拉力/跌落等、外观性-颜色/规格等、耐久性-烤厅等)', 827 label: '中期验货(功能性-拉力/跌落等、外观性-颜色/规格等、耐久性-烤厅等)',
734 rules: [{ required: true }], 828 rules: [{ required: true }],
735 }, 829 },
736 { 830 {
737 - field: 'inspectionStageInfo.midCheckResult', 831 + field: 'midCheckResult',
738 component: 'Select', 832 component: 'Select',
739 optionField: 'midCheckResult', 833 optionField: 'midCheckResult',
740 -  
741 label: '中期验货结果PASS / FAIL', 834 label: '中期验货结果PASS / FAIL',
742 rules: [{ required: true }], 835 rules: [{ required: true }],
743 }, 836 },
744 { 837 {
745 - field: 'inspectionStageInfo.specification', 838 + field: 'endCheckApplyTime',
  839 + component: 'DatePicker',
  840 + label: '尾期验货申请时间',
  841 + rules: [{ required: true }],
  842 + },
  843 + {
  844 + field: 'specification',
746 component: 'Input', 845 component: 'Input',
747 label: '长度/规格', 846 label: '长度/规格',
748 rules: [{ required: true }], 847 rules: [{ required: true }],
749 }, 848 },
750 { 849 {
751 - field: 'inspectionStageInfo.functionality', 850 + field: 'functionality',
752 component: 'Input', 851 component: 'Input',
753 label: '功能性不良', 852 label: '功能性不良',
754 rules: [{ required: true }], 853 rules: [{ required: true }],
755 }, 854 },
756 { 855 {
757 - field: 'inspectionStageInfo.electroplate', 856 + field: 'electroplate',
758 component: 'Input', 857 component: 'Input',
759 label: '电镀不良', 858 label: '电镀不良',
760 rules: [{ required: true }], 859 rules: [{ required: true }],
761 }, 860 },
762 { 861 {
763 - field: 'inspectionStageInfo.value1', 862 + field: 'value1',
764 component: 'Input', 863 component: 'Input',
765 label: '不良1', 864 label: '不良1',
766 rules: [{ required: true }], 865 rules: [{ required: true }],
767 }, 866 },
768 { 867 {
769 - field: 'inspectionStageInfo.value2', 868 + field: 'value2',
770 component: 'Input', 869 component: 'Input',
771 label: '不良2', 870 label: '不良2',
772 rules: [{ required: true }], 871 rules: [{ required: true }],
773 }, 872 },
774 { 873 {
775 - field: 'inspectionStageInfo.value3', 874 + field: 'value3',
776 component: 'Input', 875 component: 'Input',
777 label: '其他不良3', 876 label: '其他不良3',
778 rules: [{ required: true }], 877 rules: [{ required: true }],
779 }, 878 },
780 { 879 {
781 - field: 'inspectionStageInfo.boxPacket', 880 + field: 'boxPacket',
782 component: 'Input', 881 component: 'Input',
783 label: '包装:卡片、条码、箱贴,箱单', 882 label: '包装:卡片、条码、箱贴,箱单',
784 rules: [{ required: true }], 883 rules: [{ required: true }],
785 }, 884 },
786 { 885 {
787 - field: 'inspectionStageInfo.endCheckResult', 886 + field: 'endCheckResult',
788 component: 'Select', 887 component: 'Select',
789 label: '尾期验货结果PASS / FAIL', 888 label: '尾期验货结果PASS / FAIL',
790 optionField: 'endCheckResult', 889 optionField: 'endCheckResult',
@@ -805,12 +904,77 @@ export function getFormConfig(): Partial&lt;FormProps&gt; { @@ -805,12 +904,77 @@ export function getFormConfig(): Partial&lt;FormProps&gt; {
805 productStyle, 904 productStyle,
806 outboundType, 905 outboundType,
807 packetType, 906 packetType,
  907 + ideaSource,
  908 + manualPreform,
  909 + midCheckResult,
  910 + endCheckResult,
808 } = useOrderInfo(orderStore); 911 } = useOrderInfo(orderStore);
809 912
810 return { 913 return {
811 labelWidth: 100, 914 labelWidth: 100,
812 schemas: [ 915 schemas: [
813 { 916 {
  917 + field: `createStartTime`,
  918 + label: `生成开始时间`,
  919 + component: 'DatePicker',
  920 + colProps: {
  921 + xl: 8,
  922 + xxl: 8,
  923 + },
  924 + },
  925 + {
  926 + field: `createEndTime`,
  927 + label: `生成结束时间`,
  928 + component: 'DatePicker',
  929 + colProps: {
  930 + xl: 8,
  931 + xxl: 8,
  932 + },
  933 + },
  934 + {
  935 + field: `orderStatus`,
  936 + label: `单据状态`,
  937 + component: 'Select',
  938 + colProps: {
  939 + xl: 12,
  940 + xxl: 8,
  941 + },
  942 + componentProps: {
  943 + options: [
  944 + { label: '订单创建完成', value: 0 },
  945 + { label: '利润分析表待审核', value: 10 },
  946 + { label: '利润分析表审核通过', value: 11 },
  947 + { label: '利润分析表审核驳回', value: 12 },
  948 + { label: '项目报告书待审核', value: 20 },
  949 + { label: '项目报告书审核通过', value: 21 },
  950 + { label: '项目报告书审核驳回', value: 22 },
  951 + { label: '跟单中', value: 30 },
  952 + { label: '跟单完成', value: 31 },
  953 + { label: '质检中', value: 40 },
  954 + { label: '质检完成', value: 41 },
  955 + { label: '订单完成', value: 50 },
  956 + ],
  957 + },
  958 + },
  959 + {
  960 + field: `commitUserName`,
  961 + label: `提交人名称`,
  962 + component: 'Input',
  963 + colProps: {
  964 + xl: 12,
  965 + xxl: 8,
  966 + },
  967 + },
  968 + {
  969 + field: `commitUserPhone`,
  970 + label: `提交人手机号码`,
  971 + component: 'Input',
  972 + colProps: {
  973 + xl: 12,
  974 + xxl: 8,
  975 + },
  976 + },
  977 + {
814 field: `customerCode`, 978 field: `customerCode`,
815 label: `客户编码`, 979 label: `客户编码`,
816 component: 'Select', 980 component: 'Select',
@@ -822,6 +986,173 @@ export function getFormConfig(): Partial&lt;FormProps&gt; { @@ -822,6 +986,173 @@ export function getFormConfig(): Partial&lt;FormProps&gt; {
822 options: customerCode, 986 options: customerCode,
823 }, 987 },
824 }, 988 },
  989 + {
  990 + field: `projectNo`,
  991 + label: `项目号`,
  992 + component: 'Select',
  993 + colProps: {
  994 + xl: 12,
  995 + xxl: 8,
  996 + },
  997 + componentProps: {
  998 + options: projectNo,
  999 + },
  1000 + },
  1001 + {
  1002 + field: `productionDepartment`,
  1003 + label: `生产科`,
  1004 + component: 'Select',
  1005 + colProps: {
  1006 + xl: 12,
  1007 + xxl: 8,
  1008 + },
  1009 + componentProps: {
  1010 + options: productionDepartment,
  1011 + },
  1012 + },
  1013 + {
  1014 + field: `productionDepartmentConsignStartTime`,
  1015 + label: `生成科拖货开始时间`,
  1016 + component: 'DatePicker',
  1017 + colProps: {
  1018 + xl: 12,
  1019 + xxl: 8,
  1020 + },
  1021 + },
  1022 + {
  1023 + field: `productionDepartmentConsignEndTime`,
  1024 + label: `生成科拖货结束时间`,
  1025 + component: 'DatePicker',
  1026 + colProps: {
  1027 + xl: 12,
  1028 + xxl: 8,
  1029 + },
  1030 + componentProps: {
  1031 + options: customerCode,
  1032 + },
  1033 + },
  1034 + {
  1035 + field: `orderHodStartTime`,
  1036 + label: `订单上HOD开始时间`,
  1037 + component: 'DatePicker',
  1038 + colProps: {
  1039 + xl: 12,
  1040 + xxl: 8,
  1041 + },
  1042 + },
  1043 + {
  1044 + field: `orderHodEndTime`,
  1045 + label: `订单上HOD结束时间`,
  1046 + component: 'DatePicker',
  1047 + colProps: {
  1048 + xl: 12,
  1049 + xxl: 8,
  1050 + },
  1051 + },
  1052 + {
  1053 + field: `profitRateLqt`,
  1054 + label: `最小利润率`,
  1055 + component: 'InputNumber',
  1056 + colProps: {
  1057 + xl: 12,
  1058 + xxl: 8,
  1059 + },
  1060 + },
  1061 + {
  1062 + field: `profitRateGqt`,
  1063 + label: `最大利润率`,
  1064 + component: 'InputNumber',
  1065 + colProps: {
  1066 + xl: 12,
  1067 + xxl: 8,
  1068 + },
  1069 + },
  1070 + {
  1071 + field: `ideaSource`,
  1072 + label: `想法来源`,
  1073 + component: 'Select',
  1074 + colProps: {
  1075 + xl: 12,
  1076 + xxl: 8,
  1077 + },
  1078 + componentProps: {
  1079 + options: ideaSource,
  1080 + },
  1081 + },
  1082 + {
  1083 + field: `manualPreform`,
  1084 + label: `手工初型`,
  1085 + component: 'Select',
  1086 + colProps: {
  1087 + xl: 12,
  1088 + xxl: 8,
  1089 + },
  1090 + componentProps: {
  1091 + options: manualPreform,
  1092 + },
  1093 + },
  1094 + {
  1095 + field: `ppConfirmResult`,
  1096 + label: `pp样品确认意见`,
  1097 + component: 'Select',
  1098 + colProps: {
  1099 + xl: 12,
  1100 + xxl: 8,
  1101 + },
  1102 + componentProps: {
  1103 + options: [
  1104 + {
  1105 + label: 'ok',
  1106 + value: 'ok',
  1107 + },
  1108 + ],
  1109 + },
  1110 + },
  1111 + {
  1112 + field: `selfTestPassStartTime`,
  1113 + label: `自测通过开始时间`,
  1114 + component: 'DatePicker',
  1115 + colProps: {
  1116 + xl: 12,
  1117 + xxl: 8,
  1118 + },
  1119 + },
  1120 + {
  1121 + field: `selfTestPassEndTime`,
  1122 + label: `自测通过结束时间`,
  1123 + component: 'DatePicker',
  1124 + colProps: {
  1125 + xl: 12,
  1126 + xxl: 8,
  1127 + },
  1128 + componentProps: {
  1129 + options: customerCode,
  1130 + },
  1131 + },
  1132 + {
  1133 + field: `midCheckResult`,
  1134 + label: `中期验货结果`,
  1135 + component: 'Select',
  1136 + colProps: {
  1137 + xl: 12,
  1138 + xxl: 8,
  1139 + },
  1140 + componentProps: {
  1141 + options: midCheckResult,
  1142 + },
  1143 + },
  1144 + {
  1145 + field: `endCheckResult`,
  1146 + label: `尾期验货结果`,
  1147 + component: 'Select',
  1148 + colProps: {
  1149 + xl: 12,
  1150 + xxl: 8,
  1151 + },
  1152 + componentProps: {
  1153 + options: endCheckResult,
  1154 + },
  1155 + },
825 ], 1156 ],
826 }; 1157 };
827 } 1158 }