lijingjia 3 months ago
commit c5cf852a9c

@ -50,6 +50,31 @@
</hot-table>
</div>
</div>
<div class="HotTable" v-if="TotTableType">
<div>
<a-button type="link" @click="ViewTableAdd" class="pl0">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
</div>
<div style="position: relative">
<input
class="ds-tb-check ds-goods-tb-check"
type="checkbox"
v-model="ViewlallCheck"
:indeterminate="ViewlsomeCheck"
v-if="Viewlist.length !== 0"
/>
<hot-table ref="hotTb" :data="Viewlist" :settings="Viewsettings">
<img
v-show="!Viewlist.length"
class="hot-tb-no-data"
src="../../../assets/images/nodata.png"
alt=""
/>
</hot-table>
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="电子文档" :disabled="!rowId">
<DsFile ref="dsFile" fileType="infoclient" :id="rowId" />
@ -101,9 +126,19 @@
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
style="margin-right: 0.8rem"
@click="handleSave(true)"
>保存并关闭</a-button
>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
:disabled="!rowId"
@click="MakeFee(true)"
>
生成费用
</a-button>
</template>
</BasicModal>
</template>
@ -120,10 +155,20 @@
GetCtnSelectList,
GetClientPortSelectList,
} from '/@/views/operation/seaexport/api/BookingLedger'
import { ApiEdit, ApiInfo, ApiListDetail, ApiDelDetail } from './api'
import {
ApiEdit,
ApiInfo,
ApiListDetail,
ApiDelDetail,
ApiMakeFee,
ApiDetailView,
ApiAddCtn,
} from './api'
import { GetClientListByCode } from '/@/api/common'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
import DsFile from '/@/components/File/index.vue'
//
import FeeTable from '/@/components/CostEntry/feeTable.vue'
@ -137,13 +182,25 @@
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
submitFunc: submit,
})
const TotTableType = ref(false)
async function submit() {
const values = await validate()
if (values.rentDirectId == 1) {
TotTableType.value = true
} else {
TotTableType.value = false
}
}
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
activeKey.value = '1'
TotTableType.value = false
Viewlist.value.splice(0)
list.value.splice(0)
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
@ -154,6 +211,9 @@
setFieldsValue({
...res.data,
})
submit()
GetListDetail()
GetViewListDetail()
}
} else {
rowId.value = ''
@ -161,16 +221,52 @@
setModalProps({ loading: false })
})
function GetViewListDetail() {
ApiDetailView({
queryCondition: '[]',
pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] },
}).then((res) => {
Viewlist.value.splice(0)
res.data.forEach((item) => {
Viewlist.value.push(item)
})
})
}
function GetListDetail() {
ApiListDetail({
queryCondition: `[{ FieldName: 'Pid', FieldValue: '${rowId.value}', ConditionalType: 1 }]`,
pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] },
}).then((res) => {
list.value.splice(0)
res.data.forEach((item) => {
list.value.push(item)
})
})
}
function MakeFee() {
ApiMakeFee(rowId.value).then((res) => {
notification.success({ message: res.message, duration: 3 })
})
}
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
values.bodyList = list.value
let Arr = ['pickupDate', 'dropoffDate', 'feeStartDate', 'bsdate']
values.bodyList.forEach((item) => {
Arr.forEach((item2) => {
if (!item[item2]) {
item[item2] = null
}
})
})
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
emit('success')
@ -216,6 +312,8 @@
const ContainerOwnerDict = ref([])
//
const PortDict = ref([])
// //
// const currencyDict = ref([])
watchEffect(() => {
//
if (allCheck.value) {
@ -310,12 +408,12 @@
data: 'dropoffPortCode',
},
// -----------------
{
title: '租箱业务号',
width: 200,
data: 'billno',
readOnly: true,
},
// {
// title: '',
// width: 200,
// data: 'billno',
// readOnly: true,
// },
{
title: '箱号',
width: 120,
@ -354,21 +452,21 @@
// process(dict)
// },
// },
{
title: '租箱业务',
width: 120,
data: 'cmRentDirectEnum',
},
{
title: '租箱类型',
width: 120,
data: 'rentType',
},
{
title: '业务状态',
width: 120,
data: 'billState',
},
// {
// title: '',
// width: 120,
// data: 'cmRentDirectEnum',
// },
// {
// title: '',
// width: 120,
// data: 'rentType',
// },
// {
// title: '',
// width: 120,
// data: 'billState',
// },
{
title: '关联放箱单号',
width: 120,
@ -391,7 +489,16 @@
{
title: '币别',
width: 120,
data: 'currenty',
data: 'currency',
type: 'dropdown',
// (process)
source: async (query, process) => {
const results = await optionsStore.getOptionsByCodeAsync('GetFeeCurrencySelectList')
const dict = results.map((item: any) => {
return item.description
})
process(dict)
},
},
{
title: '日租金',
@ -529,7 +636,6 @@
return item.portName === changes[0][3]
})
if (item) dict = item[0]
console.log(dict)
if (changes[0][1] === 'pickupPort') {
list.value[changes[0][0]]['pickupPort'] = dict?.portName
@ -562,6 +668,109 @@
if (ApiData.ids.length) {
ApiDelDetail(ApiData).then((res) => {
if (res.succeeded) {
GetListDetail()
notification.success({ message: res.message, duration: 3 })
}
})
}
}
//--------------------------------------- tab1 View ---------------------------------------
const Viewlist = ref<any>([])
//
const ViewlallCheck = ref(false)
//
const ViewlsomeCheck = ref(false)
watchEffect(() => {
//
if (ViewlallCheck.value) {
Viewlist.value.forEach((item: any) => {
item.selected = true
})
} else {
//
Viewlist.value.forEach((item: any) => {
item.selected = false
})
}
})
watch(
Viewlist.value,
(val) => {
let a = 0
let b = 0
val.forEach((item: any) => {
if (item.selected) {
a += 1
} else {
b += 1
}
})
if (a == 0) {
ViewlallCheck.value = false
}
if (b == 0) {
ViewlallCheck.value = true
}
if (a != 0 && b != 0) {
ViewlsomeCheck.value = true
} else {
ViewlsomeCheck.value = false
}
},
{
deep: true,
},
)
const Viewsettings = {
height: '163',
autoWrapRow: true,
autoWrapCol: true,
//
rowHeights: 26,
fixedColumnsLeft: 1,
//
hiddenColumns: {
columns: [1, 2, 3, 4, 5, 6, 7, 8],
indicators: true,
},
//
enterMoves: 'row',
columnSorting: false,
//
afterValidate: function (isValid, value, row, prop, source) {
if (!isValid) {
hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
}
},
columns: columns,
// ()
licenseKey: 'non-commercial-and-evaluation',
//
async afterChange(changes, source) {},
}
function ViewTableAdd() {
let ApiData: any = { ids: [] }
list.value.forEach((e: any, i) => {
if (e.selected) {
list.value.splice(i, 1)
}
})
if (ApiData.ids.length) {
ApiAddCtn(ApiData).then(async (res) => {
if (res.succeeded) {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
allCheck.value = false
someCheck.value = false
setFieldsValue({
...res.data,
})
ViewlallCheck.value = false
ViewlsomeCheck.value = false
submit()
GetListDetail()
GetViewListDetail()
}
// getData(false)
notification.success({ message: res.message, duration: 3 })
}

@ -13,7 +13,38 @@ enum Api {
Confirm = '/containerManagementApi/CM_RentIn/CM_RentIn_Confirm',
Cancel = '/containerManagementApi/CM_RentIn/CM_RentIn_Cancel',
MakeFee = '/containerManagementApi/CM_RentIn/CM_RentIn_MakeFee',
DetailView = '/containerManagementApi/CM_RentIn/CM_RentIn_Detail_View',
AddCtn = '/containerManagementApi/CM_RentIn/CM_RentIn_AddCtn',
}
// 租箱租入明细视图 (Auth)
export function ApiDetailView(data: PageRequest) {
return request<DataResult>({
url: Api.DetailView,
method: 'post',
data,
})
}
// 租箱租入退租_添加 (Auth)
export function ApiAddCtn(data: PageRequest) {
return request<DataResult>({
url: Api.AddCtn,
method: 'post',
data,
})
}
// 租箱租入_生成费用 (Auth)
export function ApiMakeFee(data: PageRequest) {
return request<DataResult>({
url: Api.MakeFee,
method: 'post',
headers:{
'Content-Type':'application/json-patch+json'
},
data,
})
}
// 租箱租入_确认 (Auth)
export function ApiConfirm(data: PageRequest) {

@ -178,19 +178,40 @@ export const formSchema: FormSchema[] = [
show: false,
},
{
field: 'rentDirect',
label: '租箱业务',
component: 'Input',
field: 'businessType',
label: '业务类型',
component: 'ApiSelect',
colProps: { span: 6 },
show: false,
defaultValue: '',
componentProps: ({}) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_BusinessType').then((res) => {
res.forEach((item) => {
item.value = parseInt(item.value)
})
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'rentDirectId',
label: '租箱业务',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
componentProps: ({ formModel, formActionType }) => {
return {
api: () => {
return new Promise((resolve) => {
@ -209,6 +230,7 @@ export const formSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
formActionType ? formActionType.submit() : null
if (e && obj) {
formModel.rentDirect = obj.label
} else {
@ -219,10 +241,31 @@ export const formSchema: FormSchema[] = [
},
},
{
field: 'rentType',
field: 'rentTypeId',
label: '租箱类型',
component: 'Input',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({}) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_RentType').then((res) => {
res.forEach((item) => {
item.value = parseInt(item.value)
})
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'billState',

@ -17,11 +17,11 @@
删除
</a-button>
</a-popconfirm>
<a-button type="link" @click="Confirm" disabled>
<a-button type="link" @click="Confirm">
<span class="iconfont icon-yiwancheng2"></span>
确认执行
</a-button>
<a-button type="link" @click="Cancel" disabled>
<a-button type="link" @click="Cancel">
<span class="iconfont icon-weiwancheng"></span>
取消确认
</a-button>

@ -0,0 +1,319 @@
{
"id": "root",
"pid": null,
"type": "start",
"name": "发起人",
"formProperties": [],
"child": {
"id": "node-o4wyo",
"pid": "root",
"type": "exclusive",
"name": "独占网关",
"child": { "id": "end", "pid": "node-o4wyo", "type": "end", "name": "结束", "child": null },
"children": [
{
"id": "node-f77vw",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "非南美",
"conditions": {
"logicalOperator": "and",
"conditions": [{ "field": "LaneCode", "operator": "not_equal", "value": "NM" }],
"groups": []
},
"child": {
"id": "node-j8u9p",
"pid": "node-f77vw",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688", "1819230545675161600", "1819230545683550209"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-a22n9",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "跳过",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "CustomerName", "operator": "equal", "value": "山东昊华" },
{ "field": "SourceCode", "operator": "equal", "value": "FOB-DF" }
],
"groups": []
},
"child": null
},
{
"id": "node-vnl2p",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "深圳公司",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "Carrier", "operator": "not_contain", "value": "HPL,MSK" },
{ "field": "SaleOrgName", "operator": "equal", "value": "深圳昭阳" }
],
"groups": []
},
"child": {
"id": "node-s1cri",
"pid": "node-vnl2p",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688", "1819230545675161601"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-9uuhr",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "南美1",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "LaneCode", "operator": "equal", "value": "NM" },
{ "field": "Carrier", "operator": "contains", "value": "CMA,WHL,EMC,OOCL" }
],
"groups": []
},
"child": {
"id": "node-0fwjq",
"pid": "node-9uuhr",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-70t5u",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "南美2",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "LaneCode", "operator": "equal", "value": "NM" },
{ "field": "Carrier", "operator": "contains", "value": "HPL,ONE,PIL" }
],
"groups": []
},
"child": {
"id": "node-5r9oh",
"pid": "node-70t5u",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-r37dv",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "南美3",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "LaneCode", "operator": "equal", "value": "NM" },
{ "field": "Carrier", "operator": "contains", "value": "MSK,CSSC,BAL" }
],
"groups": []
},
"child": {
"id": "node-jh8em",
"pid": "node-r37dv",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688", "1819230545670967296"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-9o4ye",
"pid": "node-o4wyo",
"type": "condition",
"def": false,
"name": "南美4",
"conditions": {
"logicalOperator": "and",
"conditions": [
{ "field": "LaneCode", "operator": "equal", "value": "NM" },
{ "field": "Carrier", "operator": "contains", "value": "MSC,COSCO,YML,HMM,ZIM" }
],
"groups": []
},
"child": {
"id": "node-k8wge",
"pid": "node-9o4ye",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688", "1819230545670967297"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
},
{
"id": "node-gbpua",
"pid": "node-o4wyo",
"type": "condition",
"def": true,
"name": "默认条件",
"conditions": { "logicalOperator": "and", "conditions": [], "groups": [] },
"child": {
"id": "node-4qz0c",
"pid": "node-gbpua",
"type": "approval",
"name": "审批人",
"child": null,
"assigneeType": "user",
"formUser": "",
"formRole": "",
"users": ["1819230545662578688"],
"roles": [],
"leader": 1,
"choice": false,
"self": false,
"multi": "single",
"nobody": "pass",
"formProperties": [],
"operations": {
"complete": true,
"refuse": true,
"save": true,
"transfer": false,
"addMulti": false,
"minusMulti": false
}
}
}
]
},
"assigneeType": "role",
"roles": [
"1750335714333167616",
"1759818143288659968",
"1816846705598009344",
"1816846763210969088",
"1816846802184441856",
"1819258968346857472"
],
"users": []
}

@ -602,28 +602,28 @@ export const columns: BasicColumn[] = [
title: '创建日期',
align: 'center',
width: 150,
dataIndex: 'createdTime',
dataIndex: 'createTime',
customCell: sharedOnCell,
},
{
title: '创建人',
align: 'center',
width: 100,
dataIndex: 'createdUserName',
dataIndex: 'createUserName',
customCell: sharedOnCell,
},
{
title: '更新日期',
align: 'center',
width: 150,
dataIndex: 'updatedTime',
dataIndex: 'updateTime',
customCell: sharedOnCell,
},
{
title: '更新人',
align: 'center',
width: 100,
dataIndex: 'updatedUserName',
dataIndex: 'updateUserName',
customCell: sharedOnCell,
},
{
@ -785,12 +785,10 @@ export const detialForm: FormSchema[] = [
],
onChange: (e, obj) => {
if (e && obj) {
console.log(e, obj,1)
formModel.bookingSlotTypeName = obj.label
}
if (!obj && !e) {
formModel.bookingSlotTypeName = ''
console.log(e, obj,2)
}
},
}

@ -339,13 +339,13 @@ export const columns: BasicColumn[] = [
title: '订舱人',
align: 'center',
width: 130,
dataIndex: 'createdUserName'
dataIndex: 'createUserName'
},
{
title: '订舱日期',
align: 'center',
width: 150,
dataIndex: 'createdTime'
dataIndex: 'createTime'
},
{
title: '金额',

@ -96,4 +96,13 @@ export function RenderTemplate(parameter) {
})
}
export function InvoiceApplicationDelete(parameter) {
return request({
url: '/feeApi/InvoiceApplication/Delete',
method: 'post',
data: parameter,
})
}

@ -50,7 +50,7 @@ import { BasicForm, useForm } from '/@/components/Form/index'
import { AutoComplete } from 'ant-design-vue'
import { detailForm } from '../columns'
import feeTable from './feeTable.vue';
import { InvoiceApplicationSave, InvoiceApplicationGet, GetTemplateFields, SaveTemplate, GetTemplateList } from '../api'
import { InvoiceApplicationSave, InvoiceApplicationGet, GetTemplateFields, SaveTemplate, GetTemplateList,RenderTemplate } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
import { useRoute } from 'vue-router'
const route = useRoute()
@ -150,6 +150,12 @@ function getDetail() {
}
function openTempName() {
nameFlag.value = true
GetTemplateList().then(res => {
tempList.value = res.data
tempList.value.forEach(item => {
item.value = item.name
})
})
}
function updateListSave() {
@ -162,6 +168,14 @@ function handleRender(){
temp = item.content
}
})
const data = {
id:id.value,
template: temp
}
RenderTemplate(data).then(res=>{
})
}
const tempName = ref('')
const tempId = ref('')

@ -82,7 +82,7 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { GetList} from './api.js'
import { GetList,InvoiceApplicationDelete} from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns, searchFormSchema, billTypeData } from './columns'
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
@ -90,6 +90,7 @@
import DsPrint from '/@/components/Print/index.vue'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const { createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
//
@ -97,7 +98,7 @@
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
//
const [registerTable, { getForm, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
const [registerTable, { reload, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetList(p)
@ -144,7 +145,15 @@
}
//
function FnDel() {
notification.warning({ message: '待开发', duration: 3 })
const ids = getSelectRows().map((item) => {
return item.id
})
InvoiceApplicationDelete({ids:ids}).then(res=>{
if(res.succeeded){
createMessage.success('删除成功')
reload()
}
})
}

Loading…
Cancel
Save