sunzehua 3 months ago
commit 56d5b872b9

@ -89,6 +89,8 @@ enum Api {
GetControllerClientList = '/mainApi/ClientCommon/GetControllerClientListByKey',
// 用户下拉
GetUserList = '/mainApi/Common/GetUserList',
// 根据权限id获取表单设置
GetFormSetListByModule = '/mainApi/FormSet/GetFormSetListByModule'
}
// 用户下拉数据
export function GetUserList(params) {
@ -478,6 +480,14 @@ export function GetCarrierSelectList(params) {
})
}
export function GetFormSetListByModule(params) {
return request({
url: Api.GetFormSetListByModule,
method: 'get',
params
})
}
/**
* api
*/

@ -9,7 +9,7 @@
</BasicForm>
<div class="table-wrapper" >
<slot name="left" class="left" ></slot>
<Table class="basic-table" v-show="getEmptyDataIsShowTable" ref="tableElRef" v-bind="getBindValues" :row-class-name="getRowClassName"
<Table class="basic-table" :virtual="true" v-show="getEmptyDataIsShowTable" ref="tableElRef" v-bind="getBindValues" :row-class-name="getRowClassName"
@change="handleTableChange" @resize-column="resizeColumn">
<template v-for="item in Object.keys($slots)" #[item]="data" :key="item">
<slot :name="item" v-bind="data || {}"></slot>
@ -23,7 +23,7 @@
</template>
<!-- 尾部插槽常用于合计 -->
<template #footer="data">
<slot name="footer" ></slot>
<slot name="footer"></slot>
</template>
<!-- <template #[`header-${column.dataIndex}`] v-for="(column, index) in columns" :key="index">-->
<!-- <HeaderCell :column="column" />-->

@ -23,17 +23,15 @@
/* fade-slide */
.fade-slide-leave-active,
.fade-slide-enter-active {
transition: all 0.3s;
transition: all 0.1s;
}
.fade-slide-enter-from {
opacity: 0;
transform: translateX(-30px);
}
.fade-slide-leave-to {
opacity: 0;
transform: translateX(30px);
}
// ///////////////////////////////////////////////

@ -38,7 +38,6 @@ interface AppState {
deleteId: string
FlowInstanceHistory:any
inBookingDetailsSave: boolean
topDown: boolean
saveFlag: boolean
ctnallList: any
FlowInstancesDetailsType:String
@ -70,7 +69,6 @@ export const useAppStore = defineStore({
saveNeedNumber: '',
deleteId: '',
inBookingDetailsSave: false,
topDown: false,
saveFlag: false,
ctnallList: [],
needSavePages: {},
@ -119,9 +117,6 @@ export const useAppStore = defineStore({
getsaveFlag(): any {
return this.saveFlag
},
gettopDown(): any {
return this.topDown
},
getinBookingDetailsSave(): any {
return this.inBookingDetailsSave
},
@ -214,9 +209,6 @@ export const useAppStore = defineStore({
setctnallList(data): void {
this.ctnallList = data
},
settopDown(data): void {
this.topDown = data
},
setinBookingDetailsSave(data): void {
this.inBookingDetailsSave = data
},

@ -236,6 +236,8 @@ import { FormSchema } from '/@/components/Table'
}
.table-box {
padding: 0 15px;
height: 65vh;
overflow: auto;
flex: 1;
.ant-input-disabled {
cursor: pointer;

@ -65,6 +65,7 @@
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
if (res.data.type) res.data.type = res.data.type.split(',')
setFieldsValue({
...res.data,
})
@ -83,10 +84,8 @@
async function handleSave(exit) {
try {
const values = await validate()
if (values.type) values.type = String(values.type)
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
@ -115,6 +114,7 @@
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
if (res.data.type) res.data.type = res.data.type.split(',')
await setFieldsValue({
...res.data,
})

@ -1,3 +1,4 @@
import { multiply } from 'lodash-es'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetCountrySelectList } from '/@/views/baseinfo/port/api'
import { ref } from 'vue'
@ -53,11 +54,12 @@ export const columns: BasicColumn[] = [
width: 200,
customRender: ({ record }) => {
let RData = ''
TypeList.forEach((item) => {
if (item.value == record.type) {
RData = item.label
}
})
if (record.type) {
RData = record.type
}
RData = RData.replace("1", "收货人")
RData = RData.replace("2", "发货人")
RData = RData.replace("3", "通知人")
return RData
},
},
@ -169,7 +171,7 @@ export const formSchema: FormSchema[] = [
field: 'type',
label: '类型',
component: 'Select',
required: false,
required: true,
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
@ -177,6 +179,7 @@ export const formSchema: FormSchema[] = [
options: TypeList,
allowClear: true,
showSearch: true,
mode: 'multiple',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},

@ -36,6 +36,12 @@
const props = defineProps({
id: {
type: String
},
data: {
type: Array,
default: () => {
return []
}
}
})
//
@ -43,19 +49,11 @@
const logLoading = ref(false)
//
const init = () => {
if (props.id) {
logLoading.value = true
GetSeaExportLogList({ id: props.id }).then((res) => {
const { data } = res
data.forEach(item => {
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
})
logList.value = data
logLoading.value = false
}).catch(() => {
logLoading.value = false
})
}
const data = props.data
data.forEach(item => {
if (item.createTime) item.createTime = item.createTime.split(' ')[0]
})
logList.value = data
}
onMounted(() => {
init()

@ -7,7 +7,6 @@
<div class="sea-export-detail" :class="{ 'ds-view-box': source != 'edit' }">
<a-tabs
size="small"
:class="!Showtabs ? 'Showtabs' : ''"
class="main-tab mt10"
:activeKey="tabActiveKey"
@change="changeTab"
@ -116,11 +115,12 @@
>
<Divider type="horizontal" />
<!-- 联系人信息 -->
<ContactList :id="id"></ContactList>
<ContactList :id="id" :data="bookingDetails.orderContactList"></ContactList>
</otherInfo>
</transition>
<transition name="slide">
<rightContent
v-if="id"
class="right-content"
ref="RefrightContent"
:id="id"
@ -130,7 +130,6 @@
@fileNewUpadte="fileNewUpadte"
@changeAtd="changeAtd"
@changeDetail="changeDetailFun"
@handleComplete="handleComplete"
@rules="getRules"
@inGoodsSave="inGoodsSaveFun"
@handleRefsh="handleRefshRight"
@ -179,20 +178,20 @@
import ApproveBtns from '/@/components/ApproveBtns/index.vue'
//
import StorageSpace from './components/storageSpace.vue'
// idname
import { permissionsInfo } from '/@/hooks/web/usePermission'
const router = useRouter()
const route = useRoute()
import {
BookingOrderGet,
BookingOrderSave,
GetCtnListRefsh,
GetClientSourceDetailSelectList,
GetSaleList,
GetDeptList,
SeaExportCopy,
SeaExportTaskAudit,
CreateTask,
SetTaskStatus
} from '../api/BookingLedger'
import { GetFormSetListByModule } from '/@/api/common'
const appStore = useAppStore()
const { notification, createMessage } = useMessage()
import operationArea from './modules/operationArea.vue'
@ -221,8 +220,9 @@
//
const source = ref(route.query.source || 'edit')
// const isCopy = ref(route.query.isCopy || false)
const Showtabs = ref(false)
const bookingDetails = ref({})
const bookingDetails = ref({
})
// // const bookingDetails = ref()
const tabActiveKey = ref('1')
const inChildLoading = ref(false)
@ -272,16 +272,25 @@
return '完成任务'
}
})
watch(
() => bookingDetails.value,
(val) => {
console.log(val)
},
{
deep: true,
},
)
//
const getFormSet = () => {
GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }).then(res => {
const { data } = res
if (data && data.length) {
const content = JSON.parse(data[0].content).columns
//
RefNoteInfo.value.updateSchema(content)
RefbasicInfo.value.updateSchema(content)
RefmailingInfo.value.updateSchemaL(content)
RefmailingInfo.value.updateSchemaR(content)
RefcargoInfo.value.updateSchema(content)
OtherInfo.value.updateSchema(content)
}
})
}
onMounted(() => {
// permission
getFormSet()
// tab
if (source.value != 'edit') document.getElementsByClassName('main-tab')[0].getElementsByClassName('ant-tabs-nav-wrap')[0].style.display = 'none'
})
@ -291,13 +300,16 @@
if (route.query.id && !id.value) {
id.value = route.query.id
}
bookingDetails.value = {}
excuteRules.value = []
excuteRulesType.value = ''
Showtabs.value = false
bookingDetails.value = {
orderContactList: []
}
if (id.value) {
//
excuteRules.value = []
excuteRulesType.value = ''
getDetail()
} else {
//
detailsLoadOver.value = false
isLockBooking.value = false
}
@ -329,121 +341,16 @@
res.data.ctnPriceInfo = [{}]
}
bookingDetails.value = res.data
appStore.settopDown(false)
inPageLoading.value = false
//
// if (res.data.sourceId) {
// let sourceDetailIdArr: any = []
// await GetClientSourceDetailSelectList({ id: res.data.sourceId }).then((res) => {
// res.data.forEach((item) => {
// sourceDetailIdArr.push({ label: item.detailName, value: item.id })
// })
// })
// RefbasicInfo.value.updateSchema({
// label: '',
// field: 'sourceDetailId',
// component: 'Select',
// required: false,
// dynamicDisabled: ({ values }) => {
// return !values.sourceId || source.value != 'edit'
// },
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: sourceDetailIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// })
// }
// if (res.data.saleId) {
// const FnsaleId: any = await GetSaleList()
// FnsaleId.data.forEach(async (item) => {
// if (item.id == res.data.saleId) {
// let saleDeptIdArr: any = []
// let saleOrgIdArr: any = []
// item.saleOrgList.forEach((item) => {
// saleOrgIdArr.push({ label: item.orgName, value: item.orgId })
// })
// if (item.defaultOrgId) {
// await GetDeptList({ orgId: item.defaultOrgId }).then((res) => {
// console.log(res, ' ')
// res.data.forEach((item) => {
// saleDeptIdArr.push({ label: item.orgName, value: item.id })
// })
// })
// }
// RefbasicInfo.value.updateSchema([
// {
// label: '',
// field: 'saleOrgId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: saleOrgIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// // formModel.saleDeptId = ''
// GetDeptList({ orgId: e }).then((res) => {
// console.log(res, ' ')
// let Arr: any = []
// res.data.forEach((item) => {
// Arr.push({ label: item.orgName, value: item.id })
// })
// updateSchema({
// label: '',
// field: 'saleDeptId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: Arr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// })
// })
// },
// },
// },
// {
// label: '',
// field: 'saleDeptId',
// component: 'Select',
// required: false,
// dynamicDisabled: source.value == 'edit' ? false : true,
// // defaultValue: '',
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// options: saleDeptIdArr,
// showSearch: true,
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// },
// },
// ])
// }
// })
// }
//
if (res.data.formSetList && res.data.formSetList.length) {
const formSetContent = JSON.parse(res.data.formSetList[0].content)
console.log(formSetContent)
// RefbasicInfo.value.updateSchema()
}
})
.catch(() => {
appStore.settopDown(false)
loading.value = false
})
}
@ -600,23 +507,23 @@
//
function changeDetailFun(data) {
const { detail } = data
// if (ifCompare(bookingDetails.value, detail.value) && !inChildLoading.value) {
// checkSaveFun({ type: 'details', hasChange: true })
// }
// bookingDetails.value = detail.value
}
// //
// // function ifCompare(object1, object2) {
// // var o1keys = Object.keys(object1)
// // var o2keys = Object.keys(object2)
// // if (o2keys.length !== o1keys.length) return false
// // for (let i = 0; i <= o1keys.length - 1; i++) {
// // const key = o1keys[i]
// // if (!o2keys.includes(key)) return false
// // if (object2[key] !== object1[key]) return false
// // }
// // return true
// // }
if (ifCompare(bookingDetails.value, detail.value) && !inChildLoading.value) {
checkSaveFun({ type: 'details', hasChange: true })
}
bookingDetails.value = detail.value
}
//
function ifCompare(object1, object2) {
var o1keys = Object.keys(object1)
var o2keys = Object.keys(object2)
if (o2keys.length !== o1keys.length) return false
for (let i = 0; i <= o1keys.length - 1; i++) {
const key = o1keys[i]
if (!o2keys.includes(key)) return false
if (object2[key] !== object1[key]) return false
}
return true
}
function checkSaveFun(data) {
if (inGoodsSave.value) {
return false
@ -751,9 +658,6 @@
bookingDetails.value.atd = time + ':00'
}
}
function handleComplete() {
checkSaveFun({ type: 'details', hasChange: false })
}
function inGoodsSaveFun(data) {
inGoodsSave.value = data
}
@ -828,7 +732,6 @@
const { rows, type } = data
excuteRules.value = rows
excuteRulesType.value = type
console.log(excuteRules.value, excuteRulesType.value)
}
//
const submitDc = (v) => {

@ -70,7 +70,7 @@ export function EditOpBusinessYard(parameter) {
// 详情 (Auth)
export function GetOpBusinessYardInfo(parameter) {
return request({
url: '/opApi/OpBusinessYard/GetOpBusinessYardInfo',
url: '/opApi/OpBusinessYard/GetBusinessYardByKeyId',
method: 'get',
params: parameter,
})

@ -2,6 +2,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options'
import Space from '/@/views/operation/seaexport/components/Space.vue'
import { useComponentRegister } from '/@/components/Form'
import { GetVouchingClerkList } from '/@/views/operation/seaexport/api/BookingLedger'
useComponentRegister('Space', Space)
const optionsStore = useOptionsStore()
import { getOptions } from '/@/hooks/dict'
@ -209,6 +210,18 @@ export const columns: BasicColumn[] = [
]
export const formSchema1: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
show: false,
},
{
label: '',
field: 'businessId',
component: 'Input',
show: false,
},
{
label: '提箱小票地址',
field: 'pickReceiptUrl',
@ -230,37 +243,38 @@ export const formSchema1: FormSchema[] = [
},
// 单证Id
{
label: '单证人员名称',
field: 'doc',
label: '单证',
field: 'docName',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const data = optionsStore.getOptionsByCode('GetVouchingClerkList')
resolve({ data })
})
},
labelField: 'userName',
valueField: 'id',
api: GetVouchingClerkList,
labelField: 'pinYinCode',
valueField: 'userName',
showName: 'userName',
immediate: false,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(obj)
if (obj) {
formModel.docName = obj.label
} else {
formModel.docName = ''
if (e && obj) {
formModel.doc = obj.id
}
},
if (!e && !obj) {
formModel.doc = null
}
}
}
},
},
{
field: 'doc',
label: '',
component: 'Input',
show: false
},
{
label: '单证电话',
field: 'docTel',
@ -292,7 +306,7 @@ export const formSchema1: FormSchema[] = [
label: '主提单号',
field: 'mblno',
component: 'Input',
defaultValue: '',
required: true,
colProps: {
span: 6,
},
@ -632,13 +646,6 @@ export const formSchema1: FormSchema[] = [
]
export const formSchema: FormSchema[] = [
{
label: '主键Id',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '业务Id',
field: 'businessId',

@ -1,3 +1,8 @@
<!--
* @Desc:
* @Author: lijj
* @Date: 2024-07-26 19:41:41
-->
<template>
<BasicModal
v-bind="$attrs"
@ -6,148 +11,33 @@
width="90%"
@register="registerModal"
>
<a-row :gutter="16">
<a-col :span="6">
<BasicTable @register="registerOpBusinessYardTable" @row-click="onRowClick">
<template #tableTitle>
<div class="buttonGroup">
<a-button type="link" @click="FnClickAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
新建
</a-button>
<a-popconfirm
title="确定要删除所选数据?"
ok-text="确定"
cancel-text="取消"
@confirm="FnClickDel"
>
<a-button type="link">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</div>
</template>
</BasicTable>
</a-col>
<a-col :span="18" class="OPCol">
<OpBusinessYardEdit
ref="YardEdit"
:business-id="businessId"
:select-id="selectId"
@success="handleSuccess"
/>
</a-col>
</a-row>
<OpBusinessYardEdit
ref="YardEdit"
:business-id="businessId"
@success="handleSuccess"
/>
<template #footer>
<span></span>
<el-button @click="closeModal"></el-button>
<el-button type="primary" @click="save"></el-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { columns } from './OpBusinessYardColumns'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicTable, useTable } from '/@/components/Table'
import { GetOpBusinessYardList, BatchDelOpBusinessYard } from './LetterApi'
import OpBusinessYardEdit from './OpBusinessYardEdit.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
// Emits
const emit = defineEmits(['success', 'register'])
const businessId = ref()
const selectId = ref()
const [registerModal] = useModalInner((data) => {
businessId.value = data.id
})
const [
registerOpBusinessYardTable,
{ reload, setSelectedRowKeys, clearSelectedRowKeys, getSelectRows },
] = useTable({
api: async (p) => {
const res: API.DataResult = await GetOpBusinessYardList(p)
setSelectedRowKeys([res.data[0].id])
selectId.value = res.data[0].id
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
resizeHeightOffset: 200,
beforeFetch: () => {
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: 1,
pageSize: 99999,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
condition.push({
FieldName: 'businessId',
FieldValue: businessId.value,
ConditionalType: 1,
})
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
rowKey: 'id',
columns,
isTreeTable: false,
pagination: false,
striped: true,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
autoCreateKey: false,
indexColumnProps: {
fixed: 'left',
},
canResize: true,
rowSelection: {
type: 'radio',
onSelect: (e) => {
selectId.value = e.id
},
},
const [registerModal, { closeModal }] = useModalInner((data) => {
businessId.value = data.info
})
//
const YardEdit = ref(null)
//
const onRowClick = (record) => {
YardEdit.value.setFieldsValue({
...record,
})
YardEdit.value.setFieldsValue1({
...record
})
}
//
function FnClickDel() {
if (getSelectRows().length) {
let Apidata: any = {
ids: [],
}
getSelectRows().forEach((item) => {
Apidata.ids.push(item.id)
})
BatchDelOpBusinessYard(Apidata).then((res) => {
if (res.succeeded) {
notification.success({ message: '删除成功', duration: 3 })
handleSuccess()
}
})
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
function FnClickAdd() {
clearSelectedRowKeys()
selectId.value = ''
}
async function handleSuccess() {
await reload()
//
const save = async () => {
await YardEdit.value.handleSave()
closeModal()
}
</script>

@ -6,19 +6,13 @@
<template>
<div class="MainBox">
<a-spin :spinning="loading">
<div class="buttonGroup">
<a-button v-repeat type="link" @click="handleSave" class="pl0">
<span class="iconfont icon-baocun"></span>
保存
</a-button>
</div>
<div class="ds-card">
<BasicForm @register="registerForm" />
</div>
<div class="ds-card mt15">
<h4>入货通知详细信息</h4>
<BasicForm @register="registerForm1" />
</div>
</div>
</a-spin>
</div>
</template>
@ -31,30 +25,32 @@
import { propTypes } from '/@/utils/propTypes'
const props = defineProps({
businessId: {
type: String
type: Object
},
selectId: propTypes.string,
})
watch(
() => props.selectId,
() => props.businessId,
async (nVal) => {
if (nVal) {
console.log(nVal)
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal })
if (res.succeeded) {
await setFieldsValue({
...res.data,
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id })
if (res.data == null) {
setFieldsValue1({
...nVal,
businessId: nVal.id,
id: 0
})
} else {
setFieldsValue1({
...res.data,
...res.data
})
setFieldsValue({
...res.data
})
}
} else {
resetFields()
resetFields1()
}
},
{ deep: true }
)
// Emits
const emit = defineEmits(['success', 'register'])
@ -71,26 +67,14 @@
})
const loading = ref(false)
async function handleSave() {
let ApiData: any = {
}
const values = await validate()
const values1 = await validate1()
Object.keys(values).forEach((item) => {
if (item == 'businessId' && !values.businessId) {
ApiData.businessId = props.businessId
} else {
ApiData[item] = values[item]
}
})
Object.keys(values1).forEach((item) => {
if (item == 'businessId' && !values1.businessId) {
ApiData.businessId = props.businessId
} else {
ApiData[item] = values1[item]
}
})
const postData = {
...values,
...values1
}
loading.value = true
const res: API.DataResult = await EditOpBusinessYard(ApiData)
const res: API.DataResult = await EditOpBusinessYard(postData)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
@ -99,7 +83,8 @@
}
defineExpose({
setFieldsValue,
setFieldsValue1
setFieldsValue1,
handleSave
})
</script>
<style lang="less" scoped>

@ -10,7 +10,7 @@
@ok="handleSave"
>
<!-- 包装表单 -->
<BasicForm @register="registerForm">
<BasicForm @register="registerForm" @linkageForm="linkageForm" >
</BasicForm>
<!--右下角按钮-->
<template #footer>
@ -89,6 +89,10 @@
setModalProps({ loading: false })
})
//
const linkageForm = (v) => {
console.log(v)
}
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
//
const personChange = (e, obj) => {
@ -107,7 +111,7 @@
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
emit('success', values)
}
exit && closeModal()
} finally {

@ -270,6 +270,7 @@ export const basicInfoFormSchema: FormSchema[] = [
field: 'forwarder',
component: 'ApiSelect',
required: false,
defaultValue: null,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
@ -1187,7 +1188,7 @@ export const noteFormSchema: FormSchema[] = [
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
defaultValue: null,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
@ -1210,7 +1211,7 @@ export const noteFormSchema: FormSchema[] = [
}
}
}
},
}
},
{
field: 'serviceCode',
@ -1224,7 +1225,7 @@ export const noteFormSchema: FormSchema[] = [
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
defaultValue: null,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
@ -1827,6 +1828,7 @@ export const cargoInfoFormSchema3: FormSchema[] = [
label: '',
field: 'cargoId',
component: 'Input',
defaultValue: 'S',
show: false
},
// 危险品
@ -1834,21 +1836,25 @@ export const cargoInfoFormSchema3: FormSchema[] = [
label: '危险品等级',
field: 'dangerClass',
component: 'Input',
required: false,
required: ({ values }) => {
return values.cargoId == 'D'
},
colProps: { span: 5 },
show: ({ values }) => {
return values.cargoId == 'D'
},
}
},
{
label: '危险品编号',
field: 'dangerNo',
component: 'Input',
required: false,
required: ({ values }) => {
return values.cargoId == 'D'
},
colProps: { span: 5 },
show: ({ values }) => {
return values.cargoId == 'D'
},
}
},
{
label: '危险品页号',
@ -2729,7 +2735,7 @@ export const personFormSchema: FormSchema[] = [
label: '客户类型',
component: 'Select',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
componentProps: ({ formModel, formActionType }) => {
return {
options: customTypeDict.value,
allowClear: true,
@ -2752,12 +2758,11 @@ export const personFormSchema: FormSchema[] = [
// 情况联系人和
formModel.customerTypeName = ''
}
formModel.customerId = ''
formModel.customerName = ''
formModel.customerContactId = ''
formModel.name = ''
formModel.email = ''
formModel.tel = ''
formActionType ? formActionType.linkageForm(v) : null
},
}
},
@ -2841,12 +2846,15 @@ export const personFormSchema: FormSchema[] = [
field: 'email',
component: 'Input',
colProps: { span: 12 },
required: true,
rules: [{ type: 'email', message: '请填写正确的邮箱地址' }]
},
{
label: '电话',
field: 'tel',
component: 'Input',
colProps: { span: 12 },
required: true,
colProps: { span: 12 }
},
{
field: 'customerTypeName',
@ -2877,7 +2885,7 @@ export const personColumns: BasicColumn[] = [
dataIndex: 'email',
title: '邮箱',
sorter: true,
width: 150,
width: 150
},
{
dataIndex: 'tel',
@ -2904,3 +2912,15 @@ export const personColumns: BasicColumn[] = [
width: 220,
},
]
// 海运出口基础信息总表单
export const basicInfoFormAllSchema: FormSchema[] = [
...basicInfoFormSchema,
...mailingInfoFormSchemaL,
...mailingInfoFormSchemaR,
...noteFormSchema,
...cargoInfoFormSchema1,
...cargoInfoFormSchema2,
...cargoInfoFormSchema4,
...otherInfoFormSchema
]

@ -7,7 +7,7 @@
<div class="ds-sea-basic-info">
<ConfigForm
v-if="source == 'edit'"
:form-schema="basicInfoFormSchema"
:form-schema="basicInfoFormAllSchema"
:isTransfer="true"
name="基础表单"
formNo="10"
@ -18,13 +18,18 @@
</a-button>
</ConfigForm>
<div>
<input
ref="customerNoRef"
:style="{ width: `${formData.customerNo?.length * 7}px` }"
class="customerNo"
v-model="formData.customerNo"
/>
<span @click="editCustomerNo" class="iconfont icon-bianji1"></span>
<span v-if="userStore.getUserInfo.tenantId == '1750335377144680448'" class="customerNo">
{{ formData.customerNo }}
</span>
<span v-else>
<input
ref="customerNoRef"
:style="{ width: `${formData.customerNo?.length * 7}px` }"
class="customerNo"
v-model="formData.customerNo"
/>
<span @click="editCustomerNo" class="iconfont icon-bianji1"></span>
</span>
<Divider type="vertical" />
<a-dropdown>
<template #overlay>
@ -129,15 +134,15 @@
</template>
<script lang="ts" setup>
import { BasicForm, useForm } from '/@/components/Form/index'
import { basicInfoFormSchema } from './baseInfo.tsx'
import { basicInfoFormSchema, basicInfoFormAllSchema } from './baseInfo.tsx'
import { ref, watch, onMounted, reactive } from 'vue'
import { useMessage } from '/@/hooks/web/useMessage'
import emitter from '/@/utils/Bus'
const { createMessage } = useMessage()
import { useRoute } from 'vue-router'
import { Divider } from 'ant-design-vue'
//
import { updateFormItem } from '/@/hooks/web/common'
import { useUserStore } from '/@/store/modules/user'
const userStore = useUserStore()
const route = useRoute()
//
const source = ref(route.query.source || 'edit')
@ -164,11 +169,6 @@
showActionButtonGroup: false,
size: 'small',
})
updateFormItem(updateSchema, 10)
setTimeout(() => {
console.log(basicInfoFormSchema)
}, 100)
// //
const RefChilrenRef = ref('')
//

@ -16,7 +16,7 @@
</a-button>
</a-dropdown>
</h4>
<ConfigForm
<!-- <ConfigForm
v-if="source == 'edit' && !isPreOrder"
style="position: absolute; right: 0; top: -5px;"
:form-schema="cargoInfoFormSchema2"
@ -27,7 +27,7 @@
<span class="iconfont icon-icon_tianjia"></span>
添加到表单设置
</a-button>
</ConfigForm>
</ConfigForm> -->
</div>
<a-row :gutter="15">
<a-col :span="24">
@ -54,7 +54,7 @@
v-model:value="item.ctnId"
show-search
placeholder="请选择"
style="width: 72px"
style="width: 66px"
:fieldNames="{
label: 'ctnName',
value: 'id'
@ -64,10 +64,22 @@
@change="ctnChange($event, item)"
>
</a-select>
<div style="width: 30px"></div>
<a-input-number v-model:value="item.quotePrice" size="small" :min="0" :max="999999999" placeholder="报价" />
<a-input-number v-model:value="item.guidePrice" size="small" :min="0" :max="999999999" placeholder="指导价" />
<a-input-number v-model:value="item.floorPrice" size="small" :min="0" :max="999999999" placeholder="底价" />
<div class="ctn-price-box">
<span>箱量</span>
<a-input-number v-model:value="item.ctnNum" size="small" :min="0" :max="999999999" placeholder="箱量" />
</div>
<div class="ctn-price-box">
<span>报价</span>
<a-input-number v-model:value="item.quotePrice" size="small" :min="0" :max="999999999" placeholder="报价" />
</div>
<div class="ctn-price-box">
<span>指导价</span>
<a-input-number v-model:value="item.guidePrice" size="small" :min="0" :max="999999999" placeholder="指导价" />
</div>
<div class="ctn-price-box">
<span>底价</span>
<a-input-number v-model:value="item.floorPrice" size="small" :min="0" :max="999999999" placeholder="底价" />
</div>
<span v-show="model.ctnPriceInfo.length > 1" @click="deleteCtnPrice(model.ctnPriceInfo, index, item)" class="iconfont icon-del"></span>
<span v-show="model.ctnPriceInfo.length != 3" @click="model.ctnPriceInfo.push({})" class="iconfont icon-zengjiatianjiajiajian"></span>
</div>
@ -91,8 +103,6 @@
import { useRoute } from 'vue-router'
import { getDictOption } from '/@/utils/dictUtil'
import { BatchDelBusinessCtnPrice } from '/@/views/operation/seaexport/api/BookingLedger'
//
import { updateFormItem } from '/@/hooks/web/common'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
const FncargoId = ref([])
@ -126,6 +136,7 @@
})
//
const toggleCargo = (v) => {
console.log(v)
cargoId.value = v
setFieldsValue3({
cargoId: v,
@ -170,8 +181,6 @@
submitFunc: submit,
// size: 'small',
})
//
updateFormItem(updateSchema, 12)
const [
registerForm3,
{
@ -602,7 +611,6 @@
function updateSchema(data) {
updateSchema1(data)
updateSchema2(data)
updateSchema3(data)
updateSchema4(data)
}
function preOrderInit(val:any) {
@ -667,13 +675,22 @@
width: 32%;
display: flex;
.ant-select-selector {
width: 80px!important;
width: 66px!important;
background: #F5F9FC!important;
border: none!important;
outline: none;
.ant-select-selection-item {
padding-right: 0;
}
}
.ant-input-number {
.ctn-price-box {
margin-left: 4px;
position: relative;
span {
position: absolute;
top: -20px;
font-size: 12px;
}
}
.iconfont {
line-height: 26px;

@ -55,27 +55,29 @@
const loading = ref(false)
const props = defineProps({
id: { type: String },
//
data: {
type: Array,
default: () => {
return []
}
}
})
//
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetBusinessOrderContactList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
resolve({ data: props.data })
})
},
beforeFetch: (p) => {
p['businessId'] = props.id
return formatParams(p)
},
columns: personColumns,
isTreeTable: false,
pagination: true,
pagination: false,
striped: true,
useSearchForm: false,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
showIndexColumn: false,
rowSelection: {
type: 'checkbox'
},
@ -87,8 +89,8 @@
fixed: 'right',
}
})
function handleSuccess() {
reload()
function handleSuccess(v) {
console.log(v)
}
//
const create = () => {

@ -71,7 +71,7 @@
<div class="">
<div style="position: relative;">
<h4>运输信息</h4>
<ConfigForm
<!-- <ConfigForm
v-if="source == 'edit'"
style="position: absolute; right: 0; top: -5px;"
:form-schema="mailingInfoFormSchemaR"
@ -83,7 +83,7 @@
<span class="iconfont icon-icon_tianjia"></span>
添加到表单设置
</a-button>
</ConfigForm>
</ConfigForm> -->
</div>
<BasicForm class="auto" @register="registerFormR" @linkageForm="linkageForm" />
</div>
@ -94,8 +94,6 @@
import { ApiEdit } from '/@/views/baseinfo/sendReciveTem/api'
import { GetShippingBillTemplateSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { mailingInfoFormSchemaL, mailingInfoFormSchemaR } from './baseInfo.tsx'
//
import { updateFormItem } from '/@/hooks/web/common'
import { Divider } from 'ant-design-vue'
import { ref, watch, onMounted, reactive } from 'vue'
import emitter from '/@/utils/Bus'
@ -178,8 +176,6 @@
showActionButtonGroup: false,
size: 'small',
})
//
updateFormItem(updateSchemaR, 11)
//
const save = (model, key) => {
saveKey = key

@ -66,8 +66,8 @@
保函
</a-button>
</div>
<!-- 场站入货 -->
<OpBusinessYardDetails :businessId="details.id" @register="OYregisterModal" />
<!-- 放舱(场站入货) -->
<OpBusinessYardDetails :businessId="details" @register="OYregisterModal" />
<!-- 派车信息 -->
<OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" />
<!-- <a-card
@ -1592,7 +1592,7 @@
OYopenModal(true, {
isParent: false,
isUpdate: false,
id: props.details.id,
info: props.details
})
}
const [OTregisterModal, { openModal: OTopenModal }] = useModal()
@ -1600,7 +1600,7 @@
OTopenModal(true, {
isParent: false,
isUpdate: false,
id: props.details.id,
info: props.details
})
}
// ========== OCR ==========

@ -285,10 +285,10 @@
</div>
</div>
</a-card> -->
<div class="card" style="padding-bottom: 15px;">
<div v-if="id" class="card" style="padding-bottom: 15px;">
<Divider type="horizontal" />
<!-- 日志组件 -->
<DsJournal :id="id" />
<DsJournal :id="id" :data="details.businessLogList"/>
</div>
<a-modal
v-model:visible="GoodsStatusVisible"
@ -358,51 +358,6 @@
>
<a-textarea v-model:value="remarkVal" :auto-size="{ minRows: 5, maxRows: 7 }" />
</a-modal>
<a-modal
title="添加附件"
:width="900"
v-model:visible="fileModelvisible"
:confirmLoading="uploading"
:maskClosable="false"
cancelText="关闭"
okText="保存"
@ok="handleUpload"
@cancel="fileModelCancel"
>
<div class="clearfix uplad-bg uplad-file-bg">
<span class="tip">1. 选择上传文件</span>
<a-upload
:file-list="upFileList"
:remove="handleRemove"
:disabled="upFileList.length > 0"
:before-upload="beforeUpload"
:style="{ width: '680px' }"
>
<a-button>
<span
class="iconfont icon-shujushangchuan-shixin"
:style="{ fontSize: '12px' }"
@click="handleOpenAtd(3)"
></span>
选择文件
</a-button>
</a-upload>
<span class="format">支持格式xlsxlsxpdftxtpms</span>
</div>
<div class="uplad-bg uplad-type">
<span class="tip">2. 选择文件类型</span>
<div class="upload-label">文件类型</div>
<a-select style="width: 120px" :value="attachName" @change="handleAttachChange">
<a-select-option
v-for="(attach, aindex) in bookingAttachType"
:key="attach.name"
:value="aindex"
>
{{ attach.name }}
</a-select-option>
</a-select>
</div>
</a-modal>
<a-modal
title="规则反馈需求"
:width="1000"
@ -489,14 +444,7 @@
</template>
<script lang="ts" setup>
import {
AddRemark,
AddFile,
ExcuteRuleEngine,
BookingOrderDownload,
BookingOrderDeleteRemark,
SaveServiceItem,
BookingOrderGetGoodsStatusList,
BookingOrderSaveGoodsStatus,
refreshSailingDate,
GetRuleOpinionLog,
SubmitRule0pinion,
@ -543,12 +491,11 @@
'openFlag'
])
let { ctx: that, proxy }: any = getCurrentInstance()
// const id = ref(route.query.id)
const id = ref(route.query.id)
// ----------------------------------------
const RemarkList: any = ref([])
const remarkSpinning = ref(false)
// ----------------------------------------
const tstyle = ref({ padding: '0 15px 15px', 'margin-bottom': '10px', background: '#fff' })
const type = ref(2)
const spinningRule = ref(false)
const roleFlag = ref(false)
@ -561,7 +508,6 @@
const time: any = ref(null)
const spinning = ref(false)
const booGoodsStatusItem: Ref<Array<any>> = ref([])
const btnLoading = ref(false)
const atdFlag = ref(false)
const CqType = ref(0)
const Cqtitle = ref('')
@ -575,9 +521,6 @@
const remarkModelvisible = ref(false)
const remarkVal = ref('')
const editRemarkVal: Ref<any> = ref(null)
const fileModelvisible = ref(false)
const pdfUrl = ref()
const showKey = ref([])
const goodStatusLoading = ref(false)
const labelCol = ref({
xs: { span: 24 },
@ -596,11 +539,6 @@
sm: { span: 20 },
})
const bookingModelconfirm = ref(false)
const uploading = ref(false)
const upFileList: Ref<Array<any>> = ref([])
const attachCode = ref('')
const attachName = ref('')
const bookingAttachType: Ref<Array<any>> = ref([])
const atdLoading = ref(false)
watch(
() => props.id,
@ -947,155 +885,56 @@
window.clearTimeout(time.value)
}
function handleRefsh() {
btnLoading.value = true
refreshSailingDate({ id: props.details.id }).then((res) => {
if (res.succeeded) {
btnLoading.value = false
emit('handleRefsh', res.data)
} else {
notification.error({ message: res.message, duration: 3 })
btnLoading.value = false
}
})
}
function handleOpenAtd(type) {
atdFlag.value = true
CqType.value = type
if (type === 1) {
Cqtitle.value = 'ETA'
atdTime.value = JSON.parse(JSON.stringify(props.details)).startETA
}
if (type === 2) {
Cqtitle.value = 'ATA'
atdTime.value = JSON.parse(JSON.stringify(props.details)).startATA
}
if (type === 3) {
Cqtitle.value = 'ETD'
atdTime.value = JSON.parse(JSON.stringify(props.details)).ygtETD
}
if (type === 4) {
Cqtitle.value = 'ATD'
atdTime.value = JSON.parse(JSON.stringify(props.details)).atd
}
}
function handleTime(time) {
let Rdata = '-'
if (time && time.split(':').length == 3) {
Rdata = `${time.split(':')[0]}:${time.split(':')[1]}`
}
return Rdata
}
// function handleRefsh() {
// btnLoading.value = true
// refreshSailingDate({ id: props.details.id }).then((res) => {
// if (res.succeeded) {
// btnLoading.value = false
// emit('handleRefsh', res.data)
// } else {
// notification.error({ message: res.message, duration: 3 })
// btnLoading.value = false
// }
// })
// }
// function handleOpenAtd(type) {
// atdFlag.value = true
// CqType.value = type
// if (type === 1) {
// Cqtitle.value = 'ETA'
// atdTime.value = JSON.parse(JSON.stringify(props.details)).startETA
// }
// if (type === 2) {
// Cqtitle.value = 'ATA'
// atdTime.value = JSON.parse(JSON.stringify(props.details)).startATA
// }
// if (type === 3) {
// Cqtitle.value = 'ETD'
// atdTime.value = JSON.parse(JSON.stringify(props.details)).ygtETD
// }
// if (type === 4) {
// Cqtitle.value = 'ATD'
// atdTime.value = JSON.parse(JSON.stringify(props.details)).atd
// }
// }
// function handleTime(time) {
// let Rdata = '-'
// if (time && time.split(':').length == 3) {
// Rdata = `${time.split(':')[0]}:${time.split(':')[1]}`
// }
// return Rdata
// }
function editRemark(data) {
remarkModelvisible.value = true
remarkVal.value = data.remark
editRemarkVal.value = data
}
//
const dsFile = ref(null)
function addFile() {
dsFile.value.init()
}
function getFileType(val) {
if (val) {
return val.substr(val.lastIndexOf('.') + 1)
} else {
return ''
}
}
function getFileFun(data) {
notification.success({ message: `下载打印文件 ${data.fileName} 中...`, duration: 3 })
BookingOrderDownload({ id: data.id }).then((res) => {
pdfUrl.value = window.URL.createObjectURL(
new Blob([res], { type: 'application/pdf;charset=utf-8' }),
)
const fname = data.fileName //
const link = document.createElement('a')
link.href = pdfUrl.value
link.setAttribute('download', fname)
document.body.appendChild(link)
link.click()
})
}
function bookingShow(data) {
data.isChecked = !data.isChecked
that.$forceUpdate()
}
function showLogMore(index) {
props.details.log[index].showMore = !props.details.log[index].showMore
that.$forceUpdate()
}
function handleUpload() {
const { upFileList, attachCode, attachName } = that
if (upFileList.length === 0) {
notification.error({ message: '请上传文件', duration: 3 })
return false
}
if (!attachCode || !attachName) {
notification.error({ message: '请选择附件类型', duration: 3 })
return false
}
let Did = props.id
if (route.query.isCopy) {
Did = 0
}
if (!props.id) {
Did = 0
}
const formData = new FormData()
formData.append('file', upFileList[0])
formData.append('BookingId', Did)
formData.append('TypeCode', attachCode)
formData.append('TypeName', attachName)
uploading.value = true
AddFile(formData)
.then((res) => {
if (res.succeeded) {
notification.success({ message: '上传成功', duration: 3 })
if (Did != 0) {
emit('upDateRight')
}
if (Did == 0) {
emit('fileNewUpadte', {
tempPathName: res.data,
TypeCode: attachCode,
TypeName: attachName,
})
}
} else {
notification.error({ message: res.message, duration: 3 })
}
uploading.value = false
fileModelCancel()
})
.catch((err) => {
notification.error({ message: err.message, duration: 3 })
})
}
function fileModelCancel() {
upFileList.value = []
attachCode.value = ''
attachName.value = ''
fileModelvisible.value = false
}
function handleRemove(file: any) {
const index = upFileList.value.indexOf(file)
const newFileList = upFileList.value.slice()
newFileList.splice(index, 1)
upFileList.value = newFileList
}
function beforeUpload(file) {
if (upFileList.value.length > 1) {
return false
}
upFileList.value = [...upFileList.value, file]
return false
}
function handleAttachChange(index) {
attachCode.value = bookingAttachType.value[index].code
attachName.value = bookingAttachType.value[index].name
}
function handleSubimtRole(e) {
e.preventDefault()
ruleForm.value.validateFields((err, values) => {

@ -497,11 +497,11 @@ const checkBookStatus = (id) => {
})
}
const isAdvancedQuery = ref(false)
const showColumns = ref({})
const formAllData = ref([])
const fromTableAllData = ref({})
const fields = ref<Field[]>([])
const tableHeight = ref(0)
// const showColumns = ref({})
// const formAllData = ref([])
// const fromTableAllData = ref({})
// const fields = ref<Field[]>([])
// const tableHeight = ref(0)
const TaskShippingOrderCompareData = ref({
showDetailList: '',
total: '',
@ -525,49 +525,40 @@ const formatSheetVisible = ref(false)
function TaskShippingOrderCompareHandleCancel() {
TaskShippingOrderCompareVisible.value = false
}
const permissionId = ref<String>('')
const ConditionalList: Ref<any> = ref()
async function createdInit() {
showColumns.value = JSON.parse(JSON.stringify(initData.columns))
formAllData.value = JSON.parse(JSON.stringify(initData.condAllData))
fromTableAllData.value = JSON.parse(JSON.stringify(initData.columnsAllData))
tableHeight.value = document.body.clientHeight - 230
const res: API.DataResult = await getColumnsByClient({
tableViewName: 'op_sea_export',
})
const fullPath = ref(router.currentRoute.value.fullPath)
usePermissionStore().getWrouteList.forEach((item: Record<any, any>) => {
item.children[0].children?.forEach((item2: Record<any, any>) => {
if (fullPath.value.indexOf(item2.path) != -1) {
permissionId.value = item2.id
}
})
})
if (res.succeeded) {
console.log(res)
let data: any[] = []
res.data.forEach((item) => {
data.push({
id: item.dbColumnName,
title: item.columnDescription,
name: 'Select',
value: null,
props: {
disabled: false,
multiple: false,
// placeholder: '',
options: [],
},
style: {
width: '100%',
},
})
})
// async function createdInit() {
// showColumns.value = JSON.parse(JSON.stringify(initData.columns))
// formAllData.value = JSON.parse(JSON.stringify(initData.condAllData))
// fromTableAllData.value = JSON.parse(JSON.stringify(initData.columnsAllData))
// tableHeight.value = document.body.clientHeight - 230
// const res: API.DataResult = await getColumnsByClient({
// tableViewName: 'op_sea_export',
// })
// if (res.succeeded) {
// console.log(res)
fields.value = data
}
}
// let data: any[] = []
// res.data.forEach((item) => {
// data.push({
// id: item.dbColumnName,
// title: item.columnDescription,
// name: 'Select',
// value: null,
// props: {
// disabled: false,
// multiple: false,
// // placeholder: '',
// options: [],
// },
// style: {
// width: '100%',
// },
// })
// })
// fields.value = data
// }
// }
function handledbclick(record) {
editColumns(record)
}
@ -599,7 +590,7 @@ function compareSuccess(){
onMounted(() => {
//
reload()
createdInit()
// createdInit()
})
</script>

@ -99,6 +99,7 @@ export function BatchDelClientParam(data: PageRequest) {
export function DownLoadSqlPrintFile(data: PageRequest) {
return request<DataResult>({
url: Api.DownLoadSqlPrintFile,
    responseType: 'arraybuffer',
method: 'post',
data
})

Loading…
Cancel
Save