Agriculture is a vital sector that must operate efficiently to meet daily dietary needs, manage logistics, and enhance food production. However, it faces significant challenges, particularly concerning product safety within supply chain management. Addressing these issues requires the adoption of advanced technologies to ensure transparency, traceability, and sustainability in agricultural supply chains. Moreover, maximizing value and maintaining consumer trust are crucial in modern agricultural practices. Existing methods often struggle to provide transparent information to stakeholders, ensure consumer trust, and accurately trace product origins. To overcome these challenges, this study proposes an innovative approach that integrates blockchain technology with a novel Dilated Self-Attention-based TabNet (DSA-TabNet) algorithm for agricultural supply chain management. The DSA-TabNet algorithm is utilized for quality assessment, leveraging blockchain to create a transparent and tamper-proof record of transactions and product data. This allows stakeholders to track the flow of agricultural products and access critical information, including storage conditions, transportation details, and harvesting and cultivation practices. To ensure data integrity and secure transactions, the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm is employed. PBFT enhances the system's reliability by preventing fraudulent activities within the supply chain. The DSA-TabNet algorithm also detects patterns related to product quality, enabling early identification of issues such as adulteration, spoilage, and contamination. By learning from historical data, stakeholders receive timely notifications, ensuring that consumers receive high-quality and safe products, thereby increasing efficiency and reducing losses. The effectiveness of the proposed approach is evaluated using key performance indicators, including precision, specificity, F1-score, accuracy, recall, throughput, and latency. The results demonstrate that the integration of DSA-TabNet with blockchain technology significantly enhances the reliability, transparency, and efficiency of agricultural supply chain management.