新建页面

szh-new
lijingjia 6 months ago
parent fe36edebfb
commit 05721f0817

@ -69,13 +69,13 @@
<span class="iconfont icon-xia" :style="{ fontSize: '12px' }"></span>
</a-button>
</a-dropdown>
<a-button type="link">
<a-button @click="openApplyModify" type="link">
申请修改
</a-button>
<a-button type="link">
<a-button type="link" @click="deleteApply">
申请删除
</a-button>
<a-button type="link">
<a-button type="link" @click="cancelApply">
取消申请
</a-button>
<a-dropdown>
@ -103,6 +103,25 @@
<ToFeeTemDrawer ref="toFeeTemDrawer"></ToFeeTemDrawer>
<!-- 流程图 -->
<FlowChart ref="flowChart"></FlowChart>
<!-- 申请修改弹窗 -->
<ApplyModify ref="applyModify" @register="registerModal" @refresh="refresh"></ApplyModify>
<!-- 申请删除 -->
<!-- 引入弹窗 -->
<a-modal
v-model:visible="visible"
v-if="visible"
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-modal>
</div>
</template>
<script lang="ts" setup>
@ -112,6 +131,10 @@
import FeeTemDrawer from './components/feeTemDrawer.vue'
import ToFeeTemDrawer from './components/ToFeeTemDrawer.vue'
import FlowChart from '../FlowChart/index.vue'
import ApplyModify from './components/applyModify.vue'
import { ApplyDeletion } from './api'
import { useModal } from '/@/components/Modal'
const [registerModal, { openModal }] = useModal()
const { createMessage } = useMessage()
const emits = defineEmits(['revoke', 'save', 'delete', 'cancel', 'refresh', 'history', 'selectInsert', 'submit'])
const props = defineProps({
@ -141,7 +164,11 @@
const toFeeTemDrawer = ref(null)
// dom
const flowChart = ref(null)
//
const applyModify = ref(null)
//
const remark = ref()
const visible = ref(false)
const addRow = () => {
const deepCopyRow = JSON.parse(JSON.stringify(props.row))
props.data.push(deepCopyRow)
@ -188,6 +215,63 @@
const cancelDelete = () => {
deleteFlag.value = false
}
//
const deleteApply = () => {
let flag = false
const arr = []
const ids = []
props.data.forEach(item => {
if (item?.selected) {
flag = true
arr.push(item)
ids.push(item.id)
}
})
if (!flag) return createMessage.warning('请勾选要申请删除的费用!')
for(let i = 0; i < arr.length; i++) {
if (arr[i].debitNo) {
return createMessage.warning('勾选存在已対帐的费用,无法申请删除!')
}
if (!isNaN(arr[i].invoiceAmount) && arr[i].invoiceAmount > 0) {
return createMessage.warning('勾选存在已开票的费用,无法申请删除!')
}
}
visible.value = true
return ids
// ApplyDeletion({ ids }).then(res => {
// if (res.success) {
// return createMessage.warning('!')
// refresh()
// }
// })
}
const handleOk = async () => {
const ids = deleteApply()
const res = await ApplyDeletion({ ids, remark: remark.value })
refresh()
visible.value = false
remark.value = ''
if (res.succeeded) {
return createMessage.success('申请成功!')
}
}
//
const cancelApply = () => {
let flag = false
const arr = []
const ids = []
props.data.forEach(item => {
if (item?.selected) {
flag = true
arr.push(item)
ids.push(item.id)
}
})
if (!flag) return createMessage.warning('请勾选要取消申请的费用!')
if (arr.length > 1) return createMessage.warning('仅支持勾选1条费用进行取消申请')
if (!(arr[0].feeStatus == 3 || arr[0].feeStatus == 4)) return createMessage.warning('当前费用状态无法取消申请!')
emits('revoke', ids)
}
//
const save = () => {
let flag = false
@ -203,6 +287,25 @@
}
emits('save')
}
//
const openApplyModify = () => {
let flag = false
const arr = []
props.data.forEach(item => {
if (item?.selected) {
flag = true
arr.push(item)
}
})
if (!flag) return createMessage.warning('请勾选要申请修改的费用!')
if (arr.length > 1) return createMessage.warning('仅支持勾选1条费用进行申请修改')
if (arr[0].feeStatus != 0) return createMessage.warning('仅支持修改费用状态为审核通过的费用!')
if (arr[0].debitNo) return createMessage.warning('当前费用已対帐无法申请修改!')
if (!isNaN(arr[0].invoiceAmount) && arr[0].invoiceAmount > 0) return createMessage.warning('当前费用已开票无法申请修改!')
openModal(true, {
record: arr[0]
})
}
//
const selectInsert = (v) => {
emits('selectInsert', v)
@ -236,7 +339,7 @@
if (!flag) return createMessage.warning('请勾选要查看流程的费用!')
if (arr.length > 1) return createMessage.warning('仅支持勾选1条费用进行查看流程')
if (arr[0].feeStatus == 1) return createMessage.warning('费用录入状态的数据不支持查看流程!')
flowChart.value.init(arr[0].id, 0)
flowChart.value.init(arr[0].id, 0, 1)
}
//
const submitHistory = (v) => {

@ -13,7 +13,9 @@ enum Api {
statistic = '/feeApi/FeeRecord/FeeStatistics',
ReadAsTemplate = '/feeApi/FeeRecord/ReadAsTemplate',
submit = '/feeApi/FeeRecord/ApplyAudit',
Withdraw = '/feeApi/FeeRecord/Withdraw'
Withdraw = '/feeApi/FeeRecord/Withdraw',
ApplyModification = '/feeApi/FeeRecord/ApplyModification',
ApplyDeletion = '/feeApi/FeeRecord/ApplyDeletion'
}
// 列表 (Auth)
export function GetList(data: PageRequest) {
@ -75,3 +77,21 @@ export function Withdraw(data: PageRequest) {
data
})
}
// 申请修改
export function ApplyModification(data: PageRequest) {
return request<DataResult>({
url: Api.ApplyModification,
method: 'post',
data
})
}
// 申请修改
export function ApplyDeletion(data: PageRequest) {
return request<DataResult>({
url: Api.ApplyDeletion,
method: 'post',
data
})
}

@ -0,0 +1,382 @@
import { ref } from 'vue'
import { FormSchema } from '/@/components/Table'
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
// 下拉框数据接口
import { GetFeeCurrencySelectList, GetClientListByCode, GetFeeCodeSelectList } from '/@/api/common'
// 客户类别下拉框数据
const customTypeDict = ref([])
// 往来单位下拉框数据
const companyDict = ref([])
// 引入计费标准字典
import { feeUnitDict } from '/@/hooks/dict/index'
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false
},
{
label: '',
field: 'feeName',
component: 'Input',
defaultValue: '',
show: false
},
{
label: '',
field: 'costomerName',
component: 'Input',
defaultValue: '',
show: false
},
{
label: '',
field: 'customerTypeText',
component: 'Input',
defaultValue: '',
show: false
},
{
label: '',
field: 'unitText',
component: 'Input',
defaultValue: '',
show: false
},
{
field: 'feeCode',
label: '费用名称',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: GetFeeCodeSelectList,
labelField: 'name',
valueField: 'code',
resultField: 'data',
onChange: (v, obj) => {
if (obj) {
formModel['feeName'] = obj.name
}
}
}
}
},
{
field: 'customerType',
label: '客户类别',
defaultValue: '',
component: 'Select',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
getDictOption('djy_cust_prop').then(data => {
customTypeDict.value = data
})
return {
options: customTypeDict.value,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v:string, obj) => {
if (obj) formModel.customerTypeText = obj.name
GetClientListByCode({ code: v }).then(res => {
const { data } = res
data.forEach(item => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
})
}
}
}
},
{
field: 'costomerCode',
label: '结算对象',
defaultValue: '',
component: 'Select',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
options: companyDict.value,
resultField: 'data',
onChange: (v, obj) => {
if (obj) formModel.costomerName = obj.shortName
}
}
}
},
{
field: 'unit',
label: '单位标准',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
api: feeUnitDict,
labelField: 'name',
valueField: 'value',
resultField: 'data',
onChange: (v, obj) => {
if (obj) formModel.unitText = obj.label
}
}
}
},
{
field: 'noTaxPrice',
label: '不含税单价',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
min: 0,
precision: 6,
onChange: (v) => {
// 单价
formModel.unitPrice = (v || 0) * ((formModel.taxRate || 0) / 100 + 1)
// 金额
formModel.amount = (formModel.unitPrice || 0) * (formModel.quantity || 0)
// 不含税金额
formModel.noTaxAmount = (v || 0) * (formModel.quantity || 0)
}
}
}
},
{
field: 'taxRate',
label: '税率',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
min: 0,
precision: 2,
onChange: (v) => {
// 不含税单价
formModel.noTaxPrice = (formModel.unitPrice || 0) / ((v || 0) / 100 + 1)
// 不含税金额
formModel.noTaxAmount = (formModel.noTaxPrice || 0) * (formModel.quantity || 0)
formModel.afterValue = formModel.amount - formModel.amountCopy + formModel.beforeValue
formModel.difference = formModel.afterValue - formModel.beforeValue
}
}
}
},
{
field: 'unitPrice',
label: '单价',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
min: 0,
precision: 6,
onChange: (v) => {
// 不含税单价
formModel.noTaxPrice = (v || 0) / ((formModel.taxRate || 0) / 100 + 1)
// 金额
formModel.amount = (v || 0) * (formModel.quantity || 0)
// 不含税金额
formModel.noTaxAmount = (formModel.noTaxPrice || 0) * (formModel.quantity || 0)
formModel.afterValue = formModel.amount - formModel.amountCopy + formModel.beforeValue
formModel.difference = formModel.afterValue - formModel.beforeValue
}
}
}
},
{
field: 'quantity',
label: '数量',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
min: 0,
precision: 0,
onChange: (v) => {
// 金额
formModel.amount = (v || 0) * (formModel.unitPrice || 0)
// 不含税金额
formModel.noTaxAmount = (v || 0) * (formModel.noTaxPrice || 0)
formModel.afterValue = formModel.amount - formModel.amountCopy + formModel.beforeValue
formModel.difference = formModel.afterValue - formModel.beforeValue
}
}
}
},
{
field: 'noTaxAmount',
label: '不含税金额',
defaultValue: 0,
dynamicDisabled: true,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'amount',
label: '金额',
defaultValue: 0,
dynamicDisabled: true,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
min: 0,
precision: 6,
onChange: (v) => {
formModel.afterValue = v - formModel.amountCopy + formModel.beforeValue
formModel.difference = formModel.afterValue - formModel.beforeValue
}
}
}
},
{
field: 'currency',
label: '币别',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 5 },
componentProps: () => {
return {
api: GetFeeCurrencySelectList,
labelField: 'codeName',
valueField: 'codeName',
resultField: 'data'
}
}
},
{
field: 'exchangeRate',
label: '汇率',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 2
}
},
{
field: 'accTaxAmount',
label: '销项税额',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'accTaxRate',
label: '销项税率',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 2
}
},
{
field: 'reason',
label: '修改原因',
defaultValue: '',
component: 'InputTextArea',
colProps: { span: 5 }
},
{
field: 'isInvoice',
label: '是否开发票',
defaultValue: false,
component: 'RadioGroup',
colProps: { span: 5 },
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false }
]
}
},
{
field: 'isAdvancedPay',
label: '是否垫付',
defaultValue: false,
component: 'RadioGroup',
colProps: { span: 5 },
componentProps: {
options: [
{ label: '是', value: true },
{ label: '否', value: false }
]
}
},
{
field: 'note',
label: '备注',
defaultValue: '',
component: 'InputTextArea',
colProps: { span: 12 }
},
{
field: 'beforeValue',
label: '更改前利润',
defaultValue: 0,
dynamicDisabled: true,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'afterValue',
label: '更改后利润',
defaultValue: 0,
dynamicDisabled: true,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'difference',
label: '利润差额',
dynamicDisabled: true,
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
componentProps: {
min: 0,
precision: 6
}
},
{
field: 'amountCopy',
label: '',
defaultValue: 0,
component: 'InputNumber',
colProps: { span: 5 },
show: false
}
]

@ -0,0 +1,127 @@
<!--
* @Description: 申请修改组件
* @Author: lijj
* @Date: 2024-05-07 15:19:07
-->
<template>
<div>
<!-- 引入弹窗 -->
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
title="费用申请修改"
:form-schema="formSchema"
width="60%"
@register="registerModal"
@ok="handleSave"
@cancel="handleCancel"
>
<div class="ds-apply-modify">
<h3>费用旧值</h3>
<a-form layout="vertical" class="ds-form-detail">
<a-row :gutter="15">
<a-col v-for="item in list" :span="item.span" :key='item.value'>
<a-form-item
:label="item.label"
>
<div>
<span v-if="item.field != 'isAdvancedPay'">
{{ detailData[item.field] || '-' }}
</span>
<span v-else>
{{ detailData[item.field] ? '是' : '否' }}
</span>
</div>
</a-form-item>
</a-col>
</a-row>
</a-form>
<h3>费用新值</h3>
<BasicForm @register="registerForm" />
</div>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { defineEmits, defineProps, ref, reactive, onMounted, defineExpose, watch, q } from 'vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
import { BasicForm, useForm } from '/@/components/Form/index'
//
import { BasicModal, useModalInner } from '/@/components/Modal'
import emitter from '/@/utils/Bus'
import { formSchema } from './applyModify'
import { ApplyModification } from '../api'
const visible = ref(false)
const beforeValue = ref(null)
const emits = defineEmits(['refresh'])
const list = [
{ label: '费用名称', field: 'feeName', span: 5 },
{ label: '费用对象', field: 'customerName', span: 5 },
// { label: '', field: 'customerNo', span: 4, value: '1' },
{ label: '单位标准', field: 'unitText', span: 5 },
{ label: '不含税单价', field: 'noTaxPrice', span: 5 },
{ label: '税率', field: 'taxRate', span: 5 },
{ label: '含税单价', field: 'unitPrice', span: 5 },
{ label: '计费数量', field: 'quantity', span: 5 },
{ label: '不含税金额', field: 'noTaxAmount', span: 5 },
{ label: '含税金额', field: 'amount', span: 5 },
{ label: '币别', field: 'currency', span: 5 },
{ label: '汇率', field: 'exchangeRate', span: 5 },
{ label: '财务税率', field: 'accTaxRate', span: 5 },
{ label: '是否垫付', field: 'isAdvancedPay', span: 5 }
]
const detailData = ref({})
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema, getFieldsValue }] =
useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
detailData.value = JSON.parse(JSON.stringify(data.record))
setFieldsValue({
...data.record,
beforeValue: JSON.parse(JSON.stringify(beforeValue.value)),
afterValue: JSON.parse(JSON.stringify(beforeValue.value)),
amountCopy: JSON.parse(JSON.stringify(data.record.amount)),
difference: 0
})
})
const handleSave = async () => {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
const copy = JSON.parse(JSON.stringify(detailData.value))
const formData = Object.assign(copy, values)
formData.feeRecordId = values.id
formData.id = 0
const res: API.DataResult = await ApplyModification([formData])
setModalProps({ confirmLoading: false, loading: false })
if (res.succeeded) {
createMessage.success(res.message)
emits('refresh')
} else {
createMessage.error(res.message)
}
closeModal()
}
onMounted(() => {
emitter.on('profitCNY', (v) => {
beforeValue.value = v
})
})
const handleCancel = () => {
closeModal()
// visible.value = false
}
</script>
<style lang="scss">
.ds-apply-modify {
padding: 0 20px 0 20px;
h3 {
padding-left: 0;
width: 95%;
}
}
</style>

@ -11,27 +11,27 @@
<p>
<span class="title">利润合计</span>
<span class="title">RMB应收: </span>
<span class="count" :class="{ warnText: data.receivableCNY < 0 }">{{ data.receivableCNY }}</span>
<span class="count" :class="{ warnText: statisticData.receivableCNY < 0 }">{{ statisticData.receivableCNY }}</span>
<span class="title">RMB应付: </span>
<span class="count" :class="{ warnText: data.payableCNY < 0 }">{{ data.payableCNY }}</span>
<span class="count" :class="{ warnText: statisticData.payableCNY < 0 }">{{ statisticData.payableCNY }}</span>
<span class="title">RMB利润: </span>
<span class="count" :class="{ warnText: data.profitCNY < 0 }">{{ data.profitCNY }}</span>
<span class="count" :class="{ warnText: statisticData.profitCNY < 0 }">{{ statisticData.profitCNY }}</span>
<span class="line"></span>
<span class="title">USD应收: </span>
<span class="count" :class="{ warnText: data.receivableUSD < 0 }">{{ data.receivableUSD }}</span>
<span class="count" :class="{ warnText: statisticData.receivableUSD < 0 }">{{ statisticData.receivableUSD }}</span>
<span class="title">USD应付: </span>
<span class="count" :class="{ warnText: data.payableUSD < 0 }">{{ data.payableUSD }}</span>
<span class="count" :class="{ warnText: statisticData.payableUSD < 0 }">{{ statisticData.payableUSD }}</span>
<span class="title">USD利润: </span>
<span class="count" :class="{ warnText: data.profitUSD < 0 }">{{ data.profitUSD }}</span>
<span class="count" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}</span>
<span class="line"></span>
<span class="title">合计应收: </span>
<span class="count" :class="{ warnText: data.receivableTotal < 0 }">{{ data.receivableTotal }}</span>
<span class="count" :class="{ warnText: statisticData.receivableTotal < 0 }">{{ statisticData.receivableTotal }}</span>
<span class="title">合计应付: </span>
<span class="count" :class="{ warnText: data.payableTotal < 0 }">{{ data.payableTotal }}</span>
<span class="count" :class="{ warnText: statisticData.payableTotal < 0 }">{{ statisticData.payableTotal }}</span>
<span class="title">合计利润: </span>
<span class="count" :class="{ warnText: data.profitTotal < 0 }">{{ data.profitTotal }}</span>
<span class="count" :class="{ warnText: statisticData.profitTotal < 0 }">{{ statisticData.profitTotal }}</span>
<span class="title">利润率: </span>
<span class="count" :class="{ warnText: data.profitUSD < 0 }">{{ data.profitUSD }}%</span>
<span class="count" :class="{ warnText: statisticData.profitUSD < 0 }">{{ statisticData.profitUSD }}%</span>
</p>
</template>
<a-tabs v-model:activeKey="activeKey">
@ -54,7 +54,8 @@
<script lang="ts" setup>
import { BasicTable, useTable } from '/@/components/Table'
import { onMounted, ref, defineProps } from 'vue'
import { onMounted, ref, defineProps, watch } from 'vue'
import emitter from '/@/utils/Bus'
import { FeeStatistics } from './api'
import { currencyColumns, costomerColumns } from './columns'
const props = defineProps({
@ -65,7 +66,7 @@
}
})
//
const data = ref({})
const statisticData = ref({})
//
const activeKey = ref('1')
//
@ -78,13 +79,14 @@
}
FeeStatistics(postData).then(res => {
const { data } = res
data.value = data
const noTaxReceive = data.noTaxReceivableCNY + data.noTaxReceivableUSD + data.noTaxReceivableOther
const taxReceive = data.receivableCNY + data.receivableUSD + data.receivableOther
const noTaxPay = data.noTaxPayableCNY + data.noTaxPayableUSD + data.noTaxPayableOther
const taxPay = data.payableCNY + data.payableUSD + data.payableOther
const noTaxProfit = data.noTaxProfitCNY + data.noTaxProfitUSD + data.noTaxProfitOther
const taxProfit = data.profitCNY + data.profitUSD + data.profitOther
statisticData.value = data
emitter.emit('profitCNY', data.profitCNY)
const noTaxReceive = (data.noTaxReceivableCNY + data.noTaxReceivableUSD + data.noTaxReceivableOther).toFixed(2)
const taxReceive = (data.receivableCNY + data.receivableUSD + data.receivableOther).toFixed(2)
const noTaxPay = (data.noTaxPayableCNY + data.noTaxPayableUSD + data.noTaxPayableOther).toFixed(2)
const taxPay = (data.payableCNY + data.payableUSD + data.payableOther).toFixed(2)
const noTaxProfit = (data.noTaxProfitCNY + data.noTaxProfitUSD + data.noTaxProfitOther).toFixed(2)
const taxProfit = (data.profitCNY + data.profitUSD + data.profitOther).toFixed(2)
currencyData.value = [
{ total: 'RMB', noTaxReceive: data.noTaxReceivableCNY, taxReceive: data.receivableCNY, noTaxPay: data.noTaxPayableCNY, taxPay: data.payableCNY, noTaxProfit: data.noTaxProfitCNY, taxProfit: data.profitCNY },
{ total: 'USD', noTaxReceive: data.noTaxReceivableUSD, taxReceive: data.receivableUSD, noTaxPay: data.noTaxPayableUSD, taxPay: data.payableUSD, noTaxProfit: data.noTaxProfitUSD, taxProfit: data.profitUSD },
@ -93,8 +95,10 @@
]
})
}
onMounted(() => {
init(props.id)
watch(
() => props.id,
(id) => {
init(id)
})
const [registerTable] = useTable({
title: '',

@ -56,6 +56,8 @@
//
import { feeUnitDict } from '/@/hooks/dict/index'
import { GetList, SubmitFee, DeleteFee, ApplyAudit, Withdraw } from './api'
//
import { GetClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
defineComponent({
@ -88,6 +90,8 @@
const unitDict = ref([])
//
const currencyDict = ref([])
//
const companyDict = ref([])
//
import { getDictOption } from '/@/utils/dictUtil'
//
@ -185,6 +189,33 @@
process(dict)
},
},
{
title: '结算对象',
width: 130,
data: 'customerName',
type: 'dropdown',
source: async (query, process) => {
//
const rowIndex = hotTb.value.hotInstance.countRows()
const code = list.value[rowIndex - 1].customerType
if (code) {
GetClientListByCode({ code }).then(res => {
const { data } = res
data.forEach(item => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
const dict = data.map((item) => {
return item.shortName
})
process(dict)
})
} else {
process([])
}
},
},
{
title: '单位标准',
width: 130,
@ -231,6 +262,7 @@
width: 120,
data: 'noTaxPrice',
type: 'numeric',
readOnly: true
},
{
title: '不含税金额',
@ -238,6 +270,7 @@
data: 'noTaxAmount',
type: 'numeric',
format: '0.00',
readOnly: true
},
{
title: '金额',
@ -447,6 +480,14 @@
//
if (changes[0][1] === 'feeEnName') {
}
//
if (changes[0][1] === 'customerName') {
const item = companyDict.value.filter((item) => {
return item.name === changes[0][3]
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerCode'] = dict?.value
}
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
@ -478,40 +519,34 @@
//
if (changes[0][1] === 'noTaxPrice') {
//
list.value[index].unitPrice =
(changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1)
list.value[index].unitPrice = Number((changes[0][3] || 0) * ((list.value[index].taxRate || 0) / 100 + 1)).toFixed(6)
//
list.value[index].amount =
(list.value[index].unitPrice || 0) * (list.value[index].quantity || 0)
list.value[index].amount = Number((list.value[index].unitPrice || 0) * (list.value[index].quantity || 0)).toFixed(6)
//
list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number((changes[0][3] || 0) * (list.value[index].quantity || 0)).toFixed(6)
}
//
if (changes[0][1] === 'unitPrice') {
//
list.value[index].noTaxPrice =
(changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1)
list.value[index].noTaxPrice = Number((changes[0][3] || 0) / ((list.value[index].taxRate || 0) / 100 + 1)).toFixed(6)
//
list.value[index].amount = (changes[0][3] || 0) * (list.value[index].quantity || 0)
list.value[index].amount = Number((changes[0][3] || 0) * (list.value[index].quantity || 0)).toFixed(6)
//
list.value[index].noTaxAmount =
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number((list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)).toFixed(6)
}
//
if (changes[0][1] === 'quantity') {
//
list.value[index].amount = (changes[0][3] || 0) * (list.value[index].unitPrice || 0)
list.value[index].amount = Number((changes[0][3] || 0) * (list.value[index].unitPrice || 0)).toFixed(6)
//
list.value[index].noTaxAmount = (changes[0][3] || 0) * (list.value[index].noTaxPrice || 0)
list.value[index].noTaxAmount = Number((changes[0][3] || 0) * (list.value[index].noTaxPrice || 0)).toFixed(6)
}
//
if (changes[0][1] === 'taxRate') {
//
list.value[index].noTaxPrice =
(list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1)
list.value[index].noTaxPrice = Number((list.value[index].unitPrice || 0) / ((changes[0][3] || 0) / 100 + 1)).toFixed(6)
//
list.value[index].noTaxAmount =
(list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)
list.value[index].noTaxAmount = Number((list.value[index].noTaxPrice || 0) * (list.value[index].quantity || 0)).toFixed(6)
}
}
},
@ -601,6 +636,11 @@
item.id = ''
item.feeStatus = 1
item.feeStatusText = '录入状态'
if (props.tbType == 'receive') {
item.feeType = 2
} else {
item.feeType = 1
}
if (item.selected) flag = true
})
if (!flag) return createMessage.warning('请勾选要复制的数据!')
@ -615,6 +655,11 @@
item.feeStatus = 1
item.feeStatusText = '录入状态'
item.selected = false
if (props.tbType == 'receive') {
item.feeType = 2
} else {
item.feeType = 1
}
})
console.log(selectData)
emits('broInsert', selectData)
@ -697,7 +742,7 @@
}
})
}
hotTb.value.hotInstance.loadData(data)
hotTb.value.hotInstance.loadData(list.value)
})
.catch(() => {
loading.value = false
@ -733,10 +778,15 @@
item.selected = false
})
}
props.broData.forEach((item) => {
list.value.push(item)
})
})
watch(
() => props.broData,
(row) => {
row.forEach((item) => {
list.value.push(item)
})
}
)
watch(
() => props.id,
() => {

@ -7,7 +7,7 @@
<div class="cost-entry-main-info">
<a-form layout="vertical" class="ds-form-detail">
<a-row :gutter="15">
<a-col v-for="item in list" :span="item.span">
<a-col v-for="(item, index) in list" :span="item.span" :key='item.value + index'>
<a-form-item
:label="item.label"
>
@ -24,7 +24,7 @@
import { defineProps, ref, watch, computed, unref } from 'vue'
//
const list = ref([
{ label: '委托编号', field: 'customerNo', span: 4, value: '1' },
{ label: '委托编号', field: 'customerNo', span: 4, value: '' },
{ label: '主题单号', field: 'mblno', span: 4, value: '' },
{ label: '箱型箱量', field: 'packingType', span: 4, value: '' },
{ label: '件数', field: 'pkgs', span: 3, value: '' },

@ -7,7 +7,7 @@
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainAPI/ClientFlowTemplate/GetFlowContent'
list = '/mainAPI/ClientFlowInstance/GetFlowContent'
}
// 流程图 (Auth)
export function GetFlowContent(params: PageRequest) {

@ -20,12 +20,12 @@
import FlowDesign from '/@/views/flowcenter/flowInstances/Lowflow/index.vue'
import { GetFlowContent } from './api'
const visible = ref(false)
const init = (id, type) => {
const init = (id, type, btype) => {
visible.value = true
console.log(id)
// GetFlowContent({ id, type }).then(res => {
// console.log(res)
// })
GetFlowContent({ businessId: id, type, businessType: btype }).then(res => {
console.log(res.Data)
})
}
const fields = ref([])
const process = ref({

@ -74,3 +74,8 @@
height: 20px!important;
}
}
.ant-col-5 {
max-width: 20%!important;
flex: 0;
}

@ -0,0 +1,6 @@
<template>
<div>
</div>
</template>
<script lang="ts" setup>
</script>

@ -0,0 +1,6 @@
<template>
<div>
</div>
</template>
<script lang="ts" setup>
</script>

@ -0,0 +1,7 @@
<template>
<div>
1
</div>
</template>
<script lang="ts" setup>
</script>

@ -0,0 +1,6 @@
<template>
<div>
</div>
</template>
<script lang="ts" setup>
</script>

@ -66,6 +66,8 @@
const list = ref([])
//
const feeDict = ref([])
//
const companyDict = ref([])
// tableDom
const hotTb = ref(null)
//
@ -126,6 +128,32 @@
})
process(dict)
}
}, {
title: '结算对象',
width: 130,
data: 'customerName',
type: 'dropdown',
source: async (query, process) => {
//
const rowIndex = hotTb.value.hotInstance.countRows()
const code = list.value[rowIndex - 1].customerType
if (code) {
GetClientListByCode({ code }).then(res => {
const { data } = res
data.forEach(item => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
const dict = data.map((item) => {
return item.shortName
})
process(dict)
})
} else {
process([])
}
},
}, {
title: '客户类别',
width: 130,

@ -253,7 +253,7 @@
import { GetPackageSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
registerAllModules()
import * as XLSX from 'xlsx'
import printJS from 'print-js'
// import printJS from 'print-js'
const route = useRoute()
const props = defineProps({
details: { type: Object, default: {} },
@ -1211,12 +1211,12 @@
//
async function PrintExcel() {
printJS({
printable: 'printableTable',
type: 'html',
header: null,
targetStyles: ['*'],
})
// printJS({
// printable: 'printableTable',
// type: 'html',
// header: null,
// targetStyles: ['*'],
// })
}
// -------------------------------
const loadingTable = ref(false)

Loading…
Cancel
Save