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 { GetTaskPlatEnumDict } from './api'
import { GetClientListByCode,GetCarrierSelectList } from '/@/api/common' import { GetClientListByCode,GetCarrierSelectList } from '/@/api/common'
import { pl } from 'element-plus/es/locales.mjs' 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[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'businessNo', field: 'businessNo',
@ -83,48 +103,142 @@ export const searchFormSchema: FormSchema[] = [
} }
}, },
}, },
// { {
// field: 'taskCategory', label: '客户',
// label: '任务分类', field: 'customerId',
// component: 'Select', component: 'ApiSelect',
// required: false, required: false,
// dynamicDisabled: false, dynamicDisabled: false,
// colProps: { span: 4 }, colProps: { span: 4 },
// componentProps: ({ formModel }) => { componentProps: () => {
// return { return {
// options: categoryData.value, api: () => {
// fieldNames: { return new Promise((resolve) => {
// label: 'name', GetControllerClientList().then((res) => {
// value: 'code' res.data.forEach((item) => {
// }, if (item.codeName) item.shortName = item.codeName + '/' + item.shortName
// showSearch: true, })
// filterOption: (input: string, option: any) => { resolve(res)
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 })
// }, })
// } },
// }, immediate: false,
// }, labelField: 'shortName',
// { valueField: 'codeName',
// field: 'status', resultField: 'data',
// label: '任务状态', filterOption: (input: string, option: any) => {
// component: 'Select', return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// required: false, },
// dynamicDisabled: false, }
// colProps: { span: 4 }, },
// componentProps: ({ formModel }) => { },
// return { {
// options: statusData.value, label: '客服',
// fieldNames: { field: 'customerService',
// label: 'name', component: 'ApiSelect',
// value: 'code' required: false,
// }, dynamicDisabled: false,
// showSearch: true, colProps: { span: 4 },
// filterOption: (input: string, option: any) => { componentProps: () => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 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 = [] levelTreeAll.value = []
levelTree.value = [] levelTree.value = []
let bussObj = '' let bussObj = ''
let str1 = ''
let str2 = ''
let queryData = formatParams(getForm().getFieldsValue()).queryCondition let queryData = formatParams(getForm().getFieldsValue()).queryCondition
if (queryData) { if (queryData) {
queryData = JSON.parse(queryData) queryData = JSON.parse(queryData)
for (let i = 0; i < queryData.length; i++) { let i = queryData.length;
while (i--) {
if (queryData[i].FieldName === 'businessNo') { if (queryData[i].FieldName === 'businessNo') {
bussObj = queryData[i].FieldValue 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 = { const data = {
isReCalc: false, isReCalc: false,
queryCondition: JSON.stringify(queryData), queryCondition: JSON.stringify(queryData),
otherQueryCondition: { otherQueryCondition: {
businessNo:bussObj businessNo: bussObj,
portloaD_CODE: str1,
portdischargE_CODE: str2
} }
} }
GetCurrentTotalStat(data) GetCurrentTotalStat(data)
@ -648,6 +679,8 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
const queryData = JSON.parse(formatParams(p).queryCondition) const queryData = JSON.parse(formatParams(p).queryCondition)
data.pageCondition = formatParams(p).pageCondition data.pageCondition = formatParams(p).pageCondition
let bussObj = '' as any let bussObj = '' as any
let str1 = '' as any
let str2 = '' as any
for (let i = 0; i < queryData.length; i++) { for (let i = 0; i < queryData.length; i++) {
if (queryData[i].FieldName === 'task_TYPE') { if (queryData[i].FieldName === 'task_TYPE') {
queryData[i].ConditionalType = 0 queryData[i].ConditionalType = 0
@ -658,12 +691,43 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
if (queryData[i].FieldName === 'taskSource') { if (queryData[i].FieldName === 'taskSource') {
queryData[i].ConditionalType = 0 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') { if (queryData[i].FieldName === 'businessNo') {
bussObj = queryData[i].FieldValue 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.queryCondition = JSON.stringify(queryData)
data.otherQueryCondition = {} data.otherQueryCondition = {}
if (activeTopKey.value) { if (activeTopKey.value) {
@ -678,6 +742,12 @@ const [registerTable, { reload, setProps, getForm, getSelectRows, setColumns }]
if (bussObj) { if (bussObj) {
data.otherQueryCondition.businessNo = bussObj data.otherQueryCondition.businessNo = bussObj
} }
if (str1) {
data.otherQueryCondition.portloaD_CODE = str1
}
if (str2) {
data.otherQueryCondition.portdischargE_CODE = str2
}
return data return data
}, },
immediate: false, immediate: false,

Loading…
Cancel
Save