往来单位 调整

szh-new
张同海 3 months ago
parent f5f6a30333
commit 0ff5944417

@ -204,11 +204,10 @@ export function getCustomerServiceList() {
method: 'get', method: 'get',
}) })
} }
export function getSaleUserList(query) { export function getSaleUserList() {
return request<DataResult>({ return request<DataResult>({
url: Api.getSaleUserList, url: Api.getSaleUserList,
method: 'get', method: 'get',
params: query,
}) })
} }
export function getVouchingClerkList() { export function getVouchingClerkList() {

@ -19,6 +19,9 @@
inheritAttrs: false, inheritAttrs: false,
props: { props: {
value: [Array, Object, String, Number], value: [Array, Object, String, Number],
api: {
type: Function,
},
disabled: { disabled: {
type: Boolean, type: Boolean,
}, },

@ -1,4 +1,3 @@
import { ref } from 'vue'
import { FormSchema } from '/@/components/Table' import { FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -15,6 +14,12 @@ import {
GetUserList, GetUserList,
GetAllClientList, GetAllClientList,
} from '/@/api/common' } from '/@/api/common'
import {
GetSaleList,
GetCustomerServiceList,
GetOperatorUserList,
GetVouchingClerkList,
} from '/@/views/operation/seaexport/api/BookingLedger'
let ClientCountryList = [] let ClientCountryList = []
const res4: API.DataResult = await getClientCountrySelectList() const res4: API.DataResult = await getClientCountrySelectList()
if (res4.succeeded) { if (res4.succeeded) {
@ -31,12 +36,12 @@ if (res11.succeeded) {
OrgTree.push({ label: e.shortName, value: e.id }) OrgTree.push({ label: e.shortName, value: e.id })
}) })
} }
const SaleUserList = ref([]) let SaleUserList = []
const res8: API.DataResult = await getSaleUserList() const res8: API.DataResult = await getSaleUserList()
if (res8.succeeded) { if (res8.succeeded) {
SaleUserList.value.splice(0) SaleUserList = []
res8.data.forEach((e) => { res8.data.forEach((e) => {
SaleUserList.value.push({ label: e.userName, value: e.id }) SaleUserList.push({ label: e.userName, value: e.id })
}) })
} }
let OperatorUserList = [] let OperatorUserList = []
@ -388,8 +393,8 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
label: '揽货人Name', label: '揽货人ID',
field: 'saleName', field: 'saleId',
component: 'DEdit', component: 'DEdit',
defaultValue: '', defaultValue: '',
show: false, show: false,
@ -403,43 +408,30 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'saleId',
label: '揽货人', label: '揽货人',
field: 'sale',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
defaultValue: '', defaultValue: '',
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: SaleUserList.value, api: GetSaleList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, showName: 'userName',
// filterOption: (input: string, option: any) => { valueField: 'userName',
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
// }, resultField: 'data',
onChange: (e, obj) => { onChange: async (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.id
formModel.saleName = obj.label formModel.sale = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.saleId = '' formModel.saleId = ''
formModel.saleName = '' formModel.sale = ''
} }
}, },
onSearch: (val) => {
console.log(val)
getSaleUserList({ queryKey: val }).then((res) => {
console.log(res)
res.data.forEach((item) => {
item.label = item.userName
item.value = item.id
})
SaleUserList.value = res.data
})
},
onEdit: () => { onEdit: () => {
const { formActionType } = e const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null formActionType ? formActionType.linkageForm(e) : null
@ -448,14 +440,14 @@ export const EditformSchema: FormSchema[] = [
}, },
}, },
{ {
label: '客服Name', label: '客服ID',
field: 'customerServiceName', field: 'customerService',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'customerService', field: 'customerServiceName',
label: '客服', label: '客服',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -463,16 +455,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: CustomerServiceList, api: GetCustomerServiceList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
}, onChange: async (e, obj) => {
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.customerService = obj.value formModel.customerService = obj.id
formModel.customerServiceName = obj.label formModel.customerServiceName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.customerService = '' formModel.customerService = ''
@ -488,13 +482,13 @@ export const EditformSchema: FormSchema[] = [
}, },
{ {
label: '操作人Name', label: '操作人Name',
field: 'operatorName', field: 'operatorId',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'operatorId', field: 'operatorName',
label: '操作人', label: '操作人',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -502,16 +496,18 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: OperatorUserList, api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.operatorId = obj.value formModel.operatorId = obj.id
formModel.operatorName = obj.label formModel.operatorName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.operatorId = '' formModel.operatorId = ''
@ -527,13 +523,13 @@ export const EditformSchema: FormSchema[] = [
}, },
{ {
label: '单证Name', label: '单证Name',
field: 'docName', field: 'doc',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false, show: false,
}, },
{ {
field: 'doc', field: 'docName',
label: '单证', label: '单证',
component: 'DEdit', component: 'DEdit',
colProps: { span: 4 }, colProps: { span: 4 },
@ -541,16 +537,16 @@ export const EditformSchema: FormSchema[] = [
componentProps: (e) => { componentProps: (e) => {
const { formModel } = e const { formModel } = e
return { return {
options: VouchingClerkList, api: GetVouchingClerkList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, valueField: 'userName',
filterOption: (input: string, option: any) => { showName: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
}, resultField: 'data',
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.doc = obj.value formModel.doc = obj.id
formModel.docName = obj.label formModel.docName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.doc = '' formModel.doc = ''

@ -23,6 +23,10 @@ import {
import { import {
GetClientSourceDetailSelectList, GetClientSourceDetailSelectList,
GetServiceProjectList, GetServiceProjectList,
GetSaleList,
GetCustomerServiceList,
GetOperatorUserList,
GetVouchingClerkList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore() const optionsStore = useOptionsStore()
@ -552,32 +556,32 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'sale', field: 'saleId',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'saleId',
label: '揽货人', label: '揽货人',
component: 'Select', field: 'sale',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: SaleUserList, api: GetSaleList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, showName: 'userName',
filterOption: (input: string, option: any) => { valueField: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
}, onChange: async (e, obj) => {
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.saleId = obj.value formModel.saleId = obj.id
formModel.saleName = obj.label formModel.sale = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.saleId = '' formModel.saleId = ''
formModel.saleName = '' formModel.sale = ''
} }
}, },
} }
@ -585,27 +589,28 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'customerServiceName', field: 'customerService',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'customerService', field: 'customerServiceName',
label: '客服', label: '客服',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: CustomerServiceList, api: GetCustomerServiceList,
labelField: 'pinYinCode',
showName: 'userName',
valueField: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { resultField: 'data',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 onChange: async (e, obj) => {
},
onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.customerService = obj.value formModel.customerService = obj.id
formModel.customerServiceName = obj.label formModel.customerServiceName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.customerService = '' formModel.customerService = ''
@ -615,30 +620,32 @@ export const formSchema: FormSchema[] = [
} }
}, },
}, },
// 操作人Name // 操作人ID
{ {
label: '', label: '',
field: 'operatorName', field: 'operatorId',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'operatorId', field: 'operatorName',
label: '操作人', label: '操作人',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: OperatorUserList, api: GetOperatorUserList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
allowClear: true, allowClear: true,
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { immediate: false,
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 resultField: 'data',
},
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.operatorId = obj.value formModel.operatorId = obj.id
formModel.operatorName = obj.label formModel.operatorName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.operatorId = '' formModel.operatorId = ''
@ -650,28 +657,28 @@ export const formSchema: FormSchema[] = [
}, },
{ {
label: '', label: '',
field: 'docName', field: 'doc',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
field: 'doc', field: 'docName',
label: '单证', label: '单证',
component: 'Select', component: 'ApiSelect',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: VouchingClerkList, api: GetVouchingClerkList,
allowClear: true, labelField: 'pinYinCode',
showSearch: true, valueField: 'userName',
filterOption: (input: string, option: any) => { showName: 'userName',
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 immediate: false,
}, resultField: 'data',
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.doc = obj.value formModel.doc = obj.id
formModel.docName = obj.label formModel.docName = obj.pinYinCode
} }
if (!e && !obj) { if (!e && !obj) {
formModel.doc = '' formModel.doc = ''

@ -11,7 +11,7 @@ import {
GetClientLanesSelectList, GetClientLanesSelectList,
GetClientPortSelectList, GetClientPortSelectList,
GetSaleList, GetSaleList,
GetClientGoodsList GetClientGoodsList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
// 字典 // 字典
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
@ -96,12 +96,10 @@ export const searchFormSchema: FormSchema[] = [
valueField: 'ediCode', valueField: 'ediCode',
showName: 'ediCode', showName: 'ediCode',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {},
}
}
} }
}, },
},
{ {
field: 'PORTDISCHARGE', field: 'PORTDISCHARGE',
label: '卸货港', label: '卸货港',
@ -117,12 +115,10 @@ export const searchFormSchema: FormSchema[] = [
valueField: 'ediCode', valueField: 'ediCode',
showName: 'ediCode', showName: 'ediCode',
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {},
}
}
} }
}, },
},
{ {
field: 'etd', field: 'etd',
label: 'ETD', label: 'ETD',
@ -875,7 +871,7 @@ export const detialForm: FormSchema[] = [
formModel.carrierId = '' formModel.carrierId = ''
formModel.carrierCode = '' formModel.carrierCode = ''
} }
} },
} }
}, },
}, },
@ -1045,9 +1041,9 @@ export const detialForm: FormSchema[] = [
formModel.portLoadId = null formModel.portLoadId = null
formModel.portLoadCode = null formModel.portLoadCode = null
} }
},
} }
} },
}
}, },
{ {
label: '', label: '',
@ -1234,7 +1230,7 @@ export const useDetailForm: FormSchema[] = [
options: useTypeList, options: useTypeList,
fieldNames: { fieldNames: {
label: 'name', label: 'name',
value: 'code' value: 'code',
}, },
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
@ -1312,7 +1308,7 @@ export const useDetailForm: FormSchema[] = [
if (!e && !obj) { if (!e && !obj) {
formModel.useToVal = '' formModel.useToVal = ''
} }
} },
} }
}, },
}, },
@ -1345,7 +1341,7 @@ export const useDetailForm: FormSchema[] = [
if (!e && !obj) { if (!e && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
} },
} }
}, },
}, },
@ -1379,9 +1375,9 @@ export const useDetailForm: FormSchema[] = [
if (!v && !obj) { if (!v && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
},
} }
} },
}
}, },
{ {
field: 'useToValShow', field: 'useToValShow',
@ -1410,7 +1406,7 @@ export const useDetailForm: FormSchema[] = [
if (!v && !obj) { if (!v && !obj) {
formModel.useToVal = null formModel.useToVal = null
} }
} },
} }
}, },
}, },
@ -1431,7 +1427,7 @@ export const useDetailForm: FormSchema[] = [
options: goodsList.value, options: goodsList.value,
fieldNames: { fieldNames: {
label: 'showName', label: 'showName',
value: 'hsCode' value: 'hsCode',
}, },
onChange: (v, obj) => { onChange: (v, obj) => {
if (v && obj) { if (v && obj) {
@ -1442,29 +1438,28 @@ export const useDetailForm: FormSchema[] = [
} }
}, },
onSearch: (val) => { onSearch: (val) => {
GetClientGoodsList({queryKey:val}).then(res=>{ GetClientGoodsList({ queryKey: val }).then((res) => {
res.data.forEach(item=>{ res.data.forEach((item) => {
item.showName = item.hsCode + '/' + item.goodName item.showName = item.hsCode + '/' + item.goodName
}) })
goodsList.value = res.data goodsList.value = res.data
}) })
} },
} }
}, },
}, },
] ]
let useTypeList = [] let useTypeList = []
const goodsList = ref([]) const goodsList = ref([])
function getUseTypeList() { function getUseTypeList() {
GetSlotUseToConfig().then(res => { GetSlotUseToConfig().then((res) => {
useTypeList = res.data useTypeList = res.data
}) })
} }
function getGoodsList() { function getGoodsList() {
GetClientGoodsList().then(res => { GetClientGoodsList().then((res) => {
res.data.forEach(item=>{ res.data.forEach((item) => {
item.showName = item.hsCode + '/' + item.goodName item.showName = item.hsCode + '/' + item.goodName
}) })
goodsList.value = res.data goodsList.value = res.data

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save