szh-new
张同海 4 months ago
parent 054cde9508
commit 77b4dc46ae

@ -16,7 +16,7 @@
style="transform: rotate(90deg); position: relative; left: 4px; bottom: -2px" style="transform: rotate(90deg); position: relative; left: 4px; bottom: -2px"
@click="toPage('next')" @click="toPage('next')"
></dt> ></dt>
<dd>上一票</dd> <dd>{{ nexttext ? nexttext : '上一票' }}</dd>
</dl> </dl>
<dl> <dl>
<dt <dt
@ -24,7 +24,7 @@
style="transform: rotate(270deg); position: relative; left: -4px; bottom: -2px" style="transform: rotate(270deg); position: relative; left: -4px; bottom: -2px"
@click="toPage('last')" @click="toPage('last')"
></dt> ></dt>
<dd>下一票</dd> <dd>{{ lasttext ? lasttext : '下一票' }}</dd>
</dl> </dl>
<dl v-if="code" @click="openPrint"> <dl v-if="code" @click="openPrint">
<dt class="iconfont icon-fujian-wenjian"></dt> <dt class="iconfont icon-fujian-wenjian"></dt>
@ -103,6 +103,16 @@
type: Function, type: Function,
default: null, default: null,
}, },
//
lasttext: {
type: String,
default: null,
},
//
nexttext: {
type: String,
default: null,
},
}, },
emits: ['copy'], emits: ['copy'],
components: { components: {
@ -146,6 +156,13 @@
} }
id = ids[index + 1] id = ids[index + 1]
} }
console.log({
path: route.path,
query: {
id,
},
})
go({ go({
path: route.path, path: route.path,
query: { query: {

@ -0,0 +1,121 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
title="箱状态批量维护"
width="55%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiInfo } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
async function handleSave(exit) {
try {
const values = await validate()
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) {
createMessage.success(res.message)
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -0,0 +1,42 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/containerManagementApi/CM_BaseInfo/GetCM_BaseInfoList',
edit = '/containerManagementApi/CM_BaseInfo/EditCM_BaseInfo',
info = '/containerManagementApi/CM_BaseInfo/GetCM_BaseInfo',
del = '/mainApi/CodeCtn/BatchDelCodeCtn',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}

@ -0,0 +1,329 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common'
export const columns: BasicColumn[] = [
{
title: '集装箱号',
dataIndex: 'cntrno',
sorter: true,
width: 150,
},
{
title: '箱型',
dataIndex: 'ctnall',
sorter: true,
width: 150,
},
{
title: '集装箱类型',
dataIndex: 'ctnType',
sorter: true,
width: 200,
},
{
title: '新旧箱',
dataIndex: 'usedState',
sorter: true,
width: 200,
},
{
title: '箱主',
dataIndex: 'ctnOwner',
sorter: true,
width: 200,
},
{
title: '业务所属分部',
dataIndex: 'corpid',
sorter: true,
width: 200,
},
{
title: '箱来源',
dataIndex: 'ctnSource',
sorter: true,
width: 200,
},
{
title: '箱业务状态',
dataIndex: 'ctnBizState',
sorter: true,
width: 200,
},
{
title: '箱业务编号',
dataIndex: 'billno',
sorter: true,
width: 200,
},
{
title: '关联放箱单号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,
},
{
title: '箱状态',
dataIndex: 'ctnState',
sorter: true,
width: 200,
},
{
title: '箱损坏',
dataIndex: 'ctnBreakState',
sorter: true,
width: 200,
},
{
title: '是否上线',
dataIndex: 'isOnline',
sorter: true,
width: 200,
},
{
title: '空重箱',
dataIndex: 'isHeavy',
sorter: true,
width: 200,
},
{
title: '当前港口',
dataIndex: 'portid',
sorter: true,
width: 200,
},
{
title: '码头或场站',
dataIndex: 'depot',
sorter: true,
width: 200,
},
{
title: '运输工具',
dataIndex: 'vehicleName',
sorter: true,
width: 200,
},
{
title: '当前业务编号',
dataIndex: 'mblno',
sorter: true,
width: 200,
},
{
title: '业务委托单位',
dataIndex: 'customerName',
sorter: true,
width: 200,
},
{
title: 'ETD',
dataIndex: 'etd',
sorter: true,
width: 200,
},
{
title: 'ETA',
dataIndex: 'eta',
sorter: true,
width: 200,
},
{
title: '状态时间',
dataIndex: 'stateTime',
sorter: true,
width: 200,
},
{
title: '箱皮重',
dataIndex: 'ctnWeight',
sorter: true,
width: 200,
},
{
title: '箱初期成本',
dataIndex: 'ctnValue_Base',
sorter: true,
width: 200,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'CtnName',
label: '表现形式',
component: 'Input',
colProps: { span: 6 },
},
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
},
{
field: 'ctnall',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
required: true,
componentProps: () => {
return {
api: GetCtnSelectList,
labelField: 'ctnName',
valueField: 'ediCode',
resultField: 'data',
}
},
},
{
field: 'usedState',
label: '新旧箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnOwner',
label: '箱主',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'corpid',
label: '业务所属分部',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnSource',
label: '箱来源',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBizState',
label: '箱业务状态',
component: 'InputNumber',
colProps: { span: 6 },
},
{
field: 'billno',
label: '箱业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
component: 'Input',
colProps: { span: 6 },
required: true,
},
{
field: 'ctnState',
label: '箱状态',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBreakState',
label: '箱损坏',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isOnline',
label: '是否上线',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isHeavy',
label: '空重箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'portid',
label: '当前港口',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'depot',
label: '码头或场站',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'vehicleName',
label: '运输工具',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'mblno',
label: '当前业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'customerName',
label: '业务委托单位',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'etd',
label: 'ETD',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'eta',
label: 'ETA',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'stateTime',
label: '状态时间',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnWeight',
label: '箱皮重',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'productionDate',
label: '生产日期',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnValue_Base',
label: '箱初期成本',
component: 'Input',
colProps: { span: 6 },
},
]

@ -0,0 +1,118 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:profile-outlined',
tooltip: '详情',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { defineExpose, defineComponent, onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiBasicsList, ApiExistList } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '',
maxHeight: 300,
rowSelection: { type: 'checkbox' },
// rowSelection: { type: 'radio' },
api: async (p) => {
const res: API.DataResult = await ApiBasicsList(p)
const res2: API.DataResult = await ApiExistList()
let data = []
res.data.forEach((item) => {
let type = true
res2.data.forEach((item2) => {
if (item.id == item2) {
type = false
}
})
if (type) {
data.push(item)
}
})
console.log(data)
return new Promise((resolve) => {
resolve({ data: [...data] })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: {
redo: false,
size: false,
setting: false,
fullScreen: false,
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: undefined,
// },
})
function handleCreate() {
openModal(true, {
record: {},
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
reload()
}
function getSelectData() {
return getSelectRows()
}
defineExpose({ getSelectData })
</script>

@ -0,0 +1,155 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<a-button type="link" @click="handleCreate" :disabled="checkPermissions('op:ctn:add')">
<span class="iconfont icon-piliangbianji"></span>
批量维护
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:file-search-outlined',
tooltip: '编辑',
onClick: handleAudit.bind(null, record),
disabled: checkPermissions('op:ctn:edit'),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal
:visible="visible"
title="导入集装箱信息"
width="70%"
@ok="handleOk"
@cancel="handleCancel"
>
<ImportFlow v-if="visible" ref="refImportFlow" />
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { checkPermissions } from '/@/hooks/Permissions/index'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import ImportFlow from './importFlow.vue'
import { ApiList, ApiImport, ApiDel } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const visible = ref<boolean>(false)
const refImportFlow = ref()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '集装箱信息列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: p.page,
pageSize: p.pageSize,
sortConditions: [],
},
}
if (p.field) {
postParam.pageCondition.sortConditions = [
{
sortField: p.field,
listSortDirection: p.order == 'ascend' ? 0 : 1,
},
]
} else {
postParam.pageCondition.sortConditions = []
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 35,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function importFlow() {
visible.value = true
}
const handleOk = async () => {
let ids = []
refImportFlow.value.getSelectData().forEach((e) => {
ids.push(e.id)
})
const res: API.DataResult = await ApiImport({
ids,
id: '',
})
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
} else {
notification.error({ message: res.message, duration: 3 })
}
reload()
visible.value = false
}
const handleCancel = () => {
visible.value = false
}
function handleAudit(record: Recordable) {
if (!checkPermissions('op:ctn:edit')) {
openModal(true, {
record,
isUpdate: true,
})
}
}
function handleSuccess() {
reload()
}
</script>

@ -0,0 +1,122 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
title="箱状态批量维护"
width="55%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>取消</a-button
>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>仅保存</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>保存并关闭</a-button
>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns'
import { ApiEdit, ApiInfo } from './api'
import { ApiChangeList, ApiMultiEdit } from '../StateChange/api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiMultiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>

@ -0,0 +1,70 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/containerManagementApi/CM_CurrentState/GetCM_CurrentStateList',
edit = '/containerManagementApi/CM_CurrentState/EditCM_CurrentState',
info = '/containerManagementApi/CM_CurrentState/GetCM_CurrentStateInfo',
del = '/mainApi/CodeCtn/BatchDelCodeCtn',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}
// 获取商品类型列表-基础库 (Auth)
export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({
url: Api.BasicsList,
method: 'post',
data,
})
}
// 获取当前租户已有的商品类型 (Auth)
export function ApiExistList() {
return request<DataResult>({
url: Api.ExistList,
method: 'get',
})
}
// 导入商品类型列表-基础库 (Auth)
export function ApiImport(data: PageRequest) {
return request<DataResult>({
url: Api.Import,
method: 'post',
data,
})
}

@ -0,0 +1,330 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common'
export const columns: BasicColumn[] = [
{
title: '集装箱号',
dataIndex: 'cntrno',
sorter: true,
width: 150,
},
{
title: '箱型',
dataIndex: 'ctnall',
sorter: true,
width: 150,
},
{
title: '集装箱类型',
dataIndex: 'ctnType',
sorter: true,
width: 200,
},
{
title: '新旧箱',
dataIndex: 'usedState',
sorter: true,
width: 200,
},
{
title: '箱主',
dataIndex: 'ctnOwner',
sorter: true,
width: 200,
},
{
title: '业务所属分部',
dataIndex: 'corpid',
sorter: true,
width: 200,
},
{
title: '箱来源',
dataIndex: 'ctnSource',
sorter: true,
width: 200,
},
{
title: '箱业务状态',
dataIndex: 'ctnBizState',
sorter: true,
width: 200,
},
{
title: '箱业务编号',
dataIndex: 'billno',
sorter: true,
width: 200,
},
{
title: '关联放箱单号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,
},
{
title: '箱状态',
dataIndex: 'ctnState',
sorter: true,
width: 200,
},
{
title: '箱损坏',
dataIndex: 'ctnBreakState',
sorter: true,
width: 200,
},
{
title: '是否上线',
dataIndex: 'isOnline',
sorter: true,
width: 200,
},
{
title: '空重箱',
dataIndex: 'isHeavy',
sorter: true,
width: 200,
},
{
title: '当前港口',
dataIndex: 'portid',
sorter: true,
width: 200,
},
{
title: '码头或场站',
dataIndex: 'depot',
sorter: true,
width: 200,
},
{
title: '运输工具',
dataIndex: 'vehicleName',
sorter: true,
width: 200,
},
{
title: '当前业务编号',
dataIndex: 'mblno',
sorter: true,
width: 200,
},
{
title: '业务委托单位',
dataIndex: 'customerName',
sorter: true,
width: 200,
},
{
title: 'ETD',
dataIndex: 'etd',
sorter: true,
width: 200,
},
{
title: 'ETA',
dataIndex: 'eta',
sorter: true,
width: 200,
},
{
title: '状态时间',
dataIndex: 'stateTime',
sorter: true,
width: 200,
},
{
title: '箱皮重',
dataIndex: 'ctnWeight',
sorter: true,
width: 200,
},
{
title: '箱初期成本',
dataIndex: 'ctnValue_Base',
sorter: true,
width: 200,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'CtnName',
label: '表现形式',
component: 'Input',
colProps: { span: 6 },
},
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
},
{
field: 'ctnall',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
required: true,
componentProps: () => {
return {
api: GetCtnSelectList,
labelField: 'ctnName',
valueField: 'ediCode',
resultField: 'data',
}
},
},
{
field: 'isOnline',
label: '是否上线',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'changeSource',
label: '变动来源',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'usedState',
label: '新旧箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnOwner',
label: '箱主',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'corpid',
label: '业务所属分部',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnSource',
label: '箱来源',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBizState',
label: '箱业务状态',
component: 'InputNumber',
colProps: { span: 6 },
},
{
field: 'billno',
label: '箱业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
component: 'Input',
colProps: { span: 6 },
required: true,
},
{
field: 'ctnState',
label: '箱状态',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnBreakState',
label: '箱损坏',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isHeavy',
label: '空重箱',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'portid',
label: '当前港口',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'depot',
label: '码头或场站',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'vehicleName',
label: '运输工具',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'mblno',
label: '当前业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'customerName',
label: '业务委托单位',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'etd',
label: 'ETD',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'eta',
label: 'ETA',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'changeTime',
label: '状态时间',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnWeight',
label: '箱皮重',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnValue_Base',
label: '箱初期成本',
component: 'Input',
colProps: { span: 6 },
},
]

@ -0,0 +1,118 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'ant-design:profile-outlined',
tooltip: '详情',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { defineExpose, defineComponent, onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import { ApiBasicsList, ApiExistList } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
// title: '',
maxHeight: 300,
rowSelection: { type: 'checkbox' },
// rowSelection: { type: 'radio' },
api: async (p) => {
const res: API.DataResult = await ApiBasicsList(p)
const res2: API.DataResult = await ApiExistList()
let data = []
res.data.forEach((item) => {
let type = true
res2.data.forEach((item2) => {
if (item.id == item2) {
type = false
}
})
if (type) {
data.push(item)
}
})
console.log(data)
return new Promise((resolve) => {
resolve({ data: [...data] })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: {
redo: false,
size: false,
setting: false,
fullScreen: false,
},
// actionColumn: {
// width: 80,
// title: '',
// dataIndex: 'action',
// fixed: undefined,
// },
})
function handleCreate() {
openModal(true, {
record: {},
})
}
function handleAudit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
})
}
function handleSuccess() {
reload()
}
function getSelectData() {
return getSelectRows()
}
defineExpose({ getSelectData })
</script>

@ -0,0 +1,161 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<!-- :disabled="checkPermissions('op:ctn:add')" -->
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-piliangbianji"></span>
批量维护
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<!-- disabled: checkPermissions('op:ctn:edit'), -->
<TableAction
:actions="[
{
icon: 'ant-design:file-search-outlined',
tooltip: '明细',
onClick: handleAudit.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal
:visible="visible"
title="导入集装箱信息"
width="70%"
@ok="handleOk"
@cancel="handleCancel"
>
<ImportFlow v-if="visible" ref="refImportFlow" />
</a-modal>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { checkPermissions } from '/@/hooks/Permissions/index'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import ImportFlow from './importFlow.vue'
import { ApiList, ApiImport, ApiDel } from './api'
import { ApiChangeList } from '../StateChange/api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const visible = ref<boolean>(false)
const refImportFlow = ref()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '集装箱信息列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: p.page,
pageSize: p.pageSize,
sortConditions: [],
},
}
if (p.field) {
postParam.pageCondition.sortConditions = [
{
sortField: p.field,
listSortDirection: p.order == 'ascend' ? 0 : 1,
},
]
} else {
postParam.pageCondition.sortConditions = []
}
let condition: API.ConditionItem[] = []
if (!!data.CtnName) {
condition.push({
FieldName: 'CtnName',
FieldValue: data.CtnName,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 35,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function importFlow() {
visible.value = true
}
const handleOk = async () => {
let ids = []
refImportFlow.value.getSelectData().forEach((e) => {
ids.push(e.id)
})
const res: API.DataResult = await ApiImport({
ids,
id: '',
})
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
} else {
notification.error({ message: res.message, duration: 3 })
}
reload()
visible.value = false
}
const handleCancel = () => {
visible.value = false
}
function handleAudit(record: Recordable) {
let ApiData: any = { cntrno: record.cntrno }
ApiChangeList(ApiData).then((res) => {
console.log(res)
})
// if (!checkPermissions('op:ctn:edit')) {
// openModal(true, {
// record,
// isUpdate: true,
// })
// }
}
function handleSuccess() {
reload()
}
</script>

@ -0,0 +1,79 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/containerManagementApi/CM_State_Change/GetCM_State_ChangeList',
edit = '/containerManagementApi/CM_State_Change/EditCM_State_Change',
multiEdit = '/containerManagementApi/CM_State_Change/CM_State_Change_Multi',
info = '/containerManagementApi/CM_CurrentState/GetCM_CurrentStateInfo',
del = '/mainApi/CodeCtn/BatchDelCodeCtn',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
}
// 列表 (Auth)
export function ApiChangeList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 批量编辑状态 (Auth)
export function ApiMultiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.multiEdit,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}
// 获取商品类型列表-基础库 (Auth)
export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({
url: Api.BasicsList,
method: 'post',
data,
})
}
// 获取当前租户已有的商品类型 (Auth)
export function ApiExistList() {
return request<DataResult>({
url: Api.ExistList,
method: 'get',
})
}
// 导入商品类型列表-基础库 (Auth)
export function ApiImport(data: PageRequest) {
return request<DataResult>({
url: Api.Import,
method: 'post',
data,
})
}

@ -9,7 +9,13 @@
> --> > -->
<div class="ds-detail-box sea-export-detail"> <div class="ds-detail-box sea-export-detail">
<div :style="{ display: 'flex' }"> <div :style="{ display: 'flex' }">
<ActionBar :id="rowId.value" name="wldw" :save="handleSave"></ActionBar> <ActionBar
:id="route.query.id"
name="wldw"
:save="handleSave"
lasttext="下一条"
nexttext="上一条"
></ActionBar>
<!-- 基本信息 --> <!-- 基本信息 -->
<a-tabs v-model:activeKey="activeKey" class="RUnit"> <a-tabs v-model:activeKey="activeKey" class="RUnit">
<a-tab-pane key="1" tab="基本信息"> <BasicForm @register="registerForm1" /></a-tab-pane> <a-tab-pane key="1" tab="基本信息"> <BasicForm @register="registerForm1" /></a-tab-pane>
@ -38,8 +44,8 @@
<input <input
class="ds-tb-check" class="ds-tb-check"
type="checkbox" type="checkbox"
v-model="allCheckR" v-model="allCheck"
:indeterminate="someCheckR" :indeterminate="someCheck"
/> />
<hot-table ref="hotTb" :data="list" :settings="settings"> <hot-table ref="hotTb" :data="list" :settings="settings">
<img <img
@ -109,9 +115,9 @@
<CustTemplateDetail :client-id="clientId" :customer-name="customerName" class="RUnit" /> <CustTemplateDetail :client-id="clientId" :customer-name="customerName" class="RUnit" />
</a-tab-pane> </a-tab-pane>
<!-- 客户参数表格 --> <!-- 客户参数表格 -->
<!-- <a-tab-pane key="8" tab="客户参数"> <a-tab-pane key="8" tab="客户参数">
<CustomerParams :client-id="clientId" :customer-name="customerName"></CustomerParams> <CustomerParams :client-id="clientId" :customer-name="customerName"></CustomerParams>
</a-tab-pane> --> </a-tab-pane>
</a-tabs> </a-tabs>
<!-- 图片管理 --> <!-- 图片管理 -->
@ -150,7 +156,7 @@
<!-- </BasicModal> --> <!-- </BasicModal> -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref, watch, onMounted } from 'vue' import { ref, computed, unref, watch, onMounted, watchEffect } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema, formSchema2, Tablecolumns } from './columns' import { formSchema, formSchema2, Tablecolumns } from './columns'
@ -339,6 +345,8 @@
rowId.value = route.query.id rowId.value = route.query.id
activeKey.value = '2' activeKey.value = '2'
list.value.splice(0) list.value.splice(0)
allCheck.value = false
someCheck.value = false
const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) }) const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) })
if (res.succeeded) { if (res.succeeded) {
clientId.value = res.data.id clientId.value = res.data.id
@ -591,7 +599,52 @@
} }
} }
// --------------------------------------------------- // ---------------------------------------------------
//
const allCheck = ref(false)
//
const someCheck = ref(false)
const list = ref<any>([]) const list = ref<any>([])
watchEffect(() => {
//
if (allCheck.value) {
list.value.forEach((item) => {
item.selected = true
})
} else {
//
list.value.forEach((item) => {
item.selected = false
})
}
})
watch(
list.value,
(val) => {
let a = 0
let b = 0
val.forEach((item) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
allCheck.value = false
}
if (b == 0) {
allCheck.value = true
}
if (a != 0 && b != 0) {
someCheck.value = true
} else {
someCheck.value = false
}
},
{
deep: true,
},
)
const columns = [ const columns = [
{ {
title: '主键ID', title: '主键ID',

@ -136,18 +136,6 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: 'EDI代码2',
// dataIndex: 'ediCode2',
// sorter: true,
// width: 150,
// },
// {
// title: 'EDI代码3',
// dataIndex: 'ediCode3',
// sorter: true,
// width: 150,
// },
{ {
title: '客户全称', title: '客户全称',
dataIndex: 'description', dataIndex: 'description',
@ -211,36 +199,18 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: '收单据模式',
// dataIndex: 'rcvMode',
// sorter: true,
// width: 150,
// },
{ {
title: '电话', title: '电话',
dataIndex: 'tel', dataIndex: 'tel',
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: '传真',
// dataIndex: 'fax',
// sorter: true,
// width: 150,
// },
{ {
title: '负责人', title: '负责人',
dataIndex: 'chief', dataIndex: 'chief',
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: 'QQ',
// dataIndex: 'qq',
// sorter: true,
// width: 150,
// },
{ {
title: '邮箱', title: '邮箱',
dataIndex: 'email', dataIndex: 'email',
@ -253,12 +223,6 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 150, width: 150,
}, },
// {
// title: 'MSN',
// dataIndex: 'msn',
// sorter: true,
// width: 150,
// },
{ {
title: '城市', title: '城市',
dataIndex: 'city', dataIndex: 'city',
@ -429,11 +393,6 @@ export const columns: BasicColumn[] = [
return RText return RText
}, },
}, },
// {
// title: '客户属性',
// dataIndex: 'ArrclientTag',
// width: 150,
// },
{ {
title: '其他类型', title: '其他类型',
dataIndex: 'others', dataIndex: 'others',
@ -472,6 +431,36 @@ export const columns: BasicColumn[] = [
sorter: true, sorter: true,
width: 200, width: 200,
}, },
// {
// title: 'EDI代码2',
// dataIndex: 'ediCode2',
// sorter: true,
// width: 150,
// },
// {
// title: 'EDI代码3',
// dataIndex: 'ediCode3',
// sorter: true,
// width: 150,
// },
// {
// title: '传真',
// dataIndex: 'fax',
// sorter: true,
// width: 150,
// },
// {
// title: 'QQ',
// dataIndex: 'qq',
// sorter: true,
// width: 150,
// },
// {
// title: 'MSN',
// dataIndex: 'msn',
// sorter: true,
// width: 150,
// },
] ]
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
@ -558,22 +547,7 @@ export const formSchema: FormSchema[] = [
defaultValue: '', defaultValue: '',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
// {
// field: 'ediCode2',
// label: 'EDI代码2',
// // required: true,
// component: 'Input',
// defaultValue: '',
// colProps: { span: 4 },
// },
// {
// field: 'ediCode3',
// label: 'EDI代码3',
// // required: true,
// component: 'Input',
// defaultValue: '',
// colProps: { span: 4 },
// },
{ {
field: 'description', field: 'description',
label: '客户全称', label: '客户全称',
@ -582,13 +556,6 @@ export const formSchema: FormSchema[] = [
defaultValue: '', defaultValue: '',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
// {
// field: 'pcorpName',
// label: '所属集团',
// component: 'Input',
// defaultValue: '',
// colProps: { span: 6 },
// },
{ {
field: 'organizationCode', field: 'organizationCode',
label: '社会信用代码', label: '社会信用代码',
@ -945,7 +912,6 @@ export const formSchema: FormSchema[] = [
field: 'ArrclientTag', field: 'ArrclientTag',
// required: true, // required: true,
component: 'Select', component: 'Select',
colProps: { span: 8 }, colProps: { span: 8 },
componentProps: { componentProps: {
options: ClientTag, options: ClientTag,
@ -954,6 +920,17 @@ export const formSchema: FormSchema[] = [
maxTagCount: 4, maxTagCount: 4,
}, },
}, },
// {
// label: '客户属性',
// field: 'ArrclientTag',
// // required: true,
// component: 'CheckboxGroup',
// defaultValue: '',
// colProps: { span: 24 },
// componentProps: {
// options: ClientTag,
// },
// },
{ {
label: '推送设置', label: '推送设置',
field: 'notifications', field: 'notifications',
@ -1010,17 +987,7 @@ export const formSchema: FormSchema[] = [
], ],
}, },
}, },
// {
// label: '客户属性',
// field: 'ArrclientTag',
// // required: true,
// component: 'CheckboxGroup',
// defaultValue: '',
// colProps: { span: 24 },
// componentProps: {
// options: ClientTag,
// },
// },
{ {
field: 'note', field: 'note',
label: '备注', label: '备注',
@ -1043,6 +1010,22 @@ export const formSchema: FormSchema[] = [
}, },
}, },
// { // {
// field: 'ediCode2',
// label: 'EDI代码2',
// // required: true,
// component: 'Input',
// defaultValue: '',
// colProps: { span: 4 },
// },
// {
// field: 'ediCode3',
// label: 'EDI代码3',
// // required: true,
// component: 'Input',
// defaultValue: '',
// colProps: { span: 4 },
// },
// {
// field: 'isStop', // field: 'isStop',
// label: '是否停用', // label: '是否停用',
// component: 'RadioButtonGroup', // component: 'RadioButtonGroup',
@ -1064,28 +1047,6 @@ export const formSchema: FormSchema[] = [
// show: false, // show: false,
// }, // },
// {
// field: 'address',
// label: '通讯地址',
// // required: true,
// component: 'InputTextArea',
// defaultValue: '',
// colProps: { span: 24 },
// componentProps: {
// rows: 3,
// },
// },
// {
// field: 'rcvMode',
// label: '收单据模式',
// // required: true,
// // component: 'Select',
// component: 'Input',
// defaultValue: '',
// colProps: { span: 6 },
// },
// { // {
// field: 'fax', // field: 'fax',
// label: '传真', // label: '传真',
@ -1112,29 +1073,6 @@ export const formSchema: FormSchema[] = [
// defaultValue: '', // defaultValue: '',
// colProps: { span: 12 }, // colProps: { span: 12 },
// }, // },
// {
// field: 'sourceId',
// label: '录入人(===',
// component: 'Select',
// colProps: { span: 6 },
// },
// {
// field: 'unitPrice',
// label: '登陆人(===',
// // required: true,
// component: 'Input',
// colProps: { span: 6 },
// },
// {
// field: 'unitPrice',
// label: '密码(===',
// // required: true,
// component: 'Input',
// colProps: { span: 6 },
// },
// { // {
// field: 'others', // field: 'others',
// label: '其他类型', // label: '其他类型',

@ -17,23 +17,23 @@ export const columns: BasicColumn[] = [
{ {
title: '客户名称', title: '客户名称',
dataIndex: 'customerName', dataIndex: 'customerName',
width: 150 width: 150,
}, },
{ {
title: '客户参数类型', title: '客户参数类型',
dataIndex: 'paramType', dataIndex: 'paramType',
width: 150 width: 150,
}, },
{ {
title: '客户参数名称', title: '客户参数名称',
dataIndex: 'paramName', dataIndex: 'paramName',
width: 200 width: 200,
}, },
{ {
title: '备注', title: '备注',
dataIndex: 'note', dataIndex: 'note',
width: 200 width: 200,
} },
] ]
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
@ -41,7 +41,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'paramName', field: 'paramName',
label: '客户参数名称', label: '客户参数名称',
colProps: { span: 6 }, colProps: { span: 6 },
component: 'Input' component: 'Input',
}, },
] ]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
@ -50,7 +50,7 @@ export const formSchema: FormSchema[] = [
field: 'id', field: 'id',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
field: 'paramCode', field: 'paramCode',
@ -67,7 +67,7 @@ export const formSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: (e, obj) => { onChange: (e, obj) => {
GetTenantParamDataSelectList({ code: e }).then(res => { GetTenantParamDataSelectList({ code: e }).then((res) => {
itemNameOption.value = res.data itemNameOption.value = res.data
}) })
if (obj) { if (obj) {
@ -79,10 +79,10 @@ export const formSchema: FormSchema[] = [
formModel.paramId = '' formModel.paramId = ''
formModel.paramType = '' formModel.paramType = ''
} }
} },
}
} }
}, },
},
{ {
field: 'itemCode', field: 'itemCode',
label: '客户参数名称', label: '客户参数名称',
@ -103,63 +103,63 @@ export const formSchema: FormSchema[] = [
} else { } else {
formModel.itemName = '' formModel.itemName = ''
} }
} },
}
} }
}, },
},
{ {
label: '', label: '',
field: 'itemName', field: 'itemName',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
label: '', label: '',
field: 'customerId', field: 'customerId',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
label: '', label: '',
field: 'paramId', field: 'paramId',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
label: '', label: '',
field: 'paramName', field: 'paramName',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
label: '', label: '',
field: 'paramType', field: 'paramType',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
show: false show: false,
}, },
{ {
field: 'customerName', field: 'customerName',
label: '客户名称', label: '客户名称',
dynamicDisabled: true, dynamicDisabled: true,
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'orderNo', field: 'orderNo',
label: '排序', label: '排序',
required: true, required: true,
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'note', field: 'note',
label: '备注', label: '备注',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { span: 24 } colProps: { span: 24 },
} },
] ]

@ -1,8 +1,6 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table" <BasicTable class="ds-table" @register="registerTable">
@register="registerTable"
>
<template #toolbar> <template #toolbar>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-tianjia"></span> <span class="iconfont icon-tianjia"></span>
@ -26,9 +24,9 @@
title: '是否要删除此条数据?', title: '是否要删除此条数据?',
okText: '是', okText: '是',
cancelText: '否', cancelText: '否',
confirm: handleDelete.bind(null, record) confirm: handleDelete.bind(null, record),
} },
} },
]" ]"
/> />
</template> </template>
@ -51,12 +49,12 @@
const props = defineProps({ const props = defineProps({
// id // id
clientId: { clientId: {
type: String type: String,
}, },
// //
customerName: { customerName: {
type: String type: String,
} },
}) })
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => { api: async (p) => {
@ -76,21 +74,22 @@
showTableSetting: false, showTableSetting: false,
bordered: true, bordered: true,
showIndexColumn: true, showIndexColumn: true,
canResize: false, canResize: true,
resizeHeightOffset: 35,
actionColumn: { actionColumn: {
width: 80, width: 80,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
fixed: 'right', fixed: 'right',
}, },
id: 10 id: 10,
}) })
function handleCreate() { function handleCreate() {
openModal(true, { openModal(true, {
customerName: props.customerName, customerName: props.customerName,
clientId: props.clientId, clientId: props.clientId,
isUpdate: false isUpdate: false,
}) })
} }
@ -99,7 +98,7 @@
record, record,
isUpdate: true, isUpdate: true,
customerName: props.customerName, customerName: props.customerName,
clientId: props.clientId clientId: props.clientId,
}) })
} }
// //
@ -122,4 +121,3 @@
reload() reload()
} }
</script> </script>

@ -924,10 +924,10 @@
let data = res.data let data = res.data
totalPkgs.value = 0 totalPkgs.value = 0
data.forEach(async (item, index) => { data.forEach(async (item, index) => {
totalPkgs.value = totalPkgs.value + item.pkgs totalPkgs.value = parseInt(totalPkgs.value) + parseInt(item.pkgs)
totalKgs.value = totalKgs.value + item.kgs totalKgs.value = parseInt(totalKgs.value) + parseInt(item.kgs)
totalCbm.value = totalCbm.value + item.cbm totalCbm.value = parseInt(totalCbm.value) + parseInt(item.cbm)
totalCtn.value = totalCtn.value + item.ctnNum totalCtn.value = parseInt(totalCtn.value) + parseInt(item.ctnNum)
item.rowKey = index item.rowKey = index
const weightTypeList = weightTypeDict.value.length const weightTypeList = weightTypeDict.value.length
? weightTypeDict.value ? weightTypeDict.value

Loading…
Cancel
Save