发票+任务+舱位

feature-JimuReport-1106-yjl
sunzehua 4 weeks ago
commit 6d991f0cf6

@ -12,7 +12,7 @@
"serve": "npm run dev", "serve": "npm run dev",
"dev": "vite", "dev": "vite",
"build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts", "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
"build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts", "build:test": "cross-env vite build --mode integration && esno ./build/script/postBuild.ts",
"build:no-cache": "pnpm clean:cache && npm run build", "build:no-cache": "pnpm clean:cache && npm run build",
"report": "cross-env REPORT=true npm run build", "report": "cross-env REPORT=true npm run build",
"type:check": "vue-tsc --noEmit --skipLibCheck", "type:check": "vue-tsc --noEmit --skipLibCheck",

@ -8,6 +8,7 @@
<div> <div>
<a-button <a-button
v-repeat v-repeat
:loading="loading"
v-if="query.source == 'Create' && query.status == status" v-if="query.source == 'Create' && query.status == status"
@click="approveHandle('2')" @click="approveHandle('2')"
danger danger
@ -17,6 +18,7 @@
</a-button> </a-button>
<a-button <a-button
v-repeat v-repeat
:loading="loading"
v-if="query.source == 'Create' && query.status == status" v-if="query.source == 'Create' && query.status == status"
@click="approveHandle('1')" @click="approveHandle('1')"
type="primary" type="primary"
@ -82,6 +84,10 @@
type: String, type: String,
default: 'WAIT_ORDER_AUDIT', default: 'WAIT_ORDER_AUDIT',
}, },
loading: {
type: Boolean,
default: false
}
}) })
const visible = ref(false) const visible = ref(false)
const formSchema = [ const formSchema = [
@ -98,8 +104,8 @@
maxRows: 4, maxRows: 4,
}, },
disTrans: true disTrans: true
}, }
}, }
] ]
const [registerForm, { resetFields, validate }] = useForm({ const [registerForm, { resetFields, validate }] = useForm({
labelWidth: 150, labelWidth: 150,

@ -65,7 +65,7 @@
</a-dropdown> </a-dropdown>
</div> </div>
<div> <div>
<a-button type="link" @click="save"> <a-button type="link" @click="save(false)">
<span class="iconfont icon-icon_baocun"></span> <span class="iconfont icon-icon_baocun"></span>
保存 保存
</a-button> </a-button>
@ -142,21 +142,22 @@
<!-- 申请修改弹窗 --> <!-- 申请修改弹窗 -->
<ApplyModify ref="applyModify" @register="registerModal" @refresh="refresh"></ApplyModify> <ApplyModify ref="applyModify" @register="registerModal" @refresh="refresh"></ApplyModify>
<!-- 申请删除 --> <!-- 申请删除 -->
<!-- 引入弹窗 -->
<a-modal <a-modal
class="ds-modal-small"
v-model:visible="visible" v-model:visible="visible"
v-if="visible" v-if="visible"
title="历史引入" title="申请删除"
width="40%" width="40%"
@ok="handleOk"
> >
<div style="padding: 30px"> <a-form class="ant-form-small" layout="vertical">
<a-form layout="vertical"> <a-form-item label="申请原因">
<a-form-item label="申请原因"> <a-textarea :autoSize="{ minRows: 5 }" v-model:value="remark" />
<a-textarea v-model:value="remark" /> </a-form-item>
</a-form-item> </a-form>
</a-form> <template #footer>
</div> <a-button key="back" @click="visible = false"> </a-button>
<a-button key="submit" type="primary" :loading="loading" @click="handleOk"> </a-button>
</template>
</a-modal> </a-modal>
<!-- 打印组件 --> <!-- 打印组件 -->
<DsPrint <DsPrint
@ -296,25 +297,28 @@
}) })
if (!flag) return createMessage.warning('请勾选要申请删除的费用!') if (!flag) return createMessage.warning('请勾选要申请删除的费用!')
for(let i = 0; i < arr.length; i++) { for(let i = 0; i < arr.length; i++) {
if (arr[i].feeStatus == 0) {
return createMessage.warning('勾选存在已审核通过的费用,无法申请删除!')
}
if (arr[i].debitNo) { if (arr[i].debitNo) {
return createMessage.warning('勾选存在已対帐的费用,无法申请删除!') return createMessage.warning('勾选存在已対帐的费用,无法申请删除!')
} }
if (!isNaN(arr[i].invoiceAmount) && arr[i].invoiceAmount > 0) { if (!isNaN(arr[i].invoiceAmount) && arr[i].invoiceAmount > 0) {
return createMessage.warning('勾选存在已开票的费用,无法申请删除!') return createMessage.warning('勾选存在已开票的费用,无法申请删除!')
} }
if (arr[i].settlementAmount) {
return createMessage.warning('勾选存在已结算的费用,无法申请删除!')
}
} }
visible.value = true visible.value = true
return ids return ids
// ApplyDeletion({ ids }).then(res => {
// if (res.success) {
// return createMessage.warning('!')
// refresh()
// }
// })
} }
const loading = ref(false)
const handleOk = async () => { const handleOk = async () => {
const ids = deleteApply() const ids = deleteApply()
loading.value = true
const res = await ApplyDeletion({ ids, remark: remark.value }) const res = await ApplyDeletion({ ids, remark: remark.value })
loading.value = false
refresh() refresh()
visible.value = false visible.value = false
remark.value = '' remark.value = ''

@ -4,7 +4,7 @@
* @Date: 2024-05-07 15:19:07 * @Date: 2024-05-07 15:19:07
--> -->
<template> <template>
<div class="fee-statistic"> <div v-if="showType == '1'" class="fee-statistic">
<a-collapse> <a-collapse>
<a-collapse-panel> <a-collapse-panel>
<template v-slot:header> <template v-slot:header>
@ -67,6 +67,30 @@
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
</div> </div>
<div v-else class="fee-statistic-approve">
<p>
<span class="container">
<span class="title">RMB利润: </span>
<span class="count" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY || 0 }}</span>
</span>
<span class="container">
<span class="title">USD利润: </span>
<span class="count" :class="{ warnText: statisticData.profitUSD < 0 }">${{ statisticData.profitUSD || 0 }}</span>
</span>
<span class="container">
<span class="title">合计应收: </span>
<span class="count" :class="{ warnText: statisticData.receivableTotal < 0 }">{{ statisticData.receivableTotal || 0 }}</span>
</span>
<span class="container">
<span class="title">合计利润: </span>
<span class="count" :class="{ warnText: statisticData.profitTotal < 0 }">{{ statisticData.profitTotal || 0 }}</span>
</span>
<span class="container">
<span class="title">利润率: </span>
<span class="count" :class="{ warnText: statisticData.profitMargin < 0 }">{{ statisticData.profitMargin || '0%' }}</span>
</span>
</p>
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -80,6 +104,11 @@
id: { id: {
type: String, type: String,
default: '' default: ''
},
//
showType: {
type: [String, Number],
default: '1'
} }
}) })
// //
@ -152,6 +181,13 @@
bottom: 0; bottom: 0;
background: #ffffff; background: #ffffff;
z-index: 199; z-index: 199;
}
.fee-statistic-approve {
text-align: right;
margin-top: 5px;
margin-block: 50px;
}
.fee-statistic, .fee-statistic-approve {
width: calc(100vw - 260px); width: calc(100vw - 260px);
.ant-collapse { .ant-collapse {
background: #ffffff; background: #ffffff;

@ -20,7 +20,7 @@
@save="save" @save="save"
@delete="deleteRow" @delete="deleteRow"
@cancel="cancelEdit" @cancel="cancelEdit"
@refresh="init" @refresh="refresh"
@history="history" @history="history"
@selectInsert="selectInsert" @selectInsert="selectInsert"
@revoke="revoke" @revoke="revoke"
@ -111,7 +111,7 @@
default: true default: true
} }
}) })
const emits = defineEmits(['broInsert', 'refreshStatic', 'allBillSubmit']) const emits = defineEmits(['broInsert', 'refreshStatic', 'allBillSubmit', 'refresh'])
// //
const feeDict = ref([]) const feeDict = ref([])
// //
@ -877,6 +877,10 @@
// }) // })
// } // }
} }
//
const refresh = () => {
emits('refresh')
}
// //
const revoke = (ids) => { const revoke = (ids) => {
loading.value = true loading.value = true

@ -18,6 +18,7 @@
:id="details.id" :id="details.id"
:details="details" :details="details"
@broInsert="broReceive" @broInsert="broReceive"
@refresh="refresh"
@refreshStatic="refreshStatic" @refreshStatic="refreshStatic"
@allBillSubmit="allBillSubmit" @allBillSubmit="allBillSubmit"
></FeeTable> ></FeeTable>
@ -33,11 +34,21 @@
:id="details.id" :id="details.id"
:details="details" :details="details"
@broInsert="broPay" @broInsert="broPay"
@refresh="refresh"
@refreshStatic="refreshStatic" @refreshStatic="refreshStatic"
@allBillSubmit="allBillSubmit" @allBillSubmit="allBillSubmit"
></FeeTable> ></FeeTable>
</div> </div>
<FeeStatistic ref="fees" :id="data.id" /> <FeeStatistic :showType="showType" ref="fees" :id="data.id" />
<div v-if="showType == '2'" class="fee-approve-btn">
<a-button
v-repeat
@click="allBillSubmit"
type="primary"
>
</a-button>
</div>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -60,6 +71,11 @@
type: [String, Number], type: [String, Number],
default: '300', default: '300',
}, },
//
showType: {
type: [String, Number],
default: '1'
}
}) })
const data = ref(null) const data = ref(null)
// data.value = props.details // data.value = props.details
@ -89,8 +105,7 @@
setTimeout(() => { setTimeout(() => {
ApplyBusinessAudit({ businessId: props.details.id, businessType: 1, taskTypeName: 'BILL_RECV_AUDIT' }).then(res => { ApplyBusinessAudit({ businessId: props.details.id, businessType: 1, taskTypeName: 'BILL_RECV_AUDIT' }).then(res => {
createMessage.success(res.message) createMessage.success(res.message)
rtb.value.init() refresh()
ptb.value.init()
}, 1000) }, 1000)
}) })
} }
@ -98,6 +113,11 @@
rtb.value.getUnitList() rtb.value.getUnitList()
ptb.value.getUnitList() ptb.value.getUnitList()
} }
//
const refresh = () => {
rtb.value.init()
ptb.value.init()
}
watch( watch(
() => props.details, () => props.details,
(val) => { (val) => {
@ -115,4 +135,15 @@
border: 1px solid #e8ebed; border: 1px solid #e8ebed;
padding: 0 20px 20px; padding: 0 20px 20px;
} }
.fee-approve-btn {
position: fixed;
z-index: 11;
bottom: 0;
background-color: #ffffff;
padding: 8px 20px;
right: 0;
left: 0;
text-align: right;
border-top: 1px solid #d9d9d9;
}
</style> </style>

@ -2,11 +2,9 @@
<renderComponent /> <renderComponent />
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { VNode } from 'vue' const props = defineProps({
renderProp: [String, Object],
const props = defineProps<{ })
renderProp: VNode
}>()
const renderComponent = { const renderComponent = {
render: () => { render: () => {
return props.renderProp return props.renderProp

@ -3,7 +3,7 @@
<template v-for="(action, index) in getActions" :key="`${index}-${action.label}`"> <template v-for="(action, index) in getActions" :key="`${index}-${action.label}`">
<Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)"> <Tooltip v-if="action.tooltip" v-bind="getTooltip(action.tooltip)">
<PopConfirmButton v-bind="action"> <PopConfirmButton v-bind="action">
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.icon" /> <RenderComponent v-if="action.isCustomIcon" :renderProp="action.customIcon" />
<template v-else> <template v-else>
<Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" /> <Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" />
<template v-if="action.label">{{ action.label }}</template> <template v-if="action.label">{{ action.label }}</template>
@ -11,7 +11,7 @@
</PopConfirmButton> </PopConfirmButton>
</Tooltip> </Tooltip>
<PopConfirmButton v-else v-bind="action"> <PopConfirmButton v-else v-bind="action">
<RenderComponent v-if="action.isCustomIcon" :renderProp="action.icon" /> <RenderComponent v-if="action.isCustomIcon" :renderProp="action.customIcon" />
<template v-else> <template v-else>
<Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" /> <Icon v-if="action.icon" :icon="action.icon" :class="{ 'mr-1': !!action.label }" />
<template v-if="action.label">{{ action.label }}</template> <template v-if="action.label">{{ action.label }}</template>

@ -7,7 +7,8 @@ export interface ActionItem extends ButtonProps {
label?: string label?: string
color?: 'success' | 'error' | 'warning' color?: 'success' | 'error' | 'warning'
isCustomIcon?: boolean isCustomIcon?: boolean
icon?: string | JSX.Element | VNode icon?: string
customIcon?: string | JSX.Element | VNode
popConfirm?: PopConfirm popConfirm?: PopConfirm
disabled?: boolean disabled?: boolean
divider?: boolean divider?: boolean

@ -0,0 +1,41 @@
<template>
<costEntry
ref="costManage"
:height="300"
:details="bookingDetails"
type="1"
showType="2"
style="margin-bottom: 20px;"
>
</costEntry>
</template>
<script lang="ts" setup>
//
import { ref } from 'vue';
import { BookingOrderGet } from '/@/views/operation/seaexport/api/BookingLedger'
import costEntry from '/@/components/CostEntry/index.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const query = route.query
const loading = ref(false)
const bookingDetails = ref([])
const init = () => {
BookingOrderGet({
id: query.id,
})
.then(async (res) => {
loading.value = false
if (!res.data.ctnPriceInfo.length) {
res.data.ctnPriceInfo = [{}]
}
bookingDetails.value = res.data
loading.value = false
})
.catch(() => {
loading.value = false
})
}
init()
</script>

@ -64,7 +64,7 @@
<!-- 费用组件 --> <!-- 费用组件 -->
<FeeTable ref="mainFeeTable" :status="status"></FeeTable> <FeeTable ref="mainFeeTable" :status="status"></FeeTable>
<!-- 费用统计 --> <!-- 费用统计 -->
<div class="fee-statistic"> <div class="fee-statistic" :class="{'approve-fee-statustic': status == 'BILL_RECV_AUDIT' || status == 'BILL_PAY_AUDIT'}">
<span class="item">RMB利润<span class="item-val" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY }}</span></span> <span class="item">RMB利润<span class="item-val" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY }}</span></span>
<span class="item">USD利润<span class="item-val" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}</span></span> <span class="item">USD利润<span class="item-val" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}</span></span>
<span class="item">其他利润<span class="item-val"></span></span> <span class="item">其他利润<span class="item-val"></span></span>
@ -76,7 +76,7 @@
rejectText="驳回" rejectText="驳回"
:approve="approve" :approve="approve"
:id="route.query.id" :id="route.query.id"
status="BILL_RECV_AUDIT" :status="route.query.status || 'edit'"
source="Create" source="Create"
businessType="1" businessType="1"
> >
@ -111,6 +111,8 @@
import { formatTableData } from '/@/hooks/web/common' import { formatTableData } from '/@/hooks/web/common'
import { useMultipleTabStore } from '/@/store/modules/multipleTab' import { useMultipleTabStore } from '/@/store/modules/multipleTab'
import { useRoute, useRouter } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const tabStore = useMultipleTabStore() const tabStore = useMultipleTabStore()
@ -236,6 +238,7 @@
// //
const { fullPath } = route // const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router) tabStore.closeTabByKey(fullPath, router)
go('/taskmanage')
}).catch(() => { }).catch(() => {
loading.value = false loading.value = false
}) })
@ -316,6 +319,7 @@
.fee-statistic { .fee-statistic {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
text-align: right;
padding: 5px 20px; padding: 5px 20px;
right: 0; right: 0;
.item { .item {
@ -332,5 +336,8 @@
} }
} }
} }
.approve-fee-statustic {
bottom: 50px;
}
} }
</style> </style>

@ -49,7 +49,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, onMounted } from 'vue' import { ref, onMounted, h } from 'vue'
import type { BankItem } from './columns' import type { BankItem } from './columns'
import { columns, searchFormSchema, bankNoFormat } from './columns' import { columns, searchFormSchema, bankNoFormat } from './columns'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table' import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
@ -125,12 +125,11 @@
const getActionOptList = (record): ActionItem[] => { const getActionOptList = (record): ActionItem[] => {
return [ return [
{ {
/* icon: h('i', { customIcon: h('i', {
class: 'iconfont icon-xiazai', class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' }, style: { color: '#257afa', fontSize: '14px' },
}), }),
isCustomIcon: true, */ isCustomIcon: true,
icon: 'ant-design:cloud-download-outlined',
tooltip: '下载', tooltip: '下载',
onClick: handleDownload.bind(null, record), onClick: handleDownload.bind(null, record),
}, },

@ -32,7 +32,7 @@
class="iconfont icon-fuzhi3" class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer" style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber" v-if="record.invoiceNumber"
@click="copyHandle(record)" @click.stop="copyHandle(record)"
></i> ></i>
<span>{{ record.invoiceNumber || '' }}</span> <span>{{ record.invoiceNumber || '' }}</span>
</template> </template>
@ -55,7 +55,7 @@
</a-modal> </a-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, defineEmits, computed, watch } from 'vue' import { ref, defineEmits, computed, watch, unref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { GetInvoiceList } from '../../api' import { GetInvoiceList } from '../../api'

@ -56,7 +56,7 @@
class="iconfont icon-fuzhi3" class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer" style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber" v-if="record.invoiceNumber"
@click="copyHandle(record)" @click.stop="copyHandle(record)"
></i> ></i>
<span>{{ record.invoiceNumber || '' }}</span> <span>{{ record.invoiceNumber || '' }}</span>
</template> </template>
@ -98,7 +98,7 @@
</a-spin> </a-spin>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed } from 'vue' import { ref, computed, unref } from 'vue'
import { Divider } from 'ant-design-vue' import { Divider } from 'ant-design-vue'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table' import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import SearchTable from './components/SearchTable.vue' import SearchTable from './components/SearchTable.vue'

@ -32,13 +32,13 @@
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
<TableAction :actions="getActionOptList(record)" /> <TableAction :actions="getActionOptList(record)" />
</template> </template>
<template v-if="column.dataIndex == 'invoiceNumber'"> <template v-if="column.dataIndex == 'reimbursementId'">
<span>{{ record.invoiceNumber || '' }}</span> <span>{{ record.reimbursementId || '' }}</span>
<i <i
class="iconfont icon-fuzhi3" class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-left: 4px; cursor: pointer" style="color: #257afa; font-size: 14px; margin-left: 4px; cursor: pointer"
v-if="record.invoiceNumber" v-if="record.reimbursementId"
@click="copyHandle(record)" @click.stop="copyHandle(record)"
></i> ></i>
</template> </template>
<template v-if="column.dataIndex == 'reimbursementType'"> <template v-if="column.dataIndex == 'reimbursementType'">
@ -56,6 +56,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { unref, h } from 'vue'
import { ReimbursementGetList, ReimbursementDelete } from './api.js' import { ReimbursementGetList, ReimbursementDelete } from './api.js'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table' import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
@ -121,14 +122,12 @@
const canEditable = [0, 2, 4].includes(record.reimbursementType) const canEditable = [0, 2, 4].includes(record.reimbursementType)
return [ return [
{ {
icon: canEditable ? 'clarity:note-edit-line' : 'ant-design:file-text-outlined', customIcon: h('i', {
/* icon: canEditable class: 'iconfont icon-chakan',
? 'clarity:note-edit-line' style: { color: '#257afa', fontSize: '16px' },
: h('i', { }),
class: 'iconfont icon-chakan', icon: 'clarity:note-edit-line',
style: { color: '#257afa', fontSize: '16px' }, isCustomIcon: !canEditable,
}), */
// isCustomIcon: !canEditable,
tooltip: canEditable ? '编辑' : '查看', tooltip: canEditable ? '编辑' : '查看',
onClick: GoDetailed.bind(null, record), onClick: GoDetailed.bind(null, record),
}, },
@ -158,8 +157,8 @@
}) })
} }
const copyHandle = (row: BillItem) => { const copyHandle = (row: BillItem) => {
const { clipboardRef, isSuccessRef } = useCopyToClipboard(row.invoiceNumber) const { clipboardRef, isSuccessRef } = useCopyToClipboard(row.reimbursementId)
clipboardRef.value = row.invoiceNumber clipboardRef.value = row.reimbursementId
if (unref(isSuccessRef)) { if (unref(isSuccessRef)) {
createMessage.success('复制成功!') createMessage.success('复制成功!')
} }

@ -51,7 +51,7 @@
class="iconfont icon-fuzhi3" class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer" style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber" v-if="record.invoiceNumber"
@click="copyHandle(record)" @click.stop="copyHandle(record)"
></i> ></i>
<span>{{ record.invoiceNumber || '' }}</span> <span>{{ record.invoiceNumber || '' }}</span>
</template> </template>
@ -62,7 +62,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref, unref } from 'vue'
import { SvgIcon } from '/@/components/Icon' import { SvgIcon } from '/@/components/Icon'
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { GetInfo } from '../api' import { GetInfo } from '../api'

@ -29,7 +29,7 @@
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { onMounted } from 'vue' import { onMounted, unref, h } from 'vue'
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table' import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'
import { GetList } from './api' import { GetList } from './api'
import { formatParams } from '/@/hooks/web/common' import { formatParams } from '/@/hooks/web/common'
@ -90,22 +90,20 @@
const getActionOptList = (record): ActionItem[] => { const getActionOptList = (record): ActionItem[] => {
return [ return [
{ {
icon: 'ant-design:file-text-outlined', customIcon: h('i', {
/* icon: h('i', {
class: 'iconfont icon-chakan', class: 'iconfont icon-chakan',
style: { color: '#257afa', fontSize: '16px' }, style: { color: '#257afa', fontSize: '16px' },
}), }),
isCustomIcon: true, */ isCustomIcon: true,
tooltip: '明细', tooltip: '明细',
onClick: handleDetails.bind(null, record), onClick: handleDetails.bind(null, record),
}, },
{ {
icon: 'ant-design:cloud-download-outlined', customIcon: h('i', {
/* icon: h('i', {
class: 'iconfont icon-xiazai', class: 'iconfont icon-xiazai',
style: { color: '#257afa', fontSize: '14px' }, style: { color: '#257afa', fontSize: '14px' },
}), }),
isCustomIcon: true, */ isCustomIcon: true,
tooltip: '下载', tooltip: '下载',
onClick: handleDownload.bind(null, record), onClick: handleDownload.bind(null, record),
}, },

@ -102,8 +102,8 @@
return false return false
} }
for(let i = 0; i < select.length; i++) { for(let i = 0; i < select.length; i++) {
if (select[i].status !== 0) { if (!(select[i].status == 0 || select[i].status == 3)) {
return createMessage.warning('仅允许未提交状态的数据进行提交审核!') return createMessage.warning('仅允许未提交或驳回状态的数据进行提交审核!')
} }
} }
const ids = select.map((item) => { const ids = select.map((item) => {

@ -6,7 +6,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
// 下拉框数据接口 // 下拉框数据接口
import { GetControllerClientList, GetCarrierSelectList, GetSupplierListByCode } from '/@/api/common' import { GetControllerClientList, GetCarrierSelectList, GetSupplierListByCode, GetClientListByCode } from '/@/api/common'
// 接口 // 接口
import { import {
GetCustomerServiceList, GetCustomerServiceList,
@ -317,6 +317,74 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input', component: 'Input',
colProps: { span: 4 } colProps: { span: 4 }
}, },
{
label: '订舱口',
field: 'forwarderId',
component: 'ApiSelect',
defaultValue: null,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetSupplierListByCode,
params: { code: 'booking' },
labelField: 'pinYinCode',
valueField: 'forwarderId',
showName: 'description',
resultField: 'data',
immediate: false
}
}
},
{
label: '国内发货人',
field: 'shipperCnId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientListByCode,
params: { code: 'shippercn' },
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'description',
resultField: 'data',
immediate: false
}
}
},
{
label: '是否有分单',
field: 'shipperCnId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 4 },
componentProps: () => {
return {
options: [
{ label: '全部', value: null },
{ label: '是', value: 'fd' },
{ label: '否', value: 'zd' }
]
}
}
},
{
label: '是否线上',
field: 'bookingType',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: [
{ label: '全部', value: null },
{ label: '是', value: 'xs' },
{ label: '否', value: 'xx' }
]
}
},
{ {
label: '场站', label: '场站',
field: 'yard', field: 'yard',

@ -1,6 +1,6 @@
import { FormSchema, BasicColumn } from '/@/components/Table' import { FormSchema, BasicColumn } from '/@/components/Table'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { GetClientListByCode, GetSupplierListByCode } from '/@/api/common' import { GetClientListByCode, GetSupplierListByCode, GetControllerClientList } from '/@/api/common'
import { import {
GetOrderContactListByClientId, GetOrderContactListByClientId,
GetShippingBillTemplateSelectList, GetShippingBillTemplateSelectList,
@ -989,21 +989,21 @@ export const formSchema5: FormSchema[] = [
colProps: { span: 5 }, colProps: { span: 5 },
}, },
{ {
field: 'shipperCnId', field: 'blConfirmationId',
label: '', label: '',
component: 'Input', component: 'Input',
show: false, show: false,
}, },
{ {
label: '提单确认', label: '提单确认',
field: 'shipperCn', field: 'blConfirmationName',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: ({ formModel }) => { componentProps: ({ formModel }) => {
return { return {
api: GetClientListByCode, api: GetControllerClientList,
params: { code: 'shippercn' }, params: { code: 'shippercn' },
labelField: 'pinYinCode', labelField: 'pinYinCode',
valueField: 'shortName', valueField: 'shortName',
@ -1012,7 +1012,7 @@ export const formSchema5: FormSchema[] = [
immediate: false, immediate: false,
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
formModel.shipperCnId = obj.id formModel.blConfirmationId = obj.id
GetOrderContactListByClientId({ id: obj.id }).then((res) => { GetOrderContactListByClientId({ id: obj.id }).then((res) => {
personList.value = res.data.map((item) => { personList.value = res.data.map((item) => {
return { return {
@ -1026,7 +1026,7 @@ export const formSchema5: FormSchema[] = [
}) })
} }
if (!e && !obj) { if (!e && !obj) {
formModel.shipperCnId = null formModel.blConfirmationId = null
} }
} }
} }

@ -101,16 +101,17 @@
:source="source" :source="source"
:status="route.query.status == 'WAIT_SI' ? 'WAIT_SI' : (route.query.status == 'RETURN_CABIN_AUDIT' ? 'RETURN_CABIN_AUDIT' : undefined)" :status="route.query.status == 'WAIT_SI' ? 'WAIT_SI' : (route.query.status == 'RETURN_CABIN_AUDIT' ? 'RETURN_CABIN_AUDIT' : undefined)"
:id="id" :id="id"
:loading="loading"
businessType="1" businessType="1"
> >
<span> <span>
<a-button class="ml10" v-repeat v-if="refreshFlag && route.query.status != 'RETURN_CABIN_POOL' && route.query.status != 'WAIT_ORDER_AUDIT' && route.query.status != 'RETURN_CABIN_AUDIT' && route.query.source != 'Complete'" @click="save(true)" type="primary"> <a-button class="ml10" :loading="loading" v-repeat v-if="refreshFlag && route.query.status != 'RETURN_CABIN_POOL' && route.query.status != 'WAIT_ORDER_AUDIT' && route.query.status != 'RETURN_CABIN_AUDIT' && route.query.source != 'Complete'" @click="save(true)" type="primary">
{{ completeText }} {{ completeText }}
</a-button> </a-button>
<a-button class="ml10" v-repeat v-if="route.query.status == 'RETURN_CABIN_POOL' && route.query.source != 'Complete'" @click="save('cjtc')" type="primary"> <a-button class="ml10" :loading="loading" v-repeat v-if="route.query.status == 'RETURN_CABIN_POOL' && route.query.source != 'Complete'" @click="save('cjtc')" type="primary">
直接退舱 直接退舱
</a-button> </a-button>
<a-button class="ml10" v-repeat v-if="route.query.status == 'RETURN_CABIN_POOL' && route.query.source != 'Complete'" @click="save('ctrc')" type="primary"> <a-button class="ml10" :loading="loading" v-repeat v-if="route.query.status == 'RETURN_CABIN_POOL' && route.query.source != 'Complete'" @click="save('ctrc')" type="primary">
转舱位池 转舱位池
</a-button> </a-button>
</span> </span>

@ -2893,9 +2893,40 @@ export const otherInfoFormSchema: FormSchema[] = [
if (!e && !obj) { if (!e && !obj) {
formModel.customserId = '' formModel.customserId = ''
} }
}, }
} }
}, }
},
{
label: '',
field: 'blConfirmationId',
component: 'Input',
show: false,
},
{
label: '提单确认方',
field: 'blConfirmationName',
component: 'ApiSelect',
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
api: GetControllerClientList,
labelField: 'pinYinCode',
valueField: 'shortName',
showName: 'description',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.customerId = obj.id
}
if (!e && !obj) {
formModel.customerId = ''
}
}
}
}
}, },
{ {
field: 'termDeliveryCode', field: 'termDeliveryCode',

@ -143,9 +143,12 @@
} }
}) })
emitter.on('customerBack', (v) => { emitter.on('customerBack', (v) => {
console.log(v)
if (v.saleOrgIdList && v.saleOrgIdList.length) v['saleOrgId'] = v.saleOrgIdList[0] if (v.saleOrgIdList && v.saleOrgIdList.length) v['saleOrgId'] = v.saleOrgIdList[0]
setFieldsValue({ setFieldsValue({
...v ...v,
blConfirmationId: v.id,
blConfirmationName: v.showName
}) })
}) })
// //

@ -1335,31 +1335,7 @@ function removeFun() {
} }
}) })
} }
//
function submitFun() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
createMessage.error('请选择数据')
return false
}
CompleteTask(pkIdArr)
.then((res) => {
if (res.succeeded) {
createMessage.success('已完成任务')
bcFileFlag.value = true
bcFile.value = res.data
reload()
} else {
createMessage.error(res.message)
}
})
.catch((err) => {
console.log(err)
})
}
function handlePull() { function handlePull() {
const select = getSelectRows() const select = getSelectRows()
const pkIdArr = select.map((item, index) => { const pkIdArr = select.map((item, index) => {
@ -1398,32 +1374,7 @@ function downloadFun() {
this.downloadTaskAttach(item, name) this.downloadTaskAttach(item, name)
}) })
} }
function downloadTaskAttach(id, name) {
DownloadTaskAttach({
taskPKId: id,
})
.then((res) => {
if (res.message) {
// this.showdownLoadErr = true
this.downLoadErrTip = `${name}下载失败:${res.message}`
message.error(`${name}下载失败:${res.message}`, 0)
return false
}
const blob = new Blob([res], { type: `application/pdf;chartset=UTF-8` })
const link = document.createElement('a')
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
link.download = name
document.body.appendChild(link)
link.click()
URL.revokeObjectURL(link.href) // URL
document.body.removeChild(link)
})
.catch((err) => {
console.log(err)
})
}
// //
function reComparisonFun() { function reComparisonFun() {
// //
@ -1474,117 +1425,7 @@ function SendEmailFun() {
this.sendEmailVisible = true this.sendEmailVisible = true
} }
//
function FnCilckTemplateType(templateId) {
createMessage.success(`搜索文件中...`)
const printType = this.PrintType == 4 ? 20 : 10
TaskManageTruckGetInfoByTaskId({ taskPkId: this.pkIdArr[0] })
.then((res) => {
if (res.data.succ) {
TaskManageTruckPrint({
taskPKId: res.data.ext.id,
templateId,
cateCode: 'truckBill',
type: this.PrintType,
printType,
}).then((res) => {
if (!res.succeeded) {
createMessage.error(res.message)
} else {
// createMessage.success(res.data)
if (this.PrintType == 1) {
window.open(
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/ViewPrintPdf/${res.data}`,
'_blank',
)
} else {
window.open(
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
'_blank',
)
}
}
})
} else {
createMessage.error(`${res.data.msg}`)
}
this.confirmLoading = false
})
.catch(() => {
this.confirmLoading = false
})
}
function GetPrintData(cateCode, printType) {
const Data = {
cateCode,
printType,
}
this.spinning = true
TaskManageTruckPrintTemplateWithHistoryList(Data).then((res) => {
console.log(res.data)
if (res.data.length == 1) {
this.FnCilckTemplateType(res.data[0].id)
} else {
this.templateType = res.data
this.spinning = false
this.PrintModalVisible = true
}
})
}
function FnPrint() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length != 1) {
createMessage.error('请仅选择一条数据')
return false
}
this.pkIdArr = pkIdArr
let printType = ''
if (this.PrintType == 4) {
printType = 20
} else {
printType = 10
}
this.PrintType = '1'
this.GetPrintData('truckBill', printType)
}
function FnSendCar() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
createMessage.error('请选择数据')
return false
}
TaskManageTruckSendDispatchBatchByTask(pkIdArr).then((res) => {
if (res.data.succ) {
createMessage.success('派车成功')
} else {
createMessage.error(`派车失败,${res.data.msg}`)
}
})
}
function CancelSendCar() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
createMessage.error('请选择数据')
return false
}
TaskManageTruckCancelDispatchBatchByTask(pkIdArr).then((res) => {
if (res.data.succ) {
createMessage.success('取消派车成功')
} else {
createMessage.error(`取消派车失败,${res.data.msg}`)
}
})
}
// //
function laraPaperCalc() { function laraPaperCalc() {
@ -1611,9 +1452,7 @@ function laraPaperCalc() {
console.log(err) console.log(err)
}) })
} }
function handlePaperCalcCancel() {
this.paperCalcVisible = false
}
function rowClassName(record, index) { function rowClassName(record, index) {
return 'active-row' return 'active-row'
} }

@ -7861,6 +7861,11 @@
dependencies: dependencies:
"boolbase" "^1.0.0" "boolbase" "^1.0.0"
"number-precision@^1.6.0":
"integrity" "sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
"resolved" "https://registry.npmjs.org/number-precision/-/number-precision-1.6.0.tgz"
"version" "1.6.0"
"numbro@2.1.2": "numbro@2.1.2":
"integrity" "sha512-7w833BxZmKGLE9HI0aREtNVRVH6WTYUUlWf4qgA5gKNhPQ4F/MRZ14sc0v8eoLORprk9ZTVwYaLwj8N3Zgxwiw==" "integrity" "sha512-7w833BxZmKGLE9HI0aREtNVRVH6WTYUUlWf4qgA5gKNhPQ4F/MRZ14sc0v8eoLORprk9ZTVwYaLwj8N3Zgxwiw=="
"resolved" "https://registry.npmjs.org/numbro/-/numbro-2.1.2.tgz" "resolved" "https://registry.npmjs.org/numbro/-/numbro-2.1.2.tgz"

Loading…
Cancel
Save