|
|
@ -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 = ''
|
|
|
|