|
|
|
@ -130,7 +130,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
|
import { GetCheckBillList, CheckBillLocking, CheckBillUnLocking } from './api.js'
|
|
|
|
|
import {
|
|
|
|
|
GetCheckBillList,
|
|
|
|
|
CheckBillLocking,
|
|
|
|
|
CheckBillUnLocking,
|
|
|
|
|
BatchDelCheckBill,
|
|
|
|
|
} 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'
|
|
|
|
@ -146,86 +151,87 @@
|
|
|
|
|
import { useAppStore } from '/@/store/modules/app'
|
|
|
|
|
const appStore = useAppStore()
|
|
|
|
|
// 表格
|
|
|
|
|
const [registerTable, { getForm, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await GetCheckBillList(p)
|
|
|
|
|
calcData.value = [res.data?.dataTotal]
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
if (res.data?.list) {
|
|
|
|
|
const ids = res.data.list.map((item) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
appStore.setIds(ids, 'khdz')
|
|
|
|
|
}
|
|
|
|
|
resolve({ data: [...res.data.list], total: res.count })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 请求前的参数格式化
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
},
|
|
|
|
|
// beforeFetch: () => {
|
|
|
|
|
// var currentPageInfo: any = getPaginationRef()
|
|
|
|
|
// var data = getForm().getFieldsValue()
|
|
|
|
|
// const postParam: API.PageRequest = {
|
|
|
|
|
// queryCondition: '',
|
|
|
|
|
// pageCondition: {
|
|
|
|
|
// pageIndex: currentPageInfo.current,
|
|
|
|
|
// pageSize: currentPageInfo.pageSize,
|
|
|
|
|
// sortConditions: [],
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// postParam.pageCondition.sortConditions.push({
|
|
|
|
|
// sortField: 'createTime',
|
|
|
|
|
// listSortDirection: 1,
|
|
|
|
|
// })
|
|
|
|
|
// let condition: API.ConditionItem[] = []
|
|
|
|
|
// if (!!data.billNo) {
|
|
|
|
|
// condition.push({
|
|
|
|
|
// FieldName: 'billNo',
|
|
|
|
|
// FieldValue: data.billNo,
|
|
|
|
|
// ConditionalType: 1,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// if (!!data.customerName) {
|
|
|
|
|
// condition.push({
|
|
|
|
|
// FieldName: 'customerName',
|
|
|
|
|
// FieldValue: data.customerName,
|
|
|
|
|
// ConditionalType: 1,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// postParam.queryCondition = JSON.stringify(condition)
|
|
|
|
|
// return postParam
|
|
|
|
|
// },
|
|
|
|
|
columns,
|
|
|
|
|
formConfig: {
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
// 表格表单需要的过滤字段集合
|
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
|
// 是否显示高级查询(默认否)
|
|
|
|
|
useAdvancedSearch: true,
|
|
|
|
|
},
|
|
|
|
|
isTreeTable: false,
|
|
|
|
|
pagination: true,
|
|
|
|
|
striped: true,
|
|
|
|
|
useSearchForm: true,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
showIndexColumn: true,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
canResize: true,
|
|
|
|
|
resizeHeightOffset: 90,
|
|
|
|
|
immediate: true,
|
|
|
|
|
actionColumn: {
|
|
|
|
|
width: 80,
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getRawDataSource }] =
|
|
|
|
|
useTable({
|
|
|
|
|
title: '',
|
|
|
|
|
api: async (p) => {
|
|
|
|
|
const res: API.DataResult = await GetCheckBillList(p)
|
|
|
|
|
calcData.value = [res.data?.dataTotal]
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
if (res.data?.list) {
|
|
|
|
|
const ids = res.data.list.map((item) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
appStore.setIds(ids, 'khdz')
|
|
|
|
|
}
|
|
|
|
|
resolve({ data: [...res.data.list], total: res.count })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 请求前的参数格式化
|
|
|
|
|
beforeFetch: (p) => {
|
|
|
|
|
return formatParams(p)
|
|
|
|
|
},
|
|
|
|
|
// beforeFetch: () => {
|
|
|
|
|
// var currentPageInfo: any = getPaginationRef()
|
|
|
|
|
// var data = getForm().getFieldsValue()
|
|
|
|
|
// const postParam: API.PageRequest = {
|
|
|
|
|
// queryCondition: '',
|
|
|
|
|
// pageCondition: {
|
|
|
|
|
// pageIndex: currentPageInfo.current,
|
|
|
|
|
// pageSize: currentPageInfo.pageSize,
|
|
|
|
|
// sortConditions: [],
|
|
|
|
|
// },
|
|
|
|
|
// }
|
|
|
|
|
// postParam.pageCondition.sortConditions.push({
|
|
|
|
|
// sortField: 'createTime',
|
|
|
|
|
// listSortDirection: 1,
|
|
|
|
|
// })
|
|
|
|
|
// let condition: API.ConditionItem[] = []
|
|
|
|
|
// if (!!data.billNo) {
|
|
|
|
|
// condition.push({
|
|
|
|
|
// FieldName: 'billNo',
|
|
|
|
|
// FieldValue: data.billNo,
|
|
|
|
|
// ConditionalType: 1,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// if (!!data.customerName) {
|
|
|
|
|
// condition.push({
|
|
|
|
|
// FieldName: 'customerName',
|
|
|
|
|
// FieldValue: data.customerName,
|
|
|
|
|
// ConditionalType: 1,
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
// postParam.queryCondition = JSON.stringify(condition)
|
|
|
|
|
// return postParam
|
|
|
|
|
// },
|
|
|
|
|
columns,
|
|
|
|
|
formConfig: {
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
// 表格表单需要的过滤字段集合
|
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
|
// 是否显示高级查询(默认否)
|
|
|
|
|
useAdvancedSearch: true,
|
|
|
|
|
},
|
|
|
|
|
isTreeTable: false,
|
|
|
|
|
pagination: true,
|
|
|
|
|
striped: true,
|
|
|
|
|
useSearchForm: true,
|
|
|
|
|
showTableSetting: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
showIndexColumn: true,
|
|
|
|
|
indexColumnProps: {
|
|
|
|
|
width: 60,
|
|
|
|
|
},
|
|
|
|
|
canResize: true,
|
|
|
|
|
resizeHeightOffset: 90,
|
|
|
|
|
immediate: true,
|
|
|
|
|
actionColumn: {
|
|
|
|
|
width: 80,
|
|
|
|
|
title: '操作',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
// 复制对账编号
|
|
|
|
|
function FnCopy(data) {
|
|
|
|
|
const el = document.createElement('input')
|
|
|
|
@ -246,7 +252,25 @@
|
|
|
|
|
}
|
|
|
|
|
// 删除
|
|
|
|
|
function FnDel() {
|
|
|
|
|
notification.warning({ message: '待开发', duration: 3 })
|
|
|
|
|
const select = getSelectRows()
|
|
|
|
|
let ApiData: any = {
|
|
|
|
|
ids: [],
|
|
|
|
|
}
|
|
|
|
|
if (select.length === 0) {
|
|
|
|
|
notification.warning({ message: '请至少选择一条数据', duration: 3 })
|
|
|
|
|
return false
|
|
|
|
|
} else {
|
|
|
|
|
ApiData.ids = select.map((item) => {
|
|
|
|
|
return item.id
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BatchDelCheckBill(ApiData).then((res) => {
|
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
|
reload()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// notification.warning({ message: '待开发', duration: 3 })
|
|
|
|
|
}
|
|
|
|
|
// 锁定
|
|
|
|
|
function Lock() {
|
|
|
|
|