|
|
|
@ -15,7 +15,7 @@
|
|
|
|
|
<CollapseContainer title="其他信息">
|
|
|
|
|
<Tabs v-model:activeKey="activeKey">
|
|
|
|
|
<TabPane key="detailTab" tab="预约清关明细">
|
|
|
|
|
<vxe-grid ref="xGrid" v-bind="gridOptions" />
|
|
|
|
|
<vxe-grid ref="gridRef" v-bind="gridOptions" />
|
|
|
|
|
</TabPane>
|
|
|
|
|
<TabPane key="recordTab" tab="车辆进出记录">
|
|
|
|
|
<!-- <WmsTruckRecord ref="recordRef" :headId="rowId" />-->
|
|
|
|
@ -74,7 +74,7 @@
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { formSchema } from './columns'
|
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
|
import { VxeGridProps } from 'vxe-table'
|
|
|
|
|
import { VxeGridInstance, VxeGridProps, VxeGridPropTypes } from 'vxe-table'
|
|
|
|
|
const { notification, createConfirm, createMessage } = useMessage()
|
|
|
|
|
import { editInfo, getInfo, getDetailList, auditInfo } from '/@/api/wms/wmsclearance'
|
|
|
|
|
import { Divider, TabPane, Tabs } from 'ant-design-vue'
|
|
|
|
@ -94,6 +94,13 @@
|
|
|
|
|
const recordSource = ref<any[]>([])
|
|
|
|
|
const areaList = ref<any[]>([])
|
|
|
|
|
const activeKey = ref('detailTab')
|
|
|
|
|
interface RowVO {
|
|
|
|
|
[key: string]: any
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const gridRef = ref<VxeGridInstance<RowVO>>()
|
|
|
|
|
|
|
|
|
|
const footerData = ref<string[][]>([])
|
|
|
|
|
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
|
|
|
|
|
useForm({
|
|
|
|
|
labelWidth: 180,
|
|
|
|
@ -137,13 +144,104 @@
|
|
|
|
|
})
|
|
|
|
|
const [registerRecordModal, { openModal: openRecordModal }] = useModal()
|
|
|
|
|
const [registerSelectModal, { openModal }] = useModal()
|
|
|
|
|
const gridOptions = reactive<VxeGridProps>({
|
|
|
|
|
let detailColumns: VxeGridPropTypes.Columns = [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
type: 'seq',
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
width: 50,
|
|
|
|
|
align: 'center',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '商品名称',
|
|
|
|
|
field: 'goodsname',
|
|
|
|
|
width: 200,
|
|
|
|
|
fixed: 'left',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '规格型号',
|
|
|
|
|
field: 'goodsmodel',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '库位',
|
|
|
|
|
field: 'areaname',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '批次号',
|
|
|
|
|
field: 'goodsmodeL2',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '库位',
|
|
|
|
|
field: 'areaname',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '件数',
|
|
|
|
|
field: 'pkgs',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '小件数',
|
|
|
|
|
field: 'minpkgs',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: '托盘数',
|
|
|
|
|
// field: 'pallets',
|
|
|
|
|
// width: 100,
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: '毛重(千克)',
|
|
|
|
|
field: 'kgs',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '净重(千克)',
|
|
|
|
|
field: 'netweight',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: '体积',
|
|
|
|
|
// field: 'cbm',
|
|
|
|
|
// width: 100,
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: '承运车号',
|
|
|
|
|
field: 'truckno',
|
|
|
|
|
width: 200,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '车辆自重',
|
|
|
|
|
field: 'truckWeight',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '备注',
|
|
|
|
|
field: 'remark',
|
|
|
|
|
width: 200,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '计费单位',
|
|
|
|
|
field: 'storageunit',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '计费数量',
|
|
|
|
|
field: 'storageunitcount',
|
|
|
|
|
width: 100,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
const gridOptions = reactive<VxeGridProps<RowVO>>({
|
|
|
|
|
border: true,
|
|
|
|
|
height: 500,
|
|
|
|
|
align: null,
|
|
|
|
|
columnConfig: {
|
|
|
|
|
resizable: true,
|
|
|
|
|
},
|
|
|
|
|
showFooter: true,
|
|
|
|
|
columns: [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
@ -236,6 +334,9 @@
|
|
|
|
|
],
|
|
|
|
|
toolbarConfig: {},
|
|
|
|
|
data: dataSource,
|
|
|
|
|
footerMethod() {
|
|
|
|
|
return footerData.value
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const recordOptions = reactive<VxeGridProps>({
|
|
|
|
@ -310,6 +411,7 @@
|
|
|
|
|
} else {
|
|
|
|
|
recordSource.value = []
|
|
|
|
|
}
|
|
|
|
|
init()
|
|
|
|
|
}
|
|
|
|
|
const LoadRecord = () => {
|
|
|
|
|
openRecordModal(true, {
|
|
|
|
@ -406,4 +508,34 @@
|
|
|
|
|
loading.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const sumNum = (list: any[], field: string) => {
|
|
|
|
|
let count = 0
|
|
|
|
|
list.forEach((item) => {
|
|
|
|
|
count += Number(item[field])
|
|
|
|
|
})
|
|
|
|
|
return count
|
|
|
|
|
}
|
|
|
|
|
const init = async () => {
|
|
|
|
|
const $grid = gridRef.value
|
|
|
|
|
gridOptions.loading = false
|
|
|
|
|
console.log(dataSource.value)
|
|
|
|
|
// 计算表尾数据
|
|
|
|
|
const footList: string[][] = [[]]
|
|
|
|
|
for (let i = 0; i < detailColumns.length; i++) {
|
|
|
|
|
if (i === 0) {
|
|
|
|
|
footList[0].push('合计')
|
|
|
|
|
} else if (
|
|
|
|
|
['pkgs', 'storageunitcount', 'minpkgs', 'kgs', 'netweight'].includes(detailColumns[i].field)
|
|
|
|
|
) {
|
|
|
|
|
// return sumNum(data, column.field)
|
|
|
|
|
footList[0].push(sumNum(dataSource.value, detailColumns[i].field))
|
|
|
|
|
} else {
|
|
|
|
|
footList[0].push('')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
footerData.value = footList
|
|
|
|
|
if ($grid) {
|
|
|
|
|
$grid.updateFooter()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|