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