Commit 90b17694 by zhuzhequan

eslint 报错

parent 636d4b74
......@@ -37,7 +37,6 @@ declare module 'vue' {
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
Icon: typeof import('./src/components/Icon.vue')['default']
ImageView: typeof import('./src/components/ImageView.vue')['default']
LogList: typeof import('./src/components/LogList.vue')['default']
......
......@@ -277,7 +277,7 @@ export function updateReconciliation(
)
}
export function getShipmentDetailsById(shipmentId?: number) {
return axios.get<never, BaseRespData<OrderData>>(
return axios.get<never, BaseRespData<any>>(
'factory/customJomallReconciliation/getShipmentDetailsById',
{
params: {
......
......@@ -3,7 +3,7 @@ import { Splitpanes, Pane } from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'
const props = defineProps({
defineProps({
size: {
default: 15,
type: Number
......
......@@ -96,10 +96,20 @@ export interface ProductionOrder {
passNum?: number
}
export interface AccountStatementNote{
billNumber:string
shipmentNum:string
lanshouName:string
lanshouPhone:string
totalAmount:string
billNumber?:string
shipmentNum?:string
dataVersion?:string
carriageName?:string
lanshouAddress?:string
totalPrice?:string
passNum?:string
lanshouPost?:string
notPassNum?:string
lanshouRegion?:string
orderNumber?:string
lanshouName?:string
lanshouPhone?:string
logisticsTracking?:string
totalAmount?:string
id?:number
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ export interface UsePageListOptions<T> {
statusCode?: number,
) => Promise<PaginationData<T>>
initPageSize?: number
statistics?: boolean
initLoad?: boolean
}
......@@ -31,7 +32,7 @@ export default function usePageList<T>(options: UsePageListOptions<T>) {
try {
loading.value = true
// Promise 链式调用
let res = await query(currentPage.value, pageSize.value)
let res:any = await query(currentPage.value, pageSize.value)
if (statistics.value) {
totalData.sumNotPassNum = res.sumNotPassNum
totalData.sumPassNum = res.sumPassNum
......
......@@ -365,13 +365,15 @@ import splitDiv from '@/components/splitDiv/splitDiv.vue'
interface Tree {
label: string
id: number
count?: number
children:any[],
id: number | string
}
import {
AccountStatementNote,
} from '@/types/api/deliveryNote'
import { OrderData } from '@/types/api/order'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue'
import {
......@@ -379,12 +381,12 @@ import {
getCustomJomallReconciliationById, getReconciliationAmount, getShipmentDetailsById, updateReconciliation,
} from '@/api/order'
import { ref, onMounted, watch, reactive, nextTick } from 'vue'
import { ref, onMounted, watch, nextTick } from 'vue'
import { showError } from '@/utils/ui'
import 'element-plus/dist/index.css'
const treeData: Tree[] = ref([
const treeData = ref<Tree[]>([
{
label: '全部',
id: '-1',
......@@ -392,20 +394,25 @@ const treeData: Tree[] = ref([
{
label: '草稿箱',
id: 0,
children:[]
},
{
label: '待确认',
id: 1,
children:[]
},
{
label: '待付款',
id: 2,
children:[]
}, {
label: '已付款',
id: 3,
children:[]
}, {
label: '归档',
id: 4,
children:[]
},
],
},
......@@ -415,11 +422,11 @@ const [searchForm, resetSearchForm] = useValue<AccountStatementNote>({})
const dateRange = ref<string[]>([])
const selections = ref<AccountStatementNote[]>([])
const detailList = ref<any[]>([])
const detailList = ref<AccountStatementNote[]>([])
const tabsValue = ref<string>('0')
const singleTableRef = ref<any>(null)
const currentRow = ref<AccountStatementNote>(null)
const logList = ref<string[]>([])
const currentRow = ref<AccountStatementNote | null>(null)
const logList = ref<any[]>([])
const nodeId = ref<number | string>('-1')
......@@ -428,7 +435,11 @@ const treeRef = ref<InstanceType<typeof ElTree>>()
const editForm = ref<AccountStatementNote>({
billNumber: '',
lanshouAddress: '',
totalPrice: '',
shipmentNum: '',
passNum: '',
lanshouPost: '',
lanshouName: '',
lanshouPhone: '',
totalAmount: '',
......@@ -457,15 +468,16 @@ const {
})
onMounted(() => {
(treeRef as never).value.setCurrentKey(nodeId.value, true)
(treeRef as any).value.setCurrentKey(nodeId.value, true)
})
const dialogVisible = ref<boolean>(false)
const orderDetailData = ref<OrderData>({} as OrderData)
const getTreeNum = async () => {
let { data } = await getReconciliationAmount()
let res = await getReconciliationAmount()
let data:any = res.data
treeData.value = [{
label: '全部',
id: '-1',
......@@ -491,17 +503,21 @@ const getTreeNum = async () => {
],
}]
nextTick(() => {
(treeRef as never).value.setCurrentKey(nodeId.value, true)
(treeRef as any).value.setCurrentKey(nodeId.value, true)
})
treeData.value.forEach((el) => {
if(!el.children){
el.children = []
}
el.children.forEach((it) => {
it.count = 0
})
})
treeData.value.forEach((el, index) => {
treeData.value.forEach((el) => {
el.children.forEach((it) => {
data.forEach((item) => {
data.forEach((item:any) => {
if (it.id === item.status) {
it['count'] = item.count
}
......@@ -512,7 +528,7 @@ const getTreeNum = async () => {
})
})
treeData.value[0].label = ''
treeData.value[0].label = '全部' + (data.find(el => el.totalSum) ? `(${data.find(el => el.totalSum).totalSum})` : '(0)')
treeData.value[0].label = '全部' + (data.find((el:any) => el.totalSum) ? `(${data.find((el:any) => el.totalSum).totalSum})` : '(0)')
console.log(treeData.value)
}
const onEditOrder = async (item: AccountStatementNote) => {
......@@ -546,8 +562,7 @@ const submitData = async () => {
showError(e)
}
}
const rowClick = (row) => {
console.log(row)
const rowClick = (row:any) => {
currentRow.value = row
tabsValue.value = '0'
tabsClick(tabsValue.value)
......@@ -556,21 +571,21 @@ const rowClick = (row) => {
const tabsClick = async (name: string) => {
if (!currentRow.value) return
if (name === '0') {
let { data } = await getShipmentDetailsById(currentRow.value.shipmentId)
let { data } = await getShipmentDetailsById((currentRow.value as any).shipmentId)
detailList.value = data
} else if (name === '1') {
await logOrder(currentRow.value)
}
}
const handleSelectionChange = (v) => {
const handleSelectionChange = (v:any) => {
selections.value = v
}
const getSummaries = ({ columns, data }) => {
console.log(data)
console.log(totalData)
let sums = []
columns.forEach((column, index) => {
const getSummaries = (data:any) => {
let columns = data.columns
let sums:any[] = []
columns.forEach((column:any, index:number) => {
console.log(column)
if (index === 0) {
sums[index] = '统计'
}
......@@ -587,7 +602,6 @@ const getSummaries = ({ columns, data }) => {
sums[index] = totalData['sumTotalPrice']
}
})
console.log([sums], ' [sums]')
return sums
}
......@@ -595,7 +609,7 @@ const sureFactory = () => {
ElMessageBox.confirm(`确认对账单?`, '重要提示', {
confirmButtonText: '确定',
type: 'warning',
}).then(async res => {
}).then(async () => {
await factoryConfirm(selections.value.map(el => {
return {
id: el.id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment