| | |
| | | label: '客户名称', |
| | | search: true, |
| | | minWidth: 220, |
| | | |
| | | showOverflowTooltip: true, |
| | | type: 'select', // 设置为下拉框类型 |
| | | dicData: [], // 使用 selectCustomName 作为数据源 |
| | | disabled: false // 根据需要设置是否禁用 |
| | |
| | | |
| | | carrierName: { |
| | | label: '承运商', |
| | | minWidth: 210, |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | }, |
| | | departureLocation: { |
| | | label: '出发地', |
| | | minWidth: 200, |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | }, |
| | | arrivalLocation: { |
| | | label: '目的地', |
| | | minWidth: 200, |
| | | minWidth: 220, |
| | | showOverflowTooltip: true, |
| | | |
| | | }, |
| | | isCreate: { |
| | | label: '是否已入账', dataType: 'string', |
| | | type: 'select', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_whether_type', |
| | | }, |
| | | |
| | | // vehicleId: { |
| | | // label: '运输工具ID',hide: true, |
| | | // }, |
| | |
| | | }, |
| | | businessContact: { |
| | | label: '业务联系人', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | }, |
| | | estimatedTotalIncome: { |
| | | label: '预估总收入', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | estimatedTotalCost: { |
| | | label: '预估总成本', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | estimatedProfit: { |
| | | label: '预估利润', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | |
| | | confirmedTotalIncome: { |
| | | label: '确认总收入', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | confirmedTotalCost: { |
| | | label: '确认总成本', |
| | | minWidth: 120, |
| | | minWidth: 120, |
| | | |
| | | }, |
| | | isCreate: { |
| | | label: '是否已入账', dataType: 'string', |
| | | type: 'select', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | search: true, |
| | | dicUrl: '/system/dict/data/type/sys_whether_type', |
| | | }, |
| | | billName: { |
| | | label: '关联账单名称', |
| | | fixed: 'right', |
| | | minWidth: 120, |
| | | search: true, |
| | | }, |
| | | isIncomeMatched: { |
| | | label: '是否匹配收入', |
| | | |
| | | type: 'select', |
| | | dataType: 'string', |
| | | minWidth: 120, |
| | | |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | isCostMatched: { |
| | | label: '是否匹配成本', |
| | | type: 'select', |
| | | dataType: 'string', |
| | | minWidth: 120, |
| | | dicUrl: '/system/dict/data/type/sys_matching_status', |
| | | }, |
| | | |
| | | |
| | | relatedBillStatus: { |
| | | minWidth: 120, |
| | | label: '关联账单状态', |
| | | dataType: 'string', |
| | | type: 'select', |
| | | dicUrl: '/system/dict/data/type/sys_related_status', |
| | | // formatter: (row, value) => { |
| | | // // 自定义格式化逻辑(如果需要) |
| | | // return value; |
| | | // } |
| | | }, |
| | | // electronicLock: { |
| | | // label: '电子锁', |
| | |
| | | crudRef.value.rowEdit(selectionList.value[0]); |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | if (selection.every((item: any) => item.isCreate == '0')) { |
| | | generateDisabled.value = false; |
| | | } else { |
| | | generateDisabled.value = true; |
| | | if (selection.length > 0) { |
| | | proxy.$message.warning('请选择未入账的记录'); |
| | | if (selection.length > 0) { |
| | | // 检查是否所有记录都是未入账状态(isCreate == '0') |
| | | const allNotCreated = selection.every((item: any) => item.isCreate == '0'); |
| | | // 检查是否所有记录的客户名称都相同 |
| | | const sameCustomer = selection.every((item: any) => item.customerName === selection[0].customerName); |
| | | |
| | | if (allNotCreated && sameCustomer) { |
| | | generateDisabled.value = false; |
| | | } else { |
| | | generateDisabled.value = true; |
| | | if (!allNotCreated) { |
| | | proxy.$message.warning('请选择未入账的记录'); |
| | | } else if (!sameCustomer) { |
| | | proxy.$message.warning('请选择相同客户名称的记录'); |
| | | } |
| | | } |
| | | } else { |
| | | generateDisabled.value = false; |
| | | } |
| | | selectionList.value = selection; |
| | | selectionList.value = selection; |
| | | } |
| | | }) |
| | |
| | | dispatchNo.value = row.dispatchNo; |
| | | dialog.title = '费用明细'; |
| | | if (activeName.value == 'first') { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 1,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |
| | |
| | | }) |
| | | } else if (activeName.value == 'second') { |
| | | // 这里可以添加查询收入相关的逻辑 |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0 }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: row.dispatchNo, feeType: 0,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | dialog.detail = true; |
| | | tableDataList.value = res.rows || []; |
| | |
| | | } |
| | | } |
| | | const getListVable = (dispatchNo, feeType) => { |
| | | listEstimatedReceivable({ dispatchNo: dispatchNo, feeType: feeType }).then((res) => { |
| | | listEstimatedReceivable({ dispatchNo: dispatchNo, feeType: feeType,isConfirmed:1 }).then((res) => { |
| | | if (res.code === 200) { |
| | | tableDataList.value = res.rows || []; |
| | | } |
| | |
| | | return sums; |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | :deep(.avue-crud__table) { |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | :deep(.el-scrollbar__bar.is-horizontal) { |
| | | pointer-events: auto; |
| | | } |
| | | </style> |