发票+任务+舱位

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

@ -12,7 +12,7 @@
"serve": "npm run dev",
"dev": "vite",
"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",
"report": "cross-env REPORT=true npm run build",
"type:check": "vue-tsc --noEmit --skipLibCheck",

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

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

@ -4,7 +4,7 @@
* @Date: 2024-05-07 15:19:07
-->
<template>
<div class="fee-statistic">
<div v-if="showType == '1'" class="fee-statistic">
<a-collapse>
<a-collapse-panel>
<template v-slot:header>
@ -67,6 +67,30 @@
</a-collapse-panel>
</a-collapse>
</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>
<script lang="ts" setup>
@ -80,6 +104,11 @@
id: {
type: String,
default: ''
},
//
showType: {
type: [String, Number],
default: '1'
}
})
//
@ -152,6 +181,13 @@
bottom: 0;
background: #ffffff;
z-index: 199;
}
.fee-statistic-approve {
text-align: right;
margin-top: 5px;
margin-block: 50px;
}
.fee-statistic, .fee-statistic-approve {
width: calc(100vw - 260px);
.ant-collapse {
background: #ffffff;

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

@ -18,6 +18,7 @@
:id="details.id"
:details="details"
@broInsert="broReceive"
@refresh="refresh"
@refreshStatic="refreshStatic"
@allBillSubmit="allBillSubmit"
></FeeTable>
@ -33,11 +34,21 @@
:id="details.id"
:details="details"
@broInsert="broPay"
@refresh="refresh"
@refreshStatic="refreshStatic"
@allBillSubmit="allBillSubmit"
></FeeTable>
</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>
</template>
<script lang="ts" setup>
@ -60,6 +71,11 @@
type: [String, Number],
default: '300',
},
//
showType: {
type: [String, Number],
default: '1'
}
})
const data = ref(null)
// data.value = props.details
@ -89,8 +105,7 @@
setTimeout(() => {
ApplyBusinessAudit({ businessId: props.details.id, businessType: 1, taskTypeName: 'BILL_RECV_AUDIT' }).then(res => {
createMessage.success(res.message)
rtb.value.init()
ptb.value.init()
refresh()
}, 1000)
})
}
@ -98,6 +113,11 @@
rtb.value.getUnitList()
ptb.value.getUnitList()
}
//
const refresh = () => {
rtb.value.init()
ptb.value.init()
}
watch(
() => props.details,
(val) => {
@ -115,4 +135,15 @@
border: 1px solid #e8ebed;
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>

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

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

@ -7,7 +7,8 @@ export interface ActionItem extends ButtonProps {
label?: string
color?: 'success' | 'error' | 'warning'
isCustomIcon?: boolean
icon?: string | JSX.Element | VNode
icon?: string
customIcon?: string | JSX.Element | VNode
popConfirm?: PopConfirm
disabled?: 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>
<!-- 费用统计 -->
<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">USD利润<span class="item-val" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}</span></span>
<span class="item">其他利润<span class="item-val"></span></span>
@ -76,7 +76,7 @@
rejectText="驳回"
:approve="approve"
:id="route.query.id"
status="BILL_RECV_AUDIT"
:status="route.query.status || 'edit'"
source="Create"
businessType="1"
>
@ -111,6 +111,8 @@
import { formatTableData } from '/@/hooks/web/common'
import { useMultipleTabStore } from '/@/store/modules/multipleTab'
import { useRoute, useRouter } from 'vue-router'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
const route = useRoute()
const router = useRouter()
const tabStore = useMultipleTabStore()
@ -236,6 +238,7 @@
//
const { fullPath } = route //
tabStore.closeTabByKey(fullPath, router)
go('/taskmanage')
}).catch(() => {
loading.value = false
})
@ -316,6 +319,7 @@
.fee-statistic {
position: fixed;
bottom: 0;
text-align: right;
padding: 5px 20px;
right: 0;
.item {
@ -332,5 +336,8 @@
}
}
}
.approve-fee-statustic {
bottom: 50px;
}
}
</style>

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

@ -32,7 +32,7 @@
class="iconfont icon-fuzhi3"
style="color: #257afa; font-size: 14px; margin-right: 4px; cursor: pointer"
v-if="record.invoiceNumber"
@click="copyHandle(record)"
@click.stop="copyHandle(record)"
></i>
<span>{{ record.invoiceNumber || '' }}</span>
</template>
@ -55,7 +55,7 @@
</a-modal>
</template>
<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 { columns, searchFormSchema } from './columns'
import { GetInvoiceList } from '../../api'

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

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

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

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

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

@ -6,7 +6,7 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
// 下拉框数据接口
import { GetControllerClientList, GetCarrierSelectList, GetSupplierListByCode } from '/@/api/common'
import { GetControllerClientList, GetCarrierSelectList, GetSupplierListByCode, GetClientListByCode } from '/@/api/common'
// 接口
import {
GetCustomerServiceList,
@ -317,6 +317,74 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
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: '场站',
field: 'yard',

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

@ -101,16 +101,17 @@
:source="source"
:status="route.query.status == 'WAIT_SI' ? 'WAIT_SI' : (route.query.status == 'RETURN_CABIN_AUDIT' ? 'RETURN_CABIN_AUDIT' : undefined)"
:id="id"
:loading="loading"
businessType="1"
>
<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 }}
</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 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>
</span>

@ -2893,9 +2893,40 @@ export const otherInfoFormSchema: FormSchema[] = [
if (!e && !obj) {
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',

@ -143,9 +143,12 @@
}
})
emitter.on('customerBack', (v) => {
console.log(v)
if (v.saleOrgIdList && v.saleOrgIdList.length) v['saleOrgId'] = v.saleOrgIdList[0]
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() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
@ -1398,32 +1374,7 @@ function downloadFun() {
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() {
//
@ -1474,117 +1425,7 @@ function SendEmailFun() {
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() {
@ -1611,9 +1452,7 @@ function laraPaperCalc() {
console.log(err)
})
}
function handlePaperCalcCancel() {
this.paperCalcVisible = false
}
function rowClassName(record, index) {
return 'active-row'
}

@ -7861,6 +7861,11 @@
dependencies:
"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":
"integrity" "sha512-7w833BxZmKGLE9HI0aREtNVRVH6WTYUUlWf4qgA5gKNhPQ4F/MRZ14sc0v8eoLORprk9ZTVwYaLwj8N3Zgxwiw=="
"resolved" "https://registry.npmjs.org/numbro/-/numbro-2.1.2.tgz"

Loading…
Cancel
Save