lijingjia 4 months ago
commit 35f62fc3cb

@ -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>{{ nexttext ? nexttext : '上一票' }}</dd> <dd>{{ 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>{{ lasttext ? lasttext : '下一票' }}</dd> <dd>{{ 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>
@ -106,12 +106,12 @@
// //
lasttext: { lasttext: {
type: String, type: String,
default: null, default: '下一票',
}, },
// //
nexttext: { nexttext: {
type: String, type: String,
default: null, default: '上一票',
}, },
}, },
emits: ['copy'], emits: ['copy'],
@ -156,17 +156,10 @@
} }
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: {
id id,
}, },
}) })
closePage(route.path + '?id=' + id) closePage(route.path + '?id=' + id)

@ -1,118 +0,0 @@
<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>

@ -23,30 +23,20 @@
</template> </template>
</BasicTable> </BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" /> <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> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref } from 'vue'
import { checkPermissions } from '/@/hooks/Permissions/index' import { checkPermissions } from '/@/hooks/Permissions/index'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table' import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import ImportFlow from './importFlow.vue'
import { ApiList, ApiImport, ApiDel } from './api' import { ApiList, ApiDel } from './api'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue' import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
const visible = ref<boolean>(false)
const refImportFlow = ref()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getSelectRows }] = useTable({ const [registerTable, { reload, getForm, getSelectRows }] = useTable({
title: '集装箱信息列表', title: '集装箱信息列表',
@ -118,29 +108,7 @@
isUpdate: 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) { function handleAudit(record: Recordable) {
if (!checkPermissions('op:ctn:edit')) { if (!checkPermissions('op:ctn:edit')) {
openModal(true, { openModal(true, {

@ -1,12 +1,4 @@
<template> <template>
<!-- <BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="70%"
@register="registerModal"
@ok="handleSave"
> -->
<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 <ActionBar
@ -16,6 +8,10 @@
lasttext="下一条" lasttext="下一条"
nexttext="上一条" nexttext="上一条"
></ActionBar> ></ActionBar>
<!-- 合同管理 -->
<!-- <a-tab-pane key="6" tab="合同管理">
<Menus4 :client-id="clientId" class="RUnit" />
</a-tab-pane> -->
<!-- 基本信息 --> <!-- 基本信息 -->
<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>
@ -95,23 +91,19 @@
<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" />
</a-tab-pane> </a-tab-pane>
<!-- 收发货人信息维护 -->
<a-tab-pane key="5" tab="收发货人信息维护"> <a-tab-pane key="5" tab="收发货人信息维护">
<!-- 收发货人信息维护 -->
<Menus3 :client-id="clientId" class="RUnit" /> <Menus3 :client-id="clientId" class="RUnit" />
</a-tab-pane> </a-tab-pane>
<!-- 合同管理 --> <!-- 合同管理 -->
<!-- <a-tab-pane key="6" tab="合同管理">
<Menus4 :client-id="clientId" class="RUnit" />
</a-tab-pane> -->
<a-tab-pane key="7" tab="固定费用"> <a-tab-pane key="7" tab="固定费用">
<!-- 合同管理 -->
<CustTemplateDetail :client-id="clientId" :customer-name="customerName" class="RUnit" /> <CustTemplateDetail :client-id="clientId" :customer-name="customerName" class="RUnit" />
</a-tab-pane> </a-tab-pane>
<!-- 客户参数表格 --> <!-- 客户参数表格 -->
@ -123,37 +115,8 @@
<!-- 图片管理 --> <!-- 图片管理 -->
<!-- <Menus5 v-show="selectedKeys[0] == 'menu5'" class="RUnit" /> --> <!-- <Menus5 v-show="selectedKeys[0] == 'menu5'" class="RUnit" /> -->
</div> </div>
<!--右下角按钮-->
<!-- <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> -->
<ClientAccountDateModal @register="CADModal" @success="handleSuccess" /> <ClientAccountDateModal @register="CADModal" @success="handleSuccess" />
</div> </div>
<!-- </BasicModal> -->
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref, watch, onMounted, watchEffect } from 'vue' import { ref, computed, unref, watch, onMounted, watchEffect } from 'vue'
@ -225,7 +188,7 @@
schemas: formSchema2, schemas: formSchema2,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const dataSource = ref<any>([]) // const dataSource = ref<any>([])
// //
const [registerTable, { reload, setTableData, getPaginationRef, getDataSource, getSelectRows }] = const [registerTable, { reload, setTableData, getPaginationRef, getDataSource, getSelectRows }] =
useTable({ useTable({
@ -261,7 +224,7 @@
showTableSetting: false, showTableSetting: false,
canResize: false, canResize: false,
immediate: false, immediate: false,
dataSource: dataSource.value, // dataSource: dataSource.value,
showIndexColumn: true, showIndexColumn: true,
actionColumn: { actionColumn: {
width: 80, width: 80,

@ -924,10 +924,29 @@
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 = parseInt(totalPkgs.value) + parseInt(item.pkgs) totalPkgs.value = totalPkgs.value
totalKgs.value = parseInt(totalKgs.value) + parseInt(item.kgs) ? parseInt(totalPkgs.value)
totalCbm.value = parseInt(totalCbm.value) + parseInt(item.cbm) : 0 + item.pkgs
totalCtn.value = parseInt(totalCtn.value) + parseInt(item.ctnNum) ? parseInt(item.pkgs)
: 0
totalKgs.value = totalKgs.value
? parseInt(totalKgs.value)
: 0 + item.kgs
? parseInt(item.kgs)
: 0
totalCbm.value = totalCbm.value
? parseInt(totalCbm.value)
: 0 + item.cbm
? parseInt(item.cbm)
: 0
totalCtn.value = totalCtn.value
? parseInt(totalCtn.value)
: 0 + item.ctnNum
? parseInt(item.ctnNum)
: 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
@ -2013,7 +2032,9 @@
if (changes[0][1] === 'pkgs') { if (changes[0][1] === 'pkgs') {
let RData = 0 let RData = 0
list.value.forEach((e) => { list.value.forEach((e) => {
RData = RData + e.pkgs if (e.pkgs) {
RData = RData + parseInt(e.pkgs)
}
}) })
totalPkgs.value = RData totalPkgs.value = RData
@ -2023,7 +2044,9 @@
if (changes[0][1] === 'kgs') { if (changes[0][1] === 'kgs') {
let RData = 0 let RData = 0
list.value.forEach((e) => { list.value.forEach((e) => {
RData = RData + e.kgs if (e.kgs) {
RData = RData + parseInt(e.kgs)
}
}) })
totalKgs.value = RData totalKgs.value = RData
emit('changeTotal', { type: 'totalKgs', val: totalKgs.value }) emit('changeTotal', { type: 'totalKgs', val: totalKgs.value })
@ -2032,7 +2055,9 @@
if (changes[0][1] === 'cbm') { if (changes[0][1] === 'cbm') {
let RData = 0 let RData = 0
list.value.forEach((e) => { list.value.forEach((e) => {
RData = RData + e.cbm if (e.cbm) {
RData = RData + parseInt(e.cbm)
}
}) })
totalCbm.value = RData totalCbm.value = RData
emit('changeTotal', { type: 'totalCbm', val: totalCbm.value }) emit('changeTotal', { type: 'totalCbm', val: totalCbm.value })
@ -2041,7 +2066,9 @@
if (changes[0][1] === 'ctnNum') { if (changes[0][1] === 'ctnNum') {
let RData = 0 let RData = 0
list.value.forEach((e) => { list.value.forEach((e) => {
RData = RData + e.ctnNum if (e.ctnNum) {
RData = RData + parseInt(e.ctnNum)
}
}) })
totalCtn.value = RData totalCtn.value = RData
if (list.value[changes[0][0]]['teu'] && changes[0][3]) { if (list.value[changes[0][0]]['teu'] && changes[0][3]) {

Loading…
Cancel
Save