往来单位 调整

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

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

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

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

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

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

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