szh-new
sunzehua 3 months ago
parent eba844b8f7
commit cf21910fea

@ -4,7 +4,27 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetTaskPlatEnumDict } from './api'
import { GetClientListByCode,GetCarrierSelectList } from '/@/api/common'
import { pl } from 'element-plus/es/locales.mjs'
import {
GetControllerClientList,
GetCustomerServiceList,
GetSaleList,
GetVesselSelectList,
GetVoynoSelectList,
GetClientPortSelectList,
GetCarrierlist,
GetClientLanesSelectList,
GetYardClientList,
GetAgentCnClientList,
GetSaleUserList,
GetCustomClientList,
GetTruckClientList,
GetDeptList,
GetAgentClientList,
GetVouchingClerkList,
GetClientSourceSelectList,
GetClientSourceDetailSelectList,
GetShipAgencyClientList,
} from '/@/views/operation/seaexport/api/BookingLedger'
export const searchFormSchema: FormSchema[] = [
{
field: 'businessNo',
@ -83,48 +103,142 @@ export const searchFormSchema: FormSchema[] = [
}
},
},
// {
// field: 'taskCategory',
// label: '任务分类',
// component: 'Select',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// options: categoryData.value,
// fieldNames: {
// label: 'name',
// value: 'code'
// },
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// }
// },
// },
// {
// field: 'status',
// label: '任务状态',
// component: 'Select',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// options: statusData.value,
// fieldNames: {
// label: 'name',
// value: 'code'
// },
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// }
// },
// },
{
label: '客户',
field: 'customerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: () => {
return new Promise((resolve) => {
GetControllerClientList().then((res) => {
res.data.forEach((item) => {
if (item.codeName) item.shortName = item.codeName + '/' + item.shortName
})
resolve(res)
})
})
},
immediate: false,
labelField: 'shortName',
valueField: 'codeName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
label: '客服',
field: 'customerService',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userCode',
showName: 'userName',
immediate: false,
resultField: 'data'
}
},
},
{
label: '揽货人',
field: 'saleId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetSaleList,
labelField: 'pinYinCode',
valueField: 'id',
showName: 'userName',
immediate: false,
resultField: 'data'
}
},
},
{
label: '操作',
field: 'operatorId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'id',
showName: 'userName',
immediate: false,
resultField: 'data'
}
},
},
{
label: '船公司',
field: 'carrieR_CODE',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: () => {
return {
api: GetCarrierSelectList,
immediate: false,
labelField: 'ediCode',
valueField: 'ediCode',
resultField: 'data'
}
},
},
{
label: '装货港',
field: 'portloaD_CODE',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
showName: 'portName',
valueField: 'ediCode',
immediate: false
}
},
},
{
label: '卸货港',
field: 'portdischargE_CODE',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientPortSelectList,
resultField: 'data',
labelField: 'pinYinCode',
showName: 'portName',
valueField: 'ediCode',
immediate: false
}
},
},

@ -394,21 +394,52 @@ function getCurrentTotalStat() {
levelTreeAll.value = []
levelTree.value = []
let bussObj = ''
let str1 = ''
let str2 = ''
let queryData = formatParams(getForm().getFieldsValue()).queryCondition
if (queryData) {
queryData = JSON.parse(queryData)
for (let i = 0; i < queryData.length; i++) {
let i = queryData.length;
while (i--) {
if (queryData[i].FieldName === 'businessNo') {
bussObj = queryData[i].FieldValue
queryData.splice(i, 1)
queryData.splice(i, 1);
} else
if (queryData[i].FieldName === 'portloaD_CODE') {
str1 = queryData[i].FieldValue
queryData.splice(i, 1);
} else
if (queryData[i].FieldName === 'portdischargE_CODE') {
str2 = queryData[i].FieldValue
queryData.splice(i, 1);
}
}
// for (let i = 0; i < queryData.length; i++) {
// if (queryData[i].FieldName === 'businessNo') {
// bussObj = queryData[i].FieldValue
// queryData.splice(i, 1)
// i--
// }
// if (queryData[i].FieldName === 'portloaD_CODE') {
// str1 = queryData[i].FieldValue
// queryData.splice(i, 1)
// i--
// }
// if (queryData[i].FieldName === 'portdischargE_CODE') {
// str2 = queryData[i].FieldValue
// queryData.splice(i, 1)
// i--
// }
// }
console.log(queryData, 123123);
}
const data = {
isReCalc: false,
queryCondition: JSON.stringify(queryData),
otherQueryCondition:{
businessNo:bussObj
otherQueryCondition: {
businessNo: bussObj,
portloaD_CODE: str1,
portdischargE_CODE: str2
}
}
GetCurrentTotalStat(data)
@ -648,6 +679,8 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
const queryData = JSON.parse(formatParams(p).queryCondition)
data.pageCondition = formatParams(p).pageCondition
let bussObj = '' as any
let str1 = '' as any
let str2 = '' as any
for (let i = 0; i < queryData.length; i++) {
if (queryData[i].FieldName === 'task_TYPE') {
queryData[i].ConditionalType = 0
@ -658,12 +691,43 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
if (queryData[i].FieldName === 'taskSource') {
queryData[i].ConditionalType = 0
}
// if (queryData[i].FieldName === 'businessNo') {
// bussObj = queryData[i].FieldValue
// queryData.splice(i, 1)
// }
// if (queryData[i].FieldName === 'portloaD_CODE') {
// str1 = queryData[i].FieldValue
// queryData.splice(i, 1)
// }
// if (queryData[i].FieldName === 'portdischargE_CODE') {
// str2 = queryData[i].FieldValue
// queryData.splice(i, 1)
// }
}
let i = queryData.length;
while (i--) {
if (queryData[i].FieldName === 'businessNo') {
bussObj = queryData[i].FieldValue
queryData.splice(i, 1)
queryData.splice(i, 1);
} else
if (queryData[i].FieldName === 'portloaD_CODE') {
str1 = queryData[i].FieldValue
queryData.splice(i, 1);
} else
if (queryData[i].FieldName === 'portdischargE_CODE') {
str2 = queryData[i].FieldValue
queryData.splice(i, 1);
} else
if (queryData[i].FieldName === 'task_TYPE') {
queryData[i].ConditionalType = 0
} else
if (queryData[i].FieldName === 'taskRecvName') {
queryData[i].ConditionalType = 0
} else
if (queryData[i].FieldName === 'taskSource') {
queryData[i].ConditionalType = 0
}
}
console.log(bussObj)
data.queryCondition = JSON.stringify(queryData)
data.otherQueryCondition = {}
if (activeTopKey.value) {
@ -678,6 +742,12 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
if (bussObj) {
data.otherQueryCondition.businessNo = bussObj
}
if (str1) {
data.otherQueryCondition.portloaD_CODE = str1
}
if (str2) {
data.otherQueryCondition.portdischargE_CODE = str2
}
return data
},
immediate: false,

Loading…
Cancel
Save