szh-new
张同海 4 months ago
parent 20ea8ef21b
commit ebf91d4e38

@ -4,13 +4,13 @@
margin-bottom: 4px; margin-bottom: 4px;
// label样式 // label样式
.ant-form-item-label { .ant-form-item-label {
width: 100%!important; width: 100% !important;
padding-bottom: 0; padding-bottom: 0;
>label { > label {
font-size: 12px!important; font-size: 12px !important;
width: 100%!important; width: 100% !important;
height: 20px; height: 20px;
>span { > span {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
} }
@ -20,6 +20,7 @@
.ant-form-item-control { .ant-form-item-control {
.ant-form-item-control-input { .ant-form-item-control-input {
min-height: 26px; min-height: 26px;
// input外层元素的高度 决定input高度 // input外层元素的高度 决定input高度
.ant-input-affix-wrapper-input-with-clear-btn { .ant-input-affix-wrapper-input-with-clear-btn {
height: 26px; height: 26px;
@ -28,8 +29,15 @@
height: 24px; height: 24px;
} }
} }
.NoLimitHeight {
.ant-select-selector {
padding-top: 5px;
height: auto;
}
}
// 所有的input标签高度 // 所有的input标签高度
input.ant-input, input.ant-input-number-input { input.ant-input,
input.ant-input-number-input {
height: 24px; height: 24px;
} }
// 计数器容器高度 // 计数器容器高度
@ -37,7 +45,8 @@
height: 26px; height: 26px;
} }
// 日期选择器 // 日期选择器
.ant-picker, .ant-picker-small { .ant-picker,
.ant-picker-small {
width: 100%; width: 100%;
height: 26px; height: 26px;
.ant-picker-input { .ant-picker-input {
@ -47,6 +56,7 @@
.ant-input-affix-wrapper { .ant-input-affix-wrapper {
padding: 0 7px; padding: 0 7px;
} }
// 下拉框 // 下拉框
.ant-select-selector { .ant-select-selector {
height: 26px; height: 26px;
@ -55,7 +65,7 @@
line-height: 26px; line-height: 26px;
} }
.ant-select-selection-search-input { .ant-select-selection-search-input {
height: 26px!important; height: 26px !important;
} }
.ant-select-selection-overflow { .ant-select-selection-overflow {
position: relative; position: relative;
@ -65,14 +75,14 @@
height: 20px; height: 20px;
margin-bottom: 3px; margin-bottom: 3px;
font-size: 12px; font-size: 12px;
background-color: #F5F9FC; background-color: #f5f9fc;
color: #257AFA; color: #257afa;
.ant-select-selection-item-content { .ant-select-selection-item-content {
margin-right: 0; margin-right: 0;
} }
.ant-select-selection-item-remove { .ant-select-selection-item-remove {
border-left: 0.7px solid #ABCDFF; border-left: 0.7px solid #abcdff;
color: #257AFA; color: #257afa;
padding-left: 3px; padding-left: 3px;
margin-left: 4px; margin-left: 4px;
} }

@ -1,6 +1,7 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { GetCtnSelectList } from '/@/api/common' import { GetCtnSelectList } from '/@/api/common'
import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '集装箱号', title: '集装箱号',
@ -193,8 +194,15 @@ export const formSchema: FormSchema[] = [
{ {
field: 'isOnline', field: 'isOnline',
label: '是否上线', label: '是否上线',
component: 'Input', component: 'RadioButtonGroup',
defaultValue: true,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false },
],
},
}, },
{ {
field: 'changeSource', field: 'changeSource',
@ -215,13 +223,31 @@ export const formSchema: FormSchema[] = [
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ {
field: 'corpid',
label: '业务所属分部', label: '业务所属分部',
component: 'Input', field: 'corpid',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetDeptList,
labelField: 'orgName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e) {
formModel.Sale = obj.label
} else {
formModel.Sale = ''
}
},
}
},
}, },
{ {
field: 'ctnSource', field: 'ctnSource',
label: '箱来源', label: '箱来源',

@ -17,83 +17,93 @@
<a-tab-pane key="1" tab="基本信息"> <BasicForm @register="registerForm1" /></a-tab-pane> <a-tab-pane key="1" tab="基本信息"> <BasicForm @register="registerForm1" /></a-tab-pane>
<a-tab-pane key="2" tab="财务账期信息"> <a-tab-pane key="2" tab="财务账期信息">
<div> <div>
<p class="title">财务信息</p>
<BasicForm @register="registerForm2" /> <BasicForm @register="registerForm2" />
<div> <div class="FlexTable">
<div> <div class="HotTable">
<a-button type="link" @click="TableAdd" class="pl0"> <div>
<span class="iconfont icon-new_document"></span> <span class="title Fapiao">发票信息</span>
新增明细 <a-button type="link" @click="TableAdd" class="pl0">
</a-button> <span class="iconfont icon-new_document"></span>
<a-popconfirm 新增
title="确定要删除所选数据?"
ok-text="确定"
cancel-text="取消"
@confirm="FnClickDel"
>
<a-button type="link" class="pl0">
<span class="iconfont icon-shanchu21"></span>
删除明细
</a-button> </a-button>
</a-popconfirm> <a-popconfirm
</div> title="确定要删除所选数据?"
<div style="position: relative"> ok-text="确定"
<input cancel-text="取消"
class="ds-tb-check" @confirm="FnClickDel"
type="checkbox" >
v-model="allCheck" <a-button type="link" class="pl0">
:indeterminate="someCheck" <span class="iconfont icon-shanchu21"></span>
/> 删除
<hot-table ref="hotTb" :data="list" :settings="settings"> </a-button>
<img </a-popconfirm>
v-show="!list.length" </div>
class="hot-tb-no-data" <div style="position: relative">
src="../../../assets/images/nodata.png" <input
alt="" class="ds-tb-check"
type="checkbox"
v-model="allCheck"
:indeterminate="someCheck"
/> />
</hot-table> <hot-table ref="hotTb" :data="list" :settings="settings">
<img
v-show="!list.length"
class="hot-tb-no-data"
src="../../../assets/images/nodata.png"
alt=""
/>
</hot-table>
</div>
</div>
<div class="BTable">
<BasicTable @register="registerTable" @row-dbClick="EditRow" :maxHeight="140">
<template #tableTitle>
<span class="title">银行信息</span>
<a-button
type="link"
@click="addboxLine({ id: rowId })"
:disabled="Fndisabled()"
>
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="delboxLine"
>
<a-button type="link" :disabled="Fndisabled()">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: editboxLine.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</div> </div>
</div> </div>
<BasicTable class="ds-table-detail" @register="registerTable" @row-dbClick="EditRow">
<template #tableTitle>
<span>银行信息</span>
<a-button type="link" @click="addboxLine({ id: rowId })" :disabled="Fndisabled()">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定删除当前选中数据?"
ok-text="是"
cancel-text="否"
@confirm="delboxLine"
>
<a-button type="link" :disabled="Fndisabled()">
<span class="iconfont icon-shanchu21"></span>
删除
</a-button>
</a-popconfirm>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: editboxLine.bind(null, record),
},
]"
/>
</template>
</template>
</BasicTable>
</div> </div>
<div> <div>
<Tabs3 :client-id="clientId" /> <Tabs3 :client-id="clientId" />
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" tab="账期信息"> <!-- <a-tab-pane key="3" tab="账期信息">
<Tabs3 :client-id="clientId" /> <Tabs3 :client-id="clientId" />
</a-tab-pane> </a-tab-pane> -->
<!-- 联系人信息 --> <!-- 联系人信息 -->
<a-tab-pane key="4" tab="联系人信息"> <a-tab-pane key="4" tab="联系人信息">
<Menus2 :client-id="clientId" class="RUnit" /> <Menus2 :client-id="clientId" class="RUnit" />
@ -222,7 +232,7 @@
pagination: false, pagination: false,
bordered: true, bordered: true,
showTableSetting: false, showTableSetting: false,
canResize: false, canResize: true,
immediate: false, immediate: false,
// dataSource: dataSource.value, // dataSource: dataSource.value,
showIndexColumn: true, showIndexColumn: true,
@ -634,12 +644,12 @@
}, },
{ {
title: '地址电话', title: '地址电话',
width: 300, width: 290,
data: 'addressTel', data: 'addressTel',
}, },
] ]
const settings = { const settings = {
height: '200', height: '163',
width: '100%', width: '100%',
autoWrapRow: true, autoWrapRow: true,
autoWrapCol: true, autoWrapCol: true,
@ -689,8 +699,71 @@
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
&.Fapiao {
padding: 5px;
}
}
.FlexTable {
display: flex;
.HotTable {
width: 33%;
> div {
&:nth-child(1) {
padding: 14px 8px 8px 8px;
}
}
}
.BTable {
height: 153px;
margin-left: 15px;
width: 66%;
}
}
:deep(.handsontable) {
.htCore {
thead {
tr {
height: 34px !important;
th {
height: 34px !important;
line-height: 34px;
font-size: 12px;
font-weight: 400 !important;
letter-spacing: 1px;
padding-left: 7px;
color: #33383d !important;
text-align: left !important;
.relative {
padding: 0;
}
}
}
}
tbody {
tr {
height: 40.5px !important;
td {
line-height: 40.5px;
// font-size: 12px;
// font-weight: 400 !important;
// letter-spacing: 1px;
// padding-left: 7px;
// color: #33383d !important;
// text-align: left !important;
}
}
}
}
}
.ds-detail-box { .ds-detail-box {
margin-top: 30px; margin-top: 5px;
padding-right: 20px; padding-right: 20px;
} }
.RUnit { .RUnit {

@ -382,7 +382,7 @@ export const columns: BasicColumn[] = [
title: '仓储费开始日期模式', title: '仓储费开始日期模式',
dataIndex: 'wmsFeeRateType', dataIndex: 'wmsFeeRateType',
sorter: true, sorter: true,
width: 150, width: 250,
customRender: ({ text }) => { customRender: ({ text }) => {
let RText = '' let RText = ''
wmsFeeRateTypeList.forEach((e) => { wmsFeeRateTypeList.forEach((e) => {
@ -865,19 +865,6 @@ export const formSchema: FormSchema[] = [
}, },
}, },
}, },
{
field: 'status',
label: '是否可用',
component: 'RadioButtonGroup',
defaultValue: 0,
colProps: { span: 4 },
componentProps: {
options: [
{ label: '禁用', value: 1 },
{ label: '启用', value: 0 },
],
},
},
{ {
label: '开票方式', label: '开票方式',
field: 'invoicingMethod', field: 'invoicingMethod',
@ -895,67 +882,71 @@ export const formSchema: FormSchema[] = [
}, },
}, },
{ {
field: 'isShared', field: 'overdueDays',
label: '是否共享', label: '超期天数',
component: 'RadioButtonGroup', component: 'InputNumber',
defaultValue: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { defaultValue: 0,
options: [ dynamicDisabled: ({ values }) => {
{ label: '是', value: true }, return !values.isOverdueDeduction
{ label: '否', value: false },
],
}, },
}, },
// {
// field: 'status',
// label: '是否可用',
// component: 'RadioButtonGroup',
// defaultValue: 0,
// colProps: { span: 4 },
// componentProps: {
// options: [
// { label: '禁用', value: 1 },
// { label: '启用', value: 0 },
// ],
// },
// },
{ {
label: '客户属性', field: 'status',
field: 'ArrclientTag', label: '是否可用',
// required: true, component: 'Switch',
component: 'Select', colProps: { span: 4 },
colProps: { span: 8 },
componentProps: { componentProps: {
options: ClientTag, checkedChildren: '是',
allowClear: true, unCheckedChildren: '否',
mode: 'multiple',
maxTagCount: 4,
}, },
}, },
// { // {
// label: '客户属性', // field: 'isShared',
// field: 'ArrclientTag', // label: '是否共享',
// // required: true, // component: 'RadioButtonGroup',
// component: 'CheckboxGroup', // defaultValue: false,
// defaultValue: '', // colProps: { span: 4 },
// colProps: { span: 24 },
// componentProps: { // componentProps: {
// options: ClientTag, // options: [
// { label: '是', value: true },
// { label: '否', value: false },
// ],
// }, // },
// }, // },
{ {
label: '推送设置', field: 'isShared',
field: 'notifications', label: '是否共享',
// required: true, component: 'Switch',
component: 'Select',
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: {
options: notificationsData, checkedChildren: '是',
allowClear: true, unCheckedChildren: '否',
mode: 'multiple',
maxTagCount: 1,
}, },
}, },
{ {
field: 'isOverdueDeduction', field: 'isOverdueDeduction',
label: '是否超期扣单', label: '是否超期扣单',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false, colProps: { span: 5 },
colProps: { span: 4 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
onChange: (e) => { onChange: (e) => {
if (!e) { if (!e) {
formModel.overdueDays = '0' formModel.overdueDays = '0'
@ -964,30 +955,43 @@ export const formSchema: FormSchema[] = [
} }
}, },
}, },
{
field: 'overdueDays',
label: '超期天数',
component: 'InputNumber',
colProps: { span: 4 },
defaultValue: 0,
dynamicDisabled: ({ values }) => {
return !values.isOverdueDeduction
},
},
{ {
field: 'isMortgageLastOrder', field: 'isMortgageLastOrder',
label: '是否押最后一单', label: '是否押最后一单',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false, defaultValue: false,
colProps: { span: 4 }, colProps: { span: 4 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false }, },
], },
{
label: '客户属性',
field: 'ArrclientTag',
// required: true,
component: 'Select',
colProps: { span: 12 },
componentProps: {
options: ClientTag,
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
},
},
{
label: '推送设置',
field: 'notifications',
// required: true,
component: 'Select',
colProps: { span: 12 },
componentProps: {
options: notificationsData,
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
}, },
}, },
{ {
field: 'note', field: 'note',
label: '备注', label: '备注',
@ -1010,6 +1014,38 @@ export const formSchema: FormSchema[] = [
}, },
}, },
// { // {
// label: '客户属性',
// field: 'ArrclientTag',
// // required: true,
// component: 'CheckboxGroup',
// defaultValue: '',
// colProps: { span: 24 },
// componentProps: {
// options: ClientTag,
// },
// },
// {
// field: 'isOverdueDeduction',
// label: '是否超期扣单',
// component: 'RadioButtonGroup',
// defaultValue: false,
// colProps: { span: 4 },
// componentProps: ({ formModel }) => {
// return {
// options: [
// { label: '是', value: true },
// { label: '否', value: false },
// ],
// onChange: (e) => {
// if (!e) {
// formModel.overdueDays = '0'
// }
// },
// }
// },
// },
// {
// field: 'ediCode2', // field: 'ediCode2',
// label: 'EDI代码2', // label: 'EDI代码2',
// // required: true, // // required: true,

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<template #toolbar> <template #tableTitle>
<span class="title">固定费用列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
新建 新建
@ -45,7 +46,7 @@
}) })
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '往来单位固定费用', title: '',
// api: getSysDictTypeList, // api: getSysDictTypeList,
api: async (p) => { api: async (p) => {
const res: API.DataResult = await getFeeCustTemplateDetailList(p) const res: API.DataResult = await getFeeCustTemplateDetailList(p)
@ -126,3 +127,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -14,11 +14,11 @@ const itemNameOption = ref([])
// 模块字典 // 模块字典
const modulesDict = await getDictOption('modules') const modulesDict = await getDictOption('modules')
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ // {
title: '客户名称', // title: '客户名称',
dataIndex: 'customerName', // dataIndex: 'customerName',
width: 150, // width: 150,
}, // },
{ {
title: '客户参数类型', title: '客户参数类型',
dataIndex: 'paramType', dataIndex: 'paramType',

@ -1,9 +1,10 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<template #toolbar> <template #tableTitle>
<span class="title">客户参数列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-tianjia"></span> <span class="iconfont icon-new_document"></span>
新建 新建
</a-button> </a-button>
</template> </template>
@ -121,3 +122,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -189,7 +189,7 @@
width: 60, width: 60,
}, },
canResize: true, canResize: true,
resizeHeightOffset: 35, resizeHeightOffset: 32,
immediate: true, immediate: true,
actionColumn: { actionColumn: {
width: 80, width: 80,

@ -299,40 +299,34 @@ export const formSchema: FormSchema[] = [
{ {
field: 'isOperator', field: 'isOperator',
label: '是否为操作', label: '是否为操作',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
{ {
field: 'isFinancialStaff', field: 'isFinancialStaff',
label: '是否为财务', label: '是否为财务',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
{ {
field: 'isSaleMan', field: 'isSaleMan',
label: '是否为销售', label: '是否为销售',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
// { // {
@ -351,27 +345,23 @@ export const formSchema: FormSchema[] = [
{ {
field: 'isInsurance', field: 'isInsurance',
label: '是否保险联系人', label: '是否保险联系人',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
{ {
field: 'isCheckAccount', field: 'isCheckAccount',
label: '是否对账联系人', label: '是否对账联系人',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
defaultValue: false,
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
{ {
@ -420,14 +410,14 @@ export const formSchema: FormSchema[] = [
{ {
field: 'status', field: 'status',
label: '是否可用', label: '是否可用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '禁用', value: 1 }, checkedValue: 0,
{ label: '启用', value: 0 }, unCheckedChildren: '否',
], unCheckedValue: 1,
}, },
}, },
] ]

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<template #toolbar> <template #tableTitle>
<span class="title">客户联系人列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加客户联系人 添加客户联系人
@ -36,7 +37,7 @@
}) })
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '客户联系人列表', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => { return new Promise((resolve) => {
@ -108,3 +109,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -191,27 +191,25 @@ export const formSchema: FormSchema[] = [
{ {
field: 'isPublic', field: 'isPublic',
label: '是否公共标识', label: '是否公共标识',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false, defaultValue: false,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '是', value: true }, unCheckedChildren: '否',
{ label: '否', value: false },
],
}, },
}, },
{ {
field: 'status', field: 'status',
label: '是否可用', label: '是否可用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 6 }, colProps: { span: 6 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '禁用', value: 1 }, checkedValue: 0,
{ label: '启用', value: 0 }, unCheckedChildren: '否',
], unCheckedValue: 1,
}, },
}, },
{ {

@ -1,7 +1,8 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable">
<template #toolbar> <template #tableTitle>
<span class="title">客户收发货人列表</span>
<a-button type="link" @click="handleCreate"> <a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加客户收发货人 添加客户收发货人
@ -36,7 +37,7 @@
}) })
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '客户收发货人列表', title: '',
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => { return new Promise((resolve) => {
@ -106,3 +107,17 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.ds-table-detail {
margin-top: -16px;
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
vertical-align: bottom;
}
}
</style>

@ -173,18 +173,17 @@ export const formSchema: FormSchema[] = [
}, },
}, },
}, },
{ {
field: 'status', field: 'status',
label: '是否可用', label: '是否可用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 20 }, colProps: { span: 20 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '禁用', value: 1 }, checkedValue: 0,
{ label: '启用', value: 0 }, unCheckedChildren: '否',
], unCheckedValue: 1,
}, },
}, },
] ]

@ -268,14 +268,14 @@ export const formSchema: FormSchema[] = [
{ {
field: 'status', field: 'status',
label: '是否可用', label: '是否可用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '禁用', value: 1 }, checkedValue: 0,
{ label: '启用', value: 0 }, unCheckedChildren: '否',
], unCheckedValue: 1,
}, },
}, },
] ]

@ -360,31 +360,27 @@ export const formSchema: FormSchema[] = [
rows: 2, rows: 2,
}, },
}, },
{ {
field: 'isSpecial', field: 'isSpecial',
label: '特批放单客户', label: '特批放单客户',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: false,
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '否', value: false }, unCheckedChildren: '否',
{ label: '是', value: true },
],
}, },
}, },
{ {
field: 'status', field: 'status',
label: '是否可用', label: '是否可用',
component: 'RadioButtonGroup', component: 'Switch',
defaultValue: 0, defaultValue: 0,
colProps: { span: 12 }, colProps: { span: 12 },
componentProps: { componentProps: {
options: [ checkedChildren: '是',
{ label: '禁用', value: 1 }, checkedValue: 0,
{ label: '启用', value: 0 }, unCheckedChildren: '否',
], unCheckedValue: 1,
}, },
}, },
] ]

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<BasicTable class="ds-table-detail" @register="registerTable"> <BasicTable class="ds-table-detail" @register="registerTable" :maxHeight="350">
<template #tableTitle> <template #tableTitle>
<span>账期信息</span> <span class="title">账期信息</span>
<a-button type="link" @click="handleCreate" :disabled="Fndisabled()"> <a-button type="link" @click="handleCreate" :disabled="Fndisabled()">
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加 添加
@ -108,7 +108,7 @@
bordered: true, bordered: true,
// useSearchForm: false, // useSearchForm: false,
showTableSetting: false, showTableSetting: false,
canResize: false, canResize: true,
immediate: false, immediate: false,
// tableSetting: { // tableSetting: {
// redo: false, // redo: false,
@ -173,3 +173,13 @@
reload() reload()
} }
</script> </script>
<style lang="less" scoped>
.title {
font-size: 12px;
font-weight: 700;
letter-spacing: 1px;
line-height: 15.84px;
color: rgba(51, 56, 61, 1);
text-align: left;
}
</style>

@ -62,28 +62,11 @@
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
</div> </div>
<!-- <div class="nav" @click="PrintExcel" v-show="list.length !== 0">
<i class="iconfont icon-jiahao2fill"></i>打印
</div> -->
</div> </div>
<div <div
v-if="details.autoYardImport && !details.autoYardImport.isRead" v-if="details.autoYardImport && !details.autoYardImport.isRead"
style="display: inline-block; margin-left: 10px; padding-top: 5px" style="display: inline-block; margin-left: 10px; padding-top: 5px"
> >
<!-- <a-icon
v-if="details.autoYardImport && details.autoYardImport.status == '已导入'"
@click="handleOpen"
type="check-circle"
theme="filled"
style="color: green; font-size: 19px; cursor: pointer"
/>
<a-icon
v-if="details.autoYardImport && details.autoYardImport.status == '未导入'"
@click="handleOpen"
type="exclamation-circle"
theme="filled"
style="color: rgb(197, 194, 16); font-size: 19px; cursor: pointer"
/> -->
</div> </div>
</div> </div>
<div> <div>
@ -139,11 +122,6 @@
alt="" alt=""
/> />
</hot-table> </hot-table>
<!-- <div class="model-botton-box">
<a-button class="btn" type="primary" @click="addChildData"></a-button>
<a-button class="btn btn-delete" @click="removeChildData"></a-button>
<a-button class="btn" type="primary" @click="saveChildData"></a-button>
</div> -->
<a-spin :spinning="!moreSelectLoad"> <a-spin :spinning="!moreSelectLoad">
<div class="flex" v-if="!isLockBooking" style="justify-content: space-between"> <div class="flex" v-if="!isLockBooking" style="justify-content: space-between">
<div> <div>
@ -244,7 +222,6 @@
import { import {
GetYardData, GetYardData,
ReadAutoYardImport, ReadAutoYardImport,
GetCtnListRefsh,
GetOpCtnList, GetOpCtnList,
BatchDelOpCtn, BatchDelOpCtn,
GetOpCtnDetailList, GetOpCtnDetailList,
@ -252,20 +229,7 @@
BatchDelOpCtnDetail, BatchDelOpCtnDetail,
GetCtnSelectList, GetCtnSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger' } from '/@/views/operation/seaexport/api/BookingLedger'
import { ref, Ref, watchEffect, getCurrentInstance, watch, onMounted, nextTick } from 'vue'
import { BasicColumn, BasicTable, useTable } from '/@/components/Table'
import { goodsTablecolumns } from '/@/views/operation/seaexport/detail/columns'
import {
ref,
Ref,
watchEffect,
reactive,
getCurrentInstance,
h,
watch,
onMounted,
nextTick,
} from 'vue'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
@ -275,7 +239,6 @@
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger' import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
registerAllModules() registerAllModules()
import * as XLSX from 'xlsx' import * as XLSX from 'xlsx'
import { log } from 'console'
// import printJS from 'print-js' // import printJS from 'print-js'
const route = useRoute() const route = useRoute()
const props = defineProps({ const props = defineProps({
@ -289,10 +252,9 @@
'handleRefshTable', 'handleRefshTable',
'changeCtnInfo', 'changeCtnInfo',
]) ])
let { ctx: that, proxy }: any = getCurrentInstance()
watch( watch(
() => props.details, () => props.details,
(nval, oval) => { (nval) => {
if (nval.id) { if (nval.id) {
GetCtnList(nval) GetCtnList(nval)
} }
@ -304,24 +266,16 @@
) )
// -------------------------- // --------------------------
const dataSource = ref<any>([])
// //
const ctnDict = ref([]) const ctnDict = ref([])
const weightTypeDict = ref([]) const weightTypeDict = ref([])
// //
const kindPkgsDict = ref([]) const kindPkgsDict = ref([])
//
const feeDict = ref([])
//
const unitDict = ref([])
//
const currencyDict = ref([])
// //
const hotTb = ref<any>() const hotTb = ref<any>()
const list = ref<any>([]) const list = ref<any>([])
const moreTList = ref<any>([]) const moreTList = ref<any>([])
const moreData = ref<any>([[]]) const moreData = ref<any>([[]])
const moreList = ref<any>([])
// //
const columns = [ const columns = [
{ {
@ -347,13 +301,6 @@
width: 80, width: 80,
data: 'ctnCode', data: 'ctnCode',
}, },
// {
// title: '',
// width: 80,
// data: 'size',
// type: 'numeric',
// format: '0',
// },
{ {
title: '箱型', title: '箱型',
width: 120, width: 120,
@ -383,11 +330,6 @@
type: 'numeric', type: 'numeric',
format: '0', format: '0',
}, },
// {
// title: '',
// width: 80,
// data: 'ctnAll',
// },
{ {
title: '箱号', title: '箱号',
width: 80, width: 80,
@ -944,9 +886,6 @@
: 0 + item.ctnNum : 0 + item.ctnNum
? parseInt(item.ctnNum) ? parseInt(item.ctnNum)
: 0 : 0
// totalKgs.value = parseInt(totalKgs.value) + parseInt(item.kgs)
// totalCbm.value = parseInt(totalCbm.value) + parseInt(item.cbm)
// 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
@ -1136,14 +1075,6 @@
moreSelectLoad.value = true moreSelectLoad.value = true
}) })
}) })
// selectChildArr.value.map((item, index) => {
// childTableData.value.map((oitem: any, oindex) => {
// if (item === oitem.rowKey) {
// childTableData.value.splice(oindex, 1)
// }
// })
// })
} }
// EXCEL // EXCEL
async function UpExcel(file) { async function UpExcel(file) {
@ -1253,19 +1184,9 @@
for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff for (let i = 0; i !== s.length; ++i) view[i] = s.charCodeAt(i) & 0xff
return buf return buf
} }
//
async function PrintExcel() {
// printJS({
// printable: 'printableTable',
// type: 'html',
// header: null,
// targetStyles: ['*'],
// })
}
// ------------------------------- // -------------------------------
const loadingTable = ref(false) const loadingTable = ref(false)
const tableData: any = ref([{}])
const selectArr = ref([]) const selectArr = ref([])
const totalPkgs: any = ref(0) const totalPkgs: any = ref(0)
const totalKgs: any = ref(0) const totalKgs: any = ref(0)
@ -1278,13 +1199,11 @@
// //
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => { selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
changeSelectedRowKeys(selectedRowKeys) changeSelectedRowKeys(selectedRowKeys)
// selectArr.value = selectedRowKeys
}, },
// //
selectedAllChange: ({ isSelected, selectedRowKeys }) => { selectedAllChange: ({ isSelected, selectedRowKeys }) => {
if (isSelected) { if (isSelected) {
changeSelectedRowKeys(selectedRowKeys) changeSelectedRowKeys(selectedRowKeys)
// selectArr.value = selectedRowKeys
} else { } else {
selectArr.value = [] selectArr.value = []
} }
@ -1298,29 +1217,8 @@
const comparisonFlag = ref(false) const comparisonFlag = ref(false)
const yardAutoForm: Ref<yardAutoFormObj | any> = ref({}) const yardAutoForm: Ref<yardAutoFormObj | any> = ref({})
const tableLoaded = ref(false) const tableLoaded = ref(false)
const inTableLoad = ref(false)
const cellAutofillOption = ref({
directionX: false,
directionY: true,
afterAutofill: ({
direction,
sourceSelectionRangeIndexes,
targetSelectionRangeIndexes,
sourceSelectionData,
targetSelectionData,
}) => {
console.log('direction::', direction)
console.log('sourceSelectionRangeIndexes::', sourceSelectionRangeIndexes)
console.log('targetSelectionRangeIndexes::', targetSelectionRangeIndexes)
console.log('sourceSelectionData::', sourceSelectionData)
console.log('targetSelectionData::', targetSelectionData)
console.log('---')
},
})
const moreModelconfirm = ref(false) const moreModelconfirm = ref(false)
const childTableData: Ref<any> = ref([])
const selectChildArr = ref([])
const columnsAuto = ref([ const columnsAuto = ref([
{ {
dataIndex: 'CTNALL', dataIndex: 'CTNALL',
@ -1396,71 +1294,6 @@
ctnDict.value = res.data ctnDict.value = res.data
}) })
tableLoaded.value = true tableLoaded.value = true
// if (Object.keys(props.details).length > 0) {
// const arr: any[] = []
// const DtotalCtnall = {}
// totalPkgs.value = 0
// totalKgs.value = 0
// totalCbm.value = 0
// props.details.ctnInputs.map((item, index) => {
// arr.push({
// ...{ rowKey: index },
// ...item,
// })
// if (!Object.keys(DtotalCtnall).includes(item.ctnall)) {
// const cData = {
// type: 'ctnall',
// num: item.ctnnum,
// }
// DtotalCtnall[item.ctnall] = cData
// }
// if (item.pkgs) {
// totalPkgs.value = (totalPkgs.value * 100 + Number(item.pkgs) * 100) / 100
// }
// if (item.kgs) {
// let onum: any = (totalKgs.value * 10000 + Number(item.kgs) * 10000) / 10000
// onum += ''
// const pNum = onum.split('.')
// if (!/\./.test(onum)) {
// totalKgs.value = onum + '.00'
// } else if (pNum[1].length < 2) {
// totalKgs.value = onum + '0'
// } else {
// totalKgs.value = Number(pNum[0] + '.' + pNum[1].substr(0, 5))
// }
// }
// if (item.cbm) {
// let onum: any = (totalCbm.value * 10000 + Number(item.cbm) * 10000) / 10000
// onum += ''
// const pNum = onum.split('.')
// if (!/\./.test(onum)) {
// totalCbm.value = onum + '.00'
// } else if (pNum[1].length < 2) {
// totalCbm.value = onum + '0'
// } else {
// totalCbm.value = Number(pNum[0] + '.' + pNum[1].substr(0, 5))
// }
// }
// })
// tableData.value = arr
// tableLoaded.value = true
// totalCtnall.value = ''
// emit('changeTotal', { type: 'totalKgs', val: totalKgs.value })
// emit('changeTotal', { type: 'totalPkgs', val: totalPkgs.value })
// emit('changeTotal', { type: 'totalCbm', val: totalCbm.value })
// } else {
// tableData.value = []
// tableLoaded.value = true
// totalCtnall.value = ''
// totalPkgs.value = 0
// totalKgs.value = 0
// totalCbm.value = 0
// }
// const obj = {}
// // this.$options.filters['dictData']('BookingLockCtn').forEach((item) => {
// // obj[item.code] = true
// // })
// BookingLockCtn.value = obj
} }
function changeSelectedRowKeys(keys) { function changeSelectedRowKeys(keys) {
selectArr.value = keys selectArr.value = keys
@ -1484,7 +1317,6 @@
totalCtn.value = DtotalCtn totalCtn.value = DtotalCtn
} }
function importYarn() { function importYarn() {
// notification.warning({ message: '...', duration: 3 })
if (!props.details.id) { if (!props.details.id) {
notification.error({ message: '请先保存订舱信息', duration: 3 }) notification.error({ message: '请先保存订舱信息', duration: 3 })
return false return false
@ -1497,14 +1329,11 @@
.then((res) => { .then((res) => {
if (res.succeeded) { if (res.succeeded) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
// const addTable: any[] = []
const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : '' const kindpkgsOld = list.value[0] ? list.value[0].kindPkgs : ''
// list.value = []
// const lastNum =
// list.value.length > 0 ? Number(list.value[list.value.length - 1].rowKey) + 1 : 0
data.map((item, index) => { data.map((item, index) => {
const _data = { const _data = {
// rowKey: lastNum + index,
cbm: item.CBM, cbm: item.CBM,
cntrNo: item.CNTRNO, cntrNo: item.CNTRNO,
ctn: item.CTNALL, ctn: item.CTNALL,
@ -1516,17 +1345,9 @@
ctnNum: 1, ctnNum: 1,
tareWeight: item.TAREWEIGHT, tareWeight: item.TAREWEIGHT,
} }
// addTable.push(_data)
list.value.push(_data) list.value.push(_data)
}) })
// console.log(list.value)
// setTimeout(() => {
// list.value = [...list.value, ...addTable]
// console.log(list.value)
// }, 10)
// that.$forceUpdate()
} else { } else {
notification.error({ message: res.message, duration: 3 }) notification.error({ message: res.message, duration: 3 })
} }
@ -1538,7 +1359,6 @@
}) })
} }
function importsealno() { function importsealno() {
// notification.warning({ message: '...', duration: 3 })
sealnoLoading.value = true sealnoLoading.value = true
GetYardData({ GetYardData({
id: props.details.id, id: props.details.id,
@ -1562,26 +1382,6 @@
list.value[index].ctnNum = 1 list.value[index].ctnNum = 1
}) })
computing() computing()
// const map = {}
// const dest: any[] = []
// for (var i = 0; i < list.value.length; i++) {
// var ai = list.value[i]
// if (!map[ai.ctnall]) {
// dest.push({
// ctnall: ai.ctnall,
// ctnnum: ai.ctnnum,
// })
// map[ai.ctnall] = ai
// } else {
// for (var j = 0; j < dest.length; j++) {
// var dj = dest[j]
// if (dj.ctnall == ai.ctnall) {
// dj.ctnnum = (parseFloat(dj.ctnnum) + parseFloat(ai.ctnnum)).toString()
// break
// }
// }
// }
// }
} else { } else {
notification.error({ message: '箱量与场站不一致', duration: 3 }) notification.error({ message: '箱量与场站不一致', duration: 3 })
} }
@ -1596,7 +1396,6 @@
}) })
} }
function importWeight() { function importWeight() {
// notification.warning({ message: '...', duration: 3 })
if (!props.details.id) { if (!props.details.id) {
notification.error({ message: '请先保存订舱信息', duration: 3 }) notification.error({ message: '请先保存订舱信息', duration: 3 })
return false return false
@ -1609,11 +1408,10 @@
.then((res) => { .then((res) => {
if (res.succeeded) { if (res.succeeded) {
const data = JSON.parse(res.data) const data = JSON.parse(res.data)
// const addTable: any[] = []
const cntrnoArr: any[] = [] const cntrnoArr: any[] = []
list.value.map((item: any, index) => { list.value.map((item: any, index) => {
if (!item.cntrNo) { if (!item.cntrNo) {
// delete tableData.value[index]
list.value.splice(index, 1) list.value.splice(index, 1)
} else { } else {
cntrnoArr.push(item.cntrNo) cntrnoArr.push(item.cntrNo)
@ -1626,29 +1424,10 @@
cntrnoArr.push(list.value[i].cntrNo) cntrnoArr.push(list.value[i].cntrNo)
} }
} }
// const lastNum =
// list.value.length > 0 ? Number(list.value[list.value.length - 1].rowKey) + 1 : 0
data.map((item, index) => { data.map((item, index) => {
if (cntrnoArr.includes(item.CNTRNO)) { if (cntrnoArr.includes(item.CNTRNO)) {
// const setWeighkgs = calc(
// Number(list.value[cntrnoArr.indexOf(item.CNTRNO)].kgs),
// Number(item.TAREWEIGHT),
// '+',
// )
list.value[cntrnoArr.indexOf(item.CNTRNO)] = { list.value[cntrnoArr.indexOf(item.CNTRNO)] = {
// rowKey: list.value[cntrnoArr.indexOf(item.CNTRNO)].rowKey,
// ctnall: list.value[cntrnoArr.indexOf(item.CNTRNO)].ctnall,
// ctnnum: list.value[cntrnoArr.indexOf(item.CNTRNO)].ctnnum,
// cntrNo: list.value[cntrnoArr.indexOf(item.CNTRNO)].cntrNo,
// sealno: list.value[cntrnoArr.indexOf(item.CNTRNO)].sealno,
// pkgs: list.value[cntrnoArr.indexOf(item.CNTRNO)].pkgs,
// kindpkgs: list.value[cntrnoArr.indexOf(item.CNTRNO)].kindpkgs,
// kgs: list.value[cntrnoArr.indexOf(item.CNTRNO)].kgs,
// cbm: list.value[cntrnoArr.indexOf(item.CNTRNO)].cbm,
// tareweight: item.TAREWEIGHT,
// weightype: list.value[cntrnoArr.indexOf(item.CNTRNO)].weightype,
// weighkgs: setWeighkgs,
// weighdate: list.value[cntrnoArr.indexOf(item.CNTRNO)].weighdate,
cbm: item.CBM, cbm: item.CBM,
cntrNo: item.CNTRNO, cntrNo: item.CNTRNO,
ctn: item.CTNALL, ctn: item.CTNALL,
@ -1672,26 +1451,10 @@
sealNo: '', sealNo: '',
ctnNum: 1, ctnNum: 1,
tareWeight: item.TAREWEIGHT, tareWeight: item.TAREWEIGHT,
// // rowKey: lastNum + index,
// ctnall: '',
// ctnnum: '1',
// cntrNo: '',
// sealno: '',
// pkgs: '',
// kindpkgs: '',
// kgs: '',
// cbm: '',
// tareweight: item.TAREWEIGHT,
// weightype: '',
// weighkgs: '',
// weighdate: '',
} }
list.value.push(_data) list.value.push(_data)
} }
}) })
// list.value = [...list.value, ...addTable]
// that.$forceUpdate()
} else { } else {
notification.error({ message: res.message, duration: 3 }) notification.error({ message: res.message, duration: 3 })
} }
@ -1701,94 +1464,6 @@
WeightLoading.value = false WeightLoading.value = false
}) })
} }
function calc(num1, num2, calcStr) {
var str1 //
var str2
var ws1 = 0 // ws1ws2 num
var ws2 = 0 //
var bigger // biggersmaller0
var smaller // 1.001 + 2.03 2.0301001+2031.12*1.1112*111000112*11/1000=1.232
var zeroCount // 0
var isExistDot1 //
var isExistDot2
var sum
var beishu = 1
//
str1 = num1.toString()
str2 = num2.toString()
//
isExistDot1 = str1.indexOf('.') != -1
isExistDot2 = str2.indexOf('.') != -1
//
if (isExistDot1) {
ws1 = str1.split('.')[1].length
}
if (isExistDot2) {
ws2 = str2.split('.')[1].length
}
// ws1 ws2 num1 num2 ws1 ws2 undefined
// bigger smaller
bigger = ws1 > ws2 ? ws1 : ws2
smaller = ws1 < ws2 ? ws1 : ws2
switch (calcStr) {
// 0
// 1.001 + 2.03 2.0301001+203
case '+':
case '-':
case '/':
zeroCount = bigger - smaller
for (var i = 0; i < zeroCount; i++) {
if (ws1 == smaller) {
str1 += '0'
} else {
str2 += '0'
}
}
break
case '*':
//
bigger = bigger + smaller
break
default:
return '暂不支持的计算类型,现已支持的有加法、减法、乘法、除法'
break
}
//
str1 = str1.replace('.', '')
str2 = str2.replace('.', '')
// 1.001 1000 1001
for (var i = 0; i < bigger; i++) {
beishu *= 10 // beishu = beishu * 10;
}
num1 = parseInt(str1)
num2 = parseInt(str2)
//
switch (calcStr) {
case '+':
sum = (num1 + num2) / beishu
break
case '-':
sum = (num1 - num2) / beishu
break
case '*':
sum = (num1 * num2) / beishu
break
case '/':
sum = num1 / num2
/*
所以对数字进行放大对应倍数并进行补0操作后不用另对倍数做处理 */
break
default:
return '暂不支持的计算类型,现已支持的有加法、减法、乘法、除法'
}
return sum
}
function arrowsWeight() { function arrowsWeight() {
let SelectData: any = [] let SelectData: any = []
let SelectIndex: any let SelectIndex: any
@ -1816,8 +1491,6 @@
: Math.floor(SelectData[0].pkgs / SelectData[0].ctnNum) : Math.floor(SelectData[0].pkgs / SelectData[0].ctnNum)
let cbmU: any = (SelectData[0].cbm / SelectData[0].pkgs).toFixed(2) let cbmU: any = (SelectData[0].cbm / SelectData[0].pkgs).toFixed(2)
let kgsU: any = (SelectData[0].kgs / SelectData[0].pkgs).toFixed(2) let kgsU: any = (SelectData[0].kgs / SelectData[0].pkgs).toFixed(2)
// kgs: kgs,
// cbm: cbm,
Arr.push({ ...SelectData[0], ctnNum: 1, pkgs, cbm: pkgs * cbmU, kgs: pkgs * kgsU }) Arr.push({ ...SelectData[0], ctnNum: 1, pkgs, cbm: pkgs * cbmU, kgs: pkgs * kgsU })
} }
list.value.splice(SelectIndex, 1) list.value.splice(SelectIndex, 1)
@ -1832,7 +1505,6 @@
} }
function handleRefsh() { function handleRefsh() {
GetCtnList(props.details) GetCtnList(props.details)
// emit('handleRefshTable')
} }
function handleOpen() { function handleOpen() {
comparisonFlag.value = true comparisonFlag.value = true
@ -1922,11 +1594,6 @@
deep: true, deep: true,
}, },
) )
// addShortcut({
// key: 'Ctrl+Shift+A', //
// callback: () => alert(''), //
// isEditable: false, // 使
// }),
// //
let OTeu = ref(0) let OTeu = ref(0)
const settings = { const settings = {
@ -2140,34 +1807,6 @@
} }
} }
}) })
// watch(
// moreData.value[moreSelectNum.value],
// (val) => {
// let a = 0
// let b = 0
// val.forEach((item) => {
// if (item.selected) {
// a += 1
// } else {
// b += 1
// }
// })
// if (a == 0) {
// moreAllCheck.value = false
// }
// if (b == 0) {
// moreAllCheck.value = true
// }
// if (a != 0 && b != 0) {
// moreSomeCheck.value = true
// } else {
// moreSomeCheck.value = false
// }
// },
// {
// deep: true,
// },
// )
let isSave = ref([false, false, false]) let isSave = ref([false, false, false])
function RSaveType() { function RSaveType() {
let res = isSave.value.filter((num) => num) let res = isSave.value.filter((num) => num)
@ -2229,7 +1868,6 @@
// //
afterChange(changes, source) { afterChange(changes, source) {
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') { if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict: any = {}
// //
if (changes[0][1] === 'pkgs') { if (changes[0][1] === 'pkgs') {
let total: number = 0 let total: number = 0
@ -2281,7 +1919,6 @@
const hotmain = ref(null) const hotmain = ref(null)
onMounted(() => { onMounted(() => {
const hot = hotmain.value.hotInstance const hot = hotmain.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
// //
hot.addHook('beforeKeyDown', function (event) { hot.addHook('beforeKeyDown', function (event) {
// 'Enter' // 'Enter'

@ -1,6 +1,12 @@
import { ref } from 'vue' import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { getRoleList, getOrgList, getDeptList, GetFeeCurrencySelectList, getCountryList } from '/@/api/common' import {
getRoleList,
getOrgList,
getDeptList,
GetFeeCurrencySelectList,
getCountryList,
} from '/@/api/common'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index' import { checkPermissions } from '/@/hooks/Permissions/index'
@ -9,7 +15,7 @@ import { t } from '/@/hooks/web/useI18n'
const selectOrgList = ref<any>([]) const selectOrgList = ref<any>([])
const selectDeptList = ref([]) const selectDeptList = ref([])
const orgIds = ref([]) const orgIds = ref([])
getOrgList().then(res => { getOrgList().then((res) => {
orgIds.value = res.data orgIds.value = res.data
}) })
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
@ -157,7 +163,7 @@ export const formSchema: FormSchema[] = [
colProps: { colProps: {
span: 6, span: 6,
}, },
defaultValue: 2 defaultValue: 2,
}, },
{ {
field: 'pinYinCode', field: 'pinYinCode',
@ -179,8 +185,8 @@ export const formSchema: FormSchema[] = [
{ {
pattern: /^(?=.*[A-Za-z])(?=.*\d)[^]{6,30}$/, pattern: /^(?=.*[A-Za-z])(?=.*\d)[^]{6,30}$/,
message: '密码不得少于6位至少包括数组和字母', message: '密码不得少于6位至少包括数组和字母',
trigger: 'blur' trigger: 'blur',
} },
], ],
dynamicDisabled: ({ values }) => { dynamicDisabled: ({ values }) => {
if (!values.id || !checkPermissions('sys:user:pwd')) { if (!values.id || !checkPermissions('sys:user:pwd')) {
@ -188,7 +194,7 @@ export const formSchema: FormSchema[] = [
} else { } else {
return true return true
} }
} },
}, },
{ {
field: 'userEnName', field: 'userEnName',
@ -206,8 +212,8 @@ export const formSchema: FormSchema[] = [
{ {
pattern: /^1\d{10}$/, pattern: /^1\d{10}$/,
message: '请输入正确格式的手机号', message: '请输入正确格式的手机号',
trigger: 'blur' trigger: 'blur',
} },
], ],
colProps: { span: 6 }, colProps: { span: 6 },
}, },
@ -248,7 +254,7 @@ export const formSchema: FormSchema[] = [
component: 'Divider', component: 'Divider',
label: '用户属性', label: '用户属性',
componentProps: {}, componentProps: {},
colProps: { span: 24 } colProps: { span: 24 },
}, },
{ {
field: 'isOperator', field: 'isOperator',
@ -321,9 +327,9 @@ export const formSchema: FormSchema[] = [
valueField: 'id', valueField: 'id',
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
} },
} }
} },
}, },
{ {
field: 'divider-selects', field: 'divider-selects',
@ -419,9 +425,9 @@ export const formSchema: FormSchema[] = [
componentProps: { componentProps: {
mode: 'multiple', mode: 'multiple',
api: getRoleList, api: getRoleList,
resultField: 'data' resultField: 'data',
} },
} },
] ]
export const BankFormSchema: FormSchema[] = [ export const BankFormSchema: FormSchema[] = [
@ -429,13 +435,13 @@ export const BankFormSchema: FormSchema[] = [
field: 'id', field: 'id',
component: 'Input', component: 'Input',
label: '', label: '',
show: false show: false,
}, },
{ {
field: 'codeName', field: 'codeName',
label: '银行代码', label: '银行代码',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'currency', field: 'currency',
@ -448,57 +454,57 @@ export const BankFormSchema: FormSchema[] = [
api: GetFeeCurrencySelectList, api: GetFeeCurrencySelectList,
labelField: 'codeName', labelField: 'codeName',
valueField: 'codeName', valueField: 'codeName',
resultField: 'data' resultField: 'data',
} }
} },
}, },
{ {
field: 'bankName', field: 'bankName',
label: '银行名称', label: '银行名称',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'accountName', field: 'accountName',
label: '银行账户', label: '银行账户',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'bankAddress', field: 'bankAddress',
label: '银行地址', label: '银行地址',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'financeSoftCode', field: 'financeSoftCode',
label: '财务软件代码', label: '财务软件代码',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'subjectCode', field: 'subjectCode',
label: '科目代码', label: '科目代码',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'bankAgentName', field: 'bankAgentName',
label: '银行代理名称', label: '银行代理名称',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'bankAccountNo', field: 'bankAccountNo',
label: '银行账号', label: '银行账号',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'swift', field: 'swift',
label: '银行SWIFT', label: '银行SWIFT',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'countryName', field: 'countryName',
@ -522,9 +528,9 @@ export const BankFormSchema: FormSchema[] = [
if (obj) { if (obj) {
formModel.countryName = obj.label formModel.countryName = obj.label
} }
} },
} }
} },
}, },
{ {
field: 'isInvoiceDefault', field: 'isInvoiceDefault',
@ -532,12 +538,12 @@ export const BankFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
slot: 'isInvoiceDefault', slot: 'isInvoiceDefault',
defaultValue: true, defaultValue: true,
colProps: { span: 12 } colProps: { span: 12 },
}, },
{ {
field: 'note', field: 'note',
label: '备注', label: '备注',
component: 'InputTextArea', component: 'InputTextArea',
colProps: { span: 24 } colProps: { span: 24 },
}, },
] ]

Loading…
Cancel
Save