Commit 90b17694 by zhuzhequan

eslint 报错

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